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 = {
},
// 生产环境配置
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', // 静态资源路径
baseUrl
:
'http
s://coujiao.pseer.com
/front-api'
,
// 后台接口请求地址
baseUrl
:
'http
://129.211.46.84:8883
/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地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
weixinAppId
:
''
,
// 微信公众号appid
...
...
pages/my/myInfo.vue
View file @
b0408b22
...
...
@@ -43,7 +43,7 @@
<text
class=
"text-gray"
>
余额
</text>
</view>
<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
class=
"item-box"
>
...
...
@@ -54,7 +54,7 @@
<text
class=
"text-gray"
>
积分
</text>
</view>
<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
class=
"item-box"
>
...
...
@@ -65,7 +65,7 @@
<text
class=
"text-gray"
>
时长
</text>
</view>
<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
class=
"item-box"
@
tap=
"onNavByPath('couponList')"
>
...
...
@@ -228,7 +228,6 @@
import
fTabbar
from
'@/components/module/f-tabbar/f-tabbar'
;
import
{
getUserInfo
,
getUserWallet
,
loginOut
,
systemConfig
}
from
"@/api/index.js"
...
...
@@ -251,7 +250,6 @@
assetsPath
:
config
.
assetsPath
,
hostUrl
:
config
.
hostUrl
,
userInfo
:
{},
userWalletInfo
:
''
,
userAction
:
[],
wifiData
:
{
name
:
""
,
...
...
@@ -344,10 +342,6 @@
this
.
onGetOrderInfo
();
}
})
getUserWallet
().
then
(
res
=>
{
console
.
log
(
res
,
9999
)
this
.
userWalletInfo
=
res
.
data
})
},
onGetOrderInfo
(){
orderList
({
...
...
pages/order/order.vue
View file @
b0408b22
...
...
@@ -240,12 +240,44 @@
<text
class=
"cuIcon-right "
:class=
"useCouponList.length?'text-pink':'text-gray'"
></text>
</view>
</view>
<view
class=
"flex-between price"
>
<view
v-if=
"computePriceInfo.balance"
class=
"flex-between price"
>
<text
class=
"text-black text-left"
>
优惠金额
</text>
<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>
<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>
...
...
pages/vipCreate/vipCreate.vue
View file @
b0408b22
...
...
@@ -38,9 +38,9 @@
</view>
<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>
<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"
>
<text>
送
{{
item
.
giveAmount
}}
小时
</text>
</view>
...
...
@@ -52,8 +52,7 @@
<view
class=
"part-amount"
>
<view
class=
"flex-row amount"
>
<text
class=
"symbol"
>
¥
</text>
<text
class=
"num"
>
1000
</text>
<!--
<text
class=
"num"
>
{{
item
.
rechargeAmount
}}
</text>
-->
<text
class=
"num"
>
{{
item
.
rechargeAmount
}}
</text>
</view>
</view>
<view
class=
"tip-text"
>
...
...
@@ -88,8 +87,8 @@
<text
class=
"text-2"
>
99.
</text>
<text
class=
"text-3"
>
00
</text>
</view>
<view
class=
"cu-btn-box"
>
<button
class=
"cu-btn"
>
立即开通
</button>
<view
class=
"cu-btn-box"
@
tap=
"onSubmit"
>
<button
class=
"cu-btn"
:class=
"consumerMemberStatus?'bg-gray':'bg-pink'"
>
立即开通
</button>
</view>
</view>
</view>
...
...
@@ -126,6 +125,11 @@
equityMembersList
,
createEquityMembers
}
from
"@/api/uerInfo.js"
;
import
{
getUserInfo
,
}
from
"@/api/index.js"
import
{
rechargeConf
,
createRecharge
...
...
@@ -143,7 +147,9 @@
list
:
[],
rechargeConfList
:
[],
tabIndex
:
1
,
index
:
0
rechargeIndex
:
0
,
index
:
0
,
consumerMemberStatus
:
false
};
},
onLoad
()
{
...
...
@@ -152,26 +158,36 @@
this
.
onLoading
();
},
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
){
console
.
log
(
e
,
99999
)
this
.
checked
=
e
.
detail
.
value
.
includes
(
"checked"
)
},
onNavToRecharge
(){
console
.
log
(
this
.
checked
,
9999
);
if
(
!
this
.
checked
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请先阅读充值协议并同意"
})
return
;
}
},
onLoading
()
{
equityMembersList
().
then
(
res
=>
{
console
.
log
(
res
,
999999
)
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
rows
)
{
this
.
list
=
res
.
data
.
rows
}
this
.
onGetUserInfo
();
})
},
onGetRechargeConf
()
{
...
...
@@ -190,13 +206,24 @@
onTabChange
(
val
)
{
if
(
this
.
tabIndex
==
val
)
return
;
this
.
tabIndex
=
val
;
this
.
checked
=
false
;
},
onSubmit
()
{
if
(
!
this
.
checked
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请先阅读充值协议并同意"
})
return
;
}
uni
.
showLoading
({
title
:
"提交中..."
})
createEquityMembers
({
payType
:
1
,
equityMembersConfigId
:
this
.
list
[
this
.
index
].
id
}).
then
(
res
=>
{
console
.
log
(
res
,
9999
)
uni
.
hideLoading
();
if
(
res
.
data
.
data
.
jsConfig
)
{
wx
.
requestPayment
({
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
...
...
@@ -228,12 +255,22 @@
})
},
onSubmit2
()
{
onNavToRecharge
()
{
if
(
!
this
.
checked
){
uni
.
showToast
({
icon
:
"none"
,
title
:
"请先阅读充值协议并同意"
})
return
;
}
uni
.
showLoading
({
title
:
"提交中..."
})
createRecharge
({
payType
:
1
,
rechargeConfId
:
this
.
rechargeConfList
[
0
].
id
rechargeConfId
:
this
.
rechargeConfList
[
this
.
rechargeIndex
].
id
}).
then
(
res
=>
{
console
.
log
(
res
,
9999
)
uni
.
hideLoading
();
if
(
res
.
data
.
data
.
jsConfig
)
{
wx
.
requestPayment
({
"timeStamp"
:
res
.
data
.
data
.
jsConfig
.
timeStamp
,
...
...
@@ -406,6 +443,7 @@
.amount-bg
{
display
:
block
;
width
:
100%
;
max-height
:
240
upx
;
}
.item-content
{
...
...
@@ -416,9 +454,8 @@
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
}
.line
{
width
:
80%
;
height
:
1
rpx
;
...
...
@@ -462,22 +499,20 @@
flex-direction
:
row
;
align-items
:
flex-end
;
justify-content
:
center
;
color
:
#FE3F00
;
.symbol
{
font-weight
:
400
;
font-size
:
29
upx
;
color
:
#FE3F00
;
margin-bottom
:
10
upx
;
}
.num
{
font-weight
:
400
;
font-size
:
64
upx
;
color
:
#FE3F00
;
}
}
.tip-text
{
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
...
...
@@ -485,12 +520,34 @@
height
:
50
upx
;
background
:
linear-gradient
(
-90deg
,
#FCD25B
,
#FA541D
);
border-radius
:
0
0
23
upx
23
upx
;
z-index
:
2
;
text
{
font-size
:
19
upx
;
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 @@
.img-bg{
display
:
block
;
width
:
100%
;
max-height
:
160
upx
;
}
.absolute
{
display
:
flex
;
...
...
@@ -602,11 +660,14 @@
.cu-btn{
padding
:
0
20
upx
;
height
:
40
upx
;
background
:
#FA561E
;
border-radius
:
20
upx
;
font-size
:
24
upx
;
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