|
@@ -96,6 +96,7 @@ export default {
|
|
|
mixins: [colors],
|
|
|
data () {
|
|
|
return {
|
|
|
+ albumWidth: 0,
|
|
|
};
|
|
|
},
|
|
|
computed: mapGetters(['isLogin']),
|
|
@@ -103,28 +104,26 @@ export default {
|
|
|
isLogin: {
|
|
|
handler: function (newV, oldV) {
|
|
|
if (newV) {
|
|
|
- this.getUserInfo();
|
|
|
}
|
|
|
},
|
|
|
deep: true
|
|
|
}
|
|
|
},
|
|
|
- onLoad () {
|
|
|
-
|
|
|
- if (this.isLogin) {
|
|
|
- this.getUserInfo();
|
|
|
- // #ifdef APP-PLUS
|
|
|
- this.formatSize()
|
|
|
- // 获取版本号
|
|
|
- plus.runtime.getProperty(plus.runtime.appid, (inf) => {
|
|
|
- console.log(inf.version)
|
|
|
- this.version = inf.version;
|
|
|
+ created(options) {
|
|
|
+ console.log('???')
|
|
|
+ let that = this;
|
|
|
+ uni.getSystemInfo({
|
|
|
+ success: function (res) {
|
|
|
+ console.log(res,'getSystemInfo')
|
|
|
+ that.albumWidth = res.windowWidth - 30
|
|
|
+ that.height = res.windowHeight;
|
|
|
+ //res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
|
|
|
+ // #ifndef APP-PLUS || H5 || MP-ALIPAY
|
|
|
+ that.navbarRight =
|
|
|
+ res.windowWidth - uni.getMenuButtonBoundingClientRect().left;
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
});
|
|
|
- // #endif
|
|
|
- this.setLang();
|
|
|
- } else {
|
|
|
- toLogin();
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
|