feat(我的): 添加版本信息显示

This commit is contained in:
xuan 2022-12-06 14:24:56 +08:00
parent ba86d8dfa5
commit ec7f234dc4
2 changed files with 16 additions and 9 deletions

View File

@ -1,8 +1,10 @@
{ {
"miniprogramRoot": "", "miniprogramRoot": "",
"projectname": "Mall-lymarket",
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"appid": "wx64fe67f111d52457",
"setting": { "setting": {
"urlCheck": true, "urlCheck": false,
"es6": false, "es6": false,
"postcss": true, "postcss": true,
"minified": true, "minified": true,
@ -21,7 +23,7 @@
"useStaticServer": true, "useStaticServer": true,
"showES6CompileOption": false, "showES6CompileOption": false,
"checkInvalidKey": true, "checkInvalidKey": true,
"compileHotReLoad": false, "compileHotReLoad": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
@ -33,16 +35,15 @@
"ignoreUploadUnusedFiles": true "ignoreUploadUnusedFiles": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.24.5",
"srcMiniprogramRoot": "dist/", "srcMiniprogramRoot": "dist/",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "2.28.0",
"packOptions": { "packOptions": {
"ignore": [], "ignore": [],
"include": [] "include": []
}, },
"appid": "wx64fe67f111d52457" "condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
} }

View File

@ -17,6 +17,8 @@ import LayoutBlock from '@/components/layoutBlock'
import IconCard from '@/components/iconCard' import IconCard from '@/components/iconCard'
import type { IconNames } from '@/components/iconfont/iconfont' import type { IconNames } from '@/components/iconfont/iconfont'
import useUserInfo from '@/use/useUserInfo' import useUserInfo from '@/use/useUserInfo'
import { useSelector } from '@/reducers/hooks'
import { BASE_URL } from '@/common/constant'
// 用户头像 // 用户头像
const UserAvatar = ({ src }: { src?: string }) => { const UserAvatar = ({ src }: { src?: string }) => {
@ -242,6 +244,10 @@ const User = () => {
<> <>
<View className={styles.main}> <View className={styles.main}>
<UserInfo /> <UserInfo />
{/* 测试暂时添加 */}
{CURRENT_ENV === 'development' && <View style={{ fontSize: '26rpx', color: '#707070', textAlign: 'center' }}>{CURRENT_VERSION}</View>}
{CURRENT_ENV === 'development' && <View style={{ fontSize: '26rpx', color: '#707070', textAlign: 'center' }}>{BASE_URL}</View>}
</View> </View>
</> </>
) )