From 1c95bf74ea9121481c70195581a463a04f444ac1 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 19 Jul 2023 10:51:11 +0800 Subject: [PATCH] fix --- config/request.js | 4 +- order/clientDetail/clientDetail.vue | 4 +- order/orderDetail/orderDetail.vue | 4 +- pages/index/index.vue | 3 - pages/login/login.vue | 12 ++-- pages/person/person.vue | 86 +++++++++++++++++++++++++++-- pages/reg/reg.vue | 25 ++------- pages/workbench/workbench.vue | 7 ++- team/qrcode/qrcode.vue | 4 +- 9 files changed, 105 insertions(+), 44 deletions(-) diff --git a/config/request.js b/config/request.js index d6c6600..6f3a944 100644 --- a/config/request.js +++ b/config/request.js @@ -5,9 +5,9 @@ */ export default { - // baseURL: 'https://huorantech.cn/', + baseURL: 'https://huorantech.cn/', // baseURL: 'http://192.168.31.152:9000/', - baseURL: 'http://121.37.12.51/', + // baseURL: 'http://121.37.12.51/', headers: { 'Content-Type': 'application/json;charset=UTF-8' }, diff --git a/order/clientDetail/clientDetail.vue b/order/clientDetail/clientDetail.vue index ef935aa..9dedc19 100644 --- a/order/clientDetail/clientDetail.vue +++ b/order/clientDetail/clientDetail.vue @@ -107,6 +107,7 @@ return { isDetail: false, customerId: '', + shopCart: false, // 客户类型 customerTypeList: [{ name: '正式', @@ -164,6 +165,7 @@ const { options } = pages[pages.length - 1] this.customerId = options.customerId this.isDetail = !!options.show + this.shopCart = options.shopCart // 从购物车进去订单的标识 options.customerId && this.getInfo() // 非详情才需要查询学校和行业 @@ -323,7 +325,7 @@ if (res.confirm) { // 选择是则直接跳转到新建订单页面,并且选中当前新加的客户 uni.redirectTo({ - url: `/order/orderDetail/orderDetail?customerId=${customerId}` + url: `/order/orderDetail/orderDetail?customerId=${customerId}${that.shopCart ? '&shopCart=1' : ''}` }) } else if (res.cancel) { uni.navigateBack() diff --git a/order/orderDetail/orderDetail.vue b/order/orderDetail/orderDetail.vue index 63e0343..8146ad1 100644 --- a/order/orderDetail/orderDetail.vue +++ b/order/orderDetail/orderDetail.vue @@ -445,8 +445,8 @@ }, // 前往创建客户 toClient() { - uni.setStorageSync('courses', this.courseList) - this.$util.to(`/order/clientDetail/clientDetail`) + this.shopCart || uni.setStorageSync('courses', this.courses) + this.$util.to(`/order/clientDetail/clientDetail${this.shopCart ? '?shopCart=1' : ''}`) }, // 删除课程 delCourse(c, i) { diff --git a/pages/index/index.vue b/pages/index/index.vue index 10b4c50..6982360 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -138,7 +138,6 @@ title: '加载中' }) getTeamsByAccountId().then(({ data }) => { - let hasOwnTeam = 0 // 是否有自己的团队 data.map(e => { const n = e.partnerClassificationList e.id = n.id @@ -146,9 +145,7 @@ e.teamId = e.isTeam == 1 ? +e.partnerClassificationId : n.id e.partnerClassificationName = n.partnerClassificationName delete e.partnerClassificationList - if (e.isTeam == 1) hasOwnTeam = 1 }) - uni.setStorageSync('hasOwnTeam', hasOwnTeam) if (data.length) { /** * @description 如果是第一次进,则默认选中第一个团队,并把该团队的信息存入缓存 diff --git a/pages/login/login.vue b/pages/login/login.vue index 101ce8e..519772a 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -9,8 +9,8 @@ @@ -143,9 +143,7 @@ this.submiting = true const phone = data.phoneNumber if (this.isReg) { // 注册 - uni.redirectTo({ - url: `../reg/reg?openid=${this.openid}&phone=${phone}` - }) + this.$util.to(`../reg/reg?openid=${this.openid}&phone=${phone}`) } else { // 登录绑定手机号 userBinding({ openid: this.openid, @@ -163,9 +161,7 @@ }).then(({ sessionKey }) => { this.sessionKey = sessionKey.session_key this.openid = sessionKey.openid - uni.redirectTo({ - url: `../reg/reg?openid=${this.openid}&phone=${phone}` - }) + this.$util.to(`../reg/reg?openid=${this.openid}&phone=${phone}`) }).catch(e => {}) this.isReg = true } diff --git a/pages/person/person.vue b/pages/person/person.vue index 37a94cf..9b1ae36 100644 --- a/pages/person/person.vue +++ b/pages/person/person.vue @@ -97,11 +97,14 @@