From d3df5cb76e6f2bd5ab4dca0738595fd77dfed963 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 20 Mar 2023 11:09:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/utils/http.js | 1 + src/project/fengdu/AppCircle/AppCircle.vue | 33 ++++++++++---- src/project/fengdu/AppCircle/Detail.vue | 39 ++++++++++++---- src/project/fengdu/AppCircle/MyPostList.vue | 48 +++++++++++--------- src/project/fengdu/AppCircle/TopicDetail.vue | 20 ++++---- 5 files changed, 89 insertions(+), 52 deletions(-) diff --git a/src/components/utils/http.js b/src/components/utils/http.js index 6e85df0..b15592a 100644 --- a/src/components/utils/http.js +++ b/src/components/utils/http.js @@ -12,6 +12,7 @@ const getToken = () => { } const source = axios.CancelToken.source(); instance.interceptors.request.use(config => { + console.log(config) if (config.withoutToken) { return config } else if (getToken()) { diff --git a/src/project/fengdu/AppCircle/AppCircle.vue b/src/project/fengdu/AppCircle/AppCircle.vue index c1f3c68..5b91037 100644 --- a/src/project/fengdu/AppCircle/AppCircle.vue +++ b/src/project/fengdu/AppCircle/AppCircle.vue @@ -57,7 +57,7 @@ -
+
@@ -89,19 +89,25 @@ } }, - onLoad() { + onLoad () { this.getTopicList() uni.$on('updateList', () => { this.changeTab(this.currIndex) }) - if (this.token) { + if (!this.token) { + this.autoLogin().then(() => { + this.getMyPublishCount() + }) + } else { this.getMyPublishCount() } }, methods: { + ...mapActions(['autoLogin']), + getMyPublishCount () { this.$instance.post(`/app/appneighborhoodassistance/list`, null, { params: { @@ -117,6 +123,12 @@ }) }, + toAdd () { + if (!this.user.AreaId) { + this.$linkTo('./Add') + } + }, + getTopicList () { this.$instance.post(`/app/appneighborhoodassistancetheme/list`, null, { withoutToken: true, @@ -147,8 +159,8 @@ this.$loading() this.$instance.post(`/app/appneighborhoodassistance/list`, null, { + withoutToken: this.token ? false : true, params: { - withoutToken: this.token ? false : true, current: this.current, size: 10, visibleRange: this.currIndex === 0 ? 1 : 0 @@ -283,20 +295,23 @@ .item-imgs { display: flex; align-items: center; + flex-wrap: wrap; image { - flex: 1; - height: 202px; - margin-right: 12px; + height: 208px; + width: 33.33%; + padding-right: 12px; + margin-bottom: 12px; + box-sizing: border-box; &:nth-of-type(3n) { - margin-right: 0; + padding-right: 0; } } } & > p { - margin: 24px 0; + margin: 12px 0; font-size: 28px; color: #333333; } diff --git a/src/project/fengdu/AppCircle/Detail.vue b/src/project/fengdu/AppCircle/Detail.vue index 90b2950..875a06b 100644 --- a/src/project/fengdu/AppCircle/Detail.vue +++ b/src/project/fengdu/AppCircle/Detail.vue @@ -13,7 +13,7 @@ {{ info.content }}
- +

{{ info.createTime }}

@@ -95,6 +95,7 @@ @@ -203,20 +196,23 @@ .item-imgs { display: flex; align-items: center; + flex-wrap: wrap; image { - flex: 1; - height: 202px; - margin-right: 12px; + height: 208px; + width: 33.33%; + padding-right: 12px; + margin-bottom: 12px; + box-sizing: border-box; &:nth-of-type(3n) { - margin-right: 0; + padding-right: 0; } } } & > p { - margin: 24px 0; + margin: 12px 0; font-size: 28px; color: #333333; }