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
cedac2ce
Commit
cedac2ce
authored
Jan 23, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换包名
parent
1adb0589
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
123 deletions
+44
-123
App.vue
vedio/App.vue
+1
-1
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+43
-122
No files found.
vedio/App.vue
View file @
cedac2ce
...
...
@@ -97,7 +97,7 @@
versionName
:
'v 1.0.0'
,
auth
:
false
,
// 三要素实名认证
userInfo
:
null
,
pkgName
:
'com.mints.
mini
video'
pkgName
:
'com.mints.
dybright
video'
}
};
</
script
>
...
...
vedio/components/coin-popup/coin-popup.vue
View file @
cedac2ce
...
...
@@ -11,8 +11,7 @@
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;\n
3、充值看点一般5分钟内到账,如未到账请在“我的”页面联系客服;
</text>
<image
@
click=
"agreeFlag=false"
style=
"width: 30rpx;height: 30rpx;margin-top:150rpx;"
<image
@
click=
"agreeFlag=false"
style=
"width: 30rpx;height: 30rpx;margin-top:150rpx;"
src=
"@/static/index/ic_quit_white.png"
></image>
</view>
...
...
@@ -27,7 +26,7 @@
</view>
</view>
<view
style=
"display: flex;flex-direction: column;align-items: center;margin-bottom: 20rpx;"
>
<view
style=
"font-size: 38rpx;color: black;"
>
超多精彩好剧一键解锁
</view>
<view
style=
"font-size: 38rpx;color: black;"
>
{{
titleText
}}
</view>
<view
class=
"flex"
>
<view
v-if=
"point>0"
style=
"display: flex;flex-direction: row;margin-top: 10rpx;"
>
<view
style=
"font-size: 28rpx;color: #644238;margin-top: 12rpx;"
>
解锁本集:
</view>
...
...
@@ -59,7 +58,7 @@
{{
item
.
firstPayPrice
}}
元
</view>
<view
class=
"name row"
>
<view
class=
"name row"
v-if=
"item.title!=null&&item.title!=''"
>
{{
item
.
title
}}
</view>
...
...
@@ -123,6 +122,7 @@
selectedIndex
:
0
,
agreeFlag
:
false
,
userBean
:
{},
titleText
:
'超多精彩好剧一键解锁'
,
showClone
:
false
};
},
...
...
@@ -184,11 +184,6 @@
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
// 快手支付
// #ifdef MP-KUAISHOU
// #endif
// 抖音支付
// #ifdef MP-TOUTIAO
this
.
post
({
...
...
@@ -201,92 +196,45 @@
success
:
({
data
})
=>
{
that
.
ttPay
(
data
,
vipBean
.
largeType
);
that
.
ttP
reP
ay
(
data
,
vipBean
.
largeType
);
}
});
// #endif
// 微信虚拟支付
// #ifdef MP-WEIXIN
this
.
post
({
url
:
'/vip/getVipPayParams/xpay'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
pid
:
vipBean
.
pid
},
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
wxVirtuallyPay
(
data
,
vipBean
.
largeType
);
ttPrePay
(
ttData
,
largeType
)
{
if
(
!
tt
.
canIUse
(
'requestOrder'
))
{
message
.
notify
(
'请升级抖音APP版本'
);
return
}
});
// #endif
},
ttPay
(
ttData
,
largeType
)
{
let
that
=
this
;
tt
.
pay
({
orderInfo
:
{
order_id
:
ttData
.
params
.
order_id
,
order_token
:
ttData
.
params
.
order_token
,
},
service
:
5
,
tt
.
requestOrder
({
data
:
ttData
.
params
.
data
,
byteAuthorization
:
ttData
.
params
.
byteAuthorization
,
success
(
res
)
{
if
(
res
.
code
==
0
)
{
// 拉取服务器,是否支付成功
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
)
}
that
.
ttPay
(
largeType
,
res
.
orderId
,
ttData
);
},
fail
(
res
)
{
message
.
notify
(
res
.
errMsg
);
// message.notify(res.errMsg);
},
});
},
wxPay
(
wxData
,
largeType
)
{
let
wxParams
=
wxData
.
params
;
let
that
=
this
;
// 发起微信支付
wx
.
requestPayment
({
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
packageStr
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
wxData
.
tid
)
},
fail
(
res
)
{}
})
},
wxVirtuallyPay
(
wxData
,
largeType
)
{
// 虚拟支付
let
wxParams
=
wxData
.
params
;
let
signDataParams
=
wxData
.
params
.
sigData
;
ttPay
(
largeType
,
oid
,
ttData
)
{
if
(
!
tt
.
canIUse
(
'getOrderPayment'
))
{
message
.
notify
(
'请升级抖音APP版本'
);
return
}
let
that
=
this
;
const
SDKVersion
=
wx
.
getSystemInfoSync
().
SDKVersion
;
if
(
this
.
compareVersion
(
SDKVersion
,
'2.19.2'
)
>=
0
||
wx
.
canIUse
(
'requestVirtualPayment'
))
{
wx
.
requestVirtualPayment
({
signData
:
JSON
.
stringify
(
wxData
.
params
.
sigData
),
paySig
:
wxParams
.
paySig
,
signature
:
wxParams
.
signature
,
mode
:
wxParams
.
mode
,
tt
.
getOrderPayment
({
orderId
:
oid
,
success
(
res
)
{
// 拉取服务器,是否支付成功
that
.
queryOrderStatus
(
largeType
,
wxData
.
params
.
sigData
.
outTradeNo
)
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
)
},
fail
({
errMsg
,
errCode
})
{
message
.
notify
(
errMsg
);
fail
(
res
)
{
// message.notify(res.errMsg);
},
})
}
else
{
message
.
notify
(
'当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。'
);
}
});
},
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
...
...
@@ -302,33 +250,6 @@
that
.
paySuccess
(
largeType
);
}
});
},
compareVersion
(
_v1
,
_v2
)
{
if
(
typeof
_v1
!==
'string'
||
typeof
_v2
!==
'string'
)
return
0
const
v1
=
_v1
.
split
(
'.'
)
const
v2
=
_v2
.
split
(
'.'
)
const
len
=
Math
.
max
(
v1
.
length
,
v2
.
length
)
while
(
v1
.
length
<
len
)
{
v1
.
push
(
'0'
)
}
while
(
v2
.
length
<
len
)
{
v2
.
push
(
'0'
)
}
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
const
num1
=
parseInt
(
v1
[
i
],
10
)
const
num2
=
parseInt
(
v2
[
i
],
10
)
if
(
num1
>
num2
)
{
return
1
}
else
if
(
num1
<
num2
)
{
return
-
1
}
}
return
0
}
},
watch
:
{
...
...
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