no message

This commit is contained in:
A1300399510 2024-01-09 18:49:37 +08:00
parent 9958609ae6
commit f90cd62cc2
7 changed files with 74 additions and 37 deletions

12
app.vue
View File

@ -12,7 +12,9 @@
<script setup>
const route = useRoute()
//
// const isProduction = import.meta.env.NODE_ENV === "production"
const isProduction = process.env.NODE_ENV === "production"
// console.log(isProduction, "isProduction")
// watchEffect(() => {
// if (typeof window !== "undefined" && route.path) {
@ -29,10 +31,10 @@ const route = useRoute()
onMounted(() => {
// console.log("isProduction", isProduction)
// if (!isProduction) isNeedLogin.value = false
// else determineIsLogin()
if (true) determineIsLogin()
else isNeedLogin.value = false
if (!isProduction) isNeedLogin.value = false
else determineIsLogin()
// if (true) determineIsLogin()
// else isNeedLogin.value = false
})
let isNeedLogin = ref(true) //

BIN
assets/img/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -38,7 +38,7 @@
</div>
</div>
<div class="operate-area flexacenter">
<img class="delete-icon" v-if="MyPopupState == 'collect'" @click.stop="cancelCollection(item['token'], index)" src="@/assets/img/delete-icon.svg" />
<img class="delete-icon" v-if="MyPopupState == 'collect'" @click.stop="cancelCollection(item['token'], index, item?.data?.uniqid)" src="@/assets/img/delete-icon.svg" />
<div class="anonymous-box flexacenter" v-else @click.stop="openAnonymousState(index)">
<div class="text">{{ item["anonymous"] == 1 ? "匿名" : "公开" }}</div>
<img class="arrow-icon" src="@/assets/img/arrow-gray.svg" />
@ -215,9 +215,10 @@ const closeDialog = () => {
}
// const emit = defineEmits(["cutMy"]);
const unbookmarkSamePage = inject("unbookmarkSamePage")
//
const cancelCollection = (token, index) => {
const cancelCollection = (token, index, uniqid) => {
const id = route.params["id"]
MyUserDeleteCollectHttp({ token }).then(res => {
if (res.code != 200) {
ElMessage.error(res.message)
@ -228,6 +229,8 @@ const cancelCollection = (token, index) => {
showList.value = [...collectList]
count.value.collect--
collectCount.value--
if (id == uniqid) unbookmarkSamePage()
})
}
</script>

View File

@ -3,7 +3,7 @@
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build ",
"build": "nuxt build",
"dev": "nuxt dev --host",
"generate": "nuxt generate",
"preview": "nuxt preview",

View File

@ -203,6 +203,7 @@
<div class="comments-username" @click="openAvatarPopover(index)">{{ item["nickname"] }}</div>
<div class="comments-time">{{ handleDate(item["timestamp"]) }}</div>
<div class="comments-identity" v-if="item['isauthor']">作者</div>
<img class="comments-title" v-if="item['groupid'] == 14" src="@/assets/img/title.png" />
</div>
<div class="comment-header-right flexacenter">
<div class="menu-box flexacenter">
@ -251,7 +252,9 @@
<div class="comment-header-left flexacenter">
<div class="comments-username" @click="openAvatarPopover(index, i)">{{ ite["nickname"] }}</div>
<div class="comments-time">{{ handleDate(ite["timestamp"]) }}</div>
<div class="comments-identity" v-if="ite['isauthor']">作者</div>
<img class="comments-title" v-if="ite['groupid'] == 14" src="@/assets/img/title.png" />
</div>
<div class="comment-header-right flexacenter">
<div class="menu-box flexacenter">
@ -295,28 +298,41 @@
<div class="floor-area flexacenter">
<div class="floor-content flexacenter">
<div class="floor-right flexacenter" @mouseenter="handleFloorRight(true)" @mouseleave="handleFloorRight(false)">
手机查看该面经
<img class="arrows-icon" src="@/assets/img/arrows-icon.png" />
<el-popover placement="bottom" width="160px" trigger="hover" v-model:visible="floorRightState" popper-style="padding: 24px;border-radius: 18px;">
<template #reference>
<div class="QR-code-ball flexcenter">
<img class="" src="@/assets/img/QR-code-icon.svg" />
</div>
</template>
<img class="examine-code" :src="qrcode" />
</el-popover>
</div>
<div class="floor-left flexacenter">
<div class="item flexacenter" v-if="isBrowser" style="cursor: auto;">
<img class="icon" src="@/assets/img/eye-icon-black.svg" />
<img class="icon h8" src="@/assets/img/eye-icon-black.svg" />
{{ info["views"] }}
</div>
<div class="item flexacenter" @click="handleLike">
<img class="icon" v-if="islike == 1" src="@/assets/img/like-icon-colours.png" />
<img class="icon" v-else src="@/assets/img/like-icon.png" />
<img class="icon h16" v-if="islike == 1" src="@/assets/img/like-icon-colours.png" />
<img class="icon h16" v-else src="@/assets/img/like-icon.png" />
{{ info["likenum"] || "" }}
</div>
<div class="item flexacenter" @click="handleScrollComments()"><img class="icon" src="@/assets/img/comment-icon.png" />{{ commentComments }}</div>
<div class="item flexacenter" @click="handleScrollComments()"><img class="icon h15" src="@/assets/img/comment-icon.png" />{{ commentComments }}</div>
<ClientOnly>
<div class="item flexacenter" @click="handleCollect()">
<img class="icon" v-if="iscollection == 1" src="@/assets/img/collect-icon-colours.svg" />
<img class="icon" v-else src="@/assets/img/collect-icon.png" />
<img class="icon h16" v-if="iscollection == 1" src="@/assets/img/collect-icon-colours.svg" />
<img class="icon h16" v-else src="@/assets/img/collect-icon.png" />
{{ info["favnum"] || "收藏" }}
</div>
</ClientOnly>
<ClientOnly>
<el-popover placement="bottom" width="628px" trigger="click" popper-style="padding: 0;border-radius: 10px;" v-model:visible="transmitBoxState">
<template #reference>
<div class="item flexacenter" @click="handleShare"><img class="icon" src="@/assets/img/transmit-icon.png" />转发</div>
<div class="item flexacenter" @click="handleShare"><img class="icon h15" src="@/assets/img/transmit-icon.png" />转发</div>
</template>
<div class="transmit-box flexflex">
@ -355,19 +371,6 @@
</div>
<div class="coin-btn flexcenter" @click="openCoinOperation()">给TA投币</div>
</div>
<div class="floor-right flexacenter" @mouseenter="handleFloorRight(true)" @mouseleave="handleFloorRight(false)">
手机查看该面经
<img class="arrows-icon" src="@/assets/img/arrows-icon.png" />
<el-popover placement="bottom" width="160px" trigger="hover" v-model:visible="floorRightState" popper-style="padding: 24px;border-radius: 18px;">
<template #reference>
<div class="QR-code-ball flexcenter">
<img class="" src="@/assets/img/QR-code-icon.svg" />
</div>
</template>
<img class="examine-code" :src="qrcode" />
</el-popover>
</div>
</div>
</div>
</div>
@ -707,8 +710,8 @@ const alsoCommentsData = (index, ind) => {
let data = res.data
let childData = targetCommentItem.child.concat(data.data)
//
const filteredData = childData.filter((obj, index, self) => {
//
return self.findIndex(item => item.id == obj.id) == index
})
@ -1277,6 +1280,14 @@ const handleShare = () => shareHttp({ token })
const loginJudgment = () => {
if (isNeedLogin.value) goLogin()
}
//
const unbookmarkSamePage = () => {
iscollection.value = 0
info.value.favnum--
}
provide("unbookmarkSamePage", unbookmarkSamePage)
</script>
<style lang="less" scoped>
@ -1660,8 +1671,8 @@ const loginJudgment = () => {
&.unlock-unlock {
overflow: hidden;
height: 244px;
cursor: pointer;
height: 180px;
// cursor: pointer;
.unlock-mask {
position: absolute;
@ -1669,7 +1680,7 @@ const loginJudgment = () => {
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to top, rgba(246, 246, 246, 1) 82%, transparent);
background: linear-gradient(to top, rgba(246, 246, 246, 1) 70%, transparent);
font-size: 14px;
color: #000000;
flex-direction: column;
@ -1806,6 +1817,10 @@ const loginJudgment = () => {
margin-right: 10px;
}
.comments-title {
height: 16px;
}
.comments-identity {
font-size: 12px;
color: #7f7f7f;
@ -1814,6 +1829,7 @@ const loginJudgment = () => {
background-color: rgba(240, 242, 245, 1);
border: 1px solid rgba(215, 215, 215, 1);
border-radius: 5px;
margin-right: 10px;
}
}
.comment-header-right {
@ -2012,13 +2028,29 @@ const loginJudgment = () => {
// background: #000000;
.floor-left {
// width: 373px;
height: 40px;
background-color: rgba(98, 177, 255, 0.0980392156862745);
border-radius: 150px;
padding: 0 20px;
.item {
cursor: pointer;
color: #aaaaaa;
font-size: 13px;
margin-right: 50px;
&:not(:last-of-type) {
margin-right: 40px;
}
.icon {
width: 16px;
// width: 16px;
&.h16 {
height: 16px;
}
&.h15 {
height: 15px;
}
&.h8 {
height: 8px;
}
margin-right: 5px;
}

View File

@ -385,7 +385,7 @@ const abandonSaving = () => {
}
/deep/ .el-autocomplete {
width: 100%;
width: 99%;
.el-input__wrapper {
box-shadow: none;

View File

@ -10,7 +10,7 @@ axios.defaults.withCredentials = true
axios.interceptors.request.use( //响应拦截
async config => {
// 开发时登录用的,可以直接替换小程序的 authorization
config['headers']['authorization'] = process.env.NODE_ENV !== "production" && "be0e96a37a79c3ab16851b9a4318b03a"
config['headers']['authorization'] = process.env.NODE_ENV !== "production" && "5b7a271e075cfd00c3efd0789b0d119c"
// config['headers']['authorization'] = "2lfrtq7h3ge634pl4ptlu2pbh2"
return config;
},