From 95668bb1ad794a726d01927e645b8d086f1bdf7b Mon Sep 17 00:00:00 2001 From: xingyy <373639591@qq.com> Date: Wed, 13 Dec 2023 14:56:40 +0800 Subject: [PATCH] submit --- src/components/self-tabbar/index.vue | 65 +++++++++++++++++- src/http/apis.js | 3 +- src/http/init.js | 5 +- src/http/main.ts | 5 +- src/pages/login/index.vue | 1 - src/static/{zu759@3x (1).png => zu759@3x.png} | Bin 6 files changed, 67 insertions(+), 12 deletions(-) rename src/static/{zu759@3x (1).png => zu759@3x.png} (100%) diff --git a/src/components/self-tabbar/index.vue b/src/components/self-tabbar/index.vue index a70e9c23..de72ab5b 100644 --- a/src/components/self-tabbar/index.vue +++ b/src/components/self-tabbar/index.vue @@ -1,5 +1,25 @@ + diff --git a/src/http/apis.js b/src/http/apis.js index b2b487ab..6153ab55 100644 --- a/src/http/apis.js +++ b/src/http/apis.js @@ -13,7 +13,7 @@ export const getInfo = () => { } export const ticketlist = (data) => { return uniReq.post({ - url: '/ticket/ticketList', + url: '/api/ticket/ticketList', data }) } @@ -29,7 +29,6 @@ export const upload = (data) => { } catch (e) { return e } - } } }) diff --git a/src/http/init.js b/src/http/init.js index d975dbfc..60fd1139 100644 --- a/src/http/init.js +++ b/src/http/init.js @@ -17,12 +17,13 @@ export default uniRequest.created({ return config }, response(response) { + uni.hideLoading() uni.showToast({ title: response.data.msg, icon: 'none', - duration: 3000 + duration: 50000 }) - uni.hideLoading() + return response.data } } diff --git a/src/http/main.ts b/src/http/main.ts index c783b57d..1acc8064 100644 --- a/src/http/main.ts +++ b/src/http/main.ts @@ -13,7 +13,6 @@ type HttpMethod = | 'options' | 'TRACE' | 'trace'; - interface RequestOptions { baseUrl?: string; url?: string; @@ -25,7 +24,7 @@ interface RequestOptions { dataType?: string, responseType?: string, sslVerify?: boolean, - withCredentials?: boolean + withCredentials?: boolean, firstIpv4?: boolean, enableHttp2?: boolean, enableQuic?: boolean, @@ -85,11 +84,9 @@ class uniRequest { setDefaultHeader(header: Record): void { this.defaultHeader = header; } - static created(options: RequestOptions) { return new uniRequest(options); } - request(options: RequestOptions): Promise { options = this.buildRequestOptions(options) options = options || {}; diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index d32cc630..16ff0e9c 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -36,7 +36,6 @@ const res=await getInfo() display: flex; align-items: center; flex-direction: column; - .btn { background: transparent; width: 200rpx; diff --git a/src/static/zu759@3x (1).png b/src/static/zu759@3x.png similarity index 100% rename from src/static/zu759@3x (1).png rename to src/static/zu759@3x.png