跳转首页 注册报错
This commit is contained in:
parent
8e40ff6b05
commit
817e7b9041
19
src/App.vue
19
src/App.vue
@ -16,8 +16,9 @@ import { provideI18n } from "@/utils/i18n"
|
|||||||
import i18ninit from "@/i18n/init"
|
import i18ninit from "@/i18n/init"
|
||||||
import enUS from 'ant-design-vue/es/locale/en_US';
|
import enUS from 'ant-design-vue/es/locale/en_US';
|
||||||
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||||
import dayjs from 'dayjs';
|
import dayjs, { locale } from 'dayjs';
|
||||||
import { getaddr } from './api';
|
import { getaddr } from './api';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
setup(){
|
setup(){
|
||||||
@ -29,6 +30,12 @@ export default defineComponent({
|
|||||||
store.commit("login", true)
|
store.commit("login", true)
|
||||||
store.dispatch("getcode");
|
store.dispatch("getcode");
|
||||||
store.dispatch("setUserInfo");
|
store.dispatch("setUserInfo");
|
||||||
|
const patn = useRoute().path;
|
||||||
|
if(patn == "/"){
|
||||||
|
router.push("/mine/archives").then(()=>{
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
console.log('ip')
|
console.log('ip')
|
||||||
@ -38,14 +45,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
const zh = zhCN
|
const zh = zhCN
|
||||||
const en = enUS
|
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{
|
return{
|
||||||
zh,
|
zh,
|
||||||
en,
|
en,
|
||||||
|
@ -315,6 +315,10 @@ export default {
|
|||||||
leixingcuowu:"File type error",
|
leixingcuowu:"File type error",
|
||||||
zuida:"maximum",
|
zuida:"maximum",
|
||||||
zhibotishi1:"Congratulations on your qualification for beelink live streaming course.",
|
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:"",
|
shichangtishi:"",
|
||||||
renshutishi: '',
|
renshutishi: '',
|
||||||
tixianzhu: "",
|
tixianzhu: "",
|
||||||
|
@ -315,6 +315,10 @@ export default {
|
|||||||
leixingcuowu:"文件类型错误",
|
leixingcuowu:"文件类型错误",
|
||||||
zuida:"最大",
|
zuida:"最大",
|
||||||
zhibotishi1:"恭喜您在Beelink有直播课资格",
|
zhibotishi1:"恭喜您在Beelink有直播课资格",
|
||||||
|
shipindianjiliang: "视频点击量",
|
||||||
|
paiming: "排名",
|
||||||
|
wo: "我",
|
||||||
|
yizhucexuesheng: "该手机已注册学生端账号",
|
||||||
shichangtishi:"",
|
shichangtishi:"",
|
||||||
renshutishi: '',
|
renshutishi: '',
|
||||||
tixianzhu:"",
|
tixianzhu:"",
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
import { computed, defineComponent, onMounted, reactive, ref } from "vue";
|
import { computed, defineComponent, onMounted, reactive, ref } from "vue";
|
||||||
import LoginTab from "@/components/login/LoginTab.vue";
|
import LoginTab from "@/components/login/LoginTab.vue";
|
||||||
import NavTop from "@/components/NavTop.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 { message } from 'ant-design-vue';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { useI18n } from '@/utils/i18n';
|
import { useI18n } from '@/utils/i18n';
|
||||||
@ -181,7 +181,7 @@ export default defineComponent({
|
|||||||
* 点击获取验证码 触发倒计时
|
* 点击获取验证码 触发倒计时
|
||||||
*/
|
*/
|
||||||
let lock=false
|
let lock=false
|
||||||
const getcode: () => void = () => {
|
async function getcode() {
|
||||||
console.log(phone.value);
|
console.log(phone.value);
|
||||||
if (lock) {
|
if (lock) {
|
||||||
console.log("lock")
|
console.log("lock")
|
||||||
@ -191,6 +191,13 @@ export default defineComponent({
|
|||||||
message.error(lan.$t('shoujihaoweikong'));
|
message.error(lan.$t('shoujihaoweikong'));
|
||||||
return;
|
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;
|
lock = true;
|
||||||
console.log(myquhao.value,"quhao")
|
console.log(myquhao.value,"quhao")
|
||||||
sendsms(myquhao.value, phone.value);
|
sendsms(myquhao.value, phone.value);
|
||||||
@ -207,7 +214,7 @@ export default defineComponent({
|
|||||||
clearInterval(timestep);
|
clearInterval(timestep);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
}
|
||||||
function getquhao(e?: any){
|
function getquhao(e?: any){
|
||||||
console.log(e)
|
console.log(e)
|
||||||
myquhao.value = e.toString()
|
myquhao.value = e.toString()
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="rank-list">
|
<div class="rank-list">
|
||||||
<div class="list-thead">
|
<div class="list-thead">
|
||||||
<div class="ranking-number">排名</div>
|
<div class="ranking-number">{{lan.$t('paiming')}}</div>
|
||||||
<div class="user-info">姓名</div>
|
<div class="user-info">{{lan.$t("xingming")}}</div>
|
||||||
<div class="hits">视频点击量</div>
|
<div class="hits">{{lan.$t("shipindianjiliang")}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-body">
|
<div class="list-body">
|
||||||
<div class="rank-item" v-for="(item,index) in newList" :key="index" :class="{'mine-item': item.isme }">
|
<div class="rank-item" v-for="(item,index) in newList" :key="index" :class="{'mine-item': item.isme }">
|
||||||
<div class="other-rank" :class="{'mine-rank': item.isme }">
|
<div class="other-rank" :class="{'mine-rank': item.isme }">
|
||||||
<div class="ranking-number">
|
<div class="ranking-number">
|
||||||
<span v-if="item.isme" class="mine">我的成绩</span>
|
<span v-if="item.isme" class="mine">{{lan.$t("wo")}}</span>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<img src="@/static/images/rank_first.png" class="rank-img" v-if="index === 0" />
|
<img src="@/static/images/rank_first.png" class="rank-img" v-if="index === 0" />
|
||||||
<img src="@/static/images/rank_second.png" class="rank-img" v-else-if="index === 1" />
|
<img src="@/static/images/rank_second.png" class="rank-img" v-else-if="index === 1" />
|
||||||
@ -39,6 +39,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, ref } from 'vue';
|
import { defineComponent, ref } from 'vue';
|
||||||
import { UserOutlined } from '@ant-design/icons-vue';
|
import { UserOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { useI18n } from '@/utils/i18n';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'RankList',
|
name: 'RankList',
|
||||||
@ -53,6 +54,7 @@ export default defineComponent({
|
|||||||
setup(props) {
|
setup(props) {
|
||||||
const deadLine = ref(4); // 写死的合格线
|
const deadLine = ref(4); // 写死的合格线
|
||||||
const list = ref(props.list);
|
const list = ref(props.list);
|
||||||
|
const lan = useI18n()
|
||||||
let mineRank = 0; // 自己的排名
|
let mineRank = 0; // 自己的排名
|
||||||
list.value!.forEach((element: any) => {
|
list.value!.forEach((element: any) => {
|
||||||
if(element.isme) {
|
if(element.isme) {
|
||||||
@ -67,6 +69,7 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
newList,
|
newList,
|
||||||
deadLine,
|
deadLine,
|
||||||
|
lan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user