Browse Source

12.2 xiu付

bding 1 year ago
parent
commit
b224fc82d9

+ 23 - 7
activityPages/activityDetail/activityDetail.vue

@@ -122,7 +122,7 @@
               <view class="item-right dustrial-content">
                 <view class="item" v-for="item in detailData.Listndustrial" :key="item.IndustrialManagementId">
                   <view :class="['dustrial-li', item.IsJump && 'dustrial-item']" @click="goDustrialHandler(item)">{{ item.IndustryName }} </view>
-                  <image v-if="item.IndustryNewLabel"  class="new_icon" src="https://hzstatic.hzinsights.com/cygx/icon/new_report.png" mode=""></image>
+                  <image v-if="item.IndustryNewLabel" class="new_icon" src="https://hzstatic.hzinsights.com/cygx/icon/new_report.png" mode=""></image>
                 </view>
               </view>
             </view>
@@ -554,13 +554,13 @@ export default {
     // 跳转新的小程序
     networkBtn() {
       if (this.detailData.OnlineParticipation.includes("http")) {
-      console.log(1);
+        console.log(1);
 
         uni.navigateTo({
           url: "/activityPages/networkAttend/networkAttend?url=" + this.detailData.OnlineParticipation,
         });
       } else {
-      console.log(2);
+        console.log(2);
 
         uni.navigateToMiniProgram({
           appId: "wxade30ff0c4ee757d",
@@ -582,10 +582,26 @@ export default {
     },
     // 提问
     async askingGo(type = "") {
-      await activity.checkAskActivity({ ActivityId: Number(this.id), PageRouter: this.$store.state.pageRouterActivity });
-      uni.navigateTo({
-        url: "/activityPages/generationAsk/generationAsk?id=" + this.id + "&type=" + type,
-      });
+      const res = await activity.checkAskActivity({ ActivityId: Number(this.id), PageRouter: this.$store.state.pageRouterActivity });
+      if (res.Ret === 200) {
+        if (res.Data.SignupStatus === "Success") {
+          uni.navigateTo({
+            url: "/activityPages/generationAsk/generationAsk?id=" + this.id + "&type=" + type,
+          });
+        } else {
+          uni.showModal({
+            confirmText: "知道了",
+            confirmColor: "#376cbb",
+            content: res.Msg || res.Data.PopupMsg,
+            showCancel: false,
+            success: (res) => {
+              if (res.confirm) {
+                this.getActivityDetail();
+              }
+            },
+          });
+        }
+      }
     },
 
     // 复制的操作

+ 3 - 3
activityPages/activityDetail/manageMixin.js

@@ -81,7 +81,7 @@ export default {
             else if (res.Data.SignupStatus == "Success") this.isShow = true;
           }
           this.selectShow = false;
-          this.detailData.IsAppointment = 1;
+          res.Data.SignupStatus == "Success" && (this.detailData.IsAppointment = 1);
           this.synchronization();
         }
       } else {
@@ -113,7 +113,7 @@ export default {
               uni.showModal({
                 confirmText: "知道了",
                 confirmColor: "#376cbb",
-                content: res.Msg,
+                content: res.Msg || res.Data.PopupMsg,
                 showCancel: false,
                 success: (res) => {
                   if (res.confirm) {
@@ -139,7 +139,7 @@ export default {
             uni.showModal({
               confirmText: "知道了",
               confirmColor: "#376cbb",
-              content: res.Msg,
+              content: res.Msg || res.Data.PopupMsg,
               showCancel: false,
               success: (res) => {
                 if (res.confirm) {

+ 42 - 29
components/activity/indexActivity.js

@@ -69,7 +69,7 @@ export default {
     signupIsAddOfCancel(item, type, valName = "") {
       let id = this.activityIdAdd || item.ActivityId;
       this.itemData = item;
-			console.log(this.itemData,item.IsSignup);
+      console.log(this.itemData, item.IsSignup);
       if (item && item.IsSignup == 1) {
         if (item.IsResearchPoints) {
           if (isTimeGreaterThanCurrent(item.CancelDeadline)) {
@@ -175,7 +175,7 @@ export default {
               };
               this.collectList.forEach((item) => {
                 if (id == item.ActivityId) {
-                  item.IsCancelMeetingReminder = 1;
+                  res.Data.SignupStatus == "Success" && (item.IsCancelMeetingReminder = 1);
                 }
               });
             } else if (this.hasPermission == 2) {
@@ -222,9 +222,23 @@ export default {
         this.hasPermission = res.Data.HasPermission;
         this.jurisdictionList = res.Data;
         if (this.hasPermission == 1) {
-          uni.navigateTo({
-            url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
-          });
+          if (res.Data.SignupStatus === "Success") {
+            uni.navigateTo({
+              url: "/activityPages/generationAsk/generationAsk?id=" + item.ActivityId + "&type=" + type,
+            });
+          } else {
+            uni.showModal({
+              confirmText: "知道了",
+              confirmColor: "#376cbb",
+              content: res.Msg || res.Data.PopupMsg,
+              showCancel: false,
+              success: (res) => {
+                if (res.confirm) {
+                  this.getActivityDetail();
+                }
+              },
+            });
+          }
         } else if (this.hasPermission == 2) {
           this.isShowhasPermission = true;
         } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
@@ -255,7 +269,6 @@ export default {
               if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
               else if (res.Data.SignupStatus == "Success") {
                 this.isShow = true;
-                item.IsAppointment = 1;
               }
               item.IsAppointment = 1;
             }
@@ -350,28 +363,28 @@ export default {
         this.isResearchModalShow = true;
       }
     },
-		async signupCheck(item,type,valName = ""){
-			await this.$store.dispatch("showLoginModal")
-			this.signupIsAddOfCancel(item,type,valName)
-		},
-		async summaryHandelCheck(item){
-			await this.$store.dispatch("showLoginModal")
-			this.summaryIsHandel(item)
-		},
-		async meetingReminderCheck(id, type){
-			await this.$store.dispatch("showLoginModal")
-			this.meetingReminderAdd(id, type)
-		},
-		async askingCheck(item, type = ""){
-			await this.$store.dispatch("showLoginModal")
-			this.askingGo(item, type)
-		},
-		async wanttosignupCheck(item){
-			await this.$store.dispatch("showLoginModal")
-			this.wanttosignup(item)
-		},
-		async goDetailCheck(item){
-			this.goDetail(item)
-		}
+    async signupCheck(item, type, valName = "") {
+      await this.$store.dispatch("showLoginModal");
+      this.signupIsAddOfCancel(item, type, valName);
+    },
+    async summaryHandelCheck(item) {
+      await this.$store.dispatch("showLoginModal");
+      this.summaryIsHandel(item);
+    },
+    async meetingReminderCheck(id, type) {
+      await this.$store.dispatch("showLoginModal");
+      this.meetingReminderAdd(id, type);
+    },
+    async askingCheck(item, type = "") {
+      await this.$store.dispatch("showLoginModal");
+      this.askingGo(item, type);
+    },
+    async wanttosignupCheck(item) {
+      await this.$store.dispatch("showLoginModal");
+      this.wanttosignup(item);
+    },
+    async goDetailCheck(item) {
+      this.goDetail(item);
+    },
   },
 };