add link to canary & add date
This commit is contained in:
parent
0e209cae15
commit
937ac40576
@ -2,8 +2,8 @@ import axios from 'axios'
|
||||
|
||||
export const api = axios.create({
|
||||
// baseURL: 'https://beta.powerrain.cn/api/',
|
||||
baseURL: 'https://coc.powerrain.cn/api/',
|
||||
// baseURL: window.location.origin + '/api/',
|
||||
// baseURL: 'https://coc.powerrain.cn/api/',
|
||||
baseURL: window.location.origin + '/api/',
|
||||
// baseURL: 'http://152.136.99.231:8001' + '/api/',
|
||||
//baseURL: 'http://127.0.0.1:5000/api',
|
||||
headers: {
|
||||
|
@ -9,7 +9,7 @@
|
||||
<img src="../assets/logo.png" alt />
|
||||
</div>
|
||||
<p class="app-name">Co-Create</p>
|
||||
<p class="version">Version 2.0.0</p>
|
||||
<p class="version">Version 2.0.1</p>
|
||||
</div>
|
||||
<div class="list">
|
||||
<!-- <div class="list-item">
|
||||
@ -20,6 +20,13 @@
|
||||
<icon class="game" name="game"></icon>
|
||||
<p>课表小游戏</p>
|
||||
</div>
|
||||
<div class="list-item"
|
||||
v-clipboard:copy="'https://ccb.canary.moe'"
|
||||
v-clipboard:success="onCopyUrl"
|
||||
v-clipboard:error="onErrorUrl">
|
||||
<icon class="game" name="canary"></icon>
|
||||
<p>Canary密码本</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-box" v-if="user_info">
|
||||
<div class="logout-dialog to-show" v-if="dialog_state">
|
||||
@ -89,6 +96,12 @@ export default {
|
||||
this.setGrade([getGradeInitData(), this])
|
||||
this.setSchedule([null, this])
|
||||
this.closeDrawer()
|
||||
},
|
||||
onCopyUrl(e) {
|
||||
this.$message.success("网址复制成功!");
|
||||
},
|
||||
onErrorUrl(e) {
|
||||
this.$message.success("网址复制失败!");
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
1
src/svg/canary.svg
Normal file
1
src/svg/canary.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1582191167349" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3270" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M921.6 716.75904L415.46752 210.66752a136.25344 136.25344 0 0 0-96.54272-39.99744c-70.93248 0-128.53248 54.272-135.19872 123.43296L102.4 375.43936h86.12864C210.59584 506.39872 294.57408 616.09984 409.6 673.49504v179.84512h68.27008V700.34432a405.18656 405.18656 0 0 0 68.25984 13.70112v139.30496H614.4V716.75904h307.2zM448.93184 340.6336L620.2368 511.95904h-39.95648c-75.27424 0-136.54016-61.22496-136.54016-136.52992-0.01024-12.12416 2.12992-23.63392 5.19168-34.79552z m-198.26688-33.46432a68.32128 68.32128 0 0 1 68.25984-68.22912c18.19648 0 35.36896 7.09632 48.27136 19.99872l28.4672 28.4672a202.37312 202.37312 0 0 0-20.20352 88.03328c0 112.92672 91.86304 204.8 204.8 204.8h108.22656l68.27008 68.25984H592.00512c-188.20096 0-341.34016-153.1392-341.34016-341.32992z" p-id="3271" fill="#bbdefb"></path></svg>
|
After Width: | Height: | Size: 1.2 KiB |
@ -16,7 +16,10 @@
|
||||
<div style="height: 1.2rem;"></div>
|
||||
<body>
|
||||
<nav>
|
||||
<div class="week-title" v-for="i in hide_weekend? 5:7" :class="highlightWeek == i%7? 'highlight':''" :key="i">{{week_day[i-1]}}</div>
|
||||
<div class="week-title" v-for="i in hide_weekend? 5:7" :class="highlightWeek == i%7? 'highlight':''" :key="i">
|
||||
<p>{{week_day[i-1]}}</p>
|
||||
<p>{{date_arr[i-1]}}</p>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="main">
|
||||
<v-touch @swiperight="openDrawer()">
|
||||
@ -104,6 +107,8 @@ export default {
|
||||
font_color: ["58a2d9", "2bbbbc", "8379d8", "e89812", "d36e88", "39b54a", "9c26b0", "e03997", "a5673f", '48f350'],
|
||||
// 初始化互斥锁
|
||||
init_lock: false,
|
||||
// 本周日期列表
|
||||
date_arr: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -142,6 +147,7 @@ export default {
|
||||
// this.current_week = this.schedule.data.cur_week > 0 ? this.schedule.data.cur_week : 1;
|
||||
this.getCurrentWeek()
|
||||
this.show_week = lock ? this.current_week : this.show_week;
|
||||
this.getDays()
|
||||
},
|
||||
|
||||
// 改变周数
|
||||
@ -151,6 +157,7 @@ export default {
|
||||
else return;
|
||||
else if (this.show_week < this.max_week) this.show_week++;
|
||||
else return;
|
||||
this.getDays()
|
||||
},
|
||||
|
||||
// 刷新信息
|
||||
@ -172,10 +179,12 @@ export default {
|
||||
swipeLeft(){
|
||||
if (this.show_week > 1)
|
||||
this.show_week--;
|
||||
this.getDays()
|
||||
},
|
||||
swipeRight(){
|
||||
if (this.show_week < this.max_week)
|
||||
this.show_week++;
|
||||
this.getDays()
|
||||
},
|
||||
|
||||
// 课程颜色
|
||||
@ -204,6 +213,25 @@ export default {
|
||||
this.current_week = Math.floor(days / 7) + 1;
|
||||
}
|
||||
},
|
||||
|
||||
// 获取本周日期
|
||||
getDays() {
|
||||
const day_time = 1000 * 60 * 60 * 24,
|
||||
start = 1582473600000;
|
||||
let week_start_time = (this.show_week - 1) * 7 * day_time + start
|
||||
this.date_arr = []
|
||||
for(let i = 1; i <= 7; i++) {
|
||||
let current_day = new Date(week_start_time).getDate()
|
||||
if( current_day < 10) {
|
||||
current_day = '0' + current_day
|
||||
}
|
||||
if (i == 1 || current_day == '01') {
|
||||
current_day = (new Date(week_start_time).getMonth() + 1) + '/' + current_day
|
||||
}
|
||||
this.date_arr.push(current_day)
|
||||
week_start_time += day_time
|
||||
}
|
||||
},
|
||||
|
||||
// 打开抽屉
|
||||
openDrawer() {
|
||||
@ -285,12 +313,12 @@ export default {
|
||||
}
|
||||
}
|
||||
nav {
|
||||
height: 0.8rem;
|
||||
height: 1rem;
|
||||
padding-left: 0.7rem;
|
||||
display: flex;
|
||||
.week-title {
|
||||
flex: 1;
|
||||
line-height: 0.8rem;
|
||||
line-height: 0.5rem;
|
||||
font-size: 0.3rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user