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-07-01 17:11:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b450946ef3711e15d974b92b57087852a91d5c2c
b450946e
1 parent
4bb69dbf
测试条件判断新方法
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
23 deletions
src/views/client/bookDetail.vue
src/views/client/bookDetail.vue
View file @
b450946
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-21 09:35:14
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-07-01 1
5:14:26
* @LastEditTime: 2022-07-01 1
7:10:49
* @FilePath: /tswj/src/views/client/bookDetail.vue
* @Description:
-->
...
...
@@ -236,31 +236,24 @@ const closeDonate = (v) => {
}
/*******************************************/
// 校验用户状态判断条件
const userStatusPass = status => status === USER_STATUS.PASS
const userStatusNoPass = status => status !== USER_STATUS.PASS
const userStatusNonVerified = status => status === USER_STATUS.NON_VERIFIED
const userStatusNonDefaultChild = status => status === USER_STATUS.NON_DEFAULT_CHILD
/**
* 上传作品回调
*/
// 不能上传提示原因弹框
const showNotice = ref(false)
const onClose = () => { // 关闭提示框回调
showNotice.value = false;
}
// 跳转个人中心
const onSubmit = () => {
setTimeout(() => {
showNotice.value = false;
}, 1000);
if (userInfo.value.can_upload === USER_STATUS.NON_VERIFIED) {
const noticeNonVerifiedFn = () => {
go('/me/verifyUser', { back_url: $route.fullPath })
} else if (userInfo.value.can_upload === USER_STATUS.NON_DEFAULT_CHILD) {
}
const noticeNonDefaultChildFn = () => {
go('/me/handleUser', { perf_id: '', kg_id: '', kg_name: '', type: 'ADD', back_url: $route.fullPath })
}
}
const noticeFlowVerify = _.cond([
[userStatusNonVerified, noticeNonVerifiedFn],
[userStatusNonDefaultChild, noticeNonDefaultChildFn],
])
const show = ref(false); // 跳转等待提示
const uploadVideo = () => {
if (userInfo.value.can_upload === USER_STATUS.PASS) {
const uploadPassFn = () => {
show.value = true;
// x_field_1 是金数据表单传入的参数,家长上传的格式为:user_id-book_id-perf_id,perf_id是当前缺省的儿童id
const str = `${userInfo.value.user_id}-${$route.query.id}-${userInfo.value.perf_id}`;
...
...
@@ -274,9 +267,34 @@ const uploadVideo = () => {
setTimeout(() => {
show.value = false;
}, 2000);
} else {
}
const uploadNoPassFn = () => {
showNotice.value = true;
}
}
const uploadFlowVerify = _.cond([
[userStatusPass, uploadPassFn],
[userStatusNoPass, uploadNoPassFn],
])
/**
* 上传作品回调
*/
// 不能上传提示原因弹框
const showNotice = ref(false)
const onClose = () => { // 关闭提示框回调
showNotice.value = false;
}
// 校验身份不通过操作回调
const onSubmit = () => {
setTimeout(() => {
showNotice.value = false;
}, 1000);
noticeFlowVerify(userInfo.value.can_upload);
}
const show = ref(false); // 跳转等待提示
const uploadVideo = () => {
uploadFlowVerify(userInfo.value.can_upload)
}
/****************** keepAlive 模块 *******************/
...
...
Please
register
or
login
to post a comment