diff --git a/pages/chat/customer_list/chat.vue b/pages/chat/customer_list/chat.vue index da8a1cc..e2f4a46 100644 --- a/pages/chat/customer_list/chat.vue +++ b/pages/chat/customer_list/chat.vue @@ -53,7 +53,8 @@
- {{val.product.cart_info.product.store_name}}
+ {{val.product.cart_info.product.store_name}} +
¥{{ item.refundOrder.refund_price }}
@@ -89,7 +90,8 @@
- {{val.cart_info.product.store_name}}
+ {{val.cart_info.product.store_name}} +
¥{{ item.orderInfo.pay_price }}
@@ -101,7 +103,7 @@
-
+
- {{item.product.store_name}}
+ {{item.product.store_name}} +
@@ -135,7 +138,8 @@ ¥{{ item.presell.price }}
- {{item.presell.store_name}}
+ {{item.presell.store_name}} + @@ -156,7 +160,8 @@ ¥{{ item.productGroup.product.price }}
- {{item.productGroup.product.store_name}}
+ {{item.productGroup.product.store_name}} + @@ -207,7 +212,8 @@
- {{val.product.cart_info.product.store_name}}
+ {{val.product.cart_info.product.store_name}} +
¥{{ item.refundOrder.refund_price }}
@@ -243,7 +249,8 @@
- {{val.cart_info.product.store_name}}
+ {{val.cart_info.product.store_name}} +
¥{{ item.orderInfo.pay_price }}
@@ -267,7 +274,8 @@ ¥{{ item.product.price }}
- {{item.product.store_name}}
+ {{item.product.store_name}} + @@ -288,7 +296,8 @@ ¥{{ item.presell.price }}
- {{item.presell.store_name}}
+ {{item.presell.store_name}} + @@ -309,7 +318,8 @@ ¥{{ item.productGroup.product.price }}
- {{item.productGroup.product.store_name}}
+ {{item.productGroup.product.store_name}} + @@ -388,7 +398,8 @@
- {{val.product.cart_info.product.store_name}}
+ {{val.product.cart_info.product.store_name}} +
¥{{ val.product.cart_info.productAttr.price }}
@@ -425,7 +436,8 @@
- {{val.cart_info.product.store_name}}
+ {{val.cart_info.product.store_name}} +
¥{{ item.orderInfo.pay_price }}
@@ -450,7 +462,8 @@ ¥{{ item.product.price }}
- {{item.product.store_name}}
+ {{item.product.store_name}} + @@ -471,7 +484,8 @@ ¥{{ item.presell.price }}
- {{item.presell.store_name}}
+ {{item.presell.store_name}} + @@ -492,7 +506,8 @@ ¥{{ item.productGroup.product.price }}
- {{item.productGroup.product.store_name}}
+ {{item.productGroup.product.store_name}} + @@ -534,7 +549,8 @@
- {{val.product.cart_info.product.store_name}}
+ {{val.product.cart_info.product.store_name}} +
共{{item.refundOrder.refund_num}}件商品, 合计 ¥{{ item.refundOrder.refund_price }} @@ -571,7 +587,8 @@
- {{val.cart_info.product.store_name}}
+ {{val.cart_info.product.store_name}} +
¥{{ item.orderInfo.pay_price }}
@@ -596,7 +613,8 @@ ¥{{ item.product.price }}
- {{item.product.store_name}}
+ {{item.product.store_name}} + @@ -617,7 +635,8 @@ ¥{{ item.presell.price }}
- {{item.presell.store_name}}
+ {{item.presell.store_name}} + @@ -638,7 +657,8 @@ ¥{{ item.productGroup.product.price }}
- {{item.productGroup.product.store_name}}
+ {{item.productGroup.product.store_name}} + @@ -758,7 +778,7 @@
-
+
@@ -772,9 +792,9 @@ {{ speak }} - +
@@ -790,7 +810,7 @@ - +
@@ -817,7 +837,8 @@ getChatRecord, getMerHistory, chatReverstApi, - hasServiceApi + hasServiceApi, + getUserInfo } from "@/api/user"; import { getProductDetail, @@ -1213,8 +1234,7 @@ let self = this self.$util.uploadImageOne('upload/image', function(res) { if (res.status == 200) { - self.sendMsg(res.data.path, 3 - ) + self.sendMsg(res.data.path, 3) } }); }, @@ -1383,11 +1403,11 @@ focus: function() { this.active = false; }, - handleClick(){ - if(this.active){ - this.active = false; - } - }, + handleClick() { + if (this.active) { + this.active = false; + } + }, keyup: function() { if (this.$refs.input.value.length > 0) { this.sendColor = true; @@ -1610,7 +1630,8 @@ width: 710rpx; position: fixed; bottom: 180rpx; - bottom: calc(180rpx + env(safe-area-inset-bottom)); /* 适应底部安全距离 */ + bottom: calc(180rpx + env(safe-area-inset-bottom)); + /* 适应底部安全距离 */ left: 20rpx; .broadcast-details_box, @@ -1952,7 +1973,7 @@ position: fixed; // bottom:var(--status-bar-height); bottom: 20rpx; - bottom: calc(20rpx + env(safe-area-inset-bottom) ); + bottom: calc(20rpx + env(safe-area-inset-bottom)); left: 0; } diff --git a/pages/chat/customer_list/index.vue b/pages/chat/customer_list/index.vue index e548227..c0ac102 100644 --- a/pages/chat/customer_list/index.vue +++ b/pages/chat/customer_list/index.vue @@ -12,7 +12,8 @@ [表情] [图片] [商品] - [订单] + [订单] {{item.last && item.last.create_time.split(' ')[1] || ''}} @@ -23,15 +24,18 @@
{{item.user && item.user.nickname}} {{item.last.msn}} [表情] [图片] - [商品] - [订单] + [商品] + [订单] {{item.last && item.last.create_time.split(' ')[1]}} @@ -65,10 +69,12 @@ import { getUserInfo } from '@/api/user.js'; - import { mapGetters } from "vuex"; + import { + mapGetters + } from "vuex"; export default { name: "CustomerList", - components:{ + components: { emptyPage, authorize }, @@ -77,10 +83,10 @@ list: [], productId: 0, orderId: "", - type: 0 ,// 0 用户 1客服 + type: 0, // 0 用户 1客服 timer: null, - page:1, - limit:9999, + page: 1, + limit: 9999, mer_id: '', loading: false, clear: false, @@ -88,59 +94,57 @@ isShowAuth: false, //是否隐藏授权 }; }, - computed: mapGetters(['isLogin','viewColor']), + computed: mapGetters(['isLogin', 'viewColor']), onLoad(optios) { - this.type = optios.type||1; + this.type = optios.type || 1; this.getindex() }, onShow(option) { - if(this.isLogin){ + if (this.isLogin) { this.liveUpdate(); } else { this.isAuto = true; this.isShowAuth = true } }, - onHide(){ - if(this.timer) { - clearInterval(this.timer); - this.timer = null; - } + onHide() { + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } this.clear = true; }, onUnload() { - if(this.timer) { - clearInterval(this.timer); - this.timer = null; - } + if (this.timer) { + clearInterval(this.timer); + this.timer = null; + } this.clear = true; }, methods: { //获取商户信息 - getindex(){ + getindex() { getUserInfo().then(res => { - if (res.data.mer_info.length == 0) { - return uni.showModal({ - title: '暂未开通商户', - complete(res) { - // #ifdef APP-PLUS - uni.sendHostEvent('closeApp', (ret) => { - //发送消息成功回调 - console.log('关闭应用' + JSON.stringify(ret)); - }); - // #endif - } - }) - } + if (res.data.mer_info.length == 0) { + return uni.showModal({ + title: '暂未开通商户', + complete(res) { + // #ifdef APP-PLUS + uni.sendHostEvent('closeApp', (ret) => { + //发送消息成功回调 + console.log('关闭应用' + JSON.stringify(ret)); + }); + // #endif + } + }) + } this.mer_id = res.data.service.mer_id; - if(this.isLogin){ + if (this.isLogin) { this.getList(this.mer_id) } else { this.isAuto = true; this.isShowAuth = true } - // this.getList(this.mer_id) - // this.getList(res.data.service.mer_id, true); }); }, onLoadFun() { @@ -152,84 +156,106 @@ authColse: function(e) { this.isShowAuth = e }, - getList(mer_id) { + getList(mer_id) { this.loading = true; - if(this.type == 0){ + if (this.type == 0) { serviceList({ - page:this.page, - limit:this.limit + page: this.page, + limit: this.limit }).then(res => { this.list = res.data.list; - if(res.status == 400){ + this.getCurrBadge(); + if (res.status == 400) { clearInterval(this.timer); - this.timer = null; - return this.$util.Tips({ - title: res.message - }) - } - }).finally(v=>{ - this.loading = false; - return this.$util.Tips({ - title: v - }) - }).catch(err => { - return this.$util.Tips({ - title: err - }) - }); - }else{ - serviceUserList(mer_id,{ - page:this.page, - limit:this.limit - }).then(res =>{ - this.list = res.data.list; - if(res.status == 400){ - clearInterval(this.timer); - this.timer = null; + this.timer = null; return this.$util.Tips({ title: res.message }) } - }).finally(v=>{ + }).finally(v => { + this.loading = false; + return this.$util.Tips({ + title: v + }) + }).catch(err => { + return this.$util.Tips({ + title: err + }) + }); + } else { + serviceUserList(mer_id, { + page: this.page, + limit: this.limit + }).then(res => { + this.list = res.data.list; + this.getCurrBadge(); + + if (res.status == 400) { + clearInterval(this.timer); + this.timer = null; + return this.$util.Tips({ + title: res.message + }) + } + }).finally(v => { this.loading = false; clearInterval(this.timer); - this.timer = null; + this.timer = null; return this.$util.Tips({ title: v }) }).catch(err => { clearInterval(this.timer); - this.timer = null; + this.timer = null; return this.$util.Tips({ title: err }) }); - } + } }, + + getCurrBadge() { + const sum = this.list.reduce((accumulator, current) => accumulator + Number(current.num), + 0); + if (sum) { + uni.setTabBarBadge({ + index: 1, + text: String(sum) + }) + } else { + uni.removeTabBarBadge({ + index: 1 + }) + } + }, + //实时刷新列表 - liveUpdate(){ + liveUpdate() { let that = this; this.clear = false; - if(that.timer) { + if (that.timer) { clearInterval(that.timer); - that.timer = null; - } - that.timer = setInterval(function(){ - if(that.clear){ + that.timer = null; + } + that.timer = setInterval(function() { + if (that.clear) { clearInterval(that.timer); - return ; + return; } // 用户 (!that.loading) && that.getList(that.mer_id); - },5000); + }, 5000); }, goPage(item) { item.num = 0; - if(this.type == 0){ + + this.getCurrBadge(); + + if (this.type == 0) { uni.navigateTo({ url: `/pages/chat/customer_list/chat?mer_id=${item.mer_id}` }) - }else{ + } else { uni.navigateTo({ url: `/pages/chat/customer_list/chat?userId=${item.user.uid}&mer_id=${item.mer_id}` }) @@ -248,7 +274,8 @@ transform: rotate(180deg); font-size: 36rpx; } - .popupn{ + + .popupn { position: fixed; width: 100%; text-align: center; @@ -258,65 +285,78 @@ height: 90rpx; line-height: 90rpx; z-index: 100; - .title{ + + .title { max-width: 560rpx; margin: 0 auto; position: relative; } - .iconfont{ + + .iconfont { display: inline-block; position: relative; top: 4rpx; right: 0; } - .mer_logo{ + + .mer_logo { width: 34rpx; height: 34rpx; position: relative; top: 6rpx; - right: 10px; + right: 10px; } - .mer_name{ + + .mer_name { display: inline-block; max-width: 650rpx; } - .invoice-content{ + + .invoice-content { background-color: #ffffff; } } - .list_count{ + + .list_count { margin-top: 104rpx; } + .item { align-items: center; border-bottom: 1px solid #eee; padding: 20rpx 30rpx; background-color: #fff; - .logo image{ + + .logo image { width: 88rpx; height: 88rpx; border-radius: 50%; } - .info{ + + .info { width: 334rpx; margin-left: 20rpx; - .con{ + + .con { margin-top: 10rpx; color: #999999; font-size: 24rpx; } } - .right-box{ + + .right-box { flex: 1; display: flex; flex-direction: column; align-items: flex-end; font-size: 20rpx; color: #BBBBBB; - .time{ + + .time { margin-bottom: 10rpx; } - .num{ + + .num { min-width: 6px; background-color: var(--view-theme); border-radius: 15px; @@ -328,4 +368,4 @@ } } } - + \ No newline at end of file diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index 174e9ac..d4625cf 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -58,10 +58,10 @@ - + @@ -278,20 +278,22 @@ 产品介绍 - - + - - {{description.content.title}} + + {{description.content.title}} - + @@ -311,7 +313,7 @@ - + @@ -631,7 +633,6 @@ ])), }, onLoad(options) { - // console.log(options) this.referer = options.referer if (options.product_type) { this.product_type = options.product_type @@ -682,6 +683,7 @@ } else { this.id = options.id } + //记录推广人uid if (options.spid) app.globalData.spid = options.spid; // #endif @@ -1059,14 +1061,16 @@ } that.$set(that, 'storeInfo', storeInfo); that.$set(that, 'description', storeInfo.content); - if(typeof that.description.content == 'string'){ - try{ - that.description.content = JSON.parse(that.description.content); - }catch(e){ - console.log(e); - } - } - if (that.description.type == 0 && typeof that.description.content == 'string') { + if (storeInfo.content && typeof that.description.content == 'string') { + try { + that.description.content = JSON.parse(that.description.content); + } catch (e) { + console.log(e); + } + } + if (that.description && that.description.type && that.description.type == 0 && typeof that + .description + .content == 'string') { that.description.content = that.description.content.replace( / { + console.log(err); //状态异常返回上级页面 return that.$util.Tips({ title: err @@ -2527,21 +2532,23 @@ } } } - - .product_content{ - background-color: #fff; - &_title{ - width: 100%; - height: auto; - line-height: 50rpx; - padding: 28rpx; - word-wrap: break-word; - text-align: center; - } - image{ - width: 750rpx; - // height: auto; - // height: 750rpx; - } - } + + .product_content { + background-color: #fff; + + &_title { + width: 100%; + height: auto; + line-height: 50rpx; + padding: 28rpx; + word-wrap: break-word; + text-align: center; + } + + image { + width: 750rpx; + // height: auto; + // height: 750rpx; + } + } \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 3755f2a..8c98a54 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -436,7 +436,6 @@ orderStatistics, otherOrderStatistics, getOrderList - } from "@/api/admin"; import { ENV @@ -876,6 +875,7 @@ // 销毁监听事件 this.$bus.$off('value-updated') }, + methods: { // 提现页面 handleToWithDraw(item, index) { @@ -1314,6 +1314,17 @@ } else { this.isgShow = true } + if (res.data.mer_info.news_unread) { + uni.setTabBarBadge({ + index: 1, + text: String(res.data.mer_info.news_unread) + }) + } else { //设置取消 + uni.removeTabBarBadge({ + index: 1 + }) + } + if (res.data.mer_info.length == 0) { //未开通商户 提示 uni.reLaunch({ @@ -1432,7 +1443,6 @@ this.countDown() } } - } else { switch (item.type) { case 1: @@ -2487,6 +2497,7 @@ .list-two_left { width: 175rpx; height: 175rpx; + image { width: 100%; height: 100%; diff --git a/pages/nongKe/statistics/index.vue b/pages/nongKe/statistics/index.vue index d4af5e1..41ba105 100644 --- a/pages/nongKe/statistics/index.vue +++ b/pages/nongKe/statistics/index.vue @@ -507,12 +507,12 @@ methods: { // 提现页面 handleToWithDraw(item, index) { - let url; - if(index<2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id; - else url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2` - uni.navigateTo({ - url: url - }) + let url; + if (index < 2) url = "/pages/users/embody/embody?mer_id=" + this.userInfoData.service.mer_id; + else url = `/pages/admin/orderList/index?merId=${this.userInfoData.service.mer_id}&types=2` + uni.navigateTo({ + url: url + }) }, // 初始化菜单 initTypeLiseMenu() { @@ -864,6 +864,7 @@ }, //获取订单数据 getindex() { + let that = this; const data = { product_type: this.where1.product_type }