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

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

@@ -235,6 +235,32 @@ export const getLatLon = function(tip) {
});
}
// 查看是否有某本书的权限
export const checkBookRight = function(data,callback) {
console.log('接受的值', data)
$http.request({
url: "/book/user/checkUserBook",
method: "POST", // POST、GET、PUT、DELETE具体说明查看官方文档
data:data,
header: { //默认 无 说明请求头1
'Content-Type': 'application/json'
},
}).then(res => {
// console.log(res,'checkBookRight')
if(res.code === 0){
callback && callback({
success: true,
data: '有权限'
});
}
}).catch(e => {
callback && callback({
success: false,
data: '无权限'
});
})
}
// 单独微信支付
export const setWXPay = function(payInfo, callback) {
$http.request({