css
liukangdong
2024-06-25 ebc96a1cf0424c04dceacbc42f9ad2a897223be9
h5/pages/notice/notice.vue
@@ -9,26 +9,33 @@
      </div>
      <div class="empty"></div>
    </scroll-view>
    <div class="button" @click="toapply">确认了解</div>
    <div class="button" @click="toapply">已知晓,下一步({{ num }}秒)</div>
  </div>
</template>
<script>
let timer
import { getSystemDictData } from "@/api"
export default {
  name: 'Index',
  data() {
    return {
      content: ``,
      answer: ''
      answer: '',
      num: 5
    }
  },
  onLoad() {
    this.getInfo()
    if(!this.$store.state.openId){
    if (!this.$store.state.openId) {
      this.initToken()
    }
    timer = setInterval(() => {
      this.num--
      if (this.num === 0) {
        this.toapply()
      }
    }, 1000)
  },
  methods: {
    initToken() {
@@ -60,6 +67,7 @@
      })
    },
    toapply() {
      clearInterval(timer)
      if (this.answer === '0') {
        uni.navigateTo({
          url: '/pages/userinfo/userinfo'
@@ -91,7 +99,7 @@
    height: calc(100% - 170rpx);
    .title {
      color: #333333;
      font-weight: 500;
      font-weight: 600;
      margin-bottom: 16rpx;
    }
    .text {
@@ -110,8 +118,8 @@
    border-radius: 44rpx;
    font-size: 32rpx;
    color: #ffffff;
    position: absolute;
    bottom: 42rpx;
    position: fixed;
    bottom: 30rpx;
    left: 30rpx;
  }
}