Commit 0f89417e082b69112ff88ea14c535a958f5c4355

Authored by 后端研发-苏泰源
2 parents 03f818f4 f5c4b92a

个人中心、商品详情联系客服修改

pages/goods/goodsInfo/goodsInfo.js
... ... @@ -754,6 +754,9 @@ Page({
754 754  
755 755 //---展示---
756 756 onShow: function () {
  757 +
  758 +
  759 +
757 760 var goods_list = null, th = this, that = this;
758 761 var show_prew_img = this.data.show_prew_img
759 762 if (show_prew_img) {
... ... @@ -761,6 +764,11 @@ Page({
761 764 return false;
762 765 }
763 766  
  767 + if(this.data.show_video) {
  768 + this.data.show_video=0;
  769 + return false;
  770 + }
  771 +
764 772 //优惠券要实时更新
765 773 getApp().getConfig2(function (e) {
766 774 var json_d = JSON.parse(e.switch_list);
... ... @@ -2370,11 +2378,7 @@ Page({
2370 2378 b[i] = this.data.iurl + e[i];
2371 2379 }
2372 2380 this.data.show_prew_img = 1;
2373   -
2374   - wx.previewImage({
2375   - current: b[t.currentTarget.dataset.id],
2376   - urls: b
2377   - });
  2381 + getApp().pre_img2(b,t)
2378 2382 },
2379 2383  
2380 2384 previewCommentImgs_w: function (t) {
... ... @@ -2384,10 +2388,7 @@ Page({
2384 2388 b[i] = this.data.iurl + e[i];
2385 2389 }
2386 2390 this.data.show_prew_img = 1;
2387   - wx.previewImage({
2388   - current: b[t.currentTarget.dataset.id],
2389   - urls: b
2390   - });
  2391 + getApp().pre_img2(b,t)
2391 2392 },
2392 2393  
2393 2394 previewGoodsCommentImgs: function (t) {
... ... @@ -2395,10 +2396,7 @@ Page({
2395 2396 a = this.data.data.comment[t.currentTarget.dataset.cidx].img;
2396 2397 a = a.map(function (t) {
2397 2398 return e.data.url + t;
2398   - }), wx.previewImage({
2399   - current: a[t.currentTarget.dataset.id],
2400   - urls: a
2401   - });
  2399 + }), getApp().pre_img2(a,t);
2402 2400 this.data.show_prew_img = 1;
2403 2401 },
2404 2402 closePromModal: function () {
... ... @@ -2413,7 +2411,7 @@ Page({
2413 2411 },
2414 2412  
2415 2413 //--点击分享事件---
2416   - onShareAppMessage: function (t) {
  2414 + onShareAppMessage: function (t) { getApp().globalData.no_clear=1;
2417 2415  
2418 2416 var th = this;
2419 2417 var price = th.data.sele_g.shop_price;
... ... @@ -5943,6 +5941,12 @@ Page({
5943 5941  
5944 5942 wait_for_store_config: function () {
5945 5943 var th = this;
  5944 + //----获取系统参数-----
  5945 + getApp().getConfig2(function (e) {
  5946 + th.setData({
  5947 + bconfig: e,
  5948 + });
  5949 + })
5946 5950 var t_time = setInterval(function () {
5947 5951 if (th.data.bconfig == null) false;
5948 5952 var e = th.data.bconfig;
... ... @@ -6278,10 +6282,7 @@ Page({
6278 6282  
6279 6283 previewImage(e) {
6280 6284 this.data.show_prew_img = 1;
6281   - wx.previewImage({
6282   - //将图片预览出来
6283   - urls: [this.data.sele_g.original_img]
6284   - });
  6285 + getApp().pre_img(this.data.sele_g.original_img);
6285 6286 },
6286 6287  
6287 6288 is_show_more_buy: function () {
... ... @@ -6531,14 +6532,7 @@ Page({
6531 6532 },
6532 6533  
6533 6534 con_weixin: function () {
6534   - var url = this.data.sys_switch.weapp_customertype_url;
6535   - var id = this.data.sys_switch.weapp_customertype_appid;
6536   - wx.openCustomerServiceChat({
6537   - extInfo: {url: url},
6538   - corpId: id,
6539   - success(res) {
6540   - }
6541   - })
  6535 + getApp().con_wx(this);
6542 6536 },
6543 6537 get_normal(gid){
6544 6538 this.setData({
... ... @@ -6648,11 +6642,24 @@ Page({
6648 6642  
6649 6643 // 预览海报
6650 6644 previewPoster() {
  6645 + getApp().globalData.no_clear=1;
6651 6646 wx.previewImage({
6652 6647 current: this.data.shareImgPath, // 当前显示图片的http链接
6653 6648 urls: [this.data.shareImgPath] ,// 需要预览的图片http链接列表
6654 6649 });
6655 6650 },
  6651 +
  6652 + screenChange:function (e) {
  6653 + let fullScreen = e.detail.fullScreen //值true为进入全屏,false为退出全屏
  6654 + if (fullScreen ){ //退出全屏
  6655 + getApp().globalData.no_clear=1;
  6656 + this.data.show_video=1;
  6657 + }
  6658 + },
  6659 +
  6660 + click_contact:function () {
  6661 + getApp().globalData.no_clear=1;
  6662 + },
6656 6663  
6657 6664  
6658 6665 //打开客服操作菜单
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -42,7 +42,7 @@
42 42 </image>
43 43 </view>
44 44 <view wx:else>
45   - <video class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video>
  45 + <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video>
46 46 </view>
47 47 </swiper-item>
48 48 <swiper-item wx:for="{{gallery}}" wx:key="gallery">
... ... @@ -1010,16 +1010,6 @@
1010 1010  
1011 1011 <!-- -----------------底部按钮------------------ -->
1012 1012 <view class="join-cart">
1013   - <!-- bindtap="contactService" -->
1014   - <!-- <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}}">
1015   - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
1016   - <view>客服</view>
1017   - </button> -->
1018   -
1019   - <!-- <view wx:elif="{{sys_switch.weapp_customertype==2}}" class="custom-service cart-ico new_split" bindtap="con_weixin">
1020   - <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
1021   - <view>客服</view>
1022   - </view> -->
1023 1013  
1024 1014 <view class="custom-service cart-ico new_split" bindtap="openCS">
1025 1015 <image class="cs-img" src="{{iurl}}/miniapp/images/custom-service.png"></image>
... ...
pages/goods/goodsInfo/goodsInfo.wxss
... ... @@ -706,6 +706,7 @@ view.cart-btn-lg {
706 706 color: #d60021;
707 707 font-size: 33rpx;
708 708 font-weight: bold;
  709 + display: flex;
709 710 }
710 711  
711 712 .spec-goods-stock {
... ...
pages/user/index/index.js
... ... @@ -504,7 +504,7 @@ Page({
504 504 /**
505 505 * 用户点击右上角分享
506 506 */
507   - onShareAppMessage: function() {},
  507 + onShareAppMessage: function() { getApp().globalData.no_clear=1; },
508 508  
509 509 //------卡片的显示和关闭--------
510 510 show_tc: function() {
... ... @@ -895,13 +895,7 @@ Page({
895 895 },
896 896  
897 897 con_weixin:function () {
898   - var url=this.data.sys_switch.weapp_customertype_url;
899   - var id=this.data.sys_switch.weapp_customertype_appid;
900   - wx.openCustomerServiceChat({
901   - extInfo: {url: url},
902   - corpId: id,
903   - success(res) {}
904   - })
  898 + getApp().con_wx(this);
905 899 },
906 900  
907 901 //初始话按钮图标
... ... @@ -939,6 +933,7 @@ Page({
939 933 })
940 934 this.setData({user_tool:d_list});
941 935 },
  936 +
942 937  
943 938  
944 939 //打开客服操作菜单
... ... @@ -967,12 +962,19 @@ Page({
967 962 this.setData({
968 963 hiddenCS: true,
969 964 });
970   - }
  965 + },
971 966  
972 967  
973 968  
974 969  
975 970  
  971 + click_contact:function () {
  972 + getApp().globalData.no_clear=1;
  973 + }
  974 +
  975 +
  976 +
  977 +
976 978  
977 979  
978 980 })
... ...