no message

This commit is contained in:
A1300399510
2025-10-28 10:01:48 +08:00
parent 6bb48ff86d
commit 89703bf025
11 changed files with 283 additions and 3 deletions

View File

@@ -0,0 +1,38 @@
// my-component.js
// 引入全局 Vue 对象(因在 HTML 中通过 script 引入Vue 已挂载到 window
const { defineComponent, ref } = Vue;
import { itemBottom } from "../item-bottom/item-bottom.js";
import { itemHead } from "../item-head/item-head.js";
// 定义组件(直接使用模板)
export const itemMj = defineComponent({
name: "item-mj",
props: {
itemdata: {
type: Object,
default: () => {},
},
},
setup(props) {
let item = ref({ ...props.itemdata });
// item.value.title = "【投41票】" + item.value.title;
// res["timestamp"] = util.strtimeago(res.release_at, 4);
// const data = res.data;
// const option = data.option || [];
// res["isvote"] = option.some((item) => item.selected == 1);
// const time = util.handleDeadline(data.deadline);
// res["time"] = time;
// this.setData({
// item: res,
// });
return { item };
},
components: {
itemBottom,
itemHead,
},
template: `<div class="item-box item-mj"> <item-head :itemdata="item"></item-head> <div class="school flexacenter"> <img class="icon" :src="item.data.schoollogo" mode="heightFix"></image> <div class="text flex1 one-line-display">{{ item.data.schoolname }}</div> </div> <div class="major flexacenter" v-if="item.data.professional"> <div class="key">{{ item.data.project ? '专业' : '项目/专业' }}</div> <div class="value flex1 one-line-display">{{ item.data.professional }}</div> </div> <div class="major flexacenter" v-if="item.data.project"> <div class="key">项目</div> <div class="value flex1 one-line-display">{{ item.data.project }}</div> </div> <div class="major flexacenter" v-if="item.data.interviewtime"> <div class="key">面试</div> <div class="value time flex1 one-line-display">{{ item.data.interviewtime }}</div> </div> <div class="message" v-if="item.content">{{ item.content }}</div> <item-bottom :itemdata="item"></item-bottom></div>`,
});

View File

@@ -0,0 +1,26 @@
<div class="item-box item-mj">
<item-head :itemdata="item"></item-head>
<div class="school flexacenter">
<img class="icon" :src="item.data.schoollogo" mode="heightFix"></image>
<div class="text flex1 one-line-display">{{ item.data.schoolname }}</div>
</div>
<div class="major flexacenter" v-if="item.data.professional">
<div class="key">{{ item.data.project ? '专业' : '项目/专业' }}</div>
<div class="value flex1 one-line-display">{{ item.data.professional }}</div>
</div>
<div class="major flexacenter" v-if="item.data.project">
<div class="key">项目</div>
<div class="value flex1 one-line-display">{{ item.data.project }}</div>
</div>
<div class="major flexacenter" v-if="item.data.interviewtime">
<div class="key">面试</div>
<div class="value time flex1 one-line-display">{{ item.data.interviewtime }}</div>
</div>
<div class="message" v-if="item.content">{{ item.content }}</div>
<item-bottom :itemdata="item"></item-bottom>
</div>

View File

@@ -0,0 +1,38 @@
// my-component.js
// 引入全局 Vue 对象(因在 HTML 中通过 script 引入Vue 已挂载到 window
const { defineComponent, ref } = Vue;
import { itemBottom } from "../item-bottom/item-bottom.js";
import { itemHead } from "../item-head/item-head.js";
// 定义组件(直接使用模板)
export const itemTenement = defineComponent({
name: "item-tenement",
props: {
itemdata: {
type: Object,
default: () => {},
},
},
setup(props) {
let item = ref({ ...props.itemdata });
// item.value.title = "【投41票】" + item.value.title;
// res["timestamp"] = util.strtimeago(res.release_at, 4);
// const data = res.data;
// const option = data.option || [];
// res["isvote"] = option.some((item) => item.selected == 1);
// const time = util.handleDeadline(data.deadline);
// res["time"] = time;
// this.setData({
// item: res,
// });
return { item };
},
components: {
itemBottom,
itemHead,
},
template: `<div class="item-box item-vote"> <item-head :itemdata="item"></item-head> <div class="title">{{ item.title }}</div> <div class="message one-line-display" v-if="item.content">{{ item.content }}</div> <div class="info flexacenter"> <template v-if="item.time"> <div class="status">进行中</div> <div class="line"></div> <div class="num">{{ item?.time.num }}</div>{{ item.time.unit }}后结束 </template> <div v-else class="status end">已结束</div> <div class="line"></div> <div class="num">{{ item?.data?.votes }}</div>人参与 </div> <div class="list" :class="{ 'voted': !item.time || item.isvote }"> <div class="list-item flexcenter " v-for="(item, index) in item?.data?.option" :key="index"> <div class="list-top flexacenter"> <img v-if="item.selected" class="list-tick" src="/img/vote-tick.svg"> <div v-else class="list-serial flexcenter">{{ index + 1 }}</div> <div class="list-text one-line-display flex1">{{ item.value }}</div> </div> <div class="list-bottom flexacenter"> <div class="list-length" :style="{ width: item.percentage + '%' }"></div>{{ item.count }} </div> </div> </div> <item-bottom :itemdata="item"></item-bottom></div>`,
});

