From c65eb5ddcdf8a64a85abfdeb1e47e8cb4ed8200c Mon Sep 17 00:00:00 2001 From: Ankkaya Date: Wed, 29 May 2024 17:07:37 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=99=BB=E5=BD=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- App.vue | 2 - pages.json | 26 +- pages/index/index.vue | 93 ++++-- pages/index/login.vue | 295 ++++++++++--------- pages/index/my.vue | 36 +-- pages/index/redirect.vue | 31 ++ peach/api/member/auth.js | 91 +++--- peach/api/member/user.js | 29 ++ peach/request/index.js | 485 +++++++++++++++---------------- peach/router/index.js | 296 +++++++++---------- peach/store/app.js | 328 ++++++++++----------- peach/store/sys.js | 1 - peach/store/user.js | 200 +++++++------ peach/ui/pb-tabbar/pb-tabbar.vue | 7 + static/default_avatar.png | Bin 0 -> 4755 bytes 16 files changed, 1012 insertions(+), 910 deletions(-) create mode 100644 pages/index/redirect.vue create mode 100644 peach/api/member/user.js create mode 100644 static/default_avatar.png diff --git a/.env b/.env index b67a5b6..7e7b528 100644 --- a/.env +++ b/.env @@ -5,7 +5,7 @@ MALL_VERSION = v1.0.0 MALL_BASE_URL = http://api-dashboard.yudao.iocoder.cn # 后端接口 - 测试环境(通过 process.env.NODE_ENV = development) -MALL_DEV_BASE_URL = http://mall-backend-dev.jiandyb.cn:7001 +MALL_DEV_BASE_URL = https://mall-baclend-local.jiandyb9834.xyz # 后端接口前缀(一般不建议调整) MALL_API_PATH = /merchant-api diff --git a/App.vue b/App.vue index 0832d65..3c8a008 100644 --- a/App.vue +++ b/App.vue @@ -3,8 +3,6 @@ import { onLaunch, onShow, onError } from '@dcloudio/uni-app' import { peachInit } from './peach' onLaunch(() => { - // 隐藏原生导航栏 使用自定义底部导航 - uni.hideTabBar() peachInit() }) diff --git a/pages.json b/pages.json index f2eec73..f6750fe 100644 --- a/pages.json +++ b/pages.json @@ -8,6 +8,9 @@ }, "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/redirect" + }, { "path": "pages/order/list", "style": { @@ -64,18 +67,17 @@ } ], "subPackages": [ - { - "root": "pages/public", - "pages": [ - - { - "path": "error", - "style": { - "navigationBarTitleText": "错误页面" - } - } - ] - } + { + "root": "pages/public", + "pages": [ + { + "path": "error", + "style": { + "navigationBarTitleText": "错误页面" + } + } + ] + } ], "tabBar": { "list": [ diff --git a/pages/index/index.vue b/pages/index/index.vue index 6e7c004..9a6400f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -3,34 +3,38 @@ - + - {{ state.merchantInfo.name }} - {{ state.merchantInfo.description }} + {{ merchantInfo.name }} + {{ merchantInfo?.contactPhone }} - {{ `今日收款金额(成功收款${state.statistic.total}笔)` }} + {{ `今日收款金额(成功收款${state.statistic.todayPaymentCount}笔)` }} - {{ state.statistic.income }} + {{ state.statistic.todayPaymentAmount || 0 }} + + 总销售额{{ state.statistic.totalSalesAmount }}元 | 成功退款{{ state.statistic.refundCount }}笔 | + 退款金额{{ state.statistic.refundAmount }}元 + 基础数据 - + {{ item.name }} {{ item.value }} - 昨日 {{ item.last }} + 昨日 {{ item.last }} @@ -39,8 +43,11 @@ diff --git a/pages/index/my.vue b/pages/index/my.vue index 7a2b7c9..578a477 100644 --- a/pages/index/my.vue +++ b/pages/index/my.vue @@ -3,11 +3,11 @@ @@ -16,17 +16,17 @@ - {{ state.statistic.remain }} + {{ remain }} - 总获取积分{{ state.statistic.cent }} + 总获取积分{{ cent }} 我的服务 - + {{ item.name }} @@ -40,26 +40,17 @@