no message

This commit is contained in:
A1300399510 2024-11-22 11:22:12 +08:00
parent 5f6044ea81
commit 274a1e27a3
6 changed files with 1017 additions and 907 deletions

View File

@ -303,6 +303,9 @@
border-top-left-radius: 0; border-top-left-radius: 0;
background-color: #f6f6f6; background-color: #f6f6f6;
} }
.content .details-box .answer .dialogue .dialogue-left .img {
margin-left: 38px;
}
.content .details-box .answer .dialogue .dialogue-right { .content .details-box .answer .dialogue .dialogue-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -319,6 +322,9 @@
border-top-right-radius: 0; border-top-right-radius: 0;
background-color: #f4f8fd; background-color: #f4f8fd;
} }
.content .details-box .answer .dialogue .dialogue-right .img {
margin-right: 38px;
}
.content .details-box .answer .dialogue .message { .content .details-box .answer .dialogue .message {
font-size: 14px; font-size: 14px;
color: #000000; color: #000000;
@ -332,6 +338,15 @@
border-radius: 16px; border-radius: 16px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.content .details-box .answer .dialogue .img {
border: 1px solid #e0dfdf;
border-radius: 10px;
width: 170px;
min-height: 100px;
max-height: 180px;
object-fit: cover;
cursor: pointer;
}
.content .details-box .item-header { .content .details-box .item-header {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650; font-weight: 650;
@ -1549,6 +1564,31 @@
height: 16px; height: 16px;
margin-right: 10px; margin-right: 10px;
} }
.preview-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.preview-overlay .preview-image {
max-width: 90%;
max-height: 90%;
object-fit: contain;
}
.preview-overlay .preview-close {
position: absolute;
top: 20px;
right: 20px;
color: white;
font-size: 30px;
cursor: pointer;
}
.upglide { .upglide {
margin-top: 0; margin-top: 0;
} }

View File

@ -339,6 +339,10 @@
border-top-left-radius: 0; border-top-left-radius: 0;
background-color: rgba(246, 246, 246, 1); background-color: rgba(246, 246, 246, 1);
} }
.img {
margin-left: 38px;
}
} }
.dialogue-right { .dialogue-right {
@ -357,6 +361,9 @@
border-top-right-radius: 0; border-top-right-radius: 0;
background-color: rgba(244, 248, 253, 1); background-color: rgba(244, 248, 253, 1);
} }
.img {
margin-right: 38px;
}
} }
.message { .message {
@ -372,6 +379,16 @@
border-radius: 16px; border-radius: 16px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.img {
border: 1px solid #e0dfdf;
border-radius: 10px;
width: 170px;
min-height: 100px;
max-height: 180px;
object-fit: cover;
cursor: pointer;
}
} }
} }
@ -1774,6 +1791,34 @@
} }
} }
.preview-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
.preview-image {
max-width: 90%;
max-height: 90%;
object-fit: contain;
}
.preview-close {
position: absolute;
top: 20px;
right: 20px;
color: white;
font-size: 30px;
cursor: pointer;
}
}
.upglide { .upglide {
margin-top: 0; margin-top: 0;
} }

View File

