diff --git a/manifest.json b/manifest.json index 5f119db7..285ed24f 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "芋道商城", "appid": "__UNI__460BC4C", "description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。", - "versionName": "2025.10", + "versionName": "2025.12", "versionCode": "183", "transformPx": false, "app-plus": { @@ -185,7 +185,9 @@ "requiredPrivateInfos": ["chooseAddress"] }, "mp-alipay": { - "usingComponents": true + "usingComponents": true, + "styleIsolation": "shared", + "mergeVirtualHostAttributes": true }, "mp-baidu": { "usingComponents": true diff --git a/mini.project.json b/mini.project.json new file mode 100644 index 00000000..1e6d60a2 --- /dev/null +++ b/mini.project.json @@ -0,0 +1,9 @@ +{ + "format": 2, + "compileOptions": { + "component2": true, + "enableNodeModuleBabelTransform": true, + "transpile": {}, + "globalObjectMode": "enable" + } +} \ No newline at end of file diff --git a/package.json b/package.json index f317f3b2..5869b658 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "id": "shopro", "name": "shopro", "displayName": "芋道商城", - "version": "2025.10", + "version": "2025.12", "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 e75ba5a6..36a4a00f 100644 --- a/pages.json +++ b/pages.json @@ -675,7 +675,15 @@ "navigationBarTitleText": "芋道商城", "navigationBarBackgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF", - "navigationStyle": "custom" + "navigationStyle": "custom", + "mp-alipay": { + "titleImage": "", + "gestureBack": "YES", + "allowsBounceVertical": "NO", + "transparentTitle": "always", + "navigationStyle": "custom", + "titlePenetrate": "YES" + } }, "tabBar": { "list": [{ diff --git a/pages/goods/components/detail/detail-navbar.vue b/pages/goods/components/detail/detail-navbar.vue index d454ec0f..b414ba77 100644 --- a/pages/goods/components/detail/detail-navbar.vue +++ b/pages/goods/components/detail/detail-navbar.vue @@ -3,7 +3,10 @@ diff --git a/pages/goods/components/list/list-navbar.vue b/pages/goods/components/list/list-navbar.vue index c21e6793..626b7e2e 100644 --- a/pages/goods/components/list/list-navbar.vue +++ b/pages/goods/components/list/list-navbar.vue @@ -11,7 +11,10 @@ > diff --git a/pages/goods/index.vue b/pages/goods/index.vue index 901c8919..e08ce65c 100644 --- a/pages/goods/index.vue +++ b/pages/goods/index.vue @@ -245,7 +245,7 @@ isDay: true, }; const isLogin = computed(() => sheep.$store('user').isLogin); - const state = reactive({ + let state = reactive({ goodsId: 0, skeletonLoading: true, // SPU 加载中 goodsInfo: {}, // SPU 信息 diff --git a/pages/index/category.vue b/pages/index/category.vue index 06aacfb6..a95f4f0d 100644 --- a/pages/index/category.vue +++ b/pages/index/category.vue @@ -60,7 +60,7 @@ import sheep from '@/sheep'; import CategoryApi from '@/sheep/api/product/category'; import SpuApi from '@/sheep/api/product/spu'; - import { onLoad } from '@dcloudio/uni-app'; + import { onLoad, onShow } from '@dcloudio/uni-app'; import { computed, reactive } from 'vue'; import { concat } from 'lodash-es'; import { handleTree } from '@/sheep/helper/utils'; @@ -130,14 +130,21 @@ state.pagination.pageNo++; getGoodsList(); } - - onLoad(async (params) => { - await getList(); - + function initMenuIndex() { + // TODO @AI:可优化:增加一个 params.id 的兼容 + const appStore = sheep.$store('app'); + // 处理 tabbar 传参的情况 + const tabbarParams = appStore.paramsForTabbar || {}; + const id = tabbarParams.id; + appStore.clearParamsForTabbar(); // 使用完后清理,避免影响下次跳转 // 首页点击分类的处理:查找满足条件的分类 - const foundCategory = state.categoryList.find((category) => category.id === Number(params.id)); + const foundCategory = state.categoryList.find((category) => category.id === Number(id)); // 如果找到则调用 onMenu 自动勾选相应分类,否则调用 onMenu(0) 勾选第一个分类 onMenu(foundCategory ? state.categoryList.indexOf(foundCategory) : 0); + } + onShow(async () => { + await getList(); + initMenuIndex(); }); function handleScrollToLower() { diff --git a/pages/index/index.vue b/pages/index/index.vue index d79e66dd..63a324ca 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -22,7 +22,7 @@ diff --git a/sheep/components/s-tabbar/s-tabbar.vue b/sheep/components/s-tabbar/s-tabbar.vue index 4ff23404..c9893759 100644 --- a/sheep/components/s-tabbar/s-tabbar.vue +++ b/sheep/components/s-tabbar/s-tabbar.vue @@ -20,7 +20,7 @@ :badgeStyle="tabbar.badgeStyle" :isCenter="getTabbarCenter(index)" :centerImage="sheep.$url.cdn(item.iconUrl)" - @tap="sheep.$router.go(item.url)" + @click="sheep.$router.go(item.url)" >