a1300399510@qq.com 提交于 2023/04/04 -12:00:01
This commit is contained in:
parent
a0cfdaa4a3
commit
8dc77f9181
@ -4,7 +4,7 @@ import router from './router'
|
|||||||
import store from './store'
|
import store from './store'
|
||||||
import ElementUI, { Message, Pagination } from 'element-ui';
|
import ElementUI, { Message, Pagination } from 'element-ui';
|
||||||
import 'element-ui/lib/theme-chalk/index.css';
|
import 'element-ui/lib/theme-chalk/index.css';
|
||||||
import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading } from "@/utils/common.js"
|
import { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate } from "@/utils/common.js"
|
||||||
import http from "@/utils/request"
|
import http from "@/utils/request"
|
||||||
import hintBox from '@/components/Hintbox'
|
import hintBox from '@/components/Hintbox'
|
||||||
|
|
||||||
@ -22,8 +22,9 @@ Vue.prototype.$pageStop = pageStop // 页面禁止滑动
|
|||||||
Vue.prototype.$pageMove = pageMove // 页面可以滑动
|
Vue.prototype.$pageMove = pageMove // 页面可以滑动
|
||||||
Vue.prototype.$Message = Message // 消息提示框
|
Vue.prototype.$Message = Message // 消息提示框
|
||||||
Vue.prototype.$copy = copy // 复制
|
Vue.prototype.$copy = copy // 复制
|
||||||
Vue.prototype.$startupUnderLoading = startupUnderLoading // 复制
|
Vue.prototype.$startupUnderLoading = startupUnderLoading // 开启加载提示 element的
|
||||||
Vue.prototype.$closeUnderLoading = closeUnderLoading // 复制
|
Vue.prototype.$closeUnderLoading = closeUnderLoading // 关闭加载提示 element的
|
||||||
|
Vue.prototype.$formattedDate = formattedDate // 时间戳转格式
|
||||||
|
|
||||||
//svg文件引入
|
//svg文件引入
|
||||||
import './icons'
|
import './icons'
|
||||||
|
@ -41,10 +41,8 @@ function copy(value, message) {
|
|||||||
// 向用户显示成功消息
|
// 向用户显示成功消息
|
||||||
// 从文档中删除动态创建的输入元素
|
// 从文档中删除动态创建的输入元素
|
||||||
copyInput.remove();
|
copyInput.remove();
|
||||||
|
|
||||||
if (message) this.$message.success(message);
|
if (message) this.$message.success(message);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,5 +60,16 @@ function closeUnderLoading(that) {
|
|||||||
that.loading.close();
|
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 }
|
export { skipUrl, pageStop, pageMove, goTologin, copy, startupUnderLoading, closeUnderLoading, formattedDate }
|
@ -101,7 +101,7 @@
|
|||||||
<img class="card-head-icon" :src="info.avatar" />
|
<img class="card-head-icon" :src="info.avatar" />
|
||||||
<div class="card-head-content flex1 flexflex">
|
<div class="card-head-content flex1 flexflex">
|
||||||
<div class="card-head-name flexflex">{{ info.author }}</div>
|
<div class="card-head-name flexflex">{{ info.author }}</div>
|
||||||
<div class="card-head-time">2022-7-6 14:56</div>
|
<div class="card-head-time">{{ $formattedDate(info.dateline) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-head-fool">楼主</div>
|
<div class="card-head-fool">楼主</div>
|
||||||
</div>
|
</div>
|
||||||
@ -120,7 +120,7 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a class="examine-btn flexcenter" target="_blank" :href="shareurl">
|
<a class="examine-btn flexcenter" :href="shareurl">
|
||||||
查看当前捷报详情
|
查看当前捷报详情
|
||||||
<div class="examine-btn-outside flexcenter">
|
<div class="examine-btn-outside flexcenter">
|
||||||
<svg-icon icon-class="arrowsRoundBlackLeft" class-name="examine-btn-icon"></svg-icon>
|
<svg-icon icon-class="arrowsRoundBlackLeft" class-name="examine-btn-icon"></svg-icon>
|
||||||
@ -334,16 +334,16 @@ export default {
|
|||||||
this.type = data.type
|
this.type = data.type
|
||||||
this.token = data.token
|
this.token = data.token
|
||||||
|
|
||||||
if (this.type == 6) {
|
if (this.type == 6) this.getOfferDetail()
|
||||||
this.getOfferDetail()
|
else if (this.type == 5) this.getsummaryDetails()
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取offer详情
|
// 获取offer详情
|
||||||
getOfferDetail() {
|
getOfferDetail() {
|
||||||
this.$http.post("/api/details", {
|
this.$http.post("/api/details", {
|
||||||
token: "aKpet3Y6LVE50g0a1TMJ9CO_fWeZORk7ZswsZAkMwwupQ2lbtcsjmX1np5mUmPKVla8FzCF8ZNJySac3tX-r8ULfxTS6S4Grt_SaX84Tov9BHHh9L568EHRR9CMIbYIOQI76V-jgTuur3qck0L4lAvgbcwSi5c9MUS5qI7zXYMklqBguz5n0Fgy794uePqhF_W9PwA0IQwGuLWIcvSZ8RqrhUM4cadRC4TgxN2Mx"
|
token: this.token
|
||||||
}, 'offer').then(res => {
|
}, 'offer').then(res => {
|
||||||
let data = res.data
|
let data = res.data
|
||||||
let offerinfo = data.offerinfo
|
let offerinfo = data.offerinfo
|
||||||
@ -358,12 +358,26 @@ export default {
|
|||||||
|
|
||||||
offerinfo['schoolName'] = offerinfo.school.name
|
offerinfo['schoolName'] = offerinfo.school.name
|
||||||
|
|
||||||
|
|
||||||
this.offerinfo = offerinfo
|
this.offerinfo = offerinfo
|
||||||
this.shareurl = data.shareurl
|
this.shareurl = data.shareurl
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 获取总结详情
|
||||||
|
getsummaryDetails() {
|
||||||
|
this.$http.post("/api/details/summary", {
|
||||||
|
token: this.token
|
||||||
|
}, 'offer').then(res => {
|
||||||
|
let data = res.data
|
||||||
|
let offercollege = data.offercollege
|
||||||
|
|
||||||
|
console.log("offercollege", offercollege);
|
||||||
|
|
||||||
|
|
||||||
|
this.shareurl = data.shareurl
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 点击点赞
|
// 点击点赞
|
||||||
tapLike() {
|
tapLike() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user