diff --git a/api/index.js b/api/index.js index 60847082bf81e121df84bf8c054d67468fe8dd7b..0a668eb85382b04c98bc22a1220434a113869049 100644 --- a/api/index.js +++ b/api/index.js @@ -11,10 +11,5 @@ export const helpInfo = { export const helpForm = { getTags: helpFormMock.getTags, - addInformation: (params)=>request.post("/information/addInformation",params), -} - -export const login = { - WXLogin: (params)=>request.post("/user/Thirdlogin",params) } diff --git a/api/mock/help-form.js b/api/mock/help-form.js index 2145e2668c917b40d0017b6e8787695821f0d494..a9042d522060fda1e5210bab42e3410f9329a223 100644 --- a/api/mock/help-form.js +++ b/api/mock/help-form.js @@ -6,21 +6,26 @@ export default { name: '带饭', enName:'Bring Meal', id: '1', + img:'/static/images/logo.png' }, { name: '外卖', enName:'Take Out', id: '2', + img:'/static/images/logo.png' }, { name: '失物招领', enName:'Lost And Found', id: '3', + img:'/static/images/logo.png' }, { name: '代取快递', enName:'Express', id: '4', + img:'/static/images/logo.png' }, { name: '二手书', enName:'Used Books', id: '5', + img:'/static/images/logo.png' }]) } diff --git a/api/request.js b/api/request.js index 6a7cafbf8fd0d3fbd1ce2bb64197acd093cdda75..46aabf2f64fc568961e160a9c69b59c86d4c5553 100644 --- a/api/request.js +++ b/api/request.js @@ -1,9 +1,7 @@ import uni_request from './requestAxios.js' -import Vue from "vue" -import store from "../store" const request = uni_request({ // 有效配置项只有三个 - baseURL: 'http://121.5.12.180:80', //baseURL + baseURL: 'http://120.24.151.246:80', //baseURL timeout: 12345, // 超时时间,单位毫秒。默认 60 秒 header: {'x-custom-header': 'x-custom-header'}, // 设置请求头,建议放在请求拦截器中 statusCode: [200, 401] // 服务器相应状态码为 200/401 时,网络请求不会 reject。也就是不会被 catch 到。如响应 401 时可以在响应拦截后 await 刷新 token + await 重新请求 + return response。即可实现无痛刷新。 @@ -14,18 +12,13 @@ request.interceptors.request.use(async (config, ...args) => { //config.header.Authorization = 'Bearer ' + $store.state.app.token // 修改请求头 //config.body.test = 'test' // 修改请求体 // config.cancel = true // 取消请求 - config.header.token = store.state.token return config }) request.interceptors.response.use(async (response, ...args) => { // 响应拦截器(可以设置多个, 同时可以也可以使用异步方法) const {data: res} = response // args[0] method args[1] url args[3] data //await new Promise(resolve => setTimeout(() => resolve(), 3000)) - console.log(response); - if (res.token) { - store.commit("setToken",res.token) - } - if (res.state === 200) { + if (res.code === 200) { //console.log('响应拦截器, 会阻塞 3 s') } return response diff --git a/assets/languages/Chinese.json b/assets/languages/Chinese.json index a28f3da4a36eee8206c5582de3835849a95f055e..1f61aeb44847c28420600e2aa33a4e4a9e365ce8 100644 --- a/assets/languages/Chinese.json +++ b/assets/languages/Chinese.json @@ -64,5 +64,9 @@ "submit": "发布", "chooseLocation": "选择任务地点", "location": "任务地点" + }, + "cTabberPopup":{ + "title1":"求助", + "title2":"动态" } } \ No newline at end of file diff --git a/assets/languages/English.json b/assets/languages/English.json index 323c9c6cb8fa4705f56a45eb2642139bc4c37822..92beb6ee6ce8e927a77b029d6b7629ff59af88e6 100644 --- a/assets/languages/English.json +++ b/assets/languages/English.json @@ -63,5 +63,9 @@ "submit":"Submit", "chooseLocation": "Select mission location", "location": "Location" + }, + "cTabberPopup":{ + "title1":"Help", + "title2":"Trends" } } \ No newline at end of file diff --git a/components/c-page/index.vue b/components/c-page/index.vue index c2a6eaba8d4d68f4dc0e924bf6ad5c01f5f0a6f8..2f7a551012885d322ff6e12630189079c187ee17 100644 --- a/components/c-page/index.vue +++ b/components/c-page/index.vue @@ -1,5 +1,5 @@