69 lines
1.4 KiB
Vue
69 lines
1.4 KiB
Vue
<template>
|
|
<view class="index" v-if="token">
|
|
<image
|
|
v-for="i in 30"
|
|
:key="i"
|
|
:src="`/static/index/image_${i}.jpeg`"
|
|
mode="widthFix"
|
|
class="img"
|
|
/>
|
|
|
|
<view class="btn-bottom">
|
|
<button class="next-btn" @tap="nextStep">马上体验</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import sheep from '@/sheep';
|
|
import { ref } from 'vue';
|
|
import ReportApi from '@/sheep/api/report';
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
|
|
const { getToken } = ReportApi;
|
|
|
|
const token = ref('');
|
|
|
|
onLoad(async (e) => {
|
|
if (!e.token) {
|
|
const res = await getToken();
|
|
window.location.href =
|
|
window.location.href.replace(/\?.*$/g, '') + '?token=' + res.data.accessToken;
|
|
return;
|
|
}
|
|
|
|
token.value = e.token;
|
|
uni.setStorageSync('token', e.token);
|
|
});
|
|
|
|
const nextStep = () => {
|
|
sheep.$router.go(`/pages/base-info/index?token=${token.value}`);
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.index {
|
|
.img {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
.btn-bottom {
|
|
margin-top: -120rpx;
|
|
|
|
height: 300rpx;
|
|
// background-color: red;
|
|
|
|
.next-btn {
|
|
width: 80% !important;
|
|
height: 80rpx;
|
|
// border-radius: 16rpx;
|
|
background-color: #0d232c;
|
|
color: white;
|
|
font-size: 32rpx;
|
|
opacity: 0;
|
|
}
|
|
}
|
|
}
|
|
</style>
|