Parcourir la source

优化小程序样式,添加打卡

yanj il y a 1 mois
Parent
commit
d3aec1f1af
3 fichiers modifiés avec 19 ajouts et 8 suppressions
  1. 1 0
      api/checkIn.js
  2. 7 5
      pages/checkIn/checkInRoute.vue
  3. 11 3
      pages/user/index.vue

+ 1 - 0
api/checkIn.js

@@ -8,3 +8,4 @@ export const getGiftList = get('/api/activity/gift/list')
 export const checkInCount = get('/api/activity/route/checkin-count')
 export const claim = post('/api/activity/gift/claim')
 export const receiptNote = post('/api/activity/gift/receipt-note')
+export const getActivitySwitch = get('/api/activity/info-switch')

+ 7 - 5
pages/checkIn/checkInRoute.vue

@@ -492,12 +492,13 @@ export default {
         transition-duration: 300ms;
         padding-top: 40rpx;
         display: grid;
-        grid-template-columns: 1fr 1fr 1fr;
+        grid-template-columns: calc(33% - 20rpx) calc(33% - 20rpx) calc(33% - 20rpx);
         grid-gap: 70rpx 30rpx;
         //overflow: hidden;
         color: #333333;
 
         .exhibit-item {
+          //width: calc( 33% - 15rpx);
           position: relative;
           background-color: white;
           box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.15);
@@ -579,8 +580,8 @@ export default {
             transition-duration: 300ms;
             margin-bottom: 10rpx;
             display: flex;
-            align-items: center;
-
+            //align-items: center;
+            flex-direction: column;
             .text {
               transition-duration: 300ms;
               color: #555555;
@@ -593,9 +594,10 @@ export default {
               color: #E57519;
               font-size: 24rpx;
               font-weight: bold;
-              flex: 1;
+              //flex: 1;
               min-width: 1rpx;
-              padding-left: 5rpx;
+              //padding-left: 5rpx;
+              word-break: break-word;
             }
           }
 

+ 11 - 3
pages/user/index.vue

@@ -49,7 +49,7 @@
             <van-cell title="法律信息" is-link @click="navigateToAdLink('/pages/disclaimer/legalNotice')">
             </van-cell>
           </van-cell-group>-->
-          <view class="user-item" @click="navigateToAdLink('/pages/user/award')">
+          <view class="user-item" v-if="isLoginState && (activityOff || is_super)" @click="navigateToAdLink('/pages/user/award')">
             <view class="iconfont icon-jiangpin"></view>
             <text class="user-item-text">我的奖品</text>
             <view class="iconfont icon-Left-1"></view>
@@ -105,7 +105,7 @@ import VanCellGroup from '@/wxcomponents/vant/cell-group/index'
 import PageLayout from "@/components/layout/page-layout";
 import {getAdInfo} from '@/api'
 import store from "@/store";
-import {qrcodeDecode} from "@/api/checkIn";
+import {getActivitySwitch, qrcodeDecode} from "@/api/checkIn";
 import Toast from "@/wxcomponents/vant/toast/toast";
 import Dialog from "@/wxcomponents/vant/dialog/dialog";
 
@@ -163,15 +163,23 @@ export default {
     return {
       prizeShow: false,
       decodeInfo: {},
+      activityOff: 0,
       adInfo: {
         ad_file: ''
-      }
+      },
+
     }
   },
   created() {
     this.getAdData()
+    this.getActivitySwitchEvent()
   },
   methods: {
+    getActivitySwitchEvent() {
+      getActivitySwitch().then(res=>{
+          this.activityOff =  res.data.data.activity
+      })
+    },
     hideOverlay() {
       this.prizeShow = false
       this.decodeInfo = {}