Commit 02b1a1d4 authored by jyx's avatar jyx

代码优化

parent 302c195a
...@@ -17,11 +17,6 @@ ...@@ -17,11 +17,6 @@
} from "../../common/services/index.js" } from "../../common/services/index.js"
import BookshelfBookItem from '../../common/models/BookshelfBookItem.js'; import BookshelfBookItem from '../../common/models/BookshelfBookItem.js';
import SystemInfoMixin from "../../common/mixins/system-info-mixin.js" import SystemInfoMixin from "../../common/mixins/system-info-mixin.js"
import {
watchUserInfoChange,
removeUserInfoChangeWatch
} from "../../common/services/userServices.js";
export default { export default {
mixins: [SystemInfoMixin], mixins: [SystemInfoMixin],
data() { data() {
...@@ -29,34 +24,9 @@ ...@@ -29,34 +24,9 @@
bannerList: [] bannerList: []
}; };
}, },
onReady() {
// this.initHeight();
// 监听用户变动
watchUserInfoChange((info) => {
if (info.userInfo) {
this.initData();
}
}, this)
},
onShow() {},
onUnload() {
// 移除监听
removeUserInfoChangeWatch(this);
},
methods: { methods: {
show() {
// 监听用户变动
watchUserInfoChange((info) => {
if (info.userInfo) {
this.initData();
}
}, this)
},
handleBanner(e) { handleBanner(e) {
gotoBookContentPage(e.id, e.shortis) gotoBookContentPage(e.id, e.shortis)
},
hide() {
}, },
initData() { initData() {
this.refreshList(); this.refreshList();
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
} }
}, this) }, this)
this.refreshList() // this.refreshList()
}, },
onShow() {}, onShow() {},
onUnload() { onUnload() {
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</view> </view>
<view class="agreementWrp"> <view class="agreementWrp">
<checkbox-group @change="checkboxChange" style="width: 50rpx;"> <checkbox-group @change="checkboxChange" style="width: 50rpx;margin-right: 10rpx;">
<checkbox :checked="checked" style="transform:scale(0.9)"> <checkbox :checked="checked" style="transform:scale(0.9)">
</checkbox> </checkbox>
</checkbox-group> </checkbox-group>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment