Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
orangeboyChen committed Feb 9, 2024
1 parent 56ab352 commit c239e9a
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 86 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


### 文档
需要获取使用帮助请[前往文档主页](https://ham.nowcent.cn)
需要获取使用帮助请[前往文档主页](https://orangeboychen.github.io/whu-ham/)


### 下载安装
Expand All @@ -34,7 +34,7 @@
- 每日自动预约图书馆
- 更改图书馆预约时间

#### 体育场馆预定(暂限iOS)
#### 体育场馆预定
- 预约体育场馆(可使用Siri捷径)

#### E卡,校巴
Expand All @@ -44,7 +44,7 @@
- 记录你的日程信息

#### 其它
- 课程表、图书馆预约小组件支持(Android、iOS均可)
- 课程表、图书馆预约小组件支持

### 它安全吗

Expand Down
12 changes: 6 additions & 6 deletions docs/.vuepress/components/AndroidDownloadLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ export default {
this.finalRelease.apkUrl = finalRelease.assets[0]['browser_download_url']
}
this.betaRelease.name = betaRelease.name;
this.betaRelease.updateLog = betaRelease.body;
this.betaRelease.publishDate = new Date(betaRelease['published_at']);
if(betaRelease.assets.length > 0 && betaRelease.assets[0]['browser_download_url'].indexOf('apk') !== -1) {
this.betaRelease.apkUrl = betaRelease.assets[0]['browser_download_url']
}
// this.betaRelease.name = betaRelease.name;
// this.betaRelease.updateLog = betaRelease.body;
// this.betaRelease.publishDate = new Date(betaRelease['published_at']);
// if(betaRelease.assets.length > 0 && betaRelease.assets[0]['browser_download_url'].indexOf('apk') !== -1) {
// this.betaRelease.apkUrl = betaRelease.assets[0]['browser_download_url']
// }
}
}
}
Expand Down
94 changes: 32 additions & 62 deletions docs/.vuepress/components/CourseScoreShareResultView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,17 @@
<div style="height: 16px;"/>

<div class="container">
<div class="course-score-item">
<div class="course-score-item-tip">90-100</div>
<div style="background: #4CAF50;"
:style="{width: scoreInfo.a / scoreInfo.total * 80 + '%'}"
<div class="course-score-item" v-for="(info, i) in scoreInfo.data">
<div class="course-score-item-tip">{{ info.from }}-{{ info.to }}</div>
<div
:style="{ width: info.total / scoreInfo.total * 80 + '%',
background: i < colorArr.length ? colorArr[i] : colorArr[colorArr.length - 1]
}"
class="course-score-item-division"
v-if="scoreInfo.a > 0"></div>
<span style="color: #4CAF50;">{{ scoreInfo.a }}</span>
</div>

<div class="course-score-item">
<div class="course-score-item-tip">85-90</div>
<div style="background: #8BC34A"
:style="{width: scoreInfo.b / scoreInfo.total * 80 + '%'}"
class="course-score-item-division"
v-if="scoreInfo.b > 0"></div>
<span style="color: #8BC34A;">{{ scoreInfo.b }}</span>
</div>

<div class="course-score-item">
<div class="course-score-item-tip">80-85</div>
<div style="background: #FFEB3B"
:style="{width: scoreInfo.c / scoreInfo.total * 80 + '%'}"
class="course-score-item-division"
v-if="scoreInfo.c > 0"></div>
<span style="color: #FFEB3B;">{{ scoreInfo.c }}</span>
</div>

<div class="course-score-item">
<div class="course-score-item-tip">70-80</div>
<div style="background: #FFC107"
:style="{width: scoreInfo.d / scoreInfo.total * 80 + '%'}"
class="course-score-item-division"
v-if="scoreInfo.d > 0"></div>
<span style="color: #FFC107;">{{ scoreInfo.d }}</span>
</div>

<div class="course-score-item">
<div class="course-score-item-tip">60-70</div>
<div style="background: #FF9800"
:style="{width: scoreInfo.e / scoreInfo.total * 80 + '%'}"
class="course-score-item-division"
v-if="scoreInfo.e > 0"></div>
<span style="color: #FF9800;">{{ scoreInfo.e }}</span>
</div>

<div class="course-score-item">
<div class="course-score-item-tip">0-60</div>
<div style="background: #FF5722"
:style="{width: scoreInfo.f / scoreInfo.total * 80 + '%'}"
class="course-score-item-division"
v-if="scoreInfo.f > 0"></div>
<span style="color: #FF5722;">{{ scoreInfo.f }}</span>
v-if="info.total > 0"></div>
<span :style="{
color: i < colorArr.length ? colorArr[i] : colorArr[colorArr.length - 1]
}">{{ info.total }}</span>
</div>
</div>

