From 9c5bf7f854fc16446faaa9db91257abcdd67aa55 Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 28 May 2021 11:29:17 +0800 Subject: [PATCH 1/3] no message --- pages/product/customerservice/index.vue | 33 +++++++++++++------------ pages/product/goods.vue | 18 +++++++++++--- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/pages/product/customerservice/index.vue b/pages/product/customerservice/index.vue index a3356d7..1d4793b 100644 --- a/pages/product/customerservice/index.vue +++ b/pages/product/customerservice/index.vue @@ -14,28 +14,29 @@ methods: { }, - onLoad () { + onLoad (e) { + const params = JSON.parse((decodeURIComponent(e.params))) chat.init({ - sign: '4a971f4f4ff9637cd9286a0197b0573bf2f65de052c21791f90d4235fca41456e1cc145075567f5f47b8e13c895f3fc8cacec5789f9afee8df670f7cbe5c0f82', //必传,公司渠道唯一标识,腾讯云智服后台系统创建「小程序插件」渠道后,在「渠道管理」获取 - token: '', //非必填 - uid: '', //用户唯一标识,如果没有则不填写,默认为空 - title: 'lilishop自营店', //非必填,如果未填写,默认获取配置标题 + sign: params.mpSign, //必传,公司渠道唯一标识,腾讯云智服后台系统创建「小程序插件」渠道后,在「渠道管理」获取 + token: params.token, //非必填 + uid: params.uuid, //用户唯一标识,如果没有则不填写,默认为空 + title: params.storageName, //非必填,如果未填写,默认获取配置标题 isRMB: '', //商品是否显示人民币¥,默认显示,false不显示 data: { //参数c1,c2,c3,c4,c5用于传递用户信息,参数d1,d2,d3,d4,d5,d6用于传递商品信息,默认为空 - c1: '1', - c2: '2', - c3: '3', - c4: '4', - c5: '5', - d1: '这是描述', //商品描述 - d2: '122.00', //价格 - d3: '150.00', //原价格 - d4: '', //展示商品图片链接 + c1: '', + c2: '', + c3: '', + c4: '', + c5: '', + d1: params.goodsName, //商品描述 + d2: params.price, //价格 + d3: '', //原价格 + d4: params.goodsImg, //展示商品图片链接 d5: '', //商品跳转链接 - d6: '', //商品id + d6: params.goodsId, //商品id data: ''//加密串,非必填 }, - viewUrl(res){ //需要跳转的链接,则需要配置一个web-view + viewUrl(res){ //需要跳转外部链接,则需要配置一个web-view if (res) { wx.navigateTo({ url: '/pages/webview/index?href=' + res diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 2a25917..f20949d 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -472,7 +472,7 @@ export default { // 获取店铺基本信息 this.getstoreBaseInfoFun(this.goodsDetail.storeId); - // 获取购物车 + // 获取购物车数量 this.cartCount(); // 获取店铺推荐商品 @@ -486,9 +486,21 @@ export default { this.getGoodsCollectionFun(this.goodsDetail.id); } }, - linkMsgDetail () { + linkMsgDetail () { // 客服 + const params = { + storeName: this.storeDetail.storeName, + goodsName: this.goodsDetail.goodsName, + goodsId: this.goodsDetail.goodsId, + goodsImg: this.goodsDetail.thumbnail, + price: this.goodsDetail.promotionPrice || this.goodsDetail.price, + // originalPrice: this.goodsDetail.original || this.goodsDetail.price, + uuid: storage.getUuid(), + token: storage.getAccessToken(), + sign: this.storeDetail.yzfSign || '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca', + mpSign: this.storeDetail.yzfMpSign || '32b8ff6f8d1c240be8d7fe51bdd6d44a6776ea86930afbe5c3c342825e942c914fc6126b6be1f003ab04aee1af9f442d2c33e1427529300671588866edaa4b12' + } uni.navigateTo({ - url: '/pages/product/customerservice/index' + url: '/pages/product/customerservice/index?params=' + encodeURIComponent(JSON.stringify(params)) }) }, // 格式化金钱 1999 --> [1999,00] From b7fb67d97518dc2b7c93f375474003b4b0e8a882 Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 28 May 2021 17:18:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?app=20=E5=AE=A2=E6=9C=8D=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/product/goods.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pages/product/goods.vue b/pages/product/goods.vue index f20949d..6f78fe7 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -487,6 +487,7 @@ export default { } }, linkMsgDetail () { // 客服 + // #ifdef MP-WEIXIN const params = { storeName: this.storeDetail.storeName, goodsName: this.goodsDetail.goodsName, @@ -502,6 +503,13 @@ export default { uni.navigateTo({ url: '/pages/product/customerservice/index?params=' + encodeURIComponent(JSON.stringify(params)) }) + // #endif + // #ifndef MP-WEIXIN + const sign = this.storeDetail.yzfSign || '37ef9b97807d03c6741298ed4eb5b536d2d238e08a3c00fb01fe48f03a569974c99ad767e72c04b3165ef29aca2c488b505fe4ca' + uni.navigateTo({ + url: '/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=' + sign + }) + // #endif }, // 格式化金钱 1999 --> [1999,00] formatPrice(val) { From de639c808ce6f27011bfc9f7ac370c1e2e6e07ca Mon Sep 17 00:00:00 2001 From: mabo Date: Fri, 4 Jun 2021 17:32:39 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=95=86=E5=93=81=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BF=AB=E6=8D=B7=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/api.js | 8 +- pages/product/goods.vue | 1560 +++++++++++++------------- pages/product/product/shop/-shop.vue | 21 +- pages/product/product/style.scss | 36 +- 4 files changed, 845 insertions(+), 780 deletions(-) diff --git a/config/api.js b/config/api.js index 5932087..b25e3eb 100644 --- a/config/api.js +++ b/config/api.js @@ -5,10 +5,14 @@ // 开发环境 const dev = { common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + // common: 'http://192.168.0.109:8890', + // buyer: 'http://192.168.0.109:8888', }; // 生产环境 -const prod = { +const prod = { + // common: 'http://192.168.0.109:8890', + // buyer: 'http://192.168.0.109:8888', common: "https://common-api.pickmall.cn", buyer: "https://buyer-api.pickmall.cn", diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 6f78fe7..cc9d1b3 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -1,846 +1,868 @@ + @import "./product/style.scss"; + @import "./product/product.scss"; + diff --git a/pages/product/product/shop/-shop.vue b/pages/product/product/shop/-shop.vue index dcaeed9..feb95f9 100644 --- a/pages/product/product/shop/-shop.vue +++ b/pages/product/product/shop/-shop.vue @@ -7,13 +7,17 @@ {{ storeDetail.storeName }} - + + + {{storeDetail.goodsNum || 0}}商品 + {{storeDetail.collectionNum || 0}}关注 + 进店逛逛 @@ -138,8 +142,17 @@ export default { width: 100%; font-weight: 700; font-size: 28rpx; - line-height: 24px; - } + line-height: 24px; + margin-left: 10px; + } + .desc { + font-size: 12px; + color: #999; + margin-left: 10px; + text{ + margin-right: 10px; + } + } } .to-store-btn { diff --git a/pages/product/product/style.scss b/pages/product/product/style.scss index 32dae22..fecbe9b 100644 --- a/pages/product/product/style.scss +++ b/pages/product/product/style.scss @@ -130,12 +130,22 @@ page{ display: flex; width: 100%; background: #fff !important; - > div { - flex: 1; - } - > .headerList { - flex: 8; + > div:nth-child(1) { + width: 50rpx; } + > div:nth-child(2) { + flex: 1; + .headerList{ + display: flex; + div{ + flex: 1; + } + } + } + > div:nth-child(3) { + width: 100rpx; + } + justify-content: space-between; } @@ -366,4 +376,20 @@ page { .status_bar{ background: #fff; height: var(--status-bar-height); +} +// 快捷导航 + +.fast-icon{ + background-color: #999; + border-radius: 50rpx; + font-size: 40rpx; + padding: 4rpx; + color: #FFFFFF; +} +.ml-20{ + margin-left: 20rpx; +} +.fast-icon-dark { + color: #999; + background-color: #fff; } \ No newline at end of file