Parcourir la source

feat:元宵猜灯谜活动

qianxinyu il y a 3 mois
Parent
commit
a1ddb443c4
2 fichiers modifiés avec 24 ajouts et 10 suppressions
  1. 9 8
      pages/activity/index.vue
  2. 15 2
      pages/activity/lottery.vue

+ 9 - 8
pages/activity/index.vue

@@ -13,9 +13,9 @@
     <!-- 立即参与页面 -->
     <view class="page-1" v-if="pageIndex == 1" style="padding: 0 16rpx">
       <view class="activity-info">
-        <text class="title">{{ acticve_detail?.name }}</text>
+        <!-- <text class="title">{{ acticve_detail?.name }}</text> -->
         <view class="active-rule">
-          <rich-text :nodes="acticve_detail.active_rule" class="rich_text"></rich-text>
+          <rich-text :nodes="acticve_detail.active_rule" class="rich_text" style="font-size: 36rpx; font-weight: 300"></rich-text>
         </view>
       </view>
       <view class="activity-btn" @click="_handleChangePage(1)">立即参与</view>
@@ -25,7 +25,7 @@
     <view class="page-2" v-if="pageIndex == 2">
       <!-- 题干区域 -->
       <view class="question">
-        <text>猜灯谜:{{ question.title }}</text>
+        <text style="font-weight: bold">猜灯谜:{{ question.title }}</text>
         <br />
         <view style="margin-top: 20rpx">(请从下面选择正确答案提交)</view>
       </view>
@@ -172,7 +172,7 @@ onShareAppMessage((res) => {
   return {
     title: "正月十五猜灯谜",
     path: `/pages/activity/index?id=${detialId.value}`,
-    imageUrl: "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250210-115640.jpg",
+    imageUrl: "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250210-143021.jpg",
   };
 });
 
@@ -400,14 +400,15 @@ const _handleChangeRule = (type) => {
     .question {
       // 题干的样式
       background-color: #fff;
-      max-height: 300rpx;
+      height: 300rpx;
       border-radius: 6rpx;
       padding: 26rpx;
-      opacity: 0.95;
+      opacity: 0.8;
       margin-bottom: 30rpx;
       width: 100%;
       box-sizing: border-box;
       overflow: auto;
+      margin-top: -75rpx;
     }
     .options {
       // 选项的样式
@@ -571,8 +572,8 @@ const _handleChangeRule = (type) => {
   .lottery-entrance {
     position: absolute;
     z-index: 10;
-    right: 20rpx;
-    bottom: 100rpx;
+    right: 5rpx;
+    top: 240rpx;
     image {
       width: 160rpx;
       height: 160rpx;

+ 15 - 2
pages/activity/lottery.vue

@@ -148,7 +148,7 @@ export default {
     return {
       title: "正月十五猜灯谜",
       path: "/pages/activity/index?id=" + this.requestParam.activity_id,
-      imageUrl: "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250210-115640.jpg",
+      imageUrl: "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250210-143021.jpg",
     };
   },
   onShow() {
@@ -186,7 +186,20 @@ export default {
   },
   methods: {
     shareRequest() {
-      this.$http.request("api/riddle_active_share/add", { active_id: this.requestParam.activity_id }).then((response) => {});
+      this.$http.request("api/riddle_active_share/add", { active_id: this.requestParam.activity_id }).then((response) => {
+        uni.showModal({
+          title: "分享成功",
+          confirmText: "立即答题",
+          cancelText: "留在此页",
+          success: (res) => {
+            if (res.confirm) {
+              uni.redirectTo({
+                url: "/pages/activity/index?id=" + this.requestParam.activity_id,
+              });
+            }
+          },
+        });
+      });
     },
 
     onDone(index) {