From d71cd65494106212e3fccec37e6f6f9f8514c15e Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 5 Jul 2022 18:04:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0loading=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/modules/order.js | 4 ++ apis/request.js | 3 +- config/request.js | 4 +- order/addCourse/addCourse.vue | 8 +++- order/curClient/curClient.vue | 74 +++++++++++++++++++---------- order/orderDetail/orderDetail.vue | 8 +++- order/ordered/ordered.vue | 8 +++- order/orders/orders.vue | 1 - pages/clientDetail/clientDetail.vue | 8 +++- pages/index/index.vue | 5 +- 10 files changed, 87 insertions(+), 36 deletions(-) diff --git a/apis/modules/order.js b/apis/modules/order.js index 202586c..0d8332b 100644 --- a/apis/modules/order.js +++ b/apis/modules/order.js @@ -31,4 +31,8 @@ export const orderList = (data) => { export const del = (data) => { return post('nakadai/nakadai/order/delete', data) +} + +export const miniProgramOrderRecord = (data) => { + return post('nakadai/nakadai/applets/order/miniProgramOrderRecord', data) } \ No newline at end of file diff --git a/apis/request.js b/apis/request.js index 20fb794..a75d827 100644 --- a/apis/request.js +++ b/apis/request.js @@ -14,11 +14,12 @@ const request = options => { const header = Object.assign({}, config.headers, { token: uni.getStorageSync('token') }) - const otherUrl = ['generateInvitationCode', 'weChatAppletCallback', 'userBinding', 'getUserRolesPermissionMenu'] + const otherUrl = ['getTeamsByAccountId'] return new Promise((resolve, reject)=>{ const { url } = options uni.request({ header, + // url: (otherUrl.map(e => config.baseURL.includes(e)) ? 'http://192.168.31.137:9000/' : config.baseURL) + url, url: config.baseURL + url, method: options.method || 'GET', // 请求类型,默认为GET data: options.data || {}, // 请求参数,默认空对象 diff --git a/config/request.js b/config/request.js index 923a5ae..042bc89 100644 --- a/config/request.js +++ b/config/request.js @@ -1,12 +1,12 @@ /** /** - * axios 配置文件 + * 请求配置文件 * @author yujialong */ export default { // baseURL: 'https://huorantech.cn/', - // baseURL: 'http://192.168.31.137:9000/', + // baseURL: 'http://192.168.31.151:9000/', baseURL: 'http://121.37.12.51/', headers: { 'Content-Type': 'application/json;charset=UTF-8' diff --git a/order/addCourse/addCourse.vue b/order/addCourse/addCourse.vue index b06fef6..c570a2e 100644 --- a/order/addCourse/addCourse.vue +++ b/order/addCourse/addCourse.vue @@ -110,6 +110,9 @@ methods: { // 获取课程列表 getList() { + uni.showLoading({ + title: '加载中' + }) AppletsDataProductList({ sort: 'desc', keywords: this.keyword, @@ -144,7 +147,10 @@ const noMore = this.list.length === data.total // 是否加载完所有数据 this.status = noMore ? 'noMore' : 'more' // 加载完了则设置为noMore this.reachBottom = noMore ? -1 : 0 // 加载完了则设置为-1 - }).catch(e => {}) + uni.hideLoading() + }).catch(e => { + uni.hideLoading() + }) }, initList() { this.page = 1 diff --git a/order/curClient/curClient.vue b/order/curClient/curClient.vue index 8cf0fa9..f3a856e 100644 --- a/order/curClient/curClient.vue +++ b/order/curClient/curClient.vue @@ -33,8 +33,8 @@ 订单内容: - {{ item.orderContent }} - {{ item.toggle ? '收起' : '展开' }} + {{ item.productName }} + {{ item.toggle ? '收起' : '展开' }} @@ -50,6 +50,7 @@ + @@ -59,7 +60,7 @@