Commit ea105639 authored by 袁玲利's avatar 袁玲利

Merge branch 'V1.7.0_bank_feature' into uat

parents 50dec480 1f56ffe6
......@@ -125,7 +125,7 @@
"path": "pages/IcbcModule/Recharge/Recharge",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "充值",
"navigationBarTitleText": "电子校园卡",
"enablePullDownRefresh": false
}
......@@ -263,7 +263,7 @@
"path": "pages/BankModule/Recharge/Recharge",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "充值",
"navigationBarTitleText": "电子校园卡",
"enablePullDownRefresh": false
}
......@@ -433,7 +433,24 @@
}
}
],
, {
"path": "pages/commonProblem/commonProblem",
"style": {
"navigationBarTitleText": "常见问题",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/problemDetail/problemDetail",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "校智付",
......
<template>
<view class="container">
<view class="userInfoBox">
<view class="firstLine">
<view class="avatar">
<image :src="ImgUrl + 'user/personAva.png'" alt=""></image>
</view>
<view class="name">{{ PersonalInfo.name }}</view>
<view v-if="PersonalInfo.usertype == '1'"
>{{ PersonalInfo.gradename }}{{ PersonalInfo.classname }}</view
>
<view v-else>教职工</view>
</view>
<view class="secondLine">{{ PersonalInfo.schoolname }}</view>
</view>
<view class="contentWrapper">
<view class="balanceWrapper">
<view class="firstLine">
<view class="left">
<view>可用余额(元) </view>
<view>{{ cardBalanceTx }}</view>
</view>
<view class="right">
<van-popover
v-model="showPopover"
trigger="click"
:actions="actions"
placement="bottom-end"
@select="onSelect"
>
<template #reference>
<image
class="icon"
:src="ImgUrl + 'user/more.png'"
alt=""
></image>
</template>
</van-popover>
</view>
</view>
<view class="lastLine">
<view
>**** **** ****
{{
bankInfo_.accountNo.slice(bankInfo_.accountNo.length - 4)
}}</view
>
<view class="right" @click="ToWalletTx">
<!-- <image class="btn" :src="ImgUrl + 'user/cashBtn.png'" alt=""></image> -->
提现
</view>
</view>
</view>
</view>
<view class="contentBox" v-if="!depotMoneyother">
<!-- <image mode='widthFix' src="https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png"></image> -->
<view class="contentDiv">
<view class="contentDiv" style="display: none">
<view class="headview">
<view class="schoolname">{{ PersonalInfo.schoolname }}</view>
<view class="IconCls">电子校园卡</view>
......@@ -72,16 +124,40 @@
</view>
</view>
<!-- 充值明细 -->
<view class="RechargeDetailed" @click="BackToMini('purchaseDetail')">
账户明细
</view>
<!-- <view class="RechargeDetailed" @click="BackToMini('purchaseDetail')">
账户明细
</view> -->
<!-- 充值账户 -->
<view class="Recharge">
<span></span>
<span>账户充值</span>
</view>
<view class="moneyWrapper">
<view
class="moneyItem"
@click="depotMoney(item.value, index)"
v-bind:class="MoneyIndex == index ? 'active' : ''"
:data-money="item.value || 0"
v-for="(item, index) in MoneyList"
:key="index"
>
<view> {{ item.value }}</view>
<view> {{ item.lable }}</view>
</view>
<view class="other">
<input
v-model="inputOtherM"
@input="inputControl"
@blur="ReturnToTop"
placeholder="其他金额,最低3元"
placeholder-class="placeholderinputOtherM"
type="text"
maxlength="6"
/>
</view>
</view>
<!-- 充值的金额 -->
<view class="MoneyBox">
<view class="MoneyBox" style="display: none">
<view
class="depotMoney"
@click="depotMoney(item.value, index)"
......@@ -111,9 +187,8 @@
</view> -->
</view>
<!-- 充值其它金额 -->
<!-- <view class="OtherMoney" v-if="isOtherMoney"> -->
<view class="OtherMoney">
<view class="OtherMoney" style="display: none">
<span></span>
<input
v-model="inputOtherM"
......@@ -145,7 +220,16 @@
>
</view>
<!-- 支付方式 -->
<view class="payType" @click="queryBindCardList">
<view class="paytype">
<view class="left">付款账户 </view>
<view class="right" @click="queryBindCardList">
{{ bankInfo_.bindCardName }}({{
bankInfo_.bindCardNo.slice(bankInfo_.bindCardNo.length - 4)
}})
<van-icon name="arrow" />
</view>
</view>
<view class="payType" style="display: none" @click="queryBindCardList">
<view>付款方式</view>
<view>
{{ bankInfo_.bindCardName }}
......@@ -165,14 +249,13 @@
>
<span>充值生活费</span>
</view>
<view class="service">工商银行Ⅲ类户为您提供服务</view>
<!-- -->
<view class="switchbankCard" @click="ChangeBankPay"
>我要换银行卡支付</view
>
<!-- <view class="switchbankCard" @click="ChangeBankPay">我要换银行卡支付</view> -->
</view>
</view>
<!-- 其他充值金额 -->
<view class="contentBox" v-if="depotMoneyother">
<view class="contentBox" style="display: none">
<view class="OtherTitle">充值金额</view>
<view class="inputOtherM">
<span></span>
......@@ -261,6 +344,35 @@
<!-- 银行卡列表 -->
<view class="accountlist">
<!-- 切换绑定的一类卡列表 -->
<view class="showBindCardList">
<view class="choiceBox">选择付款账户</view>
<view class="cardsList">
<view
class="ListItem"
@click="ChangeCardPay(item)"
v-for="(item, index) in bindcardList"
:key="index"
>
<span style="padding-right: 10px"
>{{ item.bindCardName }}
</span>
<span
>尾号:{{
item.bindCardNo.slice(item.bindCardNo.length - 4)
}}</span
>
<image
class="BankListImg"
src="../../../static/img/choiceBank.png"
></image>
</view>
</view>
<view class="changeCard" @click="ChangeBankPay">我要换卡支付</view>
</view>
</view>
<!-- 银行卡列表
<view class="accountlist">
<!-- 切换绑定的一类卡列表
<view class="showBindCardList">
<view class="choiceBox">选择付款账户</view>
<view
......@@ -275,10 +387,13 @@
item.bindCardNo.slice(item.bindCardNo.length - 4)
}}</span
>
<image class='BankListImg' src='../../../static/img/choiceBank.png'></image>
<image
class="BankListImg"
src="../../../static/img/choiceBank.png"
></image>
</view>
</view>
</view>
</view> -->
</van-popup>
</view>
</view>
......@@ -340,6 +455,19 @@ export default {
name: "Recharge",
data() {
return {
showPopover: false,
// 通过 actions 属性来定义菜单选项
actions: [
{
text: "复制卡号",
},
{
text: "账户明细",
},
{
text: "常见问题",
},
],
popshow: false,
// 输入其它金额
isOtherMoney: false,
......@@ -428,6 +556,17 @@ export default {
}
},
methods: {
onSelect(action) {
if (action.text == "复制卡号") {
this.CopyCardNumber();
} else if (action.text == "账户明细") {
this.BackToMini("purchaseDetail");
} else if (action.text == "常见问题") {
uni.navigateTo({
url: `../../commonProblem/commonProblem`,
});
}
},
async beforeQuerySignStatus() {
await this.QueryUserInfo();
// 渤海银行要判断是否有代扣签约
......@@ -585,7 +724,7 @@ export default {
schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id
sessionid: sessionID,
wechattype: 1
wechattype: 1,
},
headers: {
sessionid: sessionID,
......@@ -623,7 +762,7 @@ export default {
error: function (err) {
loading.clear();
Toast(err || "代扣状态查询,请重试!");
throw new Error("代扣状态查询,请重试!");
throw new Error("代扣状态查询,请重试!");
},
});
},
......@@ -1117,7 +1256,7 @@ export default {
let this_ = this;
// let loading = weui.loading('请稍后');
$.ajax({
url: gHost + "/bank-wechat/user/bank/get",
url: gHost + "/bank-wechat/user/bank/get/v2",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
......@@ -1206,20 +1345,187 @@ page {
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.userInfoBox {
display: flex;
flex-direction: column;
width: calc(100% - 64rpx);
height: 150rpx;
margin: 0 32rpx;
margin-top: 30rpx;
background: linear-gradient(270deg, #f4f4f4 0%, #ebebeb 100%);
border-radius: 16px;
.firstLine {
display: flex;
flex-direction: row;
width: calc(100% - 68rpx);
height: 56rpx;
line-height: 56rpx;
margin: 0 34rpx;
margin-top: 28rpx;
overflow: hidden;
view {
white-space: nowrap;
}
.avatar {
width: 56rpx;
height: 56rpx;
uni-image {
width: 56rpx;
height: 56rpx;
}
}
.name {
margin-left: 17rpx;
font-size: 36rpx;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
view:last-child {
margin-left: 10rpx;
align-self: center;
align-items: center;
padding: 0 8rpx;
height: 40rpx;
line-height: 40rpx;
background: rgba(0, 0, 0, 0.08);
border-radius: 4rpx;
font-size: 26rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.5);
}
}
.secondLine {
display: flex;
width: calc(100% - 62rpx);
margin: 0 31rpx;
margin-top: 8rpx;
height: 37rpx;
line-height: 37rpx;
font-size: 26rpx;
color: rgba(0, 0, 0, 0.45);
}
}
.contentWrapper {
width: 100%;
display: flex;
flex-direction: column;
}
.balanceWrapper {
width: calc(100% - 144rpx);
margin: 0 32rpx;
margin-top: 24rpx;
height: 249rpx;
padding: 40rpx 40rpx 0;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/bankBg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
display: flex;
flex-direction: column;
.firstLine {
display: flex;
justify-content: space-between;
.left {
view:first-child {
height: 33rpx;
font-size: 24rpx;
font-weight: 600;
color: rgba(255, 255, 255, 0.85);
line-height: 33rpx;
}
view:last-child {
height: 84rpx;
font-size: 60rpx;
font-weight: 600;
color: #ffffff;
line-height: 84rpx;
}
}
.right {
width: 60rpx;
height: 60rpx;
align-self: flex-start;
.icon {
width: 60rpx;
height: 60rpx;
}
}
}
.lastLine {
display: flex;
width: 100%;
justify-content: space-between;
view:first-child {
height: 60rpx;
font-size: 40rpx;
font-weight: 600;
color: #ffffff;
line-height: 60rpx;
}
.right {
width: 140rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 30rpx;
font-weight: 600;
color: #04b871;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/cashBtn.png");
background-repeat: no-repeat;
background-size: cover;
text-align: center;
}
.btn {
width: 140rpx;
height: 60rpx;
}
}
}
.changPhone {
font-size: 14px;
color: #39f;
text-align: right;
}
.accountlist {
width: 100%;
height: 100%;
}
.showBindCardList {
width: 100%;
height: 100%;
.choiceBox {
text-align: center;
font-weight: bold;
height: 50px;
line-height: 50px;
height: 100rpx;
line-height: 100rpx;
padding: 0;
border-bottom: 0.5px solid #e6e6e6;
border-bottom: 1rpx solid #e6e6e6;
}
.cardsList {
width: 100%;
height: calc(100% - 260rpx);
overflow-y: scroll;
}
.ListItem {
......@@ -1230,6 +1536,17 @@ page {
position: relative;
text-align: center;
}
.changeCard {
margin: 0 auto;
margin-top: 40rpx;
height: 40rpx;
font-size: 28rpx;
font-weight: 400;
color: #04b871;
line-height: 40rpx;
text-align: center;
}
}
.SubmittedSuccessfully {
......@@ -1380,6 +1697,74 @@ page {
text-align: center;
}
.moneyWrapper {
margin-top: 10rpx;
width: 100%;
display: flex;
flex-wrap: wrap;
.moneyItem {
width: 210rpx;
height: 120rpx;
background: #f8f8f8;
border-radius: 12rpx;
display: flex;
justify-content: center;
margin-right: 14rpx;
font-family: PingFangSC-Medium, PingFang SC;
margin-bottom: 24rpx;
view {
align-self: center;
color: #333333;
}
view:first-child {
font-size: 40rpx;
font-weight: 500;
}
view:last-child {
font-size: 30rpx;
}
}
.moneyItem:nth-child(3n) {
margin-right: 0;
}
.active {
border: 3rpx solid #04b871;
view {
color: #04b871;
}
}
.other {
width: 444rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
background: #f8f8f8;
border-radius: 12rpx;
/deep/.uni-input-wrapper {
position: absolute;
width: 444rpx;
height: 120rpx;
font-size: 40rpx;
font-weight: 500;
color: #333333;
}
/deep/.uni-input-input {
height: 120rpx;
line-height: 120rpx;
}
}
}
.MoneyBox {
flex-wrap: wrap;
height: auto;
......@@ -1473,6 +1858,29 @@ page {
// margin-left: 5rpx;
}
.paytype {
display: flex;
margin-top: 39rpx;
width: 100%;
height: 40rpx;
justify-content: space-between;
font-size: 28rpx;
.left {
font-weight: 500;
color: rgba(0, 0, 0, 0.4);
}
.right {
color: rgba(0, 0, 0, 0.85);
.van-icon {
font-size: 28rpx;
color: #161616;
}
}
}
.payType {
height: 98rpx;
line-height: 98rpx;
......@@ -1510,7 +1918,8 @@ page {
position: relative;
}
@media (min-height: 650px) {
// @media (min-height: 650px) {
@media (min-height: 1040px) {
.bottomdiv {
position: fixed;
left: 0;
......@@ -1520,13 +1929,18 @@ page {
}
.DepositID {
width: 630rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
width: 100%;
height: 90rpx;
background: #04b871;
border-radius: 45px;
line-height: 90rpx;
text-align: center;
font-size: 34rpx;
font-weight: 500;
color: #ffffff;
margin: 0 auto;
margin-top: 29rpx;
text-align: center;
bottom: 30rpx;
}
.DepositID span {
......@@ -1538,6 +1952,17 @@ page {
line-height: 92rpx;
}
.service {
margin-top: 118rpx;
width: 100%;
height: 40rpx;
font-size: 28rpx;
font-weight: 400;
color: rgba(0, 0, 0, 0.5);
line-height: 40rpx;
text-align: center;
}
.switchbankCard {
text-align: center;
/* width: 205px; */
......
<template>
<view class="container">
<view class="contentBox" v-if="!depotMoneyother">
<!-- <image mode='widthFix' src="https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png"></image> -->
<view class="contentDiv">
<view class="headview">
<view class="schoolname">{{ PersonalInfo.schoolname }}</view>
<view class="IconCls">电子校园卡</view>
</view>
<!-- 卡号显示 -->
<view class="cardNum">
<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>{{ PersonalInfo.name }}</span></view
>
<view class="StudentCls" v-if="PersonalInfo.usertype == '1'">
班级:{{ PersonalInfo.gradename }}({{
<view class="container">
<view class="userInfoBox">
<view class="firstLine">
<view class="avatar">
<image :src="ImgUrl + 'user/personAva.png'" alt=""></image>
</view>
<view class="name">{{ PersonalInfo.name }}</view>
<view v-if="PersonalInfo.usertype == '1'">{{ PersonalInfo.gradename }}{{ PersonalInfo.classname }}</view>
<view v-else>教职工</view>
</view>
<view class="secondLine">{{ PersonalInfo.schoolname }}</view>
</view>
<view class="contentWrapper" v-if="!depotMoneyother">
<view class="balanceWrapper">
<view class="firstLine">
<view class="left">
<view>可用余额(元) </view>
<view>{{ cardBalanceTx }}</view>
</view>
<view class="right">
<van-popover v-model="showPopover" trigger="click" :actions="actions" placement="bottom-end"
@select="onSelect">
<template #reference>
<image class="icon" :src="ImgUrl + 'user/more.png'" alt=""></image>
</template>
</van-popover>
</view>
</view>
<view class="lastLine">
<view>**** **** **** {{ bankInfo_.accountNo.slice(bankInfo_.accountNo.length - 4)}}</view>
<view class="right" @click="ToWalletTx">
<!-- <image class="btn" :src="ImgUrl + 'user/cashBtn.png'" alt=""></image> -->
提现
</view>
</view>
</view>
</view>
<view class="contentBox" v-if="!depotMoneyother">
<!-- <image mode='widthFix' src="https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png"></image> -->
<view class="contentDiv" style="display: none">
<view class="headview">
<view class="schoolname">{{ PersonalInfo.schoolname }}</view>
<view class="IconCls">电子校园卡</view>
</view>
<!-- 卡号显示 -->
<view class="cardNum">
<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>{{ 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>{{ 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"
:src="ImgUrl + 'images/xiaopaycard (17).png'"
alt=""
></image>
</view>
</view>
</view>
<!-- 充值明细 -->
<view class="RechargeDetailed" @click="BackToMini('purchaseDetail')">
账户明细
</view>
<!-- 充值账户 -->
<view class="Recharge">
<span></span>
<span>账户充值</span>
</view>
<!-- 充值的金额 -->
<view class="MoneyBox">
<view
class="depotMoney"
@click="depotMoney(item.value, index)"
v-bind:class="MoneyIndex == index ? 'choiceClass' : ''"
:data-money="item.value || 0"
v-for="(item, index) in MoneyList"
:key="index"
>
<span class="value">
{{ item.value }}
</span>
<span style="font-size: 28rpx; font-weight: 600; margin-left: 7rpx">{{
item.lable
}}</span>
<!-- <span class="tips" v-show="item.tips">
}})</view>
<view class="TeacherCls" v-else>教职工</view>
</view>
<view class="Balance">
<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"
:src="ImgUrl + 'images/xiaopaycard (17).png'" alt=""></image>
</view>
</view>
</view>
<!-- 充值明细 -->
<!-- <view style="display: none" class="RechargeDetailed" @click="BackToMini('purchaseDetail')">
账户明细
</view> -->
<!-- 充值账户 -->
<view class="Recharge">
<span></span>
<span>账户充值</span>
</view>
<!-- 充值的金额 -->
<!-- <view class="MoneyBox">
<view class="depotMoney" @click="depotMoney(item.value, index)"
v-bind:class="MoneyIndex == index ? 'choiceClass' : ''" :data-money="item.value || 0"
v-for="(item, index) in MoneyList" :key="index">
<span class="value">
{{ item.value }}
</span>
<span style="font-size: 28rpx; font-weight: 600; margin-left: 7rpx">{{
item.lable
}}</span>
</view>
</view> -->
<view class="moneyWrapper">
<view class="moneyItem" @click="depotMoney(item.value, index)"
v-bind:class="MoneyIndex == index ? 'active' : ''" :data-money="item.value || 0"
v-for="(item, index) in MoneyList" :key="index">
<view> {{ item.value }}</view>
<view> {{ item.lable }}</view>
</view>
<view class="other">
<input v-model="inputOtherM" @input="inputControl" @blur="ReturnToTop" placeholder="其他金额,最低3元"
placeholder-class="placeholderinputOtherM" type="text" maxlength="6" />
</view>
</view>
<!-- <view class="MoneyBox" style="display: none !important;">
<view class="depotMoney" @click="depotMoney(item.value, index)"
v-bind:class="MoneyIndex == index ? 'choiceClass' : ''" :data-money="item.value || 0"
v-for="(item, index) in MoneyList" :key="index">
<span class="value">
{{ item.value }}
</span>
<span style="font-size: 28rpx; font-weight: 600; margin-left: 7rpx">
{{item.lable}}
</span>
</view>
</view> -->
<!-- <span class="tips" v-show="item.tips">
{{item.tips}}
</span> -->
</view>
</view>
<!-- 充值限额提示 -->
<view class="depositbox">
<image
mode="widthFix"
class="depositImg"
src="../../../static/img/depositIcon.png"
></image>
<span
style="
<!-- 充值限额提示 -->
<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">{{ RechargeMax }}</span></span
></span
>
</view>
<!-- 充值其它金额 -->
<!-- <view class="OtherMoney" v-if="isOtherMoney"> -->
<view class="OtherMoney">
<span></span>
<input
v-model="inputOtherM"
@input="inputControl"
@blur="ReturnToTop"
placeholder="请输入其他金额,最低3元"
placeholder-class="placeholderinputOtherM"
type="text"
maxlength="6"
/>
</view>
<!-- 支付方式 -->
<view class="payType" @click="queryBindCardList">
<view>付款方式</view>
<view>
{{ bankInfo_.bindCardName }}
{{ bankInfo_.bindCardNo.slice(bankInfo_.bindCardNo.length - 4)
}}<span class="arrow"></span
></view>
<!-- <view>{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}}) <span
">最大可充值金额:<span style="color: red"><span class="canDepositTx">{{ RechargeMax }}</span></span></span>
</view>
<!-- 充值其它金额 -->
<!-- <view class="OtherMoney" v-if="isOtherMoney"> -->
<view class="OtherMoney" style="display: none">
<span></span>
<input v-model="inputOtherM" @input="inputControl" @blur="ReturnToTop" placeholder="请输入其他金额,最低3元"
placeholder-class="placeholderinputOtherM" type="text" maxlength="6" />
</view>
<!-- 支付方式 -->
<view class="paytype">
<view class="left">付款账户 </view>
<view class="right" @click="queryBindCardList">
{{ bankInfo_.bindCardName }}({{ bankInfo_.bindCardNo.slice(bankInfo_.bindCardNo.length - 4)}})
<van-icon name="arrow" />
</view>
</view>
<view class="payType" style="display: none" @click="queryBindCardList">
<view>付款方式</view>
<view>
{{ bankInfo_.bindCardName }}
{{ bankInfo_.bindCardNo.slice(bankInfo_.bindCardNo.length - 4)
}}<span class="arrow"></span>
</view>
<!-- <view>{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}}) <span
class="arrow"></span></view> -->
</view>
<!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> -->
<!-- 充值生活费 -->
<view class="bottomdiv">
<view
class="DepositID"
@click="toDeposit"
v-bind:style="Money != '' ? '' : 'background: #e6e6e6 !important;'"
>
<span>充值生活费</span>
</view>
<!-- -->
<view class="switchbankCard" @click="ChangeBankPay"
</view>
<!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> -->
<!-- 充值生活费 -->
<view class="bottomdiv">
<view class="DepositID" @click="toDeposit"
v-bind:style="Money != '' ? '' : 'background: #e6e6e6 !important;'">
<span>充值生活费</span>
</view>
<!-- -->
<!-- <view class="switchbankCard" @click="ChangeBankPay"
>我要换银行卡支付</view
>
</view>
</view>
<!-- 其他充值金额 -->
<view class="contentBox" v-if="depotMoneyother">
<view class="OtherTitle">充值金额</view>
<view class="inputOtherM">
<span></span>
<input
v-model="inputOtherM"
@input="inputControl"
placeholder-class="placeholderinputOtherM"
type="text"
maxlength="6"
/>
</view>
<view class="OtherLine"></view>
<!-- 充值范围 -->
<view class="Recharge_">
<!-- <image mode="widthFix" class="depositImg" src="../../static/img/depositIcon.png"></image> -->
<span>最大可充值金额:</span>
<span
><span>3.00 ~ {{ RechargeMax }}</span></span
>
</view>
</view>
<!-- 弹出层 -->
<uni-popup ref="popup" :mask-click="false">
<!-- 充值确认 -->
<view class="RechargeConfirmationBox">
<view class="RechargeInfo">
<view class="closePhoneBox" @click="close()">
<image src="../../../static/img/close.png" mode="aspectFit"></image>
</view>
<view class="RechargeInfo1"> 充值生活费 </view>
<view style="width: 520rpx; height: 1rpx; background: #eeeeee"></view>
<view class="ContenInfo">
<view class="" v-if="isOtherMoney">
充值金额:{{ inputOtherM }}
</view>
<view class="" v-else> 充值金额:{{ Money }}</view>
<view class="">
付款账户:{{ bankInfo_.bindCardName }}({{
> -->
<view class="service">工商银行Ⅲ类户为您提供服务</view>
</view>
</view>
<!-- 其他充值金额 -->
<view class="contentBox" style="display: none;" v-if="depotMoneyother">
<view class="OtherTitle">充值金额</view>
<view class="inputOtherM">
<span></span>
<input v-model="inputOtherM" @input="inputControl" placeholder-class="placeholderinputOtherM"
type="text" maxlength="6" />
</view>
<view class="OtherLine"></view>
<!-- 充值范围 -->
<view class="Recharge_">
<!-- <image mode="widthFix" class="depositImg" src="../../static/img/depositIcon.png"></image> -->
<span>最大可充值金额:</span>
<span><span>3.00 ~ {{ RechargeMax }}</span></span>
</view>
</view>
<!-- 弹出层 -->
<uni-popup ref="popup" :mask-click="false">
<!-- 充值确认 -->
<view class="RechargeConfirmationBox">
<view class="RechargeInfo">
<view class="closePhoneBox" @click="close()">
<image src="../../../static/img/close.png" mode="aspectFit"></image>
</view>
<view class="RechargeInfo1"> 充值生活费 </view>
<view style="width: 520rpx; height: 1rpx; background: #eeeeee"></view>
<view class="ContenInfo">
<view class="" v-if="isOtherMoney">
充值金额:{{ inputOtherM }}元
</view>
<view class="" v-else> 充值金额:{{ Money }}元 </view>
<view class="">
付款账户:{{ bankInfo_.bindCardName }}({{
bankInfo_.bindCardNo &&
bankInfo_.bindCardNo.slice(bankInfo_.bindCardNo.length - 4)
}})
</view>
</view>
<view style="width: 520rpx; height: 1rpx; background: #eeeeee"></view>
<!-- 取消 确认充值按钮 -->
<view class="BtngGoup">
<view class="" @click="close()"> 取消 </view>
<view class="" @click="ExchangeRecharge"> 确认充值 </view>
</view>
</view>
</view>
</uni-popup>
<!-- 选择银行卡 -->
<view class="selectCard">
<van-popup
v-model="popshow"
round
position="bottom"
:style="{ height: '30%' }"
>
<!-- 银行卡列表 -->
<view class="accountlist">
<!-- 切换绑定的一类卡列表 -->
<view class="showBindCardList">
<view class="choiceBox">选择付款账户</view>
<view
class="ListItem"
@click="ChangeCardPay(item)"
v-for="(item, index) in bindcardList"
:key="index"
>
<span style="padding-right: 10px">{{ item.bindCardName }} </span>
<span
>尾号:{{
item.bindCardNo.slice(item.bindCardNo.length - 4)
}}</span
>
<image class='BankListImg' src='../../../static/img/choiceBank.png'></image>
</view>
</view>
</view>
</van-popup>
</view>
</view>
</view>
</view>
<view style="width: 520rpx; height: 1rpx; background: #eeeeee"></view>
<!-- 取消 确认充值按钮 -->
<view class="BtngGoup">
<view class="" @click="close()"> 取消 </view>
<view class="" @click="ExchangeRecharge"> 确认充值 </view>
</view>
</view>
</view>
</uni-popup>
<!-- 选择银行卡 -->
<view class="selectCard">
<van-popup v-model="popshow" round position="bottom" :style="{ height: '40%' }">
<!-- 银行卡列表 -->
<view class="accountlist">
<!-- 切换绑定的一类卡列表 -->
<view class="showBindCardList">
<view class="choiceBox">选择付款账户</view>
<view class="cardsList">
<view class="ListItem" @click="ChangeCardPay(item)" v-for="(item, index) in bindcardList"
:key="index">
<span style="padding-right: 10px">{{ item.bindCardName }} </span>
<span>尾号:{{item.bindCardNo.slice(item.bindCardNo.length - 4)}}</span>
<image class="BankListImg" src="../../../static/img/choiceBank.png"></image>
</view>
</view>
<view class="changeCard" @click="ChangeBankPay">我要换卡支付</view>
</view>
</view>
</van-popup>
</view>
</view>
</template>
<script>
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 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,
};
/**
* 对象转拼接字符串
* @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,
},
],
numberList: [],
tempFiles1: "../../static/img/idCardBg1.png", //上传身份证临时选择文件
tempFiles2: "../../static/img/idCardBg0.png",
//绑定的一类卡列表
bindcardList: [],
};
},
onLoad: function (options) {
console.log(options);
// 初始化
userID = options["userID"] || "";
sessionID = options["seesionID"] || "";
fromType = options["fromType"] || "";
bankInfo.sessionid = sessionID || "";
this.QueryUserInfo();
},
created: function () {},
mounted: function () {},
methods: {
async ChangeBankPay() {
uni.showLoading({ mask: true });
let status = await this.accountCloseacceptStatusQuery();
uni.hideLoading();
if (status !== 0) return false;
this.BackToMini("AssignAddCard");
},
accountCloseacceptStatusQuery() {
return new Promise((resolve, reject) => {
$.ajax({
//查询是否提交销户
url:
gHost +
"/bank-wechat/icbc/account/manager/accountCloseacceptStatusQuery",
type: "post",
data: {
schoolId: this.PersonalInfo.schoolid,
userId: this.PersonalInfo.id,
wechattype: 1,
sessionid: sessionID,
},
contentType: "application/x-www-form-urlencoded",
headers: {
sessionid: sessionID,
},
success: ({ code, message, results }) => {
let status = results && results.status; // 0表示未申请,1申请中,2已销户,3销户申请失败
if (code === "10000" && status == "0") {
} else if (code === "10000" && status == "1") {
uni.showToast({
title: "您已提交销户申请,银行正在审核中。",
icon: "none",
});
} else {
uni.showToast({
title: message,
icon: "none",
});
}
resolve(status);
},
error: function (err) {
uni.showToast({
title: err.message || "请求失败",
icon: "none",
});
reject(-1);
},
});
});
},
// 验证码弹出框开启
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();
},
//切换到提现
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);
});
},
// 充值
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;
uni.showLoading({
mask: true,
title: "处理中......",
});
try {
let status = await this.accountCloseacceptStatusQuery();
if (status !== 0) {
uni.hideLoading();
return false;
}
} catch (e) {
uni.hideLoading();
return false;
}
$.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: this.bankInfo_.bindCardNo,
summary: "充值",
},
headers: {
sessionid: sessionID,
},
success: function (res5) {
uni.hideLoading();
if (res5.code == "10000") {
this_.close();
setTimeout(() => {
this_.queryBankInfo();
}, 3000);
wx.showModal({
title: "充值申请已提交",
content: "银行处理需要1-5分钟时间,充值结果以余额查询为准。",
showCancel: false,
});
} else {
weui.topTips(res5.message);
}
},
error: function (err) {
uni.hideLoading();
},
});
},
// 充值结果查询
async ExchangeRechargeQuery(flowId, oriCorpSerno) {
let this_ = this;
let loading = Toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
$.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.clear();
if (res5.code == "10000") {
let appStatus = res5.results.appStatus;
if (appStatus == "4") {
uni.showModal({
title: "系统提示",
content: "充值成功!",
});
this_.queryBankInfo();
} else {
uni.showModal({
title: "系统提示",
content: appStatus == "1" ? "申请已受理" : res5.message,
});
}
} else {
weui.topTips(res5.message);
uni.showModal({
title: "系统提示",
content: res5.message,
});
}
},
error: function (err) {
loading.clear();
},
});
},
// 复制我卡号
async CopyCardNumber() {
let value = this.bankInfo_.accountNo;
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.inputOtherM = "";
this.Money = parseInt(value);
this.MoneyIndex = MoneyIndex;
},
//按钮操作
HideHTML(dom, type) {
this.$nextTick(function () {
if (type == 0) {
$("." + dom).css("display", "none");
} else {
$("." + dom).css("display", "block");
}
});
},
//返回小程序 跳转指定页面
BackToMini(page) {
if (page == "UserMain" || page == "personalCenter") {
jWeixin.miniProgram.switchTab({
url: `/pages/${page}/main`,
});
} else {
jWeixin.miniProgram.redirectTo({
url: `/pages/${page}/main`,
});
}
},
//换绑卡
ChangeCardPay(item) {
let this_ = this;
if (bankInfo.bindCardNo == item.bindCardNo) {
return;
}
var loading = weui.loading("请稍后");
$.ajax({
url: gHost + "/bank-wechat/icbc/account/bindcard/changeDefaultBinding",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
bindMedium: item.bindCardNo,
bindMediumName: item.bindCardName,
},
success: function (res5) {
loading.hide();
if (res5.code == "10000") {
this_.queryUserBankInfo();
this_.close();
} else {
weui.topTips(res5.message);
}
this_.popshow = false;
},
error: function (err) {
loading.hide();
},
});
},
//查询一类卡绑定列表
queryBindCardList() {
let this_ = this;
let loading = weui.loading("请稍后");
$.ajax({
url: gHost + "/bank-wechat/icbc/account/bindcard/bindingList",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
mediumId: bankInfo.accountNo,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
},
success: function (res4) {
loading.hide();
if (res4.code == "10000") {
this_.bindcardList = res4.results;
this_.popshow = true;
} else {
weui.topTips(res4.message);
}
},
error: function (err) {
loading.hide();
},
});
},
//获取银行余额
queryBankInfo() {
let this_ = this;
// let loading = weui.loading('请稍后');
$.ajax({
url: gHost + "/bank-wechat/icbc/account/balance/balanceQuery",
type: "POST",
timeout: 8000,
contentType: "application/x-www-form-urlencoded",
data: {
mediumId: bankInfo.accountNo || "",
schoolId: bankInfo.schoolId || "",
userId: bankInfo.userId || "",
sessionid: sessionID,
wechattype: 1,
},
success: function (res3) {
// loading.hide();
if (res3.code == "10000") {
if (res3.results.accountBalance == null) {
weui.topTips("账户信息为空,余额查询失败");
} else {
this_.cardBalanceTx = (res3.results.accountBalance * 1).toFixed(
2
);
$(".TxClsTx").attr(
"placeholder",
`可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
);
this_.RechargeMax = (
2000 -
(res3.results.accountBalance * 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") {
if (!res2.results) {
weui.topTips("获取用户银行信息失败!");
// loading.hide();
return;
}
bankInfo = res2.results;
bankInfo.sessionid = sessionID;
this_.queryBankInfo(); //查余额
this_.bankInfo_ = bankInfo;
// this_.getBindingList(bankInfo.accountNo,bankInfo.schoolId,bankInfo.id);
} else {
weui.topTips(res2.message);
}
},
error: function (err) {
// loading.hide();
},
});
},
//查询用户信息
QueryUserInfo() {
let this_ = this;
let loading = Toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
$.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.clear();
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.clear();
},
});
},
},
};
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 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,
};
/**
* 对象转拼接字符串
* @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 {
showPopover: false,
// 通过 actions 属性来定义菜单选项
actions: [{
text: "复制卡号"
}, {
text: "账户明细"
}, {
text: "常见问题"
}],
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,
},
],
numberList: [],
tempFiles1: "../../static/img/idCardBg1.png", //上传身份证临时选择文件
tempFiles2: "../../static/img/idCardBg0.png",
//绑定的一类卡列表
bindcardList: [],
};
},
onLoad: function(options) {
console.log(options);
// 初始化
userID = options["userID"] || "";
sessionID = options["seesionID"] || "";
fromType = options["fromType"] || "";
bankInfo.sessionid = sessionID || "";
this.QueryUserInfo();
},
created: function() {},
mounted: function() {},
methods: {
onSelect(action) {
if (action.text == "复制卡号") {
this.CopyCardNumber();
} else if (action.text == "账户明细") {
this.BackToMini('purchaseDetail');
} else if (action.text == "常见问题") {
uni.navigateTo({
url: `../../commonProblem/commonProblem`
})
}
},
async ChangeBankPay() {
uni.showLoading({
mask: true
});
let status = await this.accountCloseacceptStatusQuery();
uni.hideLoading();
if (status !== 0) return false;
this.BackToMini("AssignAddCard");
},
accountCloseacceptStatusQuery() {
return new Promise((resolve, reject) => {
$.ajax({
//查询是否提交销户
url: gHost +
"/bank-wechat/icbc/account/manager/accountCloseacceptStatusQuery",
type: "post",
data: {
schoolId: this.PersonalInfo.schoolid,
userId: this.PersonalInfo.id,
wechattype: 1,
sessionid: sessionID,
},
contentType: "application/x-www-form-urlencoded",
headers: {
sessionid: sessionID,
},
success: ({
code,
message,
results
}) => {
let status = results && results.status; // 0表示未申请,1申请中,2已销户,3销户申请失败
if (code === "10000" && status == "0") {} else if (code === "10000" &&
status == "1") {
uni.showToast({
title: "您已提交销户申请,银行正在审核中。",
icon: "none",
});
} else {
uni.showToast({
title: message,
icon: "none",
});
}
resolve(status);
},
error: function(err) {
uni.showToast({
title: err.message || "请求失败",
icon: "none",
});
reject(-1);
},
});
});
},
// 验证码弹出框开启
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();
},
//切换到提现
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);
});
},
// 充值
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;
uni.showLoading({
mask: true,
title: "处理中......",
});
try {
let status = await this.accountCloseacceptStatusQuery();
if (status !== 0) {
uni.hideLoading();
return false;
}
} catch (e) {
uni.hideLoading();
return false;
}
$.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: this.bankInfo_.bindCardNo,
summary: "充值",
},
headers: {
sessionid: sessionID,
},
success: function(res5) {
uni.hideLoading();
if (res5.code == "10000") {
this_.close();
setTimeout(() => {
this_.queryBankInfo();
}, 3000);
wx.showModal({
title: "充值申请已提交",
content: "银行处理需要1-5分钟时间,充值结果以余额查询为准。",
showCancel: false,
});
} else {
weui.topTips(res5.message);
}
},
error: function(err) {
uni.hideLoading();
},
});
},
// 充值结果查询
async ExchangeRechargeQuery(flowId, oriCorpSerno) {
let this_ = this;
let loading = Toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
$.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.clear();
if (res5.code == "10000") {
let appStatus = res5.results.appStatus;
if (appStatus == "4") {
uni.showModal({
title: "系统提示",
content: "充值成功!",
});
this_.queryBankInfo();
} else {
uni.showModal({
title: "系统提示",
content: appStatus == "1" ? "申请已受理" : res5.message,
});
}
} else {
weui.topTips(res5.message);
uni.showModal({
title: "系统提示",
content: res5.message,
});
}
},
error: function(err) {
loading.clear();
},
});
},
// 复制我卡号
async CopyCardNumber() {
let value = this.bankInfo_.accountNo;
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.inputOtherM = "";
this.Money = parseInt(value);
this.MoneyIndex = MoneyIndex;
},
//按钮操作
HideHTML(dom, type) {
this.$nextTick(function() {
if (type == 0) {
$("." + dom).css("display", "none");
} else {
$("." + dom).css("display", "block");
}
});
},
//返回小程序 跳转指定页面
BackToMini(page) {
if (page == "UserMain" || page == "personalCenter") {
jWeixin.miniProgram.switchTab({
url: `/pages/${page}/main`,
});
} else {
jWeixin.miniProgram.redirectTo({
url: `/pages/${page}/main`,
});
}
},
//换绑卡
ChangeCardPay(item) {
let this_ = this;
if (bankInfo.bindCardNo == item.bindCardNo) {
return;
}
var loading = weui.loading("请稍后");
$.ajax({
url: gHost + "/bank-wechat/icbc/account/bindcard/changeDefaultBinding",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
bindMedium: item.bindCardNo,
bindMediumName: item.bindCardName,
},
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
this_.queryUserBankInfo();
this_.close();
} else {
weui.topTips(res5.message);
}
this_.popshow = false;
},
error: function(err) {
loading.hide();
},
});
},
//查询一类卡绑定列表
queryBindCardList() {
let this_ = this;
let loading = weui.loading("请稍后");
$.ajax({
url: gHost + "/bank-wechat/icbc/account/bindcard/bindingList",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
mediumId: bankInfo.accountNo,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
},
success: function(res4) {
loading.hide();
if (res4.code == "10000") {
this_.bindcardList = res4.results;
this_.popshow = true;
} else {
weui.topTips(res4.message);
}
},
error: function(err) {
loading.hide();
},
});
},
//获取银行余额
queryBankInfo() {
let this_ = this;
// let loading = weui.loading('请稍后');
$.ajax({
url: gHost + "/bank-wechat/icbc/account/balance/balanceQuery",
type: "POST",
timeout: 8000,
contentType: "application/x-www-form-urlencoded",
data: {
mediumId: bankInfo.accountNo || "",
schoolId: bankInfo.schoolId || "",
userId: bankInfo.userId || "",
sessionid: sessionID,
wechattype: 1,
},
success: function(res3) {
// loading.hide();
if (res3.code == "10000") {
if (res3.results.accountBalance == null) {
weui.topTips("账户信息为空,余额查询失败");
} else {
this_.cardBalanceTx = (res3.results.accountBalance * 1).toFixed(
2
);
$(".TxClsTx").attr(
"placeholder",
`可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
);
this_.RechargeMax = (
2000 -
(res3.results.accountBalance * 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/v2",
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") {
if (!res2.results) {
weui.topTips("获取用户银行信息失败!");
// loading.hide();
return;
}
bankInfo = res2.results;
bankInfo.sessionid = sessionID;
this_.queryBankInfo(); //查余额
this_.bankInfo_ = bankInfo;
// this_.getBindingList(bankInfo.accountNo,bankInfo.schoolId,bankInfo.id);
} else {
weui.topTips(res2.message);
}
},
error: function(err) {
// loading.hide();
},
});
},
//查询用户信息
QueryUserInfo() {
let this_ = this;
let loading = Toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
$.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.clear();
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.clear();
},
});
},
},
};
</script>
<style lang="scss">
html,
body,
page {
width: 750rpx;
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.showBindCardList {
.choiceBox {
text-align: center;
font-weight: bold;
height: 50px;
line-height: 50px;
padding: 0;
border-bottom: 0.5px solid #e6e6e6;
}
.ListItem {
border-bottom: 1rpx solid #e6e6e6;
font-size: 30rpx;
padding: 25rpx 0;
background: #fff;
position: relative;
text-align: center;
}
}
.SubmittedSuccessfully {
width: 400rpx !important;
height: 200rpx !important;
margin: 0 auto !important;
background: #000000;
opacity: 0.8;
border-radius: 8rpx;
}
.cardNum {
width: 574rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
padding-top: 36rpx;
font-size: 24rpx;
.cardNumleft {
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
.cardNumright {
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #ffffff;
}
}
.RechargeDetailed {
text-align: center;
// width: 118rpx;
height: 32rpx;
margin: 0 auto;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #36a8ff;
margin-top: 50rpx;
}
.contentBox {
width: 670rpx;
height: 376rpx;
margin: 0 auto;
}
.contentDiv {
height: 100%;
// margin-top: 36rpx;
border-radius: 15rpx;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
top: 36rpx;
}
.HidenText {
width: 574rpx;
margin: 0 auto;
padding-top: 88rpx;
}
.HidenText,
.Balance {
padding-left: 46rpx;
padding-right: 40rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #ffffff;
}
.Balance {
width: 574rpx;
margin: 0 auto;
margin-top: 20rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
}
.Recharge {
// height: 30rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
margin-top: 58rpx;
span:nth-child(1) {
width: 4rpx;
height: 30rpx;
background: #23d6a3;
border-radius: 2rpx;
display: inline-block;
position: relative;
top: 5rpx;
}
span:nth-child(2) {
display: inline-block;
margin-left: 16rpx;
}
}
.headview {
display: flex;
justify-content: space-between;
// padding-left: 40rpx;
// padding-right: 40rpx;
padding-top: 36rpx;
width: 574rpx;
margin: 0 auto;
}
.headview .schoolname {
width: 252rpx;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 50rpx;
}
.headview .IconCls {
width: 170rpx;
height: 48rpx;
background: #20946d;
border-radius: 25rpx;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: 48rpx;
text-align: center;
}
.MoneyBox {
flex-wrap: wrap;
height: auto;
color: #888888;
width: 686rpx;
margin: 0 auto;
overflow: hidden;
}
.choiceClass {
background: rgba(39, 266, 148, 0.1) !important;
color: #28d79c;
}
.MoneyBox view {
width: 220rpx;
height: 120rpx;
background: #ffffff;
border-radius: 8rpx;
border: 1rpx solid #eeeeee;
margin-top: 16rpx;
text-align: center;
position: relative;
box-shadow: 0px 9rpx 23rpx 0rpx rgba(25, 26, 88, 0.07);
margin-right: 2px;
float: left;
}
.depotMoney .value {
font-size: 45rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 120rpx;
text-align: center;
}
.depotMoney .tips {
// width: 79rpx;
// height: 33rpx;
// background: linear-gradient(180deg, #FA6400 0%, #FD9D00 100%);
// border-radius: 4rpx;
// font-size: 18rpx;
// font-weight: 500;
// padding: 4rpx;
// text-align: center;
// float: right;
// position: absolute;
// right: 0rpx;
// line-height: 33rpx;
}
.OtherMoney {
display: flex;
justify-content: flex-start;
// color: #999999;
// font-size: 28rpx;
// font-family: PingFangSC-Regular, PingFang SC;
// font-weight: 400;
// color: #999999;
// line-height: 40rpx;
width: 686rpx;
height: 100rpx;
background: #f7f6fb;
border-radius: 10rpx;
margin: 0 auto;
line-height: 100rpx;
margin-top: 32rpx;
span {
display: inline-block;
font-size: 40rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
padding-left: 26rpx;
}
input {
height: 100%;
}
}
.OtherMoney view:nth-child(2) {
// width: 30rpx;
// height: 30rpx;
// background: #F0F0F0;
// border-radius: 50%;
// text-align: center;
// line-height: 30rpx;
// margin-top: 7rpx;
// margin-left: 5rpx;
}
.payType {
height: 98rpx;
line-height: 98rpx;
display: flex;
justify-content: space-between;
}
.payType view:nth-child(1) {
// width: 120rpx;
height: 42rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
line-height: 98rpx;
}
.payType view::nth-child(2) {
width: 225rpx;
height: 45rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
line-height: 45rpx;
}
.arrow {
transform: rotate(-45deg);
top: -3rpx;
border: solid #999999;
border-width: 0 1rpx 1rpx 0;
display: inline-block;
padding: 8rpx;
position: relative;
}
@media (min-height: 650px) {
.bottomdiv {
position: fixed;
left: 0;
right: 0;
bottom: 30rpx;
}
}
.DepositID {
width: 630rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
margin: 0 auto;
text-align: center;
bottom: 30rpx;
}
.DepositID span {
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 92rpx;
}
.switchbankCard {
text-align: center;
/* width: 205px; */
// height: 28rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #268ef8;
margin-top: 23rpx;
}
.RechargeConfirmationBox {
position: fixed;
left: 0;
right: 0;
top: 400rpx;
width: 618rpx;
height: 478rpx;
background: #ffffff;
border-radius: 8rpx;
margin: 0 auto;
.RechargeInfo {
width: 520rpx;
height: 100%;
margin: 0 auto;
.RechargeInfo1 {
height: 124rpx;
line-height: 124rpx;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
text-align: center;
}
.ContenInfo {
text-align: center;
// width: 383rpx;
height: 159rpx;
margin: 0 auto;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #010101;
view {
line-height: 75rpx;
}
}
.BtngGoup {
justify-content: space-between;
display: flex;
margin-top: 40rpx;
view {
width: 250rpx;
height: 88rpx;
border-radius: 8rpx;
text-align: center;
line-height: 88rpx;
}
view:nth-child(1) {
background: #ebebeb;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #1cc48b;
}
view:nth-child(2) {
background: #1cc48b;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
}
}
}
.closePhoneBox {
// width: 35rpx;
height: 35rpx;
position: relative;
right: -20rpx;
top: 20rpx;
text-align: right;
image {
width: 40rpx;
height: 40rpx;
position: relative;
}
}
.doBtnTx {
width: 506rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
color: #ffffff;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
bottom: 38rpx;
}
.PhoneNum,
.VerifyCode {
width: 506rpx;
height: 80rpx;
line-height: 60rpx;
background: #f7f6fb;
margin: 0 auto;
margin-top: 20rpx;
}
.VerifyCode {
display: flex;
justify-content: space-between;
}
.VerifyCode input {
width: 200rpx;
}
.CodeMsg {
color: #01bc73;
background: #f7f6fb;
font-size: 32rpx;
font-weight: 600;
line-height: 80rpx;
letter-spacing: 3rpx;
}
.placeholderInput {
color: #aaaaaa;
font-size: 42rpx;
font-weight: 500;
letter-spacing: 3rpx;
// padding-left: 50rpx;
height: 80rpx;
}
.OtherTitle {
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
padding-top: 60rpx;
}
.inputOtherM {
display: flex;
height: 100rpx;
margin-top: 40rpx;
}
.inputOtherM input {
border: none;
outline: none;
height: 50rpx;
padding-left: 16rpx;
font-size: 72rpx;
font-weight: 600;
}
.inputOtherM span:nth-child(1) {
width: 72rpx;
font-size: 80rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 100rpx;
}
.OtherLine {
width: 631rpx;
height: 1rpx;
background-color: #cccccc;
margin-top: 19rpx;
}
.depositbox {
margin-top: 31rpx;
height: 30rpx;
line-height: 30rpx;
}
.depositImg {
width: 24rpx;
height: 24rpx;
vertical-align: middle;
margin-right: 8rpx;
position: relative;
top: -2rpx;
}
.Recharge_ {
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 40rpx;
margin-top: 40rpx;
}
.Recharge_ span:nth-child(2) {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fa6400;
}
.placeholderinputOtherM {
height: 50rpx;
// font-family: PingFangSC-Semibold, PingFang SC;
// font-weight: 600;
// color: #010101;
line-height: 50rpx;
width: 323rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
}
// 异常处理
.RechargeException {
padding-top: 20rpx;
}
.weui-label {
// width: 118rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3d3d3d;
line-height: 42rpx;
font-weight: bold;
margin-left: 30rpx;
}
.tiptext {
height: 1.06rem;
font-size: 0.75rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #03bc73;
line-height: 1.06rem;
margin-bottom: 0.625rem;
text-align: center;
}
.bottomDetail {
width: 628rpx;
height: 88rpx;
color: white;
// position: fixed;
// left: 0;
// right: 0;
margin: 0 auto;
background-color: #03bc73;
text-align: center;
line-height: 88rpx;
margin-top: 84rpx;
}
.RechargeException input::placeholder {
color: #a1a4a8;
}
.RechargeException .weui-cell {
height: 4rem;
padding: 0 !important;
}
.idCardPhoto1,
.idCardPhoto2 {
width: 388rpx;
height: 224rpx;
margin: 0 auto;
margin-top: 20rpx;
}
.idCardPhoto1 image,
.idCardPhoto2 image {
width: 100%;
height: 100%;
position: relative;
}
.weui-toptips_success {
background-color: #03bc73 !important;
}
.positionCam {
height: 32rpx;
font-size: 22rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #6d7278;
line-height: 32rpx;
text-align: center;
position: relative;
top: -29px;
}
.BgCoverBox {
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 10;
background: #000000;
opacity: 0.5;
}
.hideListCover {
max-height: 50vh;
overflow-y: auto;
padding: 0;
}
.bottomDiv {
font-weight: bold;
height: 50px;
line-height: 50px;
border-bottom: 1px solid #e6e6e6;
}
html,
body,
page {
width: 750rpx;
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.userInfoBox {
display: flex;
flex-direction: column;
width: calc(100% - 64rpx);
height: 150rpx;
margin: 0 32rpx;
margin-top: 30rpx;
background: linear-gradient(270deg, #f4f4f4 0%, #ebebeb 100%);
border-radius: 16px;
.firstLine {
display: flex;
flex-direction: row;
width: calc(100% - 68rpx);
height: 56rpx;
line-height: 56rpx;
margin: 0 34rpx;
margin-top: 28rpx;
overflow: hidden;
view {
white-space: nowrap;
}
.avatar {
width: 56rpx;
height: 56rpx;
uni-image {
width: 56rpx;
height: 56rpx;
}
}
.name {
margin-left: 17rpx;
font-size: 36rpx;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
view:last-child {
margin-left: 10rpx;
align-self: center;
align-items: center;
padding: 0 8rpx;
height: 40rpx;
line-height: 40rpx;
background: rgba(0, 0, 0, 0.08);
border-radius: 4rpx;
font-size: 26rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.5);
}
}
.secondLine {
display: flex;
width: calc(100% - 62rpx);
margin: 0 31rpx;
margin-top: 8rpx;
height: 37rpx;
line-height: 37rpx;
font-size: 26rpx;
color: rgba(0, 0, 0, 0.45);
}
}
.contentWrapper {
width: 100%;
display: flex;
flex-direction: column;
}
.balanceWrapper {
width: calc(100% - 144rpx);
margin: 0 32rpx;
margin-top: 24rpx;
height: 249rpx;
padding: 40rpx 40rpx 0;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/bankBg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
display: flex;
flex-direction: column;
.firstLine {
display: flex;
justify-content: space-between;
.left {
view:first-child {
height: 33rpx;
font-size: 24rpx;
font-weight: 600;
color: rgba(255, 255, 255, 0.85);
line-height: 33rpx;
}
view:last-child {
height: 84rpx;
font-size: 60rpx;
font-weight: 600;
color: #ffffff;
line-height: 84rpx;
}
}
.right {
width: 60rpx;
height: 60rpx;
align-self: flex-start;
.icon {
width: 60rpx;
height: 60rpx;
}
}
}
.lastLine {
display: flex;
width: 100%;
justify-content: space-between;
view:first-child {
height: 60rpx;
font-size: 40rpx;
font-weight: 600;
color: #ffffff;
line-height: 60rpx;
}
.right {
width: 140rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 30rpx;
font-weight: 600;
color: #04b871;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/cashBtn.png");
background-repeat: no-repeat;
background-size: cover;
text-align: center;
}
.btn {
width: 140rpx;
height: 60rpx;
}
}
}
.accountlist {
width: 100%;
height: 100%;
}
.showBindCardList {
width: 100%;
height: 100%;
.choiceBox {
text-align: center;
font-weight: bold;
height: 100rpx;
line-height: 100rpx;
padding: 0;
border-bottom: 1rpx solid #e6e6e6;
}
.cardsList {
width: 100%;
height: calc(100% - 260rpx);
overflow-y: scroll;
}
.ListItem {
border-bottom: 1rpx solid #e6e6e6;
font-size: 30rpx;
padding: 25rpx 0;
background: #fff;
position: relative;
text-align: center;
}
.changeCard {
margin: 0 auto;
margin-top: 40rpx;
height: 40rpx;
font-size: 28rpx;
font-weight: 400;
color: #04B871;
line-height: 40rpx;
text-align: center;
}
}
.SubmittedSuccessfully {
width: 400rpx !important;
height: 200rpx !important;
margin: 0 auto !important;
background: #000000;
opacity: 0.8;
border-radius: 8rpx;
}
.cardNum {
width: 574rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
padding-top: 36rpx;
font-size: 24rpx;
.cardNumleft {
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
.cardNumright {
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #ffffff;
}
}
.RechargeDetailed {
text-align: center;
// width: 118rpx;
height: 32rpx;
margin: 0 auto;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #36a8ff;
margin-top: 50rpx;
}
.contentBox {
width: 670rpx;
display: flex;
flex-direction: column;
margin: 0 auto;
}
.contentDiv {
height: 100%;
// margin-top: 36rpx;
border-radius: 15rpx;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
top: 36rpx;
}
.HidenText {
width: 574rpx;
margin: 0 auto;
padding-top: 88rpx;
}
.HidenText,
.Balance {
padding-left: 46rpx;
padding-right: 40rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #ffffff;
}
.Balance {
width: 574rpx;
margin: 0 auto;
margin-top: 20rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #ffffff;
}
.Recharge {
width: 100%;
height: 40rpx;
margin-top: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.4);
line-height: 40rpx;
}
.headview {
display: flex;
justify-content: space-between;
// padding-left: 40rpx;
// padding-right: 40rpx;
padding-top: 36rpx;
width: 574rpx;
margin: 0 auto;
}
.headview .schoolname {
width: 252rpx;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 50rpx;
}
.headview .IconCls {
width: 170rpx;
height: 48rpx;
background: #20946d;
border-radius: 25rpx;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: 48rpx;
text-align: center;
}
.moneyWrapper {
margin-top: 10rpx;
width: 100%;
display: flex;
flex-wrap: wrap;
.moneyItem {
width: 210rpx;
height: 120rpx;
background: #f8f8f8;
border-radius: 12rpx;
display: flex;
justify-content: center;
margin-right: 14rpx;
font-family: PingFangSC-Medium, PingFang SC;
margin-bottom: 24rpx;
view {
align-self: center;
color: #333333;
}
view:first-child {
font-size: 40rpx;
font-weight: 500;
}
view:last-child {
font-size: 30rpx;
}
}
.moneyItem:nth-child(3n) {
margin-right: 0;
}
.active {
border: 3rpx solid #04b871;
view {
color: #04b871;
}
}
.other {
width: 444rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
background: #f8f8f8;
border-radius: 12rpx;
/deep/.uni-input-wrapper {
position: absolute;
width: 444rpx;
height: 120rpx;
font-size: 40rpx;
font-weight: 500;
color: #333333;
}
/deep/.uni-input-input {
height: 120rpx;
line-height: 120rpx;
}
}
}
.MoneyBox {
flex-wrap: wrap;
height: auto;
color: #888888;
width: 686rpx;
margin: 0 auto;
overflow: hidden;
}
.choiceClass {
background: rgba(39, 266, 148, 0.1) !important;
color: #28d79c;
}
.MoneyBox view {
width: 220rpx;
height: 120rpx;
background: #ffffff;
border-radius: 8rpx;
border: 1rpx solid #eeeeee;
margin-top: 16rpx;
text-align: center;
position: relative;
box-shadow: 0px 9rpx 23rpx 0rpx rgba(25, 26, 88, 0.07);
margin-right: 2px;
float: left;
}
.depotMoney .value {
font-size: 45rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 120rpx;
text-align: center;
}
.depotMoney .tips {
// width: 79rpx;
// height: 33rpx;
// background: linear-gradient(180deg, #FA6400 0%, #FD9D00 100%);
// border-radius: 4rpx;
// font-size: 18rpx;
// font-weight: 500;
// padding: 4rpx;
// text-align: center;
// float: right;
// position: absolute;
// right: 0rpx;
// line-height: 33rpx;
}
.OtherMoney {
display: flex;
justify-content: flex-start;
// color: #999999;
// font-size: 28rpx;
// font-family: PingFangSC-Regular, PingFang SC;
// font-weight: 400;
// color: #999999;
// line-height: 40rpx;
width: 686rpx;
height: 100rpx;
background: #f7f6fb;
border-radius: 10rpx;
margin: 0 auto;
line-height: 100rpx;
margin-top: 32rpx;
span {
display: inline-block;
font-size: 40rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
padding-left: 26rpx;
}
input {
height: 100%;
}
}
.OtherMoney view:nth-child(2) {
// width: 30rpx;
// height: 30rpx;
// background: #F0F0F0;
// border-radius: 50%;
// text-align: center;
// line-height: 30rpx;
// margin-top: 7rpx;
// margin-left: 5rpx;
}
.paytype {
display: flex;
margin-top: 39rpx;
width: 100%;
height: 40rpx;
justify-content: space-between;
font-size: 28rpx;
.left {
font-weight: 500;
color: rgba(0, 0, 0, 0.4);
}
.right {
color: rgba(0, 0, 0, 0.85);
.van-icon {
font-size: 28rpx;
color: #161616;
}
}
}
.payType {
height: 98rpx;
line-height: 98rpx;
display: flex;
justify-content: space-between;
}
.payType view:nth-child(1) {
// width: 120rpx;
height: 42rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
line-height: 98rpx;
}
.payType view::nth-child(2) {
width: 225rpx;
height: 45rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
line-height: 45rpx;
}
.arrow {
transform: rotate(-45deg);
top: -3rpx;
border: solid #999999;
border-width: 0 1rpx 1rpx 0;
display: inline-block;
padding: 8rpx;
position: relative;
}
@media (min-height: 1040px) {
.bottomdiv {
position: fixed;
left: 0;
right: 0;
bottom: 30rpx;
}
}
.DepositID {
width: 100%;
height: 90rpx;
background: #04b871;
border-radius: 45px;
line-height: 90rpx;
text-align: center;
font-size: 34rpx;
font-weight: 500;
color: #ffffff;
margin: 0 auto;
margin-top: 29rpx;
text-align: center;
}
.DepositID span {
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 92rpx;
}
.service {
margin-top: 118rpx;
width: 100%;
height: 40rpx;
font-size: 28rpx;
font-weight: 400;
color: rgba(0, 0, 0, 0.5);
line-height: 40rpx;
text-align: center;
}
.switchbankCard {
text-align: center;
/* width: 205px; */
// height: 28rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #268ef8;
margin-top: 23rpx;
}
.RechargeConfirmationBox {
position: fixed;
left: 0;
right: 0;
top: 400rpx;
width: 618rpx;
height: 478rpx;
background: #ffffff;
border-radius: 8rpx;
margin: 0 auto;
.RechargeInfo {
width: 520rpx;
height: 100%;
margin: 0 auto;
.RechargeInfo1 {
height: 124rpx;
line-height: 124rpx;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
text-align: center;
}
.ContenInfo {
text-align: center;
// width: 383rpx;
height: 159rpx;
margin: 0 auto;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #010101;
view {
line-height: 75rpx;
}
}
.BtngGoup {
justify-content: space-between;
display: flex;
margin-top: 40rpx;
view {
width: 250rpx;
height: 88rpx;
border-radius: 8rpx;
text-align: center;
line-height: 88rpx;
}
view:nth-child(1) {
background: #ebebeb;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #1cc48b;
}
view:nth-child(2) {
background: #1cc48b;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
}
}
}
.closePhoneBox {
// width: 35rpx;
height: 35rpx;
position: relative;
right: -20rpx;
top: 20rpx;
text-align: right;
image {
width: 40rpx;
height: 40rpx;
position: relative;
}
}
.doBtnTx {
width: 506rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
color: #ffffff;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
bottom: 38rpx;
}
.PhoneNum,
.VerifyCode {
width: 506rpx;
height: 80rpx;
line-height: 60rpx;
background: #f7f6fb;
margin: 0 auto;
margin-top: 20rpx;
}
.VerifyCode {
display: flex;
justify-content: space-between;
}
.VerifyCode input {
width: 200rpx;
}
.CodeMsg {
color: #01bc73;
background: #f7f6fb;
font-size: 32rpx;
font-weight: 600;
line-height: 80rpx;
letter-spacing: 3rpx;
}
.placeholderInput {
color: #aaaaaa;
font-size: 42rpx;
font-weight: 500;
letter-spacing: 3rpx;
// padding-left: 50rpx;
height: 80rpx;
}
.OtherTitle {
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
padding-top: 60rpx;
}
.inputOtherM {
display: flex;
height: 100rpx;
margin-top: 40rpx;
}
.inputOtherM input {
border: none;
outline: none;
height: 50rpx;
padding-left: 16rpx;
font-size: 72rpx;
font-weight: 600;
}
.inputOtherM span:nth-child(1) {
width: 72rpx;
font-size: 80rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 100rpx;
}
.OtherLine {
width: 631rpx;
height: 1rpx;
background-color: #cccccc;
margin-top: 19rpx;
}
.depositbox {
margin-top: 40rpx;
height: 30rpx;
line-height: 30rpx;
}
.depositImg {
width: 24rpx;
height: 24rpx;
vertical-align: middle;
margin-right: 8rpx;
position: relative;
top: -2rpx;
}
.Recharge_ {
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 40rpx;
margin-top: 40rpx;
}
.Recharge_ span:nth-child(2) {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fa6400;
}
.placeholderinputOtherM {
height: 120rpx;
line-height: 120rpx;
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.25);
}
/deep/uni-input {
line-height: 120rpx;
}
// 异常处理
.RechargeException {
padding-top: 20rpx;
}
.weui-label {
// width: 118rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3d3d3d;
line-height: 42rpx;
font-weight: bold;
margin-left: 30rpx;
}
.tiptext {
height: 1.06rem;
font-size: 0.75rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #03bc73;
line-height: 1.06rem;
margin-bottom: 0.625rem;
text-align: center;
}
.bottomDetail {
width: 628rpx;
height: 88rpx;
color: white;
// position: fixed;
// left: 0;
// right: 0;
margin: 0 auto;
background-color: #03bc73;
text-align: center;
line-height: 88rpx;
margin-top: 84rpx;
}
.RechargeException input::placeholder {
color: #a1a4a8;
}
.RechargeException .weui-cell {
height: 4rem;
padding: 0 !important;
}
.idCardPhoto1,
.idCardPhoto2 {
width: 388rpx;
height: 224rpx;
margin: 0 auto;
margin-top: 20rpx;
}
.idCardPhoto1 image,
.idCardPhoto2 image {
width: 100%;
height: 100%;
position: relative;
}
.weui-toptips_success {
background-color: #03bc73 !important;
}
.positionCam {
height: 32rpx;
font-size: 22rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #6d7278;
line-height: 32rpx;
text-align: center;
position: relative;
top: -29px;
}
.BgCoverBox {
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 10;
background: #000000;
opacity: 0.5;
}
.hideListCover {
max-height: 50vh;
overflow-y: auto;
padding: 0;
}
.bottomDiv {
font-weight: bold;
height: 50px;
line-height: 50px;
border-bottom: 1px solid #e6e6e6;
}
</style>
<template>
<view class="container">
<view class="contentBox" v-if="!depotMoneyother">
<view class="userInfoBox">
<view class="firstLine">
<view class="avatar">
<image :src="ImgUrl + 'user/personAva.png'" alt=""></image>
</view>
<view class="name">张三</view>
<view v-if="PersonalInfo.usertype=='1'">高一(63班)</view>
<view v-else>教职工</view>
</view>
<view class="secondLine">{{PersonalInfo.schoolname}}</view>
</view>
<view class="contentWrapper" v-if="!depotMoneyother">
<view class="balanceWrapper">
<view class="firstLine">
<view class="left">
<view>可用余额(元) </view>
<view>{{ cardBalanceTx }}</view>
</view>
<view class="right">
<van-popover v-model="showPopover" trigger="click" :actions="actions" placement="bottom-end"
@select="onSelect">
<template #reference>
<image class="icon" :src="ImgUrl + 'user/more.png'" alt=""></image>
</template>
</van-popover>
</view>
</view>
<view class="lastLine">
<view>**** **** **** 5947</view>
<view class="right" @click="ToWalletTx">
<!-- <image class="btn" :src="ImgUrl + 'user/cashBtn.png'" alt=""></image> -->
提现
</view>
</view>
</view>
</view>
<view class="contentBox" style="display: none;" v-if="!depotMoneyother">
<!-- <image mode='widthFix' src="https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png"></image> -->
<view class="contentDiv">
<view class="headview">
......@@ -28,7 +64,21 @@
</view>
</view>
<!-- -->
<view class="MoneyBox">
<view class="moneyWrapper">
<view class="moneyItem" @click="depotMoney(item.value, index)"
v-bind:class="MoneyIndex == index ? 'active' : ''" :data-money="item.value || 0"
v-for="(item, index) in MoneyList" :key="index">
<view> {{ item.value }}</view>
<view> {{ item.lable }}</view>
</view>
<view class="other">
<input @focus="openKeyBoard('number')" v-model="inputOtherM" @input="inputControl"
@blur="ReturnToTop" placeholder="其他金额,最低3元" placeholder-class="placeholderinputOtherM"
type="text" maxlength="6" />
</view>
</view>
<!-- 充值其它金额 -->
<view class="MoneyBox" style="display: none;">
<view class="depotMoney" @click="depotMoney(item.value,index)"
v-bind:class="(Money!=''&&MoneyIndex==index)?'choiceClass':''" :data-money="item.value"
v-for="(item,index) in MoneyList" :key="index">
......@@ -36,22 +86,40 @@
{{item.value}}
</span>
<span style="font-size: 28rpx;font-weight: 600;margin-left: 7rpx;">{{item.lable}}</span>
<span class="tips" v-show="item.tips">
<!-- <span class="tips" v-show="item.tips">
{{item.tips}}
</span>
</span> -->
</view>
</view>
<!-- 充值限额提示 -->
<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">{{ RechargeMax }}</span></span></span>
</view>
<!-- -->
<view class="OtherMoney" @click="OtherMoney">
<view class="OtherMoney" style="display: none;" @click="OtherMoney">
<view>其他充值金额</view>
<view>></span></view>
</view>
<!-- 支付方式 -->
<view class="payType" @click="queryBindCardList">
<view class="paytype">
<view class="left">付款账户 </view>
<view class="right" @click="queryBindCardList">
招商银行(5947)
<van-icon name="arrow" />
</view>
</view>
<view class="payType" style="display: none;" @click="queryBindCardList">
<view>付款方式</view>
<view>招商银行(5947) <span class="arrow"></span></view>
</view>
<view class="" style="height: 1rpx;background-color: #DFDFDF;"></view>
<!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> -->
<!-- -->
<view class="switchbankCard" @click="BackToMini('AssignAddCard')">我要换银行卡支付 <span class="arrow"
style="transform: rotate(45deg);left: 15rpx;top: -8rpx;"></span></view>
......@@ -61,7 +129,7 @@
</view>
</view>
<!-- 其他充值金额 -->
<view class="contentBox" v-if="depotMoneyother">
<view class="contentBox" style="display: none;" v-if="depotMoneyother">
<view class="OtherTitle">充值金额</view>
<view class="inputOtherM">
<span></span>
......@@ -168,728 +236,748 @@
</template>
<script>
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,
};
// 20210422 充值账户异常资料补充参数
var acctErrorUpdateParms = {
backSideImgId: "", //反面身份证图片Id
frontSideImgId: "", //正面身份证图片Id
homeAddress: "", //家庭住址
occupation: "", //职业代码
StreetInformation: "", //街道
businessNo: "",
};
// /wefile/wefileId
// 获取上传影像的Token接口
let wefileId = {};
// bizCode: "000000"
// bizMsg: "获取上传影像token成功"
// businessNo: "OB89d5ed802cRA202104226389071452"
// expiredTime: 1619072725503
// project: "BOBS-OBP"
// uuid: "8238f256d8f54209a0e9a2a3b25e7393"
// wefileToken: "QplB0tfvjtzOU+tWgKI2+L+4B9HE8kbpJVREUTwXZCsVqXcUwyDxHAbTU3bW8ziGb4hKAaWiLQXAyZUbYRB9hBKhSt1VVvoFl5qOCR4GT+X1KpcQgBlhKYi/NYPkmsjeZO/qn9YXGDp/1sGmxazv6T05y8EbU9HXreRhF/jh8G1HtUCwprFoaulGFShvV819EUBdHifDF5IjpPekLtgzIm8C/kYYX8xproKvxV4maRji5p1Krkyv/U1K3C18/TyjHwPpC4KlOEqA6QpFujR8yZ42qvLZqfqgUkRFZ4WC27/nN3+do9VNpNbK4MAMSLTRaxdGmKe2wStKbZ5OQ+1WFA=="
// wefileUrl: "https://bfiles-stg.pingan.com.cn/brcp/secfile/sec_wefiles_udmp_upload.do"
export default {
components: {
keyboardPackage,
},
name: "assignDeposit",
data() {
return {
inputOtherM: "",
RechargeException: false,
depotMoneyother: false, //其他充值
Money: "", //选择金额
MoneyIndex: "",
RechargeMax: "2000", //最大充值限制
ReflectMoney: "", //提现金额
VerifyCode: "", //验证码
cardBalanceTx: "0", //余额
CodeMsg: "获取验证码",
type: "number",
PersonalInfo: {
schoolname: "微微学测试",
name: "李智书",
usertype: "1",
},
ImgUrl: this.$ImgUrl,
MoneyList: Array(6)
.fill(1)
.map((v, index) => {
return {
lable: "",
value: 50 * (index + 1),
tips: index == 1 ? "推荐充值" : null,
};
}),
numberList: [],
tempFiles1: "../../static/img/idCardBg1.png", //上传身份证临时选择文件
tempFiles2: "../../static/img/idCardBg0.png",
};
},
created: function () {},
mounted: function () {
let this_ = this;
this.$nextTick(function () {
// $(".RechargeException").siblings().hide()
// $(".RechargeException").show()
// 家庭住址
$("#homeAddress").on("click", function () {
weui.picker(cityData, {
defaultValue: [110000, 110000, 110101],
depth: 3,
onChange: function (result) {
console.log(result);
},
onConfirm: function (result) {
console.log(result);
console.log(result);
acctErrorUpdateParms.homeAddress =
result[0].label + "/" + result[1].label + "/" + result[2].label;
$("#homeAddress")[0].innerText =
result[0].label + "/" + result[1].label + "/" + result[2].label;
$("#homeAddress").css("color", "#000");
},
title: "家庭地址",
});
});
// 选择职业
$("#showPicker").on("click", function () {
// 获取职业信息
this_
.getOccupationList()
.then((OccupationList) => {
let data = OccupationList.map((v) => {
return {
label: v.comment,
value: v.code,
};
});
weui.picker(data, {
onChange: function (result) {
console.log(result);
},
onConfirm: function (result) {
console.log(result[0].value);
acctErrorUpdateParms.occupation = result[0].value;
$("#showPicker")[0].innerText = result[0].label;
$("#showPicker").css("color", "#000");
},
title: "职业信息选择",
});
})
.catch((err) => {
weui.topTips("获取职业信息列表失败");
});
});
// 初始化
userID = this_.getQueryParams("userID");
sessionID = this_.getQueryParams("seesionID");
fromType = this_.getQueryParams("fromType");
let windowHeight = window.innerHeight;
if (this_.getQueryParams("tabbar")) {
//usermain打开加返回按钮
$("#ReturnBox").css("display", "block");
$(".bottom2").css(
"margin-top",
(windowHeight - 370 < 0 ? 30 : windowHeight - 370) + "px"
);
$(".bottom1").css(
"margin-top",
(windowHeight - 570 < 0 ? 30 : windowHeight - 570) + "px"
);
} else {
$(".bottom2").css(
"margin-top",
(windowHeight - 320 < 0 ? 30 : windowHeight - 320) + "px"
);
$(".bottom1").css(
"margin-top",
(windowHeight - 590 < 0 ? 30 : windowHeight - 590) + "px"
);
}
bankInfo.sessionid = sessionID;
this_.QueryUserInfo();
$("#AssginBox").css("display", "block");
if (fromType == 0) {
// $('.TitleHeader').html('电子账户充值');
} else {
this_.ToWalletTx();
}
setTimeout(function () {
this_.getWefileId();
}, 500);
});
},
methods: {
// 身份证上传
async idCardUpload(type) {
let this_ = this;
uni.chooseImage({
count: 6, //默认9
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"], //从相册选择
success: function (res) {
this_["tempFiles" + type] = res.tempFilePaths[0];
this_.uploaderInput(res.tempFiles, type);
},
});
},
// 验证码弹出框开启
open() {
this.$refs.popup.open("top");
},
// 验证码弹出框关闭
close() {
this.$refs.popup.close();
},
//键盘谈起
openKeyBoard(key) {
this.type = key;
this.$refs[key].open();
},
onInput(val) {
this.numberList.push(val);
this.inputOtherM = this.inputOtherM + val;
console.log(val);
},
onDelete() {
this.numberList.pop();
this.inputOtherM = this.numberList.join("");
},
onConfirm() {
// 充值提现输入验证码确认框
this.open();
},
//选择输入其他金额
OtherMoney() {
this.depotMoneyother = true;
},
// 快捷选择金额
async depotMoney(value, MoneyIndex) {
console.log(value);
this.Money = parseInt(value);
this.MoneyIndex = MoneyIndex;
},
//定时器
IntervalFun() {
if (msCount == 1) {
window.clearInterval(MyTimer); //停止计时器
$(".CodeMsg").css("color", "#01BC73");
this.CodeMsg = "获取验证码";
msCount = 60;
} else {
msCount--;
$(".CodeMsg").css("color", "gray");
this.CodeMsg = msCount + "s后获取";
}
},
//按钮操作
HideHTML(dom, type) {
if (type == 0) {
$("." + dom).css("display", "none");
} else {
$("." + dom).css("display", "block");
}
},
//切换到提现
ToWalletTx() {
$("#DepositBox").css("display", "none");
$("#TxWalletBox").css("display", "block");
// $('.TitleHeader').html('电子账户提现');
$(".doBtnTx").html("提现");
opeType = 1;
},
//全部提现
TxAllFun() {
this.ReflectMoney = this.cardBalanceTx * 1;
// $('.TxClsTx').val($('.cardBalanceTx')[0].textContent * 1);
},
//隐藏验证码弹框
hidePhoneBox() {
$(".PhoneConfirmBox").css("display", "none");
// $('.VerifyCode').val('');
this.VerifyCode = "";
orderSerialNo = "";
businessNo = "";
otpOrderNo = "";
},
//返回小程序 跳转指定页面
BackToMini(page) {
if (page == "UserMain" || page == "personalCenter") {
jWeixin.miniProgram.switchTab({
url: `/pages/${page}/main`,
});
} else {
jWeixin.miniProgram.redirectTo({
url: `/pages/${page}/main`,
});
}
},
// 输入限制
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 > this.RechargeMax ? this.RechargeMax : obj.value;
this.Money = obj.value + "";
this.ReflectMoney = obj.value + "";
if (obj.value == "" || obj.value * 1 < 3) {
$(".DepositID").addClass("DisaBledBtn");
} else {
$(".DepositID").removeClass("DisaBledBtn");
}
},
clearPoint() {
// 若最后一位为小数点则去掉
let str = this.inputOtherM + "";
if (str.lastIndexOf(".") == str.length - 1) {
this.inputOtherM = str.substring(0, str.length - 1);
}
},
//input键盘弹起不会弹
ReturnToTop() {
document.scrollingElement.scrollTo(0, this.scrollTop);
},
//提现结果查询
transferResults() {
let this_ = this;
times++;
let loading = weui.loading("请稍后");
let params = {
accountNo: bankInfo.acctNoArray,
businessNo: businessNo,
orderSerialNo: orderSerialNo, //提现指令号
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/transfer/query",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function (res7) {
if (res7.code == "10000") {
if (res7.results.status == 0 || res7.results.status == 1) {
//status 状态 0:失败;1:成功;2:处理中 返回处理中,需要调用“提现(提现)结果查询”接口查结果
loading.hide();
if (res7.results.status == 0) {
weui.topTips(res7.results.bizMsg);
} else {
weui.toast("提现成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
if (times == 3) {
loading.hide();
weui.topTips("当前提现人数过多,请至我的账户中查看余额");
setTimeout(() => {
this_.BackToMini("UserMain");
}, 1500);
} else {
setTimeout((res) => {
this_.transferResults();
}, 2000);
}
}
} else {
loading.hide();
weui.topTips(res7.message);
}
},
error: function (err) {
loading.hide();
},
});
},
//充值结果查询
depositResults() {
let this_ = this;
times++;
let loading = weui.loading("请稍后");
let params = {
businessNo: businessNo,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/recharge/query",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function (res8) {
if (res8.code == "10000") {
if (
res8.results.orderStatus == 3 ||
res8.results.orderStatus == 4
) {
//orderStatus 0:初始值,1:已提交,2:未知,3:失败,4:成功,5:成功未打款
loading.hide();
if (res8.results.orderStatus == 3) {
weui.topTips(res8.results.errMsg);
} else {
weui.toast("充值成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
if (times == 3) {
loading.hide();
weui.topTips("当前充值人数过多,请至我的账户中查看余额");
setTimeout(() => {
this_.BackToMini("UserMain");
}, 1500);
} else {
setTimeout((res) => {
this_.depositResults();
}, 2000);
}
}
} else {
loading.hide();
weui.topTips(res8.message);
}
},
error: function (err) {
loading.hide();
},
});
},
//充值/提现方法
DoNextStep() {
let this_ = this;
console.log("请填写验证码");
if (this_.VerifyCode == "") {
weui.topTips("请填写验证码");
return;
}
if (limitClick) {
return;
} else {
limitClick = true;
setTimeout(() => {
limitClick = false;
}, 3000);
}
let loading = weui.loading("请稍后");
times = 0;
if (opeType == 0) {
//充值
let params = {
businessNo: businessNo,
otpOrderNo: otpOrderNo,
fromAccNo: payCardNumber, //付款账户
otpValue: this.VerifyCode, //验证码
transAmt: this.inputOtherM * 1, //交易金额
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/recharge",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function (res5) {
if (res5.code == "10000") {
if (res5.errCode && res5.errCode == "TI009") {
loading.hide();
weui.topTips(res5.results.errMsg);
setTimeout(function () {
$(".RechargeException").siblings().hide();
$(".RechargeException").show();
});
return;
}
if (
res5.results.orderStatus == 3 ||
res5.results.orderStatus == 4
) {
//orderStatus 0:初始值,1:已提交,2:未知,3:失败,4:成功,5:成功未打款
if (res5.results.orderStatus == 3) {
loading.hide();
weui.topTips(res5.results.errMsg);
} else {
loading.hide();
weui.toast("充值成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
setTimeout(() => {
// loading.hide();
this_.depositResults();
}, 2000);
}
} else {
loading.hide();
weui.topTips(res5.message);
}
},
error: function (err) {
loading.hide();
},
});
} else if (opeType == 1) {
//提现
let params = {
accountName: bankInfo.trueName,
amount: $(".TxClsTx")[0].value * 1,
businessNo: businessNo,
fromAccountName: bankInfo.trueName,
fromAccountNo: bankInfo.acctNoArray,
otpOrderNo: otpOrderNo,
otpValue: $(".VerifyCode")[0].value, //验证码
toAccountNo: payCardNumber,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/transfer/withdrawal",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function (res6) {
if (res6.code == "10000") {
orderSerialNo = res6.results.orderSerialNo;
if (res6.results.status == 1 || res6.results.status == 0) {
//状态 0:失败;1:成功;2:处理中 返回处理中,需要调用“提现(转账)结果查询”接口查结果
if (res6.results.status == 0) {
loading.hide();
weui.topTips(res6.results.bizMsg);
} else {
loading.hide();
weui.toast("提现成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
setTimeout(() => {
// loading.hide();
transferResults();
}, 2000);
}
} else {
loading.hide();
weui.topTips(res6.message);
}
},
error: function (err) {
loading.hide();
},
});
}
},
//充值/提现判断
toDeposit(type) {
//type 0充值 1提现
let this_ = this;
businessNo = "";
otpOrderNo = "";
opeType = type;
if (type == 0) {
if (this.Money * 1 < 3) {
weui.topTips("充值金额必须大于3元");
return;
}
if (this.Money * 1 > this.RechargeMax * 1) {
weui.topTips(`充值金额不能大于${this.RechargeMax * 1}元`);
return;
}
} else {
if ($(".TxClsTx")[0].value * 1 < 0.01) {
weui.topTips("提现金额须大于等于0.01元");
return;
}
if ($(".TxClsTx")[0].value * 1 > this.RechargeMax * 1) {
weui.topTips(`提现金额不可大于账户余额`);
return;
}
}
this.open();
},
//发送验证码
SendMsg() {
let this_ = this;
if (this_.CodeMsg != "获取验证码") return false;
let loading = weui.loading("发送中");
if (opeType == 0) {
//充值
let params = {
fromAccNo: payCardNumber, //付款账户,
transAmt: this.Money * 1, //交易金额
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/otp/send/recharge",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function (res5) {
loading.hide();
if (res5.code == "10000") {
otpOrderNo = res5.results.otpOrderNo;
businessNo = res5.results.businessNo;
weui.toast("验证码已发送,请注意查收!", 1000);
this_.IntervalFun();
MyTimer = window.setInterval(IntervalFun, 1000);
} else {
weui.topTips(res5.message);
}
},
error: function (err) {
loading.hide();
},
});
} else if (opeType == 1) {
//提现
let params = {
accountNo: bankInfo.acctNoArray, //银行卡号
mobileNo: mobileNo, //手机号
"transferAccountBizKeyVO.accountName": bankInfo.trueName, //收款方户名
"transferAccountBizKeyVO.amount": $(".TxClsTx")[0].value * 1, //提现金额
"transferAccountBizKeyVO.fromAccountName": bankInfo.trueName, //转出户名
"transferAccountBizKeyVO.fromAccountNo": bankInfo.acctNoArray, //转出卡号(互联网账户卡号)
"transferAccountBizKeyVO.toAccountNo": payCardNumber, //收款方卡号(绑定卡卡号)
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/otp/send/transfer/account",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function (res5) {
loading.hide();
if (res5.code == "10000") {
otpOrderNo = res5.results.otpOrderNo;
businessNo = res5.results.businessNo;
weui.toast("验证码已发送,请注意查收!", 1000);
this_.IntervalFun();
MyTimer = window.setInterval(this_.IntervalFun, 1000);
} else {
weui.topTips(res5.message);
}
},
error: function (err) {
loading.hide(res5.message);
},
});
}
},
//换绑卡
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('${
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,
};
// 20210422 充值账户异常资料补充参数
var acctErrorUpdateParms = {
backSideImgId: "", //反面身份证图片Id
frontSideImgId: "", //正面身份证图片Id
homeAddress: "", //家庭住址
occupation: "", //职业代码
StreetInformation: "", //街道
businessNo: "",
};
// /wefile/wefileId
// 获取上传影像的Token接口
let wefileId = {};
// bizCode: "000000"
// bizMsg: "获取上传影像token成功"
// businessNo: "OB89d5ed802cRA202104226389071452"
// expiredTime: 1619072725503
// project: "BOBS-OBP"
// uuid: "8238f256d8f54209a0e9a2a3b25e7393"
// wefileToken: "QplB0tfvjtzOU+tWgKI2+L+4B9HE8kbpJVREUTwXZCsVqXcUwyDxHAbTU3bW8ziGb4hKAaWiLQXAyZUbYRB9hBKhSt1VVvoFl5qOCR4GT+X1KpcQgBlhKYi/NYPkmsjeZO/qn9YXGDp/1sGmxazv6T05y8EbU9HXreRhF/jh8G1HtUCwprFoaulGFShvV819EUBdHifDF5IjpPekLtgzIm8C/kYYX8xproKvxV4maRji5p1Krkyv/U1K3C18/TyjHwPpC4KlOEqA6QpFujR8yZ42qvLZqfqgUkRFZ4WC27/nN3+do9VNpNbK4MAMSLTRaxdGmKe2wStKbZ5OQ+1WFA=="
// wefileUrl: "https://bfiles-stg.pingan.com.cn/brcp/secfile/sec_wefiles_udmp_upload.do"
export default {
components: {
keyboardPackage,
},
name: "assignDeposit",
data() {
return {
showPopover: false,
// 通过 actions 属性来定义菜单选项
actions: [{
text: "复制卡号"
}, {
text: "账户明细"
}, {
text: "常见问题"
}],
inputOtherM: "",
RechargeException: false,
depotMoneyother: false, //其他充值
Money: "", //选择金额
MoneyIndex: "",
RechargeMax: "2000", //最大充值限制
ReflectMoney: "", //提现金额
VerifyCode: "", //验证码
cardBalanceTx: "0", //余额
CodeMsg: "获取验证码",
type: "number",
PersonalInfo: {
schoolname: "微微学测试",
name: "李智书",
usertype: "1",
},
ImgUrl: this.$ImgUrl,
MoneyList: Array(6)
.fill(1)
.map((v, index) => {
return {
lable: "",
value: 50 * (index + 1),
tips: index == 1 ? "推荐充值" : null,
};
}),
numberList: [],
tempFiles1: "../../static/img/idCardBg1.png", //上传身份证临时选择文件
tempFiles2: "../../static/img/idCardBg0.png",
};
},
created: function() {},
mounted: function() {
let this_ = this;
this.$nextTick(function() {
// $(".RechargeException").siblings().hide()
// $(".RechargeException").show()
// 家庭住址
$("#homeAddress").on("click", function() {
weui.picker(cityData, {
defaultValue: [110000, 110000, 110101],
depth: 3,
onChange: function(result) {
console.log(result);
},
onConfirm: function(result) {
console.log(result);
console.log(result);
acctErrorUpdateParms.homeAddress =
result[0].label + "/" + result[1].label + "/" + result[2]
.label;
$("#homeAddress")[0].innerText =
result[0].label + "/" + result[1].label + "/" + result[2]
.label;
$("#homeAddress").css("color", "#000");
},
title: "家庭地址",
});
});
// 选择职业
$("#showPicker").on("click", function() {
// 获取职业信息
this_
.getOccupationList()
.then((OccupationList) => {
let data = OccupationList.map((v) => {
return {
label: v.comment,
value: v.code,
};
});
weui.picker(data, {
onChange: function(result) {
console.log(result);
},
onConfirm: function(result) {
console.log(result[0].value);
acctErrorUpdateParms.occupation = result[0].value;
$("#showPicker")[0].innerText = result[0].label;
$("#showPicker").css("color", "#000");
},
title: "职业信息选择",
});
})
.catch((err) => {
weui.topTips("获取职业信息列表失败");
});
});
// 初始化
userID = this_.getQueryParams("userID");
sessionID = this_.getQueryParams("seesionID");
fromType = this_.getQueryParams("fromType");
let windowHeight = window.innerHeight;
if (this_.getQueryParams("tabbar")) {
//usermain打开加返回按钮
$("#ReturnBox").css("display", "block");
$(".bottom2").css(
"margin-top",
(windowHeight - 370 < 0 ? 30 : windowHeight - 370) + "px"
);
$(".bottom1").css(
"margin-top",
(windowHeight - 570 < 0 ? 30 : windowHeight - 570) + "px"
);
} else {
$(".bottom2").css(
"margin-top",
(windowHeight - 320 < 0 ? 30 : windowHeight - 320) + "px"
);
$(".bottom1").css(
"margin-top",
(windowHeight - 590 < 0 ? 30 : windowHeight - 590) + "px"
);
}
bankInfo.sessionid = sessionID;
this_.QueryUserInfo();
$("#AssginBox").css("display", "block");
if (fromType == 0) {
// $('.TitleHeader').html('电子账户充值');
} else {
this_.ToWalletTx();
}
setTimeout(function() {
this_.getWefileId();
}, 500);
});
},
methods: {
onSelect(action) {
if (action.text == "复制卡号") {
this.CopyCardNumber();
} else if (action.text == "账户明细") {
this.BackToMini('purchaseDetail');
} else if (action.text == "常见问题") {
uni.navigateTo({
url: `../../commonProblem/commonProblem`
})
}
},
// 身份证上传
async idCardUpload(type) {
let this_ = this;
uni.chooseImage({
count: 6, //默认9
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"], //从相册选择
success: function(res) {
this_["tempFiles" + type] = res.tempFilePaths[0];
this_.uploaderInput(res.tempFiles, type);
},
});
},
// 验证码弹出框开启
open() {
this.$refs.popup.open("top");
},
// 验证码弹出框关闭
close() {
this.$refs.popup.close();
},
//键盘谈起
openKeyBoard(key) {
this.type = key;
this.$refs[key].open();
},
onInput(val) {
this.numberList.push(val);
this.inputOtherM = this.inputOtherM + val;
console.log(val);
},
onDelete() {
this.numberList.pop();
this.inputOtherM = this.numberList.join("");
},
onConfirm() {
// 充值提现输入验证码确认框
this.open();
},
//选择输入其他金额
OtherMoney() {
this.depotMoneyother = true;
},
// 快捷选择金额
async depotMoney(value, MoneyIndex) {
console.log(value);
this.Money = parseInt(value);
this.MoneyIndex = MoneyIndex;
},
//定时器
IntervalFun() {
if (msCount == 1) {
window.clearInterval(MyTimer); //停止计时器
$(".CodeMsg").css("color", "#01BC73");
this.CodeMsg = "获取验证码";
msCount = 60;
} else {
msCount--;
$(".CodeMsg").css("color", "gray");
this.CodeMsg = msCount + "s后获取";
}
},
//按钮操作
HideHTML(dom, type) {
if (type == 0) {
$("." + dom).css("display", "none");
} else {
$("." + dom).css("display", "block");
}
},
//切换到提现
ToWalletTx() {
$("#DepositBox").css("display", "none");
$("#TxWalletBox").css("display", "block");
// $('.TitleHeader').html('电子账户提现');
$(".doBtnTx").html("提现");
opeType = 1;
},
//全部提现
TxAllFun() {
this.ReflectMoney = this.cardBalanceTx * 1;
// $('.TxClsTx').val($('.cardBalanceTx')[0].textContent * 1);
},
//隐藏验证码弹框
hidePhoneBox() {
$(".PhoneConfirmBox").css("display", "none");
// $('.VerifyCode').val('');
this.VerifyCode = "";
orderSerialNo = "";
businessNo = "";
otpOrderNo = "";
},
//返回小程序 跳转指定页面
BackToMini(page) {
if (page == "UserMain" || page == "personalCenter") {
jWeixin.miniProgram.switchTab({
url: `/pages/${page}/main`,
});
} else {
jWeixin.miniProgram.redirectTo({
url: `/pages/${page}/main`,
});
}
},
// 输入限制
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 > this.RechargeMax ? this.RechargeMax : obj.value;
this.Money = obj.value + "";
this.ReflectMoney = obj.value + "";
if (obj.value == "" || obj.value * 1 < 3) {
$(".DepositID").addClass("DisaBledBtn");
} else {
$(".DepositID").removeClass("DisaBledBtn");
}
},
clearPoint() {
// 若最后一位为小数点则去掉
let str = this.inputOtherM + "";
if (str.lastIndexOf(".") == str.length - 1) {
this.inputOtherM = str.substring(0, str.length - 1);
}
},
//input键盘弹起不会弹
ReturnToTop() {
document.scrollingElement.scrollTo(0, this.scrollTop);
},
//提现结果查询
transferResults() {
let this_ = this;
times++;
let loading = weui.loading("请稍后");
let params = {
accountNo: bankInfo.acctNoArray,
businessNo: businessNo,
orderSerialNo: orderSerialNo, //提现指令号
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/transfer/query",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function(res7) {
if (res7.code == "10000") {
if (res7.results.status == 0 || res7.results.status == 1) {
//status 状态 0:失败;1:成功;2:处理中 返回处理中,需要调用“提现(提现)结果查询”接口查结果
loading.hide();
if (res7.results.status == 0) {
weui.topTips(res7.results.bizMsg);
} else {
weui.toast("提现成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
if (times == 3) {
loading.hide();
weui.topTips("当前提现人数过多,请至我的账户中查看余额");
setTimeout(() => {
this_.BackToMini("UserMain");
}, 1500);
} else {
setTimeout((res) => {
this_.transferResults();
}, 2000);
}
}
} else {
loading.hide();
weui.topTips(res7.message);
}
},
error: function(err) {
loading.hide();
},
});
},
//充值结果查询
depositResults() {
let this_ = this;
times++;
let loading = weui.loading("请稍后");
let params = {
businessNo: businessNo,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/recharge/query",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function(res8) {
if (res8.code == "10000") {
if (
res8.results.orderStatus == 3 ||
res8.results.orderStatus == 4
) {
//orderStatus 0:初始值,1:已提交,2:未知,3:失败,4:成功,5:成功未打款
loading.hide();
if (res8.results.orderStatus == 3) {
weui.topTips(res8.results.errMsg);
} else {
weui.toast("充值成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
if (times == 3) {
loading.hide();
weui.topTips("当前充值人数过多,请至我的账户中查看余额");
setTimeout(() => {
this_.BackToMini("UserMain");
}, 1500);
} else {
setTimeout((res) => {
this_.depositResults();
}, 2000);
}
}
} else {
loading.hide();
weui.topTips(res8.message);
}
},
error: function(err) {
loading.hide();
},
});
},
//充值/提现方法
DoNextStep() {
let this_ = this;
console.log("请填写验证码");
if (this_.VerifyCode == "") {
weui.topTips("请填写验证码");
return;
}
if (limitClick) {
return;
} else {
limitClick = true;
setTimeout(() => {
limitClick = false;
}, 3000);
}
let loading = weui.loading("请稍后");
times = 0;
if (opeType == 0) {
//充值
let params = {
businessNo: businessNo,
otpOrderNo: otpOrderNo,
fromAccNo: payCardNumber, //付款账户
otpValue: this.VerifyCode, //验证码
transAmt: this.inputOtherM * 1, //交易金额
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/recharge",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function(res5) {
if (res5.code == "10000") {
if (res5.errCode && res5.errCode == "TI009") {
loading.hide();
weui.topTips(res5.results.errMsg);
setTimeout(function() {
$(".RechargeException").siblings().hide();
$(".RechargeException").show();
});
return;
}
if (
res5.results.orderStatus == 3 ||
res5.results.orderStatus == 4
) {
//orderStatus 0:初始值,1:已提交,2:未知,3:失败,4:成功,5:成功未打款
if (res5.results.orderStatus == 3) {
loading.hide();
weui.topTips(res5.results.errMsg);
} else {
loading.hide();
weui.toast("充值成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
setTimeout(() => {
// loading.hide();
this_.depositResults();
}, 2000);
}
} else {
loading.hide();
weui.topTips(res5.message);
}
},
error: function(err) {
loading.hide();
},
});
} else if (opeType == 1) {
//提现
let params = {
accountName: bankInfo.trueName,
amount: $(".TxClsTx")[0].value * 1,
businessNo: businessNo,
fromAccountName: bankInfo.trueName,
fromAccountNo: bankInfo.acctNoArray,
otpOrderNo: otpOrderNo,
otpValue: $(".VerifyCode")[0].value, //验证码
toAccountNo: payCardNumber,
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/transfer/withdrawal",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function(res6) {
if (res6.code == "10000") {
orderSerialNo = res6.results.orderSerialNo;
if (res6.results.status == 1 || res6.results.status == 0) {
//状态 0:失败;1:成功;2:处理中 返回处理中,需要调用“提现(转账)结果查询”接口查结果
if (res6.results.status == 0) {
loading.hide();
weui.topTips(res6.results.bizMsg);
} else {
loading.hide();
weui.toast("提现成功!", 1500);
}
setTimeout(() => {
location.reload();
}, 2000);
} else {
setTimeout(() => {
// loading.hide();
transferResults();
}, 2000);
}
} else {
loading.hide();
weui.topTips(res6.message);
}
},
error: function(err) {
loading.hide();
},
});
}
},
//充值/提现判断
toDeposit(type) {
//type 0充值 1提现
let this_ = this;
businessNo = "";
otpOrderNo = "";
opeType = type;
if (type == 0) {
if (this.Money * 1 < 3) {
weui.topTips("充值金额必须大于3元");
return;
}
if (this.Money * 1 > this.RechargeMax * 1) {
weui.topTips(`充值金额不能大于${this.RechargeMax * 1}元`);
return;
}
} else {
if ($(".TxClsTx")[0].value * 1 < 0.01) {
weui.topTips("提现金额须大于等于0.01元");
return;
}
if ($(".TxClsTx")[0].value * 1 > this.RechargeMax * 1) {
weui.topTips(`提现金额不可大于账户余额`);
return;
}
}
this.open();
},
//发送验证码
SendMsg() {
let this_ = this;
if (this_.CodeMsg != "获取验证码") return false;
let loading = weui.loading("发送中");
if (opeType == 0) {
//充值
let params = {
fromAccNo: payCardNumber, //付款账户,
transAmt: this.Money * 1, //交易金额
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/otp/send/recharge",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
otpOrderNo = res5.results.otpOrderNo;
businessNo = res5.results.businessNo;
weui.toast("验证码已发送,请注意查收!", 1000);
this_.IntervalFun();
MyTimer = window.setInterval(IntervalFun, 1000);
} else {
weui.topTips(res5.message);
}
},
error: function(err) {
loading.hide();
},
});
} else if (opeType == 1) {
//提现
let params = {
accountNo: bankInfo.acctNoArray, //银行卡号
mobileNo: mobileNo, //手机号
"transferAccountBizKeyVO.accountName": bankInfo.trueName, //收款方户名
"transferAccountBizKeyVO.amount": $(".TxClsTx")[0].value * 1, //提现金额
"transferAccountBizKeyVO.fromAccountName": bankInfo.trueName, //转出户名
"transferAccountBizKeyVO.fromAccountNo": bankInfo.acctNoArray, //转出卡号(互联网账户卡号)
"transferAccountBizKeyVO.toAccountNo": payCardNumber, //收款方卡号(绑定卡卡号)
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
};
$.ajax({
url: gHost + "/bank-wechat/otp/send/transfer/account",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: params,
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
otpOrderNo = res5.results.otpOrderNo;
businessNo = res5.results.businessNo;
weui.toast("验证码已发送,请注意查收!", 1000);
this_.IntervalFun();
MyTimer = window.setInterval(this_.IntervalFun, 1000);
} else {
weui.topTips(res5.message);
}
},
error: function(err) {
loading.hide(res5.message);
},
});
}
},
//换绑卡
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>${
......@@ -906,860 +994,1198 @@ export default {
}</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",
`可提现金额${(
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.acctNoArray = res2.results.accountNo;
bankInfo.idNo = res2.results.idNo;
bankInfo.trueName = res2.results.trueName;
payCardNumber = res2.results.bindCardNo;
$(".bankNameClass").html(
`${res2.results.bindCardName}(${res2.results.bindCardNo.substr(
);
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.acctNoArray = res2.results.accountNo;
bankInfo.idNo = res2.results.idNo;
bankInfo.trueName = res2.results.trueName;
payCardNumber = res2.results.bindCardNo;
$(".bankNameClass").html(
`${res2.results.bindCardName}(${res2.results.bindCardNo.substr(
-4
)})`
);
$(".bankNameClass1").html(res2.results.bindCardName + "(储蓄卡)");
$(".payCardEndNo").html(
"尾号" + res2.results.bindCardNo.substr(-4)
);
$(".myPhoneTx").html(res2.results.mobileNo);
mobileNo = res2.results.mobileNo;
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;
$(".userNameTx").html(res1.results.name);
$(".schoolNameTx").html(res1.results.schoolname);
$(".ClsNameTx").html(
res1.results.gradename + res1.results.classname
);
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();
},
});
},
// 充值账户异常资料补充
// recharge/acctErrorUpdateResource
acctErrorUpdateResource() {
acctErrorUpdateParms.businessNo = wefileId.businessNo; //业务流水号
acctErrorUpdateParms.schoolId = bankInfo.schoolId;
acctErrorUpdateParms.userId = userID;
acctErrorUpdateParms.homeAddress =
acctErrorUpdateParms.homeAddress +
acctErrorUpdateParms.StreetInformation;
let { backSideImgId, frontSideImgId, homeAddress, occupation } =
acctErrorUpdateParms;
acctErrorUpdateParms.sessionid = sessionID;
acctErrorUpdateParms.wechattype = 1;
if (!occupation) {
weui.topTips("请选择职业信息");
return;
}
if (!homeAddress) {
weui.topTips("请选择家庭住址");
return;
}
if (!backSideImgId) {
weui.topTips("请上传反面身份证图片");
return;
}
if (!frontSideImgId) {
weui.topTips("请上传正面身份证图片");
return;
}
let loading = weui.loading("信息更新中,请稍后");
return new Promise((resolve, reject) => {
$.ajax({
url: gHost + "/bank-wechat/recharge/acctErrorUpdateResource",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: acctErrorUpdateParms,
timeout: 8000, //超时时间设置,单位毫秒
success: function (res) {
loading.hide();
if (res.code == "000000") {
weui.topTips("信息更新成功", {
duration: 3000, //3秒后消失
className: "weui-toptips_success", //自定义类名
callback: function () {
//回调函数
console.log("close");
window.location.reload();
},
});
resolve(res);
} else {
weui.topTips("信息更新失败," + res.message);
loading.hide();
reject(res.message);
}
},
error: function (err) {
loading.hide();
reject(err);
},
});
});
},
//点击上传文件
uploaderInput(e, CredType) {
let fileInfo = e[0];
let fileTypeList = fileInfo.name.split(".");
let fileType = fileTypeList[fileTypeList.length - 1];
if (!(fileType == "jpg" || fileType == "png")) {
weui.topTips("不符合的文件格式,请重新选择");
return;
}
let formData = new FormData();
formData.append("project", wefileId.project);
formData.append("file", fileInfo);
formData.append("fileName", fileInfo.name);
formData.append("expiredTime", wefileId.expiredTime);
formData.append("uuid", wefileId.uuid);
formData.append("wefileToken", wefileId.wefileToken);
formData.append("wefileUrl", wefileId.wefileUrl);
formData.append("sessionid", sessionID);
formData.append("wechattype", 1);
this.UploadIDCardInfo(wefileId.wefileUrl, formData, CredType);
},
// 【获取上传影像token接口】中已经返回了请求地址
UploadIDCardInfo(url, formData, type) {
let loading = weui.loading("请稍后,正在上传");
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
$.ajax({
url:
gHost +
`/bank-wechat-server/wefile/upload?wechattype=1&sessionid=${sessionID}`,
type: "post",
data: formData,
processData: false,
contentType: false,
success: function (res) {
console.log(res);
if (res.code == "10000") {
if (type == 1) {
acctErrorUpdateParms.frontSideImgId = res.results;
} else {
acctErrorUpdateParms.backSideImgId = res.results;
}
weui.topTips("上传成功", {
duration: 3000, //3秒后消失
className: "weui-toptips_success", //自定义类名
callback: function () {},
});
loading.hide();
resolve(res);
} else {
weui.topTips(res.message);
loading.hide();
reject(res.message);
}
},
error: function (err) {
loading.hide();
weui.topTips("上传失败!请检查");
reject(err);
},
});
});
});
},
getWefileId(fileType = "jpg/png/jpeg") {
let loading = weui.loading("请稍后");
return new Promise((resolve, reject) => {
$.ajax({
url: gHost + "/bank-wechat/wefile/wefileId",
type: "post",
data: {
Authorization: this.getQueryParams("seesionID"),
businessNo: businessNo,
fileType: fileType, //jpg/png/doc/docx/txt/pdf/ppt/xls/xlsx/pptx/jpeg
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
},
success: function (res) {
loading.hide();
if (res.code == "10000") {
wefileId = res.results;
resolve(res.results);
} else {
reject(res.message);
}
},
error: function (err) {
loading.hide();
reject(err);
},
});
});
},
//街道信息
StreetInformation(e) {
let value = $(e)[0].value;
console.log(value);
acctErrorUpdateParms.StreetInformation = value;
},
//立即更新
UpdateRechargeException() {
this.acctErrorUpdateResource();
},
// query/getOccupationList职业信息接口
getOccupationList() {
let loading = weui.loading("请稍后");
return new Promise((resolve, reject) => {
$.ajax({
url: gHost + "/bank-wechat/query/getOccupationList",
type: "post",
data: {
sessionid: sessionID,
wechattype: 1,
},
headers: {
Authorization: getQueryParams("seesionID"),
},
success: function (res) {
loading.hide();
if (res.code == "10000") {
resolve(res.results);
} else {
reject(res.message);
}
},
error: function (err) {
loading.hide();
reject(err);
},
});
});
},
//获取参数
getQueryParams(params) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == params) {
return pair[1];
}
}
return false;
},
},
};
);
$(".bankNameClass1").html(res2.results.bindCardName + "(储蓄卡)");
$(".payCardEndNo").html(
"尾号" + res2.results.bindCardNo.substr(-4)
);
$(".myPhoneTx").html(res2.results.mobileNo);
mobileNo = res2.results.mobileNo;
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;
$(".userNameTx").html(res1.results.name);
$(".schoolNameTx").html(res1.results.schoolname);
$(".ClsNameTx").html(
res1.results.gradename + res1.results.classname
);
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();
},
});
},
// 充值账户异常资料补充
// recharge/acctErrorUpdateResource
acctErrorUpdateResource() {
acctErrorUpdateParms.businessNo = wefileId.businessNo; //业务流水号
acctErrorUpdateParms.schoolId = bankInfo.schoolId;
acctErrorUpdateParms.userId = userID;
acctErrorUpdateParms.homeAddress =
acctErrorUpdateParms.homeAddress +
acctErrorUpdateParms.StreetInformation;
let {
backSideImgId,
frontSideImgId,
homeAddress,
occupation
} =
acctErrorUpdateParms;
acctErrorUpdateParms.sessionid = sessionID;
acctErrorUpdateParms.wechattype = 1;
if (!occupation) {
weui.topTips("请选择职业信息");
return;
}
if (!homeAddress) {
weui.topTips("请选择家庭住址");
return;
}
if (!backSideImgId) {
weui.topTips("请上传反面身份证图片");
return;
}
if (!frontSideImgId) {
weui.topTips("请上传正面身份证图片");
return;
}
let loading = weui.loading("信息更新中,请稍后");
return new Promise((resolve, reject) => {
$.ajax({
url: gHost + "/bank-wechat/recharge/acctErrorUpdateResource",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: acctErrorUpdateParms,
timeout: 8000, //超时时间设置,单位毫秒
success: function(res) {
loading.hide();
if (res.code == "000000") {
weui.topTips("信息更新成功", {
duration: 3000, //3秒后消失
className: "weui-toptips_success", //自定义类名
callback: function() {
//回调函数
console.log("close");
window.location.reload();
},
});
resolve(res);
} else {
weui.topTips("信息更新失败," + res.message);
loading.hide();
reject(res.message);
}
},
error: function(err) {
loading.hide();
reject(err);
},
});
});
},
//点击上传文件
uploaderInput(e, CredType) {
let fileInfo = e[0];
let fileTypeList = fileInfo.name.split(".");
let fileType = fileTypeList[fileTypeList.length - 1];
if (!(fileType == "jpg" || fileType == "png")) {
weui.topTips("不符合的文件格式,请重新选择");
return;
}
let formData = new FormData();
formData.append("project", wefileId.project);
formData.append("file", fileInfo);
formData.append("fileName", fileInfo.name);
formData.append("expiredTime", wefileId.expiredTime);
formData.append("uuid", wefileId.uuid);
formData.append("wefileToken", wefileId.wefileToken);
formData.append("wefileUrl", wefileId.wefileUrl);
formData.append("sessionid", sessionID);
formData.append("wechattype", 1);
this.UploadIDCardInfo(wefileId.wefileUrl, formData, CredType);
},
// 【获取上传影像token接口】中已经返回了请求地址
UploadIDCardInfo(url, formData, type) {
let loading = weui.loading("请稍后,正在上传");
return new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
$.ajax({
url: gHost +
`/bank-wechat-server/wefile/upload?wechattype=1&sessionid=${sessionID}`,
type: "post",
data: formData,
processData: false,
contentType: false,
success: function(res) {
console.log(res);
if (res.code == "10000") {
if (type == 1) {
acctErrorUpdateParms.frontSideImgId = res.results;
} else {
acctErrorUpdateParms.backSideImgId = res.results;
}
weui.topTips("上传成功", {
duration: 3000, //3秒后消失
className: "weui-toptips_success", //自定义类名
callback: function() {},
});
loading.hide();
resolve(res);
} else {
weui.topTips(res.message);
loading.hide();
reject(res.message);
}
},
error: function(err) {
loading.hide();
weui.topTips("上传失败!请检查");
reject(err);
},
});
});
});
},
getWefileId(fileType = "jpg/png/jpeg") {
let loading = weui.loading("请稍后");
return new Promise((resolve, reject) => {
$.ajax({
url: gHost + "/bank-wechat/wefile/wefileId",
type: "post",
data: {
Authorization: this.getQueryParams("seesionID"),
businessNo: businessNo,
fileType: fileType, //jpg/png/doc/docx/txt/pdf/ppt/xls/xlsx/pptx/jpeg
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
},
success: function(res) {
loading.hide();
if (res.code == "10000") {
wefileId = res.results;
resolve(res.results);
} else {
reject(res.message);
}
},
error: function(err) {
loading.hide();
reject(err);
},
});
});
},
//街道信息
StreetInformation(e) {
let value = $(e)[0].value;
console.log(value);
acctErrorUpdateParms.StreetInformation = value;
},
//立即更新
UpdateRechargeException() {
this.acctErrorUpdateResource();
},
// query/getOccupationList职业信息接口
getOccupationList() {
let loading = weui.loading("请稍后");
return new Promise((resolve, reject) => {
$.ajax({
url: gHost + "/bank-wechat/query/getOccupationList",
type: "post",
data: {
sessionid: sessionID,
wechattype: 1,
},
headers: {
Authorization: getQueryParams("seesionID"),
},
success: function(res) {
loading.hide();
if (res.code == "10000") {
resolve(res.results);
} else {
reject(res.message);
}
},
error: function(err) {
loading.hide();
reject(err);
},
});
});
},
//获取参数
getQueryParams(params) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == params) {
return pair[1];
}
}
return false;
},
},
};
</script>
<style scoped lang="scss">
html,
body,
page {
width: 750rpx;
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.contentBox {
width: 670rpx;
height: 376rpx;
margin: 0 auto;
}
.contentDiv {
height: 100%;
// margin-top: 36rpx;
border-radius: 15rpx;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
top: 36rpx;
}
.HidenText {
margin-top: 147rpx;
}
.HidenText,
.Balance {
padding-left: 46rpx;
padding-right: 40rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #ffffff;
}
.Balance {
margin-top: 20rpx;
}
.Recharge {
display: flex;
justify-content: space-between;
margin-top: 70rpx;
}
.Recharge .leftdiv {
width: 192rpx;
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
}
.Recharge .rightdiv {
height: 67rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 67rpx;
}
.Recharge .rightdiv image {
position: relative;
width: 20rpx;
height: 20rpx;
}
.headview {
display: flex;
justify-content: space-between;
padding-left: 40rpx;
padding-right: 40rpx;
padding-top: 36rpx;
}
.headview .schoolname {
width: 252rpx;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 50rpx;
}
.headview .IconCls {
width: 170rpx;
height: 48rpx;
background: #20946d;
border-radius: 25rpx;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: 48rpx;
text-align: center;
}
.MoneyBox {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
height: auto;
color: #333333;
}
.choiceClass {
background: #01bc73 !important;
color: #fff;
}
.MoneyBox view {
width: 206rpx;
height: 133rpx;
background: #f5f5f5;
border-radius: 8rpx;
margin-top: 26rpx;
text-align: center;
position: relative;
}
.depotMoney .value {
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 133rpx;
text-align: center;
}
.depotMoney .tips {
// width: 79rpx;
height: 33rpx;
background: linear-gradient(180deg, #fa6400 0%, #fd9d00 100%);
border-radius: 4rpx;
font-size: 18rpx;
font-weight: 500;
padding: 4rpx;
text-align: center;
float: right;
position: absolute;
right: 0rpx;
line-height: 33rpx;
}
.OtherMoney {
display: flex;
justify-content: center;
color: #999999;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 40rpx;
margin-top: 26rpx;
}
.OtherMoney view:nth-child(2) {
width: 30rpx;
height: 30rpx;
background: #f0f0f0;
border-radius: 50%;
text-align: center;
line-height: 30rpx;
margin-top: 7rpx;
margin-left: 5rpx;
}
.payType {
height: 98rpx;
line-height: 98rpx;
display: flex;
justify-content: space-between;
}
.payType view:nth-child(1) {
width: 120rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 98rpx;
}
.payType view::nth-child(2) {
width: 225rpx;
height: 45rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 45rpx;
}
.switchbankCard {
width: 224px;
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 40rpx;
margin-top: 12rpx;
}
.arrow {
transform: rotate(-45deg);
top: -1rpx;
border: solid #999999;
border-width: 0 1rpx 1rpx 0;
display: inline-block;
padding: 8rpx;
position: relative;
}
.DepositID {
width: 630rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
margin: 0 auto;
text-align: center;
bottom: 30rpx;
position: fixed;
left: 0;
right: 0;
}
.DepositID span {
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 92rpx;
}
.MyPhoneCls {
position: fixed;
width: 562rpx;
height: 497rpx;
left: 0;
right: 0;
top: 460rpx;
margin: 0 auto;
font-size: 30rpx;
background: #fff;
border-radius: 8rpx;
}
.closePhoneBox {
width: 35rpx;
height: 35rpx;
background: #7e7e7e;
position: relative;
left: 522rpx;
top: -52rpx;
line-height: 30rpx;
text-align: center;
color: #bebebe;
border-radius: 100%;
border: 2px solid #bebebe;
}
.doBtnTx {
width: 506rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
color: #ffffff;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
bottom: 38rpx;
}
.MyPhoneCls input {
border: none;
outline: none;
height: 80rpx;
line-height: 80rpx;
padding-left: 50rpx;
}
.PhoneNum,
.VerifyCode {
width: 506rpx;
height: 80rpx;
line-height: 60rpx;
background: #f7f6fb;
margin: 0 auto;
margin-top: 20rpx;
}
.VerifyCode {
display: flex;
justify-content: space-between;
}
.VerifyCode input {
width: 200rpx;
}
.CodeMsg {
color: #01bc73;
background: #f7f6fb;
font-size: 28rpx;
font-weight: 600;
line-height: 80rpx;
letter-spacing: 3rpx;
}
.placeholderInput {
color: #aaaaaa;
font-size: 32rpx;
font-weight: 500;
letter-spacing: 3rpx;
// padding-left: 50rpx;
height: 80rpx;
}
.OtherTitle {
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
padding-top: 60rpx;
}
.inputOtherM {
display: flex;
height: 100rpx;
margin-top: 40rpx;
}
.inputOtherM input {
border: none;
outline: none;
height: 50rpx;
padding-left: 16rpx;
font-size: 72rpx;
font-weight: 600;
}
.inputOtherM span:nth-child(1) {
width: 72rpx;
font-size: 80rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 100rpx;
}
.OtherLine {
width: 631rpx;
height: 1rpx;
background-color: #cccccc;
margin-top: 19rpx;
}
.depositImg {
width: 14rpx;
vertical-align: middle;
margin-right: 8rpx;
}
.Recharge_ {
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 40rpx;
margin-top: 40rpx;
}
.Recharge_ span:nth-child(2) {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fa6400;
}
.placeholderinputOtherM {
height: 50rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 50rpx;
}
// 异常处理
.RechargeException {
padding-top: 20rpx;
}
.weui-label {
// width: 118rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3d3d3d;
line-height: 42rpx;
font-weight: bold;
margin-left: 30rpx;
}
.tiptext {
height: 1.06rem;
font-size: 0.75rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #03bc73;
line-height: 1.06rem;
margin-bottom: 0.625rem;
text-align: center;
}
.bottomDetail {
width: 628rpx;
height: 88rpx;
color: white;
// position: fixed;
// left: 0;
// right: 0;
margin: 0 auto;
background-color: #03bc73;
text-align: center;
line-height: 88rpx;
margin-top: 84rpx;
}
.RechargeException input::placeholder {
color: #a1a4a8;
}
.RechargeException .weui-cell {
height: 4rem;
padding: 0 !important;
}
.idCardPhoto1,
.idCardPhoto2 {
width: 388rpx;
height: 224rpx;
margin: 0 auto;
margin-top: 20rpx;
}
.idCardPhoto1 image,
.idCardPhoto2 image {
width: 100%;
height: 100%;
position: relative;
}
.weui-toptips_success {
background-color: #03bc73 !important;
}
.positionCam {
height: 32rpx;
font-size: 22rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #6d7278;
line-height: 32rpx;
text-align: center;
position: relative;
top: -29px;
}
html,
body,
page {
width: 750rpx;
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.userInfoBox {
display: flex;
flex-direction: column;
width: calc(100% - 64rpx);
height: 150rpx;
margin: 0 32rpx;
margin-top: 30rpx;
background: linear-gradient(270deg, #f4f4f4 0%, #ebebeb 100%);
border-radius: 16px;
.firstLine {
display: flex;
flex-direction: row;
width: calc(100% - 68rpx);
height: 56rpx;
line-height: 56rpx;
margin: 0 34rpx;
margin-top: 28rpx;
overflow: hidden;
view {
white-space: nowrap;
}
.avatar {
width: 56rpx;
height: 56rpx;
uni-image {
width: 56rpx;
height: 56rpx;
}
}
.name {
margin-left: 17rpx;
font-size: 36rpx;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
view:last-child {
margin-left: 10rpx;
align-self: center;
align-items: center;
padding: 0 8rpx;
height: 40rpx;
line-height: 40rpx;
background: rgba(0, 0, 0, 0.08);
border-radius: 4rpx;
font-size: 26rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.5);
}
}
.secondLine {
display: flex;
width: calc(100% - 62rpx);
margin: 0 31rpx;
margin-top: 8rpx;
height: 37rpx;
line-height: 37rpx;
font-size: 26rpx;
color: rgba(0, 0, 0, 0.45);
}
}
.contentWrapper {
width: 100%;
display: flex;
flex-direction: column;
}
.balanceWrapper {
width: calc(100% - 144rpx);
margin: 0 32rpx;
margin-top: 24rpx;
height: 249rpx;
padding: 40rpx 40rpx 0;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/bankBg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
display: flex;
flex-direction: column;
.firstLine {
display: flex;
justify-content: space-between;
.left {
view:first-child {
height: 33rpx;
font-size: 24rpx;
font-weight: 600;
color: rgba(255, 255, 255, 0.85);
line-height: 33rpx;
}
view:last-child {
height: 84rpx;
font-size: 60rpx;
font-weight: 600;
color: #ffffff;
line-height: 84rpx;
}
}
.right {
width: 60rpx;
height: 60rpx;
align-self: flex-start;
.icon {
width: 60rpx;
height: 60rpx;
}
}
}
.lastLine {
display: flex;
width: 100%;
justify-content: space-between;
view:first-child {
height: 60rpx;
font-size: 40rpx;
font-weight: 600;
color: #ffffff;
line-height: 60rpx;
}
.right {
width: 140rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 30rpx;
font-weight: 600;
color: #04b871;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/cashBtn.png");
background-repeat: no-repeat;
background-size: cover;
text-align: center;
}
.btn {
width: 140rpx;
height: 60rpx;
}
}
}
.accountlist {
width: 100%;
height: 100%;
}
.showBindCardList {
width: 100%;
height: 100%;
.choiceBox {
text-align: center;
font-weight: bold;
height: 100rpx;
line-height: 100rpx;
padding: 0;
border-bottom: 1rpx solid #e6e6e6;
}
.cardsList {
width: 100%;
height: calc(100% - 260rpx);
overflow-y: scroll;
}
.ListItem {
border-bottom: 1rpx solid #e6e6e6;
font-size: 30rpx;
padding: 25rpx 0;
background: #fff;
position: relative;
text-align: center;
}
.changeCard {
margin: 0 auto;
margin-top: 40rpx;
height: 40rpx;
font-size: 28rpx;
font-weight: 400;
color: #04B871;
line-height: 40rpx;
text-align: center;
}
}
.SubmittedSuccessfully {
width: 400rpx !important;
height: 200rpx !important;
margin: 0 auto !important;
background: #000000;
opacity: 0.8;
border-radius: 8rpx;
}
.cardNum {
width: 574rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
padding-top: 36rpx;
font-size: 24rpx;
.cardNumleft {
font-family: PingFang SC;
font-weight: 500;
color: #ffffff;
}
.cardNumright {
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #ffffff;
}
}
.RechargeDetailed {
text-align: center;
// width: 118rpx;
height: 32rpx;
margin: 0 auto;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
text-decoration: underline;
color: #36a8ff;
margin-top: 50rpx;
}
.contentBox {
width: 670rpx;
height: 376rpx;
margin: 0 auto;
}
.contentDiv {
height: 100%;
// margin-top: 36rpx;
border-radius: 15rpx;
background-image: url("https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/images/xiaopaycard (31).png");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
top: 36rpx;
}
.HidenText {
margin-top: 147rpx;
}
.HidenText,
.Balance {
padding-left: 46rpx;
padding-right: 40rpx;
display: flex;
justify-content: space-between;
font-size: 28rpx;
color: #ffffff;
}
.Balance {
margin-top: 20rpx;
}
.Recharge {
display: flex;
justify-content: space-between;
margin-top: 70rpx;
}
.Recharge .leftdiv {
width: 192rpx;
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
}
.Recharge .rightdiv {
height: 67rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 67rpx;
}
.Recharge .rightdiv image {
position: relative;
width: 20rpx;
height: 20rpx;
}
.headview {
display: flex;
justify-content: space-between;
padding-left: 40rpx;
padding-right: 40rpx;
padding-top: 36rpx;
}
.headview .schoolname {
width: 252rpx;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 50rpx;
}
.headview .IconCls {
width: 170rpx;
height: 48rpx;
background: #20946d;
border-radius: 25rpx;
font-size: 24rpx;
font-weight: 400;
color: #ffffff;
line-height: 48rpx;
text-align: center;
}
.moneyWrapper {
margin-top: 10rpx;
width: 100%;
display: flex;
flex-wrap: wrap;
.moneyItem {
width: 210rpx;
height: 120rpx;
background: #f8f8f8;
border-radius: 12rpx;
display: flex;
justify-content: center;
margin-right: 18rpx;
font-family: PingFangSC-Medium, PingFang SC;
margin-bottom: 24rpx;
view {
align-self: center;
color: #333333;
}
view:first-child {
font-size: 40rpx;
font-weight: 500;
}
view:last-child {
font-size: 30rpx;
}
}
.moneyItem:nth-child(3n) {
margin-right: 0;
}
.active {
border: 3rpx solid #04b871;
view {
color: #04b871;
}
}
.other {
width: 444rpx;
height: 120rpx;
line-height: 120rpx;
text-align: center;
background: #f8f8f8;
border-radius: 12rpx;
/deep/.uni-input-wrapper {
position: absolute;
width: 444rpx;
height: 120rpx;
font-size: 40rpx;
font-weight: 500;
color: #333333;
}
/deep/.uni-input-input {
height: 120rpx;
line-height: 120rpx;
}
}
}
.MoneyBox {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
height: auto;
color: #333333;
}
.choiceClass {
background: #01bc73 !important;
color: #fff;
}
.MoneyBox view {
width: 206rpx;
height: 133rpx;
background: #f5f5f5;
border-radius: 8rpx;
margin-top: 26rpx;
text-align: center;
position: relative;
}
.depotMoney .value {
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
line-height: 133rpx;
text-align: center;
}
.depotMoney .tips {
// width: 79rpx;
height: 33rpx;
background: linear-gradient(180deg, #fa6400 0%, #fd9d00 100%);
border-radius: 4rpx;
font-size: 18rpx;
font-weight: 500;
padding: 4rpx;
text-align: center;
float: right;
position: absolute;
right: 0rpx;
line-height: 33rpx;
}
.OtherMoney {
display: flex;
justify-content: center;
color: #999999;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 40rpx;
margin-top: 26rpx;
}
.OtherMoney view:nth-child(2) {
width: 30rpx;
height: 30rpx;
background: #f0f0f0;
border-radius: 50%;
text-align: center;
line-height: 30rpx;
margin-top: 7rpx;
margin-left: 5rpx;
}
.paytype {
display: flex;
margin-top: 39rpx;
width: 100%;
height: 40rpx;
justify-content: space-between;
font-size: 28rpx;
.left {
font-weight: 500;
color: rgba(0, 0, 0, 0.4);
}
.right {
color: rgba(0, 0, 0, 0.85);
.van-icon {
font-size: 28rpx;
color: #161616;
}
}
}
.payType {
height: 98rpx;
line-height: 98rpx;
display: flex;
justify-content: space-between;
}
.payType view:nth-child(1) {
width: 120rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 98rpx;
}
.payType view::nth-child(2) {
width: 225rpx;
height: 45rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 45rpx;
}
.switchbankCard {
width: 224px;
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 40rpx;
margin-top: 12rpx;
}
.arrow {
transform: rotate(-45deg);
top: -1rpx;
border: solid #999999;
border-width: 0 1rpx 1rpx 0;
display: inline-block;
padding: 8rpx;
position: relative;
}
.DepositID {
width: 630rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
margin: 0 auto;
text-align: center;
bottom: 30rpx;
position: fixed;
left: 0;
right: 0;
}
.DepositID span {
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 92rpx;
}
.MyPhoneCls {
position: fixed;
width: 562rpx;
height: 497rpx;
left: 0;
right: 0;
top: 460rpx;
margin: 0 auto;
font-size: 30rpx;
background: #fff;
border-radius: 8rpx;
}
.closePhoneBox {
width: 35rpx;
height: 35rpx;
background: #7e7e7e;
position: relative;
left: 522rpx;
top: -52rpx;
line-height: 30rpx;
text-align: center;
color: #bebebe;
border-radius: 100%;
border: 2px solid #bebebe;
}
.doBtnTx {
width: 506rpx;
height: 92rpx;
background: #04ba73;
border-radius: 8rpx;
color: #ffffff;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
bottom: 38rpx;
}
.MyPhoneCls input {
border: none;
outline: none;
height: 80rpx;
line-height: 80rpx;
padding-left: 50rpx;
}
.PhoneNum,
.VerifyCode {
width: 506rpx;
height: 80rpx;
line-height: 60rpx;
background: #f7f6fb;
margin: 0 auto;
margin-top: 20rpx;
}
.VerifyCode {
display: flex;
justify-content: space-between;
}
.VerifyCode input {
width: 200rpx;
}
.CodeMsg {
color: #01bc73;
background: #f7f6fb;
font-size: 28rpx;
font-weight: 600;
line-height: 80rpx;
letter-spacing: 3rpx;
}
.placeholderInput {
color: #aaaaaa;
font-size: 32rpx;
font-weight: 500;
letter-spacing: 3rpx;
// padding-left: 50rpx;
height: 80rpx;
}
.OtherTitle {
height: 67rpx;
font-size: 48rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 67rpx;
padding-top: 60rpx;
}
.inputOtherM {
display: flex;
height: 100rpx;
margin-top: 40rpx;
}
.inputOtherM input {
border: none;
outline: none;
height: 50rpx;
padding-left: 16rpx;
font-size: 72rpx;
font-weight: 600;
}
.inputOtherM span:nth-child(1) {
width: 72rpx;
font-size: 80rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 100rpx;
}
.OtherLine {
width: 631rpx;
height: 1rpx;
background-color: #cccccc;
margin-top: 19rpx;
}
.depositImg {
width: 14rpx;
vertical-align: middle;
margin-right: 8rpx;
}
.Recharge_ {
height: 40rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 40rpx;
margin-top: 40rpx;
}
.Recharge_ span:nth-child(2) {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #fa6400;
}
.placeholderinputOtherM {
height: 50rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #010101;
line-height: 50rpx;
}
// 异常处理
.RechargeException {
padding-top: 20rpx;
}
.weui-label {
// width: 118rpx;
height: 42rpx;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #3d3d3d;
line-height: 42rpx;
font-weight: bold;
margin-left: 30rpx;
}
.tiptext {
height: 1.06rem;
font-size: 0.75rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #03bc73;
line-height: 1.06rem;
margin-bottom: 0.625rem;
text-align: center;
}
.bottomDetail {
width: 628rpx;
height: 88rpx;
color: white;
// position: fixed;
// left: 0;
// right: 0;
margin: 0 auto;
background-color: #03bc73;
text-align: center;
line-height: 88rpx;
margin-top: 84rpx;
}
.RechargeException input::placeholder {
color: #a1a4a8;
}
.RechargeException .weui-cell {
height: 4rem;
padding: 0 !important;
}
.idCardPhoto1,
.idCardPhoto2 {
width: 388rpx;
height: 224rpx;
margin: 0 auto;
margin-top: 20rpx;
}
.idCardPhoto1 image,
.idCardPhoto2 image {
width: 100%;
height: 100%;
position: relative;
}
.weui-toptips_success {
background-color: #03bc73 !important;
}
.positionCam {
height: 32rpx;
font-size: 22rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
font-weight: 500;
color: #6d7278;
line-height: 32rpx;
text-align: center;
position: relative;
top: -29px;
}
</style>
<template>
<view class="commonProblem">
<view class="itemWrapper">
<view class="title">使用规则</view>
<view class="content">
<view @click="toDetail('使用规则', 1, 1)">余额储存在哪里?</view>
<view @click="toDetail('使用规则',1, 2)">为什么我的余额充足却消费失败?</view>
</view>
</view>
<view class="itemWrapper">
<view class="title">充值问题</view>
<view class="content">
<view @click="toDetail('充值问题',2, 1)">充值失败后我的钱去哪了?</view>
<view @click="toDetail('充值问题',2, 2)">充值的上限是多少?</view>
</view>
</view>
<view class="itemWrapper">
<view class="title">提现问题</view>
<view class="content">
<view @click="toDetail('提现问题',3, 1)">充值金额是否可以提现?</view>
<view @click="toDetail('提现问题',3, 2)">提现申请成功后,多久可以到账?</view>
<view @click="toDetail('提现问题',3, 3)">为什么线上提现会失败?</view>
</view>
</view>
<view class="itemWrapper">
<view class="title">其他问题</view>
<view class="content">
<view @click="toDetail('其他问题',4, 1)">为什么电子校园卡激活收到银行的短信?</view>
<view @click="toDetail('其他问题',4, 2)">电子校园卡内的余额为什么会调整更新?</view>
</view>
</view>
</view>
</template>
<script>
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";
}
export default {
components: {
},
name: "commonProblem",
data() {
return {
}
},
onLoad: function (options) {
},
created: function () {},
mounted: function () {},
methods: {
// 跳转问题详情界面
toDetail(title, parent, sub){
uni.navigateTo({
url: `../problemDetail/problemDetail?title=${title}&parent=${parent}&sub=${sub}`
})
}
},
};
</script>
<style lang="scss">
html,
body,
page {
width: 750rpx;
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}
.commonProblem {
width: 100%;
height: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
.itemWrapper {
width: calc(100% - 64rpx);
margin: 30rpx 32rpx 0;
padding-bottom: 30rpx;
border-bottom: 1rpx solid #CCCCCC;
display: flex;
justify-content: space-between;
.title {
width: 180rpx;
font-size: 30rpx;
align-self: center;
font-weight: 600;
color: #333333;
}
.content {
width: calc(100% - 200rpx);
display: flex;
flex-direction: column;
font-size: 28rpx;
color: #888888;
line-height: 50rpx;
margin-left: 20rpx;
}
}
.itemWrapper:first-child {
margin-top: 50rpx;
}
}
</style>
<template>
<view class="problemDetail">
<van-collapse v-model="activeName" accordion>
<van-collapse-item title="余额储存在哪里?" v-if="parent == 1" name="1-1">
<span>为了保障用户资金安全、存储合规,用户充值金额均存在</span><span class="red">用户以本人名义</span><span>开立的银行电子账户(即电子校园卡)中。</span>
</van-collapse-item>
<van-collapse-item title="为什么我的余额充足却消费失败?" v-if="parent == 1" name="1-2">
<p> 以下情况可能导致支付失败:</p>
<p> 1.单笔支付超100</p>
<p> 2.可能因用户个人原因(非正常操作、违规操作等),导致账户被开户银行进行司法冻结。具体可咨询开户银行客户热线</p>
<p> 工商银行:95588</p>
<p> 交通银行:95559</p>
<p> 平安银行:95511</p>
<p> 渤海银行:95541</p>
</van-collapse-item>
<van-collapse-item title="充值失败后我的钱去哪了?" v-if="parent == 2" name="2-1">
充值失败后,充值金额将在7个工作日内退回用户开户时指定的银行卡账户中。
</van-collapse-item>
<van-collapse-item title="充值的上限是多少?" v-if="parent == 2" name="2-2">
根据人民银行关于II/III类户使用相关法规限制,III类户可用金额上限2000,II类户可用金额上限10000。
</van-collapse-item>
<van-collapse-item title="充值金额是否可以提现?" v-if="parent == 3" name="3-1">
充值金额可随时发起提现。
</van-collapse-item>
<van-collapse-item title="提现申请成功后,多久可以到账?" v-if="parent == 3" name="3-2">
提现到账时间受到人民银行相关支付系统稳定性影响,无法准确预估。一般提现到账时间为2个小时。
</van-collapse-item>
<van-collapse-item title="为什么线上提现会失败?" v-if="parent == 3" name="3-3">
<p>提现失败的原因可能有:</p>
<p>1.超出当日提现次数</p>
<p>2.由于用户个人问题导致的账户出款功能受限制等</p>
<p>具体可咨询客服400-9656-210</p>
</van-collapse-item>
<van-collapse-item title="为什么电子校园卡激活收到银行的短信?" v-if="parent == 4" name="4-1">
电子校园卡账户由银行II/III账户支持。
</van-collapse-item>
<van-collapse-item title="电子校园卡内的余额为什么会调整更新?" v-if="parent == 4" name="4-2">
账户中的实际金额以银行II/III类户账户中的余额为准,当您在银行进行提现等操作时,真实余额将会同步更新。如对明细有疑问,请致电银行客户热线
</van-collapse-item>
</van-collapse>
</view>
</template>
<script>
export default {
data() {
return {
activeName: '1-1',
parent: 1,
sub: 1
}
},
onLoad: function(options) {
const {
title,
parent,
sub
} = options;
// 设置标题
uni.setNavigationBarTitle({
title: title
})
this.parent = parent;
this.sub = sub;
this.activeName = parent + "-" + sub;
},
methods: {
change(e) {
console.log(e);
}
}
}
</script>
<style lang="scss">
.problemDetail {
width: 100%;
height: 100%;
min-height: calc(100vh - 88rpx);
.content {
padding: 30rpx;
.red {
color: red;
}
}
.text {
font-size: 28rpx;
color: #666666;
line-height: 40rpx;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment