|
|
<template>
|
|
|
<view class="wrap">
|
|
|
<image src="@/static/bg.jpg" class="bkg" alt="" />
|
|
|
<view class="main">
|
|
|
<view class="main-wrap">
|
|
|
<image src="@/static/index_logo.png" class="logo" alt="" />
|
|
|
<image src="@/static/index_words.png" class="words" alt="" />
|
|
|
<image src="@/static/index_words2.png" class="words2" alt="" />
|
|
|
<image src="@/static/index_words3.png" class="words3" alt="" />
|
|
|
<view class="btns" @click="towhere">
|
|
|
<text>点击进入答题</text>
|
|
|
<u-icon name="arrow-right" color="#fff"></u-icon>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<image src="@/static/logo2.png" class="logo2" alt="" />
|
|
|
</view>
|
|
|
<view class="support">
|
|
|
技术支撑:江苏有线苏州分公司
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {isNull} from "@/common/util.js"
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
isEnd: false, //是否结束
|
|
|
userInfo: {}
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
// this.play2(0)
|
|
|
// this.getUserInfo()
|
|
|
this.getConfig()
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
async getConfig() {
|
|
|
// /
|
|
|
const res = await this.$u.api.getAppId()
|
|
|
this.isEnd = this.isCurrentTimeBetween(res.start_time, res.end_time)
|
|
|
let config = res.config
|
|
|
config.map(item => {
|
|
|
if (item.key === 'active_tip') {
|
|
|
uni.setStorageSync('active_tip', item.value)
|
|
|
}
|
|
|
})
|
|
|
uni.setStorageSync('activeConfig', res)
|
|
|
uni.setStorageSync('isEnd', this.isEnd)
|
|
|
},
|
|
|
isCurrentTimeBetween(startTime, endTime) {
|
|
|
let that = this
|
|
|
const now = that.$moment().valueOf()
|
|
|
const start = that.$moment(startTime).valueOf();
|
|
|
const end = that.$moment(endTime).valueOf();
|
|
|
console.log("123", now, start, end)
|
|
|
return now >= start && now <= end;
|
|
|
},
|
|
|
async getUserInfo() {
|
|
|
const res = await this.$u.api.user()
|
|
|
this.$u.vuex('vuex_user', res);
|
|
|
this.userInfo = res;
|
|
|
if (isNull(res.mobile)) {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/login/index'
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
async towhere() {
|
|
|
await this.getUserInfo()
|
|
|
let url = '/pages/me/me'
|
|
|
if (isNull(this.userInfo.mobile)) {
|
|
|
url = '/pages/login/index'
|
|
|
}
|
|
|
console.log("url", url)
|
|
|
uni.navigateTo({
|
|
|
url: url
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
.wrap {
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
position: relative;
|
|
|
font-size: 0;
|
|
|
.bkg {
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
}
|
|
|
.main{
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
overflow: scroll;
|
|
|
position: relative;
|
|
|
z-index:9;
|
|
|
&-wrap{
|
|
|
position: relative;
|
|
|
z-index:8;
|
|
|
margin-top:100rpx;
|
|
|
&>image{
|
|
|
margin:0 auto;
|
|
|
display: block;
|
|
|
margin-top:40rpx;
|
|
|
}
|
|
|
.logo{
|
|
|
width:293rpx;
|
|
|
height:294rpx;
|
|
|
}
|
|
|
.words{
|
|
|
width:617rpx;
|
|
|
height:279rpx;
|
|
|
}
|
|
|
.words2{
|
|
|
width:750rpx;
|
|
|
height:80rpx;
|
|
|
}
|
|
|
.words3{
|
|
|
width:537rpx;
|
|
|
height:34rpx;
|
|
|
}
|
|
|
.btns{
|
|
|
width:617rpx;
|
|
|
height:100rpx;
|
|
|
padding:0 40rpx;
|
|
|
border-radius: 80rpx;
|
|
|
background-color: #95a1b1;
|
|
|
color:#fff;
|
|
|
margin:0 auto;
|
|
|
margin-top:50rpx;
|
|
|
font-size: 36rpx;
|
|
|
line-height: 100rpx;
|
|
|
text-align: center;
|
|
|
position: relative;
|
|
|
opacity: 0.9;
|
|
|
.u-icon{
|
|
|
position: absolute;
|
|
|
right:40rpx;
|
|
|
top:50%;
|
|
|
transform: translateY(-50%);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.logo2{
|
|
|
width:359rpx;
|
|
|
height:332rpx;
|
|
|
position: absolute;
|
|
|
bottom:0;
|
|
|
left:0
|
|
|
}
|
|
|
}
|
|
|
.support {
|
|
|
position: absolute;
|
|
|
bottom: 10rpx;
|
|
|
width: 100%;
|
|
|
font-size: 24rpx;
|
|
|
color: #888;
|
|
|
font-family: '宋体';
|
|
|
opacity: 1;
|
|
|
text-align: center;
|
|
|
z-index:9
|
|
|
}
|
|
|
}
|
|
|
|
|
|
</style> |