From bfa57367dc304df5a6418ffe91ee5dfd2b212c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=B9=8F?= Date: Mon, 8 Sep 2025 16:15:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=AA=E7=99=BB=E5=BD=95=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=B7=B3=E8=BD=AC=E5=88=B0=E5=8D=95=E7=8B=AC=E7=9A=84?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 +- README.md | 56 ------------------- manifest.json | 4 +- package.json | 4 +- pages.json | 8 ++- pages/login/index.vue | 7 +++ .../components/reset-password.vue | 12 +++- .../s-share-modal/s-share-modal.vue | 20 +++++-- sheep/config/index.js | 2 +- sheep/request/index.js | 6 +- sheep/router/index.js | 3 +- sheep/store/app.js | 2 +- 12 files changed, 54 insertions(+), 73 deletions(-) delete mode 100644 README.md create mode 100644 pages/login/index.vue diff --git a/.env b/.env index 03dd89b..62323b3 100644 --- a/.env +++ b/.env @@ -5,7 +5,8 @@ SHOPRO_VERSION=v2.4.1 SHOPRO_BASE_URL=http://api-dashboard.yudao.iocoder.cn # 后端接口 - 测试环境(通过 process.env.NODE_ENV = development) -SHOPRO_DEV_BASE_URL=http://127.0.0.1:48080 +SHOPRO_DEV_BASE_URL=http://114.215.197.144:8080 +# SHOPRO_DEV_BASE_URL=http://127.0.0.1:48080 ### SHOPRO_DEV_BASE_URL=http://10.171.1.188:48080 ### SHOPRO_DEV_BASE_URL = http://yunai.natapp1.cc diff --git a/README.md b/README.md deleted file mode 100644 index ba30293..0000000 --- a/README.md +++ /dev/null @@ -1,56 +0,0 @@ -**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!!** - -**「我喜欢写代码,乐此不疲」** -**「我喜欢做开源,以此为乐」** - -我 🐶 在上海艰苦奋斗,早中晚在 top3 大厂认真搬砖,夜里为开源做贡献。 - -如果这个项目让你有所收获,记得 Star 关注哦,这对我是非常不错的鼓励与支持。 - -## 🐶 新手必读 - -* 演示地址: -* 启动文档: -* 视频教程: - -## 🐯 商城简介 - -**芋道商城**,基于 [芋道开发平台](https://github.com/YunaiV/ruoyi-vue-pro) 构建,以开发者为中心,打造中国第一流的 Java 开源商城系统,全部开源,个人与企业可 100% 免费使用。 - -> 有任何问题,或者想要的功能,可以在 Issues 中提给艿艿。 -> -> 😜 给项目点点 Star 吧,这对我们真的很重要! - -![功能图](/.image/common/mall-feature.png) - -* 基于 uni-app + Vue3 开发,支持微信小程序、微信公众号、H5 移动端,未来会支持支付宝小程序、抖音小程序等 -* 支持 SaaS 多租户,可满足商品、订单、支付、会员、优惠券、秒杀、拼团、砍价、分销、积分等多种经营需求 - -## 🔥 后端架构 - -支持 Spring Boot、Spring Cloud 两种架构: - -① Spring Boot 单体架构: - -![架构图](/.image/common/ruoyi-vue-pro-architecture.png) - -② Spring Cloud 微服务架构: - -![架构图](/.image/common/yudao-cloud-architecture.png) - -## 🐱 移动端预览 - -![移动端预览](/.image/common/mall-preview.png) - -## 🐶 管理端预览 - -![店铺装修](/.image/mall/店铺装修.png) - -![会员详情](/.image/mall/会员详情.png) - -![商品详情](/.image/mall/商品详情.png) - -![订单详情](/.image/mall/订单详情.png) - -![营销中心](/.image/mall/营销中心.png) - diff --git a/manifest.json b/manifest.json index df9baa8..c670544 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name": "芋道商城", + "name": "商城", "appid": "__UNI__460BC4C", "description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。", "versionName": "2025.09", @@ -223,7 +223,7 @@ "async": { "timeout": 20000 }, - "title": "芋道商城", + "title": "商城", "optimization": { "treeShaking": { "enable": true diff --git a/package.json b/package.json index d753cda..4625a18 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "id": "shopro", "name": "shopro", - "displayName": "芋道商城", + "displayName": "商城", "version": "2025.09", - "description": "芋道商城,一套代码,同时发行到iOS、Android、H5、微信小程序多个平台,请使用手机扫码快速体验强大功能", + "description": "商城,一套代码,同时发行到iOS、Android、H5、微信小程序多个平台,请使用手机扫码快速体验强大功能", "scripts": { "prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"" }, diff --git a/pages.json b/pages.json index e75ba5a..7c7315a 100644 --- a/pages.json +++ b/pages.json @@ -82,6 +82,12 @@ "title": "自定义页面", "group": "商城" } + }, + { + "path": "pages/login/index", + "style": { + "navigationBarTitleText": "登录" + } } ], "subPackages": [{ @@ -672,7 +678,7 @@ ], "globalStyle": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "芋道商城", + "navigationBarTitleText": "商城", "navigationBarBackgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF", "navigationStyle": "custom" diff --git a/pages/login/index.vue b/pages/login/index.vue new file mode 100644 index 0000000..43a7891 --- /dev/null +++ b/pages/login/index.vue @@ -0,0 +1,7 @@ + + + + + diff --git a/sheep/components/s-auth-modal/components/reset-password.vue b/sheep/components/s-auth-modal/components/reset-password.vue index bc1be8b..03280ab 100644 --- a/sheep/components/s-auth-modal/components/reset-password.vue +++ b/sheep/components/s-auth-modal/components/reset-password.vue @@ -62,7 +62,15 @@ - @@ -110,7 +118,7 @@ return; } // 成功后,用户重新登录 - showAuthModal('accountLogin') + sheep.$router.go('/pages/login/index', {}, { redirect: true }); }; diff --git a/sheep/components/s-share-modal/s-share-modal.vue b/sheep/components/s-share-modal/s-share-modal.vue index 0f0b92d..7ca370a 100644 --- a/sheep/components/s-share-modal/s-share-modal.vue +++ b/sheep/components/s-share-modal/s-share-modal.vue @@ -3,7 +3,10 @@ - + @@ -17,7 +20,11 @@ open-type="share" @tap="onShareByForward" > - + @@ -41,7 +48,11 @@ class="share-item share-btn ss-flex-col ss-col-center" @tap="onShareByCopyLink" > - + @@ -89,7 +100,8 @@ const onShareByPoster = () => { closeShareModal(); if (!sheep.$store('user').isLogin) { - showAuthModal(); + // showAuthModal(); + sheep.$router.go('/pages/login/index', {}, { redirect: true }); return; } unref(SharePosterRef).getPoster(); diff --git a/sheep/config/index.js b/sheep/config/index.js index 803558c..1369ccd 100644 --- a/sheep/config/index.js +++ b/sheep/config/index.js @@ -12,7 +12,7 @@ if (process.env.NODE_ENV === 'development') { if (typeof baseUrl === 'undefined') { console.error('请检查.env配置文件是否存在'); } else { - console.log(`[芋道商城 ${version}] https://doc.iocoder.cn`); + } export const apiPath = import.meta.env.SHOPRO_API_PATH; diff --git a/sheep/request/index.js b/sheep/request/index.js index f0fa1e1..f9f3948 100644 --- a/sheep/request/index.js +++ b/sheep/request/index.js @@ -10,6 +10,7 @@ import $platform from '@/sheep/platform'; import { showAuthModal } from '@/sheep/hooks/useModal'; import AuthUtil from '@/sheep/api/member/auth'; import { getTerminal } from '@/sheep/helper/const'; +import sheep from '@/sheep'; const options = { // 显示操作成功消息 默认不显示 @@ -73,7 +74,8 @@ http.interceptors.request.use( (config) => { // 自定义处理【auth 授权】:必须登录的接口,则跳出 AuthModal 登录弹窗 if (config.custom.auth && !$store('user').isLogin) { - showAuthModal(); + // showAuthModal(); + sheep.$router.go('/pages/login/index', {}, { redirect: true }); return Promise.reject(); } @@ -280,7 +282,7 @@ const refreshToken = async (config) => { const handleAuthorized = () => { const userStore = $store('user'); userStore.logout(true); - showAuthModal(); + sheep.$router.go('/pages/login/index', {}, { redirect: true }); // 登录超时 return Promise.reject({ code: 401, diff --git a/sheep/router/index.js b/sheep/router/index.js index 0a4ecc3..f5174bb 100644 --- a/sheep/router/index.js +++ b/sheep/router/index.js @@ -59,7 +59,8 @@ const _go = ( // 页面登录拦截 if (nextRoute.meta?.auth && !$store('user').isLogin) { - showAuthModal(); + // showAuthModal(); + sheep.$router.go('/pages/login/index', {}, { redirect: true }); return; } diff --git a/sheep/store/app.js b/sheep/store/app.js index 26f8dd1..3302797 100644 --- a/sheep/store/app.js +++ b/sheep/store/app.js @@ -71,7 +71,7 @@ const app = defineStore({ // TODO 芋艿:【初始化优化】未来支持管理后台可配;对应 https://api.shopro.sheepjs.com/shop/api/init if (true) { this.info = { - name: '芋道商城', + name: '商城', logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png', version: '2025.09', copyright: '全部开源,个人与企业可 100% 免费使用',