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
b0408b22
Commit
b0408b22
authored
Jul 19, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能优化
parent
8d4cdedf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
130 additions
and
43 deletions
+130
-43
index.config.js
config/index.config.js
+3
-3
myInfo.vue
pages/my/myInfo.vue
+3
-9
order.vue
pages/order/order.vue
+34
-2
vipCreate.vue
pages/vipCreate/vipCreate.vue
+90
-29
No files found.
config/index.config.js
View file @
b0408b22
...
@@ -16,11 +16,11 @@ const CONFIG = {
...
@@ -16,11 +16,11 @@ const CONFIG = {
},
},
// 生产环境配置
// 生产环境配置
production
:
{
production
:
{
assetsPath
:
'http
s://coujiao.pseer.com
/wechat_static'
,
// 静态资源路径
assetsPath
:
'http
://129.211.46.84:8888
/wechat_static'
,
// 静态资源路径
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
// assetsPath: 'https://www.coujio.com/wechat_static', // 静态资源路径
baseUrl
:
'http
s://coujiao.pseer.com
/front-api'
,
// 后台接口请求地址
baseUrl
:
'http
://129.211.46.84:8883
/front-api'
,
// 后台接口请求地址
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
// baseUrl: 'https://www.coujio.com/front-api', // 后台接口请求地址
hostUrl
:
'http
s://coujiao.pseer.com
/prod-api'
,
// H5地址(前端运行地址)
hostUrl
:
'http
://129.211.46.84:8882
/prod-api'
,
// H5地址(前端运行地址)
// hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
// hostUrl: 'https://www.coujio.com/prod-api', // H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
websocketUrl
:
''
,
// websocket服务端地址
weixinAppId
:
''
,
// 微信公众号appid
weixinAppId
:
''
,
// 微信公众号appid
...
...
pages/my/myInfo.vue
View file @
b0408b22
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<text
class=
"text-gray"
>
余额
</text>
<text
class=
"text-gray"
>
余额
</text>
</view>
</view>
<view
class=
"value-box"
>
<view
class=
"value-box"
>
<text
class=
"text-black text-lg text-bold"
>
{{
user
WalletInfo
.
balance
||
0
}}
</text>
<text
class=
"text-black text-lg text-bold"
>
{{
user
Info
.
consumerWallet
.
balance
||
0
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"item-box"
>
<view
class=
"item-box"
>
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<text
class=
"text-gray"
>
积分
</text>
<text
class=
"text-gray"
>
积分
</text>
</view>
</view>
<view
class=
"value-box"
>
<view
class=
"value-box"
>
<text
class=
"text-black text-lg text-bold"
>
{{
user
WalletInfo
.
remainingIntegral
||
0
}}
</text>
<text
class=
"text-black text-lg text-bold"
>
{{
user
Info
.
consumerWallet
.
remainingIntegral
||
0
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"item-box"
>
<view
class=
"item-box"
>
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<text
class=
"text-gray"
>
时长
</text>
<text
class=
"text-gray"
>
时长
</text>
</view>
</view>
<view
class=
"value-box"
>
<view
class=
"value-box"
>
<text
class=
"text-black text-lg text-bold"
>
{{
user
WalletInfo
.
remainingDuration
||
0
}}
</text>
<text
class=
"text-black text-lg text-bold"
>
{{
user
Info
.
consumerWallet
.
remainingDuration
||
0
}}
</text>
</view>
</view>
</view>
</view>
<view
class=
"item-box"
@
tap=
"onNavByPath('couponList')"
>
<view
class=
"item-box"
@
tap=
"onNavByPath('couponList')"
>
...
@@ -228,7 +228,6 @@
...
@@ -228,7 +228,6 @@
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
{
import
{
getUserInfo
,
getUserInfo
,
getUserWallet
,
loginOut
,
loginOut
,
systemConfig
systemConfig
}
from
"@/api/index.js"
}
from
"@/api/index.js"
...
@@ -251,7 +250,6 @@
...
@@ -251,7 +250,6 @@
assetsPath
:
config
.
assetsPath
,
assetsPath
:
config
.
assetsPath
,
hostUrl
:
config
.
hostUrl
,
hostUrl
:
config
.
hostUrl
,
userInfo
:
{},
userInfo
:
{},
userWalletInfo
:
''
,
userAction
:
[],
userAction
:
[],
wifiData
:
{
wifiData
:
{
name
:
""
,
name
:
""
,
...
@@ -344,10 +342,6 @@
...
@@ -344,10 +342,6 @@
this
.
onGetOrderInfo
();
this
.
onGetOrderInfo
();
}
}
})
})
getUserWallet
().
then
(
res
=>
{
console
.
log
(
res
,
9999
)
this
.
userWalletInfo
=
res
.
data
})
},
},
onGetOrderInfo
(){
onGetOrderInfo
(){
orderList
({
orderList
({
...
...
pages/order/order.vue
View file @
b0408b22
...
@@ -240,12 +240,44 @@
...
@@ -240,12 +240,44 @@
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
</view>
</view>
</view>
</view>
<view
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.balance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
优惠金额
</text>
<text
class=
"text-black text-left"
>
优惠金额
</text>
<view
class=
"flex-row"
>
<view
class=
"flex-row"
>
<!--
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
-->
<!--
<text
class=
"text-pink text-sm text-bold"
style=
"margin-bottom: 3upx;"
>
{{
computePriceInfo
.
couponFee
>
0
?
'-'
:
''
}}
¥
</text>
-->
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
couponFee
||
0
}}
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
balance
||
0
}}
</text>
<text>
(余额抵扣)
</text>
</view>
</view>
<view
v-else-if=
"computePriceInfo.couponFee"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
优惠金额
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
couponFee
}}
</text>
<text>
(优惠券抵扣)
</text>
</view>
</view>
<view
v-if=
"computePriceInfo.duration"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
时长抵扣
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
duration
||
0
}}
</text>
</view>
</view>
<view
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
钱包余额
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink"
>
¥
</text>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
remainingBalance
}}
</text>
</view>
</view>
<view
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
可用时长
</text>
<view
class=
"flex-row"
>
<text
class=
"text-pink text-lg text-bold"
>
{{
computePriceInfo
.
remainingDuration
}}
</text>
<text
class=
"text-pink"
>
小时
</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/vipCreate/vipCreate.vue
View file @
b0408b22
...
@@ -38,9 +38,9 @@
...
@@ -38,9 +38,9 @@
</view>
</view>
<view
v-if=
"tabIndex ==1"
class=
"list-box"
>
<view
v-if=
"tabIndex ==1"
class=
"list-box"
>
<view
v-for=
"(item,k) in rechargeConfList"
:key=
"k"
class=
"flex-col item"
>
<view
v-for=
"(item,k) in rechargeConfList"
:key=
"k"
class=
"flex-col item"
@
tap=
"onRechargeChange(k)"
>
<image
class=
"amount-bg"
:src=
"assetsPath+'/vip/amount_bg.png'"
mode=
"widthFix"
></image>
<image
class=
"amount-bg"
:src=
"assetsPath+'/vip/amount_bg.png'"
mode=
"widthFix"
></image>
<view
class=
"flex-col item-content"
>
<view
class=
"flex-col item-content"
:class=
"rechargeIndex === k?'active':''"
>
<view
v-if=
"item.giveType.includes('1')"
class=
"preferential"
>
<view
v-if=
"item.giveType.includes('1')"
class=
"preferential"
>
<text>
送
{{
item
.
giveAmount
}}
小时
</text>
<text>
送
{{
item
.
giveAmount
}}
小时
</text>
</view>
</view>
...
@@ -52,8 +52,7 @@
...
@@ -52,8 +52,7 @@
<view
class=
"part-amount"
>
<view
class=
"part-amount"
>
<view
class=
"flex-row amount"
>
<view
class=
"flex-row amount"
>
<text
class=
"symbol"
>
¥
</text>
<text
class=
"symbol"
>
¥
</text>
<text
class=
"num"
>
1000
</text>
<text
class=
"num"
>
{{
item
.
rechargeAmount
}}
</text>
<!--
<text
class=
"num"
>
{{
item
.
rechargeAmount
}}
</text>
-->
</view>
</view>
</view>
</view>
<view
class=
"tip-text"
>
<view
class=
"tip-text"
>
...
@@ -88,8 +87,8 @@
...
@@ -88,8 +87,8 @@
<text
class=
"text-2"
>
99.
</text>
<text
class=
"text-2"
>
99.
</text>
<text
class=
"text-3"
>
00
</text>
<text
class=
"text-3"
>
00
</text>
</view>
</view>
<view
class=
"cu-btn-box"
>
<view
class=
"cu-btn-box"
@
tap=
"onSubmit"
>
<button
class=
"cu-btn"
>
立即开通
</button>
<button
class=
"cu-btn"
:class=
"consumerMemberStatus?'bg-gray':'bg-pink'"
>
立即开通
</button>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -126,6 +125,11 @@
...
@@ -126,6 +125,11 @@
equityMembersList
,
equityMembersList
,
createEquityMembers
createEquityMembers
}
from
"@/api/uerInfo.js"
;
}
from
"@/api/uerInfo.js"
;
import
{
getUserInfo
,
}
from
"@/api/index.js"
import
{
import
{
rechargeConf
,
rechargeConf
,
createRecharge
createRecharge
...
@@ -143,7 +147,9 @@
...
@@ -143,7 +147,9 @@
list
:
[],
list
:
[],
rechargeConfList
:
[],
rechargeConfList
:
[],
tabIndex
:
1
,
tabIndex
:
1
,
index
:
0
rechargeIndex
:
0
,
index
:
0
,
consumerMemberStatus
:
false
};
};
},
},
onLoad
()
{
onLoad
()
{
...
@@ -152,26 +158,36 @@
...
@@ -152,26 +158,36 @@
this
.
onLoading
();
this
.
onLoading
();
},
},
methods
:
{
methods
:
{
onGetUserInfo
()
{
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
consumerMember
&&
res
.
data
.
data
.
consumerMember
.
memberType
==
2
){
let
expirationDate
=
moment
(
res
.
data
.
data
.
consumerMember
.
expirationDate
).
valueOf
();
let
nowDate
=
moment
().
valueOf
()
if
(
nowDate
<=
expirationDate
){
this
.
consumerMemberStatus
=
true
;
}
}
}
})
},
onRechargeChange
(
k
){
this
.
rechargeIndex
=
k
;
},
onRuleTipChange
(
e
){
onRuleTipChange
(
e
){
console
.
log
(
e
,
99999
)
console
.
log
(
e
,
99999
)
this
.
checked
=
e
.
detail
.
value
.
includes
(
"checked"
)
this
.
checked
=
e
.
detail
.
value
.
includes
(
"checked"
)
},
},
onNavToRecharge
(){
console
.
log
(
this
.
checked
,
9999
);
if
(
!
this
.
checked
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请先阅读充值协议并同意"
})
return
;
}
},
onLoading
()
{
onLoading
()
{
equityMembersList
().
then
(
res
=>
{
equityMembersList
().
then
(
res
=>
{
console
.
log
(
res
,
999999
)
console
.
log
(
res
,
999999
)
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
rows
)
{
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
rows
)
{
this
.
list
=
res
.
data
.
rows
this
.
list
=
res
.
data
.
rows
}
}
this
.
onGetUserInfo
();
})
})
},
},
onGetRechargeConf
()
{
onGetRechargeConf
()
{
...
@@ -190,13 +206,24 @@
...
@@ -190,13 +206,24 @@
onTabChange
(
val
)
{
onTabChange
(
val
)
{
if
(
this
.
tabIndex
==
val
)
return
;
if
(
this
.
tabIndex
==
val
)
return
;
this
.
tabIndex
=
val
;
this
.
tabIndex
=
val
;
this
.
checked
=
false
;
},
},
onSubmit
()
{
onSubmit
()
{
if
(
!
this
.
checked
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请先阅读充值协议并同意"
})
return
;
}
uni
.
showLoading
({
title
:
"提交中..."
})
createEquityMembers
({
createEquityMembers
({
payType
:
1
,
payType
:
1
,
equityMembersConfigId
:
this
.
list
[
this
.
index
].
id
equityMembersConfigId
:
this
.
list
[
this
.
index
].
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
res
,
9999
)
uni
.
hideLoading
();
if
(
res
.
data
.
data
.
jsConfig
)
{
if
(
res
.
data
.
data
.
jsConfig
)
{
wx
.
requestPayment
({
wx
.
requestPayment
({
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
...
@@ -228,12 +255,22 @@
...
@@ -228,12 +255,22 @@
})
})
},
},
onSubmit2
()
{
onNavToRecharge
()
{
if
(
!
this
.
checked
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请先阅读充值协议并同意"
})
return
;
}
uni
.
showLoading
({
title
:
"提交中..."
})
createRecharge
({
createRecharge
({
payType
:
1
,
payType
:
1
,
rechargeConfId
:
this
.
rechargeConfList
[
0
].
id
rechargeConfId
:
this
.
rechargeConfList
[
this
.
rechargeIndex
].
id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
res
,
9999
)
uni
.
hideLoading
();
if
(
res
.
data
.
data
.
jsConfig
)
{
if
(
res
.
data
.
data
.
jsConfig
)
{
wx
.
requestPayment
({
wx
.
requestPayment
({
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
...
@@ -406,6 +443,7 @@
...
@@ -406,6 +443,7 @@
.amount-bg
{
.amount-bg
{
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
max-height
:
240
upx
;
}
}
.item-content
{
.item-content
{
...
@@ -416,9 +454,8 @@
...
@@ -416,9 +454,8 @@
height
:
100%
;
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
}
}
.line
{
.line
{
width
:
80%
;
width
:
80%
;
height
:
1
rpx
;
height
:
1
rpx
;
...
@@ -462,22 +499,20 @@
...
@@ -462,22 +499,20 @@
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
flex-end
;
align-items
:
flex-end
;
justify-content
:
center
;
justify-content
:
center
;
color
:
#FE3F00
;
.symbol
{
.symbol
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
29
upx
;
font-size
:
29
upx
;
color
:
#FE3F00
;
margin-bottom
:
10
upx
;
margin-bottom
:
10
upx
;
}
}
.num
{
.num
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
64
upx
;
font-size
:
64
upx
;
color
:
#FE3F00
;
}
}
}
}
.tip-text
{
.tip-text
{
position
:
relative
;
display
:
flex
;
display
:
flex
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
...
@@ -485,12 +520,34 @@
...
@@ -485,12 +520,34 @@
height
:
50
upx
;
height
:
50
upx
;
background
:
linear-gradient
(
-90deg
,
#FCD25B
,
#FA541D
);
background
:
linear-gradient
(
-90deg
,
#FCD25B
,
#FA541D
);
border-radius
:
0
0
23
upx
23
upx
;
border-radius
:
0
0
23
upx
23
upx
;
z-index
:
2
;
text
{
text
{
font-size
:
19
upx
;
font-size
:
19
upx
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
}
}
.active
{
background
:
linear-gradient
(
-90deg
,
#FCD25B
,
#FA541D
);
box-shadow
:
0
4
upx
12
upx
#FA541D
;
border-radius
:
12
upx
;
.amount{
color
:
#ffffff
;
}
.preferential
{
text{
color
:
#ffffff
;
background
:
#ffffff
;
-webkit-background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
}
}
.part-bottom
{
.tip-text{
background
:
linear-gradient
(
-45deg
,
#FCD25B
,
#FA541D
);
}
}
}
}
}
}
}
...
@@ -541,6 +598,7 @@
...
@@ -541,6 +598,7 @@
.img-bg{
.img-bg{
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
max-height
:
160
upx
;
}
}
.absolute
{
.absolute
{
display
:
flex
;
display
:
flex
;
...
@@ -602,11 +660,14 @@
...
@@ -602,11 +660,14 @@
.cu-btn{
.cu-btn{
padding
:
0
20
upx
;
padding
:
0
20
upx
;
height
:
40
upx
;
height
:
40
upx
;
background
:
#FA561E
;
border-radius
:
20
upx
;
border-radius
:
20
upx
;
font-size
:
24
upx
;
font-size
:
24
upx
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
.bg-pink
{
background
:
#FA561E
;
}
}
}
}
}
}
}
...
...
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