Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_wechat
Commits
9e44c986
Commit
9e44c986
authored
Jul 17, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新功能开发
parent
830d4cef
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
245 additions
and
24 deletions
+245
-24
recharge.js
api/recharge.js
+10
-0
f-tabbar.vue
components/module/f-tabbar/f-tabbar.vue
+6
-0
index.config.js
config/index.config.js
+4
-4
pages.json
pages.json
+14
-8
vipCreate.vue
pages/vipCreate/vipCreate.vue
+211
-12
vip.png
static/tab-bar-img/vip.png
+0
-0
vip_selected.png
static/tab-bar-img/vip_selected.png
+0
-0
No files found.
api/recharge.js
View file @
9e44c986
...
@@ -6,5 +6,15 @@ export const recordsList=(data)=>{
...
@@ -6,5 +6,15 @@ export const recordsList=(data)=>{
return
http
.
get
(
url
,
data
)
return
http
.
get
(
url
,
data
)
}
}
// 充值配置
export
const
rechargeConf
=
(
data
)
=>
{
let
url
=
`/rechargeConf/list`
return
http
.
get
(
url
,
data
)
}
export
const
createRecharge
=
(
data
)
=>
{
let
url
=
`/recharge/createRecharge`
return
http
.
post
(
url
,
data
)
}
components/module/f-tabbar/f-tabbar.vue
View file @
9e44c986
...
@@ -102,6 +102,12 @@
...
@@ -102,6 +102,12 @@
iconFill
:
'/static/tab-bar-img/home_selected.png'
iconFill
:
'/static/tab-bar-img/home_selected.png'
},
},
{
{
name
:
'会员中心'
,
url
:
'pages/vipCreate/vipCreate'
,
icon
:
'/static/tab-bar-img/vip.png'
,
iconFill
:
'/static/tab-bar-img/vip_selected.png'
},
{
name
:
'订单'
,
name
:
'订单'
,
url
:
'pages/orderRecord/orderRecord'
,
url
:
'pages/orderRecord/orderRecord'
,
icon
:
'/static/tab-bar-img/order.png'
,
icon
:
'/static/tab-bar-img/order.png'
,
...
...
config/index.config.js
View file @
9e44c986
...
@@ -5,10 +5,10 @@ const CONFIG = {
...
@@ -5,10 +5,10 @@ const CONFIG = {
// assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径
// assetsPath: 'https://coujiao.pseer.com/wechat_static', // 静态资源路径
assetsPath
:
'http://10.24.5.167:8211/static'
,
// 静态资源路径
assetsPath
:
'http://10.24.5.167:8211/static'
,
// 静态资源路径
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
baseUrl
:
'https://coujiao.pseer.com/front-api'
,
// 后台接口请求地址
//
baseUrl: 'https://coujiao.pseer.com/front-api', // 后台接口请求地址
// baseUrl: 'http://10.24.3.185
:8883/front-api',
baseUrl
:
'http://129.211.46.84
:8883/front-api'
,
// hostUrl: 'https://www.coujio.com
/prod-api', // H5地址(前端运行地址)
hostUrl
:
'http://129.211.46.84:8882
/prod-api'
,
// H5地址(前端运行地址)
hostUrl
:
'https://coujiao.pseer.com/prod-api'
,
// H5地址(前端运行地址)
//
hostUrl: 'https://coujiao.pseer.com/prod-api', // H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
websocketUrl
:
''
,
// websocket服务端地址
weixinAppId
:
''
,
// 微信公众号appid
weixinAppId
:
''
,
// 微信公众号appid
codeHeadUrl
:
""
,
codeHeadUrl
:
""
,
...
...
pages.json
View file @
9e44c986
...
@@ -8,6 +8,14 @@
...
@@ -8,6 +8,14 @@
}
}
},
},
{
{
"path"
:
"pages/vipCreate/vipCreate"
,
"style"
:
{
"navigationBarTitleText"
:
"权益充值"
,
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"pages/storeList/storeList"
,
"path"
:
"pages/storeList/storeList"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"选择门店"
,
"navigationBarTitleText"
:
"选择门店"
,
...
@@ -142,15 +150,7 @@
...
@@ -142,15 +150,7 @@
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"设备控制"
"navigationBarTitleText"
:
"设备控制"
}
}
},
{
"path"
:
"pages/vipCreate/vipCreate"
,
"style"
:
{
"navigationBarTitleText"
:
"权益充值"
}
}
}
],
],
"subPackages"
:
[
"subPackages"
:
[
{
{
...
@@ -206,6 +206,12 @@
...
@@ -206,6 +206,12 @@
"text"
:
"首页"
"text"
:
"首页"
},
},
{
{
"pagePath"
:
"pages/vipCreate/vipCreate"
,
"iconPath"
:
"static/tab-bar-img/vip.png"
,
"selectedIconPath"
:
"static/tab-bar-img/vip_selected.png"
,
"text"
:
"会员中心"
},
{
"pagePath"
:
"pages/orderRecord/orderRecord"
,
"pagePath"
:
"pages/orderRecord/orderRecord"
,
"iconPath"
:
"static/tab-bar-img/order.png"
,
"iconPath"
:
"static/tab-bar-img/order.png"
,
"selectedIconPath"
:
"static/tab-bar-img/order_selected.png"
,
"selectedIconPath"
:
"static/tab-bar-img/order_selected.png"
,
...
...
pages/vipCreate/vipCreate.vue
View file @
9e44c986
<
template
>
<
template
>
<view
class=
"vip-create"
>
<view
class=
"vip-create"
>
<view
class=
"banner-box"
>
<view
class=
"bg-header"
>
<image
:src=
"assetsPath+'/vip/bg.png'"
mode=
"widthFix"
></image>
<image
:src=
"assetsPath+'/vip/bg_header.png'"
mode=
"widthFix"
></image>
<view
class=
"footer-box"
>
</view>
<button
class=
"cu-btn round bg-pink"
@
tap=
"onSubmit"
>
立即充值
</button>
<view
class=
"content"
>
<view
class=
"bg-box-1"
>
<view
class=
"bg-box-2"
>
<view
class=
"flex-row-center title-content"
>
<view
class=
"xx"
>
<image
:src=
"assetsPath+'/xx.png'"
mode=
"widthFix"
></image>
</view>
<view
class=
"title-text"
>
<view
class=
"text"
>
<text>
会员超值购
</text>
</view>
<view
class=
"line"
>
</view>
</view>
<view
class=
"xx"
>
<image
:src=
"assetsPath+'/xx.png'"
mode=
"widthFix"
></image>
</view>
</view>
<view
class=
"flex-between"
>
<view
class=
"part-left"
>
<text>
充值会员
</text>
</view>
<view
class=
"part-right"
>
<text>
权益会员
</text>
</view>
</view>
<view
class=
"list-box"
>
<view
v-for=
"(item,k) in rechargeConfList"
:key=
"k"
class=
"flex-col item"
>
<view
v-if=
"item.giveType.includes('1')"
class=
""
>
<text>
送
{{
item
.
giveAmount
}}
小时
</text>
</view>
<view
v-else-if=
"item.giveType.includes('2')"
class=
""
>
<text>
送
{{
item
.
giveDuration
}}
小时
</text>
</view>
<view
class=
"line"
>
</view>
<view
class=
"flex-row"
>
<text>
¥
</text><text>
{{
item
.
rechargeAmount
}}
</text>
</view>
<view
class=
"tip-text"
>
<text>
充值送时长,多充多送
</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<f-tabbar></f-tabbar>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
{
equityMembersList
,
createEquityMembers
}
from
"@/api/uerInfo.js"
;
import
{
equityMembersList
,
createEquityMembers
}
from
"@/api/uerInfo.js"
;
import
{
rechargeConf
,
createRecharge
}
from
"@/api/recharge.js"
;
import
config
from
"@/config/index.config"
;
import
config
from
"@/config/index.config"
;
export
default
{
export
default
{
components
:
{
fTabbar
},
data
()
{
data
()
{
return
{
return
{
assetsPath
:
config
.
assetsPath
,
assetsPath
:
config
.
assetsPath
,
list
:[],
list
:[],
rechargeConfList
:[],
index
:
0
index
:
0
};
};
},
},
onLoad
()
{
onLoad
()
{
uni
.
hideTabBar
();
this
.
onGetRechargeConf
();
this
.
onLoading
();
this
.
onLoading
();
},
},
methods
:{
methods
:{
...
@@ -34,6 +95,19 @@
...
@@ -34,6 +95,19 @@
}
}
})
})
},
},
onGetRechargeConf
(){
rechargeConf
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
rows
){
this
.
rechargeConfList
=
res
.
data
.
rows
.
map
(
item
=>
{
return
{
...
item
,
giveType
:
item
.
giveType
?
item
.
giveType
.
split
(
","
):[]
}
})
console
.
log
(
this
.
rechargeConfList
,
9999
)
}
})
},
onSubmit
(){
onSubmit
(){
createEquityMembers
({
createEquityMembers
({
payType
:
1
,
payType
:
1
,
...
@@ -70,6 +144,43 @@
...
@@ -70,6 +144,43 @@
}
}
})
})
},
onSubmit2
(){
createRecharge
({
payType
:
1
,
rechargeConfId
:
this
.
rechargeConfList
[
0
].
id
}).
then
(
res
=>
{
console
.
log
(
res
,
9999
)
if
(
res
.
data
.
data
.
jsConfig
)
{
wx
.
requestPayment
({
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
"nonceStr"
:
res
.
data
.
data
.
jsConfig
.
nonceStr
,
"package"
:
res
.
data
.
data
.
jsConfig
.
packages
,
"signType"
:
res
.
data
.
data
.
jsConfig
.
signType
,
"paySign"
:
res
.
data
.
data
.
jsConfig
.
paySign
,
"success"
:
(
resp
)
=>
{
// 支付成功
uni
.
showToast
({
icon
:
"success"
,
title
:
"下单成功"
,
success
:
()
=>
{
}
})
},
"fail"
:
(
resp
)
=>
{
// 取消支付或支付失败
uni
.
showToast
({
title
:
"取消支付"
})
},
"complete"
:
(
resp
)
=>
{
// 接口调用结束的回调函数(调用成功、失败都会执行)
}
});
}
})
}
}
}
}
}
}
...
@@ -80,14 +191,102 @@
...
@@ -80,14 +191,102 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
width
:
100%
;
width
:
100%
;
min-height
:
100vh
;
justify-content
:
center
;
.bg-header{
display
:
block
;
image{
display
:
block
;
width
:
100%
;
}
}
.content
{
display
:
flex
;
width
:
100%
;
background-color
:
#FFEABF
;
justify-content
:
center
;
padding-bottom
:
60
upx
;
.bg-box-1{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
690
upx
;
min-height
:
596
upx
;
background
:
#FFCA7E
;
border-radius
:
32
upx
;
padding
:
10
upx
0
;
.bg-box-2{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
height
:
100%
;
width
:
668
upx
;
background
:
linear-gradient
(
-42deg
,
#FFF5CB
,
#FFFFFF
);
border-radius
:
32
upx
;
.title-content{
margin-top
:
34
upx
;
.title-text{
display
:
flex
;
justify-content
:
center
;
position
:
relative
;
margin
:
0
20
upx
;
.text{
position
:
relative
;
font-weight
:
normal
;
font-size
:
48
rpx
;
color
:
#000000
;
background
:
linear-gradient
(
-90deg
,
#FF7800
0%
,
#FF0000
100%
);
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
z-index
:
2
;
}
.line
{
position
:
absolute
;
bottom
:
0
;
width
:
110%
;
height
:
15
upx
;
background
:
#FFEABF
;
border-radius
:
8
upx
;
}
}
.xx
{
width
:
30
upx
;
image{
width
:
100%
;
max-height
:
34
upx
;
}
}
}
}
}
.list-box
{
display
:
flex
;
width
:
100%
;
padding
:
0
1%
;
justify-content
:
center
;
.item{
display
:
flex
;
align-items
:
center
;
width
:
31%
;
margin
:
0
1%
;
background
:
linear-gradient
(
-39deg
,
#FFEABF
,
#FFFFFF
);
border-radius
:
10
rpx
28
rpx
28
rpx
28
rpx
;
border
:
1px
solid
#FF4D05
;
.line{
width
:
90%
;
height
:
1
rpx
;
border
:
1px
solid
#FA541D
;
}
.tip-text
{
font-size
:
16
upx
;
}
}
}
}
}
}
.banner-box
{
position
:
relative
;
width
:
100%
;
}
image
{
width
:
100%
;
}
.footer-box
{
.footer-box
{
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
...
static/tab-bar-img/vip.png
0 → 100644
View file @
9e44c986
5.97 KB
static/tab-bar-img/vip_selected.png
0 → 100644
View file @
9e44c986
8.87 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment