Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-11 11:19:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d13bfd69ae2db43cff080f914ec8691976c09ec9
d13bfd69
1 parent
b39d258d
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
52 deletions
src/common/mixin.js
src/views/client/bookDetail.vue
src/common/mixin.js
View file @
d13bfd6
...
...
@@ -37,6 +37,7 @@ export default {
}
}
}
else
{
// tslint:disable-next-line: no-console
console
.
warn
(
res
);
Toast
({
icon
:
'close'
,
...
...
@@ -45,6 +46,7 @@ export default {
}
})
.
catch
(
err
=>
{
// tslint:disable-next-line: no-console
console
.
error
(
err
);
});
},
...
...
@@ -59,6 +61,7 @@ export default {
this
.
detail
[
`is_
${
type
}
`
]
=
res
.
data
.
data
[
`is_
${
type
}
`
];
this
.
detail
[
`
${
type
}
_num`
]
=
res
.
data
.
data
[
`
${
type
}
_num`
];
}
else
{
// tslint:disable-next-line: no-console
console
.
warn
(
res
);
Toast
({
icon
:
'close'
,
...
...
@@ -67,6 +70,7 @@ export default {
}
})
.
catch
(
err
=>
{
// tslint:disable-next-line: no-console
console
.
error
(
err
);
});
}
...
...
src/views/client/bookDetail.vue
View file @
d13bfd6
...
...
@@ -120,15 +120,15 @@ const $router = useRouter();
const { toggleLanguage, onLoad, columns, prod_list, finished, loading, bookInfo, showPicker, checkLocalism, checkMandarin, onConfirm, chooseLanguage } = useVideoList($route);
const gotoMe = () => {
console.warn('跳转我的地址');
}
// 判断是否显示简介的展开图标
const hasToggle = ref(false); // 判断是否有展开文字,默认没有
const isToggle = ref(true); // 判断展开状态,默认展开
const onToggle = (v) => { // 展开/折叠
/**
* 展开/折叠
* @param {*} v
*/
const onToggle = (v) => {
isToggle.value = v
}
...
...
@@ -146,38 +146,34 @@ const onSubscribe = () => {
axios.post('/srv/?a=add_subscribe', {
book_id: $route.query.id
})
.then(res => {
if (res.data.code === 1) {
if (res.data.msg === 'add subscribe OK') {
bookInfo.value.is_subscribe = true;
Toast.success('订阅成功')
.then(res => {
if (res.data.code === 1) {
if (res.data.msg === 'add subscribe OK') {
bookInfo.value.is_subscribe = true;
Toast.success('订阅成功')
} else {
bookInfo.value.is_subscribe = false;
Toast.success('取消订阅')
}
} else {
bookInfo.value.is_subscribe = false;
Toast.success('取消订阅')
console.warn(res);
Toast({
icon: 'close',
message: res.data.msg
});
}
} else {
console.warn(res);
Toast({
icon: 'close',
message: res.data.msg
});
}
})
.catch(err => {
console.error(err);
})
})
.catch(err => {
console.error(err);
})
}
// 爱心捐书
// TODO: 需要联调捐书接口
const payFor = () => {
console.warn('弹出框');
}
// 未实名认证提示
const showNotice = ref(false)
const onClose = () => { // 关闭提示框回调
showNotice.value = false;
}
// 跳转个人中心
const onSubmit = () => {
$router.push({
...
...
@@ -188,35 +184,42 @@ const onSubmit = () => {
/**
* 上传作品回调
*/
// 未实名认证提示
const showNotice = ref(false)
const onClose = () => { // 关闭提示框回调
showNotice.value = false;
}
const uploadVideo = () => {
axios.get('/srv/?a=can_upload')
.then(res => {
if (res.data.code === 1) {
if (res.data.data.can_upload) {
// TODO: 上传视频直接跳转?不需要表示判断是上传哪个幼儿园吗?
// 实名认证之后直接跳转上传页面
if (Cookies.get('privacy_notice')) { // 已读隐私条例,直接跳转上传页面
location.href = 'https://jinshuju.net/f/NAGn1D';
.then(res => {
if (res.data.code === 1) {
// 实名认证标识
if (res.data.data.can_upload) {
// TODO: 上传视频直接跳转?不需要表示判断是上传哪个幼儿园吗?
if (Cookies.get('privacy_notice')) { // 已读隐私条例,直接跳转上传页面
location.href = 'https://jinshuju.net/f/NAGn1D';
} else {
$router.push({
path: '/client/privacyNotice'
})
}
} else {
$router.push({
path: '/client/privacyNotice'
})
// 如果没有实名认证需要提示用户实名认证
showNotice.value = true;
}
} else {
// 如果没有实名认证需要提示用户实名认证
showNotice.value = true;
console.warn(res);
Toast({
icon: 'close',
message: res.data.msg
});
}
} else {
console.warn(res);
Toast({
icon: 'close',
message: res.data.msg
});
}
})
.catch(err => {
console.error(err);
})
})
.catch(err => {
console.error(err);
})
}
</script>
...
...
@@ -372,4 +375,4 @@ export default {
margin-top: 1rem;
margin-bottom: 5rem;
}
</style>
\ No newline at end of file
</style>
...
...
Please
register
or
login
to post a comment