diff --git a/common/http.interceptor.js b/common/http.interceptor.js index ba41f6e..6a9e324 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -11,9 +11,9 @@ const install = (Vue, vm) => { // 俞山岛 // baseUrl: 'https://zc.chuangtewl.com/prod-api', // baseUrl: 'https://testzc.chuangtewl.com/prod-api', - // baseUrl: 'https://zc.chuangtewl.com/prod-api', + baseUrl: 'https://zc.chuangtewl.com/prod-api', // baseUrl: 'http://47.120.68.19:8090', - baseUrl: 'http://192.168.2.21:8090', + // baseUrl: 'http://192.168.2.21:8090', // 创特 loadingText: '努力加载中~', loadingTime: 10000, diff --git a/page_Merchant/addStore.vue b/page_Merchant/addStore.vue index 8fac65e..f04b6bc 100644 --- a/page_Merchant/addStore.vue +++ b/page_Merchant/addStore.vue @@ -245,7 +245,12 @@ if (res.code == 200) { this.list = res.data - + uni.showToast({ + title: '添加成功', + icon: 'none', + duration: 2000 + }); + uni.navigateBack() } else { @@ -260,7 +265,7 @@ btn() { let _this = this let math = 'static/' + _this.$u.guid(20) - uni.chooseMessageFile({ + uni.chooseImage({ count: 1, type: 'all', success(res) { diff --git a/page_Merchant/device_Detail.vue b/page_Merchant/device_Detail.vue index c881544..bba7269 100644 --- a/page_Merchant/device_Detail.vue +++ b/page_Merchant/device_Detail.vue @@ -31,7 +31,11 @@ --> - + + + 上架 + + 下架 @@ -456,7 +460,22 @@ } }) } else if (num == 4) { - + uni.showLoading({ + title: '加载中...' + }) + this.$u.post('/appAdmin/device/online?sn=' + this.sn).then((res) => { + if (res.code == 200) { + this.deviceInfo() + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + } else { + // uni.hideLoading() + // this.bulebtn(4) + } + }) } else if (num == 5) { diff --git a/page_Merchant/order.vue b/page_Merchant/order.vue index 4a66fb5..c592797 100644 --- a/page_Merchant/order.vue +++ b/page_Merchant/order.vue @@ -35,7 +35,7 @@ - + {{item.model}} @@ -98,7 +98,7 @@ {{item.payFee}}元 - + 确认还车 @@ -183,6 +183,24 @@ }, methods: { + backcar(item){ + this.$u.post(`appVerify/merchantReturn?orderNo=` + item.orderNo).then((res) => { + if (res.code === 200) { + this.getList() + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, todetal(item){ uni.navigateTo({ url:'/page_Merchant/order_Detail?orderNo='+item.orderNo @@ -208,6 +226,7 @@ }) }, + getList() { let data = { @@ -219,7 +238,19 @@ this.$u.get("appAdmin/orderList?", data).then((res) => { if (res.code == 200) { - + // res.data.forEach((newItem) => { + // // 假设每一条数据有一个唯一标识符,比如 id + // const existingIndex = this.orderList.findIndex(item => item.orderId == newItem + // .orderId); + + // if (existingIndex !== -1) { + // // 如果找到相同 id 的数据,更新旧数据 + // this.$set(this.orderList, existingIndex, newItem); + // } else { + // // 如果没有找到,则追加新数据 + // this.orderList.push(newItem); + // } + // }); this.orderList = res.data } else { diff --git a/page_Merchant/order_Detail.vue b/page_Merchant/order_Detail.vue index 85f9e37..7e6024f 100644 --- a/page_Merchant/order_Detail.vue +++ b/page_Merchant/order_Detail.vue @@ -382,7 +382,7 @@ - + 立即接单 @@ -393,7 +393,12 @@ 配送完成 - + + + + 确认还车 + + @@ -428,6 +433,24 @@ }, methods: { + backcar(){ + this.$u.post(`appVerify/merchantReturn?orderNo=` + this.orderInfo.orderNo).then((res) => { + if (res.code === 200) { + this.getOrderInfo() + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + } else { + uni.showToast({ + title: res.msg, + icon: 'none', + duration: 2000 + }); + } + }); + }, typeReturns(num) { console.log(num,'aaaaaaaaaaaa'); let result = { @@ -668,7 +691,7 @@ } }, timetype(time) { - if (time == 'hour') { + if (time == 'hours') { return '小时' } else if (time == 'day') { return '天' @@ -718,6 +741,8 @@ return '超时取消' } else if (num == 6) { return '已取消' + }else if (num == 7) { + return '待审核' } else if (num == 8) { return '订单已结束' } diff --git a/pages/index/index.vue b/pages/index/index.vue index 54009fd..07f205c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -233,7 +233,7 @@ topage(num){ if(num==0){ uni.navigateTo({ - url:'/page_Merchant/order' + url:'/page_Merchant/deviceMgmt' }) }else if(num==1){ uni.navigateTo({ diff --git a/pages/login/login.vue b/pages/login/login.vue index 62c886c..58a2eb2 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -344,7 +344,7 @@ }); return; } - this.$u.put("/app/forgetAppPwd?phone="+this.phone2+'&newPassword='+this.password2+'&phoneCode='+this.phoneCode2+'&uuid='+this.uuid).then((res) => { + this.$u.put("/appAdmin/forgetAppPwd?phone="+this.phone2+'&newPassword='+this.password2+'&phoneCode='+this.phoneCode2+'&uuid='+this.uuid).then((res) => { if (res.code == 200) { // 登录成功后的操作 this.pageindex=2 @@ -389,7 +389,7 @@ } - this.$u.post("/appCodeLogin", data).then((res) => { + this.$u.post("/appAdmin/appCodeLogin", data).then((res) => { if (res.code == 200) { // 登录成功后的操作 wx.setStorageSync('token', res.token); @@ -448,7 +448,7 @@ return; } this.isCodeButtonDisabled = true; - this.$u.get("/appCaptcha?type=1&phone=" + this.phone).then((res) => { + this.$u.get("/appAdmin/appCaptcha?type=1&phone=" + this.phone).then((res) => { if (res.code == 200) { this.uuid = res.uuid this.startCountdown(); @@ -481,7 +481,7 @@ return; } this.isCodeButtonDisabled2 = true; - this.$u.get("/appCaptcha?type=1&phone=" + this.phone2).then((res) => { + this.$u.get("appAdmin/appCaptcha?type=1&phone=" + this.phone2).then((res) => { if (res.code == 200) { this.uuid = res.uuid this.startCountdown2(); @@ -550,7 +550,7 @@ uuid: this.uuid, openid:this.openCode } - this.$u.post("/appCodeLogin", data).then((res) => { + this.$u.post("appAdmin/appCodeLogin", data).then((res) => { if (res.code == 200) { // 登录成功后的操作 wx.setStorageSync('token', res.token);