Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
A
az-uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
az-uniapp-wechat-web
Commits
d77af505
Commit
d77af505
authored
Jul 25, 2021
by
李智书
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改工行提现充值;
parent
0959693a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
438 additions
and
45 deletions
+438
-45
pages/IcbcModule/Recharge/Recharge.vue
pages/IcbcModule/Recharge/Recharge.vue
+158
-24
pages/IcbcModule/Reflect/Reflect.vue
pages/IcbcModule/Reflect/Reflect.vue
+280
-21
No files found.
pages/IcbcModule/Recharge/Recharge.vue
View file @
d77af505
...
...
@@ -9,16 +9,19 @@
</view>
<!-- 卡号显示 -->
<view
class=
"cardNum"
>
<view
class=
"cardNumleft"
><span>
账户:
</span>
**** **** **** 3925
<span>
(平安III类户)
</span></view>
<view
class=
"cardNumleft"
><span>
账户:
</span>
**** **** ****
{{
bankInfo_
.
accountNo
.
slice
(
bankInfo_
.
accountNo
.
length
-
4
)
}}
<span>
(工商III类户)
</span>
</view>
<view
class=
"cardNumright"
id=
"cardNumright"
@
click=
"CopyCardNumber"
>
复制
</view>
</view>
<view
class=
"HidenText"
>
<view
class=
"userName"
>
姓名:
<span>
张三
</span></view>
<view
class=
"StudentCls"
v-if=
"PersonalInfo.usertype=='1'"
>
班级:高一(63班)
</view>
<view
class=
"userName"
>
姓名:
<span>
{{
PersonalInfo
.
name
}}
</span></view>
<view
class=
"StudentCls"
v-if=
"PersonalInfo.usertype=='1'"
>
班级:
{{
PersonalInfo
.
gradename
}}
(
{{
PersonalInfo
.
classname
}}
)
</view>
<view
class=
'TeacherCls'
v-else
>
教职工
</view>
</view>
<view
class=
"Balance"
>
<view
class=
"cardBalanceTx"
>
余额:¥
<span>
0.00
</span></view>
<view
class=
"cardBalanceTx"
>
余额:¥
<span>
{{
cardBalanceTx
}}
</span></view>
<view
@
click=
"ToWalletTx"
>
<span
style=
"display: inline-block;padding-right: 10rpx;"
>
余额提现
</span>
<image
style=
"position: relative;width: 13rpx;height: 20rpx;"
class=
'ImgIcon1'
mode=
'widthFix'
...
...
@@ -53,7 +56,7 @@
<view
class=
"depositbox"
>
<image
mode=
'widthFix'
class=
"depositImg"
src=
"../../../static/img/depositIcon.png"
></image>
<span
style=
"vertical-align:middle;font-size: 28rpx;color: #333333;font-weight: 500;"
>
最大可充值金额:
<span
style=
"color:red;"
>
¥
<span
class=
"canDepositTx"
>
2000
00
</span></span></span>
style=
"color:red;"
>
¥
<span
class=
"canDepositTx"
>
2000
</span></span></span>
</view>
<!-- 充值其它金额 -->
<view
class=
"OtherMoney"
v-if=
"isOtherMoney"
>
...
...
@@ -69,7 +72,7 @@
<!--
<view
class=
""
style=
"height: 1rpx;background-color: #DFDFDF;"
></view>
-->
<!-- 充值生活费 -->
<view
class=
"bottomdiv"
>
<view
class=
"DepositID"
@
click=
"toDeposit
(0)
"
<view
class=
"DepositID"
@
click=
"toDeposit"
v-bind:style=
"Money!=''?'':'background: #e6e6e6 !important;'"
>
<span>
充值生活费
</span>
</view>
...
...
@@ -83,8 +86,8 @@
<view
class=
"OtherTitle"
>
充值金额
</view>
<view
class=
"inputOtherM"
>
<span>
¥
</span>
<input
@
focus=
"openKeyBoard('number')"
v-model=
"inputOtherM"
@
input=
"inputControl
"
placeholder-class=
"placeholderinputOtherM"
type=
"text"
maxlength=
"6"
/>
<input
v-model=
"inputOtherM"
@
input=
"inputControl"
placeholder-class=
"placeholderinputOtherM
"
type=
"text"
maxlength=
"6"
/>
</view>
<view
class=
"OtherLine"
></view>
<!-- 充值范围 -->
...
...
@@ -107,8 +110,11 @@
</view>
<view
style=
"width: 520rpx;height: 1rpx;background: #EEEEEE;"
></view>
<view
class=
"ContenInfo"
>
<view
class=
""
>
充值金额:50元
<view
class=
""
v-if=
"isOtherMoney"
>
充值金额:
{{
inputOtherM
}}
元
</view>
<view
class=
""
v-else
>
充值金额:
{{
Money
}}
元
</view>
<view
class=
""
>
付款账户:浦发银行(6926)
...
...
@@ -117,19 +123,16 @@
<view
style=
"width: 520rpx;height: 1rpx;background: #EEEEEE;"
></view>
<!-- 取消 确认充值按钮 -->
<view
class=
"BtngGoup"
>
<view
class=
""
>
<view
class=
""
@
click=
"close()"
>
取消
</view>
<view
class=
""
>
<view
class=
""
@
click=
"ExchangeRecharge"
>
确认充值
</view>
</view>
</view>
</view>
</uni-popup>
<!-- 数字键盘 -->
<keyboard-package
ref=
"number"
@
onInput=
"onInput"
@
onDelete=
"onDelete"
@
onConfirm=
"onConfirm"
:disableDot=
"false"
/>
</view>
</
template
>
...
...
@@ -186,10 +189,13 @@
CodeMsg
:
"
获取验证码
"
,
type
:
'
number
'
,
PersonalInfo
:
{
schoolname
:
"
微微学测试
"
,
name
:
"
李智书
"
,
schoolname
:
""
,
name
:
""
,
usertype
:
"
1
"
},
bankInfo_
:
{
accountNo
:
'
**** **** **** 1234
'
},
ImgUrl
:
this
.
$ImgUrl
,
MoneyList
:
Array
(
6
).
fill
(
1
).
map
((
v
,
index
)
=>
{
return
{
...
...
@@ -210,10 +216,7 @@
sessionID
=
options
[
'
seesionID
'
]
||
''
;
fromType
=
options
[
'
fromType
'
]
||
''
;
bankInfo
.
sessionid
=
sessionID
||
''
;
this
.
queryUserBankInfo
()
this
.
QueryUserInfo
()
this
.
queryBankInfo
()
},
created
:
function
()
{
...
...
@@ -222,6 +225,39 @@
},
methods
:
{
// 验证码弹出框开启
toDeposit
()
{
if
(
this
.
isOtherMoney
)
{
if
(
this
.
inputOtherM
==
''
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请输入要充值的金额!
"
})
return
}
if
(
parseFloat
(
this
.
inputOtherM
)
*
1
<
3
)
{
weui
.
topTips
(
'
充值金额必须大于3元
'
);
return
}
}
else
{
if
(
this
.
Money
==
''
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请选择要充值的金额!
"
})
return
}
if
(
parseFloat
(
this
.
inputOtherM
)
*
1
<
3
)
{
weui
.
topTips
(
'
充值金额必须大于3元
'
);
return
}
}
this
.
$refs
.
popup
.
open
(
'
top
'
)
},
// 验证码弹出框关闭
close
()
{
this
.
$refs
.
popup
.
close
()
},
// 输入限制
inputControl
(
e
)
{
let
this_
=
this
...
...
@@ -247,9 +283,103 @@
document
.
scrollingElement
.
scrollTo
(
0
,
this
.
scrollTop
);
})
},
// 充值
async
ExchangeRecharge
()
{
let
amount
,
bindMedium
,
summary
;
if
(
this
.
isOtherMoney
)
{
if
(
this
.
inputOtherM
==
''
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请输入要充值的金额!
"
})
return
}
amount
=
this
.
isOtherMoney
*
1
}
else
{
if
(
this
.
Money
==
''
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请选择要充值的金额!
"
})
return
}
amount
=
this
.
Money
*
1
}
let
this_
=
this
;
let
loading
=
weui
.
loading
(
'
请稍后
'
);
$
.
ajax
({
url
:
gHost
+
'
/bank-wechat/icbc/account/exchange/recharge
'
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
amount
:
amount
,
bindMedium
:
"
6217002920110643831
"
,
summary
:
"
充值
"
,
},
headers
:
{
'
sessionid
'
:
sessionID
,
},
success
:
function
(
res5
)
{
loading
.
hide
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
ExchangeRechargeQuery
(
res5
.
results
.
flowId
,
res5
.
results
.
corpSerno
);
}
else
{
weui
.
topTips
(
res5
.
message
)
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
// 充值结果查询
async
ExchangeRechargeQuery
(
flowId
,
oriCorpSerno
)
{
let
this_
=
this
;
let
loading
=
weui
.
loading
(
'
请稍后
'
);
$
.
ajax
({
url
:
gHost
+
'
/bank-wechat/icbc/account/exchange/rechargeQuery
'
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
flowId
:
flowId
,
oriCorpSerno
:
oriCorpSerno
,
},
headers
:
{
'
sessionid
'
:
sessionID
,
},
success
:
function
(
res5
)
{
loading
.
hide
();
if
(
res5
.
code
==
"
10000
"
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
充值成功!
"
})
}
else
{
weui
.
topTips
(
res5
.
message
)
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
res5
.
message
})
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
// 复制我卡号
async
CopyCardNumber
()
{
let
value
=
"
sdfsdf
"
let
value
=
this
.
bankInfo_
.
accountNo
Dialog
({
title
:
'
系统提示
'
,
message
:
'
复制成功!
'
...
...
@@ -430,8 +560,14 @@
},
success
:
function
(
res2
)
{
if
(
res2
.
code
==
"
10000
"
)
{
if
(
!
res2
.
results
)
{
weui
.
topTips
(
"
获取用户银行信息失败!
"
)
return
}
bankInfo
=
res2
.
results
;
bankInfo
.
sessionid
=
sessionID
;
this_
.
queryBankInfo
();
this_
.
bankInfo_
=
bankInfo
}
else
{
weui
.
topTips
(
res2
.
message
)
}
...
...
@@ -459,9 +595,7 @@
if
(
res1
.
code
==
"
10000
"
)
{
bankInfo
.
schoolId
=
res1
.
results
.
schoolid
;
bankInfo
.
userId
=
res1
.
results
.
id
;
$
(
'
.userNameTx
'
).
html
(
res1
.
results
.
name
);
$
(
'
.schoolNameTx
'
).
html
(
res1
.
results
.
schoolname
);
$
(
'
.ClsNameTx
'
).
html
(
res1
.
results
.
gradename
+
res1
.
results
.
classname
);
this_
.
PersonalInfo
=
res1
.
results
if
(
res1
.
results
.
usertype
==
1
)
{
$
(
'
.StudentCls
'
).
css
(
'
display
'
,
'
block
'
);
$
(
'
.TeacherCls
'
).
css
(
'
display
'
,
'
none
'
);
...
...
pages/IcbcModule/Reflect/Reflect.vue
View file @
d77af505
...
...
@@ -6,8 +6,8 @@
</view>
<view
class=
"OtherMoney"
v-if=
"true"
>
<span>
¥
</span>
<input
v-model=
"inputOtherM"
@
input=
"inputControl"
placeholder=
"可提现金额3.00元
"
placeholder-class=
"placeholderinputOtherM"
type=
"text"
maxlength=
"6"
/>
<input
class=
"TxClsTx"
v-model=
"inputOtherM"
@
input=
"inputControl"
@
blur=
"ReturnToTop
"
placeholder
=
"可提现金额3.00元"
placeholder
-class=
"placeholderinputOtherM"
type=
"text"
maxlength=
"6"
/>
<span
class=
"ALL"
>
全部
</span>
</view>
<view
class=
"OtherMoney"
v-if=
"false"
style=
"color: #BFBFBF;font-weight: 500;"
>
...
...
@@ -23,12 +23,37 @@
</
template
>
<
script
>
import
{
Dialog
}
from
'
vant
'
;
import
keyboardPackage
from
"
@/components/keyboard-package/keyboard-package.vue
"
import
cityData
from
"
@/common/js/city.js
"
var
gHost
=
"
https://
"
+
window
.
location
.
host
;
if
(
window
.
location
.
protocol
!=
"
https:
"
)
{
gHost
=
"
https://fpdev.xiaopay.net
"
;
}
let
times
=
0
;
var
limitClick
=
false
;
//禁止重复点击
var
sessionID
=
''
,
userID
=
''
;
var
payCardNumber
=
''
;
//一类卡号
var
orderSerialNo
=
''
;
//提现结果查询 指令号
var
businessNo
=
''
,
otpOrderNo
=
''
,
mobileNo
=
''
;
var
msCount
=
60
;
//定时器
var
MyTimer
=
null
;
var
fromType
=
0
;
//0转账 1提现
var
opeType
=
0
;
//0充值 1提现 手机号验证
var
bankInfo
=
{
acctNoArray
:
''
,
idNo
:
''
,
schoolId
:
''
,
trueName
:
''
,
userId
:
''
,
sessionid
:
''
,
wechattype
:
1
}
export
default
{
components
:
{
...
...
@@ -41,6 +66,15 @@
ImgUrl
:
this
.
$ImgUrl
,
}
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
);
// 初始化
userID
=
options
[
'
userID
'
]
||
''
;
sessionID
=
options
[
'
seesionID
'
]
||
''
;
fromType
=
options
[
'
fromType
'
]
||
''
;
bankInfo
.
sessionid
=
sessionID
||
''
;
this
.
QueryUserInfo
()
},
created
:
function
()
{
},
...
...
@@ -48,9 +82,70 @@
},
methods
:
{
// 提现
async
toDeposit
(
value
)
{
console
.
log
(
1111
);
// 输入限制
inputControl
(
e
)
{
let
this_
=
this
let
obj
=
e
.
detail
this
.
$nextTick
(
function
()
{
obj
.
value
=
obj
.
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除"数字"和"."以外的字符
obj
.
value
=
obj
.
value
.
replace
(
/^
\.
/g
,
""
);
//验证第一个字符是数字而不是.
obj
.
value
=
obj
.
value
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
//只保留第一个. 清除多余的.
obj
.
value
=
obj
.
value
.
replace
(
"
.
"
,
"
$#$
"
).
replace
(
/
\.
/g
,
""
).
replace
(
"
$#$
"
,
"
.
"
);
//只允许输入一个小数点
obj
.
value
=
obj
.
value
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
'
$1$2.$3
'
);
//只能输入两个小数
obj
.
value
=
obj
.
value
*
1
>
2000
?
2000
:
obj
.
value
;
if
(
obj
.
value
==
''
||
obj
.
value
*
1
<
3
)
{
$
(
'
.DepositID
'
).
attr
(
'
style
'
,
'
background: rgb(230, 230, 230) !important;
'
);
}
else
{
$
(
'
.DepositID
'
).
removeAttr
(
'
style
'
);
}
this_
.
inputOtherM
=
obj
.
value
})
},
//input键盘弹起不会弹
ReturnToTop
()
{
this
.
$nextTick
(
function
()
{
document
.
scrollingElement
.
scrollTo
(
0
,
this
.
scrollTop
);
})
},
// 复制我卡号
async
CopyCardNumber
()
{
let
value
=
"
sdfsdf
"
Dialog
({
title
:
'
系统提示
'
,
message
:
'
复制成功!
'
});
this
.
$nextTick
(
function
()
{
let
clipboard
=
new
ClipboardJS
(
'
#cardNumright
'
,
{
text
:
function
()
{
return
value
}
})
})
},
//选择输入其他金额
OtherMoney
()
{
this
.
depotMoneyother
=
true
},
// 快捷选择金额
async
depotMoney
(
value
,
MoneyIndex
)
{
console
.
log
(
value
)
if
(
!
value
)
{
this
.
isOtherMoney
=
true
this
.
Money
=
''
this
.
MoneyIndex
=
MoneyIndex
return
}
this
.
isOtherMoney
=
false
this
.
Money
=
parseInt
(
value
)
this
.
MoneyIndex
=
MoneyIndex
},
//按钮操作
HideHTML
(
dom
,
type
)
{
if
(
type
==
0
)
{
$
(
'
.
'
+
dom
).
css
(
'
display
'
,
'
none
'
);
}
else
{
$
(
'
.
'
+
dom
).
css
(
'
display
'
,
'
block
'
);
}
},
//返回小程序 跳转指定页面
BackToMini
(
page
)
{
...
...
@@ -64,23 +159,187 @@
});
}
},
// 输入限制
inputControl
(
obj
,
val
)
{
console
.
log
(
obj
,
val
);
obj
.
value
=
obj
.
target
.
value
obj
.
value
=
obj
.
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除"数字"和"."以外的字符
obj
.
value
=
obj
.
value
.
replace
(
/^
\.
/g
,
""
);
//验证第一个字符是数字而不是.
obj
.
value
=
obj
.
value
.
replace
(
/
\.{2,}
/g
,
"
.
"
);
//只保留第一个. 清除多余的.
obj
.
value
=
obj
.
value
.
replace
(
"
.
"
,
"
$#$
"
).
replace
(
/
\.
/g
,
""
).
replace
(
"
$#$
"
,
"
.
"
);
//只允许输入一个小数点
obj
.
value
=
obj
.
value
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
'
$1$2.$3
'
);
//只能输入两个小数
obj
.
value
=
obj
.
value
*
1
>
2000
?
2000
:
obj
.
value
;
this
.
Money
=
obj
.
value
+
''
;
this
.
ReflectMoney
=
obj
.
value
+
''
;
if
(
obj
.
value
==
''
||
obj
.
value
*
1
<
3
)
{
$
(
'
.DepositID
'
).
addClass
(
'
DisaBledBtn
'
);
}
else
{
$
(
'
.DepositID
'
).
removeClass
(
'
DisaBledBtn
'
);
//换绑卡
ChangeCardPay
(
bankName
,
bindCard
)
{
let
this_
=
this
;
if
(
bindCard
==
payCardNumber
)
{
return
}
var
loading
=
weui
.
loading
(
'
请稍后
'
);
$
.
ajax
({
url
:
gHost
+
'
/bank-wechat/user/bank/change/bind
'
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
,
accountName
:
bankName
,
accountNo
:
bindCard
,
},
success
:
function
(
res5
)
{
loading
.
hide
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
HideHTML
(
'
showBindCardList
'
,
0
);
this_
.
queryUserBankInfo
();
}
else
{
weui
.
topTips
(
res5
.
message
)
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
//查询一类卡绑定列表
queryBindCardList
()
{
let
this_
=
this
;
let
loading
=
weui
.
loading
(
'
请稍后
'
);
$
.
ajax
({
url
:
gHost
+
'
/bank-wechat/query/account
'
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
},
success
:
function
(
res4
)
{
loading
.
hide
();
if
(
res4
.
code
==
"
10000
"
)
{
var
divList
=
''
;
var
choiceIndex
=
0
;
for
(
let
i
=
0
;
i
<
res4
.
results
.
accountList
[
0
].
bindcardList
.
length
;
i
++
)
{
divList
+=
`<div onclick=ChangeCardPay('
${
res4
.
results
.
accountList
[
0
].
bindcardList
[
i
].
bankName
}
','
${
res4
.
results
.
accountList
[
0
].
bindcardList
[
i
].
bindCardNo
}
')>
<p>
${
res4
.
results
.
accountList
[
0
].
bindcardList
[
i
].
bankName
}
</p>
<p>
${
res4
.
results
.
accountList
[
0
].
bindcardList
[
i
].
bindCardNo
.
substr
(
0
,
4
)
+
"
**** ****
"
+
res4
.
results
.
accountList
[
0
].
bindcardList
[
i
].
bindCardNo
.
substr
(
-
4
)}
</p>
<img class='myImg
${
i
}
BankListImg' src='img/choiceBank.png'>
</div>`
if
(
res4
.
results
.
accountList
[
0
].
bindcardList
[
i
].
bindCardNo
==
payCardNumber
)
{
choiceIndex
=
i
;
}
}
$
(
'
.hideListCover
'
).
html
(
divList
);
$
(
`.myImg
${
choiceIndex
}
`
).
css
(
'
display
'
,
'
block
'
);
$
(
'
.showBindCardList
'
).
css
(
'
display
'
,
'
block
'
);
}
else
{
weui
.
topTips
(
res4
.
message
)
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
//获取银行余额
queryBankInfo
()
{
let
this_
=
this
;
let
loading
=
weui
.
loading
(
'
请稍后
'
);
$
.
ajax
({
url
:
gHost
+
'
/bank-wechat/query/balance
'
,
type
:
"
POST
"
,
timeout
:
8000
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
bankInfo
,
success
:
function
(
res3
)
{
loading
.
hide
();
if
(
res3
.
code
==
"
10000
"
)
{
if
(
res3
.
results
.
acctInfoList
==
null
)
{
weui
.
topTips
(
"
账户信息为空,余额查询失败
"
);
}
else
{
this_
.
cardBalanceTx
=
((
res3
.
results
.
acctInfoList
[
0
].
hqBalanceDTOList
[
0
]
.
balance
*
1
).
toFixed
(
2
));
$
(
'
.TxClsTx
'
).
attr
(
'
placeholder
'
,
`可提现金额
${(
res3
.
results
.
acctInfoList
[
0
].
hqBalanceDTOList
[
0
].
balance
*
1
).
toFixed
(
2
)}
元`
)
this_
.
RechargeMax
=
((
2000
-
((
res3
.
results
.
acctInfoList
[
0
]
.
hqBalanceDTOList
[
0
]
.
balance
*
1
).
toFixed
(
2
)
*
1
)).
toFixed
(
2
));
}
}
else
{
weui
.
topTips
(
res3
.
message
)
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
complete
:
function
(
XMLHttpRequest
,
status
)
{
loading
.
hide
();
if
(
status
==
'
timeout
'
)
{
weui
.
topTips
(
"
请求超时,余额查询失败
"
);
}
}
})
},
//获取用户已填写银行信息
queryUserBankInfo
()
{
let
this_
=
this
;
let
loading
=
weui
.
loading
(
'
请稍后
'
);
$
.
ajax
({
url
:
gHost
+
'
/bank-wechat/user/bank/get
'
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
userId
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
},
success
:
function
(
res2
)
{
if
(
res2
.
code
==
"
10000
"
)
{
bankInfo
=
res2
.
results
;
bankInfo
.
sessionid
=
sessionID
,
this_
.
queryBankInfo
();
}
else
{
weui
.
topTips
(
res2
.
message
)
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
//查询用户信息
QueryUserInfo
()
{
let
this_
=
this
;
let
loading
=
weui
.
loading
(
'
请稍后
'
);
$
.
ajax
({
url
:
gHost
+
'
/wechat/svweapp/QueryPersonalInfo
'
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
userid
:
userID
,
sessionid
:
sessionID
,
wechattype
:
1
},
success
:
function
(
res1
)
{
loading
.
hide
();
if
(
res1
.
code
==
"
10000
"
)
{
bankInfo
.
schoolId
=
res1
.
results
.
schoolid
;
bankInfo
.
userId
=
res1
.
results
.
id
;
this_
.
PersonalInfo
=
res1
.
results
if
(
res1
.
results
.
usertype
==
1
)
{
$
(
'
.StudentCls
'
).
css
(
'
display
'
,
'
block
'
);
$
(
'
.TeacherCls
'
).
css
(
'
display
'
,
'
none
'
);
}
else
{
$
(
'
.StudentCls
'
).
css
(
'
display
'
,
'
none
'
);
$
(
'
.TeacherCls
'
).
css
(
'
display
'
,
'
block
'
);
}
this_
.
queryUserBankInfo
();
}
else
{
weui
.
topTips
(
res1
.
message
);
setTimeout
(()
=>
{
this_
.
BackToMini
(
'
UserMain
'
);
},
1500
)
}
},
error
:
function
(
err
)
{
loading
.
hide
();
},
});
},
}
}
...
...
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