From 657473869412bdae926f8db466e26a601d566181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A6=86=E9=92=B1=E8=90=BD=E5=B0=BD=E6=A7=BF=E8=8A=B1?= =?UTF-8?q?=E7=A8=80?= <2675540038@qq.com> Date: Thu, 22 May 2025 18:34:12 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E8=B7=AF=E5=BE=84=E5=A4=84=E7=90=86=E5=8F=8A=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 统一使用 `apiImgUrl` 拼接图片路径,提升代码可维护性 - 调整部分页面样式,优化用户体验 - 更新 `vuex_version` 至 1.0.52 --- pages/packageA/info/policy.vue | 3 +- pages/packageA/info/policy_list.vue | 4 +-- pages/packageB/ask/add.vue | 5 ++-- pages/packageB/ask/index.vue | 18 +++++++----- pages/packageB/ask/info.vue | 10 +++---- pages/packageB/ask/user_list.vue | 43 ++++++++++++++++++----------- store/index.js | 2 +- 7 files changed, 51 insertions(+), 34 deletions(-) diff --git a/pages/packageA/info/policy.vue b/pages/packageA/info/policy.vue index c783ba2..37e9839 100644 --- a/pages/packageA/info/policy.vue +++ b/pages/packageA/info/policy.vue @@ -15,7 +15,7 @@ - {{item.name}} @@ -36,6 +36,7 @@ export default { data() { return { + apiImgUrl: store.state.imgUrl, list: [] } }, diff --git a/pages/packageA/info/policy_list.vue b/pages/packageA/info/policy_list.vue index 9984961..a383d7c 100644 --- a/pages/packageA/info/policy_list.vue +++ b/pages/packageA/info/policy_list.vue @@ -25,9 +25,9 @@ - {{item.article_title}} + {{item.article_title}} - 发布时间:{{formatTimestamp(item.create_time)}} + 发布时间:{{formatTimestamp(item.create_time)}} diff --git a/pages/packageB/ask/add.vue b/pages/packageB/ask/add.vue index 9e8b345..e0c895b 100644 --- a/pages/packageB/ask/add.vue +++ b/pages/packageB/ask/add.vue @@ -44,7 +44,8 @@ export default { data() { return { - action: store.state.apiUrl+'/api/common/upload', + action: store.state.apiUrl+'/common/upload', + //action: 'http://192.168.10.176/api/common/upload', issue_names: '', fileList: '', formData: {}, @@ -60,7 +61,7 @@ var user = uni.getStorageSync('userInfo'); let problem_images = []; this.fileList.forEach(function(item, index) { - problem_images.push(item.response.data.fullurl); + problem_images.push(item.response.data.url); }); var form = {}; form.association_id = user.association_id; diff --git a/pages/packageB/ask/index.vue b/pages/packageB/ask/index.vue index 4831308..6027138 100644 --- a/pages/packageB/ask/index.vue +++ b/pages/packageB/ask/index.vue @@ -16,10 +16,13 @@ - + - {{item.member_name}} @@ -34,11 +37,12 @@ - - + - - - - @@ -57,7 +57,7 @@ - @@ -76,7 +76,7 @@ export default { data() { return { - apiImgUrl: this.$store.state.imgUrl, + apiImgUrl: store.state.imgUrl, id: 0, info: {} } diff --git a/pages/packageB/ask/user_list.vue b/pages/packageB/ask/user_list.vue index 4745fcd..d53568a 100644 --- a/pages/packageB/ask/user_list.vue +++ b/pages/packageB/ask/user_list.vue @@ -21,13 +21,22 @@ - + + + + + + - + - {{item.member_name}} @@ -40,12 +49,14 @@ {{item.issue_names}} - - + - + - @@ -71,7 +82,7 @@ export default { data() { return { - apiImgUrl: this.$store.state.imgUrl, + apiImgUrl: store.state.imgUrl, current: 0, List: [{ 'name': '待审核', @@ -85,20 +96,20 @@ }], status: 1, userList: [], - page:1 + page: 1 } }, onLoad() { this.getUserList(); }, onReachBottom() { - this.page+=1; + this.page += 1; this.getUserList(); }, methods: { change(e) { - this.userList=[]; - this.page=1; + this.userList = []; + this.page = 1; this.current = e; this.status = this.List[e].type; this.getUserList(); @@ -106,8 +117,8 @@ getUserList() { getNwwbUser({ status: this.status, - page:this.page, - size:10 + page: this.page, + size: 10 }) .then(res => { console.log(res); diff --git a/store/index.js b/store/index.js index 6254237..7c61f41 100644 --- a/store/index.js +++ b/store/index.js @@ -39,7 +39,7 @@ const store = new Vuex.Store({ // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式 // app版本 - vuex_version: "1.0.49", + vuex_version: "1.0.52", // 是否使用自定义导航栏 vuex_custom_nav_bar: true, // 状态栏高度