|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view style="background-color: #fff; padding-bottom: 196px;">
|
|
|
+ <view style="background-color: #fff; padding-bottom: 40px;">
|
|
|
<u-navbar title="启动中">
|
|
|
</u-navbar>
|
|
|
<view class="iconfont tittle-font">
|
|
@@ -116,93 +116,25 @@
|
|
|
},
|
|
|
onLoad(op) {
|
|
|
if (op.id) {
|
|
|
- this.submitForm.deviceNo = op.deviceNo;
|
|
|
- this.submitForm.channelNo = op.gun;
|
|
|
- this.submitForm.carNumber = op.carNumber;
|
|
|
-
|
|
|
+ this.id = op.id;
|
|
|
+ this.getInfo()
|
|
|
}
|
|
|
|
|
|
|
|
|
},
|
|
|
- onShow() {
|
|
|
- this.getHomePage()
|
|
|
+ onReady() {
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
- ckInput(text){
|
|
|
- if(text.indexOf('.')>0){
|
|
|
-
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.otherNum=text.substring(0,text.indexOf('.'))
|
|
|
- uni.showToast({
|
|
|
- title:"请输入正整数"
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- var t =Number(text);
|
|
|
- if(t<1){
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.otherNum='';
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
- if(t>500){
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.otherNum=500;
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- },
|
|
|
- moneyClick(index) {
|
|
|
- this.moneyActiveClass = index;
|
|
|
-
|
|
|
- },
|
|
|
- confirm() {
|
|
|
-
|
|
|
- //console.log(JSON.stringify(this.submitForm))
|
|
|
-
|
|
|
-
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
-
|
|
|
- //this.submitForm.deviceNo = this.detail.deviceNo;
|
|
|
- API.startCarCharging(this.submitForm).then((res) => {
|
|
|
- console.log(JSON.stringify(this.res))
|
|
|
- this.gotoUrl("pages/searchPile/chargeProcess/dcCharging?id="+res.data.recordId);
|
|
|
-
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- uni.hideLoading()
|
|
|
- if (error == '用户账户余额不足!') {
|
|
|
- uni.showModal({
|
|
|
- title: '支付',
|
|
|
- content: '用户账户余额不足,是否充值?',
|
|
|
- success: res => {
|
|
|
- if (res.confirm) {
|
|
|
- //付钱 改为组件
|
|
|
- this.gotoUrl("pages/user/finance/recharge");
|
|
|
-
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('用户点击取消');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: error
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
- getHomePage() {
|
|
|
+
|
|
|
+ getInfo() {
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
|
mask: true,
|
|
|
})
|
|
|
- API.personalCenter().then((res) => {
|
|
|
+ API.chargingDetail({
|
|
|
+ id:this.id
|
|
|
+ }).then((res) => {
|
|
|
this.user = res.data
|
|
|
this.isReady = true;
|
|
|
uni.hideLoading()
|