feat: 添加socket.io-client依赖并优化代码
fix: 修复用户信息判断逻辑和点赞功能 refactor: 移除调试日志和优化代码结构 style: 格式化代码和更新样式文件
This commit is contained in:
@@ -120,8 +120,6 @@ let openAttest = inject("openAttest");
|
||||
const realname = inject("realname");
|
||||
|
||||
const handleLike = (token) => {
|
||||
console.log(realname.value == 0, user.value.uin > 0);
|
||||
|
||||
if (realname.value == 0 && user.value.uin > 0) {
|
||||
openAttest();
|
||||
return;
|
||||
@@ -158,7 +156,8 @@ const router = useRouter();
|
||||
const clearKeyword = () => goToURL(`/index.html`, false);
|
||||
|
||||
try {
|
||||
if (process.server) {
|
||||
// 判断是不是 本地 运行
|
||||
if (process.server && location.hostname != "localhost") {
|
||||
await getListHttp({ page: 1, keyword: keyword.value }).then((res) => {
|
||||
if (res.code != 200) {
|
||||
page.value = 0;
|
||||
|
||||
@@ -109,7 +109,12 @@
|
||||
import { ElMessage } from "element-plus";
|
||||
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
|
||||
const router = useRouter();
|
||||
useHead({ script: [{ src: "https://app.gter.net/bottom?tpl=footer,popupnotification", body: true }] });
|
||||
// useHead({ script: [{ src: "https://app.gter.net/bottom?tpl=footer,popupnotification", body: true }] });
|
||||
useHead({ script: [{ src: "https://app.gter.net/bottom?tpl=header&menukey=mj&noshow=noshow" }, { src: "https://app.gter.net/bottom?tpl=footer,popupnotification", body: true }] });
|
||||
|
||||
let user = inject("userInfo");
|
||||
let openAttest = inject("openAttest");
|
||||
const realname = inject("realname");
|
||||
|
||||
const setDisabled = (time) => {
|
||||
return time.getTime() > Date.now(); // 可选历史天、可选当前天、不可选未来天
|
||||
@@ -276,13 +281,13 @@ const queryProjectSearch = (queryString, cb) => {
|
||||
};
|
||||
|
||||
// 选择专业
|
||||
const handleProjectSelect = (item) => {
|
||||
const handleProjectSelect = (item) => {
|
||||
info.value["program_id"] = item["id"] || 0;
|
||||
};
|
||||
|
||||
const handleProjectInput = (value) => {
|
||||
info.value["program_id"] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
// 切换匿名状态
|
||||
const cutAnonymous = () => {
|
||||
@@ -297,6 +302,13 @@ const cutVisible = () => {
|
||||
let loading = ref(false);
|
||||
// 提交发布
|
||||
const submit = (status = 1) => {
|
||||
console.log("realname", realname.value, user.value);
|
||||
|
||||
if (realname.value == 0 && user.value?.uin > 0) {
|
||||
openAttest();
|
||||
return;
|
||||
}
|
||||
|
||||
if (loading.value) {
|
||||
ElMessage.error("提交中,稍等");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user