fix: bug
This commit is contained in:
@@ -28,7 +28,12 @@
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <pfe-button @click="issue" type="primary" text="发布" icon="" /> -->
|
||||
<a-button type="primary" class="publish-btn" @click="issue" v-show="isLogin">
|
||||
<a-button
|
||||
type="primary"
|
||||
class="publish-btn"
|
||||
@click="issue"
|
||||
v-show="isLogin && questionsData.survey?.status === 0"
|
||||
>
|
||||
<template #icon>
|
||||
<i class="iconfont icon-Path" style="font-size: 18px; margin-right: 6px"></i>
|
||||
</template>
|
||||
@@ -147,8 +152,8 @@ export default defineComponent({
|
||||
// 获取问卷
|
||||
const sn = proxy.$route.query.sn;
|
||||
const commentVisible = ref(false);
|
||||
const linkAddress = ref(window.location.href)
|
||||
const isLogin = computed(() => window.localStorage.getItem('plantToken'))
|
||||
const linkAddress = ref(window.location.href);
|
||||
const isLogin = computed(() => window.localStorage.getItem("plantToken"));
|
||||
// ref(window.localStorage.getItem('token'))
|
||||
// plantToken
|
||||
|
||||
@@ -211,11 +216,11 @@ export default defineComponent({
|
||||
issueLoading.value = false;
|
||||
}
|
||||
function handleDownload() {
|
||||
if(!isLogin.value) {
|
||||
if (!isLogin.value) {
|
||||
proxy.$router.push({
|
||||
name: "login",
|
||||
});
|
||||
return
|
||||
return;
|
||||
}
|
||||
downloadVisible.value = true;
|
||||
}
|
||||
@@ -231,12 +236,11 @@ export default defineComponent({
|
||||
commentInfo.value = data;
|
||||
}
|
||||
function handleComment() {
|
||||
|
||||
if(!isLogin.value) {
|
||||
if (!isLogin.value) {
|
||||
proxy.$router.push({
|
||||
name: "login",
|
||||
});
|
||||
return
|
||||
return;
|
||||
}
|
||||
store.commit("comment/ToggleCommentDrawer", true);
|
||||
openModal({
|
||||
@@ -252,8 +256,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function handleCopy() {
|
||||
useCopy(linkAddress.value)
|
||||
message.success('复制成功')
|
||||
useCopy(linkAddress.value);
|
||||
message.success("复制成功");
|
||||
}
|
||||
onBeforeMount(() => {
|
||||
getQuetions();
|
||||
@@ -278,7 +282,7 @@ export default defineComponent({
|
||||
handleComment,
|
||||
linkAddress,
|
||||
handleCopy,
|
||||
isLogin
|
||||
isLogin,
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -318,7 +322,8 @@ export default defineComponent({
|
||||
.action-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.comment, .download {
|
||||
.comment,
|
||||
.download {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #434343;
|
||||
|
||||
Reference in New Issue
Block a user