反馈接口部分调用完成

master
chen 2022-06-17 15:54:40 +08:00
commit 37d2cd3a9e
2 changed files with 36 additions and 8 deletions

View File

@ -1,6 +1,7 @@
<template>
<view :style="{height: windowHeight+'px'}" style="overflow: hidden;">
<image :src="ad_img || '/static/public/icon-guide.png'" mode="widthFix" style="width: 100%;"></image>
<image :src="ad_img" mode="widthFix" style="width: 100%;"></image>
<view @tap="closeEv" class="disjcac count-box colf fon28 radius10" :style="{top:statuHeigh+10+'px'}">{{count}} 关闭</view>
</view>
</template>
@ -9,7 +10,14 @@
data() {
return {
windowHeight:uni.getSystemInfoSync().windowHeight,
ad_img:''
statuHeigh:uni.getSystemInfoSync().statusBarHeight,
// ad_img:'/static/public/icon-guide.png',
ad_img:'',
count:6,//
timeNum:6000,//
countTimer:null,//
timeNumTimer:null,//
omg:0//0 1
}
},
onLoad() {
@ -17,11 +25,25 @@
this.$requst.get('/universal/api.other/advertise').then(res=>{
if(res.code) {
this.ad_img = res.data.ad_img;
uni.setStorageSync('adImg',this.ad_img);
this.countTimer = setInterval(()=>{
if(this.count >= 1){
this.count--
}
},1000)
this.timeNumTimer = setTimeout(()=>{
this.goPage();
},this.timeNum)
// uni.setStorageSync('adImg',this.ad_img);
}
})
},
methods: {
//
closeEv(){
clearInterval(this.countTimer);
clearTimeout(this.timeNumTimer);
this.goPage();
},
checkContext(){
if(uni.getStorageSync('password')) {
// token
@ -41,18 +63,18 @@
this.$toolAll.tools.showToast(res.msg);
}
})
this.goPage(1);
this.omg = 1;
} else {
this.goPage(0);
this.omg = 0;
}
},
//
goPage(index) {
goPage() {
let arr = [
'/pages/login/login',
'/pages/tabbar/pagehome/pagehome'
]
setTimeout(()=>{uni.reLaunch({url:arr[index]})},6000)
uni.reLaunch({url:arr[this.omg]})
}
}
}
@ -60,4 +82,10 @@
<style>
page{background-color: #FFFFFF;}
.count-box{
background-color: rgba(0, 0, 0, .3);
padding: 16rpx 30rpx;
position: fixed;
right: 20rpx;
}
</style>

View File

@ -85,7 +85,7 @@
</template>
<script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue';
import {queryDetail} from '@/jsFile/public-api.js';
import pitera from '@/components/nothing/pitera.vue';