书籍附加功能添加权限检查
This commit is contained in:
@@ -86,6 +86,9 @@
|
||||
mapState,
|
||||
mapMutations
|
||||
} from 'vuex';
|
||||
import {
|
||||
checkBookRight
|
||||
} from '@/config/utils';
|
||||
export default {
|
||||
components: {
|
||||
// cxAdudioPlay,
|
||||
@@ -157,10 +160,25 @@
|
||||
|
||||
// 查看本书更多书评
|
||||
toMore(val) {
|
||||
console.log(val, 'val')
|
||||
uni.navigateTo({
|
||||
url: '../comments/comments?bookid=' + this.bookid,
|
||||
});
|
||||
// console.log(val, 'val')
|
||||
let data = {
|
||||
'userId': this.userInfo.id,
|
||||
'bookId': this.bookid
|
||||
}
|
||||
checkBookRight(data,res=>{
|
||||
console.log(res)
|
||||
if(res.success){
|
||||
uni.navigateTo({
|
||||
url: '../comments/comments?bookid=' + this.bookid,
|
||||
});
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'购买本书后方可查看此内容!',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
// 去打卡
|
||||
gotoclock() {
|
||||
|
||||
Reference in New Issue
Block a user