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
7d4fae55
Commit
7d4fae55
authored
Jul 17, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
c2120915
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
88 deletions
+35
-88
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+34
-87
utils.js
vedio/utils/utils.js
+1
-1
No files found.
vedio/components/coin-popup/coin-popup.vue
View file @
7d4fae55
...
@@ -27,9 +27,8 @@
...
@@ -27,9 +27,8 @@
</view>
</view>
<view
class=
"section"
>
<view
class=
"section"
>
<view
class=
"pack-box"
>
<view
class=
"pack-box"
>
<view
class=
"pack-item"
<view
class=
"pack-item"
:class=
"[
{active: index==selectedIndex}]"
:class=
"[
{active: index==selectedIndex}]" v-for='(item, index) in vipList'
v-for='(item, index) in vipList' :key='index' @click="choosePack(item, index)">
:key='index' @click="choosePack(item, index)">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
class=
"price row"
>
<view
class=
"price row"
>
...
@@ -130,7 +129,6 @@
...
@@ -130,7 +129,6 @@
})
=>
{
})
=>
{
this
.
vipList
=
data
.
list
;
this
.
vipList
=
data
.
list
;
if
(
data
.
list
!=
null
)
{
if
(
data
.
list
!=
null
)
{
// this.selectedIndex = data.list[0].activityType;
for
(
let
i
=
0
;
i
<
data
.
list
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
data
.
list
.
length
;
i
++
)
{
if
(
data
.
list
[
i
].
activityType
==
1
)
{
if
(
data
.
list
[
i
].
activityType
==
1
)
{
this
.
selectedIndex
=
i
;
this
.
selectedIndex
=
i
;
...
@@ -169,92 +167,41 @@
...
@@ -169,92 +167,41 @@
this
.
handlePay
();
this
.
handlePay
();
},
},
handlePay
()
{
handlePay
()
{
if
(
this
.
os
==
'ios'
)
{
message
.
notify
(
'iOS暂不支持购买'
);
return
}
let
that
=
this
;
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
var
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
if
(
this
.
os
==
'ios'
)
{
// 抖音支付
message
.
notify
(
'暂不支持ios系统~'
);
this
.
post
({
}
else
{
url
:
'/vip/getVipPayParams/douyin'
,
this
.
post
({
data
:
{
url
:
'/vip/getVipPayParams/wechat'
,
bookId
:
that
.
vedioId
,
data
:
{
os
:
that
.
os
,
pid
:
vipBean
.
pid
,
pid
:
vipBean
.
pid
payChannel
:
'WEIXIN'
},
},
showLoading
:
true
,
showLoading
:
true
,
success
:
({
success
:
({
data
data
})
=>
{
})
=>
{
that
.
ttPrePay
(
data
,
vipBean
.
largeType
);
that
.
wxPay
(
data
,
vipBean
.
largeType
);
}
}
});
});
},
ttPrePay
(
ttData
,
largeType
)
{
if
(
!
tt
.
canIUse
(
'requestOrder'
))
{
message
.
notify
(
'请升级抖音APP版本.'
);
return
}
}
},
uni
.
showLoading
({
wxPay
(
wxData
,
largeType
)
{
title
:
'加载中...'
let
wxParams
=
wxData
.
params
;
});
let
that
=
this
;
let
that
=
this
;
tt
.
requestOrder
({
// 发起微信支付
data
:
ttData
.
params
.
data
,
wx
.
requestPayment
({
byteAuthorization
:
ttData
.
params
.
byteAuthorization
,
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
packageStr
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
(
res
)
{
success
(
res
)
{
that
.
ttPay
(
largeType
,
res
.
orderId
,
ttData
);
that
.
queryOrderStatus
(
largeType
,
wxParams
.
sigData
.
outTradeNo
);
},
fail
(
res
)
{
uni
.
hideLoading
();
console
.
log
(
'ttPrePay'
,
res
.
errMsg
);
// message.notify(res.errMsg);
},
},
});
fail
(
res
)
{}
},
})
ttPay
(
largeType
,
oid
,
ttData
)
{
uni
.
hideLoading
();
if
(
!
tt
.
canIUse
(
'getOrderPayment'
))
{
message
.
notify
(
'请升级抖音APP版本!'
);
return
}
let
that
=
this
;
if
(
this
.
os
==
'ios'
)
{
if
(
!
tt
.
canIUse
(
'getOrderPayment.object.imId'
))
{
message
.
notify
(
'请升级抖音APP版本~'
);
return
}
tt
.
getOrderPayment
({
orderId
:
oid
,
imId
:
ttData
.
imId
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
);
},
fail
(
res
)
{
console
.
log
(
'ios pay'
,
res
.
errMsg
);
// message.notify(res.errMsg);
},
});
}
else
{
tt
.
getOrderPayment
({
orderId
:
oid
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
);
},
fail
(
res
)
{
console
.
log
(
'android pay'
,
res
.
errMsg
);
// message.notify(res.errMsg);
},
});
}
},
},
queryOrderStatus
(
largeType
,
tid
)
{
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
let
that
=
this
;
...
@@ -309,7 +256,7 @@
...
@@ -309,7 +256,7 @@
align-items
:
center
;
align-items
:
center
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
.active
{
.active
{
background-color
:
#f4c98b
!
important
;
background-color
:
#f4c98b
!
important
;
border
:
6rpx
solid
#fd5350
!
important
;
border
:
6rpx
solid
#fd5350
!
important
;
}
}
...
@@ -337,7 +284,7 @@
...
@@ -337,7 +284,7 @@
}
}
.name
{
.name
{
width
:
calc
(
90%
);
width
:
calc
(
90%
);
text-align
:
center
;
text-align
:
center
;
font-size
:
29rpx
;
font-size
:
29rpx
;
color
:
#333
;
color
:
#333
;
...
...
vedio/utils/utils.js
View file @
7d4fae55
export
const
PAKEAGE_NAME
=
'com.mingce.wxhelibook'
export
const
PAKEAGE_NAME
=
'com.mingce.wxhelibook'
export
const
VERSION_CODE
=
'1.0.
2
'
export
const
VERSION_CODE
=
'1.0.
3
'
// export const PAKEAGE_NAME = 'com.test.test'
// export const PAKEAGE_NAME = 'com.test.test'
export
function
trim
(
str
)
{
export
function
trim
(
str
)
{
...
...
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