diff --git a/src/api/index.ts b/src/api/index.ts index 4756d95..3297742 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -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("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("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{ + const res=await get("timezones") + // console.log(res) + return res.data +} + +/** + * 修改时区 货币 语言 + */ +export async function editsystemsetting(e?: any): Promise { + 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("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; + } +} /** diff --git a/src/components/LiveCount.vue b/src/components/LiveCount.vue index 075dcb2..375661e 100644 --- a/src/components/LiveCount.vue +++ b/src/components/LiveCount.vue @@ -2,14 +2,14 @@
上课学生
-
查看详情
+
查看详情
-
{{ i.name }}
+
{{ i.name }} {{zid}}
{{ i.interest }}
@@ -236,12 +236,14 @@ \ No newline at end of file diff --git a/src/views/regime/VideoInfo.vue b/src/views/regime/VideoInfo.vue index c7b6ca4..92ba954 100644 --- a/src/views/regime/VideoInfo.vue +++ b/src/views/regime/VideoInfo.vue @@ -2,7 +2,7 @@
- +