|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="empty"></div> | 
|---|
|  |  |  | </scroll-view> | 
|---|
|  |  |  | <div class="button" @click="toapply">确认了解</div> | 
|---|
|  |  |  | <div class="button" @click="handleAgree" v-if="num === 6">确认了解</div> | 
|---|
|  |  |  | <div class="button" @click="toapply" v-else> | 
|---|
|  |  |  | 已知晓,下一步({{ num }}秒) | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | let timer | 
|---|
|  |  |  | import { getSystemDictData } from "@/api" | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: 'Index', | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | content: ``, | 
|---|
|  |  |  | answer: '' | 
|---|
|  |  |  | answer: '', | 
|---|
|  |  |  | num: 6 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onLoad() { | 
|---|
|  |  |  | this.getInfo() | 
|---|
|  |  |  | if(!this.$store.state.openId){ | 
|---|
|  |  |  | if (!this.$store.state.openId) { | 
|---|
|  |  |  | this.initToken() | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | handleAgree() { | 
|---|
|  |  |  | this.num-- | 
|---|
|  |  |  | timer = setInterval(() => { | 
|---|
|  |  |  | this.num-- | 
|---|
|  |  |  | if (this.num === 0) { | 
|---|
|  |  |  | this.toapply() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, 1000) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | initToken() { | 
|---|
|  |  |  | const appID = 'wxac2a80c2144c4ee0' | 
|---|
|  |  |  | // const AppSecret = '922c93596d134fedf5bd22a9354b3bfe' | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | toapply() { | 
|---|
|  |  |  | clearInterval(timer) | 
|---|
|  |  |  | if (this.answer === '0') { | 
|---|
|  |  |  | uni.navigateTo({ | 
|---|
|  |  |  | url: '/pages/userinfo/userinfo' | 
|---|
|  |  |  | 
|---|
|  |  |  | border-radius: 44rpx; | 
|---|
|  |  |  | font-size: 32rpx; | 
|---|
|  |  |  | color: #ffffff; | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | bottom: 42rpx; | 
|---|
|  |  |  | position: fixed; | 
|---|
|  |  |  | bottom: 30rpx; | 
|---|
|  |  |  | left: 30rpx; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|