|
@@ -57,9 +57,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="card" @click="paySelectMethod(1)" :class="{
|
|
|
- cardselect:payValue==1,
|
|
|
- cardno:payValue!=1
|
|
|
+ <view class="card" @click="paySelectMethod(paySelectMethodValue)" :class="{
|
|
|
+ cardselect:payValue==1||payValue==4,
|
|
|
+ cardno:!(payValue==1||payValue==4)
|
|
|
}">
|
|
|
<view class="cardgo">
|
|
|
<view class="cardinfo">
|
|
@@ -70,11 +70,35 @@
|
|
|
</view>
|
|
|
<view class="title">会员账户余额充电</view>
|
|
|
|
|
|
- <p>当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元
|
|
|
+ <p v-show="!(payValue==1||payValue==4)">当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元
|
|
|
<span @click="paySelectShow()" style="color:#00B962;margin-left: 20px; ">去充值></span>
|
|
|
|
|
|
- </p>
|
|
|
- <view class="rechargeMain" v-show="payValue==1">
|
|
|
+ </p>
|
|
|
+ <p>优先使用付款方式
|
|
|
+ <span @click="paySelectShow()" style="color:#00B962;margin-left: 20px; ">去充值></span>
|
|
|
+
|
|
|
+
|
|
|
+ </p>
|
|
|
+ <view class="rechargeBalance">
|
|
|
+ <view class="rechargeBalanceItem">账户余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</view>
|
|
|
+ <view class="rechargeBalanceItem" v-if="chargingFundsBl">|</view>
|
|
|
+ <view class="rechargeBalanceItem" v-if="chargingFundsBl" >充电金{{user.chargingFunds>0?user.chargingFunds.toFixed(2):'0.00'}}元</view>
|
|
|
+ </view>
|
|
|
+ <view class="rechargeMain" v-if="chargingFundsBl" v-show="payValue==1||payValue==4">
|
|
|
+
|
|
|
+ <view
|
|
|
+ class=" recharge-item " @click="paySelectMethodValue=1" :class="payValue == 1? 'active' : ''" >
|
|
|
+ 账户余额
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ class=" recharge-item " @click="paySelectMethodValue=4" :class="payValue == 4? 'active' : ''">
|
|
|
+ 充电金
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <p v-if="chargingFundsBl" >充电时长</p>
|
|
|
+ <view class="rechargeMain" v-show="payValue==1||payValue==4">
|
|
|
+
|
|
|
+
|
|
|
<view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''"
|
|
|
class=" recharge-item ">
|
|
|
充满自停
|
|
@@ -205,7 +229,7 @@
|
|
|
</template>
|
|
|
|
|
|
</view>
|
|
|
- <view v-if="cardList.length" class="cardListView">
|
|
|
+ <view v-if="cardList.length&&userCard" class="cardListView">
|
|
|
<view class="cardListItemTitle">点击切换其他卡</view>
|
|
|
<view class="cardListItem" v-for="(item,i) in cardList"
|
|
|
:key="i" :class="{
|
|
@@ -320,7 +344,7 @@
|
|
|
|
|
|
</u-popup>
|
|
|
<!-- 弹窗2 -->
|
|
|
- <template>
|
|
|
+ <!-- <template>
|
|
|
<view>
|
|
|
<u-popup v-model="paySelect" mode="bottom">
|
|
|
<view class="paySelect">
|
|
@@ -361,7 +385,7 @@
|
|
|
</u-popup>
|
|
|
|
|
|
</view>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<!-- 弹窗 -->
|
|
|
<template>
|
|
|
<view>
|
|
@@ -441,6 +465,7 @@
|
|
|
} from '@/utils'
|
|
|
|
|
|
import * as Pay from '@/apis/weixin.js'
|
|
|
+// import { contentStore } from 'core/core.model'
|
|
|
|
|
|
|
|
|
|
|
@@ -488,7 +513,7 @@
|
|
|
otherNum_f: '',
|
|
|
otherNum: '',
|
|
|
moneyList_f: [],
|
|
|
- paySelect: false,
|
|
|
+ paySelect: true,
|
|
|
payName: "",
|
|
|
payValueTemp: 0,
|
|
|
payValue: 0,
|
|
@@ -507,6 +532,16 @@
|
|
|
tips: "账户余额:99999元",
|
|
|
value: "3",
|
|
|
select: false,
|
|
|
+ }, {
|
|
|
+ name: "充电金",
|
|
|
+ tips: "账户余额:99999元",
|
|
|
+ value: "4",
|
|
|
+ select: false,
|
|
|
+ }, {
|
|
|
+ name: "充电金",
|
|
|
+ tips: "账户余额:99999元",
|
|
|
+ value: "4",
|
|
|
+ select: false,
|
|
|
}],
|
|
|
moneyList: [
|
|
|
|
|
@@ -554,7 +589,9 @@
|
|
|
personInfo: {},
|
|
|
carNumber: "",
|
|
|
show3: false,
|
|
|
- cardList:[],
|
|
|
+ cardList:[],
|
|
|
+ paySelectMethodValue:1,
|
|
|
+ chargingFundsBl:false,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -621,7 +658,14 @@
|
|
|
if (payValueDefault == "1" || payValueDefault == "0") {
|
|
|
this.payValue = payValueDefault;
|
|
|
}
|
|
|
-
|
|
|
+ if (payValueDefault == "1" || payValueDefault == "4") {
|
|
|
+ this.paySelectMethodValue = payValueDefault;
|
|
|
+ this.payValue = payValueDefault;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(payValueDefault==4){
|
|
|
+ this.chargingFundsBl=true;
|
|
|
+ }
|
|
|
}
|
|
|
this.payName = this.payList[this.payValue].name;
|
|
|
|
|
@@ -703,7 +747,8 @@
|
|
|
paySelectCompany() {
|
|
|
|
|
|
},
|
|
|
- paySelectMethod(value, company) {
|
|
|
+ paySelectMethod(value, company) {
|
|
|
+ console.log(value)
|
|
|
if (this.personInfo.userType == "1") {
|
|
|
uni.showToast({
|
|
|
title: "游客模式只支持“先付后退”"
|
|
@@ -720,9 +765,10 @@
|
|
|
|
|
|
this.companyPaySelect.car = company.carList[0].carNum;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
}
|
|
|
- console.log(this.companyPaySelect)
|
|
|
+
|
|
|
|
|
|
},
|
|
|
moneyClick_f(index, item) {
|
|
@@ -1134,12 +1180,17 @@
|
|
|
this.userCard = res.data.regUserCard
|
|
|
this.canUse = res.data.canUse
|
|
|
//this.user = res.data
|
|
|
-
|
|
|
+
|
|
|
|
|
|
API.personalCenter({
|
|
|
stationId: this.stationId
|
|
|
}).then((res2) => {
|
|
|
- this.user = res2.data
|
|
|
+ this.user = res2.data
|
|
|
+
|
|
|
+ if(this.user.chargingFunds){
|
|
|
+ this.chargingFundsBl=true;
|
|
|
+ }
|
|
|
+
|
|
|
var entRegList = res2.data.entRegList;
|
|
|
this.companyList = []
|
|
|
|
|
@@ -1921,5 +1972,13 @@
|
|
|
background-color: #00b962;
|
|
|
color:#fff;
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+ .rechargeBalance{
|
|
|
+ display: flex;
|
|
|
+ .rechargeBalanceItem{
|
|
|
+ margin-right: 6px;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
</style>
|