Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_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
李智书
xzf_uniapp-wechat-web
Commits
eb3c6b7f
Commit
eb3c6b7f
authored
Aug 10, 2022
by
符伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
82d506a8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
541 additions
and
9 deletions
+541
-9
src/pages.json
src/pages.json
+1
-1
src/pages/BankModule/Recharge/Recharge.vue
src/pages/BankModule/Recharge/Recharge.vue
+534
-0
src/pages/StudentPayment/PayProgress/PayProgress.vue
src/pages/StudentPayment/PayProgress/PayProgress.vue
+2
-3
src/pages/StudentPayment/PayProject/PayProject.vue
src/pages/StudentPayment/PayProject/PayProject.vue
+4
-5
No files found.
src/pages.json
View file @
eb3c6b7f
...
...
@@ -312,7 +312,7 @@
"path"
:
"pages/UserAgreement/UserAgreement"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTitleText"
:
"
消费用户
协议"
,
"navigationBarTitleText"
:
"
用户服务
协议"
,
"enablePullDownRefresh"
:
false
}
...
...
src/pages/BankModule/Recharge/Recharge.vue
View file @
eb3c6b7f
...
...
@@ -283,6 +283,7 @@
</template>
<
script
>
<<<<<<<
Updated
upstream
import
{
Dialog
,
Toast
...
...
@@ -838,6 +839,539 @@
success
:
function
()
{
uni
.
navigateTo
({
url
:
`../../recharging/recharging?bankName=
${
=======
import
{
Dialog
,
Toast
}
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
"
;
// gHost = "/api";
}
let
times
=
0
;
var
limitClick
=
false
;
//禁止重复点击
var
sessionID
=
""
,
userID
=
""
;
var
payCardNumber
=
""
;
//一类卡号
var
orderSerialNo
=
""
;
//提现结果查询 指令号
var
businessNo
=
""
,
otpOrderNo
=
""
,
mobileNo
=
""
;
var
MyTimer
=
null
;
var
fromType
=
0
;
//0转账 1提现
var
opeType
=
0
;
//0充值 1提现 手机号验证
var
bankInfo
=
{
acctNoArray
:
""
,
idNo
:
""
,
schoolId
:
""
,
trueName
:
""
,
userId
:
""
,
sessionid
:
""
,
wechattype
:
1
,
};
var
accountType
=
""
;
let
orderApi
=
window
.
location
.
origin
;
/**
* 对象转拼接字符串
* @param {*} res Object 需要转换的数据对象
*/
function
OforS
(
res
)
{
var
resL
=
0
;
var
outS
=
""
;
for
(
var
i
in
res
)
{
if
(
resL
==
0
)
{
outS
+=
""
+
i
+
"
=
"
+
res
[
i
];
}
else
{
outS
+=
"
&
"
+
i
+
"
=
"
+
res
[
i
];
}
resL
++
;
}
return
outS
;
}
export
default
{
components
:
{
keyboardPackage
,
},
name
:
"
Recharge
"
,
data
()
{
return
{
popshow
:
false
,
// 输入其它金额
isOtherMoney
:
false
,
inputOtherM
:
""
,
RechargeException
:
false
,
depotMoneyother
:
false
,
//其他充值
Money
:
""
,
//选择金额
MoneyIndex
:
-
1
,
RechargeMax
:
"
2000
"
,
//最大充值限制
ReflectMoney
:
""
,
//提现金额
VerifyCode
:
""
,
//验证码
cardBalanceTx
:
"
0
"
,
//余额
CodeMsg
:
"
获取验证码
"
,
type
:
"
number
"
,
PersonalInfo
:
{
schoolname
:
""
,
name
:
""
,
usertype
:
"
1
"
,
},
bankInfo_
:
{
accountNo
:
"
**** **** **** 1234
"
,
bindCardName
:
""
,
bindCardNo
:
""
,
},
ImgUrl
:
this
.
$ImgUrl
,
MoneyList
:
[
{
lable
:
"
元
"
,
value
:
100
,
},
{
lable
:
"
元
"
,
value
:
200
,
},
{
lable
:
"
元
"
,
value
:
500
,
},
{
lable
:
"
元
"
,
value
:
1000
,
},
// {
// lable: "其他金额",
// value: "",
// },
],
numberList
:
[],
tempFiles1
:
"
../../static/img/idCardBg1.png
"
,
//上传身份证临时选择文件
tempFiles2
:
"
../../static/img/idCardBg0.png
"
,
//绑定的一类卡列表
bindcardList
:
[],
// 20211126 银行账户类型
accountType
:
"
2
"
,
// 银行账户类型名称枚举
accountEnum
:
{
1
:
"
平安银行III类户
"
,
2
:
"
工商银行III类户
"
,
3
:
"
交通银行III类户
"
,
4
:
"
渤海银行II类户
"
,
},
/**
* 20211129新增
*/
// 充值手机号码
openCardPhon
:
""
,
openCardPhonSms
:
""
,
msCount
:
60
,
//定时器
RechargeSmsorderNoInfo
:
{},
//第三方合作交易标识
};
},
onLoad
:
function
(
options
)
{
console
.
log
(
options
);
// 初始化
userID
=
options
[
"
userID
"
]
||
""
;
sessionID
=
options
[
"
seesionID
"
]
||
""
;
fromType
=
options
[
"
fromType
"
]
||
""
;
bankInfo
.
sessionid
=
sessionID
||
""
;
this
.
beforeQuerySignStatus
();
},
created
:
function
()
{},
mounted
:
function
()
{},
onShow
:
function
()
{
if
(
bankInfo
.
userId
)
{
this
.
queryBankInfo
();
}
},
methods
:
{
async
beforeQuerySignStatus
()
{
await
this
.
QueryUserInfo
();
// 渤海银行要判断是否有代扣签约
if
(
bankInfo
.
accountType
==
"
4
"
)
{
await
this
.
signStatusQuery
();
}
},
// 更换银行卡
async
ChangeBankPay
()
{
// uni.showModal({
// title: "系统提示",
// content: "功能开发中!"
// })
// return
uni
.
showLoading
({
mask
:
true
,
title
:
"
请稍后....
"
,
});
if
(
bankInfo
.
accountType
==
4
)
{
jWeixin
.
miniProgram
.
navigateTo
({
url
:
`/pages_subpack/pages/changeBindCard/main`
,
});
uni
.
hideLoading
();
return
;
}
this
.
BackToMini
(
"
AssignAddCard
"
);
uni
.
hideLoading
();
},
// 验证码弹出框开启
toDeposit
()
{
console
.
log
(
this
.
isOtherMoney
,
"
isOtherMoney
"
);
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
;
}
}
if
(
MyTimer
)
{
window
.
clearInterval
(
MyTimer
);
//停止计时器
MyTimer
=
null
;
this
.
CodeMsg
=
"
获取验证码
"
;
this
.
msCount
=
60
;
this
.
openCardPhonSms
=
""
;
}
this
.
$refs
.
popup
.
open
(
"
top
"
);
},
// 验证码弹出框关闭
close
()
{
this
.
$refs
.
popup
.
close
();
},
//切换到提现
ToWalletTx
()
{
$
(
"
#DepositBox
"
).
css
(
"
display
"
,
"
none
"
);
$
(
"
#TxWalletBox
"
).
css
(
"
display
"
,
"
block
"
);
// $('.TitleHeader').html('电子账户提现');
$
(
"
.doBtnTx
"
).
html
(
"
提现
"
);
opeType
=
1
;
uni
.
navigateTo
({
url
:
"
../Reflect/Reflect?
"
+
OforS
({
sessionID
:
sessionID
,
userID
:
userID
,
}),
});
},
//全部提现
TxAllFun
()
{
this
.
ReflectMoney
=
this
.
cardBalanceTx
*
1
;
// $('.TxClsTx').val($('.cardBalanceTx')[0].textContent * 1);
},
// 输入限制
inputControl
(
e
)
{
let
this_
=
this
;
this_
.
MoneyIndex
=
-
1
;
this_
.
isOtherMoney
=
true
;
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
>
this_
.
RechargeMax
?
this_
.
RechargeMax
:
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
()
{
// 若最后一位为小数点则去掉
let
str
=
this
.
inputOtherM
+
""
;
if
(
str
.
lastIndexOf
(
"
.
"
)
==
str
.
length
-
1
)
{
this
.
inputOtherM
=
str
.
substring
(
0
,
str
.
length
-
1
);
}
this
.
$nextTick
(
function
()
{
document
.
scrollingElement
.
scrollTo
(
0
,
this
.
scrollTop
);
});
},
//定时器
IntervalFun
()
{
if
(
this
.
msCount
==
1
)
{
window
.
clearInterval
(
MyTimer
);
//停止计时器
MyTimer
=
null
;
this
.
CodeMsg
=
"
获取验证码
"
;
this
.
msCount
=
60
;
}
else
{
this
.
msCount
--
;
this
.
CodeMsg
=
this
.
msCount
+
"
s后获取
"
;
}
},
// 代扣状态查询
async
signStatusQuery
()
{
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
$
.
ajax
({
url
:
gHost
+
"
/bank-wechat/bohai/comprehensive/signStatusQuery
"
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
sessionid
:
sessionID
,
wechattype
:
1
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
respes
)
{
loading
.
clear
();
if
(
respes
.
code
==
"
10000
"
)
{
console
.
log
(
respes
,
"
respes
"
);
if
(
respes
.
results
.
dkstatus
!=
1
)
{
// 1已签约
Dialog
.
alert
({
title
:
"
使用说明
"
,
message
:
"
您暂未进行银行代扣签约,将影响电子校园卡的正常使用,请尽快前往签约
"
,
theme
:
"
round-button
"
,
confirmButtonText
:
"
前往签约
"
,
confirmButtonColor
:
"
#2ddbb6
"
,
className
:
"
signAlert
"
,
})
.
then
(()
=>
{
// on confirm
jWeixin
.
miniProgram
.
navigateTo
({
url
:
`/pages/SignProxyPay/main`
,
});
})
.
catch
(()
=>
{
// on cancel
});
}
}
else
{
Toast
(
respes
.
message
||
"
代扣状态查询,请重试!
"
);
throw
new
Error
(
"
代扣状态查询,请重试!
"
);
}
},
error
:
function
(
err
)
{
loading
.
clear
();
Toast
(
err
||
"
代扣状态查询,请重试!
"
);
throw
new
Error
(
"
代扣状态查询,请重试!
"
);
},
});
},
// 充值验证获取验证码
async
SendSms
()
{
if
(
MyTimer
)
{
return
;
}
if
(
!
this
.
openCardPhon
||
this
.
openCardPhon
.
length
!==
11
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入正确的手机号码!
"
,
});
return
;
}
let
this_
=
this
;
let
loading
=
Toast
.
loading
({
message
:
"
加载中...
"
,
forbidClick
:
true
,
loadingType
:
"
spinner
"
,
duration
:
0
,
});
// 20211230
let
exchangeUrl
=
gHost
;
switch
(
bankInfo
.
accountType
)
{
case
3
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bocom/exchange/rechargeSms
"
;
break
;
case
4
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bohai/comprehensive/otpSms
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
$
.
ajax
({
url
:
exchangeUrl
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
amount
:
((
this
.
Money
||
this
.
inputOtherM
)
*
1
).
toFixed
(
2
),
//充值金额,单位元
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
sessionid
:
sessionID
,
wechattype
:
1
,
// 20211230渤海
mobilePhone
:
this
.
openCardPhon
,
msg
:
"
充值
"
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
loading
.
clear
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
IntervalFun
();
MyTimer
=
window
.
setInterval
(
this_
.
IntervalFun
,
1000
);
this_
.
RechargeSmsorderNoInfo
=
res5
.
results
?
res5
.
results
:
{};
}
else
{
weui
.
topTips
(
res5
.
message
);
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
res5
.
message
,
});
}
},
error
:
function
(
err
)
{
loading
.
clear
();
},
});
},
// 充值
async
ExchangeRecharge
()
{
let
amount
,
bindMedium
,
summary
;
if
(
this
.
isOtherMoney
)
{
if
(
this
.
inputOtherM
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请输入要充值的金额!
"
,
});
return
;
}
amount
=
this
.
inputOtherM
*
1
;
}
else
{
if
(
this
.
Money
==
""
)
{
uni
.
showModal
({
title
:
"
系统提示
"
,
content
:
"
请选择要充值的金额!
"
,
});
return
;
}
amount
=
this
.
Money
*
1
;
}
let
this_
=
this
;
if
(
!
this
.
openCardPhon
||
this
.
openCardPhon
.
length
!==
11
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入正确的手机号码!
"
,
});
return
;
}
if
(
bankInfo
.
accountType
!=
4
)
{
if
(
!
this
.
RechargeSmsorderNoInfo
.
orderNo
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请获取验证码!
"
,
});
return
;
}
}
if
(
!
this
.
openCardPhonSms
)
{
Dialog
({
title
:
"
系统提示
"
,
message
:
"
请收入验证码!
"
,
});
return
;
}
uni
.
showLoading
({
mask
:
true
,
title
:
"
处理中......
"
,
});
// 20211230
let
exchangeUrl
=
gHost
;
switch
(
bankInfo
.
accountType
)
{
case
3
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bocom/exchange/recharge
"
;
break
;
case
4
:
exchangeUrl
=
exchangeUrl
+
"
/bank-wechat/bohai/exchange/recharge
"
;
break
;
default
:
Dialog
({
title
:
"
系统提示
"
,
message
:
"
银行账号类型错误!
"
,
});
throw
"
银行账号类型错误!
"
;
break
;
}
$
.
ajax
({
url
:
exchangeUrl
,
type
:
"
POST
"
,
contentType
:
"
application/x-www-form-urlencoded
"
,
data
:
{
amount
:
(
amount
*
1
).
toFixed
(
2
),
//充值金额,单位元
mobileCode
:
this
.
openCardPhonSms
,
//短信验证码
orderNo
:
this_
.
RechargeSmsorderNoInfo
.
orderNo
,
//第三方合作交易标识,取充值短信返回的orderNo值
schoolId
:
bankInfo
.
schoolId
,
//学校id
userId
:
userID
,
//用户id
sessionid
:
sessionID
,
wechattype
:
1
,
// 21211230渤海银行
transAmount
:
(
amount
*
1
).
toFixed
(
2
),
verifyNo
:
this
.
openCardPhonSms
,
},
headers
:
{
sessionid
:
sessionID
,
},
success
:
function
(
res5
)
{
uni
.
hideLoading
();
if
(
res5
.
code
==
"
10000
"
)
{
this_
.
close
();
setTimeout
(()
=>
{
this_
.
queryBankInfo
();
},
3000
);
let
thiTime
=
new
Date
();
let
str
=
""
;
let
accountNo
=
this_
.
bankInfo_
.
bindCardNo
;
accountNo
=
accountNo
.
slice
(
accountNo
.
length
-
4
,
accountNo
.
length
);
let
minutes_
=
thiTime
.
getMinutes
().
toString
().
length
<
2
?
thiTime
.
getMinutes
().
toString
().
padStart
(
2
,
"
0
"
)
:
thiTime
.
getMinutes
().
toString
();
switch
(
bankInfo
.
accountType
)
{
case
3
:
if
(
thiTime
.
getMinutes
()
+
20
>=
60
)
{
str
=
thiTime
.
getHours
()
+
1
+
"
:
"
+
(
60
-
thiTime
.
getMinutes
());
}
else
{
str
=
thiTime
.
getHours
()
+
"
:
"
+
(
thiTime
.
getMinutes
()
+
20
);
}
wx
.
showModal
({
title
:
"
充值申请已提交
"
,
content
:
"
银行处理需要1-20分钟时间,充值结果以余额查询为准。
"
,
showCancel
:
false
,
success
:
function
()
{
uni
.
navigateTo
({
url
:
`../../recharging/recharging?bankName=
${
>>>>>>>
Stashed
changes
this_
.
bankInfo_
.
bindCardName
}
&bankNumber=
${
accountNo
}
&time=
${
str
}
&money=
${(
amount
*
1
...
...
src/pages/StudentPayment/PayProgress/PayProgress.vue
View file @
eb3c6b7f
...
...
@@ -64,7 +64,7 @@
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width:
301rpx;height: 258rpx;"
:src=
"ImgUrl+'StudentPayment/NoRecord
.png'"
<image
style=
"width:
474rpx;height: 235rpx;"
:src=
"ImgUrl+'xzf/noData-06
.png'"
mode=
'widthFix'
></image>
<view>
暂无数据
</view>
</view>
...
...
@@ -99,9 +99,8 @@
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width:
290rpx;height: 242rpx;"
:src=
"ImgUrl+'StudentPayment/development
.png'"
<image
style=
"width:
474rpx;height: 235rpx;"
:src=
"ImgUrl+'xzf/noData-06
.png'"
mode=
'widthFix'
></image>
<view>
程序员正在玩命加载
</view>
<view
class=
"bottomtxt"
>
暂无数据
</view>
</view>
</view>
...
...
src/pages/StudentPayment/PayProject/PayProject.vue
View file @
eb3c6b7f
...
...
@@ -30,9 +30,9 @@
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width:
301rpx;height: 258rpx;"
:src=
"ImgUrl+'StudentPayment/NoRecord
.png'"
<image
style=
"width:
474rpx;height: 235rpx;"
:src=
"ImgUrl+'xzf/noData-06
.png'"
mode=
'widthFix'
></image>
<view>
暂无
收费项目
</view>
<view>
暂无
数据
</view>
</view>
</view>
</van-tab>
...
...
@@ -73,10 +73,9 @@
</view>
<!-- 没有数据 -->
<view
class=
"noData"
v-else
>
<image
style=
"width:
290rpx;height: 242rpx;"
:src=
"ImgUrl+'StudentPayment/development
.png'"
<image
style=
"width:
474rpx;height: 235rpx;"
:src=
"ImgUrl+'xzf/noData-06
.png'"
mode=
'widthFix'
></image>
<view>
正在玩命加载
</view>
<view
class=
"bottomtxt"
>
暂无历交费项目
</view>
<view
class=
"bottomtxt"
>
暂无数据
</view>
</view>
</view>
</van-tab>
...
...
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