Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
e670a9f9
Commit
e670a9f9
authored
Dec 06, 2022
by
sunchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
积分兑换添加判断授权接口
parent
920f239d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
101 additions
and
65 deletions
+101
-65
api/api.ts
+4
-0
components/tabBar/tabBar.vue
+3
-5
components/webview.vue
+9
-0
pages/index/index.vue
+4
-0
pages/withdrawal/withdrawal.vue
+81
-60
No files found.
api/api.ts
View file @
e670a9f9
...
...
@@ -288,5 +288,9 @@ export default {
// 退款
unifiedRefund
(
params
){
return
request
(
`
${
apiURL
}
/pay/unifiedRefund`
,
"POST"
,
params
)
},
//判断是否授权
isAuth
(){
return
request
(
`
${
apiURL
}
/aliPay/isAuth`
,
"POST"
,
params
)
}
}
components/tabBar/tabBar.vue
View file @
e670a9f9
...
...
@@ -53,13 +53,11 @@
left
:
50%
;
width
:
100%
;
height
:
70
rpx
;
border-top
:
1
px
solid
#f5f5f5
;
border-top
:
2
r
px
solid
#f5f5f5
;
background
:
#fff
;
color
:
#333
;
font-size
:
12px
;
min-width
:
320px
;
max-width
:
640px
;
padding-bottom
:
20px
;
font-size
:
24
rpx
;
padding-bottom
:
80
rpx
;
transform
:
translateX
(
-50%
);
.menu_content{
display
:
flex
;
...
...
components/webview.vue
0 → 100644
View file @
e670a9f9
<
template
>
</
template
>
<
script
>
</
script
>
<
style
>
</
style
>
\ No newline at end of file
pages/index/index.vue
View file @
e670a9f9
...
...
@@ -39,6 +39,7 @@
<courselist
:tagIds=
"[1111]"
:onlyShowList=
"0"
></courselist>
</view>
<tabBar
:currentPage=
"currentPage"
></tabBar>
<!--
<view
style=
"position: fixed;right: 0;top: 50%;"
@
click=
"tokefu()"
>
在线客服
</view>
-->
</view>
<uni-popup
ref=
"popup"
type=
"top"
background-color=
"#fff"
>
<view
class=
"description"
>
...
...
@@ -93,6 +94,9 @@
this
.
announcementQuery
();
},
methods
:
{
tokefu
(){
plus
.
runtime
.
openURL
(
'http://q.url.cn/abkzV9?_type=wpa&qidian=true'
);
},
featureSelect
(
featureItem
){
console
.
log
(
featureItem
)
if
(
featureItem
.
isOpen
&&
featureItem
.
link
){
...
...
pages/withdrawal/withdrawal.vue
View file @
e670a9f9
...
...
@@ -118,67 +118,27 @@
},
//支付宝去提现
aliWithdrawal
(){
this
.
aliWithdrawalResVO
=
{
...
this
.
aliWithdrawalResVO
,
orderNo
:
this
.
partnerTradeNo
,
amount
:
this
.
exchangeAmount
,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
}
console
.
log
(
JSON
.
stringify
(
this
.
aliWithdrawalResVO
))
api
.
aliWithdrawal
(
this
.
aliWithdrawalResVO
).
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
[
'success'
]){
if
(
res
[
'data'
][
'isAuth'
]
==
1
){
// APP:
// #ifdef APP-PLUS
let
urls
=
this
.
aliWithdrawalResVO
.
aliAuthUrl
;
urls
=
encodeURIComponent
(
urls
);
// 判断平台
if
(
plus
.
os
.
name
==
'Android'
)
{
plus
.
runtime
.
openURL
(
'alipays://platformapi/startapp?appId=20000067&url='
+
urls
,
res
=>
{
//这里写打开URL地址失败后的处理
console
.
log
(
res
);
uni
.
showModal
({
content
:
'本机未检测到对应客户端,是否打开浏览器访问页面?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
//plus.runtime.openURL();
}
}
});
},
'com.eg.android.AlipayGphone'
);
}
else
if
(
plus
.
os
.
name
==
'iOS'
)
{
plus
.
runtime
.
openURL
(
'alipay://platformapi/startapp?appId=20000067&url='
+
urls
,
res
=>
{
console
.
log
(
res
);
uni
.
showModal
({
content
:
'本机未检测到对应客户端,是否打开浏览器访问页面?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
//plus.runtime.openURL(url);
}
}
});
},
'com.eg.android.AlipayGphone'
);
uni
.
showModal
({
content
:
'提现成功!'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
// #endif
}
});
}
else
{
uni
.
showModal
({
content
:
res
[
'message'
],
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
...
...
@@ -218,13 +178,74 @@
// #endif
},
confirmWithdrawal
(){
if
(
this
.
paymentMethod
==
1
){
this
.
wxWithdrawal
();
}
if
(
this
.
paymentMethod
==
2
){
this
.
aliWithdrawal
();
this
.
aliWithdrawalResVO
=
{
...
this
.
aliWithdrawalResVO
,
orderNo
:
this
.
partnerTradeNo
,
amount
:
this
.
exchangeAmount
,
userId
:
uni
.
getStorageSync
(
'cffp_userId'
),
}
api
.
isAuth
(
this
.
aliWithdrawalResVO
).
then
((
res
)
=>
{
if
(
res
[
'success'
]){
if
(
res
[
'data'
][
'isAuth'
]
==
1
){
if
(
this
.
paymentMethod
==
1
){
this
.
wxWithdrawal
();
}
if
(
this
.
paymentMethod
==
2
){
// APP:
// #ifdef APP-PLUS
let
urls
=
this
.
aliWithdrawalResVO
.
aliAuthUrl
;
urls
=
encodeURIComponent
(
urls
);
// 判断平台
if
(
plus
.
os
.
name
==
'Android'
)
{
plus
.
runtime
.
openURL
(
'alipays://platformapi/startapp?appId=20000067&url='
+
urls
,
res
=>
{
//这里写打开URL地址失败后的处理
console
.
log
(
res
);
uni
.
showModal
({
content
:
'本机未检测到对应客户端,是否打开浏览器访问页面?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
//plus.runtime.openURL();
}
}
});
},
'com.eg.android.AlipayGphone'
);
}
else
if
(
plus
.
os
.
name
==
'iOS'
)
{
plus
.
runtime
.
openURL
(
'alipay://platformapi/startapp?appId=20000067&url='
+
urls
,
res
=>
{
console
.
log
(
res
);
uni
.
showModal
({
content
:
'本机未检测到对应客户端,是否打开浏览器访问页面?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
//plus.runtime.openURL(url);
}
}
});
},
'com.eg.android.AlipayGphone'
);
}
// #endif
}
}
}
else
{
uni
.
showModal
({
content
:
res
[
'message'
],
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
});
}
}
}
...
...
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