From 70633c22cbf3e20f26813e74e5f06d67de4352d2 Mon Sep 17 00:00:00 2001 From: XiaoMo Date: Tue, 4 Apr 2023 14:20:10 +0800 Subject: [PATCH] =?UTF-8?q?a1300399510@qq.com=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=8E=202023/04/04=20-14:20:01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SearchBox-冲突-肖荣豪_Win10.vue | 199 +++ src/components/SearchBox.vue | 13 +- src/main-冲突-肖荣豪_Win10.js | 44 + src/main.js | 6 +- src/utils/common-冲突-肖荣豪_Win10.js | 75 + src/utils/common.js | 33 +- .../detail/detailIndex-冲突-肖荣豪_Win10.vue | 1240 +++++++++++++++++ src/views/detail/detailIndex.vue | 244 +--- .../SearchResult-冲突-肖荣豪_Win10.vue | 332 +++++ .../search/searchResult/SearchResult.vue | 123 +- ...OP-6MA514B_3月-31-231138-2023_Conflict.vue | 267 ++++ .../user/UserIndex-冲突-肖荣豪_Win10.vue | 309 ++++ src/views/user/UserIndex.vue | 64 +- 13 files changed, 2562 insertions(+), 387 deletions(-) create mode 100755 src/components/SearchBox-冲突-肖荣豪_Win10.vue create mode 100755 src/main-冲突-肖荣豪_Win10.js create mode 100755 src/utils/common-冲突-肖荣豪_Win10.js create mode 100755 src/views/detail/detailIndex-冲突-肖荣豪_Win10.vue create mode 100755 src/views/search/searchResult/SearchResult-冲突-肖荣豪_Win10.vue create mode 100755 src/views/search/searchResult/SearchResult_DESKTOP-6MA514B_3月-31-231138-2023_Conflict.vue create mode 100755 src/views/user/UserIndex-冲突-肖荣豪_Win10.vue diff --git a/src/components/SearchBox-冲突-肖荣豪_Win10.vue b/src/components/SearchBox-冲突-肖荣豪_Win10.vue new file mode 100755 index 0000000..8c121fb --- /dev/null +++ b/src/components/SearchBox-冲突-肖荣豪_Win10.vue @@ -0,0 +1,199 @@ + + + + + \ No newline at end of file diff --git a/src/components/SearchBox.vue b/src/components/SearchBox.vue index 8c121fb..29de112 100755 --- a/src/components/SearchBox.vue +++ b/src/components/SearchBox.vue @@ -30,7 +30,9 @@
热门搜索
- {{ item }} + Bocconi + Bocconi + Bocconi
@@ -47,7 +49,7 @@ export default { showClear: false, //显示清除按钮 } }, - props: ["issearch", "hotSearchkeywords"], + props: ["issearch"], methods: { collapseClick() { @@ -72,12 +74,7 @@ export default { // 清空文本框 clearText() { this.searchText = "" - }, - - // 跳转搜索结果 - toSearchResult(kw){ - this.$router.push(`/searchResult?kw=${kw}`) - }, + } }, mounted() { if (this.searchText.length > 0) this.showClear = true diff --git a/src/main-冲突-肖荣豪_Win10.js b/src/main-冲突-肖荣豪_Win10.js new file mode 100755 index 0000000..93b56bc --- /dev/null +++ b/src/main-冲突-肖荣豪_Win10.js @@ -0,0 +1,44 @@ +import Vue from 'vue' +import App from './App.vue' +import router from './router' +import store from './store' +import ElementUI, { Message, Pagination } from 'element-ui'; +import 'element-ui/lib/theme-chalk/index.css'; +import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate } from "@/utils/common.js" +import http from "@/utils/request" +import hintBox from '@/components/Hintbox' + +Vue.config.productionTip = false + +Vue.prototype.$baseURL = "https://forum.gter.net/api" // 请求接口的共 url +Vue.prototype.$loginUrl = "https://passport.gter.net/" // 跳转登录的url + +Vue.prototype.$http = http // 跳转登录页面的方法 +Vue.prototype.$skipUrl = skipUrl // 跳转页面的公共方法 +Vue.prototype.$goTologin = goTologin // 跳转登录页面的方法 +// 上面的顺序不要修改 + +Vue.prototype.$pageStop = pageStop // 页面禁止滑动 +Vue.prototype.$pageMove = pageMove // 页面可以滑动 +Vue.prototype.$Message = Message // 消息提示框 +Vue.prototype.$copy = copy // 复制 +Vue.prototype.$startupUnderLoading = startupUnderLoading // 开启加载提示 element的 +Vue.prototype.$closeUnderLoading = closeUnderLoading // 关闭加载提示 element的 +Vue.prototype.$formattedDate = formattedDate // 时间戳转格式 + +//svg文件引入 +import './icons' +//动态设置fontsize +import './utils/fontSize.js' + +//ElementUI +Vue.use(ElementUI); +Vue.use(Pagination); + + + +new Vue({ + router, + store, + render: h => h(App) +}).$mount('#app') diff --git a/src/main.js b/src/main.js index 93b56bc..1aa5434 100755 --- a/src/main.js +++ b/src/main.js @@ -4,9 +4,8 @@ import router from './router' import store from './store' import ElementUI, { Message, Pagination } from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; -import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate } from "@/utils/common.js" +import { skipUrl, pageStop, pageMove, goTologin, copy } from "@/utils/common.js" import http from "@/utils/request" -import hintBox from '@/components/Hintbox' Vue.config.productionTip = false @@ -22,9 +21,6 @@ Vue.prototype.$pageStop = pageStop // 页面禁止滑动 Vue.prototype.$pageMove = pageMove // 页面可以滑动 Vue.prototype.$Message = Message // 消息提示框 Vue.prototype.$copy = copy // 复制 -Vue.prototype.$startupUnderLoading = startupUnderLoading // 开启加载提示 element的 -Vue.prototype.$closeUnderLoading = closeUnderLoading // 关闭加载提示 element的 -Vue.prototype.$formattedDate = formattedDate // 时间戳转格式 //svg文件引入 import './icons' diff --git a/src/utils/common-冲突-肖荣豪_Win10.js b/src/utils/common-冲突-肖荣豪_Win10.js new file mode 100755 index 0000000..7ec7c9d --- /dev/null +++ b/src/utils/common-冲突-肖荣豪_Win10.js @@ -0,0 +1,75 @@ +// a标签 跳转 isblank 代表跳转新标签 +function skipUrl(url, isblank = true) { + console.log(); + let aTab = document.createElement("a"); + document.body.appendChild(aTab); + aTab.setAttribute("href", url); + if (isblank) aTab.setAttribute("target", "_blank"); + aTab.click(); +} + + +// 禁止页面滑动 +function pageStop() { + document.body.style.overflow = "hidden"; +} + +// 开启页面滑动 +function pageMove() { + document.body.style.overflow = ""; +} + +// 跳转登录 +function goTologin() { + let url = encodeURIComponent(location.href); + console.log(skipUrl); + skipUrl(`https://passport.gter.net/?referer=${url}`, false); +} + +// 点击复制 +function copy(value, message) { + // 创建一个新的输入元素 + let copyInput = document.createElement('input'); + // 将输入元素添加到文档的主体中 + document.body.appendChild(copyInput); + // 将输入元素的值设置为需要复制的URL + copyInput.setAttribute('value', value); + // 选择输入元素 + copyInput.select(); + // 使用clipboard API将所选文本复制到剪贴板 + navigator.clipboard.writeText(copyInput.value); + // 向用户显示成功消息 + // 从文档中删除动态创建的输入元素 + copyInput.remove(); + if (message) this.$message.success(message); + +} + + +// 启动加载中 +function startupUnderLoading(that) { + that.loading = that.$loading({ + lock: true, + text: '加载中...', + background: 'rgba(0, 0, 0, 0.7)' + }); +} + +// 关闭加载中 +function closeUnderLoading(that) { + that.loading.close(); +} + +// 时间戳 +function formattedDate(timestamp) { + const date = new Date(timestamp * 1000); + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + const hours = String(date.getHours()).padStart(2, '0') + const minutes = String(date.getMinutes()).padStart(2, '0'); + const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}`; + return formattedDate +} + +export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate } \ No newline at end of file diff --git a/src/utils/common.js b/src/utils/common.js index 7ec7c9d..d41c461 100755 --- a/src/utils/common.js +++ b/src/utils/common.js @@ -41,35 +41,10 @@ function copy(value, message) { // 向用户显示成功消息 // 从文档中删除动态创建的输入元素 copyInput.remove(); + if (message) this.$message.success(message); - + + } - -// 启动加载中 -function startupUnderLoading(that) { - that.loading = that.$loading({ - lock: true, - text: '加载中...', - background: 'rgba(0, 0, 0, 0.7)' - }); -} - -// 关闭加载中 -function closeUnderLoading(that) { - that.loading.close(); -} - -// 时间戳 -function formattedDate(timestamp) { - const date = new Date(timestamp * 1000); - const year = date.getFullYear(); - const month = String(date.getMonth() + 1).padStart(2, '0'); - const day = String(date.getDate()).padStart(2, '0'); - const hours = String(date.getHours()).padStart(2, '0') - const minutes = String(date.getMinutes()).padStart(2, '0'); - const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}`; - return formattedDate -} - -export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate } \ No newline at end of file +export { skipUrl, pageStop, pageMove, goTologin, copy } \ No newline at end of file diff --git a/src/views/detail/detailIndex-冲突-肖荣豪_Win10.vue b/src/views/detail/detailIndex-冲突-肖荣豪_Win10.vue new file mode 100755 index 0000000..4d8390e --- /dev/null +++ b/src/views/detail/detailIndex-冲突-肖荣豪_Win10.vue @@ -0,0 +1,1240 @@ + + + + + \ No newline at end of file diff --git a/src/views/detail/detailIndex.vue b/src/views/detail/detailIndex.vue index 4d8390e..23de242 100755 --- a/src/views/detail/detailIndex.vue +++ b/src/views/detail/detailIndex.vue @@ -4,24 +4,24 @@
版块:香港澳门台湾留学申请
- {{ info.views }} + 10378
- {{ info.replies }} + 16
-
精华
-
{{ info.typename }}
- {{ info.subject }} +
精华
+
生活贴士
+ 香港永久居民的申请步骤和过程
- -
+ +
@@ -34,101 +34,52 @@
- Offer 1 + Offer1 详情
-
-
-
- 申请学校 -
-
- 韦仕敦大学 -
-
-
-
- 学位 -
-
- MA -
-
-
-
- 专业 -
-
- Curriculum study -
-
-
- -
-
-
- 总结 - 详情 -
-
- guelph教授很好一直在帮忙催offer,现在uvic也出了口头offer,可能要纠结一下... - - mcgill拒了算是意料之中吧 - - ottawa没搞懂申请的thesis下来了course... - - calgary突然就来了offer,又陷入纠结了.. -
-
- 查看当前总结详情 + 查看当前捷报详情
- + -
+
- +
-
{{ info.author }}
-
{{ $formattedDate(info.dateline) }}
+
闫旭Mike
+
2022-7-6 14:56
楼主
- - +
- +
- +
@@ -240,6 +191,7 @@
+
@@ -265,6 +217,11 @@ export default { } }, + info: { + avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle", + likenum: 1 + }, + islogin: true, prepareLiskeState: false, prepareLiskeAnimateState: false, @@ -276,127 +233,15 @@ export default { ispostOfferLike: null, // 点击点赞提交状态 offerLikesumTimer: 0, // offer点赞累加定时器 offerLikesumAnimateTimer: 0, // offer点赞动画定时器 - listlist: [], - - tid: 0, // 帖子id - info: {}, - type: 0, // 定位帖 1 面经 2 租房帖 3 总结 5 捷报 6 - token: "", - offerinfo: {}, // offer捷报详情 - offerinfoKey: [{ - key: "schoolname", - name: "申请学校" - }, { - key: "degree", - name: "学位" - }, { - key: "professional", - name: "专业" - }, { - key: "project", - name: "项目" - }, { - key: "apply_results", - name: "申请结果" - }, { - key: "semester", - name: "入学学期" - }, { - key: "noticedate", - name: "通知时间" - }, { - key: "useperformanceStr", - name: "使用成绩" - }], - shareurl: "", // 分享链接 - collegelist: [],// 总结里的 offer 列表数据 - - + listlist: [] }; }, mounted() { - this.tid = this.$route.query['tid'] - this.getDetail() - }, methods: { - - // 获取详细信息 - getDetail() { - this.$http.post("/api/thread", { - tid: this.tid - }).then(res => { - if (res.code != 200) return - - let data = res.data - console.log("data", data); - this.info = data.info - this.type = data.type - this.token = data.token - - if (this.type == 6) this.getOfferDetail() - else if (this.type == 5) this.getsummaryDetails() - - }) - }, - - // 获取offer详情 - getOfferDetail() { - this.$http.post("/api/details", { - token: this.token - }, 'offer').then(res => { - let data = res.data - let offerinfo = data.offerinfo - let useperformanceStr = "" - offerinfo.useperformance && offerinfo.useperformance.forEach((el, index) => { - useperformanceStr += el + (offerinfo.useperformance.length - 1 == index ? '' : '、') - }) - - offerinfo['useperformanceStr'] = useperformanceStr - offerinfo['schoolname'] = offerinfo.school.name - - this.offerinfo = offerinfo - this.shareurl = data.shareurl - }) - }, - - // 获取总结详情 - getsummaryDetails() { - this.$http.get(`/api/forum/details`, { - id: this.token - }, 'offer').then(res => { - let data = res.data - // console.log("data", data); - let collegelist = data.collegelist - console.log(collegelist); - - // console.log("offercollege", offercollege); - - collegelist.forEach((el, index) => { - let useperformanceStr = "" - el.useperformance && el.useperformance.forEach((el, index) => { - console.log(el); - // useperformanceStr += el + (el.useperformance.length - 1 == index ? '' : '、') - }) - el['useperformanceStr'] = useperformanceStr - - }) - - // let useperformanceStr = "" - // offerinfo.useperformance && offerinfo.useperformance.forEach((el, index) => { - // useperformanceStr += el + (offerinfo.useperformance.length - 1 == index ? '' : '、') - // }) - - // offerinfo['useperformanceStr'] = useperformanceStr - console.log(collegelist); - - this.collegelist = collegelist - this.shareurl = data.shareurl - }) - }, - + // 点击点赞 // 点击点赞 tapLike() { @@ -771,7 +616,6 @@ export default { .summary-content-item { border-radius: .16rem; border: .0133rem solid rgba(235, 235, 235, 1); - margin-bottom: .32rem; .summary-offer-head { justify-content: space-between; @@ -799,38 +643,6 @@ export default { } - .summary-offer-box { - padding-top: .28rem; - flex-direction: column; - justify-items: center; - - .summary-offer-item { - line-height: .6rem; - padding: 0 .24rem; - box-sizing: border-box; - margin-bottom: .2rem; - - .summary-offer-key { - width: 1.3rem; - color: #7f7f7f; - font-size: .32rem; - margin-right: .74rem; - } - - .summary-offer-value { - font-size: .36rem; - color: #333; - } - } - } - - .summary-wenzi { - color: #333; - font-size: .32rem; - line-height: .6rem; - padding: .28rem .24rem; - } - } } diff --git a/src/views/search/searchResult/SearchResult-冲突-肖荣豪_Win10.vue b/src/views/search/searchResult/SearchResult-冲突-肖荣豪_Win10.vue new file mode 100755 index 0000000..7733e26 --- /dev/null +++ b/src/views/search/searchResult/SearchResult-冲突-肖荣豪_Win10.vue @@ -0,0 +1,332 @@ + + + + + diff --git a/src/views/search/searchResult/SearchResult.vue b/src/views/search/searchResult/SearchResult.vue index 7733e26..695b1af 100755 --- a/src/views/search/searchResult/SearchResult.vue +++ b/src/views/search/searchResult/SearchResult.vue @@ -4,61 +4,64 @@
- - + +
取消
-
大约找到
{{ count }}
条结果
+
大约找到
{{ 800 }}
条结果
-
-
+
+
-
{{ item.forum }}
- -
+
租房租房租房
+
诚招室友一起合租香港大学附近房子 女生
-
+
+ -
+
+ 回复可见 +
+
+ + +
-
{{ item.views }}
+
1552
-
{{ item.replies }}
+
12
-
+
精华
+
-
- -
- -
- +
+
@@ -70,33 +73,13 @@ export default { name: "SearchResult", data() { return { - kw: "", - count: 0, - limit: 4, - nextpage: true, - page: 1, - list: [], - searchResultState: false, - loading: null + } }, components: { }, - mounted() { - this.kw = this.$route.query.kw - this.getSearchResult() - }, - - watch: { - searchResultState(val, oldval) { - if (val) this.$startupUnderLoading(this) - else this.$closeUnderLoading(this) - } - }, - - methods: { // 处理点击取消的返回上一页 handCancel() { @@ -104,39 +87,6 @@ export default { if (this.$route.params.page > 1) this.$router.go(-1) else this.$router.push('/recommend') }, - - // 获取搜索结果数据 - getSearchResult() { - if (this.searchResultState) return - this.searchResultState = true - this.$http.post("/api/search", { - keyword: this.kw, - page: this.page, - limit: this.limit - }).then(res => { - console.log(res, "res"); - let data = res.data - this.list = data.data - this.count = data.count - - document.documentElement.scrollTop = 0; - document.body.scrollTop = 0; - this.searchResultState = false - }) - }, - - // 点击改变页数 - currentChange() { - this.getSearchResult() - }, - - - - // 点击清空 input 的值 - emptyKw() { - this.kw = "" - }, - }, } @@ -144,7 +94,6 @@ export default { diff --git a/src/views/search/searchResult/SearchResult_DESKTOP-6MA514B_3月-31-231138-2023_Conflict.vue b/src/views/search/searchResult/SearchResult_DESKTOP-6MA514B_3月-31-231138-2023_Conflict.vue new file mode 100755 index 0000000..03656f4 --- /dev/null +++ b/src/views/search/searchResult/SearchResult_DESKTOP-6MA514B_3月-31-231138-2023_Conflict.vue @@ -0,0 +1,267 @@ + + + + + diff --git a/src/views/user/UserIndex-冲突-肖荣豪_Win10.vue b/src/views/user/UserIndex-冲突-肖荣豪_Win10.vue new file mode 100755 index 0000000..a8153eb --- /dev/null +++ b/src/views/user/UserIndex-冲突-肖荣豪_Win10.vue @@ -0,0 +1,309 @@ + + + + + \ No newline at end of file diff --git a/src/views/user/UserIndex.vue b/src/views/user/UserIndex.vue index a8153eb..8684d87 100755 --- a/src/views/user/UserIndex.vue +++ b/src/views/user/UserIndex.vue @@ -2,24 +2,24 @@
- +
-
{{ user.nickname }}
+
{{ info.nickname }}
-
{{ count.prestige }}
+
279
声望
-
{{ count.gtercurrency }}
-
寄托币
+
279
+
声望
-
{{ count.digest }}
-
精华
+
279
+
声望
@@ -29,8 +29,8 @@ 消息
-
{{ count.message }}
-
{{ user.messagenum }}
+
{{ count.collect }}
+
{{ 1 }}
@@ -40,7 +40,7 @@ 收藏
-
{{ count.fav }}
+
{{ count.creation }}
@@ -49,7 +49,7 @@ 发帖
-
{{ count.post }}
+
{{ count.likearticle }}
@@ -58,7 +58,7 @@ 回帖
-
{{ count.reply }}
+
{{ count.comment }}
@@ -70,6 +70,7 @@ 个人资料
+
{{ count.creation }}
@@ -78,6 +79,7 @@ 设置头像
+
{{ count.likearticle }}
@@ -86,6 +88,7 @@ 我的状态
+
{{ count.comment }}
@@ -94,6 +97,7 @@ 修改密码
+
{{ count.comment }}
@@ -102,6 +106,7 @@ 绑定邮箱
+
{{ count.comment }}
@@ -110,6 +115,7 @@ 绑定手机
+
{{ count.comment }}
@@ -118,6 +124,7 @@ 绑定第三方账号
+
{{ count.comment }}
@@ -126,6 +133,7 @@ 浏览个人主页
+
{{ count.comment }}
@@ -133,7 +141,7 @@ -
退出登录
+
退出登录
@@ -144,36 +152,26 @@ export default { data() { return { - user: { - avatar: "", - nickname: "", - messagenum: 0 + info: { + avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle", + nickname: "Ada.Wu" + }, + count: { + collect: 10, + creation: 10, + likearticle: 10, + comment: 10, }, - count: {}, }; }, mounted() { - this.init() + }, methods: { - init() { - this.$http.post("/api/user", "").then(res => { - console.log(res, "res"); - let data = res.data - this.count = data.count - this.user = data.user - console.log(this.count); - }) - }, - - // 点击退出登录 - logOut() { - console.log("点击退出登录"); - }, }, };