no message
This commit is contained in:
parent
8d7f8813a7
commit
25fdbdcb10
@ -182,11 +182,26 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
let documents_required = ""
|
const documentsData = [];
|
||||||
element.documents.forEach(ele => {
|
const documentsMap = new Map();
|
||||||
documents_required += `- ${ele.document_zh}:${ele.description_zh} \n`;
|
element.documents.forEach((item) => {
|
||||||
})
|
const key = `${item.document_id}-${item.is_required}`;
|
||||||
element['documents_required'] = documents_required
|
if (documentsMap.has(key)) {
|
||||||
|
const existingItem = documentsMap.get(key);
|
||||||
|
existingItem.details += `\n${item.details}`;
|
||||||
|
} else {
|
||||||
|
const newItem = {
|
||||||
|
...item
|
||||||
|
};
|
||||||
|
documentsMap.set(key, newItem);
|
||||||
|
documentsData.push(newItem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let documents_required = "";
|
||||||
|
documentsData.forEach((ele) => {
|
||||||
|
documents_required += `・ ${ele.document_zh}:\n${ele.details} \n`;
|
||||||
|
});
|
||||||
|
element["documents_required"] = documents_required;
|
||||||
|
|
||||||
element['entrance_requirements'] = element.admission_requirements[0]['basic_requirements']
|
element['entrance_requirements'] = element.admission_requirements[0]['basic_requirements']
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ Page({
|
|||||||
|
|
||||||
// 拿到 招生 选中信息
|
// 拿到 招生 选中信息
|
||||||
getAdmissionsObj(id) {
|
getAdmissionsObj(id) {
|
||||||
const admissionsObj = this.data.admissions.find(item => item.id === id);
|
const admissionsObj = this.data.admissions.find(item => item.id === id) || {}
|
||||||
if (admissionsObj.leaflet_url) {
|
if (admissionsObj.leaflet_url) {
|
||||||
const leaflet_url = decodeURIComponent(admissionsObj.leaflet_url)
|
const leaflet_url = decodeURIComponent(admissionsObj.leaflet_url)
|
||||||
const urlWithoutParams = leaflet_url.split('?')[0];
|
const urlWithoutParams = leaflet_url.split('?')[0];
|
||||||
@ -438,9 +438,26 @@ Page({
|
|||||||
|
|
||||||
// 处理 文件数据
|
// 处理 文件数据
|
||||||
handleDocumentsData(documents) {
|
handleDocumentsData(documents) {
|
||||||
|
const mergedData = [];
|
||||||
|
const map = new Map();
|
||||||
|
|
||||||
|
documents.forEach((item) => {
|
||||||
|
const key = `${item.document_id}-${item.is_required}`;
|
||||||
|
if (map.has(key)) {
|
||||||
|
const existingItem = map.get(key);
|
||||||
|
existingItem.details += `\n${item.details}`;
|
||||||
|
} else {
|
||||||
|
const newItem = {
|
||||||
|
...item
|
||||||
|
};
|
||||||
|
map.set(key, newItem);
|
||||||
|
mergedData.push(newItem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const documentsArr = [];
|
const documentsArr = [];
|
||||||
for (let i = 0; i < documents.length; i += 4) {
|
for (let i = 0; i < mergedData.length; i += 4) {
|
||||||
documentsArr.push(documents.slice(i, i + 4));
|
documentsArr.push(mergedData.slice(i, i + 4));
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
documents: documentsArr,
|
documents: documentsArr,
|
||||||
@ -777,9 +794,7 @@ Page({
|
|||||||
sideNum,
|
sideNum,
|
||||||
offerPage: data.count > data.limit * data.page ? this.data.offerPage + 1 : 0,
|
offerPage: data.count > data.limit * data.page ? this.data.offerPage + 1 : 0,
|
||||||
}, () => {
|
}, () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => this.getHeadHeight(), 500)
|
||||||
this.getHeadHeight()
|
|
||||||
}, 500)
|
|
||||||
})
|
})
|
||||||
}).finally(() => this.offerLoading = false)
|
}).finally(() => this.offerLoading = false)
|
||||||
},
|
},
|
||||||
@ -801,9 +816,7 @@ Page({
|
|||||||
offerShowList: offerShowList.concat(list),
|
offerShowList: offerShowList.concat(list),
|
||||||
offerPage: endIndex >= allList.length ? 0 : offerPage + 1,
|
offerPage: endIndex >= allList.length ? 0 : offerPage + 1,
|
||||||
}, () => {
|
}, () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => this.getHeadHeight(), 500)
|
||||||
this.getHeadHeight()
|
|
||||||
}, 500)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const request = () => {
|
const request = () => {
|
||||||
|
@ -189,7 +189,8 @@ Page({
|
|||||||
key: "school",
|
key: "school",
|
||||||
pitch: "school",
|
pitch: "school",
|
||||||
list: this.data.universitydepartment,
|
list: this.data.universitydepartment,
|
||||||
}
|
},
|
||||||
|
sortIndex: 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,13 @@
|
|||||||
"condition": {
|
"condition": {
|
||||||
"miniprogram": {
|
"miniprogram": {
|
||||||
"list": [
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "pages/projectDetails/projectDetails",
|
||||||
|
"pathName": "pages/projectDetails/projectDetails",
|
||||||
|
"query": "uniqid=ayPLvLzbaf8K",
|
||||||
|
"launchMode": "default",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "pages/projectDetails/projectDetails",
|
"name": "pages/projectDetails/projectDetails",
|
||||||
"pathName": "pages/projectDetails/projectDetails",
|
"pathName": "pages/projectDetails/projectDetails",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user