2025-04-15 10:07:11 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
2025-04-15 11:04:10 +08:00
|
|
|
<view class="bg-box">
|
2025-04-15 14:37:47 +08:00
|
|
|
<view class="homo-title">首页</view>
|
|
|
|
<image
|
|
|
|
class="bg-logo"
|
|
|
|
style="width: 200rpx; height: 170rpx"
|
|
|
|
src="/static/adminImg/bg-logo.png"
|
|
|
|
></image>
|
|
|
|
<image
|
|
|
|
class="bg-hi"
|
|
|
|
style="width: 130rpx; height: 50rpx"
|
|
|
|
src="/static/adminImg/logo-hi.png"
|
|
|
|
></image>
|
2025-04-15 11:04:10 +08:00
|
|
|
<view style="height: 150rpx"></view>
|
|
|
|
<view class="tip">欢迎使用,张三</view>
|
2025-04-15 14:37:47 +08:00
|
|
|
<view class="desc">欢迎使用巡检管理员端</view>
|
2025-04-15 11:04:10 +08:00
|
|
|
<view class="card">
|
|
|
|
<view class="card-item">
|
|
|
|
<view class="item-title">区域数量 </view>
|
|
|
|
<view class="item-totel">10 </view>
|
2025-04-15 14:37:47 +08:00
|
|
|
<image
|
|
|
|
class="card-img"
|
|
|
|
style="width: 130rpx; height: 130rpx"
|
|
|
|
src="/static/adminImg/card1.png"
|
|
|
|
></image>
|
2025-04-15 11:04:10 +08:00
|
|
|
</view>
|
|
|
|
<view class="card-item">
|
|
|
|
<view class="item-title">子区域数量 </view>
|
|
|
|
<view class="item-totel">20 </view>
|
2025-04-15 14:37:47 +08:00
|
|
|
<image
|
|
|
|
class="card-img"
|
|
|
|
style="width: 130rpx; height: 130rpx"
|
|
|
|
src="/static/adminImg/card2.png"
|
|
|
|
></image>
|
2025-04-15 11:04:10 +08:00
|
|
|
</view>
|
|
|
|
<view class="card-item">
|
|
|
|
<view class="item-title">已绑定子区域数 </view>
|
|
|
|
<view class="item-totel">30 </view>
|
2025-04-15 14:37:47 +08:00
|
|
|
<image
|
|
|
|
class="card-img"
|
|
|
|
style="width: 130rpx; height: 130rpx"
|
|
|
|
src="/static/adminImg/card3.png"
|
|
|
|
></image>
|
2025-04-15 11:04:10 +08:00
|
|
|
</view>
|
|
|
|
<view class="card-item">
|
|
|
|
<view class="item-title">未绑定子区域数 </view>
|
|
|
|
<view class="item-totel">40 </view>
|
2025-04-15 14:37:47 +08:00
|
|
|
<image
|
|
|
|
class="card-img"
|
|
|
|
style="width: 130rpx; height: 130rpx"
|
|
|
|
src="/static/adminImg/card4.png"
|
|
|
|
></image>
|
2025-04-15 11:04:10 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2025-04-18 11:55:50 +08:00
|
|
|
<view v-if="true" style="display: flex">
|
|
|
|
<u-button type="error" @click="testFn">调试录入卡片</u-button>
|
|
|
|
</view>
|
2025-04-15 11:04:10 +08:00
|
|
|
</view>
|
2025-04-15 10:07:11 +08:00
|
|
|
<u-tabbar :list="vuex_tabbar"></u-tabbar>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
import { loginApi } from "@/api/apiList";
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
phone: "13800451500",
|
|
|
|
pwd: "123456",
|
|
|
|
};
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
uni.hideLoading(); // 关闭 Loading
|
|
|
|
},
|
|
|
|
onLoad() {},
|
2025-04-18 11:55:50 +08:00
|
|
|
methods: {
|
|
|
|
testFn() {
|
|
|
|
let u = navigator.userAgent;
|
|
|
|
let isAndroid = u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //android
|
|
|
|
// let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios
|
|
|
|
try {
|
|
|
|
if (isAndroid && AndroidJs) {
|
|
|
|
console.log("%c%s", "color:red", "安卓--调用方法");
|
|
|
|
const reqRow = {
|
|
|
|
name: "input",
|
|
|
|
data: "",
|
|
|
|
};
|
|
|
|
AndroidJs.func(JSON.stringify(reqRow)); // 给安卓传参
|
|
|
|
} else {
|
|
|
|
console.log("%c%s", "color:red", "苹果--调用方法");
|
|
|
|
const reqRow = {
|
|
|
|
name: "back-iphone",
|
|
|
|
data: "",
|
|
|
|
};
|
|
|
|
window.webkit.messageHandlers.func.postMessage(JSON.stringify(reqRow)); // 给ios 传参
|
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
console.log(e, "e-----判断安卓苹果类型出错");
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
2025-04-15 10:07:11 +08:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.content {
|
2025-04-15 11:04:10 +08:00
|
|
|
height: calc(100vh - 100rpx); // 确保容器有明确高度
|
2025-04-15 10:07:11 +08:00
|
|
|
// background-color: skyblue;
|
2025-04-15 14:37:47 +08:00
|
|
|
|
2025-04-15 10:07:11 +08:00
|
|
|
overflow: hidden;
|
2025-04-15 11:04:10 +08:00
|
|
|
// padding-bottom: 100rpx;
|
|
|
|
.bg-box {
|
2025-04-15 14:37:47 +08:00
|
|
|
position: relative;
|
|
|
|
// background-color: #528dfe;
|
|
|
|
background: linear-gradient(to bottom, #3179fb, white);
|
|
|
|
height: 650rpx;
|
|
|
|
.homo-title {
|
|
|
|
color: white;
|
|
|
|
transform: translateY(30rpx);
|
|
|
|
font-size: 35rpx;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
.bg-logo {
|
|
|
|
position: absolute;
|
|
|
|
right: 50rpx;
|
|
|
|
top: 160rpx;
|
|
|
|
}
|
|
|
|
.bg-hi {
|
|
|
|
position: absolute;
|
|
|
|
left: 30rpx;
|
|
|
|
top: 200rpx;
|
|
|
|
}
|
|
|
|
|
2025-04-15 11:04:10 +08:00
|
|
|
.tip {
|
2025-04-15 14:37:47 +08:00
|
|
|
padding-left: 120rpx;
|
2025-04-15 11:04:10 +08:00
|
|
|
color: white;
|
|
|
|
font-size: 40rpx;
|
|
|
|
}
|
|
|
|
.desc {
|
|
|
|
margin-top: 20rpx;
|
|
|
|
padding-left: 30rpx;
|
2025-04-15 14:37:47 +08:00
|
|
|
color: #ffffff99;
|
2025-04-15 11:04:10 +08:00
|
|
|
}
|
|
|
|
.card {
|
2025-04-15 14:37:47 +08:00
|
|
|
// border: 1px solid red;
|
2025-04-15 11:04:10 +08:00
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(2, 1fr);
|
|
|
|
grid-template-rows: repeat(2, 1fr);
|
|
|
|
gap: 30rpx;
|
|
|
|
padding: 50rpx;
|
|
|
|
.card-item {
|
2025-04-15 14:37:47 +08:00
|
|
|
position: relative;
|
|
|
|
// border: 1px solid blue;
|
2025-04-15 11:04:10 +08:00
|
|
|
border-radius: 20rpx;
|
2025-04-15 14:37:47 +08:00
|
|
|
// background-color: red;
|
|
|
|
background: linear-gradient(to bottom, white, #e1e9ff);
|
|
|
|
height: 280rpx;
|
2025-04-15 11:04:10 +08:00
|
|
|
padding: 30rpx;
|
|
|
|
.item-title {
|
|
|
|
font-size: 30rpx;
|
|
|
|
}
|
|
|
|
.item-totel {
|
|
|
|
font-size: 50rpx;
|
|
|
|
}
|
2025-04-15 14:37:47 +08:00
|
|
|
.card-img {
|
|
|
|
position: absolute;
|
|
|
|
right: 20rpx;
|
|
|
|
bottom: 20rpx;
|
|
|
|
}
|
2025-04-15 11:04:10 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2025-04-15 10:07:11 +08:00
|
|
|
}
|
|
|
|
</style>
|