Expand Down Expand Up @@ -87,30 +46,41 @@ export default {
instructor: ''
},
scoreInfo: {
a: 0,
b: 0,
c: 0,
d: 0,
e: 0,
f: 0,
total: 0,
average: 0.0
average: 0.0,
data: []
},
dataTime: ''
dataTime: '',
colorArr: [
'#4CAF50',
'#8BC34A',
'#FFEB3B',
'#FFC107',
'#FF9800',
'#FF5722',
]
}
},
created() {
const { name, instructor, sign, data, dataTime } = this.$route.query
const { name, instructor, sign, data, dataTime, v } = this.$route.query
if (v !== '2') {
this.pushToHome()
return
}
this.courseInfo.name = decodeURI(name)
this.courseInfo.instructor = decodeURI(instructor)
this.dataTime = dataTime
const correctSign = md5(`${name}${instructor}${data}${dataTime}uTYbpYG7YSVzncQZ`)
const correctSign = md5(`v2${name}${instructor}${data}${dataTime}uTYbpYG7YSVzncQZ`)
if (correctSign !== sign) {
this.$router.push('/')
this.pushToHome()
return
}
this.scoreInfo = JSON.parse(data)
console.log(this.scoreInfo)
},
pushToHome() {
this.$router.push('/')
}
}
</script>
Expand Down
21 changes: 11 additions & 10 deletions docs/.vuepress/components/iOSDownloadLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,12 @@ export default {
let that = this;
window.jsonpCallback = function (data) {
let releaseReleaseInfo = data.results[0];
console.log(releaseReleaseInfo)
//组装数据
that.finalRelease.name = releaseReleaseInfo.version;
that.finalRelease.updateLog = releaseReleaseInfo.releaseNotes;
that.finalRelease.publishDate = new Date(releaseReleaseInfo.releaseDate);
that.finalRelease.publishDate = new Date(releaseReleaseInfo.currentVersionReleaseDate);
};
let url = "https://itunes.apple.com/lookup?id=1577896044&callback=jsonpCallback";
Expand All @@ -203,15 +204,15 @@ export default {
document.getElementsByTagName("head")[0].appendChild(script);
},
getIOSBetaVersionInfo: async function () {
let res = await axios.get('https://api.ham.nowcent.cn/version');
if(res.status !== 200) {
return;
}
let betaReleaseInfo = res.data.data.iosVersion;
this.betaRelease.name = `${betaReleaseInfo.versionName}(${betaReleaseInfo.versionCode})`
this.betaRelease.updateLog = betaReleaseInfo.versionDescription ?? '';
this.betaRelease.publishDate = betaReleaseInfo.betaUpdateTime ?? null;
// let res = await axios.get('https://api.ham.nowcent.cn/version');
// if(res.status !== 200) {
// return;
// }
//
// let betaReleaseInfo = res.data.data.iosVersion;
// this.betaRelease.name = `${betaReleaseInfo.versionName}(${betaReleaseInfo.versionCode})`
// this.betaRelease.updateLog = betaReleaseInfo.versionDescription ?? '';
// this.betaRelease.publishDate = betaReleaseInfo.betaUpdateTime ?? null;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineUserConfig({
title: 'Ham',
base: '/whu-ham/',
head: [
['link', { rel: 'icon', href: 'icon-1024.png' }],
['link', { rel: 'icon', href: 'icon-1024 2.png' }],
['link', { rel: 'manifest', href: 'https://orangeboychen.github.io/whu-ham/manifest.webmanifest' }]
],
plugins: [
Expand Down
2 changes: 1 addition & 1 deletion docs/handbook/bus.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
::: tip 版本要求
iOS: 1.3.2 (build >= 96)

Android: 暂未支持
Android: 1.4.3
:::

你可以通过Ham查看校巴信息。
Expand Down
2 changes: 1 addition & 1 deletion docs/handbook/pay.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
::: tip 版本要求
iOS: 1.3.2 (build >= 96)

Android: 暂未支持
Android: 1.4.3
:::

你可以通过Ham使用珞珈E卡
Expand Down
2 changes: 1 addition & 1 deletion docs/handbook/schedule.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 日程
在日程页上下拉进入图片详情页,在点击下方"日程"按钮进入日程页。在日程页中,你可以查看所有日程、添加或删除日程。

日程支持到期前提醒,并自动导入iOS日历
日程支持到期前提醒,并自动导入日历
2 changes: 1 addition & 1 deletion docs/handbook/sport.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
::: tip 版本要求
iOS: 1.3.2 (build >= 96)

Android: 暂未支持
Android: 1.4.3
:::

你可以通过Ham预定运动场馆
Expand Down

0 comments on commit c239e9a

Please sign in to comment.