LAPTOP-FO2T5SIU\35838 11 maanden geleden
bovenliggende
commit
baabd3dccb

+ 2 - 2
pages/index/components/activity.vue

@@ -62,7 +62,7 @@ export default {
         // },
       ],
       search: {
-        createdBy: getUserLocalStorageInfo().userId,
+        // createdBy: getUserLocalStorageInfo().userId,
         pageNum: 1,
         pageSize: 10
       },
@@ -122,7 +122,7 @@ export default {
           }else{
             console.log(2222)
             uni.navigateTo({
-              url:'/pages/subPackages/parkActivity/activeApplication?activityId=' + item.id
+              url:'/pages/subPackages/parkActivity/activeApplication?activityId=' + item.id + '&url=' + item.annexArray[0]
             })
           }
         }

+ 87 - 12
pages/subPackages/minePages/myActivities.vue

@@ -1,41 +1,116 @@
 <template>
     <div class="myActivities">
-      <div class="actItem" v-for="item in actList" @click="toDetail(item)">
+      <div class="actItem" v-for="item in activityList" @click="toDetail(item)">
         <div class="actTop">
-           <img src="https://www.idea-co-sf.com/gardenProduct/image/img1.png" class="actImg">
+           <img :src="item.annexArray[0]" class="actImg">
           <div class="actRight">
-            <span class="actTitle">{{ item.name }}</span>
-            <span class="actTime2">报名时间:2024/02/01~2024/02/16</span>
-            <span class="actTime2">报名人数:23</span>
+            <span class="actTitle">{{ item.activityName }}</span>
+            <span class="actTime2">报名时间:{{ item.startAndEndTime }}</span>
+            <span class="actTime2">报名人数:{{item.registrationNumbers}}</span>
           </div>
         </div>
         <div class="actTime">
-          <span class="time">开始时间:<span style="color: #666666">{{item.time}}</span></span>
-          <span :class="item.type==='已结束'?'yjs':'dks'">{{item.type}}</span>
+          <span class="time">开始时间:<span style="color: #666666">{{item.activityStartTime}}</span></span>
+          <span :class="item.statusName==='活动结束'?'yjs':'dks'">{{item.statusName}}</span>
         </div>
       </div>
     </div>
 </template>
 
 <script>
+import { getUserPower, getUserLocalStorageInfo, activityList, homeActivityClickCollect,getByCodes} from "@/js_sdk/http";
+
 export default {
   name: "myActivities",
+  onShow(){
+  },
+  mounted(){
+    this.getList()
+  },
   data(){
     return{
-      actList:[
+      activityList:[
         {name:'互联网私募如何入门?',time:'2021-1-21  13:00',type:'待开始'},
         {name:'公募基金中的大数据挖掘',time:'2021-1-21  13:00',type:'待开始'},
         {name:'年度小艾杯篮球赛开始啦',time:'2021-1-21  13:00',type:'已结束'},
-      ]
+      ],
+      search: {
+        // companyId: getUserLocalStorageInfo().userId,
+        pageNum: 1,
+        pageSize: 10
+
+      },
     }
+
   },
   methods:{
-    toDetail(){
+    clickColl(index) {
+      if (this.activityList[index].collectorsStatus==='2'){
+        this.activityList[index].collectorsStatus='1'
+      }else{
+        this.activityList[index].collectorsStatus='2'
+      }
+
+      homeActivityClickCollect({
+        id: this.activityList[index].id,
+        createdBy: getUserLocalStorageInfo().userId,
+        collectorsStatus: this.activityList[index].collectorsStatus
+      }).then(res => {
+      });
+    },
+    getList(){
+      this.activityList = []
+      activityList(this.search).then(res=>{
+        if (res.errno == 0){
+          res.data.rows.forEach(item=>{
+            const json = this.getItemJson(item)
+            this.activityList.push(json)
+          })
+
+        }
+        // console.log(res)
+      })
+    },
+    getItemJson(item) {
+      item.startAndEndTime = item.registrationStartTime + '~' + item.registrationEndTime
+      return item
+    },
+    baoming(item) {
+      if (item.statusName === '报名中') {
+        if (getUserLocalStorageInfo().userType == 3) {
+          uni.showModal({
+            title: "提示",
+            cancelText: "暂不",
+            confirmText: "去切换",
+            content: "您还不是企业用户,请切换登录身份后再进行相关操作。",
+            success: function (res) {
+              if (res.confirm) {
+                uni.navigateTo({
+                  url: "/pages/login2/login",
+                  success: function (e) {
+                    // uni.$emit('userType', 'OK')
+                  },
+                });
+              } else if (res.cancel) {
+                console.log("用户点击取消");
+              }
+            },
+          });
+        }else{
+          console.log(2222)
+          uni.navigateTo({
+            url:'/pages/subPackages/parkActivity/activeApplication?activityId=' + item.id
+          })
+        }
+      }
+    },
+    toDetail(item){
       uni.navigateTo({
-        url:"/pages/subPackages/minePages/registrationDetails",
+        url:"/pages/subPackages/minePages/registrationDetails?activityId=" + item.id + '&url=' + item.annexArray[0],
       })
     }
-  }
+  },
+
 }
 </script>
 

