This commit is contained in:
caolc
2023-07-05 18:19:02 +08:00
parent e883da3fff
commit cf253870a3
17 changed files with 861 additions and 343 deletions

View File

@@ -53,7 +53,7 @@
}
},
mounted() {
// console.log('mounted')
console.log('mounted')
},
onLoad(option) {
this.option = option;
@@ -62,7 +62,7 @@
onReady(option) {},
methods: {
versionUpdate() {
// console.log('versionUpdate')
console.log('versionUpdate')
let that = this
const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function(res) {
@@ -87,19 +87,25 @@
},
});
});
updateManager.onUpdateFailed(function(res) {
console.log('新的版本下载失败')
// 新的版本下载失败
});
},
initFn(option) {
// console.log(option, '启动页');
// console.log(`%c 二维码进入 ${option.scene}`, 'color:red;font-size:50px')
async initFn(option) {
console.log(option, '启动页');
console.log(`%c 二维码进入 ${option.scene}`, 'color:red;font-size:50px')
const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('openid')
this.key = ''
if (token && openid) {
this.key = '';
let isOnline = false;
if(token){
await oilSiteApi.isLoginSuccess().then(res=>{
if(res.code==20000) isOnline = true
}).catch(err=>{})
}
console.log(isOnline,'isOnline')
if (isOnline) {
this.key = '在线'
} else {
this.key = '离线'
@@ -120,15 +126,15 @@
}
},
goHome(type) {
if(type){
uni.setStorageSync('isJump',{
page:'Financial/pages/estimate/index',
disposable:true
if (type) {
uni.setStorageSync('isJump', {
page: 'Financial/pages/estimate/index',
disposable: true
})
}
if (this.key == '在线') {
console.log(type, 'typetypetypetype');
uni.switchTab({
url: `/pages/tabbar/home/home`,
success() {},
@@ -226,4 +232,4 @@
.page-content image {
width: 750upx;
}
</style>
</style>