Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
Project
Project
Details
Activity
Releases
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
android
uniapp_vedio
Commits
db9927e3
Commit
db9927e3
authored
Jul 25, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化样式
parent
5025cf66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
65 deletions
+79
-65
vipPay.vue
vedio/pagesA/vipPay/vipPay.vue
+79
-65
No files found.
vedio/pagesA/vipPay/vipPay.vue
View file @
db9927e3
...
@@ -13,22 +13,22 @@
...
@@ -13,22 +13,22 @@
<view
class=
"pack-item"
v-for=
'(item, index) in vipList'
:key=
'index'
<view
class=
"pack-item"
v-for=
'(item, index) in vipList'
:key=
'index'
@
click=
"choosePack(item, index)"
>
@
click=
"choosePack(item, index)"
>
<view
class=
"pack-content"
:class=
"[
{active: index==selectedIndex}]">
<view
class=
"pack-content"
:class=
"[
{active: index==selectedIndex}]">
<view
class=
"label"
>
<view
class=
"label"
v-if=
"item.topTitle"
>
{{
item
.
topTitle
}}
{{
item
.
topTitle
}}
</view>
</view>
<view
class=
"name row"
:class=
"[
{active2: index==selectedIndex}]">
<view
class=
"name row"
:class=
"[
{active2: index==selectedIndex}]">
{{
item
.
title
}}
{{
item
.
title
}}
</view>
</view>
<view
class=
"price row"
:class=
"[
{active1: index==selectedIndex}]">
<view
class=
"price row"
:class=
"[
{active1: index==selectedIndex}]">
<view
style=
"font-size:
22
rpx;"
>
¥
</view>
<view
style=
"font-size:
30
rpx;"
>
¥
</view>
{{
item
.
firstPayPrice
}}
{{
item
.
firstPayPrice
}}
</view>
</view>
<view
class=
"origin row"
v-if=
'item.oldPrice'
>
<view
class=
"origin row"
v-if=
'item.oldPrice'
>
¥
{{
item
.
oldPrice
}}
¥
{{
item
.
oldPrice
}}
</view>
</view>
<view
class=
"origin2 row"
v-if=
'item.
oldPrice
'
>
<view
class=
"origin2 row"
v-if=
'item.
remarks
'
>
{{
item
.
remarks
}}
{{
getRemark1
(
item
.
remarks
)
+
'
\
r
\
n'
+
getRemark2
(
item
.
remarks
)
}}
</view>
</view>
<view
class=
"label2"
v-if=
"index==selectedIndex"
>
<view
class=
"label2"
v-if=
"index==selectedIndex"
>
...
@@ -77,18 +77,18 @@
...
@@ -77,18 +77,18 @@
data
()
{
data
()
{
return
{
return
{
vipList
:
[],
vipList
:
[],
selectedIndex
:
0
,
selectedIndex
:
0
,
os
:
'android'
,
os
:
'android'
,
checked
:
false
,
checked
:
false
,
agreementDto
:
null
,
agreementDto
:
null
,
}
}
},
},
methods
:
{
methods
:
{
loadData
()
{
loadData
()
{
if
(
wx
.
getSystemInfoSync
().
platform
===
'ios'
)
{
if
(
wx
.
getSystemInfoSync
().
platform
===
'ios'
)
{
this
.
os
=
'ios'
;
this
.
os
=
'ios'
;
}
}
this
.
post
({
this
.
post
({
url
:
'/vip/getVipProducts/cyc'
,
url
:
'/vip/getVipProducts/cyc'
,
showLoading
:
false
,
showLoading
:
false
,
...
@@ -126,6 +126,20 @@
...
@@ -126,6 +126,20 @@
amount
(
value
)
{
amount
(
value
)
{
return
value
.
toFixed
(
2
)
return
value
.
toFixed
(
2
)
},
},
getRemark1
(
value
)
{
let
data
=
value
.
split
(
','
)
if
(
data
.
length
>
0
)
{
return
data
[
0
]
}
return
''
},
getRemark2
(
value
)
{
let
data
=
value
.
split
(
','
)
if
(
data
.
length
>
1
)
{
return
data
[
1
]
}
return
''
},
handlePay
()
{
handlePay
()
{
if
(
!
this
.
checked
)
{
if
(
!
this
.
checked
)
{
message
.
notify
(
"请阅读《支付协议》后勾选同意"
)
message
.
notify
(
"请阅读《支付协议》后勾选同意"
)
...
@@ -135,50 +149,50 @@
...
@@ -135,50 +149,50 @@
let
that
=
this
;
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
if
(
this
.
os
==
'ios'
)
{
if
(
this
.
os
==
'ios'
)
{
message
.
notify
(
'暂不支持ios系统~'
);
message
.
notify
(
'暂不支持ios系统~'
);
}
else
{
}
else
{
this
.
post
({
this
.
post
({
url
:
'/vip/getVipPayParams/wechat'
,
url
:
'/vip/getVipPayParams/wechat'
,
data
:
{
data
:
{
pid
:
vipBean
.
pid
,
pid
:
vipBean
.
pid
,
payChannel
:
'WEIXIN'
payChannel
:
'WEIXIN'
},
},
showLoading
:
true
,
showLoading
:
true
,
success
:
({
success
:
({
data
data
})
=>
{
})
=>
{
if
(
vipBean
.
firstPayPrice
==
0
)
{
if
(
vipBean
.
firstPayPrice
==
0
)
{
//签约
//签约
that
.
wxSign
(
data
,
vipBean
.
largeType
);
that
.
wxSign
(
data
,
vipBean
.
largeType
);
}
else
{
}
else
{
//普通支付
//普通支付
that
.
wxPay
(
data
,
vipBean
.
largeType
);
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
}
}
}
});
});
}
}
},
},
wxSign
(
wxData
,
largeType
)
{
wxSign
(
wxData
,
largeType
)
{
let
that
=
this
;
let
that
=
this
;
// 发起微信签约
// 发起微信签约
wx
.
navigateToMiniProgram
({
wx
.
navigateToMiniProgram
({
appId
:
wxData
.
appId
,
appId
:
wxData
.
appId
,
path
:
'pages/loading'
,
path
:
'pages/loading'
,
extraData
:
wxData
.
params
,
extraData
:
wxData
.
params
,
success
(
res
)
{
success
(
res
)
{
message
.
notify
(
'支付成功'
)
message
.
notify
(
'支付成功'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
navigateBack
();
navigateBack
();
},
1000
);
},
1000
);
},
},
fail
(
res
)
{
fail
(
res
)
{
// 未成功跳转到签约小程序
// 未成功跳转到签约小程序
console
.
log
(
"wxSign fail="
,
res
);
console
.
log
(
"wxSign fail="
,
res
);
}
}
})
})
},
},
wxPay
(
wxData
)
{
wxPay
(
wxData
)
{
let
wxParams
=
wxData
.
params
;
let
wxParams
=
wxData
.
params
;
...
@@ -260,15 +274,15 @@
...
@@ -260,15 +274,15 @@
.pack-content
{
.pack-content
{
width
:
100%
;
width
:
100%
;
height
:
27
0rpx
;
height
:
32
0rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
background
:
white
;
background
:
white
;
border
:
4
rpx
solid
#EAECEC
;
border
:
2
rpx
solid
#EAECEC
;
border-radius
:
20rpx
;
border-radius
:
20rpx
;
position
:
relative
;
position
:
relative
;
padding-top
:
5
0rpx
;
padding-top
:
6
0rpx
;
.row
{
.row
{
display
:
flex
;
display
:
flex
;
...
@@ -282,13 +296,13 @@
...
@@ -282,13 +296,13 @@
}
}
.name
{
.name
{
font-size
:
26
rpx
;
font-size
:
30
rpx
;
font-weight
:
700
;
font-weight
:
700
;
color
:
#000000
;
color
:
#000000
;
}
}
.price
{
.price
{
font-size
:
4
0rpx
;
font-size
:
6
0rpx
;
color
:
#000000
;
color
:
#000000
;
font-weight
:
700
;
font-weight
:
700
;
}
}
...
@@ -303,20 +317,20 @@
...
@@ -303,20 +317,20 @@
.origin
{
.origin
{
font-size
:
22rpx
;
font-size
:
26rpx
;
margin
:
0
;
text-align
:
center
;
text-align
:
center
;
color
:
#676666
;
color
:
#676666
;
text-decoration
:
line-through
;
text-decoration
:
line-through
;
}
}
.origin2
{
.origin2
{
// width: 100rpx;
font-size
:
26rpx
;
font-size
:
22rpx
;
text-align
:
center
;
text-align
:
center
;
color
:
#676666
;
color
:
#676666
;
word-wrap
:
break-word
;
word-wrap
:
break-word
;
word-break
:
break-all
;
word-break
:
break-all
;
white-space
:
pre-line
;
white-space
:
pre-line
;
}
}
.label
{
.label
{
...
...
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