+ 81 - 20
pages/subPackages/minePages/registrationDetails.vue

@@ -1,19 +1,20 @@
 <template>
   <div class="registrationDetails">
     <div class="appFirstBox">
-      <img src="https://www.idea-co-sf.com/gardenProduct/image/img1.png" class="firstImg"/>
+      <img :src="url" class="firstImg"/>
       <div class="appTitle">
-        <span class="titleName">互联网私募如何入门?</span>
-        <span class="titleType">进行中</span>
+        <span class="titleName">{{ form.activityName }}</span>
+        <span class="titleType">{{ form.statusName }}</span>
       </div>
       <div @tap.stop="clickColl()" class="joinBox">
-        <span class="joinName">26人参加</span>
-        <span class="shoucang"><img :src="isColl ? heartSel : heart" class="scImg" /> 收藏</span>
+        <span class="joinName">{{ form.registrationNumbers }}人参加</span>
+<!--        <span class="shoucang"><img :src="isColl ? heartSel : heart" class="scImg" /> 收藏</span>-->
+        <span class="shoucang"><img :src="form.collectorsStatus==='2' ? heartSel : heart" class="scImg"/> 收藏</span>
       </div>
       <div class="contactBox">
           <span class="contackLeft">
             <span style="color: #666666;font-size: 28rpx">联系电话:</span>
-            <span style="color: #18172A;font-size: 36rpx;font-weight: 600">0510-680**808</span>
+            <span style="color: #18172A;font-size: 36rpx;font-weight: 600">{{ form.activityPhone }}</span>
           </span>
         <img src="https://www.idea-co-sf.com/gardenProduct/image/phoneIcon.png" class="phoneIcon">
       </div>
@@ -21,39 +22,39 @@
     <div class="appSecondBox">
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动举办</span>
-        <span class="secondBoxInfo">活动举办</span>
+        <span class="secondBoxInfo">{{ form.activitiesNotice }}</span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动内容</span>
-        <span class="secondBoxInfo">这是活动内容,这是活动内容,这是活动内容,这是活动内容,这是活动内容,这是活动内容。</span>
+        <span class="secondBoxInfo">{{ form.activityContent }}</span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动时间</span>
-        <span class="secondBoxInfo">2024-06-15  09:00  ~  2024-06-15  17:00</span>
+        <span class="secondBoxInfo">{{ form.activityStartTime }}  ~  {{ form.activityEndTime }}</span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动地址</span>
         <span class="secondBoxInfo dhInfo">
-             <span>无锡市经开区基金PARK E栋203会议室</span>
+             <span>{{ form.activityAddress }} - {{ form.activityAddressDetail }}</span>
              <img src="../parkActivity/image/dhIcon.png" class="dhIcon">
            </span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">报名条件</span>
         <span class="secondBoxInfo">
-             企业营销部门主管、有兴趣人事
+             {{ form.registrationConditions }}
            </span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">报名时间</span>
         <span class="secondBoxInfo">
-             2024-06-06  ~  2024-06-12
+             {{ form.registrationStartTime }}  ~  {{ form.registrationEndTime }}
            </span>
       </div>
       <div class="secondBoxItem">
         <span class="secondBoxTitle">活动参与</span>
         <span class="secondBoxInfo">
