移动端聊天实现
This commit is contained in:
@@ -23,20 +23,10 @@
|
||||
// todo 下列两行
|
||||
uni.setStorageSync('device', 'H5');
|
||||
uni.setStorageSync('version', versionName);
|
||||
this.$http.request({
|
||||
url: '/common/getVersion',
|
||||
success: (res) => {
|
||||
if(res.data.data.upgrade=='Y'){
|
||||
console.log(
|
||||
`%c 有新版本 `+res.data.data.version,
|
||||
'background:#007aff ;padding: 1px; border-radius: 0 3px 3px 0; color: #fff; font-weight: bold;'
|
||||
)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// #endif
|
||||
console.log('App Launch')
|
||||
let token= uni.getStorageSync('Authorization');
|
||||
let token= uni.getStorageSync('imUserSign');
|
||||
if (!token) {
|
||||
//不存在则跳转至登录页
|
||||
// #ifdef APP-PLUS
|
||||
@@ -104,29 +94,7 @@
|
||||
})
|
||||
}
|
||||
// #ifdef APP-PLUS
|
||||
//升级检测
|
||||
uni.getSystemInfo({
|
||||
success: (res)=> {
|
||||
uni.setStorageSync('device', res.platform);
|
||||
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo)=> {
|
||||
uni.setStorageSync('version', widgetInfo.version);
|
||||
this.$http.request({
|
||||
url: '/common/getVersion',
|
||||
success: (res) => {
|
||||
if(res.data.data.upgrade=='Y'){
|
||||
appUpgrade.init({
|
||||
titleText: '版本更新'+res.data.data.version,
|
||||
packageUrl:res.data.data.url,
|
||||
content: res.data.data.content,
|
||||
forceUpgrade:res.data.data.forceUpgrade=='Y' ? true : false
|
||||
});
|
||||
appUpgrade.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
uni.onNetworkStatusChange( (res)=> {
|
||||
if(res.isConnected){
|
||||
this.$store.dispatch('get_UserInfo')
|
||||
|
||||
Reference in New Issue
Block a user