|
@@ -29,7 +29,7 @@
|
|
|
{{detail.chargingPower}}kW
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="item" @click="priceDetail">
|
|
|
+ <view class="item" @click="priceDetail" v-if="price">
|
|
|
<view class="title">
|
|
|
电费+服务费
|
|
|
<view class="iconfont more">
|
|
@@ -76,7 +76,7 @@
|
|
|
<text class="free" v-else-if="gunDetail.chargingAppointment&&!gunDetail.isMeAppoint">已被预约</text>
|
|
|
<text class="free" v-else>{{gun.workStatusText}}</text>
|
|
|
</view>
|
|
|
- <view class="price">
|
|
|
+ <view class="price" v-if="price">
|
|
|
<text>{{price.costPrice}}</text><text class="unit">元/度</text>
|
|
|
</view>
|
|
|
<view class="address">
|
|
@@ -95,6 +95,8 @@
|
|
|
|
|
|
{{canUse?'充电服务费包月卡':'此充电站不支持月卡服务'}}
|
|
|
|
|
|
+ <view v-if="!vinCk()" style="color: red;">vin码不一致,无法享受月卡服务</view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
@@ -147,6 +149,22 @@
|
|
|
<!-- 弹窗 -->
|
|
|
<view>
|
|
|
|
|
|
+ <u-modal v-model="showVin" class="showOss"
|
|
|
+ confirm-text="知道了"
|
|
|
+ :show-title="false" >
|
|
|
+ <view class="slot-content">
|
|
|
+
|
|
|
+ <u-image width="120px" style="margin: auto;"
|
|
|
+ mode="widthFix"
|
|
|
+ src="@/static/img/充电中-缺省页.png"></u-image>
|
|
|
+ <view style="padding:0 40px;font-size: 36rpx;">
|
|
|
+ 系统检测出当前充电车辆与包月卡所绑定的车辆不一致,该车辆可以正常充电,但无法享受包月卡免服务费优惠。
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-modal>
|
|
|
+
|
|
|
+
|
|
|
<u-modal v-model="show" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266"
|
|
|
:show-cancel-button="true" ref="uModal" :asyncClose="true" :title="title" :content="consumerPhone"
|
|
|
:content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
|
|
@@ -192,7 +210,7 @@
|
|
|
description: '温馨提示:充电前请确保您的车辆已与充电桩连接!并关闭车内电源。',
|
|
|
show: false,
|
|
|
title: '联系客服',
|
|
|
-
|
|
|
+ showVin:false,
|
|
|
confirmText: '拨打电话',
|
|
|
content: '余额不足5,请先充值。',
|
|
|
carDetText: '',
|
|
@@ -213,7 +231,8 @@
|
|
|
}
|
|
|
}
|
|
|
return false
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
uni.hideToast();
|
|
@@ -224,6 +243,18 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ vinCk(){
|
|
|
+
|
|
|
+ if(this.userCard&&this.userCard.vin&&this.gun&&this.gun.vin){
|
|
|
+ if(this.userCard.vin==this.gun.vin){
|
|
|
+ return true
|
|
|
+ }else{
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
priceDetail(){
|
|
|
uni.navigateTo({
|
|
|
url:'chargePriceDetails?stationId='+this.detail.stationId+"&type="+this.detail.type+"&id="+this.detail.id
|
|
@@ -267,6 +298,33 @@
|
|
|
role() {
|
|
|
|
|
|
|
|
|
+ },
|
|
|
+ getUserCard(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ API.userCard({
|
|
|
+ stationId:this.detail.stationId
|
|
|
+ }).then((res2) => {
|
|
|
+ uni.hideLoading()
|
|
|
+ console.log(res2)
|
|
|
+ this.userCard=res2.data.regUserCard
|
|
|
+ this.canUse=res2.data.canUse
|
|
|
+ //this.user = res.data
|
|
|
+
|
|
|
+ if(this.userCardBool){
|
|
|
+ //检查vin码
|
|
|
+ if(!this.vinCk()){
|
|
|
+ this.showVin=true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(error2 => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error2
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
getPile() {
|
|
|
uni.showLoading({
|
|
@@ -278,6 +336,7 @@
|
|
|
gunNo: this.id,
|
|
|
jpcode: "jp_team51_charge_id:A_" + this.id
|
|
|
}).then((res) => {
|
|
|
+ uni.hideLoading()
|
|
|
this.gunDetail= res.data;
|
|
|
this.detail = res.data.device
|
|
|
this.prices = res.data.prices
|
|
@@ -293,6 +352,9 @@
|
|
|
|
|
|
if (res.data.isMeAppoint) {
|
|
|
|
|
|
+ this.getUserCard();
|
|
|
+
|
|
|
+
|
|
|
} else {
|
|
|
var chargingAppointment = res.data.chargingAppointment
|
|
|
var data = newDate(chargingAppointment.createTime).getTime()
|
|
@@ -312,24 +374,10 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ }else{
|
|
|
+ this.getUserCard();
|
|
|
}
|
|
|
-
|
|
|
- API.userCard({
|
|
|
- stationId:this.detail.stationId
|
|
|
- }).then((res2) => {
|
|
|
- console.log(res2)
|
|
|
- this.userCard=res2.data.regUserCard
|
|
|
- this.canUse=res2.data.canUse
|
|
|
- //this.user = res.data
|
|
|
- uni.hideLoading()
|
|
|
-
|
|
|
- }).catch(error2 => {
|
|
|
- uni.showToast({
|
|
|
- title: error2
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
}).catch(error => {
|
|
|
uni.showToast({
|
|
|
title: error
|
|
@@ -338,11 +386,15 @@
|
|
|
},
|
|
|
charge() {
|
|
|
//this.role()
|
|
|
-
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pages/searchPile/chargeProcess/charge?stationId=' + this.detail.stationId +
|
|
|
+ var url='/pages/searchPile/chargeProcess/charge?stationId=' + this.detail.stationId +
|
|
|
'&deviceNo=' + this.detail.deviceNo + "&gun=" + this.gun.channelNo + "&carNumber=" + (
|
|
|
- this.car ? this.car.carNum : '')
|
|
|
+ this.car ? this.car.carNum : '');
|
|
|
+
|
|
|
+ if(!this.vinCk()){
|
|
|
+ url+="&vin=no"
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url
|
|
|
})
|
|
|
|
|
|
|