|
@@ -1,27 +1,27 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <ujp-navbar title="开始充电" :is-back="isback" ></ujp-navbar>
|
|
|
- <!-- 优惠 -->
|
|
|
- <view class="discounts" style="padding:0 18px;" v-if="bannerList.length">
|
|
|
- <u-swiper bg-color="#fff" :img-mode="'scaleToFill'" height="160" :list="bannerList" @click="clickBanner"
|
|
|
- :name="'picUrl'">
|
|
|
- </u-swiper>
|
|
|
+ <ujp-navbar title="开始充电" :is-back="isback" ></ujp-navbar>
|
|
|
+ <!-- 优惠 -->
|
|
|
+ <view class="discounts" style="padding:0 18px;" v-if="bannerList.length">
|
|
|
+ <u-swiper bg-color="#fff" :img-mode="'scaleToFill'" height="160" :list="bannerList" @click="clickBanner"
|
|
|
+ :name="'picUrl'">
|
|
|
+ </u-swiper>
|
|
|
</view>
|
|
|
- <view class="recharge" >
|
|
|
-
|
|
|
+ <view class="recharge" >
|
|
|
|
|
|
- <view class="title">
|
|
|
- <view class="left lefttitle">
|
|
|
- 请选择充电金额
|
|
|
+
|
|
|
+ <view class="title">
|
|
|
+ <view class="left lefttitle">
|
|
|
+ 请选择充电金额
|
|
|
</view>
|
|
|
<view class="to-recharge" @click="show=true,recordId='',otherNum_f='',fee=0">
|
|
|
去充值
|
|
|
</view>
|
|
|
</view>
|
|
|
<p>当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</p>
|
|
|
- <view class="rechargeMain">
|
|
|
- <view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''" class=" recharge-item ">
|
|
|
- 充满自停
|
|
|
+ <view class="rechargeMain">
|
|
|
+ <view @click="moneyClick(-1)" :class="!otherNum&&moneyActiveClass == -1? 'active' : ''" class=" recharge-item ">
|
|
|
+ 充满自停
|
|
|
</view>
|
|
|
<view class="recharge-item" @click="moneyClick(item.id)"
|
|
|
:class="!otherNum&&moneyActiveClass == item.id ? 'active' : ''" v-for="(item,index) in moneyList"
|
|
@@ -34,12 +34,12 @@
|
|
|
|
|
|
</view>
|
|
|
|
|
|
- </view>
|
|
|
-
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
<!-- 优惠券2 -->
|
|
@@ -71,36 +71,36 @@
|
|
|
<view class="member" v-if="userCardBool" >
|
|
|
<view class="actively ">
|
|
|
会员活动
|
|
|
- </view>
|
|
|
- <view class="type" v-if="!vin" style="color: red;" >
|
|
|
- vin码不一致
|
|
|
+ </view>
|
|
|
+ <view class="type" v-if="!vin" style="color: red;" >
|
|
|
+ vin码不一致
|
|
|
</view>
|
|
|
<view class="type" v-else-if="canUse">
|
|
|
- 充电服务费包月卡
|
|
|
- </view>
|
|
|
- <view class="type" style="color: red;" v-else>
|
|
|
- 此充电站不支持月卡服务
|
|
|
- </view>
|
|
|
+ 充电服务费月卡
|
|
|
+ </view>
|
|
|
+ <view class="type" style="color: red;" v-else>
|
|
|
+ 此充电站不支持月卡服务
|
|
|
+ </view>
|
|
|
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
</view>
|
|
|
<view class="bottom">
|
|
|
<view class="botton"
|
|
|
@click="submit"
|
|
|
- >开始充电</view>
|
|
|
+ >开始充电</view>
|
|
|
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="textinfo">
|
|
|
- <p>充电说明:</p>
|
|
|
- <view>
|
|
|
- 1.最终结算金额将以实际充入电量为准;<br/>
|
|
|
- 2.充满自停模式需要您的余额不低于10元才可充电;<br/>
|
|
|
- 3.充电金额请输入1元~500元的整数。实际充电金额与所选金额会略有出入(一般误差约几分钱);<br/>
|
|
|
- 4.完成充电后,在满足条件的情况下,优惠券自动抵扣;提前结束充电则不使用优惠券并返还至您的卡包。<br/>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textinfo">
|
|
|
+ <p>充电说明:</p>
|
|
|
+ <view>
|
|
|
+ 1.最终结算金额将以实际充入电量为准;<br/>
|
|
|
+ 2.充满自停模式需要您的余额不低于10元才可充电;<br/>
|
|
|
+ 3.充电金额请输入1元~500元的整数。实际充电金额与所选金额会略有出入(一般误差约几分钱);<br/>
|
|
|
+ 4.完成充电后,在满足条件的情况下,优惠券自动抵扣;提前结束充电则不使用优惠券并返还至您的卡包。<br/>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="but-box" style="margin-bottom: 20px;">
|
|
@@ -112,10 +112,10 @@
|
|
|
|
|
|
@click="submit" shape="circle">开始充电</u-button>
|
|
|
</view> -->
|
|
|
- <u-modal v-model="showmodal"
|
|
|
- :show-cancel-button="true"
|
|
|
- title="余额不足" confirm-text="前往充值"
|
|
|
- content="账户余额不足,充值成功后开始充电" @confirm="show=true"></u-modal>
|
|
|
+ <u-modal v-model="showmodal"
|
|
|
+ :show-cancel-button="true"
|
|
|
+ title="余额不足" confirm-text="前往充值"
|
|
|
+ content="账户余额不足,充值成功后开始充电" @confirm="show=true"></u-modal>
|
|
|
|
|
|
|
|
|
<!-- 弹窗 -->
|
|
@@ -125,13 +125,13 @@
|
|
|
<view class="recharge" style="padding-bottom: 0;">
|
|
|
<view class="title lefttitle " >选择充值金额</view>
|
|
|
<p>当前余额{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</p>
|
|
|
- <view class="rechargeMain">
|
|
|
- <view class="recharge-item" :class="!otherNum_f&&moneyActiveClass_f == item.id ? 'active' : ''"
|
|
|
- v-for="(item,index) in moneyList_f" :key="item.id" @click="moneyClick_f(item.id,item)">
|
|
|
- {{item.amountDesc?item.amountDesc:item.rechargeAmount+'元'}}
|
|
|
- <view class="amount" v-if="item.amountRemark">{{item.amountRemark}}</view>
|
|
|
- </view>
|
|
|
-
|
|
|
+ <view class="rechargeMain">
|
|
|
+ <view class="recharge-item" :class="!otherNum_f&&moneyActiveClass_f == item.id ? 'active' : ''"
|
|
|
+ v-for="(item,index) in moneyList_f" :key="item.id" @click="moneyClick_f(item.id,item)">
|
|
|
+ {{item.amountDesc?item.amountDesc:item.rechargeAmount+'元'}}
|
|
|
+ <view class="amount" v-if="item.amountRemark">{{item.amountRemark}}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
<p class="oldTextjp2" oldstyle="font-size:16px">其他充值金额</p>
|
|
|
<view style="margin-bottom: 32px;">
|
|
@@ -140,7 +140,7 @@
|
|
|
|
|
|
:class="otherNum_f? 'active' : ''"
|
|
|
class="recharge-input self-stop" style="height: 100%;width: 100%;margin-bottom: 8px;">
|
|
|
- <u-input v-model="otherNum_f" @input="ckInput_f" @focus="focus" type="digit" :border="true" />
|
|
|
+ <u-input v-model="otherNum_f" @input="ckInput_f" @focus="focus" type="digit" :border="true" />
|
|
|
|
|
|
|
|
|
</view>
|
|
@@ -177,35 +177,35 @@
|
|
|
<script>
|
|
|
import * as API from '@/apis/chargeProcess.js'
|
|
|
import * as userApi from '@/apis/user.js'
|
|
|
- import * as newsApi from '@/apis/news.js'
|
|
|
- import * as API_finance from '@/apis/finance.js'
|
|
|
- import {
|
|
|
- wxPayJs
|
|
|
- } from '@/utils/wxpay'
|
|
|
- import * as Pay from '@/apis/weixin.js'
|
|
|
-
|
|
|
-
|
|
|
+ import * as newsApi from '@/apis/news.js'
|
|
|
+ import * as API_finance from '@/apis/finance.js'
|
|
|
+ import {
|
|
|
+ wxPayJs
|
|
|
+ } from '@/utils/wxpay'
|
|
|
+ import * as Pay from '@/apis/weixin.js'
|
|
|
+
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
- return {
|
|
|
- fee:0,
|
|
|
+ return {
|
|
|
+ fee:0,
|
|
|
recordId:"",
|
|
|
show2:false,
|
|
|
stationId:"",
|
|
|
elderMode:false,
|
|
|
isback:true,
|
|
|
show: false,
|
|
|
- moneyActiveClass: "-1",
|
|
|
+ moneyActiveClass: "-1",
|
|
|
moneyActiveClass_f: "-1",
|
|
|
detail: {},
|
|
|
- couponsuse:'',
|
|
|
+ couponsuse:'',
|
|
|
showmodal:false,
|
|
|
- //提交信息
|
|
|
- //提交信息
|
|
|
- submitForm_f: {
|
|
|
-
|
|
|
- //paytype:'YE',
|
|
|
+ //提交信息
|
|
|
+ //提交信息
|
|
|
+ submitForm_f: {
|
|
|
+
|
|
|
+ //paytype:'YE',
|
|
|
},
|
|
|
submitForm: {
|
|
|
deviceNo: '',
|
|
@@ -216,9 +216,9 @@
|
|
|
//paytype:'YE',
|
|
|
},
|
|
|
uuid:0,
|
|
|
- user: {},
|
|
|
+ user: {},
|
|
|
otherNum_f: '',
|
|
|
- otherNum: '',
|
|
|
+ otherNum: '',
|
|
|
moneyList_f:[],
|
|
|
moneyList: [
|
|
|
{
|
|
@@ -243,39 +243,39 @@
|
|
|
},
|
|
|
|
|
|
],
|
|
|
-
|
|
|
- userCard:null,
|
|
|
+
|
|
|
+ userCard:null,
|
|
|
canUse:false,
|
|
|
selectObj:{},
|
|
|
value:"",
|
|
|
// 优惠券
|
|
|
- listlength:0,
|
|
|
- vin:true,
|
|
|
+ listlength:0,
|
|
|
+ vin:true,
|
|
|
bannerList:[],
|
|
|
- checked:true,
|
|
|
+ checked:true,
|
|
|
selectItem:{},
|
|
|
}
|
|
|
- },
|
|
|
- computed:{
|
|
|
- userCardBool(){
|
|
|
- if(this.userCard){
|
|
|
- var date=new Date().getTime()
|
|
|
- var reg=new RegExp('-','gi')
|
|
|
- var str=this.userCard.endTime;
|
|
|
- //console.log(str.replace(reg,'/'))
|
|
|
- var date2=new Date(str.replace(reg,'/')).getTime();
|
|
|
- if(date<date2){
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- return false
|
|
|
- }
|
|
|
},
|
|
|
- onLoad(op) {
|
|
|
-
|
|
|
- // var plus=this.carhelp.getPersonInfoPlus()
|
|
|
- // if(plus){
|
|
|
- // this.userCard=plus.userCard;
|
|
|
+ computed:{
|
|
|
+ userCardBool(){
|
|
|
+ if(this.userCard){
|
|
|
+ var date=new Date().getTime()
|
|
|
+ var reg=new RegExp('-','gi')
|
|
|
+ var str=this.userCard.endTime;
|
|
|
+ //console.log(str.replace(reg,'/'))
|
|
|
+ var date2=new Date(str.replace(reg,'/')).getTime();
|
|
|
+ if(date<date2){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(op) {
|
|
|
+
|
|
|
+ // var plus=this.carhelp.getPersonInfoPlus()
|
|
|
+ // if(plus){
|
|
|
+ // this.userCard=plus.userCard;
|
|
|
// }
|
|
|
this.uuid=new Date().getTime();
|
|
|
this.stationId= op.stationId;
|
|
@@ -285,9 +285,9 @@
|
|
|
this.submitForm.channelNo = op.gun;
|
|
|
this.submitForm.carNumber = op.carNumber;
|
|
|
this.carhelp.setGunIdCharge(this.submitForm);
|
|
|
- }
|
|
|
- if(op.vin=='no'){
|
|
|
- this.vin=false;
|
|
|
+ }
|
|
|
+ if(op.vin=='no'){
|
|
|
+ this.vin=false;
|
|
|
}
|
|
|
if(op.isback){
|
|
|
this.isback=false;
|
|
@@ -298,11 +298,11 @@
|
|
|
// img="https://yktwechat.xiaoxinda.com/config/xxd2021.jpg"
|
|
|
if(couponsuse){
|
|
|
this.couponsuse=couponsuse
|
|
|
- }
|
|
|
+ }
|
|
|
this.init()
|
|
|
},
|
|
|
- onReady(){
|
|
|
- this.getBannerInfo("charge-start")
|
|
|
+ onReady(){
|
|
|
+ this.getBannerInfo("charge-start")
|
|
|
|
|
|
this.elderMode = this.carhelp.get('getElderModeClass') == '长辈模式';
|
|
|
if(this.elderMode)
|
|
@@ -320,161 +320,161 @@
|
|
|
|
|
|
this.getHomePage()
|
|
|
},
|
|
|
- methods: {
|
|
|
- moneyClick_f(index,item) {
|
|
|
- this.otherNum_f='';
|
|
|
- this.moneyActiveClass_f = index;
|
|
|
- if(item){
|
|
|
- this.selectItem=item;
|
|
|
- // if(item.imgUrl){
|
|
|
- // this.selectImg=item
|
|
|
- // }
|
|
|
- }
|
|
|
- },
|
|
|
- rechargeNow() {
|
|
|
- if(!this.checked){
|
|
|
- uni.showToast({
|
|
|
- title:"请同意《充值协议》后进行充值"
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- this.submitForm_f={};
|
|
|
- var fee=0;
|
|
|
- if(!this.otherNum_f){
|
|
|
- this.submitForm_f.chargingMarketingId=this.selectItem.id;
|
|
|
- fee=this.selectItem.rechargeAmount
|
|
|
- }else{
|
|
|
- this.submitForm_f.amount=this.otherNum_f
|
|
|
- fee=this.otherNum_f
|
|
|
- }
|
|
|
-
|
|
|
- if(this.fee){
|
|
|
- var thisfee=this.fee
|
|
|
- if(this.fee>parseFloat(fee)){
|
|
|
- uni.showToast({
|
|
|
- title:`最少充值${thisfee}元才能启动充电`
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
-
|
|
|
- if(this.recordId){
|
|
|
- this.submitForm_f.recordId=this.recordId
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
- //(this.submitForm)
|
|
|
- this.wxpy()
|
|
|
-
|
|
|
- },
|
|
|
- wxpy(){
|
|
|
-
|
|
|
- Pay.wxpay(this.submitForm_f).then((response) => {
|
|
|
-
|
|
|
- if(!response.result){
|
|
|
- uni.showToast({
|
|
|
- title: response.message
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- var data = response.data
|
|
|
- uni.hideLoading()
|
|
|
- //("Pay+"+new Date().getTime())
|
|
|
- wxPayJs(data);
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
-
|
|
|
- title: error
|
|
|
- })
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
- focus(){
|
|
|
- console.log(0)
|
|
|
- uni.pageScrollTo({
|
|
|
- scrollTop:999999,
|
|
|
- duration:0
|
|
|
- })
|
|
|
- },
|
|
|
- init() {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- var data = {
|
|
|
- type:2 ,
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
- API_finance.marketingData(data).then((res) => {
|
|
|
-
|
|
|
- this.moneyList_f = res.data.chargingMarketingList
|
|
|
- if (this.moneyList_f.length > 0) {
|
|
|
- this.selectItem = this.moneyList_f[0];
|
|
|
- this.moneyActiveClass_f = this.moneyList_f[0].id
|
|
|
- //(this.moneyActiveClass)
|
|
|
- }
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
-
|
|
|
- title: error
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- clickBanner(index){
|
|
|
- var mod= this.bannerList[index]
|
|
|
-
|
|
|
- if(mod.linkUrl.indexOf('http')==0){
|
|
|
- window.location=mod.linkUrl;
|
|
|
- }
|
|
|
- else if(mod.linkUrl.indexOf('#/')==0){
|
|
|
- if(mod.linkUrl.indexOf("?")==-1){
|
|
|
- mod.linkUrl+='?';
|
|
|
- }
|
|
|
- //window.location=mod.linkUrl;
|
|
|
- var url=mod.linkUrl.split("#")[1]
|
|
|
- //window.location = mod.clickUrl;
|
|
|
- uni.navigateTo({
|
|
|
- url: url
|
|
|
- })
|
|
|
- }
|
|
|
- else if(mod.linkUrl=='#'||mod.linkUrl==''){
|
|
|
-
|
|
|
- }
|
|
|
- else{
|
|
|
- uni.navigateTo({
|
|
|
- url:mod.linkUrl
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- getBannerInfo(code){
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
- newsApi.getBannerInfo(code).then((res) => {
|
|
|
- uni.hideLoading();
|
|
|
- this.bannerList =res.data;
|
|
|
-
|
|
|
- // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
-
|
|
|
- title: error,icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- getPile(){
|
|
|
-
|
|
|
+ methods: {
|
|
|
+ moneyClick_f(index,item) {
|
|
|
+ this.otherNum_f='';
|
|
|
+ this.moneyActiveClass_f = index;
|
|
|
+ if(item){
|
|
|
+ this.selectItem=item;
|
|
|
+ // if(item.imgUrl){
|
|
|
+ // this.selectImg=item
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rechargeNow() {
|
|
|
+ if(!this.checked){
|
|
|
+ uni.showToast({
|
|
|
+ title:"请同意《充值协议》后进行充值"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ this.submitForm_f={};
|
|
|
+ var fee=0;
|
|
|
+ if(!this.otherNum_f){
|
|
|
+ this.submitForm_f.chargingMarketingId=this.selectItem.id;
|
|
|
+ fee=this.selectItem.rechargeAmount
|
|
|
+ }else{
|
|
|
+ this.submitForm_f.amount=this.otherNum_f
|
|
|
+ fee=this.otherNum_f
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.fee){
|
|
|
+ var thisfee=this.fee
|
|
|
+ if(this.fee>parseFloat(fee)){
|
|
|
+ uni.showToast({
|
|
|
+ title:`最少充值${thisfee}元才能启动充电`
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+
|
|
|
+ if(this.recordId){
|
|
|
+ this.submitForm_f.recordId=this.recordId
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ //(this.submitForm)
|
|
|
+ this.wxpy()
|
|
|
+
|
|
|
+ },
|
|
|
+ wxpy(){
|
|
|
+
|
|
|
+ Pay.wxpay(this.submitForm_f).then((response) => {
|
|
|
+
|
|
|
+ if(!response.result){
|
|
|
+ uni.showToast({
|
|
|
+ title: response.message
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var data = response.data
|
|
|
+ uni.hideLoading()
|
|
|
+ //("Pay+"+new Date().getTime())
|
|
|
+ wxPayJs(data);
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+
|
|
|
+ title: error
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ focus(){
|
|
|
+ console.log(0)
|
|
|
+ uni.pageScrollTo({
|
|
|
+ scrollTop:999999,
|
|
|
+ duration:0
|
|
|
+ })
|
|
|
+ },
|
|
|
+ init() {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var data = {
|
|
|
+ type:2 ,
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+ API_finance.marketingData(data).then((res) => {
|
|
|
+
|
|
|
+ this.moneyList_f = res.data.chargingMarketingList
|
|
|
+ if (this.moneyList_f.length > 0) {
|
|
|
+ this.selectItem = this.moneyList_f[0];
|
|
|
+ this.moneyActiveClass_f = this.moneyList_f[0].id
|
|
|
+ //(this.moneyActiveClass)
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+
|
|
|
+ title: error
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ clickBanner(index){
|
|
|
+ var mod= this.bannerList[index]
|
|
|
+
|
|
|
+ if(mod.linkUrl.indexOf('http')==0){
|
|
|
+ window.location=mod.linkUrl;
|
|
|
+ }
|
|
|
+ else if(mod.linkUrl.indexOf('#/')==0){
|
|
|
+ if(mod.linkUrl.indexOf("?")==-1){
|
|
|
+ mod.linkUrl+='?';
|
|
|
+ }
|
|
|
+ //window.location=mod.linkUrl;
|
|
|
+ var url=mod.linkUrl.split("#")[1]
|
|
|
+ //window.location = mod.clickUrl;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ else if(mod.linkUrl=='#'||mod.linkUrl==''){
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ uni.navigateTo({
|
|
|
+ url:mod.linkUrl
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ getBannerInfo(code){
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ newsApi.getBannerInfo(code).then((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ this.bannerList =res.data;
|
|
|
+
|
|
|
+ // document.getElementsByClassName("uni-swiper-wrapper")[0].parentNode.style="background-color: rgb(255, 255, 255); height: 300px;"
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+
|
|
|
+ title: error,icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getPile(){
|
|
|
+
|
|
|
},
|
|
|
theme(type) {
|
|
|
|
|
@@ -495,32 +495,32 @@
|
|
|
|
|
|
this.gotoUrl('pages/user/coupon/chooseCoupons?uuid='+this.uuid+"&amount="+this.submitForm.amount+"&stationId="+this.stationId)
|
|
|
|
|
|
- },
|
|
|
- ckInput_f(text) {
|
|
|
- if (text.indexOf('.') > 0) {
|
|
|
-
|
|
|
- var k =text.split(".")[1]
|
|
|
- if(k.length>=3){
|
|
|
- this.$nextTick(()=>{
|
|
|
- text=parseFloat(text).toFixed(2);
|
|
|
- this.otherNum_f= text
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- var t = Number(text);
|
|
|
- if (t < 1) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.otherNum_f = '';
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- if (t > 500) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.otherNum_f = 500;
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ },
|
|
|
+ ckInput_f(text) {
|
|
|
+ if (text.indexOf('.') > 0) {
|
|
|
+
|
|
|
+ var k =text.split(".")[1]
|
|
|
+ if(k.length>=3){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ text=parseFloat(text).toFixed(2);
|
|
|
+ this.otherNum_f= text
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var t = Number(text);
|
|
|
+ if (t < 1) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.otherNum_f = '';
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ if (t > 500) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.otherNum_f = 500;
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
ckInput(text) {
|
|
|
if (text.indexOf('.') > 0) {
|
|
@@ -574,8 +574,8 @@
|
|
|
if(this.selectObj.id){
|
|
|
this.submitForm.userCouponId=this.selectObj.id
|
|
|
}
|
|
|
- if(this.userCardBool&&this.canUse&&this.vin){
|
|
|
- this.submitForm.userCardId=this.userCard.id
|
|
|
+ if(this.userCardBool&&this.canUse&&this.vin){
|
|
|
+ this.submitForm.userCardId=this.userCard.id
|
|
|
}
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
@@ -584,24 +584,24 @@
|
|
|
|
|
|
//this.submitForm.deviceNo = this.detail.deviceNo;
|
|
|
API.startCarCharging(this.submitForm).then((res) => {
|
|
|
- //(JSON.stringify(this.res))
|
|
|
-
|
|
|
- if(res.data.status=="5"){
|
|
|
- uni.hideLoading()
|
|
|
- this.showmodal=true;
|
|
|
- this.recordId=res.data.recordId;
|
|
|
-
|
|
|
- var fee=res.data.fee;
|
|
|
-
|
|
|
-
|
|
|
- this.fee=(fee-this.user.balance).toFixed(2);
|
|
|
- this.otherNum_f=this.fee;
|
|
|
+ //(JSON.stringify(this.res))
|
|
|
+
|
|
|
+ if(res.data.status=="5"){
|
|
|
+ uni.hideLoading()
|
|
|
+ this.showmodal=true;
|
|
|
+ this.recordId=res.data.recordId;
|
|
|
+
|
|
|
+ var fee=res.data.fee;
|
|
|
+
|
|
|
+
|
|
|
+ this.fee=(fee-this.user.balance).toFixed(2);
|
|
|
+ this.otherNum_f=this.fee;
|
|
|
}else{
|
|
|
|
|
|
this.gotoUrl("pages/searchPile/chargeProcess/dcCharging?id=" + res.data.recordId);
|
|
|
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
@@ -622,43 +622,43 @@
|
|
|
title: "加载中",
|
|
|
mask: true,
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- API.userCard({
|
|
|
- stationId:this.stationId
|
|
|
- }).then((res) => {
|
|
|
- console.log(res)
|
|
|
- this.userCard=res.data.regUserCard
|
|
|
- this.canUse=res.data.canUse
|
|
|
- //this.user = res.data
|
|
|
-
|
|
|
-
|
|
|
- API.personalCenter().then((res2) => {
|
|
|
- this.user = res2.data
|
|
|
- this.isReady = true;
|
|
|
- uni.hideLoading()
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
- title: error
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
- title: error
|
|
|
- })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ API.userCard({
|
|
|
+ stationId:this.stationId
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res)
|
|
|
+ this.userCard=res.data.regUserCard
|
|
|
+ this.canUse=res.data.canUse
|
|
|
+ //this.user = res.data
|
|
|
+
|
|
|
+
|
|
|
+ API.personalCenter().then((res2) => {
|
|
|
+ this.user = res2.data
|
|
|
+ this.isReady = true;
|
|
|
+ uni.hideLoading()
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
useCoupon(){
|
|
|
- var obj={
|
|
|
- status:0,
|
|
|
- stationId:this.stationId
|
|
|
+ var obj={
|
|
|
+ status:0,
|
|
|
+ stationId:this.stationId
|
|
|
}
|
|
|
- if(this.userCardBool) {
|
|
|
- obj.userCardId=this.userCard.id
|
|
|
+ if(this.userCardBool) {
|
|
|
+ obj.userCardId=this.userCard.id
|
|
|
}
|
|
|
|
|
|
userApi.couponList(obj).then((res) => {
|
|
@@ -714,30 +714,30 @@
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
- .textinfo{
|
|
|
- padding: 40rpx;
|
|
|
- font-size: 14px !important;
|
|
|
- color: #999999;
|
|
|
-
|
|
|
- p{
|
|
|
- font-size: 16px !important;
|
|
|
- color:#101010;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
- }
|
|
|
- .lefttitle{
|
|
|
- font-weight: bold;
|
|
|
- font-size: 16px
|
|
|
+<style lang="scss" scoped>
|
|
|
+ .textinfo{
|
|
|
+ padding: 40rpx;
|
|
|
+ font-size: 14px !important;
|
|
|
+ color: #999999;
|
|
|
+
|
|
|
+ p{
|
|
|
+ font-size: 16px !important;
|
|
|
+ color:#101010;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .lefttitle{
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px
|
|
|
}
|
|
|
@import "@/_theme.scss";
|
|
|
.listlength{
|
|
|
float: right;
|
|
|
padding-right: 10px;
|
|
|
}
|
|
|
- /deep/.u-drawer-content{
|
|
|
- border-radius: 10px 10px 0 0
|
|
|
- }
|
|
|
+ /deep/.u-drawer-content{
|
|
|
+ border-radius: 10px 10px 0 0
|
|
|
+ }
|
|
|
|
|
|
/deep/.u-radio-group {
|
|
|
width: 100%;
|
|
@@ -1024,7 +1024,7 @@ position: relative;
|
|
|
|
|
|
|
|
|
// 尾部
|
|
|
- .bottom {
|
|
|
+ .bottom {
|
|
|
background: #fff;
|
|
|
width: 100%;
|
|
|
// height: 64px;
|
|
@@ -1038,7 +1038,7 @@ position: relative;
|
|
|
.botton {
|
|
|
//width: 343px;
|
|
|
height: 40px;
|
|
|
- line-height: 40px;
|
|
|
+ line-height: 40px;
|
|
|
font-size:16px;
|
|
|
border-radius: 50px;
|
|
|
background-color: rgba(0, 185, 98, 100);
|