diff --git a/weapp/src/packages/changePassword/index.jsx b/weapp/src/packages/changePassword/index.jsx
index 04579469..69d57b4c 100644
--- a/weapp/src/packages/changePassword/index.jsx
+++ b/weapp/src/packages/changePassword/index.jsx
@@ -14,10 +14,10 @@ function Index() {
function confirm() {
if (!password) {
- Taro.showToast({ title: '请输入密码' })
+ Taro.showToast({ title: '请输入密码', icon: 'none' })
return
} else if (password !== password2) {
- Taro.showToast({ title: '两次输入的密码不一致' })
+ Taro.showToast({ title: '两次输入的密码不一致', icon: 'none' })
return
} else {
Taro.showModal({
@@ -50,11 +50,11 @@ function Index() {
新的密码:
- setPassword(e.detail.value)} />
+ setPassword(e.detail.value)} />
再次输入新的密码:
- setPassword2(e.detail.value)} />
+ setPassword2(e.detail.value)} />
确认
diff --git a/weapp/src/packages/patrolView/index.jsx b/weapp/src/packages/patrolView/index.jsx
index e152cb07..44a05fb7 100644
--- a/weapp/src/packages/patrolView/index.jsx
+++ b/weapp/src/packages/patrolView/index.jsx
@@ -79,7 +79,6 @@ function Index() {
// 监听上拉触底
useReachBottom(() => {
- console.log('onReachBottom')
setPage(page + 1)
setNum(Math.random())
})
diff --git a/weapp/src/pages/home/index.jsx b/weapp/src/pages/home/index.jsx
index 30856ce5..3df1e359 100644
--- a/weapp/src/pages/home/index.jsx
+++ b/weapp/src/pages/home/index.jsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useState } from 'react';
+import React, { useEffect } from 'react';
import Taro from '@tarojs/taro';
import { View } from '@tarojs/components';
import { useIndustry } from '@/actions/business';
@@ -6,8 +6,26 @@ import './index.scss';
const Index = () => {
const userInfo = Taro.getStorageSync('userInfo') || {};
+ const token = Taro.getStorageSync('token') || null;
const isSuperAdmin = userInfo && userInfo.username === 'SuperAdmin' ? true : false
+ useEffect(() => {
+ if (!userInfo || !token) {
+ Taro.showModal({
+ title: '提示',
+ content: '未获取用户信息,请重新登录',
+ showCancel: false,
+ success: (res) => {
+ if (res.confirm) {
+ Taro.reLaunch({
+ url: '/pages/auth/login/login'
+ });
+ }
+ }
+ });
+ }
+ }, [])
+
function toPatrol() {
Taro.navigateTo({
url: '/packages/patrol/index?type=edit'
@@ -19,14 +37,25 @@ const Index = () => {
})
}
+ function toVideo() {
+
+ }
+
return (
-
+
巡 查 养 护
{isSuperAdmin ? '查看' : '填报'}
+ {
+ isSuperAdmin &&
+
+ 视 频 监 控
+ 查看
+
+ }
);
}
diff --git a/weapp/src/pages/home/index.scss b/weapp/src/pages/home/index.scss
index d9f40d1e..ad17ea81 100644
--- a/weapp/src/pages/home/index.scss
+++ b/weapp/src/pages/home/index.scss
@@ -3,15 +3,23 @@
flex-direction: column;
align-items: center;
- .fill {
+ .card {
margin-top: 30px;
padding: 10px;
width: 94%;
height: 360px;
+ }
+
+ .fill {
background: url('../../static/img/home/fill-bg.svg') no-repeat;
background-size: 100% 100%;
}
+ .video {
+ background: url('../../static/img/home/video-bg.svg') no-repeat;
+ background-size: 100% 100%;
+ }
+
.title {
margin: 50px 0 0 48px;
color: #fff;
diff --git a/weapp/src/static/img/home/video-bg.svg b/weapp/src/static/img/home/video-bg.svg
new file mode 100644
index 00000000..b3c53501
--- /dev/null
+++ b/weapp/src/static/img/home/video-bg.svg
@@ -0,0 +1,88 @@
+
+
\ No newline at end of file