From 7cce9b7c1f4e071cecf7ed930919270760176047 Mon Sep 17 00:00:00 2001 From: zhangjing1 Date: Mon, 23 Mar 2026 11:15:47 +0800 Subject: [PATCH] feat: show SpPoweredBy on home and custom page; fix slider pagination layout - Home: replace commented Powered by block with SpPoweredBy component - Custom page: render SpPoweredBy inside ScrollView; drop unused api/doc imports - Slider widget: stretch pagination bar full width (left/right 0); cover mode width 100% Made-with: Cursor --- src/pages/custom/custom-page.js | 76 ++++++++++++++------------- src/pages/home/wgts/slider/index.scss | 5 +- src/pages/index.js | 14 ++--- 3 files changed, 47 insertions(+), 48 deletions(-) diff --git a/src/pages/custom/custom-page.js b/src/pages/custom/custom-page.js index 8ca40c6fc..544a8d076 100644 --- a/src/pages/custom/custom-page.js +++ b/src/pages/custom/custom-page.js @@ -11,13 +11,11 @@ import Taro, { useShareAppMessage, useShareTimeline, } from '@tarojs/taro' -import { ScrollView } from '@tarojs/components' -import api from '@/api' -import doc from '@/doc' +import { ScrollView, View } from '@tarojs/components' import qs from 'qs' -import { SpPage, SpSearch, SpSkuSelect, SpTabbar, SpLogin } from '@/components' +import { SpPage, SpSkuSelect, SpTabbar, SpLogin, SpPoweredBy } from '@/components' import { WgtsContext } from '@/pages/home/wgts/wgts-context' -import { getDistributorId, log, entryLaunch, pickBy, showToast, buildSharePath } from '@/utils' +import { getDistributorId, log, entryLaunch, buildSharePath } from '@/utils' import { platformTemplateName } from '@/utils/platform' import req from '@/api/req' import HomeWgts from '@/pages/home/comps/home-wgts' @@ -157,39 +155,43 @@ function CustomPage(props) { > + {/* If you remove or alter Shopex brand identifiers, you must obtain a branding removal license from Shopex. Contact us at: http://www.shopex.cn to purchase a branding removal license. */} + + + + + {/* Sku选择器 */} + { + setState((draft) => { + draft.skuPanelOpen = false + }) + }} + onChange={(skuText, curItem) => { + setState((draft) => { + draft.skuText = skuText + draft.curItem = curItem + }) + }} + /> + + {/* 登录组件 */} + { + // 新注册会员登录成功 + // 登录成功后需要获取店铺信息,然后查看店铺 + checkEnterStoreRule() + }} + onPolicyClose={() => { + onPolicyChange(false) + }} + > - - {/* Sku选择器 */} - { - setState((draft) => { - draft.skuPanelOpen = false - }) - }} - onChange={(skuText, curItem) => { - setState((draft) => { - draft.skuText = skuText - draft.curItem = curItem - }) - }} - /> - - {/* 登录组件 */} - { - // 新注册会员登录成功 - // 登录成功后需要获取店铺信息,然后查看店铺 - checkEnterStoreRule() - }} - onPolicyClose={() => { - onPolicyChange(false) - }} - > ) } diff --git a/src/pages/home/wgts/slider/index.scss b/src/pages/home/wgts/slider/index.scss index 673fd95ed..432567494 100644 --- a/src/pages/home/wgts/slider/index.scss +++ b/src/pages/home/wgts/slider/index.scss @@ -77,15 +77,16 @@ .slider-pagination { position: absolute; - left: 50%; - transform: translateX(-50%); bottom: 20px; z-index: 200; box-sizing: border-box; padding: 20px; display: flex; + left: 0; + right: 0; &.cover { + width: 100%; position: initial; } diff --git a/src/pages/index.js b/src/pages/index.js index 430643bf8..fbd5fe361 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -22,7 +22,8 @@ import { SpSkuSelect, SpPrivacyModal, SpLogin, - SpLoading + SpLoading, + SpPoweredBy } from '@/components' import api from '@/api' import { @@ -343,14 +344,9 @@ function Home() { )} {/* If you remove or alter Shopex brand identifiers, you must obtain a branding removal license from Shopex. Contact us at: http://www.shopex.cn to purchase a branding removal license. */} - {/* - Powered by - - */} + + + {/* 小程序收藏提示 */} {isWeixin && }