You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
2.7 KiB
109 lines
2.7 KiB
<script>
|
|
import { fetchToken } from './utils/request';
|
|
// import { onAuthAppBack } from 'dingtalk-design-libs/biz/openAuthMiniApp';
|
|
import userTools from './utils/user';
|
|
import myapi from './utils/myapi';
|
|
const updateManager = uni.getUpdateManager();
|
|
updateManager.onUpdateReady(function (ret) {
|
|
console.log(ret.version); // 更新版本号
|
|
uni.confirm({
|
|
title: '更新提示',
|
|
content: '新版本已经准备好,是否重启应用?',
|
|
confirmText: '确认',
|
|
cancelText: '取消',
|
|
success: function (res) {
|
|
if (res.confirm) {
|
|
updateManager.applyUpdate();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
export default {
|
|
data() {
|
|
return {};
|
|
},
|
|
onLaunch() {
|
|
// this.globalData.getSystemInfoPage();
|
|
// uni.reLaunch({
|
|
// url: '/pages/authLogin/index'
|
|
// })
|
|
|
|
// uni.reLaunch({
|
|
// url: '/pages/grid/grid'
|
|
// })
|
|
// uni.showLoading();
|
|
// fetchToken().then((res) => {
|
|
// let tempUserInfo = res.data;
|
|
// userTools.setStoreUserInfo(tempUserInfo);
|
|
// if (tempUserInfo.regFlag) {
|
|
// if (this.userInfoReadyCallback) {
|
|
// this.userInfoReadyCallback();
|
|
// }
|
|
// } else {
|
|
// uni.reLaunch({
|
|
// url: '/pages/grid/grid'
|
|
// });
|
|
// }
|
|
// });
|
|
|
|
// let userInfo = userTools.getStoreUserInfo();
|
|
// console.log(userInfo);
|
|
// if (userInfo == null) {
|
|
// uni.reLaunch({
|
|
// url: "/pages/authLogin/index"
|
|
// });
|
|
// } else if (userInfo && !userInfo.regFlag) {
|
|
// uni.reLaunch({
|
|
// url: "/pages/grid/grid"
|
|
// });
|
|
// } else {
|
|
// this.globalData.session = true;
|
|
// }
|
|
},
|
|
onShow(options) {
|
|
// onAuthAppBack(options, (data) => {
|
|
// return data;
|
|
// });
|
|
},
|
|
globalData: {
|
|
userInfo: null,
|
|
userDingid: '',
|
|
|
|
navigate: {
|
|
mobile: '',
|
|
nickname: '',
|
|
faceImg: ''
|
|
},
|
|
|
|
windowHeight: '',
|
|
screenHeight: '',
|
|
flag: 0,
|
|
searchData: '',
|
|
authCode: '',
|
|
|
|
getSystemInfoPage() {
|
|
uni.getSystemInfo({
|
|
success: (res) => {
|
|
// console.log(res);
|
|
this.systemInfo = res;
|
|
}
|
|
});
|
|
},
|
|
|
|
systemInfo: ''
|
|
}
|
|
};
|
|
</script>
|
|
<style>
|
|
page {
|
|
flex: 1;
|
|
display: flex;
|
|
background: #f7f7f7;
|
|
}
|
|
.page {
|
|
flex: 1;
|
|
width: 100%;
|
|
overflow: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
</style>
|
|
|