zhengjinyi 2 年之前
父节点
当前提交
7dccc44f83

+ 1 - 0
src/main/resources/static/css/help/clubinfo.css

@@ -46,6 +46,7 @@
 
 /*移动端**/
  @media screen and (max-width:768px){
+  body{background-color: #FFFFFF;}
   .club-info-logo{width: 100%;height: 14.6vw;box-sizing: border-box;padding: 4vw 0;background-color: #FFFFFF;}
   .club-info-logo .logo{width: 24vw;height: 6.6vw;display: block;margin: 0 auto;}
   .club-info-logo .logo img{width: 24vw;height: 6.6vw;display: block;}

+ 11 - 0
src/main/resources/static/js/common/serviceapi/user.service.js

@@ -452,4 +452,15 @@ var UserApi = {
                 callback(res);
             });
         },
+        userGetWechatMinLink: function (params, callback) {//获取H5跳转小程序路径
+            Http.AjaxService({
+                url: '/user/wechat/link',
+                type:'get',
+                data:params,
+                json:false,
+                isHost:true
+            }).then(function (res) {
+                callback(res);
+            });
+        },
 };

+ 18 - 2
src/main/resources/static/js/help/clubinfo.js

@@ -13,6 +13,11 @@ var InformationPage = new Vue({
         salesParams:{
             clubId:0,
             spId:0
+        },
+        linkParams:{
+            path:'pages/seller/club/club-info',
+            query:'',
+            env:'trial'//正式"release",体验"trial",开发"develop"
         }
     },
     filters: {
@@ -94,6 +99,16 @@ var InformationPage = new Vue({
                 }
             })
         },
+        userGetWechatMinLink: function () {// 获取小程序路径并跳转
+            var _self = this;
+            UserApi.userGetWechatMinLink(_self.linkParams, function (response) {
+                if (response.code == 0) {
+                    location.href = response.data;
+                } else {
+                    console.log('分配协销异常')
+                }
+            })
+        },
         checkedCoupon:function(idx){
             // 选择商品
             var _self = this;
@@ -116,9 +131,9 @@ var InformationPage = new Vue({
             }
             _self.userClubChoseSales();
         },
-        showPopup:function(){// 显示弹窗
+        showPopup:function(){// 跳转小程序
             var _self = this;
-            _self.isShowPopup = true;
+            _self.userGetWechatMinLink();
         },
         hidePopup:function(){// 隐藏弹窗
             var _self = this;
@@ -131,6 +146,7 @@ var InformationPage = new Vue({
     mounted: function () {
         var _this = this;
         _this.clubId = _this.salesParams.clubId = getUrlParam("clubId");
+        _this.linkParams.query = `clubId=${_this.clubId}`;
         _this.userClubRecordLinkage();
     }
 

+ 2 - 2
src/main/resources/templates/help/clubinfo.html

@@ -59,8 +59,8 @@
       <div class="info-p" v-if="clubInfo.profile">公司介绍:<span>{{ clubInfo.profile ? clubInfo.profile : '无' }}</span></div>
     </div>
   </div>
-  <div class="info-button">
-    <a href="javascript:void(0)" class="btn" @click="showPopup">{{  clubInfo.spType === 0 ? '分配销售' : '更换销售' }}</a>
+  <div class="info-button" v-if="clubInfo.spType === 0">
+    <a href="javascript:void(0)" class="btn" @click="showPopup">分配销售</a>
   </div>
   <!--优惠券弹窗-->
   <div class="seller-popup" v-show="isShowPopup" :class="isShowPopup ? 'show' : 'hide'">