2025-02-18 17:11:31 +08:00
|
|
|
|
<template>
|
2025-04-01 17:27:15 +08:00
|
|
|
|
<view class="backgroundContainer">
|
|
|
|
|
<view v-for="(item,index) in menuArray" :key="index">
|
|
|
|
|
<view class="menuCard" @click="jumpTo(item.url)">
|
|
|
|
|
{{item.name}}
|
2025-03-21 17:36:27 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2025-02-18 17:11:31 +08:00
|
|
|
|
</view>
|
2025-04-09 17:20:13 +08:00
|
|
|
|
<!-- 自动更新组件 -->
|
|
|
|
|
<zy-update ref="zyupgrade" :noticeflag="true" theme="blue" :h5preview="false" oldversion="1.0.0"
|
|
|
|
|
:appstoreflag="true" :autocheckupdate="true"></zy-update>
|
2025-02-18 17:11:31 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-04-09 17:20:13 +08:00
|
|
|
|
import { ref, onMounted, onBeforeUnmount, computed, nextTick, } from 'vue';
|
|
|
|
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
|
|
|
|
import ZyUpdate from '@/component/zy-upgrade/zy-upgrade.vue'
|
2025-02-18 17:11:31 +08:00
|
|
|
|
// 暗黑模式
|
2025-04-01 17:27:15 +08:00
|
|
|
|
const darkFans = ref(false);
|
2025-04-09 17:20:13 +08:00
|
|
|
|
const zyupgrade = ref(null)
|
2025-04-01 17:27:15 +08:00
|
|
|
|
type darkFanstype = {
|
|
|
|
|
darkFans : boolean
|
|
|
|
|
}
|
|
|
|
|
const menuArray = [
|
|
|
|
|
{
|
2025-04-07 17:34:20 +08:00
|
|
|
|
name: "护理单元",
|
2025-04-01 17:27:15 +08:00
|
|
|
|
url: "/pages/Nursing/index"
|
|
|
|
|
},
|
|
|
|
|
{
|
2025-04-07 17:34:20 +08:00
|
|
|
|
name: "仓库",
|
2025-04-01 17:27:15 +08:00
|
|
|
|
url: "/pages/Warehousing/index"
|
|
|
|
|
},
|
|
|
|
|
]
|
2025-04-09 17:20:13 +08:00
|
|
|
|
const jumpTo = (url : string) => {
|
2025-04-01 17:27:15 +08:00
|
|
|
|
uni.navigateTo({
|
2025-04-09 17:20:13 +08:00
|
|
|
|
url: url
|
2025-03-11 17:27:40 +08:00
|
|
|
|
});
|
2025-03-21 17:36:27 +08:00
|
|
|
|
}
|
2025-02-18 17:11:31 +08:00
|
|
|
|
// 生命周期钩子
|
2025-04-01 17:27:15 +08:00
|
|
|
|
onLoad((options : darkFanstype) => {
|
|
|
|
|
// 为uni.navigateBack()啥这么写,因为options给我返回的是字符串这个`false`,只能这么写,前端中`false`是true
|
|
|
|
|
// uni.navigateBack()
|
2025-02-18 17:11:31 +08:00
|
|
|
|
});
|
2025-04-01 17:27:15 +08:00
|
|
|
|
|
2025-04-09 17:20:13 +08:00
|
|
|
|
// 生命周期钩子
|
|
|
|
|
onShow(() => {
|
|
|
|
|
zyupgrade.value?.check_update()
|
|
|
|
|
});
|
2025-02-18 17:11:31 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
2025-04-01 17:27:15 +08:00
|
|
|
|
<style scoped lang="less">
|
2025-02-18 17:11:31 +08:00
|
|
|
|
.backgroundContainer {
|
|
|
|
|
display: flex;
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
2025-02-27 17:15:17 +08:00
|
|
|
|
background-image: url('/static/index/lightbgcnew.png');
|
2025-02-18 17:11:31 +08:00
|
|
|
|
background-size: cover;
|
|
|
|
|
background-position: center center;
|
|
|
|
|
overflow: hidden;
|
2025-03-14 17:30:56 +08:00
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
2025-02-18 17:11:31 +08:00
|
|
|
|
}
|
2025-04-09 17:20:13 +08:00
|
|
|
|
|
|
|
|
|
.menuCard {
|
2025-04-01 17:27:15 +08:00
|
|
|
|
width: 600rpx;
|
|
|
|
|
margin: 0 100rpx;
|
|
|
|
|
height: 400rpx;
|
|
|
|
|
background: linear-gradient(to bottom, #04BCED, #0160CE);
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 50rpx;
|
|
|
|
|
border-radius: 10%;
|
2025-03-21 17:36:27 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2025-04-09 17:20:13 +08:00
|
|
|
|
|
2025-04-01 17:27:15 +08:00
|
|
|
|
// //暗黑模式
|
|
|
|
|
// .darkbackgroundContainer {
|
|
|
|
|
// display: flex;
|
|
|
|
|
// position: relative;
|
|
|
|
|
// width: 100%;
|
|
|
|
|
// height: 100vh;
|
|
|
|
|
// background-image: url('/static/index/background.png');
|
|
|
|
|
// background-size: cover;
|
|
|
|
|
// background-position: center center;
|
|
|
|
|
// overflow: hidden;
|
|
|
|
|
// }
|
2025-02-18 17:11:31 +08:00
|
|
|
|
</style>
|