feat(branding): 更新应用名称及时里院子市集相关引用

- 将应用名称从"时里院子市集"更新为"通源堂健康生态平台"
- 修改了config/env.ts中的生产环境应用名称配置
- 更新了src/cms/category/index.tsx中的分享标题引用
- 调整了src/admin/components/UserCell.tsx中的导航路径从/dealer/index到/doctor/index
This commit is contained in:
2025-09-28 14:36:24 +08:00
parent a6b274d78d
commit 0a517b1247
72 changed files with 2140 additions and 4196 deletions

View File

@@ -41,7 +41,7 @@ function Cart() {
useShareAppMessage(() => {
return {
title: '购物车 - 时里院子市集',
title: '购物车 - 通源堂健康生态平台',
success: function () {
console.log('分享成功');
},

View File

@@ -44,7 +44,7 @@ function Category() {
useShareAppMessage(() => {
return {
title: `${nav?.categoryName}_时里院子市集`,
title: `${nav?.categoryName}_通源堂健康生态平台`,
path: `/shop/category/index?id=${categoryId}`,
success: function () {
console.log('分享成功');

View File

@@ -5,8 +5,10 @@ import {ArrowRight, Reward, Setting} from '@nutui/icons-react-taro'
import {useUser} from '@/hooks/useUser'
import {useEffect} from "react";
import {useDealerUser} from "@/hooks/useDealerUser";
import {useThemeStyles} from "@/hooks/useTheme";
const IsDealer = () => {
const themeStyles = useThemeStyles();
const {isSuperAdmin} = useUser();
const {dealerUser} = useDealerUser()
@@ -23,9 +25,7 @@ const IsDealer = () => {
<View className={'px-4'} style={{ marginTop: '8px', position: 'relative', zIndex: 25 }}>
<Cell
className="nutui-cell-clickable"
style={{
backgroundImage: 'linear-gradient(to right bottom, #e53e3e, #c53030)',
}}
style={themeStyles.primaryBackground}
title={
<View style={{display: 'inline-flex', alignItems: 'center'}}>
<Setting className={'text-white '} size={16}/>
@@ -49,19 +49,17 @@ const IsDealer = () => {
<View className={'px-4'} style={{ marginTop: '8px', position: 'relative', zIndex: 25 }}>
<Cell
className="nutui-cell-clickable"
style={{
backgroundImage: 'linear-gradient(to right bottom, #54a799, #177b73)',
}}
style={themeStyles.primaryBackground}
title={
<View style={{display: 'inline-flex', alignItems: 'center'}}>
<Reward className={'text-orange-100 '} size={16}/>
<Text style={{fontSize: '16px'}}
className={'pl-3 text-orange-100 font-medium'}></Text>
className={'pl-3 text-orange-100 font-medium'}>VIP申请</Text>
{/*<Text className={'text-white opacity-80 pl-3'}>门店核销</Text>*/}
</View>
}
extra={<ArrowRight color="#cccccc" size={18}/>}
onClick={() => navTo('/dealer/index', true)}
onClick={() => navTo('/doctor/index', true)}
/>
</View>
</>
@@ -76,9 +74,7 @@ const IsDealer = () => {
<View className={'px-4'} style={{ marginTop: '8px', position: 'relative', zIndex: 25 }}>
<Cell
className="nutui-cell-clickable"
style={{
backgroundImage: 'linear-gradient(to right bottom, #54a799, #177b73)',
}}
style={themeStyles.primaryBackground}
title={
<View style={{display: 'inline-flex', alignItems: 'center'}}>
<Reward className={'text-orange-100 '} size={16}/>
@@ -87,7 +83,7 @@ const IsDealer = () => {
</View>
}
extra={<ArrowRight color="#cccccc" size={18}/>}
onClick={() => navTo('/dealer/apply/add', true)}
onClick={() => navTo('/doctor/apply/add', true)}
/>
</View>
</>

View File

@@ -1,5 +1,5 @@
import {Avatar, Tag, Space, Button} from '@nutui/nutui-react-taro'
import {View, Text, Image} from '@tarojs/components'
import {Avatar, Tag, Space} from '@nutui/nutui-react-taro'
import {View, Text} from '@tarojs/components'
import {getUserInfo, getWxOpenId} from '@/api/layout';
import Taro from '@tarojs/taro';
import {useEffect, useState, forwardRef, useImperativeHandle} from "react";
@@ -10,6 +10,7 @@ import {useUser} from "@/hooks/useUser";
import {useUserData} from "@/hooks/useUserData";
import {getStoredInviteParams} from "@/utils/invite";
import UnifiedQRButton from "@/components/UnifiedQRButton";
import {useThemeStyles} from "@/hooks/useTheme";
const UserCard = forwardRef<any, any>((_, ref) => {
const {data, refresh} = useUserData()
@@ -17,6 +18,8 @@ const UserCard = forwardRef<any, any>((_, ref) => {
const [IsLogin, setIsLogin] = useState<boolean>(false)
const [userInfo, setUserInfo] = useState<User>()
const themeStyles = useThemeStyles();
// 下拉刷新
const handleRefresh = async () => {
await refresh()
@@ -95,7 +98,6 @@ const UserCard = forwardRef<any, any>((_, ref) => {
});
};
const openSetting = () => {
// Taro.openSetting调起客户端小程序设置界面返回用户设置的操作结果。设置界面只会出现小程序已经向用户请求过的权限。
Taro.openSetting({
@@ -118,6 +120,11 @@ const UserCard = forwardRef<any, any>((_, ref) => {
const handleGetPhoneNumber = ({detail}: { detail: { code?: string, encryptedData?: string, iv?: string } }) => {
const {code, encryptedData, iv} = detail
// 判断用户是否已登录
if(IsLogin){
return navTo(`/user/profile/profile`)
}
// 获取存储的邀请参数
const inviteParams = getStoredInviteParams()
const refereeId = inviteParams?.inviter ? parseInt(inviteParams.inviter) : 0
@@ -165,35 +172,19 @@ const UserCard = forwardRef<any, any>((_, ref) => {
}
return (
<View className={'pt-20'}>
<View className={'p-4'}>
<View className={'pt-14'}>
{/* 使用相对定位容器,让个人资料图片可以绝对定位在右上角 */}
<View className="relative z-20">
<View
className={'user-card w-full flex flex-col justify-around rounded-xl'}
style={{
background: 'linear-gradient(to bottom, #ffffff, #ffffff)',
height: '170px',
}}
>
<View className={'user-card-header flex w-full justify-between items-center pt-4'}>
<View className={'flex items-center mx-4'}>
{
IsLogin ? (
<Avatar size="large"
src={userInfo?.avatar || 'https://oss.wsdns.cn/20250623/62f830b85edb4a7293b8948c25e6f987.jpeg'}
shape="round"/>
) : (
<Button className={'text-black'} open-type="getPhoneNumber"
onGetPhoneNumber={handleGetPhoneNumber}>
<Avatar size="large"
src={userInfo?.avatar || 'https://oss.wsdns.cn/20250623/62f830b85edb4a7293b8948c25e6f987.jpeg'}
shape="round"/>
</Button>
)
}
<View className={'flex items-center mx-4'} onClick={handleGetPhoneNumber}>
<Avatar size="large"
src={userInfo?.avatar || ''}
shape="round"/>
<View className={'user-info flex flex-col px-2'}>
<View className={'py-1 text-black font-bold'}>{getDisplayName()}</View>
<View className={'py-1 text-white font-bold'}>{getDisplayName()}</View>
{IsLogin ? (
<View className={'grade text-xs py-1'}>
<Tag type="success" round>
@@ -211,7 +202,7 @@ const UserCard = forwardRef<any, any>((_, ref) => {
}}>
{/*统一扫码入口 - 支持登录和核销*/}
<UnifiedQRButton
text="扫"
text="扫一扫"
size="small"
onSuccess={(result) => {
console.log('统一扫码成功:', result);
@@ -230,47 +221,31 @@ const UserCard = forwardRef<any, any>((_, ref) => {
/>
</Space>
</View>
<View className={'flex justify-around mt-1'}>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/wallet/wallet', true)}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.balance || '0.00'}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.points || 0}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/coupon/index', true)}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.coupons || 0}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/gift/index', true)}>
<Text className={'text-sm text-gray-500'}></Text>
<Text className={'text-xl'}>{data?.giftCards || 0}</Text>
<View className={'py-2'}>
<View className={'flex justify-around mt-1'}>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/wallet/wallet', true)}>
<Text className={'text-sm'} style={themeStyles.textColor}></Text>
<Text className={'text-xl'} style={themeStyles.textColor}>{data?.balance || '0.00'}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}>
<Text className={'text-sm'} style={themeStyles.textColor}></Text>
<Text className={'text-xl'} style={themeStyles.textColor}>{data?.points || 0}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/coupon/index', true)}>
<Text className={'text-sm'} style={themeStyles.textColor}></Text>
<Text className={'text-xl'} style={themeStyles.textColor}>{data?.coupons || 0}</Text>
</View>
<View className={'item flex justify-center flex-col items-center'}
onClick={() => navTo('/user/gift/index', true)}>
<Text className={'text-sm'} style={themeStyles.textColor}></Text>
<Text className={'text-xl'} style={themeStyles.textColor}>{data?.giftCards || 0}</Text>
</View>
</View>
</View>
</View>
{/* 个人资料图片,定位在右上角 */}
<View
className="absolute top-0 right-0 overflow-hidden z-30"
style={{
borderRadius: "0 0.75rem 0 0"
}}
onClick={() => navTo('/user/profile/profile', true)}
>
<Image
src="https://oss.wsdns.cn/20250913/7c3de38b377344b89131aba40214f63f.png"
style={{
width: "200rpx"
}}
mode="widthFix"
/>
</View>
</View>
</View>
</View>
)
})

View File

@@ -87,7 +87,7 @@ const UserCell = () => {
</View>
</Grid.Item>
<Grid.Item text={'推广邀请'} onClick={() => navTo('/dealer/team/index', true)}>
<Grid.Item text={'推广邀请'} onClick={() => navTo('/doctor/team/index', true)}>
<View className="text-center">
<View className="w-12 h-12 bg-purple-50 rounded-xl flex items-center justify-center mx-auto mb-2">
<People color="#8b5cf6" size="20"/>
@@ -95,7 +95,7 @@ const UserCell = () => {
</View>
</Grid.Item>
{/*<Grid.Item text={'我的邀请码'} onClick={() => navTo('/dealer/qrcode/index', true)}>*/}
{/*<Grid.Item text={'我的邀请码'} onClick={() => navTo('/doctor/qrcode/index', true)}>*/}
{/* <View className="text-center">*/}
{/* <View className="w-12 h-12 bg-orange-50 rounded-xl flex items-center justify-center mx-auto mb-2">*/}
{/* <Dongdong color="#f59e0b" size="20"/>*/}

View File

@@ -33,7 +33,25 @@ function User() {
onRefresh={handleRefresh}
headHeight={60}
>
<View className={'h-44 w-full fixed top-0 z-0'} style={themeStyles.primaryBackground}></View>
{/* 装饰性背景 */}
<View className={'h-64 w-full fixed top-0 z-0'} style={themeStyles.primaryBackground}>
{/* 装饰性背景元素 - 小程序兼容版本 */}
<View className="absolute w-32 h-32 rounded-full" style={{
backgroundColor: 'rgba(255, 255, 255, 0.1)',
top: '-16px',
right: '-16px'
}}></View>
<View className="absolute w-24 h-24 rounded-full" style={{
backgroundColor: 'rgba(255, 255, 255, 0.08)',
bottom: '-12px',
left: '-12px'
}}></View>
<View className="absolute w-16 h-16 rounded-full" style={{
backgroundColor: 'rgba(255, 255, 255, 0.05)',
top: '60px',
left: '120px'
}}></View>
</View>
<UserCard ref={userCardRef}/>
<UserOrder/>
<IsDealer/>