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