From 8e40ff6b05d4d8d2e237d2f4975b8f7a2b0ae41d Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Tue, 24 Nov 2020 15:16:17 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E7=9B=B4=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.ts | 6 +++--- src/views/login/Login.vue | 10 ++++++---- src/views/mine/ReleaseWebcast.vue | 7 ++----- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/store/index.ts b/src/store/index.ts index 8575390..6abc4a9 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -68,9 +68,9 @@ export default createStore({ views:0 }, qh: { - code: "86", - ename: "China", - name: "中国", + code: "", + ename: "", + name: "", } }, mutations: { diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index a442eb0..6934d48 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -23,12 +23,13 @@ Jiangsu --> - + {{i.name}}+{{i.code}} +
@@ -79,7 +80,7 @@
-
+
{{i.title}}
@@ -124,6 +125,7 @@ import { message } from 'ant-design-vue'; import router from '@/router'; import { useI18n } from '@/utils/i18n'; import store from '@/store'; +import { getValue } from '@/utils/common'; export default defineComponent({ name: "Login", @@ -147,7 +149,7 @@ export default defineComponent({ password: '123456' }) const mrqh = computed(() => store.state.qh) - const hqqh = computed(() => { return mrqh.value.name + '+' + mrqh.value.code }) + const hqqh = computed(() => { console.log(mrqh.value.name + '+' + mrqh.value.code); return (getValue("Lanvuage") == "en" ?mrqh.value.ename : mrqh.value.name) + '+' + mrqh.value.code }) const quhaolist = ref([ { code: "86", @@ -156,7 +158,7 @@ export default defineComponent({ } ]) const myquhao=ref(mrqh.value.code) - const videolist=ref([{}]) + const videolist=ref([]) onMounted(async ()=>{ quhaolist.value=await getquhaolist() diff --git a/src/views/mine/ReleaseWebcast.vue b/src/views/mine/ReleaseWebcast.vue index e3bb555..82a36e1 100644 --- a/src/views/mine/ReleaseWebcast.vue +++ b/src/views/mine/ReleaseWebcast.vue @@ -203,11 +203,8 @@
{{ lan.$t("wuzhibozige") }}
-
- - {{ lives.msg }} +
+
-- 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 @@