修改项目库bug
This commit is contained in:
parent
f856d1a2e2
commit
b2a76456fe
@ -10,7 +10,7 @@
|
||||
<view wx:if="{{ item.is_required }}" class="tag flexcenter">必须</view>
|
||||
<view wx:else class="tag selectable flexcenter">可选</view>
|
||||
</view>
|
||||
<view class="hint">{{ item.description_zh }}</view>
|
||||
<view class="hint">{{ item.details }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
@ -136,20 +136,44 @@ Page({
|
||||
}
|
||||
|
||||
element['concentration'] = ""
|
||||
if (element.details?.career_fields) {
|
||||
element.details.career_fields.forEach(ele => {
|
||||
element['concentration'] += '·' + ele + '\n'
|
||||
})
|
||||
if (element.features?.has_scholarship) {
|
||||
(element.specialization_options || []).forEach((ele) => {
|
||||
element["concentration"] += "· " + ele + "\n";
|
||||
});
|
||||
}
|
||||
|
||||
element["english_proficiency_text"] = ""
|
||||
element.admission_requirements[0].language_requirements.forEach(ele => {
|
||||
if (ele.language = "ENGLISH") {
|
||||
ele.proof_methods.forEach(el => {
|
||||
if (el.type == 'test') {
|
||||
el.tests.forEach(e => {
|
||||
element["english_proficiency_text"] += `・ ${ e.test_name }:总分${ e.min_score }分以上; \n`
|
||||
})
|
||||
if (el.type == "test") {
|
||||
el.tests.forEach((e) => {
|
||||
let text = "";
|
||||
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;
|
||||
let allEqual = true;
|
||||
let nonEqualSubject;
|
||||
let nonEqualScore;
|
||||
|
||||
for (let i = 1; i < data.length; i++) {
|
||||
if (data[i].score !== firstScore) {
|
||||
allEqual = false;
|
||||
nonEqualSubject = data[i].subject;
|
||||
nonEqualScore = data[i].score;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (allEqual) text += `,各项分数不低于 ${firstScore} 分`;
|
||||
else text += `,各项分数不低于 ${firstScore} 分, ${nonEqualSubject}不低于${nonEqualScore}分`;
|
||||
}
|
||||
element["english_proficiency_text"] += `・${e.test_name}:${text}; \n`;
|
||||
// element["english_proficiency_text"] += `・${e.test_name}:总分${e.min_score}分以上; \n`;
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -167,8 +191,6 @@ Page({
|
||||
|
||||
element['admission_deposit_text'] = common.formatNumberWithSpaces(element.admissions[0].admission_deposit || '')
|
||||
|
||||
element['period'] = element.details.full_time_normal_year ? (element.details.full_time_normal_year + '年') : '_'
|
||||
|
||||
if (element.details.language_of_instruction) {
|
||||
let strOutput = element.details.language_of_instruction.join(',');
|
||||
element['language_of_instruction_text'] = strOutput
|
||||
|
@ -350,16 +350,39 @@ Page({
|
||||
|
||||
language.forEach(element => {
|
||||
element['name'] = obj[element['language']];
|
||||
element.proof_methods.forEach(ele => {
|
||||
ele['name'] = obj[ele['type']];
|
||||
(ele.tests || []).forEach(e => {
|
||||
let text = ""
|
||||
if (e.min_score == 'Pass') text = `等级 ${e.min_score}`
|
||||
else if (e.min_score && /^[A-Za-z]+$/.test(e.min_score)) text = `等级 ${e.min_score} 以上`
|
||||
else if (e.min_score) text = `总分 ${e.min_score} 分以上`
|
||||
e['text'] = text
|
||||
})
|
||||
})
|
||||
element.proof_methods.forEach((ele) => {
|
||||
ele["name"] = obj[ele["type"]];
|
||||
(ele.tests || []).forEach((e) => {
|
||||
let text = "";
|
||||
if (e.grade && e.grade == "Pass") text = `等级 ${e.grade}`;
|
||||
else if (e.grade) text = `等级 ${e.grade} 以上`;
|
||||
else if (e.sub_scores.length > 0) {
|
||||
let allEqual = true;
|
||||
e.sub_scores.forEach((ee) => {
|
||||
if (ee.score != e.sub_scores[0].score) allEqual = false;
|
||||
});
|
||||
|
||||
const fields = {
|
||||
Total: "总分",
|
||||
Reading: "阅读",
|
||||
Speaking: "口语",
|
||||
Writing: "写作",
|
||||
Listening: "听力",
|
||||
};
|
||||
|
||||
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} 分以上`;
|
||||
|
||||
e["text"] = text;
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
const standardized = target.standardized_tests_requirements || []
|
||||
@ -416,7 +439,13 @@ Page({
|
||||
// 拿到 招生 选中信息
|
||||
getAdmissionsObj(id) {
|
||||
const admissionsObj = this.data.admissions.find(item => item.id === id);
|
||||
// console.log("admissionsObj", admissionsObj);
|
||||
if (admissionsObj.leaflet_url) {
|
||||
const leaflet_url = decodeURIComponent(admissionsObj.leaflet_url)
|
||||
const urlWithoutParams = leaflet_url.split('?')[0];
|
||||
const urlParts = urlWithoutParams.split('/');
|
||||
const fileName = urlParts[urlParts.length - 1];
|
||||
admissionsObj['leaflet_name'] = fileName
|
||||
}
|
||||
this.setData({
|
||||
admissionsObj,
|
||||
})
|
||||
@ -764,8 +793,10 @@ Page({
|
||||
return now <= date
|
||||
},
|
||||
|
||||
offerLoading: false, // 加载中
|
||||
getOfferData() {
|
||||
if (this.data.offerPage == 0) return
|
||||
if (this.data.offerPage == 0 || this.offerLoading) return
|
||||
this.offerLoading = true
|
||||
const limit = this.data.offerPage == 1 ? 5 : 10
|
||||
util.wxget(`https://api.gter.net/v1/program/offerList?limit=${ limit }&projectid=${ this.data.info.id }&page=${ this.data.offerPage }`).then(res => {
|
||||
const data = res.data
|
||||
@ -789,7 +820,7 @@ Page({
|
||||
this.getHeadHeight()
|
||||
}, 500)
|
||||
})
|
||||
})
|
||||
}).finally(() => this.offerLoading = false)
|
||||
},
|
||||
|
||||
/**
|
||||
@ -896,9 +927,11 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
recommendLoading: false, // 加载中
|
||||
// 获取推荐数据
|
||||
getRecommendData() {
|
||||
if (this.data.recommendPage == 0) return
|
||||
if (this.data.recommendPage == 0 || this.recommendLoading) return
|
||||
this.recommendLoading = true
|
||||
util.wxpost("https://api.gter.net/v1/program/recommendProgram", {
|
||||
uniqid: this.data.uniqid,
|
||||
page: this.data.recommendPage,
|
||||
@ -925,7 +958,7 @@ Page({
|
||||
side,
|
||||
recommendPage: this.data.recommendPage + 1
|
||||
})
|
||||
})
|
||||
}).finally(() => this.recommendLoading = false)
|
||||
},
|
||||
|
||||
// 点击 推荐项目 的详情
|
||||
|
@ -561,63 +561,6 @@ navigator {
|
||||
}
|
||||
}
|
||||
|
||||
.key-ranking {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
width: 132rpx;
|
||||
height: 36rpx;
|
||||
margin-top: 16rpx;
|
||||
margin-bottom: 22.5rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 25rpx;
|
||||
width: 100%;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
||||
.quantity {
|
||||
text-align: center;
|
||||
font-family: 'Arial', 'Arial-Black', 'Arial Black', sans-serif;
|
||||
font-weight: 900;
|
||||
font-size: 27rpx;
|
||||
color: #000000;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.ranking-name {
|
||||
text-align: center;
|
||||
font-family: 'HelveticaNeue', 'Helvetica Neue', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
width: fit-content;
|
||||
position: relative;
|
||||
line-height: 24rpx;
|
||||
position: relative;
|
||||
|
||||
.ranking-icon {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: -12rpx;
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tuition {
|
||||
padding: 15rpx;
|
||||
display: flex;
|
||||
@ -846,9 +789,16 @@ navigator {
|
||||
height: 100%;
|
||||
width: 45rpx;
|
||||
|
||||
&.btn-right-show {
|
||||
.arrows {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.arrows {
|
||||
width: 15rpx;
|
||||
height: 7.5rpx;
|
||||
transition: all .3s;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2294,57 +2244,6 @@ navigator {
|
||||
}
|
||||
}
|
||||
|
||||
.remark-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0, 0, 0, 0.706);
|
||||
z-index: 1002;
|
||||
align-items: flex-end;
|
||||
|
||||
.remark {
|
||||
width: 100vw;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
|
||||
.remark-input {
|
||||
width: 100%;
|
||||
min-height: 81rpx;
|
||||
font-size: 27rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
padding: 30rpx 27rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.remark-bottom {
|
||||
justify-content: flex-end;
|
||||
padding: 10rpx 27rpx 21rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.remark-limit {
|
||||
font-size: 21rpx;
|
||||
color: rgb(170, 170, 170);
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.remark-btn {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background-color: rgb(207, 247, 255);
|
||||
border: 1rpx solid rgb(186, 222, 230);
|
||||
border-radius: 50%;
|
||||
|
||||
.remark-icon {
|
||||
width: 24rpx;
|
||||
height: 25.5rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.index-sidebar {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
@ -246,7 +246,7 @@
|
||||
<view class="apply-btn flexacenter">
|
||||
<view class="btn flexacenter" bind:tap="cutApplyState">
|
||||
<view class="text flex1">- {{ admissionsObj.season }}申请信息 -</view>
|
||||
<view class="btn-right flexcenter">
|
||||
<view class="btn-right flexcenter {{ applyListState ? 'btn-right-show' : '' }}">
|
||||
<image class="arrows" src="https://app.gter.net/image/miniApp/offer/triangle-white.svg" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -455,55 +455,6 @@ navigator {
|
||||
.details-box .accreditation .accreditation-item .list .item:not(:last-of-type) {
|
||||
margin-bottom: 21rpx;
|
||||
}
|
||||
.details-box .key-ranking {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.details-box .key-ranking .icon {
|
||||
width: 132rpx;
|
||||
height: 36rpx;
|
||||
margin-top: 16rpx;
|
||||
margin-bottom: 22.5rpx;
|
||||
}
|
||||
.details-box .key-ranking .list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 25rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.details-box .key-ranking .list .item {
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
.details-box .key-ranking .list .item .quantity {
|
||||
text-align: center;
|
||||
font-family: 'Arial', 'Arial-Black', 'Arial Black', sans-serif;
|
||||
font-weight: 900;
|
||||
font-size: 27rpx;
|
||||
color: #000000;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
.details-box .key-ranking .list .item .ranking-name {
|
||||
text-align: center;
|
||||
font-family: 'HelveticaNeue', 'Helvetica Neue', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
width: fit-content;
|
||||
line-height: 24rpx;
|
||||
position: relative;
|
||||
}
|
||||
.details-box .key-ranking .list .item .ranking-name .ranking-icon {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: -12rpx;
|
||||
transform: rotate(270deg);
|
||||
}
|
||||
.details-box .tuition {
|
||||
padding: 15rpx;
|
||||
display: flex;
|
||||
@ -684,9 +635,13 @@ navigator {
|
||||
height: 100%;
|
||||
width: 45rpx;
|
||||
}
|
||||
.details-box .apply-btn .btn .btn-right.btn-right-show .arrows {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.details-box .apply-btn .btn .btn-right .arrows {
|
||||
width: 15rpx;
|
||||
height: 7.5rpx;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.details-box .apply-btn .apply-mask {
|
||||
position: fixed;
|
||||
@ -1870,50 +1825,6 @@ navigator {
|
||||
.admissionState.state3 {
|
||||
background-color: #04b0d5;
|
||||
}
|
||||
.remark-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(0, 0, 0, 0.706);
|
||||
z-index: 1002;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.remark-mask .remark {
|
||||
width: 100vw;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
.remark-mask .remark .remark-input {
|
||||
width: 100%;
|
||||
min-height: 81rpx;
|
||||
font-size: 27rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 30rpx 27rpx 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.remark-mask .remark .remark-bottom {
|
||||
justify-content: flex-end;
|
||||
padding: 10rpx 27rpx 21rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.remark-mask .remark .remark-bottom .remark-limit {
|
||||
font-size: 21rpx;
|
||||
color: #aaaaaa;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
.remark-mask .remark .remark-bottom .remark-btn {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
background-color: #cff7ff;
|
||||
border: 1rpx solid #badee6;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.remark-mask .remark .remark-bottom .remark-btn .remark-icon {
|
||||
width: 24rpx;
|
||||
height: 25.5rpx;
|
||||
}
|
||||
.index-sidebar {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
@ -185,6 +185,7 @@ Page({
|
||||
this.setData({
|
||||
screen: {
|
||||
name: decodeURI(this.department || ''),
|
||||
university: decodeURI(this.department || ''),
|
||||
key: "school",
|
||||
pitch: "school",
|
||||
}
|
||||
|
@ -133,12 +133,12 @@
|
||||
</view>
|
||||
<view class="english">{{ item.name_en }}</view>
|
||||
<view class="introduce flexacenter" wx:if="{{ item.department || item.rank || item.tuition_fee_text }}">
|
||||
{{ item.department }}
|
||||
{{ item.department || '' }}
|
||||
<view class="flexacenter" wx:if="{{ item.rank }}">
|
||||
<view class="line">|</view> 专业排名 <vie class="quantity">{{ item.rank }}</vie>
|
||||
<view class="line" wx:if="{{ item.department }}">|</view> 专业排名 <vie class="quantity">{{ item.rank }}</vie>
|
||||
</view>
|
||||
<view class="flexacenter" wx:if="{{ item.tuition_fee }}">
|
||||
<view class="line">|</view> 学费HK$ <vie class="quantity">{{ item.tuition_fee_text }}</vie>
|
||||
<view class="line" wx:if="{{ item.rank || item.department }}">|</view> 学费HK$ <vie class="quantity">{{ item.tuition_fee_text }}</vie>
|
||||
</view>
|
||||
</view>
|
||||
<view class="word" wx:if="{{ item.distinctive }}">{{ item.distinctive }}</view>
|
||||
|
@ -3,7 +3,7 @@
|
||||
"projectname": "%E5%B0%8F%E7%A8%8B%E5%BA%8F%20-%20%E9%A1%B9%E7%9B%AE%E5%BA%93",
|
||||
"setting": {
|
||||
"compileHotReLoad": false,
|
||||
"urlCheck": false
|
||||
"urlCheck": true
|
||||
},
|
||||
"condition": {
|
||||
"miniprogram": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user