修改项目库bug

This commit is contained in:
DESKTOP-RQ919RC\Pc 2025-04-02 19:01:32 +08:00
parent f5f6545c95
commit 8d7f8813a7
12 changed files with 58 additions and 118 deletions

View File

@ -90,6 +90,7 @@
.hint {
font-size: 24rpx;
color: #555555;
white-space: pre-line;
}
}
}

View File

@ -73,6 +73,7 @@
.file .file-list .file-item .hint {
font-size: 24rpx;
color: #555555;
white-space: pre-line;
}
.file .pilot {
margin-top: 24rpx;

View File

@ -126,7 +126,7 @@ Page({
res.forEach(element => list.push(element.status === "fulfilled" ? element.value : {}));
list.forEach(element => {
element['result_date'] = element['admissions'][0].result_time
element['result_date'] = element['admissions']?.[0]?.result_time
if (element.accreditations) {
element['accreditation'] = ""
@ -149,30 +149,33 @@ Page({
if (el.type == "test") {
el.tests.forEach((e) => {
let text = "";
if (e.grade && e.grade == "Pass") text = `等级 ${e.grade}`;
if (["GMAT", "GMAT Focus Edition"].includes(e.test_name)) text = `Verbal Reasoning ${e.min_score} 分以上`;
else if (e.grade && e.grade == "Pass") text = `等级 ${e.grade}`;
else if (e.grade) text = `等级 ${e.grade} 以上`;
else if (e.min_score) text = `总分 ${e.min_score} 分以上`;
if (e.sub_scores.length > 0) {
let data = e.sub_scores;
const firstScore = data[0].score;
else if (e.sub_scores.length > 0) {
let allEqual = true;
let nonEqualSubject;
let nonEqualScore;
e.sub_scores.forEach((ee) => {
if (ee.score != e.sub_scores[0].score) allEqual = false;
});
for (let i = 1; i < data.length; i++) {
if (data[i].score !== firstScore) {
allEqual = false;
nonEqualSubject = data[i].subject;
nonEqualScore = data[i].score;
break;
}
}
const fields = {
Total: "总分",
Reading: "阅读",
Speaking: "口语",
Writing: "写作",
Listening: "听力",
};
if (allEqual) text += `,各项分数不低于 ${firstScore}`;
else text += `,各项分数不低于 ${firstScore} 分, ${nonEqualSubject}不低于${nonEqualScore}`;
if (allEqual) text = `总分 ${e.min_score} 分以上,各项分数不低于 ${e.sub_scores[0].score}`;
else {
e.sub_scores.forEach((ee) => {
if (fields[ee.subject] && ee.score) text += `${fields[ee.subject]} ${ee.score} 分以上、`;
});
if (text.endsWith("、")) text = text.slice(0, -1);
}
} else if (e.min_score) text = `总分 ${e.min_score} 分以上`;
element["english_proficiency_text"] += `${e.test_name}${text} \n`;
// element["english_proficiency_text"] += `・${e.test_name}:总分${e.min_score}分以上; \n`;
});
}
})

View File

@ -92,25 +92,6 @@ navigator {
white-space: pre-line;
}
.mode6 {
padding: 18rpx 15rpx 0;
.mode6-item {
.name {
font-size: 24rpx;
color: #333333;
margin-bottom: 6rpx;
}
.english {
font-size: 21rpx;
color: #7F7F7F;
margin-bottom: 18rpx;
}
}
}
.mode7 {
flex-direction: column;
padding: 18rpx 15rpx;

View File

@ -297,20 +297,6 @@
<view class="mode4">{{ text || ' - '}}</view>
</template>
<!-- 居中 显示一条横杠 -->
<template name="mode5">
<view class="mode5 flexcenter">-</view>
</template>
<template name="mode6">
<view class="mode6">
<view class="mode6-item" wx:for="{{ 5 }}" wx:key="index">
<view class="name">金融计算</view>
<view class="english">Financial Computing</view>
</view>
</view>
</template>
<template name="mode7">
<view class="mode7 flexcenter">
<view class="sum">{{ item.rank || "-" }}</view>

View File

@ -66,19 +66,6 @@ navigator {
padding: 18rpx 15rpx;
white-space: pre-line;
}
.block .item .mode6 {
padding: 18rpx 15rpx 0;
}
.block .item .mode6 .mode6-item .name {
font-size: 24rpx;
color: #333333;
margin-bottom: 6rpx;
}
.block .item .mode6 .mode6-item .english {
font-size: 21rpx;
color: #7F7F7F;
margin-bottom: 18rpx;
}
.block .item .mode7 {
flex-direction: column;
padding: 18rpx 15rpx;

View File

@ -35,10 +35,7 @@ Page({
info: {},
remark: "", // 备注
keyboardHeight: 0, // 键盘高度
remarkInput: "", // 备注输入文本
remarkFocus: false, // 备注输入框焦点状态
isadmission: 0, // 是否是招生官项目
urls: [], // 招生官项目
@ -175,13 +172,6 @@ Page({
const data = res.data
let admissionofficerin = data.admissionofficerin || []
// console.log("data", data);
// data.info.tags = {}
// data.info.rankings = []
// data.scholarships = []
// data.info.distinctive = ""
// data.detailsInfo.faq = []
if (admissionofficerin.length > 0) {
admissionofficerin.forEach(element => {
const date = new Date(element.date);
@ -205,25 +195,9 @@ Page({
let contras = data.contras
if (Array.isArray(contras)) contras = {}
// const remark = contras.remarks || ''
// 算出最后申请时间
// info['application_end'] = this.calculateApplicaDeadline(info.nonlocal_application_end || {})
if (typeof info.mode_of_study == "string") info.mode_of_study = JSON.parse(info.mode_of_study)
let side = this.data.side
// 判断奖学金文案
// if (info.scholarship) info['scholarshipText'] = this.JudgmentScholarshipText(info.scholarship)
// if (info.leaflet_url) {
// const leaflet_url = decodeURIComponent(info.leaflet_url)
// const urlWithoutParams = leaflet_url.split('?')[0];
// const urlParts = urlWithoutParams.split('/');
// const fileName = urlParts[urlParts.length - 1];
// info['leaflet_name'] = fileName
// }
const isadmission = info.admissionsproject || 0
if (isadmission == 1) this.getAdmissionList()
@ -235,9 +209,7 @@ Page({
this.setData({
info,
// course,
contras,
// remark,
side,
isadmission,
sideKey: "basic", // basic
@ -384,6 +356,17 @@ Page({
e["text"] = text;
});
});
let mergedData = {};
element.proof_methods.forEach((item) => {
if (!mergedData[item.type]) mergedData[item.type] = {
...item
};
else mergedData[item.type].description_zh += "\n" + item.description_zh;
});
element.proof_methods = Object.values(mergedData);
})
const standardized = target.standardized_tests_requirements || []
@ -514,25 +497,6 @@ Page({
if (timer > 0) this.countdownInterval = setTimeout(() => this.startCountdown(timer), 1000)
},
// 判断奖学金文案
JudgmentScholarshipText(obj) {
let 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 = '非本地学生有'
return text
},
// 计算出外地申请截止时间
calculateApplicaDeadline(obj) {
let maxDate = null;
for (const item in obj) {
if (maxDate === null || obj[item] > maxDate) maxDate = obj[item];
}
return maxDate
},
// 计算出面试轮的数组
calculateInterviewRound(obj) {
let rounds = [];
@ -836,6 +800,10 @@ Page({
this.setData({
offerShowList: offerShowList.concat(list),
offerPage: endIndex >= allList.length ? 0 : offerPage + 1,
}, () => {
setTimeout(() => {
this.getHeadHeight()
}, 500)
})
}
const request = () => {

View File

@ -1061,8 +1061,7 @@ navigator {
line-height: 39rpx;
color: #333333;
padding: 25.5rpx 18rpx;
white-space: pre-line;
}
.remarks {
@ -1931,6 +1930,7 @@ navigator {
font-weight: 650;
font-size: 24rpx;
position: relative;
height: 100%;
&:not(:last-of-type)::after {
content: "";

View File

@ -300,7 +300,7 @@
</block>
<block wx:if="{{ documents.length != 0 }}">
<template is="item-header" data="{{ text: '必文件' }}"></template>
<template is="item-header" data="{{ text: '必文件' }}"></template>
<document-box documents="{{ documents }}" bind:bindchange="getHeadHeight"></document-box>
</block>
@ -805,8 +805,7 @@
<view class="ability-text">{{ item.name || item.test_name }}</view>
<view wx:if="{{ item.requirement_level }}" class="tag flexcenter {{ item.requirement_level }}">{{ item.level }}</view>
</view>
<view wx:if="{{ item.description_zh }}" class="description">
{{ item.description_zh }}
<view wx:if="{{ item.description_zh }}" class="description">{{ item.description_zh }}
<view class="remarks" wx:if="{{ item.remarks_zh && item.description_zh != item.remarks_zh }}">{{ item.remarks_zh }}</view>
</view>
<view wx:else class="list">

View File

@ -855,6 +855,7 @@ navigator {
line-height: 39rpx;
color: #333333;
padding: 25.5rpx 18rpx;
white-space: pre-line;
}
.details-box .demand .ability-item .remarks {
margin-top: 30rpx;
@ -1572,6 +1573,7 @@ navigator {
font-weight: 650;
font-size: 24rpx;
position: relative;
height: 100%;
}
.details-box .recommend-list .item .btn .btn-item:not(:last-of-type)::after {
content: "";

View File

@ -188,6 +188,7 @@ Page({
university: decodeURI(this.department || ''),
key: "school",
pitch: "school",
list: this.data.universitydepartment,
}
})
@ -420,6 +421,10 @@ Page({
openselect() {
let screen = this.data.screen
screen['state'] = true
if (screen.list && screen.list.length == 0) {
if (screen.key == 'school') screen['list'] = this.data.universitydepartment
else screen['list'] = this.data.discipline
}
this.setData({
screen,
})

View File

@ -8,6 +8,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/projectDetails/projectDetails",
"pathName": "pages/projectDetails/projectDetails",
"query": "uniqid=aSvrDeeGj4CK",
"launchMode": "default",
"scene": null
},
{
"name": "pages/projectDetails/projectDetails",
"pathName": "pages/projectDetails/projectDetails",