zj #69
@ -12,8 +12,15 @@ import { del, get, post, put, setToken } from './base'
|
||||
* @param password 密码
|
||||
*/
|
||||
|
||||
export async function loginpass(phone: string, password: string){
|
||||
const res = await post<LoginData>("login",{type: 2,username: phone, password: password});
|
||||
export async function loginpass(phone: string, password: string,type?: number,smscode?: string){
|
||||
let newdata={}
|
||||
if(type==1){
|
||||
newdata={type:type?type:2,username: phone, smscode: smscode}
|
||||
}else{
|
||||
newdata={type:type?type:2,username: phone, password: password}
|
||||
}
|
||||
|
||||
const res = await post<LoginData>("login",newdata);
|
||||
console.log(res.code)
|
||||
if(res.code == 1){
|
||||
message.error(res.msg)
|
||||
@ -576,6 +583,59 @@ export async function checkuser(data?: any){
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区号列表
|
||||
*/
|
||||
export async function getquhaolist() {
|
||||
const res=await get("phonecodes")
|
||||
// console.log(res)
|
||||
return res.data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取时区列表
|
||||
*/
|
||||
export async function getzonelist(): Promise<any>{
|
||||
const res=await get("timezones")
|
||||
// console.log(res)
|
||||
return res.data
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改时区 货币 语言
|
||||
*/
|
||||
export async function editsystemsetting(e?: any): Promise<boolean> {
|
||||
let newdata={}
|
||||
newdata=e
|
||||
const res = await put(`member/${store.state.userinfo.memberid}`,newdata);
|
||||
console.log(res)
|
||||
if(res.code == 0){
|
||||
message.success("修改成功")
|
||||
store.dispatch("setUserInfo");
|
||||
return true;
|
||||
}else{
|
||||
message.error(res.msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 货币列表
|
||||
*/
|
||||
export async function getcurrencys(){
|
||||
const res=await get("currencys")
|
||||
return res.data
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录右侧 视频列表
|
||||
*/
|
||||
export async function getwebvideolist() {
|
||||
const res=await get("webvideos")
|
||||
console.log(res)
|
||||
return res.data
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送验证码
|
||||
* @param phone 手机号
|
||||
@ -718,6 +778,13 @@ export async function getliveinfo(id: number){
|
||||
return {...liveinfo,studentlist}
|
||||
}
|
||||
|
||||
/**
|
||||
* 参与直播的学生列表
|
||||
*/
|
||||
export async function getstudentlist(data?: any) {
|
||||
const studentlist = (await get<StudentList[]>("studentLive",data)).data;
|
||||
return studentlist
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播日历
|
||||
@ -746,7 +813,20 @@ export async function cancellive(id: number, status: number){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改手机号
|
||||
*/
|
||||
export async function changetel(e: string) {
|
||||
const res = await put(`member/${store.state.userinfo.memberid}`,{mobile:e});
|
||||
console.log(res)
|
||||
if(res.code == 0){
|
||||
message.success("修改成功")
|
||||
return true;
|
||||
}else{
|
||||
message.error(res.msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -2,14 +2,14 @@
|
||||
<div class="cont">
|
||||
<div class="title">
|
||||
<div>上课学生</div>
|
||||
<div class="more">查看详情</div>
|
||||
<div class="more" @click="toxq">查看详情</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="item" v-for="(i, j) in list" :key="j">
|
||||
<div style="display: flex">
|
||||
<img :src="i.img" alt="" />
|
||||
<div class="stuinfo">
|
||||
<div>{{ i.name }}</div>
|
||||
<div>{{ i.name }} {{zid}}</div>
|
||||
<div class="lessonname">{{ i.interest }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -236,12 +236,14 @@
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { cancellive, refusedtolive } from '@/api';
|
||||
import router from '@/router';
|
||||
import { defineComponent, ref, toRaw, watch } from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
info: Array,
|
||||
livestatus: Number,
|
||||
zid:Number
|
||||
},
|
||||
setup(props) {
|
||||
const modalNode = () => document.getElementsByClassName('modal-container')[0]
|
||||
@ -275,6 +277,11 @@ export default defineComponent({
|
||||
hidePhoneModal();
|
||||
}
|
||||
}
|
||||
function toxq(){
|
||||
router.push({path:"/regime/studentlist",query:{liveid:props.zid}})
|
||||
console.log(props.zid,"aaa")
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
list,
|
||||
@ -283,7 +290,8 @@ export default defineComponent({
|
||||
updatePhoneVisible,
|
||||
hidePhoneModal,
|
||||
sum,
|
||||
text
|
||||
text,
|
||||
toxq
|
||||
};
|
||||
},
|
||||
});
|
||||
|
@ -20,21 +20,22 @@
|
||||
</div>
|
||||
<template v-slot:overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="0">
|
||||
<!-- 时区 -->
|
||||
<a-menu-item v-for="(i,j) in zonelist" :key="j" @click="zonechange(i.zoneid)">
|
||||
<div class="selitem">
|
||||
<span>时区1</span>
|
||||
<span>{{i.city}}{{i.gmt}}</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1">
|
||||
<!-- <a-menu-item key="1">
|
||||
<div class="selitem">
|
||||
<span>时区2</span>
|
||||
<span>时区2a</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3">
|
||||
<div class="selitem">
|
||||
<span>时区3</span>
|
||||
<span>时区3a</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</a-menu-item> -->
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@ -42,26 +43,27 @@
|
||||
<a-dropdown :trigger="['click']" :getPopupContainer="triggerNode => triggerNode.parentNode">
|
||||
<div class="item" @click="e => e.preventDefault()">
|
||||
<img src="@/static/images/qianbi.png" alt="" class="icon">
|
||||
<div class="name">{{userinfo.currency}}</div>
|
||||
<div class="name">{{userinfo.currencyValue}}</div>
|
||||
<img src="@/static/images/jiantou2.png" alt="" class="down">
|
||||
</div>
|
||||
<template v-slot:overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="0">
|
||||
<div class="selitem">
|
||||
<span>时区1</span>
|
||||
<!-- 货币 -->
|
||||
<a-menu-item v-for="(i,j) in currencylist" :key="j">
|
||||
<div class="selitem" @click="currencychange(i.value)">
|
||||
<span>{{i.name}}</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1">
|
||||
<!-- <a-menu-item key="1">
|
||||
<div class="selitem">
|
||||
<span>时区2</span>
|
||||
<span>时区2b</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3">
|
||||
<div class="selitem">
|
||||
<span>时区3</span>
|
||||
<span>时区3b</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</a-menu-item> -->
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@ -73,21 +75,22 @@
|
||||
</div>
|
||||
<template v-slot:overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="0">
|
||||
<div class="selitem">
|
||||
<span>时区1</span>
|
||||
<!-- 语言 -->
|
||||
<a-menu-item v-for="(i,j) in languagelist" :key="j">
|
||||
<div class="selitem" @click="setlanguage(i.value)">
|
||||
<span>{{i.name}}</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="1">
|
||||
<!-- <a-menu-item key="1">
|
||||
<div class="selitem">
|
||||
<span>时区2</span>
|
||||
<span>时区2cc</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="3">
|
||||
<div class="selitem">
|
||||
<span>时区3</span>
|
||||
<span>时区3c</span>
|
||||
</div>
|
||||
</a-menu-item>
|
||||
</a-menu-item> -->
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@ -174,9 +177,10 @@
|
||||
}
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { editsystemsetting, getcurrencys, getlanguages, getzonelist } from '@/api';
|
||||
import router from '@/router';
|
||||
import store from '@/store';
|
||||
import { computed, defineComponent, ref } from 'vue';
|
||||
import { computed, defineComponent, onMounted, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
export default defineComponent({
|
||||
@ -191,6 +195,38 @@ export default defineComponent({
|
||||
const routes = useRoute();
|
||||
console.log(routes.path);
|
||||
const types = ref(props.type)
|
||||
const zonelist=ref<any>([{
|
||||
city: "中途岛",
|
||||
gmt: "GMT-11:00",
|
||||
id: "Pacific/Midway",
|
||||
zoneid: 1
|
||||
|
||||
}])
|
||||
const selectedzone=ref([])
|
||||
const currencylist=ref<any>([{
|
||||
alias: "CNY",
|
||||
code: "104110041000",
|
||||
createdAt: "2020-08-19 11:54:59",
|
||||
deletedAt: null,
|
||||
dictionaryid: 241,
|
||||
name: "人民币¥",
|
||||
position: 1,
|
||||
publish: 1,
|
||||
updatedAt: "2020-08-19 11:54:59",
|
||||
value: "1"
|
||||
}])
|
||||
const languagelist=ref<any>({
|
||||
alias: "",
|
||||
code: "104110011000",
|
||||
createdAt: "2020-08-14 11:08:28",
|
||||
deletedAt: null,
|
||||
dictionaryid: 210,
|
||||
name: "中文",
|
||||
position: 1,
|
||||
publish: 1,
|
||||
updatedAt: "2020-08-14 11:08:28",
|
||||
value: "zh"
|
||||
})
|
||||
console.log(types.value)
|
||||
interface Nav{
|
||||
name: string;
|
||||
@ -228,11 +264,36 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
}
|
||||
onMounted(async () => {
|
||||
zonelist.value=await getzonelist()
|
||||
// console.log(zonelist.value)
|
||||
currencylist.value=await getcurrencys()
|
||||
languagelist.value=await getlanguages()
|
||||
})
|
||||
|
||||
function zonechange(e?: any){
|
||||
// console.log(e,1002)
|
||||
editsystemsetting({zoneid:e})
|
||||
}
|
||||
function currencychange(e?: any){
|
||||
editsystemsetting({currency:parseInt(e)})
|
||||
}
|
||||
function setlanguage(e?: any){
|
||||
editsystemsetting({language:e})
|
||||
}
|
||||
|
||||
return {
|
||||
nav,
|
||||
types,
|
||||
navto,
|
||||
userinfo
|
||||
userinfo,
|
||||
zonelist,
|
||||
zonechange,
|
||||
selectedzone,
|
||||
currencylist,
|
||||
currencychange,
|
||||
languagelist,
|
||||
setlanguage
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="cont">
|
||||
<div class="title">视频数据</div>
|
||||
<div class="info">
|
||||
|
@ -81,6 +81,10 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: "subscriber",
|
||||
component: () => import("../views/regime/Subscriber.vue")
|
||||
},
|
||||
{
|
||||
path: "studentlist",
|
||||
component: () => import("../views/regime/SignupStu.vue")
|
||||
},
|
||||
{
|
||||
path: "live",
|
||||
component: () => import("../views/regime/Live.vue")
|
||||
|
@ -10,6 +10,7 @@ export default createStore({
|
||||
country: "",
|
||||
countryValue: "",
|
||||
cover: "",
|
||||
code:"",
|
||||
createdAt: "",
|
||||
currency: "",
|
||||
currencyValue: "",
|
||||
|
1
src/types/index.d.ts
vendored
1
src/types/index.d.ts
vendored
@ -58,6 +58,7 @@ export interface UserInfo {
|
||||
video: string;
|
||||
desc: string;
|
||||
money: string;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -17,11 +17,17 @@
|
||||
<a-form :layout="formLayout">
|
||||
<a-form-item label="手机号" class="form-item">
|
||||
<a-input-group compact>
|
||||
<a-select default-value="Zhejiang" class="getcode">
|
||||
<!-- <a-select default-value="Zhejiang" class="getcode">
|
||||
<a-select-option value="Zhejiang">
|
||||
中国+0086
|
||||
</a-select-option>
|
||||
<a-select-option value="Jiangsu"> Jiangsu </a-select-option>
|
||||
</a-select> -->
|
||||
<a-select :default-value="quhaolist[0].code" size="small" @change="getquhao" class="getcode">
|
||||
<a-select-option v-for="(i,j) in quhaolist" :key="j" :value="i.code">
|
||||
{{i.name}}+{{i.code}}
|
||||
</a-select-option>
|
||||
<!-- <a-select-option value="Jiangsu"> Jiangsu </a-select-option> -->
|
||||
</a-select>
|
||||
<div class="line"></div>
|
||||
<a-input v-model:value="phone" style="width: 50%" placeholder="请输入您的手机号" />
|
||||
@ -33,10 +39,10 @@
|
||||
点击获取验证码{{ time == 60 ? "" : "(" + time + ")" }}
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<a-input style="width: 50%" placeholder="请输入您的验证码" />
|
||||
<a-input style="width: 50%" placeholder="请输入您的验证码" v-model:value="code"/>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
<div class="submit">立即登录</div>
|
||||
<div class="submit" @click="sublogin">立即登录</div>
|
||||
<div>Beelink公司版权所有 2019—2022</div>
|
||||
</a-form>
|
||||
</div>
|
||||
@ -73,48 +79,14 @@
|
||||
<div class="topdesc">Beelink 开启您的美好学习生活</div>
|
||||
|
||||
<div class="lessons">
|
||||
<div class="lessonitem">
|
||||
<div class="pic"></div>
|
||||
<div class="lessonitem" v-for="(i,j) in videolist" :key="j" @click="tovideoxq(i.videoid)">
|
||||
<img :src="i.img" alt="" class="pic"/>
|
||||
<div class="lessonname">
|
||||
西班牙语A1级教学
|
||||
<span class="score">7.5分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lessonitem">
|
||||
<div class="pic"></div>
|
||||
<div class="lessonname">
|
||||
西班牙语A1级教学
|
||||
<span class="score">7.5分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lessonitem">
|
||||
<div class="pic"></div>
|
||||
<div class="lessonname">
|
||||
西班牙语A1级教学
|
||||
<span class="score">7.5分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lessonitem">
|
||||
<div class="pic"></div>
|
||||
<div class="lessonname">
|
||||
西班牙语A1级教学
|
||||
<span class="score">7.5分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lessonitem">
|
||||
<div class="pic"></div>
|
||||
<div class="lessonname">
|
||||
西班牙语A1级教学
|
||||
<span class="score">7.5分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lessonitem">
|
||||
<div class="pic"></div>
|
||||
<div class="lessonname">
|
||||
西班牙语A1级教学
|
||||
<span class="score">7.5分</span>
|
||||
<div>{{i.title}}</div>
|
||||
<span class="score">{{i.score}}分</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="icons">
|
||||
<img src="@/static/images/weixin.png" alt="" class="icon" />
|
||||
@ -146,10 +118,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, reactive, ref } from "vue";
|
||||
import { defineComponent, onMounted, reactive, ref } from "vue";
|
||||
import LoginTab from "@/components/login/LoginTab.vue";
|
||||
import NavTop from "@/components/NavTop.vue"
|
||||
import { loginpass } from '@/api';
|
||||
import { checksmscode, getquhaolist, getwebvideolist, loginpass, sendsms } from '@/api';
|
||||
import { message } from 'ant-design-vue';
|
||||
import router from '@/router';
|
||||
|
||||
export default defineComponent({
|
||||
name: "Login",
|
||||
@ -165,10 +139,28 @@ export default defineComponent({
|
||||
const tabselected = ref(1); //tab切换的标志
|
||||
const time = ref(60);//倒计时
|
||||
const phone = ref(""); // 手机号
|
||||
const code =ref("")
|
||||
const myquhao=ref("86")
|
||||
const userinfo = reactive({
|
||||
phone: '13152639856',
|
||||
password: '123456'
|
||||
})
|
||||
const quhaolist = ref<any>([
|
||||
{
|
||||
code: "86",
|
||||
id: 214,
|
||||
name: "中国"
|
||||
}
|
||||
])
|
||||
const videolist=ref<any>([{}])
|
||||
|
||||
onMounted(async ()=>{
|
||||
quhaolist.value=await getquhaolist()
|
||||
videolist.value=await getwebvideolist()
|
||||
console.log(videolist.value,"listsssss")
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* @param val 子组件传过来的值
|
||||
*/
|
||||
@ -182,10 +174,25 @@ export default defineComponent({
|
||||
* @param
|
||||
* 点击获取验证码 触发倒计时
|
||||
*/
|
||||
let lock=false
|
||||
const getcode: () => void = () => {
|
||||
console.log(phone.value);
|
||||
const timestep = setInterval(() => {
|
||||
if (lock) {
|
||||
console.log("lock")
|
||||
return;
|
||||
}
|
||||
if (phone.value == "") {
|
||||
message.error("手机号不能为空");
|
||||
return;
|
||||
}
|
||||
lock = true;
|
||||
console.log(myquhao.value,"quhao")
|
||||
sendsms(myquhao.value + phone.value, 0);
|
||||
const timestep = setInterval(() => {
|
||||
console.log(11112);
|
||||
|
||||
|
||||
|
||||
time.value = time.value - 1;
|
||||
if (time.value > 0) {
|
||||
console.log();
|
||||
@ -195,11 +202,28 @@ export default defineComponent({
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
function getquhao(e?: any){
|
||||
console.log(e)
|
||||
myquhao.value = e.toString()
|
||||
console.log(myquhao.value)
|
||||
}
|
||||
function login(): void {
|
||||
console.log(userinfo.phone,userinfo.password)
|
||||
loginpass(userinfo.phone,userinfo.password)
|
||||
|
||||
}
|
||||
|
||||
function sublogin(){
|
||||
console.log(11)
|
||||
//
|
||||
// checksmscode(myquhao.value+phone.value,code.value)
|
||||
loginpass(phone.value,'',1,code.value)
|
||||
}
|
||||
|
||||
function tovideoxq(e?: number){
|
||||
console.log(e)
|
||||
router.push("/regime/videoinfo?id="+e)
|
||||
}
|
||||
return {
|
||||
formLayout,
|
||||
tabselected,
|
||||
@ -208,7 +232,14 @@ export default defineComponent({
|
||||
time,
|
||||
phone,
|
||||
login,
|
||||
userinfo
|
||||
userinfo,
|
||||
quhaolist,
|
||||
getquhao,
|
||||
code,
|
||||
myquhao,
|
||||
sublogin,
|
||||
videolist,
|
||||
tovideoxq
|
||||
};
|
||||
},
|
||||
});
|
||||
@ -347,14 +378,23 @@ export default defineComponent({
|
||||
.pic {
|
||||
width: 200px;
|
||||
height: 112px;
|
||||
background: #98a6b8;
|
||||
// background: #98a6b8;
|
||||
border-radius: 18px 18px 0px 0px;
|
||||
}
|
||||
.lessonname {
|
||||
color: #121212;
|
||||
font-size: 12px;
|
||||
line-height: 45px;
|
||||
// line-height: 45px;
|
||||
text-indent: 17px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
>div{
|
||||
width: 140px;
|
||||
white-space:nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
.score {
|
||||
color: #f55456;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@
|
||||
<div class="form-item">
|
||||
<label class="label">手机验证码</label>
|
||||
<a-input size="small" v-model:value="verificationCode" />
|
||||
<div @click="sendVerificationCode(userinfo.mobile)" class="confirm-btn">获取验证码<span v-if="remainTime>0">({{ remainTime }}s)</span></div>
|
||||
<div @click="sendVerificationCode(userinfo.code+userinfo.mobile)" class="confirm-btn">获取验证码<span v-if="remainTime>0">({{ remainTime }}s)</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="nextPhoneStep" class="confirm-btn">下一步</div>
|
||||
@ -220,15 +220,25 @@
|
||||
<div class="form-box">
|
||||
<div class="form-item">
|
||||
<label class="label">手机号</label>
|
||||
<a-input size="small" v-model:value="bindPhone.number" />
|
||||
<!-- <a-input size="small" v-model:value="bindPhone.number" /> -->
|
||||
<a-input-group compact class="telbox">
|
||||
<a-select :default-value="quhaolist[0].code" size="small" @change="getquhao">
|
||||
<a-select-option v-for="(i,j) in quhaolist" :key="j" :value="i.code">
|
||||
{{i.name}}+{{i.code}}
|
||||
</a-select-option>
|
||||
<!-- <a-select-option value="Jiangsu"> Jiangsu </a-select-option> -->
|
||||
</a-select>
|
||||
<div class="line"></div>
|
||||
<a-input v-model:value="mynewtel" size="small" placeholder="请输入您的手机号" />
|
||||
</a-input-group>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label class="label">手机验证码</label>
|
||||
<a-input size="small" v-model:value="bindPhone.code" />
|
||||
<div @click="sendVerificationCode" class="confirm-btn">获取验证码<span v-if="remainTime>0">({{ remainTime }}s)</span></div>
|
||||
<div @click="sendVerificationCode(myquhao+mynewtel)" class="confirm-btn">获取验证码<span v-if="remainTime>0">({{ remainTime }}s)</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div @click="nextPhoneStep" class="confirm-btn">绑定手机</div>
|
||||
<div @click="updatePhoneNumber" class="confirm-btn">绑定手机</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 修改密码 -->
|
||||
@ -277,7 +287,7 @@ import { uploadflie } from "@/utils/vod"
|
||||
import store from '@/store';
|
||||
import smile from "@/static/images/smile.png"
|
||||
import smilet from "@/static/images/smilet.png"
|
||||
import { editpassword, getarchives, getlanguages, putmember, sendsms } from "@/api/index"
|
||||
import { changetel, checksmscode, editpassword, getarchives, getlanguages, getquhaolist, putmember, sendsms } from "@/api/index"
|
||||
import { message } from 'ant-design-vue';
|
||||
|
||||
export default defineComponent({
|
||||
@ -306,10 +316,17 @@ export default defineComponent({
|
||||
|
||||
const chiveslist = ref<any>([[],[]]);
|
||||
const languages = ref<unknown>([]);
|
||||
const quhaolist = ref<any>([]);
|
||||
const myquhao = ref<string>("");
|
||||
|
||||
const mynewtel = ref<string>("");
|
||||
const isSecondStep: Ref<boolean> = ref(false);
|
||||
onMounted(async ()=>{
|
||||
chiveslist.value = await getarchives()
|
||||
languages.value = await getlanguages()
|
||||
quhaolist.value=await getquhaolist()
|
||||
myquhao.value=quhaolist.value[0].code
|
||||
console.log(quhaolist.value,"listsssss")
|
||||
})
|
||||
|
||||
/**
|
||||
@ -371,10 +388,11 @@ export default defineComponent({
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
function sendVerificationCode(phone: string): void {
|
||||
function sendVerificationCode(tel: string): void {
|
||||
if(remainTime.value === 0) {
|
||||
computedVerificationCode();
|
||||
sendsms(phone, 0)
|
||||
console.log(tel,"send")
|
||||
sendsms(tel, 0)
|
||||
}
|
||||
}
|
||||
// 绑定手机号是否是第二步
|
||||
@ -389,16 +407,45 @@ export default defineComponent({
|
||||
/**
|
||||
* 绑定手机号下一步
|
||||
*/
|
||||
function nextPhoneStep(): void {
|
||||
isSecondStep.value = true;
|
||||
async function nextPhoneStep(): Promise<void> {
|
||||
|
||||
remainTime.value = 0
|
||||
if(!isSecondStep.value){
|
||||
console.log(formData.value.code)
|
||||
if(verificationCode.value == ""){
|
||||
return ;
|
||||
}
|
||||
const res=await checksmscode(formData.value.code+formData.value.mobile,verificationCode.value)
|
||||
console.log(res,"0.0")
|
||||
if(res){
|
||||
isSecondStep.value = true;
|
||||
}
|
||||
// isSecondStep.value = true;
|
||||
}
|
||||
|
||||
|
||||
// isSecondStep.value = true;
|
||||
}
|
||||
/**
|
||||
* 修改手机号
|
||||
* @return { void }
|
||||
*/
|
||||
function updatePhoneNumber (): void {
|
||||
async function updatePhoneNumber (): Promise<void> {
|
||||
console.log('修改手机号');
|
||||
|
||||
console.log(mynewtel.value,myquhao.value,bindPhone.code)
|
||||
const res=await checksmscode(myquhao.value+mynewtel.value,bindPhone.code.toString())
|
||||
console.log(res,"xiugai")
|
||||
if(res){
|
||||
const res1=await changetel(mynewtel.value)
|
||||
if(res1){
|
||||
store.dispatch("setUserInfo");
|
||||
updatePhoneVisible.value=false
|
||||
}
|
||||
}
|
||||
}
|
||||
function getquhao(e?: any){
|
||||
console.log(e)
|
||||
myquhao.value=e.toString()
|
||||
}
|
||||
// 是否显示修改密码框
|
||||
const updatePasswordVisible: Ref<boolean> = ref(false);
|
||||
@ -553,7 +600,11 @@ export default defineComponent({
|
||||
chiveslist,
|
||||
languages,
|
||||
uploadprogress,
|
||||
choosewillsay
|
||||
choosewillsay,
|
||||
mynewtel,
|
||||
quhaolist,
|
||||
getquhao,
|
||||
myquhao
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -567,6 +618,10 @@ export default defineComponent({
|
||||
padding: 46px;
|
||||
border-radius: 17px;
|
||||
position: relative;
|
||||
.telbox{
|
||||
margin-left:15px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.update-btn {
|
||||
font-size: 11px;
|
||||
color: #08AE98;
|
||||
|
@ -29,10 +29,15 @@
|
||||
<div class="texts">
|
||||
<div>账户余额</div>
|
||||
<div class="num">
|
||||
<span class="moneyicon" v-if="ifchina">¥</span>
|
||||
<span class="moneyicon" v-else> $ </span>
|
||||
{{store.state.userinfo.moneyValue}}
|
||||
|
||||
<!-- <span class="moneyicon" v-if="ifchina">¥</span>
|
||||
<span class="moneyicon" v-else> $ </span> -->
|
||||
{{store.state.userinfo.money.split('.')[0]}}
|
||||
<span class="float">{{store.state.userinfo.money.split('.')[1]?'.'+store.state.userinfo.money.split('.')[1]:'.00'}}</span>
|
||||
|
||||
<!-- {{store.state.userinfo.money.split('.')[0]}}
|
||||
<span class="float">{{'.'+store.state.userinfo.money.split('.')[1]}}</span> -->
|
||||
|
||||
|
||||
<!-- {{store.state.userinfo.money.split('.')[0]}}
|
||||
<span class="float">{{store.state.userinfo.money.split('.')[1]?'.'+store.state.userinfo.money.split('.')[1]:''}}</span> -->
|
||||
|
||||
|
204
src/views/regime/SignupStu.vue
Normal file
204
src/views/regime/SignupStu.vue
Normal file
@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<div class="subscriber">
|
||||
<div class="top">
|
||||
<div class="title">直播报名学生</div>
|
||||
<div class="sel">
|
||||
<img src="@/static/images/sousuo.png" alt="" class="icon" />
|
||||
<input type="text" placeholder="请输入想要搜索的学生姓名" v-model="condition.title" @keyup.enter="search(condition)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mid">
|
||||
<div class="studentlist">
|
||||
<div class="stuitem" v-for="(i,j) in teacherlikedlist" :key="j">
|
||||
<img :src="i.img" alt="" class="photo" />
|
||||
<div>
|
||||
<div class="info">
|
||||
<div class="infoitem">
|
||||
<span class="label">姓名:</span>
|
||||
<span class="one-line-hide">{{i.name}}</span>
|
||||
</div>
|
||||
|
||||
<div class="infoitem">
|
||||
<span class="label">所在国家:</span>
|
||||
<span class="one-line-hide">{{i.live}}</span>
|
||||
</div>
|
||||
|
||||
<div class="infoitem">
|
||||
<span class="label">年龄:</span>
|
||||
<span class="one-line-hide">{{i.age}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
<div class="infoitem">
|
||||
<span class="label">学生母语:</span>
|
||||
<span class="one-line-hide">{{i.mtongue }}</span>
|
||||
</div>
|
||||
|
||||
<div class="infoitem">
|
||||
<span class="label">兴趣点:</span>
|
||||
<span class="one-line-hide">{{i.interestStr}}</span>
|
||||
</div>
|
||||
|
||||
<div class="infoitem">
|
||||
<span class="label">语言等级:</span>
|
||||
<span class="one-line-hide">{{i.levelStr}}</span>
|
||||
</div>
|
||||
|
||||
<div>参加平台直播课程总时长:<span class="time">{{i.length}}min</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="pages">
|
||||
<a-pagination v-model:current="page" :total="teacherlikedlist.total" :showLessItems="true" @change="pagechange"/>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.subscriber {
|
||||
width: 100%;
|
||||
// height: 706px;
|
||||
background-color: #fff;
|
||||
border-radius: 17px;
|
||||
// padding: 40px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-bottom: 200px;
|
||||
.top {
|
||||
display: flex;
|
||||
width: 1241px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 21px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
padding-bottom: 6px;
|
||||
.title {
|
||||
font-size: 13px;
|
||||
color: #121212;
|
||||
font-weight: bold;
|
||||
}
|
||||
.sel {
|
||||
// width: 171px;
|
||||
height: 26px;
|
||||
border: 1px solid #999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// padding: 8px;
|
||||
border-radius: 4px;
|
||||
padding-right:30px;
|
||||
> img {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
margin-left:5px
|
||||
}
|
||||
> input {
|
||||
width: 170px;
|
||||
font-size: 9px;
|
||||
line-height: 1;
|
||||
margin-left: 6px;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mid {
|
||||
.studentlist {
|
||||
width: 1241px;
|
||||
margin: 0 auto;
|
||||
.stuitem {
|
||||
height: 131px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.photo {
|
||||
width: 74px;
|
||||
height: 74px;
|
||||
background: #125cb4;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.info {
|
||||
margin-left: 35px;
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
color: #121212;
|
||||
line-height: 45px;
|
||||
.infoitem {
|
||||
width: 194px;
|
||||
display: flex;
|
||||
.label{
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
color: #08AE98;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.pages {
|
||||
position: absolute;
|
||||
bottom: 114px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
::v-deep(.ant-pagination-next) > .ant-pagination-item-link,
|
||||
::v-deep(.ant-pagination-prev) > .ant-pagination-item-link,
|
||||
::v-deep(.ant-pagination-item),
|
||||
::v-deep(.ant-pagination-jump-next-custom-icon),
|
||||
::v-deep(.ant-pagination-jump-prev-custom-icon) {
|
||||
border: 1px solid #08ae98;
|
||||
}
|
||||
::v-deep(.ant-pagination-item-active) a {
|
||||
color: #fff;
|
||||
}
|
||||
::v-deep(.ant-pagination-item-active) {
|
||||
background-color: #08ae98;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { getstudentlist, getteacherliked } from '@/api';
|
||||
import { defineComponent, onMounted, ref, toRaw } from "vue";
|
||||
import { useRoute } from 'vue-router';
|
||||
export default defineComponent({
|
||||
name: "Subscriber",
|
||||
components: {},
|
||||
setup() {
|
||||
const page = ref(1);
|
||||
const teacherlikedlist =ref<any>({
|
||||
|
||||
});
|
||||
const title=ref('')
|
||||
const condition = ref<any>({
|
||||
title:"",
|
||||
id:Number(useRoute().query.liveid)
|
||||
})
|
||||
onMounted(async () => {
|
||||
console.log(useRoute().query.liveid,"mmmmmmm")
|
||||
const id=useRoute().query.liveid
|
||||
teacherlikedlist.value=await getstudentlist({id:Number(id)})
|
||||
});
|
||||
async function search(e: any){
|
||||
teacherlikedlist.value=await getstudentlist(e)
|
||||
}
|
||||
async function pagechange(){
|
||||
teacherlikedlist.value=await getstudentlist(toRaw(condition.value))
|
||||
}
|
||||
|
||||
return {
|
||||
page,
|
||||
teacherlikedlist,
|
||||
condition,
|
||||
title,
|
||||
search
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
@ -2,7 +2,7 @@
|
||||
<div class="videoinfo">
|
||||
<div class="info">
|
||||
<VideoPlay :url="result.fileurl"></VideoPlay>
|
||||
<VideoCont :videoid="result.videoid" :date="result.created_at" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
|
||||
<VideoCont :videoid="result.videoid" :date="result.createdAt" :watch="result.watch" :share="result.share" :status="result.status"></VideoCont>
|
||||
</div>
|
||||
<VideoReview class="review"></VideoReview>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user