From 9999345976b4012d3a6d037742414dc812c31e8d Mon Sep 17 00:00:00 2001 From: HJ <2365331988@qq.com> Date: Wed, 8 Mar 2023 15:39:12 +0800 Subject: [PATCH 1/4] update --- .../utils/config.js | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/utils/config.js b/src/main/resources/static/linfeng-community-uniapp-ky/utils/config.js index 14af21e..e7e2be8 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/utils/config.js +++ b/src/main/resources/static/linfeng-community-uniapp-ky/utils/config.js @@ -1,21 +1,21 @@ -const miniappName = "林风社交论坛"; //分享时的标题 -const shareH5Url = "https://www.linfeng.tech/#/"; //H5分享路径 - - -//本地环境配置 -// const baseUrl = "localhost:8080"; -// const domain = 'http://' + baseUrl + "/app/"; - -//线上环境配置 -const baseUrl = "wxapi.linfeng.tech"; -const domain = 'https://' + baseUrl + "/app/"; - - - - -export default { - baseUrl: baseUrl, - domain: domain, - miniappName: miniappName, - shareH5Url: shareH5Url +const miniappName = "林风社交论坛"; //分享时的标题 +const shareH5Url = "https://www.linfeng.tech/#/"; //H5分享路径 + + +//本地环境配置 +// const baseUrl = "localhost:8080"; +// const domain = 'http://' + baseUrl + "/app/"; + +//线上环境配置 +const baseUrl = "wxapi.linfeng.tech"; +const domain = 'https://' + baseUrl + "/app/"; + + + + +export default { + baseUrl: baseUrl, + domain: domain, + miniappName: miniappName, + shareH5Url: shareH5Url } From 1136cfbb22bf7d68827af7e21c65340fa4b423bc Mon Sep 17 00:00:00 2001 From: HJ <2365331988@qq.com> Date: Wed, 8 Mar 2023 15:44:35 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utils/request.js | 132 +++++++++--------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/utils/request.js b/src/main/resources/static/linfeng-community-uniapp-ky/utils/request.js index 4ff9062..e0e8c30 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/utils/request.js +++ b/src/main/resources/static/linfeng-community-uniapp-ky/utils/request.js @@ -1,67 +1,67 @@ -import config from './config.js'; -export default { - request(options = {}) { - return new Promise((resolve, reject) => { - let url = options.url; - if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1) { - options.url = config.domain + url; - } - options.header.token = uni.getStorageSync("token"); - options.complete = (response) => { - if (response.statusCode == 200 || response.statusCode == 0) { - if (response.data.code == 401 || response.data.code == 420) { - // #ifdef MP-WEIXIN - uni.navigateTo({ - url: "/pages/login/weixin" - }) - // #endif - - // #ifdef H5 - uni.navigateTo({ - url: "/pages/login/login" - }) - // #endif - } - - if (response.data.code == 500) { - uni.showToast({ - title: response.data.msg, - icon: "none", - duration: 2000 - }); - } - resolve(response.data) - } else { - uni.showToast({ - title: '请求异常!', - icon: "none" - }); - } - } - - uni.request(options) - }) - }, - - post(url, data = {}, header = {}) { - - let options = { - url: url, - data: data, - header: header, - method: "POST" - } - - return this.request(options); - }, - - get(url, data = {}, header = {}) { - let options = { - url: url, - data: data, - header: header - } - - return this.request(options); - } +import config from './config.js'; +export default { + request(options = {}) { + return new Promise((resolve, reject) => { + let url = options.url; + if (url.indexOf("http://") == -1 && url.indexOf("https://") == -1) { + options.url = config.domain + url; + } + options.header.token = uni.getStorageSync("token"); + options.complete = (response) => { + if (response.statusCode == 200 || response.statusCode == 0) { + if (response.data.code == 401 || response.data.code == 420) { + // #ifdef MP-WEIXIN + uni.navigateTo({ + url: "/pages/login/weixin" + }) + // #endif + + // #ifdef H5 + uni.navigateTo({ + url: "/pages/login/login" + }) + // #endif + } + + if (response.data.code == 500) { + uni.showToast({ + title: response.data.msg, + icon: "none", + duration: 2000 + }); + } + resolve(response.data) + } else { + uni.showToast({ + title: '请求异常!', + icon: "none" + }); + } + } + + uni.request(options) + }) + }, + + post(url, data = {}, header = {}) { + + let options = { + url: url, + data: data, + header: header, + method: "POST" + } + + return this.request(options); + }, + + get(url, data = {}, header = {}) { + let options = { + url: url, + data: data, + header: header + } + + return this.request(options); + } }; From 06884d384c0d657dc1e0557fe709d2dfefced4b3 Mon Sep 17 00:00:00 2001 From: HJ <2365331988@qq.com> Date: Wed, 8 Mar 2023 15:45:20 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=B9=BF=E5=9C=BA?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/square/square.vue | 498 +++++++++--------- 1 file changed, 249 insertions(+), 249 deletions(-) diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue b/src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue index 3699691..bf1a836 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue +++ b/src/main/resources/static/linfeng-community-uniapp-ky/pages/square/square.vue @@ -1,250 +1,250 @@ - - - - - From 3fc9c96055f8908fb82a429d3f65fcd2ff54ef7c Mon Sep 17 00:00:00 2001 From: HJ <2365331988@qq.com> Date: Wed, 8 Mar 2023 15:46:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../linfeng-community-uniapp-ky/index.html | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/main/resources/static/linfeng-community-uniapp-ky/index.html b/src/main/resources/static/linfeng-community-uniapp-ky/index.html index c3ff205..1cc887d 100644 --- a/src/main/resources/static/linfeng-community-uniapp-ky/index.html +++ b/src/main/resources/static/linfeng-community-uniapp-ky/index.html @@ -1,20 +1,22 @@ - - - - - - - - - - -
- - + + + + + + + + + + +
+ +
+ +