xbx #29

Merged
theluyuan merged 5 commits from xbx into master 2020-10-10 06:08:46 +00:00
4 changed files with 29 additions and 3 deletions
Showing only changes of commit 8bf7b662d5 - Show all commits
src
api
components
store
types

@ -10,6 +10,19 @@ export function sendsms(phone: string, type?: number){
return post('SendSms',{phone, type})
}
/**
*
* @param phone
* @param password
*/
export function loginpass(phone: string, password: string){
return post("login",{type: 2,username: phone, password: password})
}
/**
*
*/
export function userinfo(){
return get('personalInfo')
}

@ -117,6 +117,7 @@
}
</style>
<script lang="ts">
import { userinfo } from '@/api';
import router from '@/router';
import { defineComponent, ref } from 'vue';
@ -181,6 +182,10 @@ export default defineComponent({
})
}
userinfo().then((res)=>{
console.log(res)
})
return{
list,
routeto,

@ -2,8 +2,15 @@ import { createStore } from 'vuex'
export default createStore({
state: {
userinfo:{
name: "",
img: ""
}
},
mutations: {
setUserInfo(state, userinfo){
state.userinfo = userinfo
}
},
actions: {
},

@ -21,8 +21,9 @@ export interface VideoInfo {
}
// 返回数据
export interface ResData{
export interface ResData<T = any>{
code?: number;
msg?: string;
data?: any;
}
data?: T;
}