钱新宇 2 ヶ月 前
コミット
50467b92cd
2 ファイル変更19 行追加15 行削除
  1. 17 13
      pages/recruitment/lottery_new.vue
  2. 2 2
      pages/user/index.vue

+ 17 - 13
pages/recruitment/lottery_new.vue

@@ -164,7 +164,7 @@ export default {
       path: `/pages/recruitment/lottery_new?id=${this.requestParam.id}&activity_id=${this.requestParam.activity_id}`,
       imageUrl: 'https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250210-143021.jpg',
       promise: new Promise((resolve, reject) => {
-        this.$http.request('api/share_message/get_item', { item_id: this.requestParam.activity_id, pages: '/pages/recruitment/lottery_new' }).then((callback) => {
+        this.$http.request('api/share_message/get_item', { item_id: this.requestParam.id, pages: '/pages/recruitment/lottery_new' }).then((callback) => {
           console.log(callback, 'api/share_message/get_item');
           let obj = {
             title: callback.data?.title == '' ? this.lotteryInfo.name : callback.data.title,
@@ -211,18 +211,7 @@ export default {
         if (re.code == 'success') {
           this.lotteryInfo = re.data;
           this.prizeList = re.data.reward_list;
-          this.$http.request('api/lottery_recruitment_record/get_list_all', { lottery_id: this.requestParam.id }).then((res) => {
-            if (res.code == 'success') {
-              if (res.data?.length > 0) {
-                let str = '';
-
-                res.data.forEach((item) => {
-                  str += `用户${item.username}已获得${item.reward_name};`;
-                });
-                this.lottery_list = str;
-              }
-            }
-          });
+          this._getRecordList();
         } else {
           if (re.code != 'no_login') {
             uni.showModal({
@@ -241,6 +230,20 @@ export default {
     }
   },
   methods: {
+    _getRecordList() {
+      this.$http.request('api/lottery_recruitment_record/get_list_all', { lottery_id: this.requestParam.id }).then((res) => {
+        if (res.code == 'success') {
+          if (res.data?.length > 0) {
+            let str = '';
+
+            res.data.forEach((item) => {
+              str += `用户${item.username}已获得${item.reward_name};`;
+            });
+            this.lottery_list = str;
+          }
+        }
+      });
+    },
     _handleChangePage(index) {
       this.pageIndex = index;
     },
@@ -248,6 +251,7 @@ export default {
       this.reward_info = this.prizeList[index];
       this.$refs.lotteryReward.open('center');
       this.showRecord();
+      this._getRecordList();
     },
     onClick() {
       // 活动是否开始

+ 2 - 2
pages/user/index.vue

@@ -57,8 +57,8 @@
         <image class="navigator_image" src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/user/article.png" mode=""></image>
         <view class="navigator_title">资讯</view>
       </navigator>
-      <!-- <navigator class="navigator_item" url="/pages/video/index">
-        <image class="navigator_image" src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/user/article.png" mode=""></image>
+<!--      <navigator class="navigator_item" url="/pages/video/index">
+        <image class="navigator_image" src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/user/video.png" mode=""></image>
         <view class="navigator_title">学习</view>
       </navigator> -->
     </view>