From f0fde7114562274a65ed6a37d3d515a2ede4a559 Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Thu, 22 Oct 2020 09:12:24 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 36 +++++++++++++++-- src/store/index.ts | 1 + src/types/index.d.ts | 1 + src/views/login/Login.vue | 67 +++++++++++++++++++++++++++---- src/views/mine/Archives.vue | 79 +++++++++++++++++++++++++++++++------ 5 files changed, 162 insertions(+), 22 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 1b80077..e537d0c 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,16 @@ export async function checkuser(data?:any){ } } +/** + * 获取区号列表 + */ +export async function getquhaolist() { + const res=await get("phonecodes") + // console.log(res) + return res.data +} + + /** * 发送验证码 * @param phone 手机号 @@ -746,7 +763,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/store/index.ts b/src/store/index.ts index 3755e95..256cfbb 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -10,6 +10,7 @@ export default createStore({ country: "", countryValue: "", cover: "", + code:"", created_at: "", currency: "", currencyValue: "", diff --git a/src/types/index.d.ts b/src/types/index.d.ts index 805d22e..0ba4ae5 100644 --- a/src/types/index.d.ts +++ b/src/types/index.d.ts @@ -61,6 +61,7 @@ export interface UserInfo { video: string; desc: string; money: string; + } diff --git a/src/views/login/Login.vue b/src/views/login/Login.vue index 8048b8a..aebb51d 100644 --- a/src/views/login/Login.vue +++ b/src/views/login/Login.vue @@ -17,11 +17,17 @@ - + + + + {{i.name}}+{{i.code}} + +
@@ -33,10 +39,10 @@ 点击获取验证码{{ time == 60 ? "" : "(" + time + ")" }}
- +
-
立即登录
+
立即登录
Beelink公司版权所有 2019—2022
@@ -146,10 +152,11 @@ \ 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 @@
- +
From 71dac353721d4eb60b0b94a7c98643600c6c967d Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Fri, 23 Oct 2020 09:55:27 +0800 Subject: [PATCH 6/6] =?UTF-8?q?login=20=E5=8F=B3=E8=BE=B9=E7=9A=84?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 9 +++++ src/components/NavTop.vue | 2 +- src/views/login/Login.vue | 73 ++++++++++++++-------------------- src/views/mine/Wallet.vue | 13 ++++-- src/views/regime/SignupStu.vue | 7 ++-- 5 files changed, 51 insertions(+), 53 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 70b6482..3297742 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -627,6 +627,15 @@ export async function getcurrencys(){ return res.data } +/** + * 登录右侧 视频列表 + */ +export async function getwebvideolist() { + const res=await get("webvideos") + console.log(res) + return res.data +} + /** * 发送验证码 * @param phone 手机号 diff --git a/src/components/NavTop.vue b/src/components/NavTop.vue index b3015b9..24867a2 100644 --- a/src/components/NavTop.vue +++ b/src/components/NavTop.vue @@ -43,7 +43,7 @@
-
{{userinfo.currency}}
+
{{userinfo.currencyValue}}