From 1cb780b1762c62751c7f5f26132f3a7aa4ef3e2f Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期四, 23 三月 2023 16:45:30 +0800 Subject: [PATCH] 微信登录修改,呼叫客服功能(完成) --- pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue index b33e955..b9a1b3b 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/weighingDevice/weighingDevice.vue @@ -90,29 +90,29 @@ // pingMessage: JSON.stringify({ type: 'ping' }) // 蹇冭烦璇锋眰淇℃伅 // } // 涓存椂绉伴噸瀵硅薄 - temporaryWeighObj:{ - skin:0, - hair:0, - clean:0 + temporaryWeighObj: { + skin: 0, + hair: 0, + clean: 0 }, - infraredStatus:false// 绾㈠鐘舵�� + infraredStatus: false // 绾㈠鐘舵�� }; }, - watch:{ - realTimeWeigh(newV,oldV){ - if(this.weighList.orderTye == '澶栭攢'){ - if(this.weighList.skin == 0){ - this.temporaryWeighObj.skin = this.realTimeWeigh + watch: { + realTimeWeigh(newV, oldV) { + if (this.weighList.orderTye == '澶栭攢') { + if (this.weighList.skin == 0) { + this.temporaryWeighObj.skin = this.realTimeWeigh; } else { - this.temporaryWeighObj.hair = this.realTimeWeigh - this.temporaryWeighObj.clean = this.temporaryWeighObj.hair - this.weighList.skin + this.temporaryWeighObj.hair = this.realTimeWeigh; + this.temporaryWeighObj.clean = this.temporaryWeighObj.hair - this.weighList.skin; } - } else if(this.weighList.orderTye == '澶栬喘'){ - if(this.weighList.hair == 0){ - this.temporaryWeighObj.hair = this.realTimeWeigh + } else if (this.weighList.orderTye == '澶栬喘') { + if (this.weighList.hair == 0) { + this.temporaryWeighObj.hair = this.realTimeWeigh; } else { - this.temporaryWeighObj.skin = this.realTimeWeigh - this.temporaryWeighObj = this.weighList.hair - this.temporaryWeighObj.skin + this.temporaryWeighObj.skin = this.realTimeWeigh; + this.temporaryWeighObj = this.weighList.hair - this.temporaryWeighObj.skin; } } } @@ -134,7 +134,7 @@ return false; } } - }, + } }, methods: { init() { @@ -227,13 +227,13 @@ // 鑾峰彇鏈嶅姟鍣ㄤ紶鏉ョ殑鏁版嵁锛屽仛鐩稿簲澶勭悊 socket.onMessage(res => { console.log('socketWeigh', res); - let nowWeighObj = JSON.parse(res.data.slice(7)) + let nowWeighObj = JSON.parse(res.data.slice(7)); if (nowWeighObj.eqCode == this.weighHouseCode) { - if(nowWeighObj.eqInfraredStatus){ - this.infraredStatus = true + if (nowWeighObj.eqInfraredStatus) { + this.infraredStatus = true; this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; - }else{ - this.infraredStatus = false + } else { + this.infraredStatus = false; this.weighData.weigh = this.realTimeWeigh = nowWeighObj.weigh; } } -- Gitblit v1.9.1