From 1d064aa5ec2556155bbf116cef1d6d0ac5007acc Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 29 九月 2025 10:23:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wuhuyancao' into wuhuyancao

---
 h5/pages/notice/notice.vue |   73 ++++++++++++++++++++++++++----------
 1 files changed, 52 insertions(+), 21 deletions(-)

diff --git a/h5/pages/notice/notice.vue b/h5/pages/notice/notice.vue
index ddd051b..ea0c8d5 100644
--- a/h5/pages/notice/notice.vue
+++ b/h5/pages/notice/notice.vue
@@ -1,40 +1,72 @@
 <template>
-  <div class="container">
-    <!-- <video
-      src="https://vdept3.bdstatic.com/mda-nj7gwfue9kdnbtsh/sc/cae_h264/1665488517815949255/mda-nj7gwfue9kdnbtsh.mp4?v_from_s=hkapp-haokan-hbe&auth_key=1715141591-0-0-6dfdf4d4c3d94b60b9adeb53368a72f3&bcevod_channel=searchbox_feed&pd=1&cr=2&cd=0&pt=3&logid=0791905773&vid=13790089500387859718&klogid=0791905773&abtest="
-    ></video> -->
+  <view class="container">
     <scroll-view scroll-y class="content">
-      <div>
-        <div v-html="content"></div>
-      </div>
-      <div class="empty"></div>
+      <view>
+        <view v-html="content"></view>
+      </view>
+      <view class="empty"></view>
     </scroll-view>
-    <div class="button" @click="toapply">纭浜嗚В</div>
-  </div>
+    <view class="button" :class="{ disable: num > 0 }" @click="toapply">
+      宸茬煡鏅擄紝涓嬩竴姝�
+      <text v-if="num > 0">({{ num }}绉�)</text>
+    </view>
+  </view>
 </template>
 
 <script>
+let timer
 import { getSystemDictData } from "@/api"
+import { getCode } from "@/utils/getCode.js";
 export default {
   name: 'Index',
   data() {
     return {
       content: ``,
-      answer: ''
+      answer: '',
+      num: 5
     }
   },
   onLoad() {
     this.getInfo()
+	getCode(code => {
+		console.log('code', code)
+	});
+    // if (!this.$store.state.openId) {
+    //   this.initToken()
+    // }
   },
   methods: {
+    initToken() {
+      const appID = 'wxac2a80c2144c4ee0'
+      // const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
+      let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc/static/redirect.html')
+      let authURL =
+        `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
+      window.location.href = authURL
+    },
     getInfo() {
-      // 鍏ュ満椤荤煡璇︽儏
+      // 鍏ュ洯椤荤煡璇︽儏
       getSystemDictData({
         dictCode: 'SYSTEM',
         label: 'VISIT_NOTICE'
       }).then(res => {
         if (res.code === 200) {
           this.content = res.data.code
+        }
+      })
+      // 鍊掕鏃舵椂闂�
+      getSystemDictData({
+        dictCode: 'SYSTEM',
+        label: 'NOTICE_CUTNTDOWN'
+      }).then(res => {
+        if (res.code === 200) {
+          this.num = res.data.code
+          timer = setInterval(() => {
+            this.num--
+            if (this.num === 0) {
+              clearInterval(timer)
+            }
+          }, 1000)
         }
       })
       // 鏄惁闇�瑕佺瓟棰�
@@ -48,6 +80,7 @@
       })
     },
     toapply() {
+      if (this.num > 0) return
       if (this.answer === '0') {
         uni.navigateTo({
           url: '/pages/userinfo/userinfo'
@@ -70,16 +103,11 @@
   box-sizing: border-box;
   display: flex;
   flex-direction: column;
-  video {
-    width: 690rpx;
-    height: 388rpx;
-    margin-bottom: 10rpx;
-  }
   .content {
-    height: calc(100% - 170rpx);
+    height: calc(100% - 130rpx);
     .title {
       color: #333333;
-      font-weight: 500;
+      font-weight: 600;
       margin-bottom: 16rpx;
     }
     .text {
@@ -98,9 +126,12 @@
     border-radius: 44rpx;
     font-size: 32rpx;
     color: #ffffff;
-    position: absolute;
-    bottom: 42rpx;
+    position: fixed;
+    bottom: 30rpx;
     left: 30rpx;
   }
+  .disable {
+    background-color: #cccccc;
+  }
 }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3