Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhqg-mini
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhqg
zhqg-mini
Commits
7a9e218b
Commit
7a9e218b
authored
Oct 24, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
2e175de0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
78 additions
and
16 deletions
+78
-16
orderWithdrawal.js
pages/orderWithdrawal/orderWithdrawal.js
+19
-7
orderWithdrawal.wxml
pages/orderWithdrawal/orderWithdrawal.wxml
+1
-1
orderWithdrawal.wxss
pages/orderWithdrawal/orderWithdrawal.wxss
+12
-0
index.js
pages/userAccount/balanceWithdraw/index.js
+17
-2
index.wxml
pages/userAccount/balanceWithdraw/index.wxml
+5
-4
index.wxss
pages/userAccount/balanceWithdraw/index.wxss
+11
-1
http.js
utils/http.js
+1
-0
util.js
utils/util.js
+12
-1
No files found.
pages/orderWithdrawal/orderWithdrawal.js
View file @
7a9e218b
// pages/newly/redpacket.js
var
http
=
require
(
"../../utils/http.js"
);
var
util
=
require
(
"../../utils/util.js"
)
var
app
=
getApp
()
Page
({
...
...
@@ -13,13 +14,14 @@ Page({
name
:
''
,
actualAmount
:
''
,
orderIncome
:
''
,
buttonClicked
:
false
,
how
:
false
,
//是否显示如何上传收款码提示框
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
/**
...
...
@@ -38,9 +40,9 @@ Page({
ordernum
:
this
.
options
.
ordernum
,
amount
:
this
.
options
.
amount
,
defaultAmount
:
this
.
options
.
amount
,
orderIncome
:
JSON
.
parse
(
this
.
options
.
orderIncome
)
orderIncome
:
JSON
.
parse
(
this
.
options
.
orderIncome
)
})
console
.
log
(
'list'
,
this
.
data
.
type
,
this
.
data
.
ordernum
)
console
.
log
(
'list'
,
this
.
data
.
type
,
this
.
data
.
ordernum
)
this
.
getData
();
},
...
...
@@ -140,14 +142,16 @@ Page({
},
//最新提现做法
inputimg
:
function
()
{
console
.
log
(
'点击事件'
)
util
.
buttonClicked
(
this
);
let
that
=
this
;
var
stockAmount
=
/^
\d{1,}
$/
if
(
!
stockAmount
.
test
(
that
.
data
.
amount
))
{
wx
.
showToast
({
title
:
'请填写
提现
金额'
,
icon
:
'none'
})
wx
.
showToast
({
title
:
'请填写金额'
,
icon
:
'none'
})
return
}
if
(
parseInt
(
that
.
data
.
amount
)
>
parseInt
(
that
.
data
.
defaultAmount
))
{
wx
.
showToast
({
title
:
'
提现金额错误
'
,
icon
:
'none'
})
if
(
(
parseInt
(
that
.
data
.
amount
)
<=
0
)
||
(
parseInt
(
that
.
data
.
amount
)
>
parseInt
(
that
.
data
.
defaultAmount
)
))
{
wx
.
showToast
({
title
:
'
金额不能小于0且不能大于可操作金额
'
,
icon
:
'none'
})
return
}
wx
.
showLoading
()
...
...
@@ -167,7 +171,15 @@ Page({
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'操作成功,我们将尽快为您提现'
,
icon
:
'none'
icon
:
'none'
,
duration
:
3000
,
success
:
function
()
{
setTimeout
(
function
()
{
wx
.
navigateBack
({
delta
:
0
,
})
},
3000
);
}
})
},
errBack
:
(
res
)
=>
{
...
...
pages/orderWithdrawal/orderWithdrawal.wxml
View file @
7a9e218b
...
...
@@ -20,7 +20,7 @@
<view class="botton-container">
<!-- <view class='inputimg' type="default" bindtap="gotoShow">点击上传您的收款码</view> -->
<view class=
'inputimg' type="default" bindtap="inputimg
">48小时内到账,{{type == 2? '确认退单': '确认提现'}}</view>
<view class=
"{{!buttonClicked?'inputimg':'disabledBtn'}}" type="default" bindtap="{{!buttonClicked?'inputimg':''}}
">48小时内到账,{{type == 2? '确认退单': '确认提现'}}</view>
<!-- <view class='how-container' bindtap="showHow">
<image class='how-img' src="/images/newly/notice.png"></image>
<text class='how-txt'>如何上传收款码?</text>
...
...
pages/orderWithdrawal/orderWithdrawal.wxss
View file @
7a9e218b
...
...
@@ -250,4 +250,15 @@ page {
.coupon-notice-window .container .btn .btn-text {
font-size: 34rpx;
color: white;
}
.disabledBtn{
width: 95%;
font-size: 30rpx;
height: 76rpx;
line-height: 76rpx;
margin-top: 10rpx;
background-color: #ccc;
text-align: center;
border-radius: 15rpx;
color: rgb(83, 37, 3);
}
\ No newline at end of file
pages/userAccount/balanceWithdraw/index.js
View file @
7a9e218b
// pages/newly/redpacket.js
var
http
=
require
(
"../../../utils/http.js"
);
var
util
=
require
(
"../../../utils/util.js"
)
var
app
=
getApp
()
Page
({
...
...
@@ -12,6 +13,7 @@ Page({
amount
:
''
,
name
:
''
,
actualAmount
:
''
,
buttonClicked
:
false
,
how
:
false
,
//是否显示如何上传收款码提示框
},
getRate
()
{
...
...
@@ -23,10 +25,13 @@ Page({
},
callBack
:
(
res
)
=>
{
let
rate
=
JSON
.
parse
(
res
.
result
.
paramValue
).
rate
let
actualAmount
=
(
this
.
data
.
amount
*
(
1
-
(
rate
/
100
))).
toFixed
(
2
);
console
.
log
(
'rate'
,
JSON
.
parse
(
res
.
result
.
paramValue
))
this
.
setData
({
rate
:
rate
rate
:
rate
,
actualAmount
:
actualAmount
});
}
};
http
.
request
(
params
);
...
...
@@ -170,6 +175,8 @@ Page({
},
//最新提现做法
inputimg
:
function
()
{
console
.
log
(
'点击事件'
)
util
.
buttonClicked
(
this
);
let
that
=
this
;
if
(
!
that
.
data
.
name
)
{
wx
.
showToast
({
title
:
'请填写收款人'
,
icon
:
'none'
})
...
...
@@ -209,7 +216,15 @@ Page({
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'操作成功,我们将尽快为您提现'
,
icon
:
'none'
icon
:
'none'
,
duration
:
3000
,
success
:
function
()
{
setTimeout
(
function
()
{
wx
.
navigateBack
({
delta
:
0
,
})
},
3000
);
}
})
},
errBack
:
(
res
)
=>
{
...
...
pages/userAccount/balanceWithdraw/index.wxml
View file @
7a9e218b
...
...
@@ -39,18 +39,19 @@
</view>
<view class="botton-container">
<view class=
'inputimg' type="default" bindtap="inputimg
">48小时内到账,确认提现</view>
<view class=
"{{!buttonClicked?'inputimg':'disabledBtn'}}" type="default" bindtap="{{!buttonClicked?'inputimg':''}}
">48小时内到账,确认提现</view>
<view class='how-container' bindtap="showHow">
<image class='how-img' src="/images/newly/notice.png"></image>
<text class='how-txt'>如何上传收款码?</text>
</view>
</view>
<
!-- <
view class="notice-container">
<view class="notice-container">
<text class='txt-notice-title'>【温馨提醒】</text>
<text class='txt-notice'></text>
<text class='txt-notice'>1、金额满100元方可提现;\n2、提现收{{rate}}%手续费;\n3、购物可全额抵扣;</text>
</view> -->
<text class='txt-notice'>
1、单次提现申请需满¥100\n2、申请提现需要扣除6%的手续费</text>
</view>
<view class="coupon-notice-window" wx:if="{{how}}">
<view class="container">
...
...
pages/userAccount/balanceWithdraw/index.wxss
View file @
7a9e218b
...
...
@@ -99,7 +99,17 @@ page {
border-radius: 15rpx;
color: rgb(83, 37, 3);
}
.disabledBtn{
width: 95%;
font-size: 30rpx;
height: 76rpx;
line-height: 76rpx;
margin-top: 10rpx;
background-color: #ccc;
text-align: center;
border-radius: 15rpx;
color: rgb(83, 37, 3);
}
.botton-container .inputimg2 {
width: 95%;
font-size: 30rpx;
...
...
utils/http.js
View file @
7a9e218b
...
...
@@ -46,6 +46,7 @@ function request(params, isGetTonken) {
icon
:
"none"
});
}
else
if
(
res
.
statusCode
==
401
)
{
wx
.
setStorageSync
(
'token'
,
''
)
// 添加到请求队列
globalData
.
requestQueue
.
push
(
params
);
// 是否正在登陆
...
...
utils/util.js
View file @
7a9e218b
...
...
@@ -22,8 +22,19 @@ const formatHtml = content => {
content
=
content
.
replace
(
/
\/\>
/gi
,
' style="max-width:100% !important;height:auto !important;margin:0;display:block;"
\
/
\
>'
);
return
content
;
}
const
buttonClicked
=
self
=>
{
self
.
setData
({
buttonClicked
:
true
})
setTimeout
(
function
()
{
self
.
setData
({
buttonClicked
:
false
})
},
5000
)
}
module
.
exports
=
{
formatTime
:
formatTime
,
formatHtml
:
formatHtml
formatHtml
:
formatHtml
,
buttonClicked
:
buttonClicked
}
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