Browse Source

完成返回

master
453530270@qq.com 3 years ago
parent
commit
672ef6825a
  1. 4
      pages/home.vue
  2. 18
      pages/webview/webview.vue

4
pages/home.vue

@ -19,8 +19,8 @@
</view> </view>
<!-- 服务状态 --> <!-- 服务状态 -->
<view class="devinfo"> <view class="devinfo">
<view class="dev-txt" :class="hasverify?'verify':'unverfiy'">有效期 0个月</view> <view class="dev-txt" :class="hasverify?'verify':'unverfiy'">有效期 1个月</view>
<view class="dev-txt" :class="hasverify?'verify':'unverfiy'">设备数 0</view> <view class="dev-txt" :class="hasverify?'verify':'unverfiy'">设备数 1</view>
</view> </view>
</view> </view>
<!-- 交易中心的快速连接 --> <!-- 交易中心的快速连接 -->

18
pages/webview/webview.vue

@ -18,9 +18,22 @@
this.url = item.url this.url = item.url
}, },
mounted() { mounted() {
this.govak() this.startCountdown()
}, },
methods:{ methods:{
startCountdown() {
this.jst = 20; //
const timer = setInterval(() => {
if (this.jst > 0) {
this.jst--; // 1
} else {
clearInterval(timer); //
//
uni.navigateBack();
}
}, 1000);
},
// //
govak(){ govak(){
let ms = this.jst*1000 let ms = this.jst*1000
@ -28,8 +41,7 @@
} }
let st = setTimeout(function() { let st = setTimeout(function() {
// // https://pelerin.cn/planet
uni.navigateBack() uni.navigateBack()
}, ms); }, ms);

Loading…
Cancel
Save