{{ lan.$t("wuzhibozige") }}
-
--
2.45.2
From 817e7b90417e004dc48948e4a7c53b15f7345d27 Mon Sep 17 00:00:00 2001
From: luyuan <1162963624@qq.com>
Date: Tue, 24 Nov 2020 15:38:26 +0800
Subject: [PATCH 02/11] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E9=A6=96=E9=A1=B5=20?=
=?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 19 ++++++++++---------
src/i18n/en.ts | 4 ++++
src/i18n/zh.ts | 4 ++++
src/views/login/Login.vue | 13 ++++++++++---
src/views/mine/RankList.vue | 11 +++++++----
5 files changed, 35 insertions(+), 16 deletions(-)
diff --git a/src/App.vue b/src/App.vue
index 2d438da..9d4499d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -16,8 +16,9 @@ import { provideI18n } from "@/utils/i18n"
import i18ninit from "@/i18n/init"
import enUS from 'ant-design-vue/es/locale/en_US';
import zhCN from 'ant-design-vue/es/locale/zh_CN';
-import dayjs from 'dayjs';
+import dayjs, { locale } from 'dayjs';
import { getaddr } from './api';
+import { useRoute } from 'vue-router';
export default defineComponent({
setup(){
@@ -29,6 +30,12 @@ export default defineComponent({
store.commit("login", true)
store.dispatch("getcode");
store.dispatch("setUserInfo");
+ const patn = useRoute().path;
+ if(patn == "/"){
+ router.push("/mine/archives").then(()=>{
+ location.reload()
+ })
+ }
}else{
console.log('ip')
@@ -38,14 +45,8 @@ export default defineComponent({
}
const zh = zhCN
const en = enUS
- /* eslint-disable */
- const utc = require('dayjs/plugin/utc') // dependent on utc plugin
- /* eslint-disable */
- const timezone = require('dayjs/plugin/timezone')
- const days: any = dayjs;
- dayjs.extend(utc)
- dayjs.extend(timezone)
- console.log(days.tz.guess())
+
+
return{
zh,
en,
diff --git a/src/i18n/en.ts b/src/i18n/en.ts
index 72d793e..cb4d791 100644
--- a/src/i18n/en.ts
+++ b/src/i18n/en.ts
@@ -315,6 +315,10 @@ export default {
leixingcuowu:"File type error",
zuida:"maximum",
zhibotishi1:"Congratulations on your qualification for beelink live streaming course.",
+ shipindianjiliang: "Video clicks",
+ paiming: "rank",
+ wo: "my",
+ yizhucexuesheng: "This number is already registered as a student",
shichangtishi:"",
renshutishi: '',
tixianzhu: "",
diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts
index d70d87b..8721d90 100644
--- a/src/i18n/zh.ts
+++ b/src/i18n/zh.ts
@@ -315,6 +315,10 @@ export default {
leixingcuowu:"文件类型错误",
zuida:"最大",
zhibotishi1:"恭喜您在Beelink有直播课资格",
+ shipindianjiliang: "视频点击量",
+ paiming: "排名",
+ wo: "我",
+ yizhucexuesheng: "该手机已注册学生端账号",
shichangtishi:"",
renshutishi: '',
tixianzhu:"",
diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue
index 6934d48..dc7fc0a 100644
--- a/src/views/login/Login.vue
+++ b/src/views/login/Login.vue
@@ -120,7 +120,7 @@
import { computed, defineComponent, onMounted, reactive, ref } from "vue";
import LoginTab from "@/components/login/LoginTab.vue";
import NavTop from "@/components/NavTop.vue"
-import { checksmscode, getquhaolist, getwebvideolist, loginpass, sendsms } from '@/api';
+import { checksmscode, checkuser, getquhaolist, getwebvideolist, loginpass, sendsms } from '@/api';
import { message } from 'ant-design-vue';
import router from '@/router';
import { useI18n } from '@/utils/i18n';
@@ -181,7 +181,7 @@ export default defineComponent({
* 点击获取验证码 触发倒计时
*/
let lock=false
- const getcode: () => void = () => {
+ async function getcode() {
console.log(phone.value);
if (lock) {
console.log("lock")
@@ -191,6 +191,13 @@ export default defineComponent({
message.error(lan.$t('shoujihaoweikong'));
return;
}
+ const iszc: any = await checkuser({phone: phone.value})
+ if(iszc.data){
+ if(iszc.data.type == 0){
+ message.error(lan.$t("yizhucexuesheng"))
+ }
+ return ;
+ }
lock = true;
console.log(myquhao.value,"quhao")
sendsms(myquhao.value, phone.value);
@@ -207,7 +214,7 @@ export default defineComponent({
clearInterval(timestep);
}
}, 1000);
- };
+ }
function getquhao(e?: any){
console.log(e)
myquhao.value = e.toString()
diff --git a/src/views/mine/RankList.vue b/src/views/mine/RankList.vue
index 7f9e7a0..311832c 100644
--- a/src/views/mine/RankList.vue
+++ b/src/views/mine/RankList.vue
@@ -1,15 +1,15 @@
-
排名
-
姓名
-
视频点击量
+
{{lan.$t('paiming')}}
+
{{lan.$t("xingming")}}
+
{{lan.$t("shipindianjiliang")}}
-
我的成绩
+
{{lan.$t("wo")}}
![](@/static/images/rank_second.png)
@@ -39,6 +39,7 @@
diff --git a/src/api/index.ts b/src/api/index.ts
index 5f009af..eee83b3 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -1167,3 +1167,7 @@ export async function setusername(src: string){
}
console.log(res)
}
+
+export async function logoutapi() {
+ await get("logout");
+}
\ No newline at end of file
diff --git a/src/components/Menu.vue b/src/components/Menu.vue
index a25f5bd..595d49e 100644
--- a/src/components/Menu.vue
+++ b/src/components/Menu.vue
@@ -130,6 +130,7 @@
}