Commit 2e393095bf7c30ba0ccb05bbaba6167a93b2c295
Merge branch 'dev' into 'test'
Dev See merge request !841
Showing
19 changed files
with
182 additions
and
41 deletions
components/diy_seckill/diy_seckill.js
@@ -45,12 +45,12 @@ Component({ | @@ -45,12 +45,12 @@ Component({ | ||
45 | var g_id = this.data.object; | 45 | var g_id = this.data.object; |
46 | this.init(g_id); | 46 | this.init(g_id); |
47 | setTimeout(function () { | 47 | setTimeout(function () { |
48 | - if (this.data.goods_array.length > 0) { | 48 | + if (th.data.goods_array && th.data.goods_array.length > 0) { |
49 | th.data.timer = setInterval(function () { | 49 | th.data.timer = setInterval(function () { |
50 | th.countDown2(th); | 50 | th.countDown2(th); |
51 | }, 1000); | 51 | }, 1000); |
52 | } | 52 | } |
53 | - },500) | 53 | + },600) |
54 | } | 54 | } |
55 | }, | 55 | }, |
56 | 56 | ||
@@ -132,7 +132,7 @@ Component({ | @@ -132,7 +132,7 @@ Component({ | ||
132 | } | 132 | } |
133 | 133 | ||
134 | for(let i in all_array){ | 134 | for(let i in all_array){ |
135 | - let item=data[i]; | 135 | + let item=all_array[i]; |
136 | if(item.user_price) item.price=item.user_price; | 136 | if(item.user_price) item.price=item.user_price; |
137 | } | 137 | } |
138 | 138 |
components/diy_seckill/diy_seckill.wxml
@@ -15,29 +15,29 @@ | @@ -15,29 +15,29 @@ | ||
15 | <view class='sp' wx:if="{{object.style==1}}"> | 15 | <view class='sp' wx:if="{{object.style==1}}"> |
16 | <swiper-item class="s_it" wx:for="{{goods_array}}"> | 16 | <swiper-item class="s_it" wx:for="{{goods_array}}"> |
17 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 17 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
18 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1"> | 18 | + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&prom_type=1&prom_id={{aitem.id}}" class="s1_gk_a1"> |
19 | <view class='one'> | 19 | <view class='one'> |
20 | <view class='sp_top'> | 20 | <view class='sp_top'> |
21 | <view class='po'></view> | 21 | <view class='po'></view> |
22 | <block wx:if="{{aitem.start_time>newTime}}"> | 22 | <block wx:if="{{aitem.start_time>newTime}}"> |
23 | - <view class="rob"> | 23 | + <view class="rob" style="justify-content: flex-start"> |
24 | <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span> | 24 | <span class='s_top_kill' style="background-color: #ffe718;color: #3c3b31;font-weight: bold">即将开始</span> |
25 | </view> | 25 | </view> |
26 | </block> | 26 | </block> |
27 | 27 | ||
28 | <block wx:if="{{aitem.end_time<=newTime}}"> | 28 | <block wx:if="{{aitem.end_time<=newTime}}"> |
29 | - <view class="rob"> | 29 | + <view class="rob" style="justify-content: flex-start"> |
30 | <span class='s_top_kill gray'>活动已结束</span> | 30 | <span class='s_top_kill gray'>活动已结束</span> |
31 | </view> | 31 | </view> |
32 | </block> | 32 | </block> |
33 | <block wx:else> | 33 | <block wx:else> |
34 | <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> | 34 | <block wx:if="{{aitem.start_time<newTime && aitem.goods_num>aitem.buy_num}}"> |
35 | - <view class="rob"> | 35 | + <view class="rob" style="justify-content: flex-start"> |
36 | <span class='s_top_kill'>火热进行</span> | 36 | <span class='s_top_kill'>火热进行</span> |
37 | </view> | 37 | </view> |
38 | </block> | 38 | </block> |
39 | <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> | 39 | <block wx:if="{{aitem.goods_num<=aitem.buy_num}}"> |
40 | - <view class="rob"> | 40 | + <view class="rob" style="justify-content: flex-start"> |
41 | <span class='s_top_kill gray'>已抢光</span> | 41 | <span class='s_top_kill gray'>已抢光</span> |
42 | </view> | 42 | </view> |
43 | </block> | 43 | </block> |
@@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
77 | <view class="sp2" wx:if="{{object.style==2}}"> | 77 | <view class="sp2" wx:if="{{object.style==2}}"> |
78 | <block wx:for="{{goods_array}}"> | 78 | <block wx:for="{{goods_array}}"> |
79 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> | 79 | <block wx:for="{{item}}" wx:for-item="aitem" wx:for-index="aind"> |
80 | - <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}" class="s1_gk_a1"> | 80 | + <navigator url="/pages/goods/goodsInfo/goodsInfo?goods_id={{aitem.goods_id}}&prom_type=1&prom_id={{aitem.id}}" class="s1_gk_a1"> |
81 | <view class='one1'> | 81 | <view class='one1'> |
82 | 82 | ||
83 | <view class="o1_img"> | 83 | <view class="o1_img"> |
components/diy_seckill/diy_seckill.wxss
@@ -77,13 +77,12 @@ swiper { | @@ -77,13 +77,12 @@ swiper { | ||
77 | font-size: 24rpx; | 77 | font-size: 24rpx; |
78 | height: 38rpx; | 78 | height: 38rpx; |
79 | line-height: 38rpx; | 79 | line-height: 38rpx; |
80 | - left: 6rpx; | ||
81 | padding: 4rpx 10rpx; | 80 | padding: 4rpx 10rpx; |
82 | border-radius: 10rpx; | 81 | border-radius: 10rpx; |
83 | z-index: 999; | 82 | z-index: 999; |
84 | position: relative; | 83 | position: relative; |
85 | - top: -6rpx; | ||
86 | - width: 210rpx; | 84 | + top: 1rpx; |
85 | + width: 110rpx; | ||
87 | color: #fff; | 86 | color: #fff; |
88 | text-align: center; | 87 | text-align: center; |
89 | } | 88 | } |
components/diy_service/diy_service.js
@@ -36,8 +36,8 @@ Component({ | @@ -36,8 +36,8 @@ Component({ | ||
36 | return false; | 36 | return false; |
37 | }, | 37 | }, |
38 | 38 | ||
39 | - //---------联系客服------------ | ||
40 | - contactService: function() { | 39 | + //---------联系客服------------ |
40 | + contactService: function() { | ||
41 | getApp().getConfig(function(t) { | 41 | getApp().getConfig(function(t) { |
42 | if (t.store_tel == undefined) { | 42 | if (t.store_tel == undefined) { |
43 | getApp().request.get("/api/weshop/store/get/" + os.stoid, { | 43 | getApp().request.get("/api/weshop/store/get/" + os.stoid, { |
@@ -57,5 +57,16 @@ Component({ | @@ -57,5 +57,16 @@ Component({ | ||
57 | } | 57 | } |
58 | }); | 58 | }); |
59 | }, | 59 | }, |
60 | + | ||
61 | + //---------联系微信客服------------ | ||
62 | + con_weixin:function () { | ||
63 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
64 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
65 | + wx.openCustomerServiceChat({ | ||
66 | + extInfo: {url: url}, | ||
67 | + corpId: id, | ||
68 | + success(res) {} | ||
69 | + }) | ||
70 | + } | ||
60 | } | 71 | } |
61 | }) | 72 | }) |
components/diy_service/diy_service.wxml
1 | <!--有在线客户 和 打电话--> | 1 | <!--有在线客户 和 打电话--> |
2 | -<block wx:if="{{sys_switch.weapp_customertype}}"> | 2 | +<block wx:if="{{sys_switch.weapp_customertype==1}}"> |
3 | <!-- 判断是不是有登录 --> | 3 | <!-- 判断是不是有登录 --> |
4 | <view wx:if="{{userInfo}}" class="custom-service" bindtap="go_user" > | 4 | <view wx:if="{{userInfo}}" class="custom-service" bindtap="go_user" > |
5 | <view style="text-align: center;"> | 5 | <view style="text-align: center;"> |
@@ -14,7 +14,16 @@ | @@ -14,7 +14,16 @@ | ||
14 | <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view> | 14 | <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view> |
15 | </view> | 15 | </view> |
16 | </button> | 16 | </button> |
17 | -</block> | 17 | +</block> |
18 | + | ||
19 | +<block wx:elif="{{sys_switch.weapp_customertype==2}}"> | ||
20 | + <view class="custom-service cart-ico new_split" bindtap="con_weixin"> | ||
21 | + <view style="text-align: center;"> | ||
22 | + <image class="cs-img" src="{{object.img}}"></image> | ||
23 | + <view class="s_title" wx:if="{{object.title!=''}}">{{object.title}}</view> | ||
24 | + </view> | ||
25 | + </view> | ||
26 | +</block> | ||
18 | 27 | ||
19 | <block wx:else> | 28 | <block wx:else> |
20 | <view class="custom-service cart-ico new_split" bindtap="contactService"> | 29 | <view class="custom-service cart-ico new_split" bindtap="contactService"> |
packageA/pages/goodsInfo/goodsInfo.js
@@ -2209,6 +2209,17 @@ Page({ | @@ -2209,6 +2209,17 @@ Page({ | ||
2209 | flag: !this.data.flag, | 2209 | flag: !this.data.flag, |
2210 | }) | 2210 | }) |
2211 | }, | 2211 | }, |
2212 | + | ||
2213 | + //---------联系微信客服------------ | ||
2214 | + con_weixin:function () { | ||
2215 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
2216 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
2217 | + wx.openCustomerServiceChat({ | ||
2218 | + extInfo: {url: url}, | ||
2219 | + corpId: id, | ||
2220 | + success(res) {} | ||
2221 | + }) | ||
2222 | + } | ||
2212 | 2223 | ||
2213 | 2224 | ||
2214 | 2225 |
packageA/pages/goodsInfo/goodsInfo.wxml
@@ -160,10 +160,16 @@ | @@ -160,10 +160,16 @@ | ||
160 | <view class="join-cart jc_sb"> | 160 | <view class="join-cart jc_sb"> |
161 | 161 | ||
162 | <view class="flex"> | 162 | <view class="flex"> |
163 | - <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split f1" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}" style="text-align: center"> | 163 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split f1" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}" style="text-align: center"> |
164 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 164 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
165 | <view>客服</view> | 165 | <view>客服</view> |
166 | - </button> | 166 | + </button> |
167 | + | ||
168 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split f1" bindtap="con_weixin" style="text-align: center"> | ||
169 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
170 | + <view>客服</view> | ||
171 | + </view> | ||
172 | + | ||
167 | <view wx:else class="custom-service cart-ico new_split f1" bindtap="contactService" style="text-align: center"> | 173 | <view wx:else class="custom-service cart-ico new_split f1" bindtap="contactService" style="text-align: center"> |
168 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 174 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
169 | <view>客服</view> | 175 | <view>客服</view> |
packageC/pages/presell/cart/cart.js
@@ -2529,6 +2529,40 @@ Page({ | @@ -2529,6 +2529,40 @@ Page({ | ||
2529 | }, | 2529 | }, |
2530 | 2530 | ||
2531 | 2531 | ||
2532 | + //---------联系客服------------ | ||
2533 | + contactService: function() { | ||
2534 | + getApp().getConfig(function(t) { | ||
2535 | + if (t.store_tel == undefined) { | ||
2536 | + getApp().request.get("/api/weshop/store/get/" + os.stoid, { | ||
2537 | + isShowLoading: 1, | ||
2538 | + data: {}, | ||
2539 | + success: function(rs) { | ||
2540 | + getApp().globalData.config = rs.data.data; | ||
2541 | + if (rs.data.data.store_tel == null && rs.data.data.store_tel == undefined) { | ||
2542 | + getApp().my_warnning("商家未设置电话", 0, th); | ||
2543 | + return false; | ||
2544 | + } | ||
2545 | + wx.makePhoneCall({ phoneNumber: rs.data.data.store_tel, }) | ||
2546 | + } | ||
2547 | + }) | ||
2548 | + } else { | ||
2549 | + wx.makePhoneCall({ phoneNumber: t.store_tel, }) | ||
2550 | + } | ||
2551 | + }); | ||
2552 | + }, | ||
2553 | + | ||
2554 | + //---------联系微信客服------------ | ||
2555 | + con_weixin:function () { | ||
2556 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
2557 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
2558 | + wx.openCustomerServiceChat({ | ||
2559 | + extInfo: {url: url}, | ||
2560 | + corpId: id, | ||
2561 | + success(res) {} | ||
2562 | + }) | ||
2563 | + } | ||
2564 | + | ||
2565 | + | ||
2532 | 2566 | ||
2533 | 2567 | ||
2534 | 2568 |
packageC/pages/presell/cart/cart.wxml
@@ -647,15 +647,20 @@ | @@ -647,15 +647,20 @@ | ||
647 | 647 | ||
648 | <!-- 客服 --> | 648 | <!-- 客服 --> |
649 | <view class="kefu-container shadow-1"> | 649 | <view class="kefu-container shadow-1"> |
650 | - <block wx:if="{{sys_switch.weapp_customertype}}"> | ||
651 | - <button wx:if="{{sys_switch.weapp_customertype}}" class="kefu-btn" | 650 | + <block wx:if="{{sys_switch.weapp_customertype==1}}"> |
651 | + <button class="kefu-btn" | ||
652 | open-type="contact" | 652 | open-type="contact" |
653 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 653 | session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
654 | <text class="iconfont icon-kefu fs60 co-red"></text> | 654 | <text class="iconfont icon-kefu fs60 co-red"></text> |
655 | </button> | 655 | </button> |
656 | </block> | 656 | </block> |
657 | + | ||
658 | + <block wx:elif="{{sys_switch.weapp_customertype==2}}"> | ||
659 | + <text bindtap="con_weixin" class="iconfont icon-kefu fs60 co-red"></text> | ||
660 | + </block> | ||
661 | + | ||
657 | <block wx:else> | 662 | <block wx:else> |
658 | - <text class="iconfont icon-kefu fs60 co-red"></text> | 663 | + <text bindtap="contactService" class="iconfont icon-kefu fs60 co-red"></text> |
659 | </block> | 664 | </block> |
660 | </view> | 665 | </view> |
661 | 666 |
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -3965,6 +3965,16 @@ Page({ | @@ -3965,6 +3965,16 @@ Page({ | ||
3965 | if (func) { | 3965 | if (func) { |
3966 | func(); | 3966 | func(); |
3967 | } | 3967 | } |
3968 | + }, | ||
3969 | + | ||
3970 | + con_weixin:function () { | ||
3971 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
3972 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
3973 | + wx.openCustomerServiceChat({ | ||
3974 | + extInfo: {url: url}, | ||
3975 | + corpId: id, | ||
3976 | + success(res) {} | ||
3977 | + }) | ||
3968 | } | 3978 | } |
3969 | 3979 | ||
3970 | }); | 3980 | }); |
packageC/pages/presell/goodsInfo/goodsInfo.wxml
@@ -482,10 +482,16 @@ | @@ -482,10 +482,16 @@ | ||
482 | <!-- -----------------底部按钮------------------ --> | 482 | <!-- -----------------底部按钮------------------ --> |
483 | <view class="join-cart"> | 483 | <view class="join-cart"> |
484 | <!-- bindtap="contactService" --> | 484 | <!-- bindtap="contactService" --> |
485 | - <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 485 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
486 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 486 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
487 | <view>客服</view> | 487 | <view>客服</view> |
488 | </button> | 488 | </button> |
489 | + | ||
490 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split" bindtap="con_weixin"> | ||
491 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
492 | + <view>客服</view> | ||
493 | + </view> | ||
494 | + | ||
489 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | 495 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
490 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 496 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
491 | <view>客服</view> | 497 | <view>客服</view> |
pages/goods/goodsInfo/goodsInfo.js
@@ -2976,9 +2976,21 @@ Page({ | @@ -2976,9 +2976,21 @@ Page({ | ||
2976 | return false; | 2976 | return false; |
2977 | } | 2977 | } |
2978 | 2978 | ||
2979 | + if (prom_type == 1 && prom_id==0){ | ||
2980 | + this.setData({ | ||
2981 | + prom_type: 0,isshow: 1, | ||
2982 | + }); | ||
2983 | + | ||
2984 | + //获取门店 | ||
2985 | + this.get_sto(); | ||
2986 | + this.get_sku(o.stoid, this.data.data, gid); | ||
2987 | + this.check_has_flash(); | ||
2988 | + return false; | ||
2989 | + } | ||
2990 | + | ||
2979 | //if (prom_type != 3 && prom_type!=0){ | 2991 | //if (prom_type != 3 && prom_type!=0){ |
2980 | //---判断秒杀---- | 2992 | //---判断秒杀---- |
2981 | - if (prom_type == 1) { | 2993 | + if (prom_type == 1 && prom_id>0) { |
2982 | //-------判断活动是否抢光--------- | 2994 | //-------判断活动是否抢光--------- |
2983 | await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { | 2995 | await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { |
2984 | 1: 1 | 2996 | 1: 1 |
@@ -5754,6 +5766,16 @@ Page({ | @@ -5754,6 +5766,16 @@ Page({ | ||
5754 | 5766 | ||
5755 | close_pop_more:function () { | 5767 | close_pop_more:function () { |
5756 | this.setData({is_pop_more:0}) | 5768 | this.setData({is_pop_more:0}) |
5769 | + }, | ||
5770 | + | ||
5771 | + con_weixin:function () { | ||
5772 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
5773 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
5774 | + wx.openCustomerServiceChat({ | ||
5775 | + extInfo: {url: url}, | ||
5776 | + corpId: id, | ||
5777 | + success(res) {} | ||
5778 | + }) | ||
5757 | } | 5779 | } |
5758 | 5780 | ||
5759 | 5781 |
pages/goods/goodsInfo/goodsInfo.wxml
@@ -905,10 +905,16 @@ | @@ -905,10 +905,16 @@ | ||
905 | <!-- -----------------底部按钮------------------ --> | 905 | <!-- -----------------底部按钮------------------ --> |
906 | <view class="join-cart"> | 906 | <view class="join-cart"> |
907 | <!-- bindtap="contactService" --> | 907 | <!-- bindtap="contactService" --> |
908 | - <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 908 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
909 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 909 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
910 | <view>客服</view> | 910 | <view>客服</view> |
911 | </button> | 911 | </button> |
912 | + | ||
913 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split" bindtap="con_weixin"> | ||
914 | + <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
915 | + <view>客服</view> | ||
916 | + </view> | ||
917 | + | ||
912 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | 918 | <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> |
913 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | 919 | <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> |
914 | <view>客服</view> | 920 | <view>客服</view> |
pages/goods/goodsList/g_filter.wxs
@@ -85,7 +85,7 @@ var g_filters = { | @@ -85,7 +85,7 @@ var g_filters = { | ||
85 | if(item.prom_type==8){ | 85 | if(item.prom_type==8){ |
86 | url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id | 86 | url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id |
87 | } | 87 | } |
88 | - if(item.prom_type==1){ | 88 | + if(item.prom_type==1 && item.prom_id>0 ){ |
89 | url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1"; | 89 | url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1"; |
90 | } | 90 | } |
91 | return url1; | 91 | return url1; |
pages/goods/search/g_filter.wxs
@@ -88,7 +88,7 @@ var g_filters = { | @@ -88,7 +88,7 @@ var g_filters = { | ||
88 | if(item.prom_type==8){ | 88 | if(item.prom_type==8){ |
89 | url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id | 89 | url1="/packageC/pages/presell/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id |
90 | } | 90 | } |
91 | - if(item.prom_type==1){ | 91 | + if(item.prom_type==1 && item.prom_id>0){ |
92 | url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1"; | 92 | url1="/pages/goods/goodsInfo/goodsInfo?goods_id="+item.goods_id+"&prom_id="+item.prom_id+"&prom_type=1"; |
93 | } | 93 | } |
94 | return url1; | 94 | return url1; |
pages/user/index/index.js
@@ -840,8 +840,19 @@ Page({ | @@ -840,8 +840,19 @@ Page({ | ||
840 | } | 840 | } |
841 | }) | 841 | }) |
842 | }, | 842 | }, |
843 | - | ||
844 | - | ||
845 | - | 843 | + |
844 | + con_weixin:function () { | ||
845 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
846 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
847 | + wx.openCustomerServiceChat({ | ||
848 | + extInfo: {url: url}, | ||
849 | + corpId: id, | ||
850 | + success(res) {} | ||
851 | + }) | ||
852 | + } | ||
853 | + | ||
854 | + | ||
855 | + | ||
856 | + | ||
846 | 857 | ||
847 | }) | 858 | }) |
pages/user/index/index.wxml
@@ -252,10 +252,16 @@ | @@ -252,10 +252,16 @@ | ||
252 | <!-- 没有链接地址的时候 --> | 252 | <!-- 没有链接地址的时候 --> |
253 | <block wx:else> | 253 | <block wx:else> |
254 | <block wx:if="{{item.name=='联系客服'}}"> | 254 | <block wx:if="{{item.name=='联系客服'}}"> |
255 | - <button class="item t-c" wx:if="{{sys_switch.weapp_customertype}}" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> | 255 | + <button class="item t-c" wx:if="{{sys_switch.weapp_customertype==1}}" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> |
256 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | 256 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> |
257 | <view class="fs26">联系客服</view> | 257 | <view class="fs26">联系客服</view> |
258 | - </button> | 258 | + </button> |
259 | + | ||
260 | + <view class="item t-c" bindtap="con_weixin" wx:elif="{{sys_switch.weapp_customertype==2}}"> | ||
261 | + <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | ||
262 | + <view class="fs26">联系客服</view> | ||
263 | + </view> | ||
264 | + | ||
259 | <view class="item t-c" bindtap="contactService" wx:else> | 265 | <view class="item t-c" bindtap="contactService" wx:else> |
260 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> | 266 | <image class="xc-center-img " src="{{iurl+item.icoimg}}"></image> |
261 | <view class="fs26">联系客服</view> | 267 | <view class="fs26">联系客服</view> |
pages/user/order_detail/order_detail.js
@@ -1431,7 +1431,17 @@ Page({ | @@ -1431,7 +1431,17 @@ Page({ | ||
1431 | icon: 'none', | 1431 | icon: 'none', |
1432 | duration: 3000 | 1432 | duration: 3000 |
1433 | }) | 1433 | }) |
1434 | - } | 1434 | + }, |
1435 | + | ||
1436 | + con_weixin:function () { | ||
1437 | + var url=this.data.sys_switch.weapp_customertype_url; | ||
1438 | + var id=this.data.sys_switch.weapp_customertype_appid; | ||
1439 | + wx.openCustomerServiceChat({ | ||
1440 | + extInfo: {url: url}, | ||
1441 | + corpId: id, | ||
1442 | + success(res) {} | ||
1443 | + }) | ||
1444 | + } | ||
1435 | 1445 | ||
1436 | 1446 | ||
1437 | 1447 |
pages/user/order_detail/order_detail.wxml
@@ -53,15 +53,10 @@ | @@ -53,15 +53,10 @@ | ||
53 | <view class="order-operate"> | 53 | <view class="order-operate"> |
54 | <view bindtap="checkTeam" class="contact-us check-btn" wx:if="{{optionIsGoup}}">查看拼团详情</view> | 54 | <view bindtap="checkTeam" class="contact-us check-btn" wx:if="{{optionIsGoup}}">查看拼团详情</view> |
55 | <view> | 55 | <view> |
56 | - <!-- <button wx:if="{{sys_switch.weapp_customertype}}" class="custom-service cart-ico new_split" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}"> --> | ||
57 | - <!-- <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
58 | - <view></view> --> | ||
59 | - <!-- </button> --> | ||
60 | - <button wx:if="{{sys_switch.weapp_customertype}}" class="contact-us goods-btn" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">联系客服</button> | ||
61 | - <!-- <view wx:else class="custom-service cart-ico new_split" bindtap="contactService"> | ||
62 | - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image> | ||
63 | - <view>联系客服</view> | ||
64 | - </view> --> | 56 | + |
57 | + <button wx:if="{{sys_switch.weapp_customertype==1}}" class="contact-us goods-btn" open-type="contact" session-from="wechat|{{userInfo.user_id}}|{{userInfo.nickname}}|{{userInfo.head_pic}}">联系客服</button> | ||
58 | + | ||
59 | + <view wx:elif="{{sys_switch.weapp_customertype==2}}" bindtap="con_weixin" class="contact-us goods-btn">联系客服</view> | ||
65 | <view wx:else bindtap="contactService" class="contact-us goods-btn">联系客服</view> | 60 | <view wx:else bindtap="contactService" class="contact-us goods-btn">联系客服</view> |
66 | </view> | 61 | </view> |
67 | <!-- <view bindtap="contactService" class="contact-us goods-btn">联系客服</view> --> | 62 | <!-- <view bindtap="contactService" class="contact-us goods-btn">联系客服</view> --> |