瀏覽代碼

活动的报名按钮

bding 2 年之前
父節點
當前提交
9b2ee1b316

+ 2 - 1
activityPages/activityDetail/activityDetail.vue

@@ -355,7 +355,7 @@ export default {
     },
     //报名的显示
     showWay() {
-      let text = this.detailData.SignupType ? "取消外呼" : "取消报名";
+      let text = this.detailData.SignupType == 1 ? "取消外呼" : "取消报名";
       return text;
     },
     showOutboundCall() {
@@ -423,6 +423,7 @@ export default {
         const index = prevPage.$vm.collectList.findIndex((item) => item.ActivityId == this.id);
         prevPage.$vm.collectList[index].IsSignup = this.detailData.IsSignup;
         prevPage.$vm.collectList[index].SignupNum = this.detailData.SignupNum;
+        prevPage.$vm.collectList[index].SignupType = this.detailData.SignupType;
         prevPage.$vm.collectList[index].IsAppointment = this.detailData.IsAppointment;
         prevPage.$vm.collectList[index].IsCancelMeetingReminder = this.detailData.IsCancelMeetingReminder;
       }

+ 1 - 0
activityPages/activityDetail/manageMixin.js

@@ -69,6 +69,7 @@ export default {
               } else {
                 this.detailData.IsSignup = 1;
                 this.detailData.SignupNum += 1;
+                this.detailData.SignupType = type;
                 this.synchronization();
                 if (res.Data.GoBindEmail) this.mailboxBinding = true;
                 if (res.Data.GoOutboundMobile) this.editIsShow = true;

+ 8 - 4
components/ItemComponent/activityItem.vue

@@ -175,6 +175,7 @@ export default {
       specialPopupMsg: "", // 消息的文案
       show_cancel_button: false, // 取消按钮的隐藏显示
       show_confirm_button: false, // 确定按钮的隐藏显示
+      itemData: {},
     };
   },
   computed: {},
@@ -195,6 +196,7 @@ export default {
     // 我要报名
     wanttosignup(item) {
       this.activityIdAdd = item.ActivityId;
+      this.itemData = item;
       if (item.YidongActivityId) {
         this.goDetail(item);
         return;
@@ -209,7 +211,7 @@ export default {
     //报名/取消报名
     signupIsAddOfCancel(item, type, valName = "") {
       let id = this.activityIdAdd || item.ActivityId;
-      let itemData = item;
+      let itemData = item || this.itemData;
       if (item && item.IsSignup == 1) {
         const str = item.ActivityTime.replace(/-/g, "/");
         const date = new Date(str);
@@ -232,7 +234,7 @@ export default {
             if (res.confirm) {
               const res = await activity.signupCancel({ ActivityId: item.ActivityId, SignupType: type, PageRouter: this.$store.state.pageRouterActivity });
               if (res.Ret === 200) {
-                this.parentDataEmit(item, "IsSignup", 0);
+                this.parentDataEmit(itemData, "IsSignup", 0);
                 this.init();
                 type == 1
                   ? uni.showToast({
@@ -267,7 +269,6 @@ export default {
               this.hasPermission = res.Data.HasPermission;
               this.jurisdictionList = res.Data;
               if (this.hasPermission == 1) {
-                item.SignupType = type;
                 this.signupType = valName == "CClass" ? "CClass" : res.Data.SignupType;
                 this.countryCode = res.Data.CountryCode;
                 this.mobileEdit = res.Data.Mobile;
@@ -286,7 +287,9 @@ export default {
                   if (res.Data.GoOutboundMobile) this.editIsShow = true;
                   else if (res.Data.GoFollow) this.goFollow = res.Data.GoFollow;
                   else if (res.Data.SignupStatus == "Success") this.isShow = true;
-                  this.parentDataEmit(item, "IsSignup", 1);
+                  console.log();
+                  this.parentDataEmit(itemData, "IsSignup", 1);
+                  this.parentDataEmit(itemData, "SignupType", type);
                 }
               } else if (this.hasPermission == 2) {
                 this.isShowhasPermission = true;
@@ -566,6 +569,7 @@ export default {
       }
     },
     parentDataEmit(item, value, num) {
+      console.log(item, value, num);
       let index = this.$parent.newDataList.findIndex((key) => key.Activity && key.Activity.ActivityId === item.ActivityId);
       this.$parent.newDataList[index].Activity[value] = num;
     },