Commit 2e673af8 authored by jyx's avatar jyx

代码优化

parent 6bd287bb
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="title" v-if="!last"> <view class="title" v-if="!last">
{{item.title}} {{item.title}}
</view> </view>
<!-- <view class="c-flex_row c-align_center label-box" v-if="!last"> <view class="c-flex_row c-align_center label-box" v-if="!last">
<slot name="footer"> <slot name="footer">
<view class="label label-color-1" v-if='showCategory'> <view class="label label-color-1" v-if='showCategory'>
{{item.categoryName}} {{item.categoryName}}
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
{{label.name}} {{label.name}}
</view> </view>
</slot> </slot>
</view> --> </view>
</view> </view>
</template> </template>
......
...@@ -34,7 +34,10 @@ ...@@ -34,7 +34,10 @@
}, },
onShow() { onShow() {
// 更新阅读时间统计 // 更新阅读时间统计
this.refreshTimeCount(); let ref = this.$refs.bookList;
if (ref) {
ref.refreshTimeCount();
}
}, },
onUnload() { onUnload() {
// 移除监听 // 移除监听
...@@ -43,7 +46,10 @@ ...@@ -43,7 +46,10 @@
}, },
methods: { methods: {
show() { show() {
let ref = this.$refs.bookList;
if (ref) {
ref.refreshTimeCount();
}
}, },
hide() { hide() {
......
...@@ -127,9 +127,11 @@ ...@@ -127,9 +127,11 @@
let str = '' let str = ''
for (let i = 0; i < this.dataList.length; i++) { for (let i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].isChecked) { if (this.dataList[i].isChecked) {
if (this.dataList[i].id) {
str += (this.dataList[i].id + ',') str += (this.dataList[i].id + ',')
} }
} }
}
console.log('AAAA' + str) console.log('AAAA' + str)
collectionBook(false, str, (success, data) => { collectionBook(false, str, (success, data) => {
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
.labelimg { .labelimg {
margin-top: 10rpx; margin-top: 10rpx;
margin-right: 10rpx; margin-right: 20rpx;
width: 65rpx; width: 65rpx;
height: 70rpx; height: 70rpx;
} }
......
...@@ -109,7 +109,9 @@ ...@@ -109,7 +109,9 @@
}, },
onShow() { onShow() {
try { try {
if (this.currentPage == 3) { if (this.currentPage == 0) {
this.$refs.shelf.show();
} else if (this.currentPage == 3) {
this.$refs.user.show(); this.$refs.user.show();
} }
} catch (e) { } catch (e) {
......
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