This commit is contained in:
parent
b90e9cb22e
commit
f44238d9bc
3
App.vue
3
App.vue
|
|
@ -1,7 +1,4 @@
|
|||
<script>
|
||||
import { get } from "@/utils/requests.js"
|
||||
import { uiUtil } from "@/utils/common.js"
|
||||
|
||||
export default {
|
||||
onLaunch: function (options) {
|
||||
const startTime = Date.now()
|
||||
|
|
|
|||
8
main.js
8
main.js
|
|
@ -16,11 +16,19 @@ import { createSSRApp } from 'vue'
|
|||
import { store, useStore } from './store'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
|
||||
// 将store挂载到全局
|
||||
app.config.globalProperties.$store = store
|
||||
|
||||
// 获取系统信息并挂载到全局
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
app.config.globalProperties.$platform = systemInfo.platform
|
||||
app.config.globalProperties.$systemInfo = systemInfo
|
||||
|
||||
// 获取系统信息
|
||||
const { getSystemInfo } = useStore()
|
||||
getSystemInfo()
|
||||
|
||||
return {
|
||||
app
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,8 +92,8 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view class="footer-box">
|
||||
<text class="vision-text">版本:{{ vision }}</text>
|
||||
<view class="footer-box" :class="{ 'ios-padding-bottom': platform === 'ios' }">
|
||||
<text class="vision-text">版本:{{ vision }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -102,7 +102,8 @@
|
|||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
util
|
||||
util,
|
||||
deviceUtil
|
||||
} from '@/utils/common.js'
|
||||
import {
|
||||
storage
|
||||
|
|
@ -120,6 +121,8 @@ import {
|
|||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
|
||||
import { getCurrentInstance } from 'vue'
|
||||
|
||||
// 菜单列表
|
||||
const menuList = [
|
||||
{
|
||||
|
|
@ -156,7 +159,8 @@ const data = reactive({
|
|||
userInfo: {},
|
||||
videoHelpList: [],
|
||||
noticeInfo: {},
|
||||
vision: "1.0.0"
|
||||
vision: "1.0.0",
|
||||
platform: '' // 添加平台信息
|
||||
})
|
||||
|
||||
const {
|
||||
|
|
@ -166,12 +170,17 @@ const {
|
|||
userInfo,
|
||||
videoHelpList,
|
||||
noticeInfo,
|
||||
vision
|
||||
vision,
|
||||
platform
|
||||
} = toRefs(data);
|
||||
|
||||
onLoad(() => {
|
||||
onLoad(async () => {
|
||||
// 启动时获取数据
|
||||
fetchUserData()
|
||||
|
||||
// 获取平台信息
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
data.platform = systemInfo.platform
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
|
|
@ -685,11 +694,15 @@ const runMarqueeAnimation = (containerWidth, textWidth, myId) => {
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.vision-text {
|
||||
font-size: 24rpx;
|
||||
color: #767676;
|
||||
}
|
||||
|
||||
.ios-padding-bottom {
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue