From c84e0d0e2ae1403fc7dbba4367b7ff5e40cf432b Mon Sep 17 00:00:00 2001 From: "3321822538@qq.com" <3321822538@qq.com> Date: Tue, 8 Oct 2024 17:58:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.interceptor.js | 4 +- page_fenbao/editshenhe.vue | 6 + .../statulist/myshop/editshop/index.vue | 9 +- page_fenbao/statulist/myshop/shopxx/index.vue | 10 +- page_user/skzh.vue | 8 +- pages.json | 10 + pages/login/login.vue | 88 ++-- pages/my.vue | 12 +- pages/tongji.vue | 478 ++++++++++++++++++ 9 files changed, 581 insertions(+), 44 deletions(-) create mode 100644 pages/tongji.vue diff --git a/common/http.interceptor.js b/common/http.interceptor.js index dec621d..9c734f5 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -19,8 +19,8 @@ const install = (Vue, vm) => { // }, // }); Vue.prototype.$u.http.setConfig({ - baseUrl: 'http://192.168.2.81:10002', - // baseUrl: 'https://kg.chuangtewl.com/prod-api', + // baseUrl: 'http://192.168.2.81:10002', + baseUrl: 'https://kg.chuangtewl.com/prod-api', // loadingText: '努力加载中~', // loadingTime: 1000, // 设置自定义头部content-type diff --git a/page_fenbao/editshenhe.vue b/page_fenbao/editshenhe.vue index 6e1cba4..8e9b03b 100644 --- a/page_fenbao/editshenhe.vue +++ b/page_fenbao/editshenhe.vue @@ -56,6 +56,10 @@ 是否展示店铺 + + 是否允许在非营业时间使用 + + + @@ -207,40 +211,62 @@ this.usertype = '00' } }, - getPhoneNumber(e) { - let that = this; - console.log("eeeeeeee", e); - const wxLoginAsync = () => { - return new Promise((resolve, reject) => { - wx.login({ - success(res) { - if (res.code) { - let data = { - loginCode: res.code, - mobileCode: e.detail.code, - } - resolve(data); - } else { - reject(res.errMsg) - } - }, - fail(err) { - reject(err) + getPhoneNumber(){ + let taht = this + wx.login({ + success(res) { + if (res.code) { + let data = { + loginCode: res.code, } - }) - }) - } - wxLoginAsync().then(async (data) => { - this.$u.post("/app/auth/wxLogin", data).then((res) => { - if (res.code == 200) { - wx.setStorageSync('token', res.token); - that.ceshi() + taht.$u.post('/app/auth/wxLogin', data).then(res => { + if (res.code == 10003) { + uni.navigateTo({ + url: '/pages/login/login' + }) + } else if (res.code == 200) { + uni.setStorageSync('token', res.token) + taht.ceshi() + } + }) } - }) - }).catch((err) => { - console.error(err) + }, }) }, + // getPhoneNumber(e) { + // let that = this; + // console.log("eeeeeeee", e); + // const wxLoginAsync = () => { + // return new Promise((resolve, reject) => { + // wx.login({ + // success(res) { + // if (res.code) { + // let data = { + // loginCode: res.code, + // mobileCode: e.detail.code, + // } + // resolve(data); + // } else { + // reject(res.errMsg) + // } + // }, + // fail(err) { + // reject(err) + // } + // }) + // }) + // } + // wxLoginAsync().then(async (data) => { + // this.$u.post("/app/auth/wxLogin", data).then((res) => { + // if (res.code == 200) { + // wx.setStorageSync('token', res.token); + // that.ceshi() + // } + // }) + // }).catch((err) => { + // console.error(err) + // }) + // }, async ceshi() { this.$u.get("/app/user/userInfo").then((res) => { if (this.id == 1) { diff --git a/pages/my.vue b/pages/my.vue index e917a1b..c29b7ac 100644 --- a/pages/my.vue +++ b/pages/my.vue @@ -70,6 +70,10 @@ 订单管理 + + + 订单统计 + 设备故障 @@ -78,10 +82,10 @@ 商家合作 --> - + + + + + 今日 + 昨日 + 近七日 + 本月 + + + + + + + 搜索 + + + + + 店铺 + 设备 + 订单数 + 时长 + 电量 + 金额 + + + + + + {{ row.storeName }} + {{row.deviceCount}}台 + {{row.orderCount}}单 + {{row.formattedDuration}} + {{row.ele}}度 + {{row.arrivalAmount}}元 + + + + {{ val.deviceName }} + {{ val.orderCount }}单 + {{ val.formattedDuration}} + {{ val.ele}}度 + {{ val.arrivalAmount }}元 + + + + + + + + + + \ No newline at end of file