template-project/pages/guide-page/guide-page.vue

67 lines
1.9 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<template>
<view :style="{height: windowHeight+'px'}" style="overflow: hidden;">
<image src="/static/public/icon-guide.png" mode="widthFix" style="width: 100%;"></image>
</view>
</template>
<script>
export default {
data() {
return {
windowHeight:uni.getSystemInfoSync().windowHeight
}
},
onLoad() {
this.checkContext();
},
methods: {
// 检测是否是微信端
checkContext(){
// #ifdef APP-PLUS
if(uni.getSystemInfoSync().platform != "devtools"){//devtools开发版 值域为ios、android、mac3.1.10+、windows3.1.10+、linux3.1.10+
console.log = () =>{}
}
setTimeout(()=>{
uni.reLaunch({
url:'/pages/account-related/login/login'
})
},3000)
// #endif
// #ifdef H5
if(uni.getSystemInfoSync().platform != "development"){//devtools开发版 值域为ios、android、mac3.1.10+、windows3.1.10+、linux3.1.10+
console.log = () =>{}
}
setTimeout(()=>{
uni.reLaunch({
url:'/pages/account-related/login/login'
})
},3000)
// #endif
// 微信小程序原生API性能优化
// #ifdef MP-WEIXIN
let hInfo = wx.getAccountInfoSync();
// console.log(hInfo.envVersion);//develop:开发版 trial体验版 release正式版
if(hInfo.miniProgram.envVersion == "develop" || hInfo.miniProgram.envVersion == "trial"){
// (开发版,体验版)-配置全局域名
// uni.setStorageSync('hostapi','https://hengmei.scdxtc.cn/api/');
} else {
// 清除所有输出日志
console.log = () =>{};
// 正式版-配置全局域名
// uni.setStorageSync('hostapi','https://hm.hmzfyy.cn/api/');
}
setTimeout(()=>{
uni.reLaunch({
url:'/pages/tabbar/pagehome/pagehome'
})
},3000)
// #endif
}
}
}
</script>
<style>
page{background-color: #FFFFFF;}
</style>