View File

@@ -0,0 +1,5 @@
<div class="item-box item-tenement">
<item-head :itemdata="item"></item-head>
<!-- <div class="title">{{ item.title }}</div> -->
<item-bottom :itemdata="item"></item-bottom>
</div>

View File

@@ -375,6 +375,7 @@ body {
border-radius: 12px;
color: #333333;
cursor: pointer;
font-size: 15px;
}
#homepage-other .matter .matter-content .list-area .classify .item.pitch {
background-color: #d35110;

View File

@@ -430,6 +430,7 @@ body {
border-radius: 12px;
color: #333333;
cursor: pointer;
font-size: 15px;
&.pitch {
background-color: rgba(211, 81, 16, 1);

View File

@@ -358,6 +358,43 @@ body {
border-radius: 66px;
margin-right: 6px;
}
.item-box.item-mj .school {
height: 45px;
border-bottom: 1px dotted #d7d7d7;
}
.item-box.item-mj .school .icon {
height: 20px;
margin-right: 10px;
}
.item-box.item-mj .school .text {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 20px;
color: #000000;
line-height: 36px;
}
.item-box.item-mj .major {
height: 45px;
border-bottom: 1px dotted #d7d7d7;
}
.item-box.item-mj .major .key {
font-size: 14px;
color: #7f7f7f;
margin-right: 20px;
}
.item-box.item-mj .major .time {
font-family: "Arial-BoldMT", "Arial Bold", "Arial", sans-serif;
font-weight: 700;
font-style: normal;
font-size: 14px;
color: #026277;
}
.item-box.item-mj .message {
margin-top: 13px;
font-size: 14px;
color: #555555;
}
.item-box .comment {
height: 40px;
background-color: #f6f6f6;
@@ -375,7 +412,6 @@ body {
color: #7f7f7f;
}
.item-box .bottom {
margin-top: 15px;
height: 55px;
justify-content: flex-end;
}

View File

@@ -365,7 +365,7 @@ body {
&.voted {
max-height: 178px;
.list-item {
height: 75px;
@@ -432,6 +432,50 @@ body {
}
}
&.item-mj {
.school {
height: 45px;
border-bottom: 1px dotted #d7d7d7;
.icon {
height: 20px;
margin-right: 10px;
}
.text {
font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif;
font-weight: 650;
font-style: normal;
font-size: 20px;
color: #000000;
line-height: 36px;
}
}
.major {
height: 45px;
border-bottom: 1px dotted #d7d7d7;
.key {
font-size: 14px;
color: #7f7f7f;
margin-right: 20px;
}
.time {
font-family: "Arial-BoldMT", "Arial Bold", "Arial", sans-serif;
font-weight: 700;
font-style: normal;
font-size: 14px;
color: #026277;
}
}
.message {
margin-top: 13px;
font-size: 14px;
color: #555555;
}
}
.comment {
height: 40px;
background-color: rgba(246, 246, 246, 1);
@@ -452,7 +496,7 @@ body {
}
.bottom {
margin-top: 15px;
// margin-top: 15px;
height: 55px;
justify-content: flex-end;

View File

@@ -156,6 +156,8 @@
<item-offer v-if=" item.type == 'offer'" :item="item"></item-offer>
<item-summary v-else-if="item.type == 'offer_summary'" :item="item"></item-summary>
<item-vote v-else-if="item.type == 'vote'" :itemdata="item"></item-vote>
<item-mj v-else-if="item.type == 'interviewexperience'" :itemdata="item"></item-mj>
<item-tenement v-else-if="item.type == 'tenement'" :itemdata="item"></item-tenement>
<item-forum v-else :item="item"></item-forum>
</template>
</div>

View File

@@ -3,12 +3,95 @@ import { itemForum } from "../component/item-forum/item-forum.js";
import { itemOffer } from "../component/item-offer/item-offer.js";
import { itemSummary } from "../component/item-summary/item-summary.js";
import { itemVote } from "../component/item-vote/item-vote.js";
import { itemMj } from "../component/item-mj/item-mj.js";
import { itemTenement } from "../component/item-tenement/item-tenement.js";
const appSectionIndex = createApp({
setup() {
let signInAlreadyState = ref(false);
let list = ref([
{
id: 292079,
uniqid: "KvvbW0CeePje",
subject: "佐敦文華小氣窗套房近柯士甸及高鐵獨立廚廁超方便歡迎微信tamama228了解!",
location: "2.2",
acreage: "80",
updatetime: 1761106924,
status: 1,
dingtime: 1761099519,
count_view: 675,
count_fav: 13,
elevator: 1,
point: "114.171951,22.304155",
sunshinearea: -1,
rent: 5000,
verified: 0,
isintermediary: 0,
rentalduration: "0",
rentalperiod: "月",
avatar: "https://nas.gter.net:9008/avatar/97K4EWIMLrsbGTWXslW1W1VREKfc2UhyiGPAJp6yZRCGcttjKcbNR8lQYWFjYQ~~/mini",
gptype: "整租",
type: "tenement",
intermediary: 5,
leaseterm: 2,
gender: 3,
property: "2",
imageurl: "https://o.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c_p0kd3nqqsgFptxhXa6SWi2uePJ5Bg8VFrPIvsEG-4BUCm7F7lfn5E5jtX0K_tdQgQ_5bap6c_Ca1y5p6TdLOeCoNKSSNDQyOQ~~",
nickname: "葉拳",
position: 1,
isvideo: 1,
isnew: 0,
ispic: 1,
ishot: 0,
timestamp: 1729393074,
tenementtype: "2.1",
},
{
role: {
allow: true,
},
uniqid: "bWSf4CODWyvr",
title: "",
type: "interviewexperience",
content: "皇家兽医学院与专业深度解析",
release_at: "2025-08-21 22:51:38",
sectionid: [19],
sectionn: ["其它学科"],
tags: ["其它学科", "农学类", "经验分享", "英国-英格兰", "面试经验", "申请准备", "2025", "英国皇家兽医学院"],
views: 115,
comments: 0,
commentreviews: [],
likes: 0,
collections: 0,
is_like: 0,
is_collect: 0,
coins: 0,
best: 0,
recommend: 0,
sticky: 0,
anonymous: 0,
ismyself: 0,
data: {
profession: "",
interviewtime: "2025-08-21",
schoolid: 215,
schoolname: "英国皇家兽医学院",
schoolenname: "Royal Veterinary College",
schoollogo: "https://o.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-W_Z0kcn_qqsgFptxhXa6RWi26P-BuTQ0SHbbD4tkb8LQ0NDI5",
city: "英国-英格兰",
project: "皇家兽医",
},
user: {
nickname: "HKHv记录",
avatar: "https://nas.gter.net:9008/avatar/97K4EWIMLrsbGTWXslC2X11UFquOikN42jDKLNjtax7HdN4xe5LWSdU9oWFhY2E~/small",
groupid: 0,
groupimage: "",
grouptitle: "",
},
images: [],
token: "en86azwTjR4YSyZgAyynGOErZRShukBB6Lh2H1w_LEcLuh2MWfRxeNHNxGXK5Wo-Cl_HtrYKD7hvu66t7-lvTWyhbqLDZGE5NQ~~",
},
{
anonymous: 1,
best: 0,
@@ -1394,5 +1477,7 @@ appSectionIndex.component("itemForum", itemForum);
appSectionIndex.component("itemOffer", itemOffer);
appSectionIndex.component("itemSummary", itemSummary);
appSectionIndex.component("itemVote", itemVote);
appSectionIndex.component("itemMj", itemMj);
appSectionIndex.component("itemTenement", itemTenement);
appSectionIndex.mount("#homepage-other");

View File

@@ -15,6 +15,10 @@ const watchList = {
"../component/item-summary/item-summary.txt": "../component/item-summary/item-summary.js",
// 监听 item-vote.txt同步到 item-vote.js
"../component/item-vote/item-vote.txt": "../component/item-vote/item-vote.js",
// 监听 item-mj.txt同步到 item-mj.js
"../component/item-mj/item-mj.txt": "../component/item-mj/item-mj.js",
// 监听 item-tenement.txt同步到 item-tenement.js
"../component/item-tenement/item-tenement.txt": "../component/item-tenement/item-tenement.js",
// 可添加更多文件(格式:'txt路径': 'js路径'
// './component/other/other.txt': './component/other/other.js',
};