From 17463ee610c86c759915eed86c963d9bc35e3e67 Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Fri, 27 Jun 2025 16:39:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=9B=9E=E6=94=B6?= =?UTF-8?q?=E5=8E=BB=E5=90=91=E5=8A=9F=E8=83=BD=E5=8F=8A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=92=8C=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refactor: 替换rich-text为uv-parse组件以优化富文本解析 fix: 修复图片加载错误处理和黑名单用户限制 style: 调整页面样式和布局 docs: 更新uv-parse组件文档和配置 chore: 添加uv-parse组件依赖和静态资源 --- App.vue | 3 +- api/model/recyclingDestination.js | 23 + compoent/base/kefu.vue | 63 + compoent/base/navbar.vue | 143 +++ compoent/base/tabbar.vue | 134 ++ config.js | 3 + pages.json | 17 + pages/baoyou-city/baoyou-city.vue | 10 +- pages/component/home.vue | 26 +- pages/component/my.vue | 6 +- pages/component/recycle copy.vue | 2 +- pages/component/recycle.vue | 52 +- pages/index/index.vue | 703 +++++------ pages/mine/questionDetail.vue | 48 + pages/mine/recyclingDestination.vue | 48 + pages/subcomponent/about.vue | 2 +- uni_modules/uv-parse/changelog.md | 13 + .../uv-parse/components/uv-parse/node/node.vue | 576 +++++++++ uni_modules/uv-parse/components/uv-parse/parser.js | 1335 ++++++++++++++++++++ .../uv-parse/components/uv-parse/uv-parse.vue | 498 ++++++++ uni_modules/uv-parse/package.json | 87 ++ uni_modules/uv-parse/readme.md | 21 + .../static/app-plus/uv-parse/js/handler.js | 224 ++++ .../static/app-plus/uv-parse/js/uni.webview.min.js | 19 + .../uv-parse/static/app-plus/uv-parse/local.html | 1 + 25 files changed, 3677 insertions(+), 380 deletions(-) create mode 100644 api/model/recyclingDestination.js create mode 100644 compoent/base/kefu.vue create mode 100644 compoent/base/navbar.vue create mode 100644 compoent/base/tabbar.vue create mode 100644 pages/mine/questionDetail.vue create mode 100644 pages/mine/recyclingDestination.vue create mode 100644 uni_modules/uv-parse/changelog.md create mode 100644 uni_modules/uv-parse/components/uv-parse/node/node.vue create mode 100644 uni_modules/uv-parse/components/uv-parse/parser.js create mode 100644 uni_modules/uv-parse/components/uv-parse/uv-parse.vue create mode 100644 uni_modules/uv-parse/package.json create mode 100644 uni_modules/uv-parse/readme.md create mode 100644 uni_modules/uv-parse/static/app-plus/uv-parse/js/handler.js create mode 100644 uni_modules/uv-parse/static/app-plus/uv-parse/js/uni.webview.min.js create mode 100644 uni_modules/uv-parse/static/app-plus/uv-parse/local.html diff --git a/App.vue b/App.vue index 839c098..0bb195b 100644 --- a/App.vue +++ b/App.vue @@ -61,9 +61,8 @@ this.getBannerList(), this.getPricePreviewList(), this.getConfigData(), - this.getQrCode() ] - + this.getQrCode() await Promise.all(promises) // 确保进度达到100% diff --git a/api/model/recyclingDestination.js b/api/model/recyclingDestination.js new file mode 100644 index 0000000..e7d7615 --- /dev/null +++ b/api/model/recyclingDestination.js @@ -0,0 +1,23 @@ + +const api = { + // 获取回收去向 + getRecyclingDestination: { + url: '/recycle-admin/applet/index/getRecyclingDestination', + method: 'GET', + auth : false, + }, + // 获取回收去向详情 + getRecyclingDestinationDetail: { + url: '/recycle-admin/applet/index/getRecyclingDestinationDetail', + method: 'GET', + auth : false, + }, + // 联系客服问题相关详情 + getQuestionListDetail: { + url: '/recycle-admin/applet/index/getQuestionListDetail', + method: 'GET', + auth : false, + }, +} + +export default api \ No newline at end of file diff --git a/compoent/base/kefu.vue b/compoent/base/kefu.vue new file mode 100644 index 0000000..d109bc1 --- /dev/null +++ b/compoent/base/kefu.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/compoent/base/navbar.vue b/compoent/base/navbar.vue new file mode 100644 index 0000000..34d6fee --- /dev/null +++ b/compoent/base/navbar.vue @@ -0,0 +1,143 @@ + + + + + + \ No newline at end of file diff --git a/compoent/base/tabbar.vue b/compoent/base/tabbar.vue new file mode 100644 index 0000000..9c70362 --- /dev/null +++ b/compoent/base/tabbar.vue @@ -0,0 +1,134 @@ + + + + + \ No newline at end of file diff --git a/config.js b/config.js index 081fdcd..eba31b4 100644 --- a/config.js +++ b/config.js @@ -2,6 +2,9 @@ const type = 'dev' const config = { + local: { + baseUrl: 'http://127.0.0.1', + }, dev: { baseUrl: 'http://h5.xzaiyp.top', }, diff --git a/pages.json b/pages.json index f3fffc4..b0a608a 100644 --- a/pages.json +++ b/pages.json @@ -31,6 +31,23 @@ } ], "subPackages": [ + { + "root": "pages/mine", + "pages": [ + { + "path": "recyclingDestination", + "style": { + "navigationStyle": "custom" + } + }, + { + "path": "questionDetail", + "style": { + "navigationStyle": "custom" + } + } + ] + }, { "root": "pages/subcomponent", "pages": [ diff --git a/pages/baoyou-city/baoyou-city.vue b/pages/baoyou-city/baoyou-city.vue index e883fff..a8aa39a 100644 --- a/pages/baoyou-city/baoyou-city.vue +++ b/pages/baoyou-city/baoyou-city.vue @@ -9,7 +9,9 @@ - + @@ -65,6 +67,12 @@ export default { } }); }, + computed: { + city_banner() { + const item = getApp().globalData.configData.find(i => i.keyName === 'city_banner') + return item ? item.keyContent : '' + } + }, methods: { goBack() { uni.navigateBack() diff --git a/pages/component/home.vue b/pages/component/home.vue index 5ab01c0..8ff9bd7 100644 --- a/pages/component/home.vue +++ b/pages/component/home.vue @@ -8,7 +8,7 @@ :interval="3000" :duration="500" circular - style="width: 100%; height: 380rpx;" + style="width: 100%; height: 320rpx;" > - + {{item.title}} - {{item.desc}} + {{item.description}} @@ -197,22 +200,22 @@ export default { { icon: '/static/home/爱心援乡.png', title: '爱心援乡', - desc: '精准帮扶贫困群体' + description: '精准帮扶贫困群体' }, { icon: '/static/home/回塑新源.png', title: '回塑新源', - desc: '塑料的第二次成型' + description: '塑料的第二次成型' }, { icon: '/static/home/织物出海.png', title: '织物出海', - desc: '分拣出最高价值' + description: '分拣出最高价值' }, { icon: '/static/home/碳循再生.png', title: '碳循再生', - desc: '减碳从出发生系统' + description: '减碳从出发生系统' } ], bannerList: [], @@ -336,6 +339,12 @@ export default { } }) }, + getRecyclingDestination() { + this.$api('getRecyclingDestination') + .then(res => { + this.destinations = res.result + }) + }, goToInspectionReport(item) { uni.navigateTo({ url: `/pages/subcomponent/inspection-report?id=${item.id}` @@ -415,6 +424,7 @@ export default { // 监听全局数据更新 uni.$on('configDataUpdated', this.updateCionData); this.getPricePreview(); + this.getRecyclingDestination() }, } @@ -435,7 +445,7 @@ export default { .banner { width: 100%; - height: 390rpx; + height: 330rpx; position: relative; overflow: hidden; border-radius: 0 0 30rpx 30rpx; diff --git a/pages/component/my.vue b/pages/component/my.vue index c309849..0518940 100644 --- a/pages/component/my.vue +++ b/pages/component/my.vue @@ -393,8 +393,8 @@ export default { return getApp().globalData.bannerList || [] }, myBannerImage() { - const banner = (getApp().globalData.bannerList || []).find(item => item.title === '我的-轮播图'); - return banner ? banner.image : ''; + const item = getApp().globalData.configData.find(i => i.keyName === 'user_banner') + return item ? item.keyContent : '' }, userTypeText() { // 0 普通用户, 1 推广达人, 2 推广大使 @@ -452,7 +452,7 @@ export default { } .banner { - height: 400rpx; + height: 320rpx; background: #ff6b35; position: relative; overflow: hidden; diff --git a/pages/component/recycle copy.vue b/pages/component/recycle copy.vue index 134e98e..b34939a 100644 --- a/pages/component/recycle copy.vue +++ b/pages/component/recycle copy.vue @@ -249,7 +249,7 @@ 回收规则 - + + @@ -250,7 +253,7 @@ 回收规则 - + - - logo - {{ logoName }} - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/pages/mine/questionDetail.vue b/pages/mine/questionDetail.vue new file mode 100644 index 0000000..dfbabb7 --- /dev/null +++ b/pages/mine/questionDetail.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/pages/mine/recyclingDestination.vue b/pages/mine/recyclingDestination.vue new file mode 100644 index 0000000..dfbabb7 --- /dev/null +++ b/pages/mine/recyclingDestination.vue @@ -0,0 +1,48 @@ + + + + + diff --git a/pages/subcomponent/about.vue b/pages/subcomponent/about.vue index 3342bbc..d6caf1a 100644 --- a/pages/subcomponent/about.vue +++ b/pages/subcomponent/about.vue @@ -10,7 +10,7 @@ - + diff --git a/uni_modules/uv-parse/changelog.md b/uni_modules/uv-parse/changelog.md new file mode 100644 index 0000000..4575e07 --- /dev/null +++ b/uni_modules/uv-parse/changelog.md @@ -0,0 +1,13 @@ +## 1.0.4(2023-07-17) +1. 优化文档 +2. 优化其他 +## 1.0.3(2023-06-19) +1. 修复nvue模式下不显示的BUG +## 1.0.2(2023-06-02) +1. 修复可能存在的BUG +2. 优化 +## 1.0.1(2023-05-16) +1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 +2. 优化部分功能 +## 1.0.0(2023-05-10) +uv-parse 富文本解析器 diff --git a/uni_modules/uv-parse/components/uv-parse/node/node.vue b/uni_modules/uv-parse/components/uv-parse/node/node.vue new file mode 100644 index 0000000..5857077 --- /dev/null +++ b/uni_modules/uv-parse/components/uv-parse/node/node.vue @@ -0,0 +1,576 @@ +