doum
2025-09-29 1d064aa5ec2556155bbf116cef1d6d0ac5007acc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
  <view 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> -->
    <scroll-view scroll-y class="content">
      <view>
        <view v-html="content"></view>
      </view>
      <view class="empty"></view>
    </scroll-view>
    <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"
export default {
  name: 'Index',
  data() {
    return {
      content: ``,
      answer: '',
      num: 5
    }
  },
  onLoad() {
    this.getInfo()
    // 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)
        }
      })
    },
    toapply() {
      if (this.num > 0) return
      uni.navigateTo({
        url: '/pages/driver/reserved'
      })
    }
  }
}
</script>
 
<style lang="scss" scoped>
.container {
  width: 100%;
  height: 100vh;
  padding: 10rpx 30rpx 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  video {
    width: 690rpx;
    height: 388rpx;
    margin-bottom: 10rpx;
  }
  .content {
    height: calc(100% - 130rpx);
    .title {
      color: #333333;
      font-weight: 600;
      margin-bottom: 16rpx;
    }
    .text {
      font-weight: 350;
    }
    .empty {
      height: 160rpx;
    }
  }
  .button {
    width: 690rpx;
    height: 88rpx;
    line-height: 88rpx;
    text-align: center;
    background: #4d99a8;
    border-radius: 44rpx;
    font-size: 32rpx;
    color: #ffffff;
    position: fixed;
    bottom: 30rpx;
    left: 30rpx;
  }
  .disable {
    background-color: #cccccc;
  }
}
</style>