From 01b4a09474d4e93780d0cf0816464e24c168261d Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Mon, 28 Feb 2022 14:25:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/App.vue | 12 +- .../uni-app/components/homeList/index.vue | 117 +- .../uni-app/components/kefuIcon/index.vue | 11 +- template/uni-app/components/payment/index.vue | 4 +- .../uni-app/components/update/app-update.vue | 1 + template/uni-app/manifest.json | 32 +- template/uni-app/pages.json | 70 +- .../activity/goods_bargain_details/index.vue | 1 - .../goods_combination_details/index.vue | 520 ++++--- .../pages/activity/goods_seckill/index.vue | 3 +- .../activity/goods_seckill_details/index.vue | 452 +++--- .../uni-app/pages/admin/orderDetail/index.vue | 7 +- .../uni-app/pages/goods_details/index.vue | 724 +++++---- template/uni-app/pages/index/diy/index.vue | 3 - .../visualization/components/swiperBg.vue | 8 +- .../pages/index/visualization/index.vue | 2 +- template/uni-app/pages/news_details/index.vue | 7 +- .../pages/order_addcart/order_addcart.vue | 29 +- .../uni-app/pages/order_pay_status/index.vue | 4 +- .../points_mall/integral_goods_details.vue | 222 ++- template/uni-app/pages/user/index.vue | 7 +- .../pages/users/commission_rank/index.vue | 478 +++--- template/uni-app/pages/users/login/index.vue | 6 +- .../pages/users/order_details/index.vue | 78 +- .../uni-app/pages/users/order_list/index.vue | 1312 ++++++++--------- .../pages/users/payment_on_behalf/index.vue | 17 +- .../users/payment_on_behalf/pay_status.vue | 10 +- .../uni-app/pages/users/user_info/index.vue | 13 +- .../pages/users/user_spread_code/index.vue | 2 +- .../pages/users/user_spread_user/index.vue | 39 +- template/uni-app/utils/index.js | 31 +- 31 files changed, 2177 insertions(+), 2045 deletions(-) diff --git a/template/uni-app/App.vue b/template/uni-app/App.vue index 97bf4cb39..4203f05b2 100644 --- a/template/uni-app/App.vue +++ b/template/uni-app/App.vue @@ -82,27 +82,27 @@ switch (res.data.status) { case 1: uni.setStorageSync('viewColor', blue) - uni.$emit('ok', blue, res.data.status) + uni.$emit('ok', blue,res.data.status) break; case 2: uni.setStorageSync('viewColor', green) - uni.$emit('ok', green, res.data.status) + uni.$emit('ok', green,res.data.status) break; case 3: uni.setStorageSync('viewColor', red) - uni.$emit('ok', red, res.data.status) + uni.$emit('ok', red,res.data.status) break; case 4: uni.setStorageSync('viewColor', pink) - uni.$emit('ok', pink, res.data.status) + uni.$emit('ok', pink,res.data.status) break; case 5: uni.setStorageSync('viewColor', orange) - uni.$emit('ok', orange, res.data.status) + uni.$emit('ok', orange,res.data.status) break; default: uni.setStorageSync('viewColor', red) - uni.$emit('ok', red, res.data.status) + uni.$emit('ok', red,res.data.status) break } }); diff --git a/template/uni-app/components/homeList/index.vue b/template/uni-app/components/homeList/index.vue index 41b410d7d..5d74b24da 100644 --- a/template/uni-app/components/homeList/index.vue +++ b/template/uni-app/components/homeList/index.vue @@ -1,22 +1,25 @@ diff --git a/template/uni-app/pages/users/login/index.vue b/template/uni-app/pages/users/login/index.vue index fd6f2bf71..796c36f93 100644 --- a/template/uni-app/pages/users/login/index.vue +++ b/template/uni-app/pages/users/login/index.vue @@ -598,10 +598,11 @@ width: 68rpx; height: 68rpx; border-radius: 50%; - background: #EAEAEA; + background: #000; + .icon-s-pingguo { - color: #333; + color: #fff; font-size: 44rpx; } } @@ -622,6 +623,7 @@ } .yanzheng { + margin-right: 30rpx; background-color: #F89C23; } diff --git a/template/uni-app/pages/users/order_details/index.vue b/template/uni-app/pages/users/order_details/index.vue index 68c2a0fb5..325afc050 100644 --- a/template/uni-app/pages/users/order_details/index.vue +++ b/template/uni-app/pages/users/order_details/index.vue @@ -40,11 +40,10 @@ 待付款 - - {{(orderInfo.shipping_type==1 || orderInfo.shipping_type==3) ? '待发货':'待核销'}} + + {{orderInfo.shipping_type==1 ? '待发货':'待核销'}} - 待收货 + 待收货 待评价 已完成 @@ -52,18 +51,18 @@ - + + v-if="orderInfo.shipping_type == 1"> + v-if="orderInfo.shipping_type == 1"> @@ -119,7 +118,7 @@ - + {{orderInfo.real_name}}{{orderInfo.user_phone}} {{orderInfo.user_address}} @@ -209,9 +208,8 @@ {{orderInfo.remark}} - - - + + {{item.title}}: @@ -459,6 +457,7 @@ mixins: [colors], data() { return { + customForm: '', //自定义留言 //二维码参数 codeShow: false, cid: '1', @@ -660,7 +659,11 @@ phoneNumber: this.customerInfo.customer_phone }); } else if (this.customerInfo.customer_type == 2) { + let href = this.customerInfo.customer_url; + // #ifdef APP-PLUS + plus.runtime.openURL(href) + // #endif let hrefO = href + '?uid=' + this.userInfo.uid + '&nickName=' + this.userInfo.nickname + '&phone=' + this.userInfo.phone + '&sex=' + this.userInfo.sex + '&avatar=' + this.userInfo.avatar + '&openid=' + this.userInfo.openid; @@ -668,9 +671,31 @@ this.userInfo.phone + '&sex=' + this.userInfo.sex + '&avatar=' + this.userInfo.avatar + '&openid=' + this.userInfo.openid; let urls = encodeURIComponent(href.indexOf('?') === -1 ? hrefO : hrefT); - uni.navigateTo({ - url: `/pages/annex/web_view/index?url=${urls}` - }); + if (href.indexOf('work.weixin.qq.com') > 0) { + // #ifdef H5 + return window.location.href = href + // #endif + // #ifdef MP + uni.openCustomerServiceChat({ + extInfo: { + url: href + }, + corpId: this.customerInfo.customer_corpId, + success(res) {}, + fail(err) { + uni.showToast({ + title: '请先配置企业ID', + icon: 'none', + duration: 2000 + }); + } + }) + // #endif + } else { + uni.navigateTo({ + url: `/pages/annex/web_view/index?url=${urls}` + }); + } } else { uni.navigateTo({ url: `/pages/customer_list/chat?orderId=${self.order_id}&isReturen=${this.isReturen}` @@ -887,6 +912,15 @@ let _type = res.data._status._type; uni.hideLoading(); that.$set(that, 'orderInfo', res.data); + //处理自定义留言非必填项的数据展示 + let arr = [] + that.orderInfo.custom_form.map(i => { + if (i.value != '') { + arr.push(i) + } + }) + that.$set(that, 'customForm', arr); + that.$set(that, 'cartInfo', res.data.cartInfo); that.$set(that, 'pid', res.data.pid); that.$set(that, 'split', res.data.split); @@ -1176,14 +1210,21 @@ if (res.confirm) { orderCancel(self.orderInfo.order_id) .then((data) => { + // #ifndef MP self.$util.Tips({ title: data.msg }, { tab: 3 }) + // #endif + // #ifdef MP + self.$util.Tips({ + title: data.msg + }, '/pages/users/order_list/index'); + // #endif }) .catch(() => { - self.getDetail(); + self.getOrderInfo(); }); } else if (res.cancel) { console.log('用户点击取消'); @@ -1205,11 +1246,11 @@ margin-right: 6rpx; } } - + .refund-tip1 { font-size: 24rpx; color: var(--view-theme); - + .iconfont { font-size: 24rpx; margin-right: 6rpx; @@ -2161,7 +2202,8 @@ } .upload .pictrue { - margin: 22rpx 23rpx 20rpx 0; + display: inline-block; + margin: 22rpx 17rpx 20rpx 0; width: 156rpx; height: 156rpx; color: #bbb; diff --git a/template/uni-app/pages/users/order_list/index.vue b/template/uni-app/pages/users/order_list/index.vue index 7bd6e958b..929448792 100644 --- a/template/uni-app/pages/users/order_list/index.vue +++ b/template/uni-app/pages/users/order_list/index.vue @@ -1,660 +1,656 @@ - @@ -88,6 +94,7 @@ import orderGoods from '@/components/orderGoods'; import colors from "@/mixins/color"; import payment from '@/components/payment'; + import home from '@/components/home/index.vue' import { friendDetail } from '@/api/user.js' @@ -105,7 +112,8 @@ mixins: [colors], components: { orderGoods, - payment + payment, + home }, computed: mapGetters(["isLogin"]), data() { @@ -412,6 +420,13 @@ margin-top: 60rpx; } + .order-btn.detail { + margin-top: 20rpx; + color: var(--view-theme); + background-color: #fff; + border: 1px solid var(--view-theme); + } + .order-btn.on-pay { background-color: #ccc; } diff --git a/template/uni-app/pages/users/payment_on_behalf/pay_status.vue b/template/uni-app/pages/users/payment_on_behalf/pay_status.vue index 81e9619bb..a3b124321 100644 --- a/template/uni-app/pages/users/payment_on_behalf/pay_status.vue +++ b/template/uni-app/pages/users/payment_on_behalf/pay_status.vue @@ -54,7 +54,7 @@ deep: true } }, - onLoad: function(options) { + onLoad(options) { this.options = options if (!options.order_id) return this.$util.Tips({ title: '缺少参数无法查看订单支付状态' @@ -90,15 +90,13 @@ openTap() { this.$set(this, 'couponsHidden', !this.couponsHidden); }, - onLoadFun: function() { + onLoadFun() { this.getDetail(); }, /** - * * 支付完成查询支付状态 - * */ - getOrderPayInfo: function() { + getOrderPayInfo() { let that = this; uni.showLoading({ title: '正在加载中' @@ -118,7 +116,7 @@ /** * 去首页关闭当前所有页面 */ - goIndex: function(e) { + goIndex(e) { uni.switchTab({ url: '/pages/index/index' }); diff --git a/template/uni-app/pages/users/user_info/index.vue b/template/uni-app/pages/users/user_info/index.vue index 575e164d8..11ec9c522 100644 --- a/template/uni-app/pages/users/user_info/index.vue +++ b/template/uni-app/pages/users/user_info/index.vue @@ -108,12 +108,10 @@ - - 退出登录 + + 退出登录 - 退出登录 @@ -190,7 +188,7 @@ // #ifdef APP-PLUS this.formatSize() // 获取版本号 - plus.runtime.getProperty(plus.runtime.appid, (inf)=> { + plus.runtime.getProperty(plus.runtime.appid, (inf) => { console.log(inf.version) this.version = inf.version; }); @@ -200,12 +198,12 @@ } }, methods: { - isNew(){ + isNew() { that.$util.Tips({ title: '当前为最新版本' }); }, - + updateApp() { this.$refs.appUpdate.update(); //调用子组件 检查更新 }, @@ -347,6 +345,7 @@ if (res.confirm) { getLogout() .then(res => { + // uni.clearStorage() that.$store.commit("LOGOUT"); uni.reLaunch({ url: '/pages/index/index' diff --git a/template/uni-app/pages/users/user_spread_code/index.vue b/template/uni-app/pages/users/user_spread_code/index.vue index 1e6837f82..c708596ed 100644 --- a/template/uni-app/pages/users/user_spread_code/index.vue +++ b/template/uni-app/pages/users/user_spread_code/index.vue @@ -198,7 +198,7 @@ this.qrcode = await this.imgToBase(res.data.qrcode) // #endif let codeUrl = "?spread=" + this.userInfo.uid - // #ifdef MP || APP-PLUS + // #ifdef MP await this.routineCode() let mpUrl = await this.downloadFilestoreImage(this.mpUrl) // #endif diff --git a/template/uni-app/pages/users/user_spread_user/index.vue b/template/uni-app/pages/users/user_spread_user/index.vue index 78590f8fb..a197fb69d 100644 --- a/template/uni-app/pages/users/user_spread_user/index.vue +++ b/template/uni-app/pages/users/user_spread_user/index.vue @@ -8,11 +8,10 @@ {{userInfo.nickname}} - - {{userInfo.agent_level_name}} + + {{userInfo.agent_level_name?userInfo.agent_level_name:'分销等级'}} - {{userInfo.extractTotalPrice}} + 立即提现 @@ -218,14 +226,14 @@ background-repeat: no-repeat; background-size: 100% 100%; width: 100%; - height: 400rpx; + height: 480rpx; background-color: var(--view-theme); } .my-promotion .header .name { font-size: 30rpx; color: #fff; - padding-top: 57rpx; + padding-top: 37rpx; position: relative; .distribution { @@ -256,30 +264,33 @@ .user-msg { display: flex; align-items: center; + justify-content: center; + flex-direction: column; .nickname { - font-size: 28rpx; + font-size: 32rpx; + margin: 10rpx 0; } .level { - border: 1px solid #fff; - font-size: 32rpx; - padding: 2rpx 8rpx; + font-size: 18rpx; + padding: 4rpx 10rpx; + background: linear-gradient(135deg, var(--view-bntColor) 0%, var(--view-main-over) 100%); border-radius: 6rpx; - transform: scale(0.6); + transform: scale(0.9); display: flex; align-items: center; .icon-xiangyou { + transform: scale(0.7); font-size: 28rpx; } } image { - width: 46rpx; - height: 46rpx; + width: 100rpx; + height: 100rpx; border-radius: 50%; - margin-right: 10rpx; } } } @@ -300,7 +311,7 @@ .my-promotion .header .num { text-align: center; color: #fff; - margin-top: 28rpx; + margin-top: 8rpx; font-size: 90rpx; font-family: 'Guildford Pro'; } diff --git a/template/uni-app/utils/index.js b/template/uni-app/utils/index.js index 993ec740a..389b10072 100644 --- a/template/uni-app/utils/index.js +++ b/template/uni-app/utils/index.js @@ -76,11 +76,32 @@ export function getCustomer(url) { // #ifdef APP-PLUS plus.runtime.openURL(res.data.customer_url) // #endif - // #ifdef H5 - // window.open(res.data.customer_url, '_blank') - uni.navigateTo({ - url: `/pages/annex/web_view/index?url=${res.data.customer_url}` - }); + // #ifdef H5 || MP + if (res.data.customer_url.indexOf('work.weixin.qq.com') > 0) { + // #ifdef H5 + return window.location.href = res.data.customer_url + // #endif + // #ifdef MP + uni.openCustomerServiceChat({ + extInfo: { + url: res.data.customer_url + }, + corpId: res.data.customer_corpId, + success(res) {}, + fail(err) { + uni.showToast({ + title: '请先配置企业ID', + icon: 'none', + duration: 2000 + }); + } + }) + // #endif + } else { + uni.navigateTo({ + url: `/pages/annex/web_view/index?url=${res.data.customer_url}` + }); + } // #endif } })