对齐offer榜

This commit is contained in:
DESKTOP-RQ919RC\Pc 2025-03-26 18:48:02 +08:00
parent 10ebdd0ec7
commit 4c79609069
14 changed files with 125 additions and 80 deletions

View File

@ -46,7 +46,7 @@ Component({
*/
methods: {
getAdmissionsOfficer() {
util.wxget("/api/project.other/admissionOfficerIn").then(res => {
util.wxget("https://api.gter.net/v1/program/admissionOfficerIn").then(res => {
if (res.code != 200) return
const data = res.data || []
const today = new Date()

View File

@ -97,7 +97,7 @@ Page({
// 专业
getMajorRanking() {
util.wxget("/api/ranking/getMajorRanking", {}).then(res => {
util.wxget("https://api.gter.net/v1/ranking/getMajorRanking", {}).then(res => {
if (res.code != 200) return
const data = res.data
let list = data.list || []
@ -160,7 +160,7 @@ Page({
// 综合
getComprehensiveRanking() {
util.wxget("/api/ranking/getComprehensiveRanking", {}).then(res => {
util.wxget("https://api.gter.net/v1/ranking/getComprehensiveRanking", {}).then(res => {
if (res.code != 200) return
const data = res.data
this.setData({
@ -175,7 +175,7 @@ Page({
wx.showLoading({
title: '加载中...',
})
util.wxget("/api/project.rankings", {}).then(res => {
util.wxget("https://api.gter.net/v1/program/rankings", {}).then(res => {
if (res.code != 200) return
const data = res.data

View File

@ -16,6 +16,7 @@ Page({
islogin: false,
isloginBtnState: false, // 登录弹窗的状态
informationState: false, // 授权后可能需要弹出完成信息框 个人背景那些
briefness: false, // 是否开启头部的简单模式
isquick: false, // 快速保存按钮显示
@ -43,7 +44,7 @@ Page({
schoolList: [],
schoolPitch: {},
schoolValue: [],
schoolValue: {},
projectList: [],
projectPitch: {},
@ -96,6 +97,7 @@ Page({
rankingsObj,
disciplineObj: obj,
})
this.initData()
})
})
@ -108,51 +110,90 @@ Page({
this.setData({
loading: true,
})
util.wxpost("/api/project.contrast", {
let url = "https://api.gter.net/v1/program/contrast"
util.wxpost(url, {
projectid: this.ids,
}).then(res => {
if (res.code != 200) return
const data = res.data
const list = data.data || []
let allArr = []
list.forEach(element => allArr.push(common.decodeKey(element)))
const obj = this.data.disciplineObj
// console.log("obj", obj);
Promise.allSettled(allArr).then(res => {
console.log("res", res);
let list = []
res.forEach(element => list.push(element.status === "fulfilled" ? element.value : {}));
list.forEach(element => {
element['tuition_fee_text'] = common.formatNumberWithSpaces(element['tuition_fee'] || '')
element['admission_deposit_text'] = common.formatNumberWithSpaces(element['admission_deposit'] || '')
element['result_date'] = element['admissions'][0].remarks_zh
if (element.language_of_instruction) {
let strOutput = element.language_of_instruction.join(',');
if (element.accreditations) {
element['accreditation'] = ""
element.accreditations.forEach(ele => {
element['accreditation'] += '- ' + ele.body_full_zh + '\n'
})
}
element['concentration'] = ""
if (element.details?.career_fields) {
element.details.career_fields.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`
})
}
})
}
})
let documents_required = ""
element.documents.forEach(ele => {
documents_required += '- ' + ele.details + '\n'
})
element['documents_required'] = documents_required
element['entrance_requirements'] = element.admission_requirements[0]['basic_requirements']
element['tuition_fee_text'] = common.formatNumberWithSpaces(element.admissions?.[0]?.tuition_fee ? element.admissions[0].tuition_fee + '' : '')
element['admission_deposit_text'] = common.formatNumberWithSpaces(element.admissions?.[0]?.admission_deposit ? 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
}
let scores = element.language_proficiency_scores || []
element['period'] = element.details.full_time_normal_year ? (element.details.full_time_normal_year + '年') : '_'
const scoresList = common.scoresList(scores)
if (element.details.language_of_instruction) {
let strOutput = element.details.language_of_instruction.join(',');
element['language_of_instruction_text'] = strOutput
}
element["english_proficiency_text"] = ""
scoresList.forEach(ele => {
element["english_proficiency_text"] += `${ele.name}${ele.text} \n`
})
// let scores = element.language_proficiency_scores || []
// if (Array.isArray(element.english_proficiency)) {
// const english = element.english_proficiency
// let text = ""
// english.forEach(element => {
// text += `・${element.name_zh}(${element.name_en}) ${element.total}分以上 \n`
// })
// element['english_proficiency_text'] = text
// }
// const scoresList = common.scoresList(scores)
if (element.scholarship) element['scholarshipText'] = this.JudgmentScholarshipText(element.scholarship)
// element["english_proficiency_text"] = ""
// scoresList.forEach(ele => {
// element["english_proficiency_text"] += `・ ${ele.name}${ele.text} \n`
// })
// if (element.scholarship) element['scholarshipText'] = this.JudgmentScholarshipText(element.scholarship)
element['disciplinename'] = obj[element.disciplineid] || ''
})
this.setData({
isquick: data.isquick,
list,
@ -180,6 +221,8 @@ Page({
year: element.year,
})
})
// console.log("schoolArr", schoolArr);
const schoolList = this.removeDuplicates(schoolArr)
this.setData({
projectList,
@ -242,7 +285,6 @@ Page({
// 去掉重复
removeDuplicates(arr) {
console.log("arr", arr);
const uniqueSet = new Set();
const uniqueArray = [];
arr.forEach(item => {
@ -360,7 +402,7 @@ Page({
wx.showLoading({
title: '加载中...',
})
util.wxpost("/api/project.user", {
util.wxpost("https://api.gter.net/v1/program/user", {
limit: 2000,
}).then(res => {
if (res.code != 200) return
@ -387,7 +429,7 @@ Page({
})
return
}
util.wxpost("/api/project.contrast/addQuick", {
util.wxpost("https://api.gter.net/v1/program/addQuick", {
projectid: this.ids
}).then(res => {
common.toast(res.message)
@ -407,6 +449,7 @@ Page({
showObj,
})
},
userClickLogin(e) {
let data = e.detail.data
this.setData({

View File

@ -13,7 +13,8 @@
<navigator class="school flexacenter" url="{{ '/pages/projectSchoolHomepage/projectSchoolHomepage?id=' + item.sid }}" hover-class="none">
<image class="icon" src="{{ item.schoollogo }}" mode="widthFix"></image>
{{ item.schoolalias }}
<view class="semester">{{ item.semester.text }}</view>
<!-- <view class="semester">{{ item.semester.text }}</view> -->
<view class="semester">{{ item.newest }}</view>
</navigator>
<view class="operate flexacenter">
@ -31,7 +32,7 @@
</view>
</block>
<view class="lump">
<view class="lump" wx:if="{{ projectList.length != 0 }}">
<view class="title">专业排名</view>
<view class="ranking-title flexcenter" bind:tap="openSelectRank" data-type="rank">
{{ rankingKey[projectPitch.system] || projectPitch.system }}世界专业排名({{ projectPitch.year }})
@ -93,7 +94,7 @@
<view class="title">奖学金</view>
<view class="block flexflex">
<view class="item flex1" wx:for="{{ list }}" wx:key="index">
<template is="mode2" data="{{ text: item.scholarshipText || '-' }}"></template>
<template is="mode2" data="{{ text: item.features.has_scholarship ? '有' : '无' }}"></template>
</view>
</view>
</view>
@ -102,7 +103,7 @@
<view class="title">一般学习时长</view>
<view class="block flexflex">
<view class="item flex1" wx:for="{{ list }}" wx:key="index">
<template is="mode2" data="{{ text: item.ft_normal_period || '-' }}"></template>
<template is="mode2" data="{{ text: item.period || '-' }}"></template>
</view>
</view>
</view>
@ -185,7 +186,7 @@
<view class="title">是否含论文课程</view>
<view class="block flexflex">
<view class="item flex1" wx:for="{{ list }}" wx:key="index">
<template is="mode2" data="{{ text: item.has_dissertation_course ? '是' : '否' }}"></template>
<template is="mode2" data="{{ text: item.features.has_research_project ? '是' : '否' }}"></template>
</view>
</view>
</view>
@ -194,7 +195,7 @@
<view class="title">是否含项目课程</view>
<view class="block flexflex">
<view class="item flex1" wx:for="{{ list }}" wx:key="index">
<template is="mode2" data="{{ text: item.has_project_course ? '是' : '否' }}"></template>
<template is="mode2" data="{{ text: item.features.has_industry_project ? '是' : '否' }}"></template>
</view>
</view>
</view>
@ -203,7 +204,7 @@
<view class="title">是否含实习课程</view>
<view class="block flexflex">
<view class="item flex1" wx:for="{{ list }}" wx:key="index">
<template is="mode2" data="{{ text: item.has_placement_course ? '是' : '否' }}"></template>
<template is="mode2" data="{{ text: item.features.has_placement_course ? '是' : '否' }}"></template>
</view>
</view>
</view>

View File

@ -766,7 +766,7 @@ Page({
getOfferData() {
if (this.data.offerPage == 0) return
util.wxget(`https://api.gter.net/v1/program/offerList?limit=5&projectid=${ this.data.info.id }&page=${ this.data.offerPage }`).then(res => {
util.wxget(`https://api.gter.net/v1/program/offerList?limit=10&projectid=${ this.data.info.id }&page=${ this.data.offerPage }`).then(res => {
const data = res.data
const list = data.list || []
let side = this.data.side

View File

@ -504,7 +504,7 @@
<view class="side-head flexcenter">录取参考</view>
<template is="item-header" data="{{ text: '寄托录取参考', type: 'consult' }}"></template>
<view class="consult-list">
<navigator class="consult-item" wx:for="{{ offerList }}" wx:key="index" url="/pages/victoryDetails/victoryDetails?id={{ item.id || item.uniqid }}" hover-class="none">
<navigator class="consult-item" wx:for="{{ offerList }}" wx:key="index" target="miniProgram" app-id="wxa9296b07391c2bc7" path="/pages/victoryDetails/victoryDetails?id={{ item.id || item.uniqid }}" hover-class="none">
<view class="school flexacenter">
<image class="img" src="{{ item.schoolimage }}" mode="widthFix"></image>
<view class="flex1">{{ item.schoolname }}</view>
@ -542,13 +542,9 @@
<image class="bottom-avatar" src="{{ item.avatar }}"></image>
{{ item.timestamp }}
</view>
<view wx:if="{{ isShowEmoji }}" class="numerical-box" style="display: flex;margin-left: 15rpx;">
<view class="emoji-item" wx:for="{{ items }}" wx:key="index">
<rich-text class="emoji-item-icon" nodes="&#x{{ item }};" />
</view>
</view>
<!-- 数值 -->
<view wx:else class="numerical-box flexacenter">
<view class="numerical-box flexacenter">
<view class="item-bottom-item flexcenter">
<image class="item-bottom-icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/u884.png"></image>
{{ item.view || 0 }}
@ -765,10 +761,14 @@
榜单
<image class="icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/arrow-circle-gray.png"></image>
</view>
<view wx:if="{{ type == 'consult' }}" class="list-btn flexacenter" bind:tap="goPage" data-url="/pages/victoryList/victoryList">
<!-- <view wx:if="{{ type == 'consult' }}" class="list-btn flexacenter" bind:tap="goPage" data-url="/pages/victoryList/victoryList"> -->
<navigator target="miniProgram" app-id="wxa9296b07391c2bc7" wx:if="{{ type == 'consult' }}" class="list-btn flexacenter" path="/pages/victoryList/victoryList">
Offer榜
<image class="icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/arrow-circle-gray.png"></image>
</view>
</navigator>
<!-- Offer榜
<image class="icon" mode="widthFix" src="https://app.gter.net/image/miniApp/offer/arrow-circle-gray.png"></image> -->
<!-- </view> -->
</view>
</template>

View File

@ -98,7 +98,7 @@ Page({
},
bannerData() {
util.wxget("/api/project.banner").then(res => {
util.wxget("https://api.gter.net/v1/program/getBanner").then(res => {
if (res.code != 200) return
const data = res.data || []
this.setData({
@ -261,7 +261,7 @@ Page({
wx.showLoading({
title: '加载中...',
})
util.wxget("/api/project.other/todayFateProject").then(res => {
util.wxget("https://api.gter.net/v1/program/todayFateProject").then(res => {
if (res.code != 200) return
let data = res.data || []
@ -294,7 +294,7 @@ Page({
// 获取 招生官项目
getAdmission() {
util.wxget("/api/project.lists", {
util.wxget("https://api.gter.net/v1/program/getList", {
limit: 20,
page: 1,
admissionsproject: 1,
@ -331,7 +331,7 @@ Page({
wx.showLoading({
title: '加载中...',
})
util.wxget("/api/project.lists", {
util.wxget("https://api.gter.net/v1/program/getList", {
limit: 20,
page: this.data.page,
}).then(res => {
@ -395,7 +395,7 @@ Page({
});
}
let url = "/api/project.contrast/add"
let url = "https://api.gter.net/v1/program/addContrast"
util.wxpost(url, {
projectid: id
@ -638,7 +638,7 @@ Page({
const id = e.currentTarget.dataset.id
const type = e.currentTarget.dataset.type
util.wxpost("/api/project.contrast/add", {
util.wxpost("https://api.gter.net/v1/program/addContrast", {
projectid: id
}).then(res => {
if (res.code != 200) return
@ -796,7 +796,7 @@ Page({
},
getRankingData() {
util.wxpost("/api/ranking/homeRankingRecommend").then(res => {
util.wxpost("https://api.gter.net/v1/ranking/homeRankingRecommend").then(res => {
if (res.code != 200) {
common.toast(res.message || '')
return

View File

@ -106,7 +106,7 @@ Page({
wx.showLoading({
title: '加载中...',
})
util.wxget("/api/project.rankings/comprehensive", {
util.wxget("https://api.gter.net/v1/program/comprehensiverankings", {
token: com['token'] || comDefault['token'],
ishongkong: this.data.comOnly || 0,
limit: 2000,
@ -153,7 +153,7 @@ Page({
})
let majDefault = this.data.majDefault
let maj = this.data.maj
util.wxget("/api/project.rankings/discipline", {
util.wxget("https://api.gter.net/v1/program/disciplinerankings", {
token: maj['token'] || majDefault['token'],
ishongkong: this.data.majOnly || 0,
}).then(res => {
@ -192,7 +192,7 @@ Page({
wx.showLoading({
title: '加载中...',
})
util.wxget("/api/project.rankings", {}).then(res => {
util.wxget("https://api.gter.net/v1/program/rankings", {}).then(res => {
if (res.code != 200) return
const data = res.data

View File

@ -113,7 +113,7 @@ Page({
title: '加载中...',
})
util.wxpost("/api/project.user", {
util.wxpost("https://api.gter.net/v1/program/user", {
limit: 2000,
page: obj.page || 1,
typeid: obj.typeid || '',
@ -150,7 +150,7 @@ Page({
// 获取快速列表
getQuickList() {
util.wxget("/api/project.contrast/getQuickList", {}).then(res => {
util.wxget("https://api.gter.net/v1/program/getQuickList", {}).then(res => {
if (res.code != 200) return
const data = res.data
const quickList = data || []
@ -460,7 +460,7 @@ Page({
newId.push(obj.projectid)
});
util.wxpost("/api/project.user/changeSorting", {
util.wxpost("https://api.gter.net/v1/program/changeProjectSorting", {
projectids: newId
}).then(res => common.toast(res.message))
},
@ -533,7 +533,7 @@ Page({
// 发送 备注
postRemarks(token, remarks) {
util.wxpost("/api/project.user/remarks", {
util.wxpost("https://api.gter.net/v1/program/remarksProject", {
token,
remarks,
}).then(res => common.toast(res.message))
@ -605,7 +605,7 @@ Page({
const index = e.currentTarget.dataset.index
const quickList = this.data.quickList
util.wxpost("/api/project.contrast/deleteQuick", {
util.wxpost("https://api.gter.net/v1/program/deleteQuick", {
id
}).then(res => {
quickList.splice(index, 1)
@ -663,7 +663,7 @@ Page({
let list = this.data.list
const target = list[index]
util.wxpost("/api/project.user/delete", {
util.wxpost("https://api.gter.net/v1/program/deleteProject", {
token: target.token,
}).then(res => {
if (res.code != 200) return
@ -714,7 +714,7 @@ Page({
const list = this.data.list || []
const target = JSON.parse(JSON.stringify(list[index])) || {}
util.wxpost("/api/project.user/changeType", {
util.wxpost("https://api.gter.net/v1/program/changeProjectType", {
token: target.token,
typeid,
}).then(res => {
@ -787,7 +787,7 @@ Page({
const index = e.currentTarget.dataset.index
const projectid = e.currentTarget.dataset.projectid
util.wxpost("/api/project.contrast/delete", {
util.wxpost("https://api.gter.net/v1/program/deleteContrast", {
projectid
}).then(res => {
if (res.code != 200) return

View File

@ -100,7 +100,7 @@ Page({
wx.showLoading({
title: '加载中...',
})
util.wxget("/api/project.university/getInfo", {
util.wxget("https://api.gter.net/v1/program/getUniversityInfo", {
id: this.data.id,
}).then(res => {
if (res.code != 200) return
@ -142,7 +142,7 @@ Page({
if (this.data.page == 0 || this.loading) return
this.loading = true
util.wxget("/api/project.lists", {
util.wxget("https://api.gter.net/v1/program/getList", {
limit: 2000,
page: this.data.page,
sid: this.data.id,
@ -341,8 +341,8 @@ Page({
});
}
let url = "/api/project.contrast/add"
if (status == 1) url = "/api/project.contrast/delete"
let url = "https://api.gter.net/v1/program/addContrast"
if (status == 1) url = "https://api.gter.net/v1/program/deleteContrast"
util.wxpost(url, {
projectid: id
@ -528,7 +528,7 @@ Page({
const index = e.currentTarget.dataset.index
const id = e.currentTarget.dataset.id
let url = "/api/project.contrast/add"
let url = "https://api.gter.net/v1/program/addContrast"
util.wxpost(url, {
projectid: id

View File

@ -102,7 +102,7 @@ Page({
})
this.loading = true
util.wxget("/api/project.lists", {
util.wxget("https://api.gter.net/v1/program/getList", {
limit: 2000,
disciplineid: this.data.id,
sid: this.data.sid,
@ -273,8 +273,8 @@ Page({
});
// }
let url = "/api/project.contrast/add"
if (status == 1) url = "/api/project.contrast/delete"
let url = "https://api.gter.net/v1/program/addContrast"
if (status == 1) url = "https://api.gter.net/v1/program/deleteContrast"
util.wxpost(url, {
projectid: id
@ -367,7 +367,7 @@ Page({
const index = e.currentTarget.dataset.index
const id = e.currentTarget.dataset.id
util.wxpost("/api/project.contrast/add", {
util.wxpost("https://api.gter.net/v1/program/addContrast", {
projectid: id
}).then(res => {
if (res.code != 200) return

View File

@ -235,7 +235,7 @@ Page({
wx.showLoading()
let url = "/miniprogramApi/offer/search/lists"
if (this.data.type == 'xg') url = '/api/project.lists'
if (this.data.type == 'xg') url = 'https://api.gter.net/v1/program/getList'
util.wxpost(url, {
page,
@ -319,9 +319,8 @@ Page({
handleClick(e) {
const index = e.currentTarget.dataset.index
const id = e.currentTarget.dataset.id
const random = e.currentTarget.dataset.random
util.wxpost("/api/project.contrast/add", {
util.wxpost("https://api.gter.net/v1/program/addContrast", {
projectid: id
}).then(res => {
if (res.code != 200) return
@ -380,7 +379,7 @@ Page({
const index = e.currentTarget.dataset.index
const id = e.currentTarget.dataset.id
util.wxpost("/api/project.contrast/add", {
util.wxpost("https://api.gter.net/v1/program/addContrast", {
projectid: id
}).then(res => {
if (res.code != 200) return

View File

@ -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": true
"urlCheck": false
},
"condition": {
"miniprogram": {

View File

@ -48,7 +48,7 @@ function xgBasicData(that, app, isindex = false) {
return
}
util.wxget("/api/project.home/basicData").then(res => {
util.wxget("https://api.gter.net/v1/program/basicData").then(res => {
if (res.code != 200) return
const data = res.data
const basicData = {
@ -75,6 +75,8 @@ function formatNumberWithSpaces(number) {
function decodeKey(encrypted, key) {
return new Promise((resolve, reject) => {
try {
if (typeof encrypted != "string") resolve(encrypted)
const app = getApp()
var decodekey = app.globalData.basicData.encodekey
const encryptedData = CryptoJS.enc.Base64.parse(encrypted)