@ -1,6 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -84,7 +83,7 @@
<div class="item-header flexacenter">招生官答网友问</div> <div class="item-header flexacenter">招生官答网友问</div>
<div class="answer block"> <div class="answer block">
<div class="hint flexacenter"> <div class="hint flexacenter">
<img class="icon" src="/img/clock-icon.png"> <img class="icon" src="/img/clock-icon.png" />
本期内容整理自2024年10月23日香港城市大学计算学院项目宣讲会。 本期内容整理自2024年10月23日香港城市大学计算学院项目宣讲会。
</div> </div>
<div class="tab flexflex"> <div class="tab flexflex">
@ -96,17 +95,19 @@
<div class="dialogue"> <div class="dialogue">
<div class="dialogue-left"> <div class="dialogue-left">
<div class="info flexacenter"> <div class="info flexacenter">
<img class="avatar" src="https://axure-file.lanhuapp.com/md5__ac30938db0222358d5bdbba8925c5540.svg"> <img class="avatar" src="/img/avatar-default.svg" />
寄托网友 寄托网友
</div> </div>
<div class="message">香港城市大学生物统计学系是一个什么样的系?</div> <!-- <div class="message">香港城市大学生物统计学系是一个什么样的系?</div> -->
<img class="img" @click="openPreview()" src="/img/header-bj.png" />
</div> </div>
<div class="dialogue-right"> <div class="dialogue-right">
<div class="info flexacenter"> <div class="info flexacenter">
寄托网友 招生官
<img class="avatar" src="https://axure-file.lanhuapp.com/md5__ac30938db0222358d5bdbba8925c5540.svg"> <img class="avatar" src="/img/avatar-admission.png" />
</div> </div>
<div class="message">香港城市大学生物统计学系是一个什么样的系?</div> <!-- <div class="message">香港城市大学生物统计学系是一个什么样的系?</div> -->
<img class="img" @click="openPreview()" src="/img/header-bj.png" />
</div> </div>
</div> </div>
</div> </div>
@ -122,7 +123,7 @@
<div class="info-major">专业</div> <div class="info-major">专业</div>
<div class="info-value flex1" v-if="item.professionalzhong"> <div class="info-value flex1" v-if="item.professionalzhong">
<span>{{ item.professionaltou }}</span> <span>{{ item.professionaltou }}</span>
<span style="color: #509CE3;">item.professionalzhong</span> <span style="color: #509ce3">item.professionalzhong</span>
<span>{{ item.professionalend }}</span> <span>{{ item.professionalend }}</span>
</div> </div>
<div class="info-value flex1" v-else>{{ item.professional }}</div> <div class="info-value flex1" v-else>{{ item.professional }}</div>
@ -131,12 +132,12 @@
<div class="info-major">项目</div> <div class="info-major">项目</div>
<div class="info-value flex1" v-if="item.projecttzhong"> <div class="info-value flex1" v-if="item.projecttzhong">
<span>{{ item.projecttou }}</span> <span>{{ item.projecttou }}</span>
<span style="color: #509CE3;">{{ item.projecttzhong }}</span> <span style="color: #509ce3">{{ item.projecttzhong }}</span>
<span>{{ item.projecttend }}</span> <span>{{ item.projecttend }}</span>
</div> </div>
<div class="info-value flex1" v-else>{{ item.project }}</div> <div class="info-value flex1" v-else>{{ item.project }}</div>
</div> </div>
<div class="info-item flexacenter" style="align-items: center;font-size: 27rpx;"> <div class="info-item flexacenter" style="align-items: center; font-size: 27rpx">
{{ item.semester }} {{ item.semester }}
<div class="line-between"></div> <div class="line-between"></div>
{{ item.degree }} {{ item.degree }}
@ -158,7 +159,7 @@
{{ item.view || 0 }} {{ item.view || 0 }}
</div> </div>
<div class="item-bottom-item flexcenter"> <div class="item-bottom-item flexcenter">
<img class="item-bottom-icon" mode="widthFix" style="width: 20rpx;" src="/img/expression-icon.png" /> <img class="item-bottom-icon" mode="widthFix" style="width: 20rpx" src="/img/expression-icon.png" />
{{ item.ripostes || 0 }} {{ item.ripostes || 0 }}
</div> </div>
<div class="item-bottom-item flexcenter"> <div class="item-bottom-item flexcenter">
@ -283,9 +284,7 @@
<div class="tuition-scholarships flexflex"> <div class="tuition-scholarships flexflex">
<div class="left flex1"> <div class="left flex1">
<div class="item-header flexacenter"> <div class="item-header flexacenter">费用</div>
费用
</div>
<div class="tuition block flexacenter"> <div class="tuition block flexacenter">
<div class="tuition-left flex1 flexjcenter"> <div class="tuition-left flex1 flexjcenter">
<div class="unit">{{ info.tuition_currency || 'HK$' }}</div> <div class="unit">{{ info.tuition_currency || 'HK$' }}</div>
@ -412,7 +411,7 @@
<div class="link block mb40" v-if="info.catalog_url"> <div class="link block mb40" v-if="info.catalog_url">
<div class="title">申请页项目详情</div> <div class="title">申请页项目详情</div>
<div class="text">{{ info.catalog_url }}</div> <div class="text">{{ info.catalog_url }}</div>
<div class="flexflex" style="justify-content: flex-end;"> <div class="flexflex" style="justify-content: flex-end">
<div class="btn flexcenter" @click="copy(info.catalog_url)"> <div class="btn flexcenter" @click="copy(info.catalog_url)">
<img class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix" /> <img class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix" />
复制链接 复制链接
@ -475,7 +474,7 @@
<div class="name">{{ info.leaflet_name || '-' }}</div> <div class="name">{{ info.leaflet_name || '-' }}</div>
</div> </div>
</div> </div>
<div class="flexflex" style="justify-content: flex-end;"> <div class="flexflex" style="justify-content: flex-end">
<div class="btn flexcenter" @click="download(info.leaflet_url)"> <div class="btn flexcenter" @click="download(info.leaflet_url)">
<img class="icon" src="/img/download-icon.png" /> <img class="icon" src="/img/download-icon.png" />
下载文件 下载文件
@ -488,7 +487,7 @@
<div class="link block mb40" v-if="info.program_url"> <div class="link block mb40" v-if="info.program_url">
<div class="title">学院网站项目详情</div> <div class="title">学院网站项目详情</div>
<div class="text">{{ info.program_url }}</div> <div class="text">{{ info.program_url }}</div>
<div class="flexflex" style="justify-content: flex-end;"> <div class="flexflex" style="justify-content: flex-end">
<div class="btn flexcenter" @click="copy(info.program_url)"> <div class="btn flexcenter" @click="copy(info.program_url)">
<img class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix" /> <img class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix" />
复制链接 复制链接
@ -500,7 +499,7 @@
<div class="link block mb40" v-if="info.catalog_url"> <div class="link block mb40" v-if="info.catalog_url">
<div class="title">项目目录项目详情</div> <div class="title">项目目录项目详情</div>
<div class="text">{{ info.catalog_url }}</div> <div class="text">{{ info.catalog_url }}</div>
<div class="flexflex" style="justify-content: flex-end;"> <div class="flexflex" style="justify-content: flex-end">
<div class="btn flexcenter" @click="copy(info.catalog_url)"> <div class="btn flexcenter" @click="copy(info.catalog_url)">
<img class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix" /> <img class="icon" src="https://app.gter.net/image/miniApp/offer/copy-icon.png" mode="widthFix" />
复制链接 复制链接
@ -540,30 +539,25 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="point flexcenter"> <div class="point flexcenter">
<div class="item " :class="{'pitch': admissionCurrent == index}" v-for="(item,index) in urls" :key="index" @click="cutSwiper(index)"> <div class="item" :class="{'pitch': admissionCurrent == index}" v-for="(item,index) in urls" :key="index" @click="cutSwiper(index)"></div>
</div> </div>
</div> <img class="triangle" src="/img/triangle-white-lucency.svg" />
<img class="triangle" src="/img/triangle-white-lucency.svg">
</div> </div>
<div class="word flexcenter"> <div class="word flexcenter">
<img class="item" src="/img/word-live.png"> <img class="item" src="/img/word-live.png" />
<img class="item" src="/img/word-playback.png"> <img class="item" src="/img/word-playback.png" />
<img class="item" src="/img/word-answer.png"> <img class="item" src="/img/word-answer.png" />
</div> </div>
<div class="hint">请添加申请小助手</div> <div class="hint">请添加申请小助手</div>
<div class="QR-code flexcenter"> <div class="QR-code flexcenter">
<img class="icon" src="https://u.gter.net/assistantwxqrcode.png"> <img class="icon" src="https://u.gter.net/assistantwxqrcode.png" />
</div> </div>
</div> </div>
<div class="else"> <div class="else">
@ -619,7 +613,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 底部 --> <!-- 底部 -->
@ -657,7 +650,7 @@
<div v-else class="type3 flexacenter"> <div v-else class="type3 flexacenter">
<div class="btn flexacenter">我的项目 <img class="img" src="/img/arrows-circle-green.svg" /></div> <div class="btn flexacenter">我的项目 <img class="img" src="/img/arrows-circle-green.svg" /></div>
<div class="add-btn flexcenter" :class="{'already': contras.status == 1}" style="margin-right: 10px;" @click="addComparison()"> <div class="add-btn flexcenter" :class="{'already': contras.status == 1}" style="margin-right: 10px" @click="addComparison()">
<img v-if="contras.status == 1" class="icon" src="/img/tick-circle-gray.svg" /> <img v-if="contras.status == 1" class="icon" src="/img/tick-circle-gray.svg" />
<img v-else class="img" src="/img/add-circle-white.svg" /> <img v-else class="img" src="/img/add-circle-white.svg" />
{{ contras.status == 1 ? '已' : '' }}加入对比单 {{ contras.status == 1 ? '已' : '' }}加入对比单
@ -669,9 +662,15 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 预览覆盖层 -->
<div class="preview-overlay" v-if="previewShow" @click="hidePreview()">
<img class="preview-image" @click.stop="() => false" src="/img/9dfc-c89f50deb0f906dd751540895bf0e303.jpg" alt="图片预览" />
<span class="preview-close" @click="hidePreview()">&times;</span>
</div>
</div> </div>
<script> <script>
const {createApp, ref, onMounted, nextTick, onUnmounted, computed, defineProps} = Vue const { createApp, ref, onMounted, nextTick, onUnmounted, computed, defineProps } = Vue;
const subject = createApp({ const subject = createApp({
setup() { setup() {
let side = ref({ let side = ref({
@ -682,251 +681,252 @@
graduate: "毕业&就业", graduate: "毕业&就业",
issue: "常见问题", issue: "常见问题",
links: "相关链接", links: "相关链接",
}) });
const stateObj = ref({ const stateObj = ref({
0: "待定", 0: "待定",
1: "主申", 1: "主申",
2: "冲刺", 2: "冲刺",
3: "保底", 3: "保底",
}) });
let rankingsObj = ref({}) let rankingsObj = ref({});
let disciplineObj = ref({}) let disciplineObj = ref({});
const uniqid = "IwdCOvZ08KUhkXtjXQ5vhAPHczKneFd45T-d55pDZx8TvBsGm2D9tbuIj9YdJhDq2Zy09bXaoc4-lAhiMmE1" const uniqid = "IwdCOvZ08KUhkXtjXQ5vhAPHczKneFd45T-d55pDZx8TvBsGm2D9tbuIj9YdJhDq2Zy09bXaoc4-lAhiMmE1";
onMounted(() => { onMounted(() => {
window.addEventListener("scroll", handleScroll) window.addEventListener("scroll", handleScroll);
getBaseData().then(data => { getBaseData().then((data) => {
rankingsObj.value = data.rankings rankingsObj.value = data.rankings;
disciplineObj.value = data.discipline disciplineObj.value = data.discipline;
getData() getData();
}) });
}) });
const handleScroll = () => { const handleScroll = () => {
const keyElements = detailsRef.value.querySelectorAll(".side-item") const keyElements = detailsRef.value.querySelectorAll(".side-item");
for (const keyElement of keyElements) { for (const keyElement of keyElements) {
const rect = keyElement.getBoundingClientRect() const rect = keyElement.getBoundingClientRect();
// console.log(rect) // console.log(rect)
if (rect.top + rect.height > 0) { if (rect.top + rect.height > 0) {
// console.log("keyElement", keyElement.getAttribute("type")) // console.log("keyElement", keyElement.getAttribute("type"))
sideKey.value = keyElement.getAttribute("type") sideKey.value = keyElement.getAttribute("type");
break break;
}
} }
} }
};
let info = ref({}) let info = ref({});
let remark = ref("") let remark = ref("");
let sideKey = ref("pivotal") let sideKey = ref("pivotal");
let contras = ref({}) let contras = ref({});
let course = ref({}) let course = ref({});
const getData = () => { const getData = () => {
$ajaxget("/api/detail", { $ajaxget("/api/detail", {
uniqid, uniqid,
}).then(res => { }).then((res) => {
const data = res.data const data = res.data;
decodeKey(data.info).then(res => { decodeKey(data.info).then((res) => {
data.info = res data.info = res;
let courseObj = { let courseObj = {
required: [], required: [],
requiredCount: 0, requiredCount: 0,
elective: [], elective: [],
electiveCount: 0, electiveCount: 0,
} };
const infoObj = data.info || {} const infoObj = data.info || {};
const fields = ["tuition_fee", "tuition_fee_per_credit", "application_fee", "admission_deposit"] const fields = ["tuition_fee", "tuition_fee_per_credit", "application_fee", "admission_deposit"];
fields.forEach(field => { fields.forEach((field) => {
const textKey = `${field}_text` const textKey = `${field}_text`;
infoObj[textKey] = formatNumberWithSpaces(info[field] || "") infoObj[textKey] = formatNumberWithSpaces(info[field] || "");
}) });
const curriculum = infoObj.curriculum || [] const curriculum = infoObj.curriculum || [];
if (infoObj.language_of_instruction) { if (infoObj.language_of_instruction) {
let strOutput = infoObj.language_of_instruction.join(",") let strOutput = infoObj.language_of_instruction.join(",");
infoObj["language_of_instruction_text"] = strOutput infoObj["language_of_instruction_text"] = strOutput;
} }
curriculum.forEach(element => { curriculum.forEach((element) => {
if (element.credit == "N/A") element.credit = 0 if (element.credit == "N/A") element.credit = 0;
element.type === "必修课" ? (courseObj.required.push(element), (courseObj.requiredCount += element.credit)) : (courseObj.elective.push(element), (courseObj.electiveCount += element.credit)) element.type === "必修课" ? (courseObj.required.push(element), (courseObj.requiredCount += element.credit)) : (courseObj.elective.push(element), (courseObj.electiveCount += element.credit));
}) });
let contrasObj = data.contras let contrasObj = data.contras;
if (Array.isArray(contrasObj)) contrasObj = {} if (Array.isArray(contrasObj)) contrasObj = {};
remark.value = contrasObj.remarks || "" remark.value = contrasObj.remarks || "";
// 算出最后申请时间 // 算出最后申请时间
infoObj["application_end"] = calculateApplicaDeadline(infoObj.nonlocal_application_end || {}) infoObj["application_end"] = calculateApplicaDeadline(infoObj.nonlocal_application_end || {});
// 算出面试轮时间 // 算出面试轮时间
infoObj["interviewRounds"] = calculateInterviewRound(infoObj.nonlocal_application_end || {}) infoObj["interviewRounds"] = calculateInterviewRound(infoObj.nonlocal_application_end || {});
if (typeof infoObj.mode_of_study == "string") infoObj.mode_of_study = JSON.parse(info.mode_of_study) if (typeof infoObj.mode_of_study == "string") infoObj.mode_of_study = JSON.parse(info.mode_of_study);
let sideObj = side.value let sideObj = side.value;
// 判断是否常见问题 ,没有则删除左侧 // 判断是否常见问题 ,没有则删除左侧
if (!infoObj.faq || infoObj.faq.length == 0) delete sideObj.issue if (!infoObj.faq || infoObj.faq.length == 0) delete sideObj.issue;
// 判断 毕业就业 没有则删除左侧 // 判断 毕业就业 没有则删除左侧
if (!info.award_zh && !infoObj.graduation_requirements && !infoObj.domains && !infoObj.employers && !infoObj.positions) delete sideObj.graduate if (!info.award_zh && !infoObj.graduation_requirements && !infoObj.domains && !infoObj.employers && !infoObj.positions) delete sideObj.graduate;
// 判断奖学金文案 // 判断奖学金文案
if (infoObj.scholarship) infoObj["scholarshipText"] = JudgmentScholarshipText(infoObj.scholarship) if (infoObj.scholarship) infoObj["scholarshipText"] = JudgmentScholarshipText(infoObj.scholarship);
if (infoObj.leaflet_url) { if (infoObj.leaflet_url) {
const leaflet_url = decodeURIComponent(infoObj.leaflet_url) const leaflet_url = decodeURIComponent(infoObj.leaflet_url);
const urlWithoutParams = leaflet_url.split("?")[0] const urlWithoutParams = leaflet_url.split("?")[0];
const urlParts = urlWithoutParams.split("/") const urlParts = urlWithoutParams.split("/");
const fileName = urlParts[urlParts.length - 1] const fileName = urlParts[urlParts.length - 1];
infoObj["leaflet_name"] = fileName infoObj["leaflet_name"] = fileName;
} }
// const isadmission = info.admissionsproject || 0 // const isadmission = info.admissionsproject || 0
// if (isadmission == 1) this.getAdmissionList() // if (isadmission == 1) this.getAdmissionList()
const date = new Date() const date = new Date();
const month = date.getMonth() + 1 const month = date.getMonth() + 1;
const year = date.getFullYear() const year = date.getFullYear();
const semester = infoObj.semester || {} const semester = infoObj.semester || {};
if (month > semester.month && year + 1 <= semester.year) infoObj["semesterState"] = true if (month > semester.month && year + 1 <= semester.year) infoObj["semesterState"] = true;
console.log("infoObj", infoObj.rankings) console.log("infoObj", infoObj.rankings);
info.value = infoObj info.value = infoObj;
side.value = sideObj side.value = sideObj;
sideKey.value = "basic" sideKey.value = "basic";
course.value = courseObj course.value = courseObj;
contras.value = contrasObj contras.value = contrasObj;
}) });
}) });
} };
// 判断奖学金文案 // 判断奖学金文案
const JudgmentScholarshipText = obj => { const JudgmentScholarshipText = (obj) => {
let text = "" let text = "";
if (obj.local && obj.nonlocal) text = "均有" if (obj.local && obj.nonlocal) text = "均有";
else if (!obj.local && !obj.nonlocal) text = "均无" else if (!obj.local && !obj.nonlocal) text = "均无";
else if (obj.local && !obj.nonlocal) text = "非本地学生无" else if (obj.local && !obj.nonlocal) text = "非本地学生无";
else if (!obj.local && obj.nonlocal) text = "非本地学生有" else if (!obj.local && obj.nonlocal) text = "非本地学生有";
return text return text;
} };
// 计算出外地申请截止时间 // 计算出外地申请截止时间
const calculateApplicaDeadline = obj => { const calculateApplicaDeadline = (obj) => {
// 初始化变量来存储最大时间点的属性和日期 // 初始化变量来存储最大时间点的属性和日期
let maxDate = null let maxDate = null;
// 遍历对象的属性 // 遍历对象的属性
for (const item in obj) { for (const item in obj) {
// 如果当前日期是最大日期或是第一个日期,则更新最大日期和属性 // 如果当前日期是最大日期或是第一个日期,则更新最大日期和属性
if (maxDate === null || obj[item] > maxDate) maxDate = obj[item] if (maxDate === null || obj[item] > maxDate) maxDate = obj[item];
}
return maxDate
} }
return maxDate;
};
// 计算出面试轮的数组 // 计算出面试轮的数组
const calculateInterviewRound = obj => { const calculateInterviewRound = (obj) => {
let rounds = [] let rounds = [];
const chineseNumbers = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"] const chineseNumbers = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十"];
const formatTime = (time, index) => { const formatTime = (time, index) => {
return { return {
text: `第${chineseNumbers[index]}轮`, text: `第${chineseNumbers[index]}轮`,
time, time,
} };
} };
Object.keys(obj).forEach((key, index) => { Object.keys(obj).forEach((key, index) => {
rounds.push(formatTime(obj[key], index)) rounds.push(formatTime(obj[key], index));
}) });
if (rounds.length == 0) rounds = [{}] if (rounds.length == 0) rounds = [{}];
return rounds || [{}] return rounds || [{}];
} };
let studyMode = ref("ft") // 'ft', // 学习模式显示状态 ft 全日制 pt 兼读制 let studyMode = ref("ft"); // 'ft', // 学习模式显示状态 ft 全日制 pt 兼读制
const cutStudyMode = type => { const cutStudyMode = (type) => {
studyMode.value = type studyMode.value = type;
} };
const copy = url => { const copy = (url) => {
let copyInput = document.createElement("input") let copyInput = document.createElement("input");
document.body.appendChild(copyInput) document.body.appendChild(copyInput);
copyInput.setAttribute("value", url) copyInput.setAttribute("value", url);
copyInput.select() copyInput.select();
document.execCommand("Copy") document.execCommand("Copy");
copyInput.remove() copyInput.remove();
} };
// 下载文件 // 下载文件
const download = url => { const download = (url) => {
// 下载文件 // 下载文件
window.open(url) window.open(url);
} };
const bindblur = () => { const bindblur = () => {
$ajax("/api/user/remarks", { $ajax("/api/user/remarks", {
token: contras.value.token, token: contras.value.token,
remarks: remark.value, remarks: remark.value,
}).then(res => { }) }).then((res) => {});
} };
// 点击加入对比单 // 点击加入对比单
const addComparison = () => { const addComparison = () => {
$ajax("/api/contrast/add", { $ajax("/api/contrast/add", {
projectid: info.value.id, projectid: info.value.id,
}).then(res => { }).then((res) => {
if (res.code != 200) return if (res.code != 200) return;
const data = res.data const data = res.data;
contras.value["status"] = 1 contras.value["status"] = 1;
contras.value["ismanage"] = 1 contras.value["ismanage"] = 1;
contras.value["typeid"] = 0 // 默认是待定 contras.value["typeid"] = 0; // 默认是待定
contras.value["token"] = data.token contras.value["token"] = data.token;
}) });
} };
const detailsRef = ref(null) const detailsRef = ref(null);
// 使 页面滚动到 // 使 页面滚动到
const cutSide = key => { const cutSide = (key) => {
// sideKey.value = key // sideKey.value = key
const keyElement = detailsRef.value.querySelector(`.side-item[type=${key}]`) const keyElement = detailsRef.value.querySelector(`.side-item[type=${key}]`);
keyElement.scrollIntoView({behavior: "smooth"}) keyElement.scrollIntoView({ behavior: "smooth" });
} };
let stateState = ref(false) let stateState = ref(false);
const cutState = () => { const cutState = () => {
stateState.value = !stateState.value stateState.value = !stateState.value;
} };
// 修改 项目 状态 // 修改 项目 状态
const changeType = typeid => { const changeType = (typeid) => {
$ajax("/api/user/changeType", { $ajax("/api/user/changeType", {
token: contras.value.token || "", token: contras.value.token || "",
typeid, typeid,
}).then(res => { }).then((res) => {
if (res.code != 200) return if (res.code != 200) return;
contras.value["typeid"] = typeid contras.value["typeid"] = typeid;
cutState() cutState();
}) });
} };
const deletee = () => { const deletee = () => {
const contras = this.data.contras const contras = this.data.contras;
$ajax("/api/user/delete", { $ajax("/api/user/delete", {
token: contras.value.token, token: contras.value.token,
}).then(res => { }).then((res) => {
if (res.code != 200) return if (res.code != 200) return;
contras.value["ismanage"] = 0 contras.value["ismanage"] = 0;
stateState.value = false stateState.value = false;
}) });
} };
const offerList = ref([{ const offerList = ref([
{
apply_results: "Offer", apply_results: "Offer",
apply_resultstatus: 1, apply_resultstatus: 1,
avatar: "https://oss.x-php.com/avatar/97K4EWIMLrsbGTWXslC1XltTFqyOikN42jDKLNjtax7HINpse8SMSdU90AVyYWFjYQ~~/mini", avatar: "https://oss.x-php.com/avatar/97K4EWIMLrsbGTWXslC1XltTFqyOikN42jDKLNjtax7HINpse8SMSdU90AVyYWFjYQ~~/mini",
@ -944,7 +944,8 @@
uniqid: "1eWa0uTzzLvv", uniqid: "1eWa0uTzzLvv",
url: "https://offer.gter.net/details/1eWa0uTzzLvv", url: "https://offer.gter.net/details/1eWa0uTzzLvv",
view: 557, view: 557,
}, { },
{
apply_results: "Offer", apply_results: "Offer",
apply_resultstatus: 1, apply_resultstatus: 1,
avatar: "https://oss.x-php.com/avatar/97K4EWIMLrsbGTWXslC1XVtVE6yOikN42jDKLNjtax7HIdVsesDXSdU90AVyYWFjYQ~~/mini", avatar: "https://oss.x-php.com/avatar/97K4EWIMLrsbGTWXslC1XVtVE6yOikN42jDKLNjtax7HIdVsesDXSdU90AVyYWFjYQ~~/mini",
@ -962,64 +963,77 @@
uniqid: "HD4DmDCi0aCa", uniqid: "HD4DmDCi0aCa",
url: "https://offer.gter.net/details/HD4DmDCi0aCa", url: "https://offer.gter.net/details/HD4DmDCi0aCa",
view: 242, view: 242,
}]) },
]);
const urls = ref([[{ const urls = ref([
[
{
logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCb1SBaR7ec6NYmTA4pRcOalNHJQuwf83NTE2", logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCb1SBaR7ec6NYmTA4pRcOalNHJQuwf83NTE2",
mold: 2, mold: 2,
title: "11.27 19:00 | 高达90%就业率!工科生不能错过的香港城大工学院线上宣讲会快来了解!", title: "11.27 19:00 | 高达90%就业率!工科生不能错过的香港城大工学院线上宣讲会快来了解!",
url: "https://bbs.gter.net/thread-2619710-1-1.html", url: "https://bbs.gter.net/thread-2619710-1-1.html",
}, { },
{
logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCLVSBaR7ec6NYmTA5sRfNP5NHJQuwf83NTE2", logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCLVSBaR7ec6NYmTA5sRfNP5NHJQuwf83NTE2",
mold: 1, mold: 1,
title: "香港大学 香港大学社会科学硕士(社会数据分析)线上公开课暨宣讲会", title: "香港大学 香港大学社会科学硕士(社会数据分析)线上公开课暨宣讲会",
url: "https://bbs.gter.net/thread-2619923-1-1.html" url: "https://bbs.gter.net/thread-2619923-1-1.html",
}, { },
{
logo: "https://oss.x-php.com/school/J6BSwE6VfCFmDrknc6IXB9eUbGqEscEIOawLEogy25QhNzUxNg~~", logo: "https://oss.x-php.com/school/J6BSwE6VfCFmDrknc6IXB9eUbGqEscEIOawLEogy25QhNzUxNg~~",
mold: 2, mold: 2,
title: "11.28 19:30 | 毕业起薪高 工作一年学费回本?昆杜研究生项目优点真的太太太太多了! ", title: "11.28 19:30 | 毕业起薪高 工作一年学费回本?昆杜研究生项目优点真的太太太太多了! ",
url: "https://bbs.gter.net/thread-2620009-1-1.html", url: "https://bbs.gter.net/thread-2620009-1-1.html",
}, { },
{
logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCLRSBaR7ec6NYmTHuZYPMKxNHJQuwf83NTE2", logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCLRSBaR7ec6NYmTHuZYPMKxNHJQuwf83NTE2",
mold: 3, mold: 3,
title: "招生资讯 | 香港中文大学 政务与政策科学学院授课式硕士课程", title: "招生资讯 | 香港中文大学 政务与政策科学学院授课式硕士课程",
url: "https://bbs.gter.net/thread-2616456-1-1.html", url: "https://bbs.gter.net/thread-2616456-1-1.html",
}], [{ },
],
[
{
logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCLRSBaR7ec6NYmTHuZYPMKxNHJQuwf83NTE2", logo: "https://oss.x-php.com/school/J6BSwE-VfCFkCLRSBaR7ec6NYmTHuZYPMKxNHJQuwf83NTE2",
mold: 3, mold: 3,
title: "长期答疑 | 香港中文大学 经济学理学硕士课程-2025入学现正招生", title: "长期答疑 | 香港中文大学 经济学理学硕士课程-2025入学现正招生",
url: "https://bbs.gter.net/thread-2617401-1-1.html", url: "https://bbs.gter.net/thread-2617401-1-1.html",
}]]) },
],
]);
const moldObj = ref({ const moldObj = ref({
1: "直播", 1: "直播",
2: "回放", 2: "回放",
3: "答疑" 3: "答疑",
}) });
let admissionCurrent = ref(0) let admissionCurrent = ref(0);
const swiperRef = ref(null) const swiperRef = ref(null);
// 写一个 点击切换轮播图 // 写一个 点击切换轮播图
const cutSwiper = index => { const cutSwiper = (index) => {
admissionCurrent.value = index admissionCurrent.value = index;
const dom = document.querySelector(".swiper-item" + index) const dom = document.querySelector(".swiper-item" + index);
const left = dom.offsetLeft const left = dom.offsetLeft;
swiperRef.value.scrollTo({ swiperRef.value.scrollTo({
left, left,
behavior: "smooth", behavior: "smooth",
}) });
} };
return {swiperRef, cutSwiper, admissionCurrent, moldObj, urls, offerList, side, sideKey, info, disciplineObj, rankingsObj, cutStudyMode, studyMode, course, contras, copy, download, stateObj, bindblur, remark, addComparison, cutSide, detailsRef, stateState, cutState, changeType, deletee} let previewShow = ref(false);
const openPreview = () => (previewShow.value = true);
const hidePreview = () => (previewShow.value = false);
return { previewShow, openPreview, hidePreview, swiperRef, cutSwiper, admissionCurrent, moldObj, urls, offerList, side, sideKey, info, disciplineObj, rankingsObj, cutStudyMode, studyMode, course, contras, copy, download, stateObj, bindblur, remark, addComparison, cutSide, detailsRef, stateState, cutState, changeType, deletee };
}, },
}) });
subject.component("text-module", textModule) subject.component("text-module", textModule);
subject.mount("#app") subject.mount("#app");
</script> </script>
</body> </body>
</html> </html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 KiB

BIN
img/avatar-admission.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

11
img/avatar-default.svg Normal file

File diff suppressed because one or more lines are too long