diff --git a/src/api/base.ts b/src/api/base.ts index 18ea39a..2e85cbb 100644 --- a/src/api/base.ts +++ b/src/api/base.ts @@ -2,6 +2,7 @@ import axios from '../config/axiosConfig' import { AxiosRequestConfig, CustomSuccessData } from 'axios'; import { getValue } from '@/utils/common'; +import { message } from 'ant-design-vue'; // 泛型接口 export interface Get { @@ -11,7 +12,9 @@ export interface Get { axios.interceptors.response.use((response)=>{ return response; },(error)=>{ - return error; + + message.error(error.response.data.message) + return Promise.reject(error) }) const get: Get = async function (url: string,data?: object) { diff --git a/src/api/index.ts b/src/api/index.ts index 37f2b3e..54cd233 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -61,3 +61,104 @@ export async function userinfo(){ money: user.data?.money } } + +/** + * 获取用户绑定银行卡列表 + */ +interface Wallect { + wallectid: number; + memberid: number; + type: number; + account: string; + mname: string; + bankcode: string; + bankname: string; + deleted_at: null; + created_at: string; + updated_at: string; + typeName: string; +} + +export async function getwallect(){ + const res = await get>('wallect') + console.log(res) +} + +/** + * 订阅者列表 + */ +interface Teacherliked { + memberid: number; + name: string; + img: string; + live: string; + birthday: string; + mtongue: string; + interest: string; + +} +export async function getteacherliked(){ + const res = await get>('teacherliked'); + console.log(res) +} + + +/** + * 视频列表 + */ + +interface VideoList{ + videoid: number; + memberid: number; + title: string; + img: string; + fileid: string; + fileurl: string; + fileduration: string; + status: number; + desc: string; + deleted_at: null; + created_at: string; + updated_at: string; + statusname: string; +} + +export async function getvideolist() { + const res = await get>('video') + console.log(res) +} + +/** + * 直播列表 + */ + +interface LiveList { + liveid: number; + memberid: number; + title: string; + img: string; + fileid: string; + fileurl: string; + fileduration: string; + vodurl: string; + vodid: string; + vodduration: string; + dateline: string; + livetime: number; + livenumber: number; + status: number; + livestatus: number; + students: string; + desc: string; + deleted_at: null; + created_at: string; + updated_at: string; + statusname: string; + starttime: string; + begin: number; +} + +export async function getlivelist() { + const res = await get>('live'); + console.log(res); +} \ No newline at end of file diff --git a/src/views/mine/Wallet.vue b/src/views/mine/Wallet.vue index 2e025a3..bfb55d7 100644 --- a/src/views/mine/Wallet.vue +++ b/src/views/mine/Wallet.vue @@ -204,6 +204,7 @@ import { defineComponent } from "vue"; import NavBottom from "@/components/NavBottom.vue"; import router from '@/router'; +import { getwallect } from '@/api'; export default defineComponent({ name: "Wallet", components: { @@ -212,6 +213,7 @@ export default defineComponent({ setup() { const ifchina = false; const ifmingxi = true; + getwallect() function navto(index: number){ let url = ""; switch (index){ diff --git a/src/views/regime/Live.vue b/src/views/regime/Live.vue index 65d8f94..2526fd0 100644 --- a/src/views/regime/Live.vue +++ b/src/views/regime/Live.vue @@ -146,6 +146,7 @@