From 7bd7775908aa73d9980eef10629e4185c9ac3a98 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 22 Jun 2022 10:54:16 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 31 ++++ apis/modules/order.js | 4 + apis/request.js | 14 +- libs/util.js | 10 +- order/addCourse/addCourse.vue | 56 ++++--- order/curClient/curClient.vue | 243 ++++++++++++++++++++++++++++ order/editCourse/editCourse.vue | 44 +++-- order/orderDetail/orderDetail.vue | 156 +++++++++++------- order/ordered/ordered.vue | 1 - order/orders/orders.vue | 10 +- pages.json | 12 +- pages/account/account.vue | 4 +- pages/clientDetail/clientDetail.vue | 9 +- pages/clients/clients.vue | 2 +- pages/email/email.vue | 4 +- pages/index/index.vue | 3 +- pages/person/person.vue | 1 - pages/phone/phone.vue | 8 +- pages/plans/plans.vue | 2 +- pages/products/products.vue | 2 +- pages/setting/setting.vue | 20 ++- static/image/trash.png | Bin 0 -> 416 bytes styles/common.scss | 2 +- 23 files changed, 509 insertions(+), 129 deletions(-) create mode 100644 order/curClient/curClient.vue create mode 100644 static/image/trash.png diff --git a/App.vue b/App.vue index d996bf2..71b9db2 100644 --- a/App.vue +++ b/App.vue @@ -4,7 +4,38 @@ }, onShow: function() { + console.log('App Launch'); + const updateManager = uni.getUpdateManager(); + // 检查小程序是否有新版本发布 + updateManager.onCheckForUpdate(function (res) { + // 请求完新版本信息的回调 + console.log('onCheckForUpdate', res.hasUpdate); + }); + // 小程序有新版本,则静默下载新版本,做好更新准备 + updateManager.onUpdateReady(function (res) { + console.log('onUpdateReady', res); + uni.showModal({ + title: '更新提示', + content: '新版本已经准备好,点击确定重新启动', + showCancel:false, + success(res) { + if (res.confirm) { + // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 + updateManager.applyUpdate(); + } + } + }); + }); + + updateManager.onUpdateFailed(function (res) { + console.log('onUpdateFailed', res); + // 新的版本下载失败 + uni.showModal({ + title: '已经有新版本了哟~', + content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~' + }); + }) } } diff --git a/apis/modules/order.js b/apis/modules/order.js index 053256b..345afca 100644 --- a/apis/modules/order.js +++ b/apis/modules/order.js @@ -25,6 +25,10 @@ export const list = (data) => { return post('nakadai/applets/order/orderList', data) } +export const orderList = (data) => { + return post('nakadai/nakadai/order/list', data) +} + export const del = (data) => { return post('nakadai/nakadai/order/delete', data) } \ No newline at end of file diff --git a/apis/request.js b/apis/request.js index 9f0f320..b42f7bb 100644 --- a/apis/request.js +++ b/apis/request.js @@ -5,11 +5,11 @@ const request = options => { HTTP_COUNT++ if (config.showLoading) { // 请求数据时的loading - uni.showToast({ - title: '加载中', - duration: 200, - icon: 'loading' - }) + // uni.showToast({ + // title: '加载中', + // duration: 200, + // icon: 'loading' + // }) } const header = Object.assign({}, config.headers, { token: uni.getStorageSync('token') @@ -59,8 +59,8 @@ const request = options => { }, complete: () => { if (config.showLoading) { - HTTP_COUNT-- - HTTP_COUNT || uni.hideLoading() + // HTTP_COUNT-- + // HTTP_COUNT || uni.hideLoading() } } }) diff --git a/libs/util.js b/libs/util.js index b6f73c3..2fdba01 100644 --- a/libs/util.js +++ b/libs/util.js @@ -13,16 +13,18 @@ export default { }) }, // 成功提示 - sucMsg(title) { + sucMsg(title, duration = 1500) { uni.showToast({ - title + title, + duration }) }, // 错误提示 - errMsg(title) { + errMsg(title, duration = 1500) { uni.showToast({ title, - icon: 'none' + icon: 'none', + duration }) }, // 如果非数字,则返回0 diff --git a/order/addCourse/addCourse.vue b/order/addCourse/addCourse.vue index 3fcc905..6e94c0f 100644 --- a/order/addCourse/addCourse.vue +++ b/order/addCourse/addCourse.vue @@ -9,8 +9,8 @@