-             还有 15 个名额
+             {{ form.activityQuota }}
            </span>
       </div>
     </div>
@@ -62,23 +63,83 @@
 </template>
 
 <script>
+import {getHomeCommunityActivityById, getByCodes, isRegistration, getUserLocalStorageInfo, homeActivityClickCollect} from "../../../js_sdk/http";
+
 export default {
   name: "activeApplication",
+  created() {
+    this.getByCodes()
+  },
+  onLoad(options) {
+    this.activityId = options.activityId
+    this.url = options.url
+    this.getById()
+  },
   data(){
     return{
+      dc_key: ['activity_stat'],
       heartSel: "https://www.idea-co-sf.com/gardenProduct/image/heartSel.png",
       heart: "https://www.idea-co-sf.com/gardenProduct/image/heart.png",
       isColl: true,
+      form: {},
+      dic_SelectList: [],
+      statusList: [],
+      activityId: '',
+      registrationFlag: false,
+      url:''
     }
   },
-  methods:{
-    clickColl(){
-      this.isColl = !this.isColl
-    },
-    toApplication(){
-      uni.navigateTo({
-        url:'/pages/subPackages/parkActivity/applicationInfo'
+  methods: {
+    getById(){
+      const data = {
+        id : this.activityId,
+        createdBy: getUserLocalStorageInfo().userId,
+      }
+      getHomeCommunityActivityById(data).then(res => {
+        if (res.errno === 0) {
+          this.form = res.data
+          this.statusList.forEach(item => {
+            if (this.form.status == item.value) {
+              this.form.statusName = item.label
+            }
+          })
+
+          const data = {
+            activityId: this.activityId,
+            companyId: getUserLocalStorageInfo().userId
+          }
+          isRegistration(data).then(res => {
+            if (res.errno === 0) {
+              this.registrationFlag = res.data
+            }
+          })
+        }
       })
+    },
+    async getByCodes() {
+      let data = await getByCodes(JSON.stringify(this.dc_key));
+      this.dic_SelectList = this.$common.handleDicList(data);
+      this.statusList = this.dic_SelectList.activity_stat
+      console.log('this.statusList', this.statusList)
+    },
+    clickColl() {
+      if (this.form.collectorsStatus==='2'){
+        this.form.collectorsStatus='1'
+      }else{
+        this.form.collectorsStatus='2'
+      }
+
+      homeActivityClickCollect({
+        id: this.activityId,
+        createdBy: getUserLocalStorageInfo().userId,
+        collectorsStatus: this.form.collectorsStatus
+      }).then(res => {
+      });
+    },
+    toApplication() {
+      // uni.navigateTo({
+      //   url: '/pages/subPackages/parkActivity/applicationInfo?activityId=' + this.form.id + "&registrationFlag=" + this.registrationFlag
+      // })
     }
   }
 }

+ 5 - 6
pages/subPackages/parkActivity/activeApplication.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="activeApplication">
     <div class="appFirstBox">
-      <img src="https://www.idea-co-sf.com/gardenProduct/image/img1.png" class="firstImg"/>
+      <img :src="url" class="firstImg"/>
       <div class="appTitle">
         <span class="titleName">{{ form.activityName }}</span>
         <span class="titleType">{{ form.statusName }}</span>
       </div>
       <div @tap.stop="clickColl()" class="joinBox">
-        <span class="joinName">{{ form.registrationNumbers }}参加</span>
+        <span class="joinName">{{ form.registrationNumbers }}参加</span>
         <span class="shoucang"><img :src="form.collectorsStatus==='2' ? heartSel : heart" class="scImg"/> 收藏</span>
       </div>
       <div class="contactBox">
@@ -78,17 +78,16 @@ export default {
       dic_SelectList: [],
       statusList: [],
       activityId: '',
-      registrationFlag: false
+      registrationFlag: false,
+      url: ''
     }
   },
   created() {
     this.getByCodes()
   },
-  onShow() {
-    this.getById()
-  },
   onLoad(options) {
     this.activityId = options.activityId
+    this.url = url
     this.getById()
   },
   methods: {