书籍附加功能添加权限检查

This commit is contained in:
@fawn-nine
2023-11-27 17:28:46 +08:00
parent f53a3b1b62
commit 815554aa18
6 changed files with 495 additions and 210 deletions

View File

@@ -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() {