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
3495eb76
Commit
3495eb76
authored
Sep 03, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加ios钻石支付
parent
2b46873e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
258 additions
and
206 deletions
+258
-206
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+26
-47
vipPay.vue
vedio/pagesA/vipPay/vipPay.vue
+218
-156
payRecord.vue
vedio/pagesD/payRecord/payRecord.vue
+14
-3
ic_zuan.png
vedio/static/ic_zuan.png
+0
-0
No files found.
vedio/components/coin-popup/coin-popup.vue
View file @
3495eb76
...
...
@@ -49,15 +49,24 @@
<view
class=
"section"
>
<view
class=
"pack-box"
>
<view
class=
"pack-item"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f
4c98b
;'"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f
5f5f5
;'"
:class=
"[
{active: index==selectedIndex}]" v-for='(item, index) in vipList'
:key='index' @click="choosePack(item, index)">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
class=
"price row"
>
<view
v-if=
"os=='android'"
class=
"price row"
>
{{
item
.
firstPayPrice
}}
元
</view>
<view
v-else
style=
"display: flex;align-items: center;font-size: 40rpx;
color: #f2b068;
font-weight: 700;"
>
<image
style=
"width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src=
"@/static/ic_zuan.png"
>
</image>
+
{{
multiply
(
item
.
firstPayPrice
)
}}
</view>
<view
class=
"name row"
v-if=
"item.title!=null&&item.title!=''"
>
{{
item
.
title
}}
</view>
...
...
@@ -137,6 +146,9 @@
};
},
methods
:
{
multiply
(
num
)
{
return
parseInt
(
num
*
10
);
},
// 支付完成回调
paySuccess
(
largeType
)
{
this
.
$emit
(
'paySuccess'
,
largeType
);
...
...
@@ -200,11 +212,6 @@
this
.
handlePay
();
},
handlePay
()
{
if
(
this
.
os
==
'ios'
)
{
message
.
notify
(
'暂不支持ios支付'
);
return
}
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
this
.
post
({
...
...
@@ -251,20 +258,8 @@
}
let
that
=
this
;
if
(
this
.
os
==
'ios'
)
{
if
(
!
tt
.
canIUse
(
'getOrderPayment.object.imId'
))
{
message
.
notify
(
'请升级抖音APP版本'
);
return
}
if
(
ttData
.
imId
==
null
)
{
message
.
notify
(
'暂不支付ios支付,请更换设备'
);
return
}
tt
.
getOrderPayment
({
orderId
:
oid
,
imId
:
ttData
.
imId
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
);
},
...
...
@@ -273,25 +268,9 @@
// 4-支付取消
}
// message.notify(res.errMsg);
},
});
}
else
{
tt
.
getOrderPayment
({
orderId
:
oid
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
);
},
fail
(
res
)
{
if
(
res
.
errNo
==
'4'
)
{
// 4-支付取消
}
// message.notify(res.errMsg);
},
});
}
},
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
...
...
vedio/pagesA/vipPay/vipPay.vue
View file @
3495eb76
...
...
@@ -5,15 +5,24 @@
<view
class=
"section"
>
<view
class=
"pack-box"
>
<view
class=
"pack-item"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f
4c98b
;'"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f
5f5f5
;'"
:class=
"[
{active: index==selectedIndex}]" v-for='(item, index) in pointList' :key='index'
@click="choosePack(item, index)">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
class=
"price row"
>
<view
v-if=
"os=='android'"
class=
"price row"
>
{{
item
.
firstPayPrice
}}
元
</view>
<view
v-else
style=
"display: flex;align-items: center;font-size: 40rpx;
color: #f2b068;
font-weight: 700;"
>
<image
style=
"width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src=
"@/static/ic_zuan.png"
>
</image>
+
{{
multiply
(
item
.
firstPayPrice
)
}}
</view>
<view
class=
"name row"
v-if=
"item.title!=null&&item.title!=''"
>
{{
item
.
title
}}
</view>
...
...
@@ -41,15 +50,24 @@
<view
class=
"section"
>
<view
class=
"pack-box"
>
<view
class=
"pack-item"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f
4c98b
;'"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f
5f5f5
;'"
:class=
"[
{active: index==selectedVipIndex}]" v-for='(item, index) in vipList' :key='index'
@click="choosePack2(item, index)">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
class=
"price row"
>
<view
v-if=
"os=='android'"
class=
"price row"
>
{{
item
.
firstPayPrice
}}
元
</view>
<view
v-else
style=
"display: flex;align-items: center;font-size: 40rpx;
color: #f2b068;
font-weight: 700;"
>
<image
style=
"width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src=
"@/static/ic_zuan.png"
>
</image>
+
{{
multiply
(
item
.
firstPayPrice
)
}}
</view>
<view
class=
"name row"
v-if=
"item.title!=null&&item.title!=''"
>
{{
item
.
title
}}
</view>
...
...
@@ -126,7 +144,7 @@
btnText
:
''
,
userBean
:
{},
os
:
'android'
,
showKefuPop
:
false
showKefuPop
:
false
}
},
onLoad
(
options
)
{
...
...
@@ -167,13 +185,27 @@
if
(
that
.
pointList
[
i
].
activityType
==
1
)
{
that
.
selectedIndex
=
i
;
let
cashStr
=
that
.
pointList
[
i
].
firstPayPrice
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
cashStr
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
cashStr
+
"元"
}
if
(
that
.
pointList
[
i
].
yhqRateBalance
!=
null
)
{
let
tempYhq
=
new
Decimal
(
cashStr
).
sub
(
new
Decimal
(
that
.
pointList
[
i
]
.
yhqRateBalance
)).
toNumber
()
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
that
.
pointList
[
i
]
.
yhqRateBalance
)
+
"钻石,已优惠"
+
that
.
multiply
(
tempYhq
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
that
.
pointList
[
i
].
yhqRateBalance
+
"元,已优惠"
+
tempYhq
+
"元"
}
}
if
(
that
.
pointList
[
i
].
weixin
)
{
that
.
wxShowFlag
=
true
that
.
isZfb
=
false
...
...
@@ -188,12 +220,23 @@
if
(
that
.
pointList
!=
null
&&
that
.
pointList
.
length
>
0
&&
that
.
selectedIndex
==
0
)
{
let
cashStr
=
that
.
pointList
[
0
].
firstPayPrice
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
cashStr
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
cashStr
+
"元"
}
if
(
that
.
pointList
[
0
].
yhqRateBalance
!=
null
)
{
let
tempYhq
=
new
Decimal
(
cashStr
).
sub
(
new
Decimal
(
that
.
pointList
[
0
]
.
yhqRateBalance
)).
toNumber
()
that
.
btnText
=
"立即支付"
+
that
.
pointList
[
0
].
yhqRateBalance
+
"元,已优惠"
+
tempYhq
+
"元"
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
that
.
pointList
[
i
]
.
yhqRateBalance
)
+
"钻石,已优惠"
+
that
.
multiply
(
tempYhq
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
that
.
pointList
[
i
].
yhqRateBalance
+
"元,已优惠"
+
tempYhq
+
"元"
}
}
if
(
that
.
pointList
[
0
].
weixin
)
{
that
.
wxShowFlag
=
true
...
...
@@ -207,6 +250,9 @@
});
},
methods
:
{
multiply
(
num
)
{
return
parseInt
(
num
*
10
);
},
loadData
()
{
},
...
...
@@ -221,20 +267,41 @@
if
(
this
.
selectedIndex
==
-
1
)
{
// vip充值
let
cashStr
=
this
.
vipList
[
this
.
selectedVipIndex
].
firstPayPrice
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
cashStr
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
cashStr
+
"元"
}
if
(
that
.
vipList
[
this
.
selectedVipIndex
].
yhqRateBalance
!=
null
)
{
let
tempYhq
=
new
Decimal
(
cashStr
).
sub
(
new
Decimal
(
that
.
vipList
[
this
.
selectedVipIndex
]
.
yhqRateBalance
)).
toNumber
()
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
that
.
vipList
[
selectedVipIndex
]
.
yhqRateBalance
)
+
"钻石,已优惠"
+
that
.
multiply
(
tempYhq
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
that
.
vipList
[
this
.
selectedVipIndex
].
yhqRateBalance
+
"元,已优惠"
+
tempYhq
+
"元"
}
}
}
else
{
let
cashStr
=
this
.
pointList
[
this
.
selectedIndex
].
firstPayPrice
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
cashStr
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
cashStr
+
"元"
}
if
(
that
.
pointList
[
this
.
selectedIndex
].
yhqRateBalance
!=
null
)
{
let
tempYhq
=
new
Decimal
(
cashStr
).
sub
(
new
Decimal
(
that
.
pointList
[
this
.
selectedIndex
]
.
yhqRateBalance
)).
toNumber
()
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
that
.
pointList
[
this
.
selectedIndex
].
yhqRateBalance
)
+
"钻石,已优惠"
+
that
.
multiply
(
tempYhq
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
that
.
pointList
[
this
.
selectedIndex
].
yhqRateBalance
+
"元,已优惠"
+
tempYhq
+
"元"
}
}
}
},
...
...
@@ -246,20 +313,40 @@
if
(
this
.
selectedIndex
==
-
1
)
{
// vip充值
let
cashStr
=
this
.
vipList
[
this
.
selectedVipIndex
].
firstPayPrice
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
cashStr
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
cashStr
+
"元"
}
if
(
that
.
vipList
[
this
.
selectedVipIndex
].
yhqRateBalance
!=
null
)
{
let
tempYhq
=
new
Decimal
(
cashStr
).
sub
(
new
Decimal
(
that
.
vipList
[
this
.
selectedVipIndex
]
.
yhqRateBalance
)).
toNumber
()
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
that
.
vipList
[
selectedVipIndex
]
.
yhqRateBalance
)
+
"钻石,已优惠"
+
that
.
multiply
(
tempYhq
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
that
.
vipList
[
this
.
selectedVipIndex
].
yhqRateBalance
+
"元,已优惠"
+
tempYhq
+
"元"
}
}
}
else
{
let
cashStr
=
this
.
pointList
[
this
.
selectedIndex
].
firstPayPrice
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
cashStr
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
cashStr
+
"元"
}
if
(
that
.
pointList
[
this
.
selectedIndex
].
yhqRateBalance
!=
null
)
{
let
tempYhq
=
new
Decimal
(
cashStr
).
sub
(
new
Decimal
(
that
.
pointList
[
this
.
selectedIndex
]
.
yhqRateBalance
)).
toNumber
()
if
(
that
.
os
==
'ios'
)
{
that
.
btnText
=
"立即支付"
+
that
.
multiply
(
that
.
pointList
[
this
.
selectedIndex
].
yhqRateBalance
)
+
"钻石,已优惠"
+
that
.
multiply
(
tempYhq
)
+
"钻石"
}
else
{
that
.
btnText
=
"立即支付"
+
that
.
pointList
[
this
.
selectedIndex
].
yhqRateBalance
+
"元,已优惠"
+
tempYhq
+
"元"
}
}
}
},
...
...
@@ -274,11 +361,6 @@
// this.$refs.alertDialog.open();
},
handlePay
()
{
if
(
this
.
os
==
'ios'
)
{
message
.
notify
(
'暂不支持ios支付'
);
return
}
let
that
=
this
;
let
vipBean
=
this
.
pointList
[
this
.
selectedIndex
];
if
(
this
.
selectedIndex
==
-
1
)
{
...
...
@@ -326,25 +408,6 @@
}
let
that
=
this
;
if
(
this
.
os
==
'ios'
)
{
if
(
!
tt
.
canIUse
(
'getOrderPayment.object.imId'
))
{
message
.
notify
(
'请升级抖音APP版本.'
);
return
}
tt
.
getOrderPayment
({
orderId
:
oid
,
imId
:
ttData
.
imId
,
immediate
:
true
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
);
},
fail
(
res
)
{
console
.
log
(
'ios=ttPay res.errMsg'
,
res
)
// message.notify(res.errMsg);
},
});
}
else
{
tt
.
getOrderPayment
({
orderId
:
oid
,
success
(
res
)
{
...
...
@@ -355,7 +418,6 @@
// message.notify(res.errMsg);
},
});
}
},
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
...
...
vedio/pagesD/payRecord/payRecord.vue
View file @
3495eb76
...
...
@@ -11,7 +11,15 @@
<view
style=
"font-size: 26rpx;color: gray;margin-top: 16rpx;"
>
付款时间:
{{
item
.
createtime
}}
</view>
<view
style=
"font-size: 26rpx;color: gray;margin-top: 1rpx;"
>
订单编号:
{{
item
.
orderid
}}
</view>
</view>
<view
style=
"display: flex;align-items: center;margin-right: 8rpx;font-size: 36rpx;color: red;"
>
<view
v-if=
"item.detailChannel=='DIAMOND'"
style=
"display: flex;align-items: center;margin-right: 8rpx;font-size: 36rpx;color: #f2b068;"
>
<image
style=
"width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src=
"@/static/ic_zuan.png"
>
</image>
{{
multiply
(
item
.
balance
)
}}
</view>
<view
v-else
style=
"display: flex;align-items: center;margin-right: 8rpx;font-size: 36rpx;color: red;"
>
¥
{{
item
.
balance
}}
</view>
</view>
...
...
@@ -36,7 +44,7 @@
data
()
{
return
{
dataList
:
[],
showKefuPop
:
false
showKefuPop
:
false
};
},
methods
:
{
...
...
@@ -45,6 +53,9 @@
this
.
$refs
.
paging
.
refresh
();
}
},
multiply
(
num
)
{
return
parseInt
(
num
*
10
);
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/vip/getOrderList'
,
...
...
vedio/static/ic_zuan.png
0 → 100644
View file @
3495eb76
10.1 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