Merge branch 'fanpeng' into 'develop'

feat: 1.首页顶部信息、轮播图、待办事项、团队公告UI 2. 添加新设备登录验证 3. 首页tabs组件补充数据

See merge request StarlockTeam/starwork-uniapp!6
This commit is contained in:
刘燕峰 2025-01-07 08:59:07 +00:00
commit fabc1b83f4
47 changed files with 593 additions and 164 deletions

View File

@ -3,7 +3,7 @@ import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
export default defineUniPages({
globalStyle: {
navigationStyle: 'default',
navigationBarTitleText: 'unibest',
navigationBarTitleText: '星星勤务',
navigationBarBackgroundColor: '#f8f8f8',
navigationBarTextStyle: 'black',
backgroundColor: '#FFFFFF'
@ -28,25 +28,25 @@ export default defineUniPages({
list: [
{
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/homeHL.png',
selectedIconPath: 'static/tabbar/home_selected.png',
pagePath: 'pages/home/home',
text: '首页'
},
{
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/homeHL.png',
iconPath: 'static/tabbar/workbench.png',
selectedIconPath: 'static/tabbar/workbench_selected.png',
pagePath: 'pages/workbench/workbench',
text: '工作台'
},
{
iconPath: 'static/tabbar/home.png',
selectedIconPath: 'static/tabbar/homeHL.png',
iconPath: 'static/tabbar/notification.png',
selectedIconPath: 'static/tabbar/notification_selected.png',
pagePath: 'pages/notification/notification',
text: '消息'
},
{
iconPath: 'static/tabbar/example.png',
selectedIconPath: 'static/tabbar/exampleHL.png',
iconPath: 'static/tabbar/mine.png',
selectedIconPath: 'static/tabbar/mine_selected.png',
pagePath: 'pages/mine/mine',
text: '我的'
}

View File

@ -14,6 +14,12 @@
<style lang="scss">
/* stylelint-disable selector-type-no-unknown */
html,
body {
overflow: hidden;
}
button::after {
border: none;
}

View File

@ -0,0 +1,88 @@
<template>
<view>
<wd-popup v-model="show" position="left" @close="closePopup">
<view class="w-80 bg-[#f3f5fa] pos-relative h-full" v-if="systemInfo">
<view
:style="{ paddingTop: systemInfo.safeAreaInsets?.top + 'px' }"
class="h-12 pt-1 flex flex-items-center flex-justify-between mx-4 custom-color-black"
>
<view class="text-4 font-bold">我的团队</view>
<view class="rounded-50% bg-[#e2e5ea] flex-justify-center flex-items-center flex w-6 h-6">
<wd-icon name="refresh" size="14px"></wd-icon>
</view>
</view>
<scroll-view scroll-y="true" :style="{ height: systemInfo.safeArea?.height - 128 + 'px' }">
<view class="pb-10">
<view
class="flex flex-items-center bg-white shadow-sm p-2 mx-2 rounded-2 mt-2"
v-for="(item, index) in [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 12, 13, 14, 15]"
:key="index"
>
<image
src="/static/images/icon_team_join.png"
mode="aspectFill"
class="w-5 h-5 mx-2"
></image>
<view>
<view class="text-3.5">06066322的互联</view>
<image
src="/static/images/icon_team.webp"
mode="widthFix"
class="w-10 mt-1"
></image>
</view>
<image
src="/static/images/icon_setting.webp"
mode="aspectFill"
class="w-4 h-4 ml-a"
></image>
</view>
</view>
</scroll-view>
<view class="pb-safe bottom-0 pos-absolute w-full color-[#515357] bg-[#f3f5fa]">
<wd-divider color="#e6e7ec"></wd-divider>
<view class="flex-items-center flex flex-justify-around px-5">
<view>创建团队</view>
<wd-divider color="#bdbfc4" vertical />
<view>加入团队</view>
</view>
<wd-divider color="#e6e7ec"></wd-divider>
<view class="text-center pb-4">快捷添加我的设备</view>
</view>
</view>
</wd-popup>
</view>
</template>
<script setup lang="ts">
import { useBasicStore } from '@/store'
const $basic = useBasicStore()
const systemInfo = ref(null)
const show = ref<boolean>(false)
onMounted(async () => {
systemInfo.value = await $basic.getSystemInfo()
showModal()
})
const closePopup = () => {
uni.showTabBar()
}
const showModal = () => {
uni.hideTabBar()
show.value = true
}
const hideModal = () => {
uni.showTabBar()
show.value = false
}
defineExpose({
showModal,
hideModal
})
</script>

View File

@ -1,23 +1,23 @@
type ResultCode = 0 | -1 | -2 | 10003
enum ResultCode {
Success = 0,
Fail = -1,
NotMore = -2,
PaySuccessful = 10003,
NewDevice = 441
}
interface ResultData {
message: string
code: ResultCode
data: Record<string, any>
message: string
}
export class Result {
static codes = {
Success: 0 as const,
Fail: -1 as const,
NotMore: -2 as const,
PaySuccessful: 10003 as const
}
static resultsMap = new Map<ResultCode, ResultData>([
[Result.codes.Success, { message: '成功', data: {} }],
[Result.codes.Fail, { message: '网络加载失败', data: {} }],
[Result.codes.NotMore, { message: '没有更多', data: {} }],
[Result.codes.PaySuccessful, { message: '支付成功', data: {} }]
static resultsMap = new Map<ResultCode, Omit<ResultData, 'code'>>([
[ResultCode.Success, { message: '成功', data: {} }],
[ResultCode.Fail, { message: '网络加载失败', data: {} }],
[ResultCode.NotMore, { message: '没有更多', data: {} }],
[ResultCode.PaySuccessful, { message: '支付成功', data: {} }]
])
code: ResultCode
@ -39,21 +39,26 @@ export class Result {
// 成功
static get Success(): Result {
return new Result(Result.codes.Success)
return new Result(ResultCode.Success)
}
// 失败(默认错误)
static get Fail(): Result {
return new Result(Result.codes.Fail)
return new Result(ResultCode.Fail)
}
// 没有更多
static get NotMore(): Result {
return new Result(Result.codes.NotMore)
return new Result(ResultCode.NotMore)
}
// 支付成功
static get PaySuccessful(): Result {
return new Result(Result.codes.PaySuccessful)
return new Result(ResultCode.PaySuccessful)
}
// 新设备
static get NewDevice(): Result {
return new Result(ResultCode.NewDevice)
}
}

View File

@ -1,7 +1,7 @@
{
"globalStyle": {
"navigationStyle": "default",
"navigationBarTitleText": "unibest",
"navigationBarTitleText": "星星勤务",
"navigationBarBackgroundColor": "#f8f8f8",
"navigationBarTextStyle": "black",
"backgroundColor": "#FFFFFF"
@ -25,25 +25,25 @@
"list": [
{
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/homeHL.png",
"selectedIconPath": "static/tabbar/home_selected.png",
"pagePath": "pages/home/home",
"text": "首页"
},
{
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/homeHL.png",
"iconPath": "static/tabbar/workbench.png",
"selectedIconPath": "static/tabbar/workbench_selected.png",
"pagePath": "pages/workbench/workbench",
"text": "工作台"
},
{
"iconPath": "static/tabbar/home.png",
"selectedIconPath": "static/tabbar/homeHL.png",
"iconPath": "static/tabbar/notification.png",
"selectedIconPath": "static/tabbar/notification_selected.png",
"pagePath": "pages/notification/notification",
"text": "消息"
},
{
"iconPath": "static/tabbar/example.png",
"selectedIconPath": "static/tabbar/exampleHL.png",
"iconPath": "static/tabbar/mine.png",
"selectedIconPath": "static/tabbar/mine_selected.png",
"pagePath": "pages/mine/mine",
"text": "我的"
}
@ -55,7 +55,8 @@
"type": "home",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "首页"
"navigationBarTitleText": "首页",
"disableScroll": true
}
},
{

View File

@ -10,6 +10,10 @@
<template>
<view>
<TopNavigation></TopNavigation>
<view v-if="tip" class="flex flex-items-center bg-[#fce4e2] color-[#e63b3b] py-2 px-4">
<wd-icon name="warning" size="20px" color="#e63b3b" class="mr-3"></wd-icon>
<view>您正在一台新设备登录为了您的账号安全请进行安全验证</view>
</view>
<view class="text-6 ml-4 pt-7 custom-color-black font-bold">请输入验证码</view>
<view class="text-3.5 ml-4 mt-2 mb-4 custom-color-grey">
<view>已发送验证码至{{ maskedPhone }}</view>
@ -60,6 +64,8 @@
const systemInfo = ref<GetSystemInfoResult>(null)
const tip = ref<boolean>(false)
onMounted(async () => {
systemInfo.value = await $basic.getSystemInfo()
})
@ -67,6 +73,7 @@
onLoad(async options => {
phone.value = options.phone
type.value = options.type
tip.value = options.tip === 'true'
countDownStart()
})

View File

@ -0,0 +1,10 @@
<template>
<view class="mx-4 px-2 py-3 bg-white rounded-2 shadow-sm">
<image src="/static/images/bg_no_device.webp" mode="widthFix" class="w-full pt-2"></image>
<view class="ml-15% mt-3 w-70% text-center custom-bg-blue color-white py-2 rounded-2 text-3.5">
添加设备
</view>
</view>
</template>
<script setup lang="ts"></script>

View File

@ -0,0 +1,20 @@
<template>
<view class="mx-4 flex-items-center flex flex-justify-between">
<view class="w-34 h-10 color-[#134347] bg-[#cef2f5] px-4 py-3 rounded-2 shadow-sm">
<view class="flex flex-items-center text-3.5">
<view class="font-bold">添加人员</view>
<wd-icon color="#134347" name="swap-right" class="ml-2" size="14px"></wd-icon>
</view>
<view class="mt-1 text-2.5">开启协同管理</view>
</view>
<view class="w-34 h-10 color-[#172a5b] bg-[#d4e0ff] px-4 py-3 rounded-2 shadow-sm">
<view class="flex flex-items-center text-3.5">
<view class="font-bold">添加设备</view>
<wd-icon color="#172a5b" name="swap-right" class="ml-2" size="14px"></wd-icon>
</view>
<view class="mt-1 text-2.5">开启智能物联</view>
</view>
</view>
</template>
<script setup lang="ts"></script>

View File

@ -0,0 +1,27 @@
<template>
<view class="mx-4 px-2 py-3 bg-white rounded-2 shadow-sm">
<view class="flex-items-center flex">
<image src="/static/images/icon_one_key_door.png" class="w-4 h-4" mode="aspectFill"></image>
<view class="text-3.5 ml-2">考勤</view>
<wd-icon name="arrow-right" size="14px" class="ml-a" color="#bfbfbf"></wd-icon>
</view>
<view class="mt-3 flex-items-center flex">
<wd-circle class="ml-4" v-model="current" :clockwise="false" :size="65" :strokeWidth="15">
<view class="text-3.5">{{ current }}%</view>
</wd-circle>
<view class="ml-4 text-3">
<view class="text-3.5 font-600">今日出勤率2/12</view>
<view class="flex flex-items-center mt-2">
<view>未打卡</view>
<view class="color-[#ea8720]">10</view>
<view class="ml-3">迟到</view>
<view class="color-red">0</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
const current = ref<number>(17)
</script>

View File

@ -0,0 +1,14 @@
<template>
<view class="mx-4 bg-white px-2 py-3 flex flex-items-center text-3.5 rounded-2 shadow-sm">
<view>
<text class="font-bold custom-color-black">团队</text>
<text class="font-bold color-red">公告</text>
</view>
<view class="ml-2 w-1 h-1 bg-black rounded-50%"></view>
<view class="ml-2">1</view>
<view class="ml-a">全部</view>
<wd-icon name="arrow-right" size="14px" class="ml-2" color="#bfbfbf"></wd-icon>
</view>
</template>
<script setup lang="ts"></script>

View File

@ -0,0 +1,43 @@
<template>
<view class="mx-4 px-2 py-3 bg-white rounded-2 shadow-sm">
<view class="flex-items-center flex">
<image src="/static/images/icon_one_key_door.png" class="w-4 h-4" mode="aspectFill"></image>
<view class="text-3.5 ml-2">一键开门</view>
<wd-icon name="arrow-right" size="14px" class="ml-a" color="#bfbfbf"></wd-icon>
</view>
<view class="flex flex-wrap mt-1 flex-justify-between">
<view
class="pos-relative w-40 h-24.23 mt-3 rounded-2"
v-for="(item, index) in [1, 2, 3]"
:key="index"
>
<image
src="/static/images/bg_one_key_door.png"
class="pos-absolute w-40 h-24.2 rounded-2"
mode="aspectFill"
></image>
<view
class="bg-[rgba(255,255,255,0.5)] mt-3 pos-absolute right-3 w-5 h-5 rounded-2 flex-justify-center flex flex-items-center"
>
<wd-icon name="play" size="22px" color="#515057"></wd-icon>
</view>
<view class="pos-relative ml-3 mt-3">
<view
class="rounded-50% w-10 h-10 flex flex-items-center flex-justify-center bg-[rgba(0,0,0,0.3)]"
>
<image
src="/static/images/icon_one_key_door_key.png"
class="w-3.5"
mode="widthFix"
></image>
</view>
<view class="mt-3 color-white font-bold text-4 w-35 truncate">
{{ item }}
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="ts"></script>

View File

@ -0,0 +1,16 @@
<template>
<view class="mx-4 px-2 py-3 bg-white rounded-2 shadow-sm text-2.5">
<view class="flex flex-items-center flex-justify-around">
<view class="text-center">
<image class="w-6 h-6" src="/static/images/icon_main_edit.webp" mode="aspectFill"></image>
<view class="mt-1">编辑首页</view>
</view>
<view class="text-center">
<image class="w-6 h-6" src="/static/images/icon_main_switch.webp" mode="aspectFill"></image>
<view class="mt-1">切换到简洁版</view>
</view>
</view>
</view>
</template>
<script setup lang="ts"></script>

View File

@ -0,0 +1,37 @@
<template>
<view class="mx-4">
<wd-swiper
:list="swiperList"
autoplay
height="100"
indicatorPosition="bottom-left"
v-model:current="current"
:indicator="{ type: 'dots-bar' }"
@click="handleClick"
@change="onChange"
></wd-swiper>
</view>
</template>
<script setup lang="ts">
const current = ref<number>(0)
const swiperList = ref<Array<string>>([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg'
])
const emits = defineEmits(['colorChange'])
function handleClick(e) {
console.log(e)
}
function onChange(e) {
if (e.current === 0) {
emits('colorChange', '#bfcbef')
} else {
emits('colorChange', '#f0d6ad')
}
}
</script>

View File

@ -1,10 +1,10 @@
<template>
<view class="m-2 p-2 bg-white rounded-2 pos-relative">
<image
@click="clickMenu"
src="/static/images/icon_table_menu.png"
class="w-6 h-6 pos-absolute right-1 top-3 p-1 z-10"
></image>
<view class="mx-4 py-1 bg-white rounded-2 pos-relative shadow-sm">
<view
class="h-42px z-10 pos-absolute right-1 bg-white flex flex-items-center justify-center px-2"
>
<image @click="clickMenu" src="/static/images/icon_table_menu.png" class="w-5 h-5"></image>
</view>
<wd-tabs
v-model="tab"
auto-line-width
@ -13,16 +13,16 @@
color="#0d100e"
inactiveColor="#838383"
>
<wd-tab v-for="(item, index) in list" :key="index" :title="item.title" :name="index">
<view class="flex flex-wrap">
<wd-tab v-for="(item, index) in list" :key="index" :title="item.name" :name="index">
<view class="flex flex-wrap ml-1.5">
<view
v-for="subItem in item.list"
:key="subItem.id"
class="text-center my-2 w-21.4375"
class="text-center my-2 w-20.4375"
@click="clickItem(subItem)"
>
<image :src="subItem.icon" class="w-7 h-7 m-a"></image>
<view class="text-3 mt-2">{{ subItem.title }}</view>
<view class="text-3 mt-2">{{ subItem.name }}</view>
</view>
</view>
</wd-tab>
@ -31,6 +31,8 @@
</template>
<script setup lang="ts">
import { HomeTab, HomeTabItem } from '@/typings'
defineOptions({
options: {
styleIsolation: 'shared'
@ -46,8 +48,6 @@
}
})
const emits = defineEmits(['clickItem'])
const clickMenu = () => {
uni.navigateTo({
url: '/pages/application-list/application-list'
@ -55,7 +55,9 @@
}
const clickItem = (item: HomeTabItem) => {
emits('clickItem', item)
uni.navigateTo({
url: item.url
})
}
</script>

View File

@ -0,0 +1,26 @@
<template>
<view class="mx-4 flex-items-center flex flex-justify-between">
<view class="w-34 h-10 color-[#134347] bg-[#cef2f5] px-4 py-3 rounded-2 shadow-sm">
<view class="flex flex-items-end text-3">
<view class="text-5 font-bold">12</view>
<view></view>
<view class="text-2.5 font-600 rounded-1 py-1 px-1 bg-[rgba(255,255,255,0.5)] ml-a">
人员管理
</view>
</view>
<view class="mt-1 text-2.5">人员总数</view>
</view>
<view class="w-34 h-10 color-[#172a5b] bg-[#d4e0ff] px-4 py-3 rounded-2 shadow-sm">
<view class="flex flex-items-end text-3">
<view class="text-5 font-bold">1</view>
<view></view>
<view class="text-2.5 font-600 rounded-1 py-1 px-1 bg-[rgba(255,255,255,0.5)] ml-a">
设备管理
</view>
</view>
<view class="mt-1 text-2.5">设备总数</view>
</view>
</view>
</template>
<script setup lang="ts"></script>

View File

@ -0,0 +1,34 @@
<template>
<view class="bg-white shadow-sm rounded-2 mx-4 p-2">
<view class="flex flex-items-center">
<view>待办事项</view>
<wd-icon name="arrow-right" size="14px" class="ml-a" color="#bfbfbf"></wd-icon>
</view>
<view class="mt-2">
<view
class="flex flex-items-center text-3.5 py-1.5"
v-for="(item, index) in list"
:key="index"
>
<image src="/static/images/icon_audit.png" mode="aspectFill" class="w-4.5 h-4.5"></image>
<view class="ml-2 font-bold">{{ item.title }}</view>
<view class="ml-2 w-1 h-1 bg-black rounded-50%"></view>
<view class="ml-2">{{ item.content }}</view>
<view class="color-[#2954ee] bg-[#f5f4fa] px-2 py-1 ml-a rounded">去处理</view>
</view>
</view>
</view>
</template>
<script setup lang="ts">
const list = [
{
title: '审批',
content: '您有新的补卡待你处理'
},
{
title: '审批',
content: '您有新的请假待你处理'
}
]
</script>

View File

@ -2,35 +2,84 @@
{
style: {
navigationStyle: 'custom',
navigationBarTitleText: '首页'
navigationBarTitleText: '首页',
disableScroll: true
}
}
</route>
<template>
<view
:style="{ background: `linear-gradient(to bottom, ${color}, #f3f5fa)` }"
class="h-50 pos-absolute w-full z-0 top-0"
></view>
<view v-if="systemInfo" :style="{ marginTop: systemInfo.safeAreaInsets?.top + 'px' }">
<view v-if="$user.loginStatus">
<view class="h-12 pt-1 flex flex-items-center flex-justify-between mx-4">
<view>
<view class="pos-relative h-12 pt-1 flex flex-items-center mx-4 custom-color-black">
<view @click="teamDialog" class="flex flex-items-center">
<view>19104656的互联</view>
<image class="w-2 h-2 ml-1.5" src="/static/images/icon_triangle.png"></image>
</view>
<image class="w-5 h-5 ml-a" src="/static/images/icon_setting.webp"></image>
<wd-icon class="ml-5" name="add-circle1" size="22px"></wd-icon>
</view>
<CustomTab class="mt-10" :list="featuresList" @clickItem="clickItem"></CustomTab>
<button class="mt-12" @click="logout">退出登录</button>
<view
class="pos-relative h-8 mt-3 flex flex-items-center text-3.5 bg-[#fdefdf] mx-4 px-2 rounded-2 color-[#ea8720] shadow-sm"
>
<view>系统通知未开启报警消息无法通知</view>
<view class="bg-white px-1 text-3 py-0.5 ml-a rounded-1 mr-3">去开启</view>
<wd-icon name="close" size="14px" color="#ea8720" class="pr-2 py-1"></wd-icon>
</view>
<scroll-view
class="mt-2"
scroll-y="true"
:style="{
height: systemInfo.safeArea?.height - 104 + 'px'
}"
>
<view class="py-3">
<HomeSwiper @colorChange="colorChange"></HomeSwiper>
<HomeBulletin class="my-2"></HomeBulletin>
<HomeTodo class="my-2"></HomeTodo>
<CustomTab :list="featuresList" @clickItem="clickItem"></CustomTab>
<HomeOpenDoor class="my-2"></HomeOpenDoor>
<HomeAttendance class="my-2"></HomeAttendance>
<HomeTeamManager class="my-2"></HomeTeamManager>
<HomeAddDevice class="my-2"></HomeAddDevice>
<HomeAddTeamManager class="my-2"></HomeAddTeamManager>
<HomeSetting class="my-2"></HomeSetting>
<button class="mt-10" @click="$user.logout()">退出登录</button>
</view>
</scroll-view>
</view>
</view>
<TeamPopup ref="teamPopup"></TeamPopup>
</template>
<script lang="ts" setup>
import CustomTab from '@/pages/home/CustomTab.vue'
import CustomTab from '@/pages/home/HomeTab.vue'
import { useBasicStore, useUserStore } from '@/store'
import { Result } from '@/constants/result'
import { HomeTab, TabBarItem } from '@/typings'
import HomeSwiper from '@/pages/home/HomeSwiper.vue'
import HomeBulletin from '@/pages/home/HomeBulletin.vue'
import HomeTodo from '@/pages/home/HomeTodo.vue'
import HomeOpenDoor from '@/pages/home/HomeOpenDoor.vue'
import HomeAttendance from '@/pages/home/HomeAttendance.vue'
import HomeTeamManager from '@/pages/home/HomeTeamManager.vue'
import HomeSetting from '@/pages/home/HomeSetting.vue'
import HomeAddDevice from '@/pages/home/HomeAddDevice.vue'
import HomeAddTeamManager from '@/pages/home/HomeAddTeamManager.vue'
import TeamPopup from '@/components/TeamDilog/TeamPopup.vue'
const $user = useUserStore()
const $basic = useBasicStore()
const systemInfo = ref(null)
const color = ref<string>('#bfcbef')
const teamPopup = ref(null)
const list = ref<Array<TabBarItem>>([
{
title: '首页',
@ -56,172 +105,202 @@
const featuresList = ref<Array<HomeTab>>([
{
title: '视频',
name: '视频',
list: [
{
id: 0,
title: '视频中心',
icon: '/static/logo.png'
id: 221,
icon: 'https://file.hikmall.com/prod/image/e75144eac8984ee198ef533c2f9d3558.png',
name: '视频中心'
},
{
id: 1,
title: '视频中心',
icon: '/static/logo.png'
id: 396,
icon: 'https://file.hikmall.com/prod/image/cf46656ec73b404891e2b46b57ff5fc2.png',
name: '智能巡检'
},
{
id: 2,
title: '视频中心',
icon: '/static/logo.png'
id: 6405,
icon: 'https://file.hikmall.com/prod/image/0526d084da4a49579f832dd4588dcb16.png',
name: '录像智搜'
},
{
id: 3,
title: '视频中心',
icon: '/static/logo.png'
id: 403,
icon: 'https://file.hikmall.com/prod/image/7ea5f88d404442eeb958fbe0904777d1.png',
name: '智能分析'
},
{
id: 4,
title: '视频中心',
icon: '/static/logo.png'
id: 354,
icon: 'https://file.hikmall.com/prod/image/2887bb1c453244a2a872ec98c0360478.png',
name: '人员抓拍'
},
{
id: 357,
icon: 'https://file.hikmall.com/prod/image/e6860e8e5cc64369accadae5347fb0c1.png',
name: '车辆管理'
}
]
},
{
title: '音频',
name: '人员通行',
list: [
{
id: 0,
title: '音频中心',
icon: '/static/logo.png'
id: 106,
icon: 'https://file.hikmall.com/prod/image/635392a7f5e04e75bb657b6cc6e2abc8.png',
name: '通行权限'
},
{
id: 1,
title: '音频中心',
icon: '/static/logo.png'
id: 230,
icon: 'https://file.hikmall.com/prod/image/d1d07b3125f841848c3c3eb94509b2ae.png',
name: '门禁控制'
},
{
id: 2,
title: '音频中心',
icon: '/static/logo.png'
id: 302,
icon: 'https://file.hikmall.com/prod/image/885eb6ac104e4a76941e67eb738142ec.png',
name: '一键开门'
},
{
id: 400,
icon: 'https://file.hikmall.com/prod/image/701d5a7031fa4b4290838c4562f99a0b.png',
name: '密码开门'
},
{
id: 299,
icon: 'https://file.hikmall.com/prod/image/771a717eb8d74f5bba71db68c9605a0f.png',
name: '通行记录'
},
{
id: 387,
icon: 'https://file.hikmall.com/prod/image/9752516f054342d3ac310a0fdb32b654.png',
name: '访客管理'
},
{
id: 399,
icon: 'https://file.hikmall.com/prod/image/4dbe971d6fac465cb4fed956defd678c.png',
name: '我的访客'
},
{
id: 388,
icon: 'https://file.hikmall.com/prod/image/624a69276df1480088661e20cbc0e189.png',
name: '访客邀约'
}
]
},
{
title: '图文',
name: '考勤',
list: [
{
id: 0,
title: '图文中心',
icon: '/static/logo.png'
id: 382,
icon: 'https://file.hikmall.com/prod/image/9e2b6e95c2904540a9a3dc675d25cc13.png',
name: '考勤设置'
},
{
id: 1,
title: '图文中心',
icon: '/static/logo.png'
id: 383,
icon: 'https://file.hikmall.com/prod/image/6cea7ba6b3b34464998bb501a609f3a9.png',
name: '考勤统计'
},
{
id: 2,
title: '图文中心',
icon: '/static/logo.png'
id: 381,
icon: 'https://file.hikmall.com/prod/image/60c64c6c80a9429fa8d084506cd2f021.png',
name: '我的考勤'
},
{
id: 384,
icon: 'https://file.hikmall.com/prod/image/116e1ea563474601ac075ac5bb312963.png',
name: '手机打卡'
},
{
id: -249155,
icon: 'https://file.hikmall.com/prod/image/3e56cfb5cfae4bd285d6f55e51e1ce23.png',
name: '请假'
},
{
id: -249156,
icon: 'https://file.hikmall.com/prod/image/7d2d7c5e1e7241eba1bc7848116a75cb.png',
name: '补卡'
},
{
id: -249157,
icon: 'https://file.hikmall.com/prod/image/e007c441df1c4ab19ca6bb31ccad24e8.png',
name: '出差'
},
{
id: -249158,
icon: 'https://file.hikmall.com/prod/image/90faf8728c6846da9d09f3db0739558d.png',
name: '外出'
}
]
},
{
title: '直播',
name: '审批',
list: [
{
id: 0,
title: '直播中心',
icon: '/static/logo.png'
id: 386,
icon: 'https://file.hikmall.com/prod/image/c5a56acf8efe47d78fc0107552c98bf8.png',
name: '发起审批'
},
{
id: 1,
title: '直播中心',
icon: '/static/logo.png'
},
{
id: 2,
title: '直播中心',
icon: '/static/logo.png'
id: 385,
icon: 'https://file.hikmall.com/prod/image/6b946ba258234cdc8d447631b07939c3.png',
name: '审批记录'
}
]
},
{
title: '其他',
name: '可视对讲',
list: [
{
id: 0,
title: '其他中心',
icon: '/static/logo.png'
id: 391,
icon: 'https://file.hikmall.com/prod/image/4373b28a83a84c828b0150794ac2e402.png',
name: '对讲设备'
},
{
id: 1,
title: '其他中心',
icon: '/static/logo.png'
id: 390,
icon: 'https://file.hikmall.com/prod/image/8efa2ddbc0e94a75b761b0d23097e1d1.png',
name: '呼叫关系'
},
{
id: 2,
title: '其他中心',
icon: '/static/logo.png'
id: 389,
icon: 'https://file.hikmall.com/prod/image/fa2073388a54462ba7badb9904b58396.png',
name: '呼叫提醒'
}
]
},
{
title: '其他',
name: '信息发布',
list: [
{
id: 0,
title: '其他中心',
icon: '/static/logo.png'
id: 374,
icon: 'https://file.hikmall.com/prod/image/e5fa04e5ccdc498dbc4d912074f38e35.png',
name: '广播'
},
{
id: 1,
title: '其他中心',
icon: '/static/logo.png'
id: 309,
icon: 'https://file.hikmall.com/prod/image/0706b7ff1e044928872839c61be74d54.png',
name: '公告'
},
{
id: 2,
title: '其他中心',
icon: '/static/logo.png'
id: 6093,
icon: 'https://file.hikmall.com/prod/image/8ed90fc35e3840e782d73676efcc9a30.png',
name: '信息发布'
}
]
},
{
title: '其他',
name: '基础应用',
list: [
{
id: 0,
title: '其他中心',
icon: '/static/logo.png'
id: 90,
icon: 'https://file.hikmall.com/prod/image/d43b79c5f41543fca44cd21ba84d9c02.png',
name: '人员管理'
},
{
id: 1,
title: '其他中心',
icon: '/static/logo.png'
id: 310,
icon: 'https://file.hikmall.com/prod/image/597b0cb3ddf849788b6c5e7727001690.png',
name: '团队二维码'
},
{
id: 2,
title: '其他中心',
icon: '/static/logo.png'
}
]
},
{
title: '其他',
list: [
{
id: 0,
title: '其他中心',
icon: '/static/logo.png'
},
{
id: 1,
title: '其他中心',
icon: '/static/logo.png'
},
{
id: 2,
title: '其他中心',
icon: '/static/logo.png'
id: 293,
icon: 'https://file.hikmall.com/prod/image/6ecf9e7c946945a5a1efd07c5e8db320.png',
name: '设备管理'
}
]
}
@ -247,14 +326,15 @@
}
})
const teamDialog = () => {
teamPopup.value.showModal()
}
const colorChange = data => {
color.value = data
}
const clickItem = item => {
console.log(item)
}
const logout = async () => {
await $user.logout()
uni.navigateTo({
url: '/pages/login/login'
})
}
</script>

View File

@ -9,7 +9,10 @@
</route>
<template>
<view class="bg-white">
<TopNavigation v-if="systemInfo && systemInfo?.uniPlatform === 'app'"></TopNavigation>
<TopNavigation
:have-back="false"
v-if="systemInfo && systemInfo?.uniPlatform === 'app'"
></TopNavigation>
<swiper
v-if="systemInfo"
circular="true"
@ -222,6 +225,8 @@
title: '登录成功',
icon: 'none'
})
} else if (result.errorCode === Result.NewDevice.code) {
await codeLogin(true)
} else {
await uni.showToast({
title: result.errorMsg,
@ -238,7 +243,7 @@
}
}
const codeLogin = async () => {
const codeLogin = async (tip: boolean = false) => {
if (!phonePass.value) {
return
}
@ -259,8 +264,12 @@
})
uni.hideLoading()
if (result.errorCode === Result.Success.code) {
let url = `/pages/code/code?phone=${phone.value}&type=login`
if (tip) {
url = url + `&tip=true`
}
await uni.navigateTo({
url: `/pages/code/code?phone=${phone.value}&type=login`
url
})
} else {
await uni.showToast({

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 882 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/static/tabbar/mine.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -38,6 +38,9 @@ export const useUserStore = defineStore(
loginStatus.value = false
uni.removeStorageSync('userInfo')
uni.removeStorageSync('token')
uni.reLaunch({
url: '/pages/login/login'
})
}
return {

View File

@ -15,12 +15,13 @@ export type TabBarItem = {
export type HomeTabItem = {
icon: string
title: string
name: string
url: string
id: number
}
export type HomeTab = {
title: string
name: string
list: HomeTabItem[]
}