Browse Source

切换4。3

小彬 3 years ago
parent
commit
4daa7e31ac

+ 0 - 1
App.vue

@@ -11,7 +11,6 @@ export default {
     uni.getSystemInfo({
       success: function (res) {
         if (res.windowWidth > 700) {
-            console.log('进来了');
           uni.reLaunch({
             url: "/pages/pcWebViev/pcWebViev?path=" + optios.path + "&query=" + JSON.stringify(optios.query),
           });

+ 1 - 1
activityPages/activityDetail/activityDetail.vue

@@ -196,7 +196,7 @@
     </view>
     <!-- 权限部分 -->
     <view v-else>
-      <jurisdiction :haveAuth="haveAuth" :industryMsg="industryMsg" :msgType="msgType" :sellerMobile="sellerMobile" :sellerName="sellerName"></jurisdiction>
+      <jurisdiction :idAct="id" :haveAuth="haveAuth" :industryMsg="industryMsg" :msgType="msgType" :sellerMobile="sellerMobile" :sellerName="sellerName"></jurisdiction>
     </view>
   </view>
 </template>

+ 39 - 9
activityPages/activityDetail/jurisdiction/components.vue

@@ -1,24 +1,30 @@
 <template>
-  <view class="noauth-cont" v-if="haveAuth === 2 || haveAuth === 3 || haveAuth === 4">
+  <view class="noauth-cont" v-if="haveAuth === 2 || haveAuth === 3 || haveAuth === 4 || haveAuth === 5">
     <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
     <block v-if="haveAuth == 3">
       <view class="tip">{{ industryMsg }}</view>
       <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
     </block>
-    <block v-if="haveAuth == 4">
+    <block v-if="haveAuth == 4 ">
+      <view class="tip">{{ industryMsg }}</view>
+      <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
+    </block>
+     <block v-if="haveAuth == 5 ">
       <view class="tip">{{ industryMsg }}</view>
       <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
     </block>
     <view class="tip" v-if="haveAuth === 2">
       <text style="margin-bottom: 20rpx">
-        {{ industryMsg }}
+        <!-- {{ industryMsg }} -->
+        您暂无权限参加此活动
       </text>
-      <text> 若想参加可以联系对口销售 </text>
+      <text>若想参加可以联系对口销售 </text>
       <text @click="callPhone(sellerMobile)"
         >{{ sellerName }}:<text style="color: #d4bf86; display: inline-block">{{ sellerMobile }}</text></text
       >
-      <text>开通{{ msgType == "Type" ? "对应行业" : "该行业" }}的试用权限</text>
+      <text>申请开通对应的试用权限</text>
     </view>
+     <view v-if="haveAuth === 2" class="btn-cont" @click="sellerApplyAuth"> 立即申请 </view>
     <view class="btn-cont back-btn" @click="backIndex"> 返回</view>
   </view>
 </template>
@@ -47,6 +53,10 @@ export default {
       type: String,
       required: true,
     },
+    idAct:{
+      type: Number,
+      required: true,
+    }
   },
   methods: {
     /* 无权限申请开通权限 */
@@ -54,9 +64,9 @@ export default {
       /* 区分是否是潜在用户 */
       this.haveAuth === 3
         ? uni.navigateTo({
-            url: "/pageMy/applyTrial/applyTrial",
+            url: "/pageMy/applyTrial/applyTrial?tryType=Activity&detailId=" + this.idAct,
           })
-        : uni.showModal({
+        : this.haveAuth === 5 ? this.sellerApplyAuth()  : uni.showModal({
             title: "",
             content: "您已经提交过申请了,请耐心等待",
             showCancel: false,
@@ -64,6 +74,25 @@ export default {
             success: function (res) {},
           });
     },
+    //销售的立即申请
+    sellerApplyAuth(){
+      User.applyTry({
+            TryType : 'Activity',
+            DetailId: this.idAct
+      }).then((res) => {
+          if(res.Ret === 200) {
+            uni.showModal({
+            title: "",
+            content: "提交申请成功,请耐心等待",
+            showCancel: false,
+            confirmColor: "#3385FF",
+            success: function (res) {
+              this.backIndex()
+            },
+          });
+          }
+      })
+    },
     // 返回首頁
     backIndex() {
       uni.navigateBack({
@@ -120,8 +149,9 @@ export default {
     line-height: 80rpx;
 
     &.back-btn {
-      background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%) !important;
-      color: #fff;
+      background: #fff !important;
+      color: #2C83FF;
+      border: 1px solid #2C83FF;
       margin-top: 30rpx;
     }
 

+ 1 - 1
activityPages/components/index.js

@@ -238,4 +238,4 @@ export default {
 
     // 	}
   },
-};
+};

+ 11 - 3
activityPages/components/indexActivity.js

@@ -32,6 +32,8 @@ export default {
         SellerMobile: "",
         PopupMsg: "",
         OperationMode: "",
+        SellerName:'',
+        ActivityId:''
       },
       editIsShow: false, //外呼莫泰框
       isCancelShow: false,
@@ -89,6 +91,7 @@ export default {
           .then((res) => {
             if (res.Ret == 200) {
               this.hasPermission = res.Data.HasPermission;
+              this.jurisdictionList.ActivityId = res.Data.ActivityId;
               if (this.hasPermission == 1) {
                 const index = this.collectList.findIndex((item) => item.ActivityId == id);
                 this.collectList[index].SignupType = type;
@@ -118,9 +121,10 @@ export default {
                 }
               } else if (this.hasPermission == 2) {
                 this.jurisdictionList.SellerMobile = res.Data.SellerMobile;
+                this.jurisdictionList.SellerName = res.Data.SellerName;
                 this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
                 this.isShowhasPermission = true;
-              } else if (this.hasPermission == 3 || this.hasPermission == 4) {
+              } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
                 this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
                 this.applyForIsShow = true;
               }
@@ -172,6 +176,7 @@ export default {
         .then((res) => {
           if (res.Ret == 200) {
             this.hasPermission = res.Data.HasPermission;
+            this.jurisdictionList.ActivityId = res.Data.ActivityId;
             if (this.hasPermission == 1) {
               if ((res.Data.GoFollow && res.Data.SignupStatus !== "Success") || !res.Data.GoFollow) {
                 this.isShow = true;
@@ -192,9 +197,10 @@ export default {
               });
             } else if (this.hasPermission == 2) {
               this.jurisdictionList.SellerMobile = res.Data.SellerMobile;
+              this.jurisdictionList.SellerName = res.Data.SellerName;
               this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
               this.isShowhasPermission = true;
-            } else if (this.hasPermission == 3 || this.hasPermission == 4) {
+            } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
               this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
               this.applyForIsShow = true;
             }
@@ -289,15 +295,17 @@ export default {
       const res = await activity.checkAskActivity({ActivityId:item.ActivityId })
       if (res.Ret == 200) {
         this.hasPermission = res.Data.HasPermission;
+        this.jurisdictionList.ActivityId = res.Data.ActivityId;
         if (this.hasPermission == 1) {
           uni.navigateTo({
             url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId,
           });
         } else if (this.hasPermission == 2) {
           this.jurisdictionList.SellerMobile = res.Data.SellerMobile;
+          this.jurisdictionList.SellerName = res.Data.SellerName;
           this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
           this.isShowhasPermission = true;
-        } else if (this.hasPermission == 3 || this.hasPermission == 4) {
+        } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
           this.jurisdictionList.PopupMsg = res.Data.PopupMsg;
           this.applyForIsShow = true;
         }

+ 24 - 6
components/modalDialog.vue

@@ -58,14 +58,18 @@
       :content-style="{ fontSize: '32rpx' }"
       @confirm="showhasPermissionBtn"
       :show-cancel-button="true"
-      confirm-text="拨号"
+      confirm-text="提交申请"
       @cancel="showhasPermissionCancel"
       :show-title="false"
       :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
       :confirm-style="{ fontWeight: '700' }"
     >
       <view class="slot-content">
-        <rich-text :nodes="hasPermissionText"></rich-text>
+        <!-- <rich-text :nodes="hasPermissionText"></rich-text> -->
+        <text>您暂无权限参加此活动</text>
+        <text>若想参加可以联系对口销售</text>
+        <view>{{jurisdictionList.SellerName}} : <text @click="mobileDial" class="seller-mobile"> {{jurisdictionList.SellerMobile}}</text></view>
+        <text>申请开通对应的试用权限</text>
       </view>
     </u-modal>
     <u-modal v-model="showRelation" confirm-text="知道了" :confirm-style="{ fontWeight: '700' }" :content="contentRelation"></u-modal>
@@ -108,7 +112,7 @@
 </template>
 
 <script>
-import { activity } from "@/config/api.js";
+import { User,activity } from "@/config/api.js";
 export default {
   data() {
     return {
@@ -321,10 +325,12 @@ export default {
       this.$parent.applyForIsShow = false;
       if (this.hasPermission == 3) {
         uni.navigateTo({
-          url: "/pageMy/applyTrial/applyTrial",
+          url: "/pageMy/applyTrial/applyTrial?tryType=Activity&detailId=" + this.jurisdictionList.ActivityId,
         });
       } else if (this.hasPermission == 4) {
         this.showRelation = true;
+      }else if (this.hasPermission == 5) {
+       this.showhasPermissionBtn()
       }
     },
     applyIsShowCancel() {
@@ -332,7 +338,16 @@ export default {
       this.$parent.applyForIsShow = false;
     },
     showhasPermissionBtn() {
-      uni.makePhoneCall({
+      User.applyTry({
+            TryType : 'Activity',
+            DetailId: this.jurisdictionList.ActivityId
+      }).then((res) => {
+         this.showhasPermission = false;
+         this.$parent.isShowhasPermission = false;
+      })
+    },
+    mobileDial(){
+       uni.makePhoneCall({
         phoneNumber: this.jurisdictionList.SellerMobile, //仅为示例
       });
       this.showhasPermission = false;
@@ -392,7 +407,10 @@ export default {
   color: #0f1826;
   line-height: 48rpx;
 }
-
+.seller-mobile {
+  display: inline-block;
+  color: #2979ff;
+}
 .u-model__footer__button.data-v-3626fcec {
   border-right: 1rpx solid #333;
 }

+ 7 - 1
pageMy/applyTrial/applyTrial.vue

@@ -44,14 +44,18 @@ export default {
       company: "",
       img: "https://hongze.oss-accelerate.aliyuncs.com/static/images/202102/20210219/gYD8azAtSeVzL8ZMbAu9mCyCxcTF.png",
       fileList: [], //名片列表
+      tryType:'',
+      detailId:0
     };
   },
-  onLoad() {
+  onLoad(op) {
     if (this.$db.get("mobile")) {
       this.mobile = this.$db.get("mobile");
     } else {
       this.getPhone();
     }
+    this.tryType= op.tryType || ''
+    this.detailId = op.detailId || 0
   },
   methods: {
     /* 获取手机号 */
@@ -81,6 +85,8 @@ export default {
           BusinessCardUrl: this.fileList.join(","),
           CompanyName: this.company,
           RealName: this.name,
+          TryType : this.tryType,
+          DetailId: this.detailId > 0 ? Number(this.detailId) : 0,
         }).then((res) => {
           if (res.Ret === 200) {
             uni.redirectTo({

+ 33 - 9
pageMy/reportDetail/reportDetail.vue

@@ -7,20 +7,23 @@
     <view class="noauth-cont" v-else-if="haveAuth === 2 || haveAuth === 3 || haveAuth === 4 || haveAuth === 5">
       <image src="https://hzstatic.hzinsights.com/cygx/czbk/noauth.png" class="noauth-ico"></image>
       <block v-if="haveAuth !== 3">
-        <view class="tip">您暂无权限查看{{ industry }}内容,若想查看可以申请开通哦</view>
+        <!-- <view class="tip">您暂无权限查看{{ industry }}内容,若想查看可以申请开通哦</view> -->
+        <view class="tip">您暂无权限查看此报告内容,若想查看可以申请开通对应的试用权限</view>
         <view class="btn-cont" @click="applyAuth"> 立即申请 </view>
       </block>
       <view class="tip" v-if="haveAuth === 3">
-        您暂无权限查看{{ industry }}内容
+        <!-- 您暂无权限查看{{ industry }}内容 -->
+        您暂无权限查看此报告内容
         <view class="contract">
           若想查看可以联系对口销售
           <text @click="callPhone(sale_number)"
             >{{ sale_name }}:<text style="color: #d4bf86">{{ sale_number }}</text></text
           >
         </view>
-        <view>开通该行业的试用权限</view>
+        <!-- <view>开通该行业的试用权限</view> -->
+        <view>申请开通对应的试用权限</view>      
       </view>
-
+      <view v-if="haveAuth === 3" class="btn-cont" @click="sellerApplyAuth"> 立即申请 </view>
       <view class="btn-cont back-btn" @click="backIndex"> 返回 </view>
     </view>
   </view>
@@ -79,6 +82,8 @@ export default {
       this.haveAuth === 2
         ? User.applyTry({
             ApplyMethod: 3,
+            TryType: "Article",
+            DetailId: Number(this.id),
           }).then((res) => {
             if (res.Ret === 200) {
               uni.navigateTo({
@@ -88,7 +93,7 @@ export default {
           })
         : this.haveAuth === 4
         ? uni.navigateTo({
-            url: "/pageMy/applyTrial/applyTrial",
+            url: "/pageMy/applyTrial/applyTrial?tryType=Article&detailId=" + this.id,
           })
         : uni.showModal({
             title: "",
@@ -98,6 +103,25 @@ export default {
             success: function (res) {},
           });
     },
+    //销售的立即申请
+    sellerApplyAuth() {
+      User.applyTry({
+        TryType: "Article",
+        DetailId: Number(this.id),
+      }).then((res) => {
+       if(res.Ret === 200) {
+         uni.showModal({
+            title: "",
+            content: "提交申请成功,请耐心等待",
+            showCancel: false,
+            confirmColor: "#365595",
+            success: function (res) {
+            this.backIndex()
+            },
+          });
+      }
+      });
+    },
     // 返回首頁
     backIndex() {
       uni.navigateBack({
@@ -205,7 +229,7 @@ export default {
     // })
     this.id = option.id ? option.id : "";
     if (!this.id && !+this.id > 0) {
-      this.errorDetails()
+      this.errorDetails();
     }
   },
   /**
@@ -341,9 +365,9 @@ export default {
       text-align: center;
       line-height: 80rpx;
       &.back-btn {
-        background: linear-gradient(268deg, #2ddbff 0%, #1599ff 49%, #005eff 100%) !important;
-        // border: 2rpx solid #3385FF;
-        color: #fff;
+        background: #fff !important;
+        color: #2c83ff;
+        border: 1px solid #2c83ff;
         margin-top: 30rpx;
       }
       .btn_bg {

+ 60 - 65
pages/pcWebViev/pcWebViev.vue

@@ -1,72 +1,67 @@
 <template>
-    <view>
-        <block v-if="access_token">
-             <web-view :src="url + urlPath + '?queryList=' + queryList +'&token=' + access_token" @message="handleGetMessage"></web-view>
-        </block>
-       
-    </view>
+  <view>
+    <block v-if="access_token">
+      <web-view :src="url + urlPath + '?queryList=' + queryList + '&token=' + access_token" @message="handleGetMessage"></web-view>
+    </block>
+  </view>
 </template>
 
 <script>
-    import {User} from "@/config/api.js";
-    export default {
-        data() {
-            return {
-                //url:"http://192.168.2.22:3000/cygx_pc/",//开发
-                //url: 'https://cygxpctest.hzinsights.com/cygx_pc', //测试
-                url: 'https://cygxpc.hzinsights.com/cygx_pc', //生产
-                urlPath:'',
-                queryList:'',
-                urlShare:'',
-                titleShare:'',
-                access_token :'' 
-            }
+import { User } from "@/config/api.js";
+export default {
+  data() {
+    return {
+      //url:"http://192.168.2.22:3000/cygx_pc/",//开发
+     // url: "https://cygxpctest.hzinsights.com/cygx_pc", //测试
+      url: 'https://cygxpc.hzinsights.com/cygx_pc', //生产
+      urlPath: "",
+      queryList: "",
+      urlShare: "",
+      titleShare: "",
+      access_token: "",
+    };
+  },
+  methods: {
+    getToken() {
+      uni.login({
+        success: (result) => {
+          User.wechatLog({
+            Code: result.code,
+          }).then((res) => {
+            try {
+              let token = res.Data.Authorization;
+              this.$db.set("access_token", token);
+              this.access_token = token;
+            } catch (e) {}
+          });
         },
-        methods: {
-            getToken(){
-                uni.login({
-                  success: (result) => {
-                    User.wechatLog({
-                      Code: result.code,
-                    }).then((res) => {
-                      try {
-                        let token = res.Data.Authorization;
-                        this.$db.set("access_token", token);
-                         this.access_token = token
-                      } catch (e) {}
-                    });
-                  },
-                });
-            },
-            handleGetMessage(e) {
-                const data=e.detail.data[e.detail.data.length-1]
-                this.urlShare=data.url
-                this.titleShare=data.title
-            },
-            initLoad(optios){
-                let urlType=['index','reportForm','activity','themeActivity','activityDetail','reportDetail','IndustryReport','reportSecretDetail','roadEssence']
-                if(JSON.stringify(optios) !== "{}" && optios.path ) {
-                    let pathUrl=optios.path.split('/')[2]
-                    this.urlPath = urlType.includes(pathUrl) ? pathUrl : ''
-                    this.queryList = optios.query || ''
-                }
-               
-            }
-        },
-        onLoad(optios) {   
-        this.getToken()
-           
-            this.initLoad(optios)
-        },
-        onShareAppMessage (op) {
-          return {
-            title:this.titleShare,
-            path: this.urlShare,
-          };
-        },
-    }
+      });
+    },
+    handleGetMessage(e) {
+      const data = e.detail.data[e.detail.data.length - 1];
+      this.urlShare = data.url;
+      this.titleShare = data.title;
+    },
+    initLoad(optios) {
+      let urlType = ["index", "reportForm", "activity", "themeActivity", "activityDetail", "reportDetail", "IndustryReport", "reportSecretDetail", "roadEssence"];
+      if (JSON.stringify(optios) !== "{}" && optios.path) {
+        let pathUrl = optios.path.split("/")[2];
+        this.urlPath = urlType.includes(pathUrl) ? '/' + pathUrl : "/index";
+        this.queryList = optios.query || "";
+      }
+    },
+  },
+  onLoad(optios) {
+    this.getToken();
+    this.initLoad(optios);
+  },
+  onShareAppMessage(op) {
+    return {
+      title: this.titleShare,
+      path: this.urlShare,
+    };
+  },
+};
 </script>
 
-<style>
-
-</style>
+<style></style>