ckgl/pages/index/index.vue
2024-12-26 16:45:53 +08:00

114 lines
2.0 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="content">
<view v-for="(item,index) in ListData" :key="index">
<p class="btn" @click="gotoLink(item)" v-if="item.name">{{ item.name }}</p>
</view>
</view>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue'
const ListData =ref([
{
path: '../maintenance/m-process',
name: '工序项维护',
},
{
path: '../maintenance/m-requirements',
name: '工艺要求维护',
},
{
path: '../maintenance/m-factory',
name: '工厂维护',
},
{
path: '../maintenance/m-other',
name: '其他要求项维护',
},
// {
// path: '../lecher/l-quality',
// name: '色胚质检项维护',
// },
// {
// path: '../lecher/l-flaws',
// name: '色胚质检瑕疵维护',
// },
{
path: '../whiteEmbryo/w-warehousing',
name: '白胚入库',
},
{
path: '../whiteEmbryo/w-level',
name: '白胚等级维护',
},
{
path: '../whiteEmbryo/w-suppliers',
name: '供应商维护',
},
{
path: '../whiteEmbryo/w-scanCode',
name: '扫码放货架',
},
{
path: '../whiteEmbryo/w-warehouse',
name: '仓库维护',
},
{
path: '../whiteEmbryo/w-libraryLocation',
name: '库位号维护',
},
{
path: '../whiteEmbryo/w-list',
name: '白胚列表',
},
] as any[])
onMounted(() => {
uni.getStorage({
key:'token',
success: function (res) {
if(!res.data){
uni.reLaunch({
url:'/pages/login/login'
})
}
},
fail:function(error){
uni.reLaunch({
url:'/pages/login/login'
})
}
})
})
const gotoLink = (item: any) => {
uni.navigateTo({
url:item.path
})
}
</script>
<style scoped lang="scss">
.btn {
padding: 15px 0;
margin: 10px;
background-color: #35a5f7;
color: #fff;
text-align: center;
border-radius: 20px;
}
input[type='number'] {
-moz-appearance: textfield;
}
  input[type=number]::-webkit-inner-spin-button,
  input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
</style>