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": "",
"projectname": "Mall-lymarket",
"description": "项目配置文件详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"appid": "wx64fe67f111d52457",
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": false,
"postcss": true,
"minified": true,
@ -21,7 +23,7 @@
"useStaticServer": true,
"showES6CompileOption": false,
"checkInvalidKey": true,
"compileHotReLoad": false,
"compileHotReLoad": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
@ -33,16 +35,15 @@
"ignoreUploadUnusedFiles": true
},
"compileType": "miniprogram",
"libVersion": "2.24.5",
"srcMiniprogramRoot": "dist/",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
},
"libVersion": "2.28.0",
"packOptions": {
"ignore": [],
"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 type { IconNames } from '@/components/iconfont/iconfont'
import useUserInfo from '@/use/useUserInfo'
import { useSelector } from '@/reducers/hooks'
import { BASE_URL } from '@/common/constant'
// 用户头像
const UserAvatar = ({ src }: { src?: string }) => {
@ -242,6 +244,10 @@ const User = () => {
<>
<View className={styles.main}>
<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>
</>
)