diff --git a/App.vue b/App.vue index f82fa64..3df46e8 100644 --- a/App.vue +++ b/App.vue @@ -65,10 +65,15 @@ } }) this.onShareAppMessage() - + this.watchOnline() }, methods: { + watchOnline(){ + uni.$on('isOnline',(e)=>{ + this.loginStatus = e + }) + }, getFilterData() { oilSiteApi.getCheckInfo().then(res => { if (res.code == 20000) { @@ -184,14 +189,14 @@ // 是否token过期或ip更改 getAmount() { clearTimeout(loginTimer) - accountApi.getTotalOilCardInfo().then(res => { - if (res.code == 20000) { - this.loginStatus = 'online' - } else if (res.code == 42011) { - this.loginStatus = 'offline' - this.msg = res.msg - } - }) + // accountApi.getTotalOilCardInfo().then(res => { + // if (res.code == 20000) { + // this.loginStatus = 'online' + // } else if (res.code == 42011) { + // this.loginStatus = 'offline' + // this.msg = res.msg + // } + // }) }, }, diff --git a/BagAuth/pages/login/oldLogin.vue b/BagAuth/pages/login/oldLogin.vue index b098323..e2e546a 100644 --- a/BagAuth/pages/login/oldLogin.vue +++ b/BagAuth/pages/login/oldLogin.vue @@ -53,10 +53,10 @@ - + 当前为验证码登录 - + 当前为密码登录 @@ -136,7 +136,7 @@ }, data() { return { - showRandom: true, + showRandom: false, animation: '', hasPhone: false, userHandle: false, @@ -181,6 +181,7 @@ // this.showRandom = true }, ifRegistered() { + let that = this if (this.driver.username.length != 11) { uni.showToast({ title: '手机码验证不通过', diff --git a/BagStation/orderDetail/orderDetail.vue b/BagStation/orderDetail/orderDetail.vue index a34a303..1613544 100644 --- a/BagStation/orderDetail/orderDetail.vue +++ b/BagStation/orderDetail/orderDetail.vue @@ -120,7 +120,7 @@ 加油司机: - {{order.customerName}} {{order.customerCode}} + {{user.name}} 油卡性质: @@ -187,8 +187,8 @@ order: {}, tyIntervalCount: 0, tySqRes: {}, - tyPayMethod: null - + tyPayMethod: null, + user: uni.getStorageSync('user'), } }, @@ -219,19 +219,39 @@ // },1000) } }, + onLoad(option) { + this.id = option.id; + console.log(option,'optionoptionoptionoption') + this.getOrderInfo(); + uni.showShareMenu(); + this.getOrderQrCode(); + let _that = this; + + }, + onUnload(){ + if(this.timeinterval)clearInterval(this.timeinterval); + }, + onHide(){ + console.log('onHide') + }, methods: { newQrString() { this.getOrderQrCode() }, getOrderQrCode(){ - oilSiteApi.getOrderQrCode(this.order.orderSerialNumber).then( (res)=>{ - console.log(res) + oilSiteApi.getOrderQrCode(this.id).then( (res)=>{ this.val = res.data if(res.code == 40000){ this.showQr = false }else if(res.code == 20000){ this.showQr = true - this.val =res.data.codeStr + this.val =res.data.codeStr; + if(!this.timeinterval){ + this.timeinterval = setInterval(() => { + console.log('进入循环') + this.newQrString() + }, 1000 * 60 * 3); + } } } ) }, @@ -303,7 +323,7 @@ if (res.code == 20000) { this.order = res.data uni.setStorageSync('oilItem', res.data) - this.getOrderQrCode() + // this.getOrderQrCode() if (res.data.payMethod == 2) { this.tyPayMethod = res.data.payMethod // this.queryOrderStatusSq() @@ -333,6 +353,8 @@ duration: 1000 }) setTimeout(() => { + uni.navigateBack(); + uni.$emit('orderLisetUpdate') this.$emit('refresh') }, 1000) @@ -367,16 +389,7 @@ } }, - onLoad(option) { - this.id = option.id - this.getOrderInfo() - uni.showShareMenu() - let _that = this - this.timeinterval = setInterval(() => { - console.log('1') - _that.newQrString() - }, 1000 * 60 * 3); - }, + filters: { moneyFormat(value) { if (value != 'xxx.x') { diff --git a/BagStation/pages/components/price-select-tab.vue b/BagStation/pages/components/price-select-tab.vue index 85967ee..0eee8f6 100644 --- a/BagStation/pages/components/price-select-tab.vue +++ b/BagStation/pages/components/price-select-tab.vue @@ -43,7 +43,6 @@ {{item.name}} HOT - @@ -519,7 +518,8 @@ }, channelId() { if (this.channelList.length && this.channelList[this.activeCur]) { - let channelId = this.channelList[this.activeCur].channelId + let channelId = this.channelList[this.activeCur].channelId; + console.log( this.channelList,'********') this.getNewSitePrice(channelId) this.activeChannelCode = this.channelList[this.activeCur].channelCode return channelId @@ -586,9 +586,9 @@ let number = { payType : 'CUSTOMER_ACTIVE', userType:'0', - xoilAmountGun:e , - priceId:this.activeSitePrice, - clientBelong: "ZHONGPIN" + sitePriceAmount:e , + sitePriceId:this.activeSitePrice, + targetApp: "SAAS" } this.xoilAmountGun = e oilSiteApi.getOrderDiscountInfo(number).then( res=>{ @@ -635,9 +635,10 @@ let number = { payType : 'CUSTOMER_ACTIVE', userType:'0', - xoilAmountGun:e.detail.value, - priceId:this.activeSitePrice, - clientBelong: "ZHONGPIN" + sitePriceAmount:e.detail.value, + sitePriceId:this.activeSitePrice, + clientBelong: "ZHONGPIN", + targetApp: "SAAS" } this.xoilAmountGun = e.detail.value oilSiteApi.getOrderDiscountInfo(number).then( res=>{ @@ -883,7 +884,7 @@ 'clientBelong':'ZHONGPIN', "amountGun": this.activeChannelCode == 'TY' ? this.ty.realMoney : '', "shareCompanyQuota": 0, // 共享标识 - "priceId": this.oilSitePriceDetailsVo[this.radio].priceId, //类型:String 必有字段 备注:油价主键 + "sitePriceId": this.oilSitePriceDetailsVo[this.radio].priceId, //类型:String 必有字段 备注:油价主键 "orderType": "REAL_ORDER", //类型:String 必有字段 备注:订单类型(REAL_ORDER:真实订单 VIRTUAL_ORDER:虚拟订单) "orderSource": "WECHAT_MINIAPPS", //类型:String 必有字段 备注:订单来源(WECHAT_MINIAPPS) "plateNumber": this.plateNumber ? this.plateNumber : this.plateNumberSel, //类型:String 必有字段 备注:车牌号 @@ -896,7 +897,12 @@ // "deviceImei": "mock", //类型:String 可有字段 备注:设备唯一码 // "networkIp": "mock" //类型:String 可有字段 备注:ip地址, 'version':1, - 'xoilAmountGun':this.vol + 'sitePriceAmount':this.vol, + "orderMethod": "SITE_SCAN", // 订单支付方式 + "targetApp": "SAAS", // 小程序来源 + // "longitude": "1231.23", // 当前位置经度 + // "latitude": "1321.23" // 当前位置纬度 + ...uni.getStorageSync('location'), } console.log(orderData,'orderDataorderDataorderDataorderDataorderDataorderDataorderDataorderData'); oilOrderApi.createOrder(orderData).then(res => { @@ -908,7 +914,8 @@ }) } }).finally(msg=>{ - clearTimeout(this.timer) + clearTimeout(this.timer); + this.timer = null }) },500) } @@ -923,8 +930,8 @@ getNewSitePrice(channelId) { this.oilSitePriceDetailsVo = [] oilSiteApi.getNewSitePriceZp({ - channelId:channelId, - clientBelong: "ZHONGPIN" + siteId:channelId, + // clientBelong: "ZHONGPIN" }).then(res => { if (res.code == 20000) { this.plateNumbers = res.data.plateNumbers @@ -968,6 +975,7 @@ for (let i = 0, lenI = items.length; i < lenI; ++i) { if (items[i].value == values) { items[i].checked = !items[i].checked; + this.oilBar =items[i].checked?items[i].value:'' } else { items[i].checked = false } diff --git a/BagStation/pages/components/price-tab.vue b/BagStation/pages/components/price-tab.vue index 4bfb7e2..e4f2b1f 100644 --- a/BagStation/pages/components/price-tab.vue +++ b/BagStation/pages/components/price-tab.vue @@ -1,24 +1,19 @@