一点小优化
This commit is contained in:
4
App.vue
4
App.vue
@ -17,10 +17,10 @@
|
||||
// if(currTime>=time){
|
||||
// uni.removeStorageSync(val);
|
||||
// uni.removeStorageSync("token");
|
||||
// uni.removeStorageSync("clientID");
|
||||
// uni.removeStorageSync("clientID");
|
||||
// }
|
||||
// }
|
||||
// else if(val=="token" || val=="clientID"){
|
||||
// else if(val=="token" || val=="clientID" || val=='phone'){
|
||||
// console.log("忽略登陆信息");
|
||||
// }else{
|
||||
// uni.removeStorageSync(val);
|
||||
|
||||
@ -561,10 +561,7 @@
|
||||
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
/* 增加中间过渡 */
|
||||
}
|
||||
|
||||
|
||||
100% {
|
||||
width: 18.75rem;
|
||||
|
||||
@ -101,9 +101,11 @@
|
||||
uni.removeStorageSync("token")
|
||||
uni.removeStorageSync("clientID")
|
||||
uni.removeStorageSync("tokenTime")
|
||||
this.phone= uni.getStorageInfoSync('phone');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 验证码密码切换
|
||||
@ -237,6 +239,7 @@
|
||||
uni.setStorageSync('token', res.data.access_token) // 缓存token
|
||||
uni.setStorageSync('clientID', res.data.client_id) // 缓存token
|
||||
uni.setStorageSync('tokenTime', new Date().getTime() + 86400000); //过期时间
|
||||
uni.setStorageSync('phone',this.phone);
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<view class="user-right">
|
||||
<view class="user-title">武汉星汉</view>
|
||||
<view class="ID">ID:123456</view>
|
||||
<view class="ID">ID:{{phone?phone:'123456'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
@ -24,7 +24,7 @@
|
||||
</view>
|
||||
<view class="menu-item" @click="aboutUs">
|
||||
<image src="/static/images/common/wm.png" class="icon"></image>
|
||||
<text class="title">关于我们</text>
|
||||
<text class="title">关于我们 ({{appVersion}})</text>
|
||||
<uni-icons type="right" size="25" color="rgba(255, 255, 255, 0.4)" class="uniIcon"></uni-icons>
|
||||
</view>
|
||||
<view class="menu-item" @click="account">
|
||||
@ -65,8 +65,27 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showAgreement: false // 控制弹窗显示
|
||||
showAgreement: false, // 控制弹窗显示
|
||||
appVersion:'',
|
||||
phone:''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var these=this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
if(res.uniPlatform=='app'){
|
||||
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
|
||||
const currentVersion = widgetInfo.version;
|
||||
these.appVersion=currentVersion;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
this.phone= uni.getStorageSync('phone')
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 取消
|
||||
|
||||
Reference in New Issue
Block a user