Browse Source

Merge branch 'master' of http://94.191.59.107:3000/houwenfeng/ybxf-security-uniapp

coderbutcher 1 year ago
parent
commit
11d75480c4
4 changed files with 85 additions and 61 deletions
  1. 6 4
      config.js
  2. 14 3
      pages.json
  3. 23 12
      pages/work/index.vue
  4. 42 42
      pagesA/components/my-nav/nav.vue

+ 6 - 4
config.js

@@ -3,10 +3,12 @@ module.exports = {
 	// baseUrl: 'http://api-security.byants.com',
 	// baseUrlImg:'http://security.byants.com/static/appimg',
 	// baseUrl: 'http://112.19.80.230',
-	baseUrl: 'https://ggfw.ybxfjy.com',
-	baseUrlImg: 'https://ggfw.ybxfjy.com/static/appimg',
-	// baseUrl: 'http://192.168.1.24:48081', 
-	// baseUrl:'http://192.168.1.10:48081',
+	// baseUrl:'https://byant.jujutong.cloud',
+	// baseUrlImg: 'https://byant.jujutong.cloud/static/appimg',
+	// baseUrl: 'https://ggfw.ybxfjy.com',
+	// baseUrlImg: 'https://ggfw.ybxfjy.com/static/appimg',
+	baseUrl: 'http://8.142.173.95:48081', 
+	baseUrlImg:'http://byant.jujutong.cloud/static/appimg',
 	// baseUrl:'http://api-security.byants.com/app-api/s9/task/self-page',
 	// baseUrl: 'http://127.0.0.1:4523/m1/2188954-0-default',
 	// baseUrl: 'https://mock.apifox.cn/m1/2188954-0-default',

+ 14 - 3
pages.json

@@ -241,7 +241,19 @@
 				"style": {
 					"navigationBarTitleText": "通知公告查看"
 				}
-			}, {
+			},  {
+				"path": "fire/remind/index",
+				"style": {
+					"navigationBarTitleText": "重要提醒查看"
+				}
+			},{
+				"path": "fire/remind/details/details",
+				"style": {
+					"navigationBarTitleText": "重要提醒详情",
+					// "enablePullDownRefresh": false,
+					"navigationStyle": "custom"
+				}
+			},{
 				"path": "fire/fire_station/index",
 				"style": {
 					"navigationBarTitleText": "微型消防站管理"
@@ -909,8 +921,7 @@
 					"enablePullDownRefresh": false
 				}
 			}
-
-		]
+            ]
 
 
 	}, {

+ 23 - 12
pages/work/index.vue

@@ -74,8 +74,8 @@
 				worktop: `${baseUrlImg}/working/worktop.png`, //图片
 				zhudongjiancha: `${baseUrlImg}/working/zhudongjiancha.png`,
 				yinhuanguanli: `${baseUrlImg}/working/yinhuanguanli.png`,
-				yinhuanfucha:`${baseUrlImg}/working/yinhuanfucha.png`,//隐患复查
-				check_inspection:`${baseUrlImg}/working/check_inspection.png`,//主动检查
+				yinhuanfucha: `${baseUrlImg}/working/yinhuanfucha.png`, //隐患复查
+				check_inspection: `${baseUrlImg}/working/check_inspection.png`, //主动检查
 				user_business: `${baseUrlImg}/working/user_business.png`,
 				tabler_clock_edit: `${baseUrlImg}/working/tabler_clock_edit.png`,
 				tabler_chart_histogram: `${baseUrlImg}/working/tabler_chart_histogram.png`, //数据统计
@@ -93,10 +93,10 @@
 				drill: `${baseUrlImg}/working/drill.png`,
 				// archive: `${baseUrlImg}/working/gongzuodangan.png`,
 				archive: `${baseUrlImg}/working/archive.png`,
-				fireSpecial:`${baseUrlImg}/working/fireSpecial.png`,
-				fireWork:`${baseUrlImg}/working/fireWork.png`,
-				fire_inspetItem:`${baseUrlImg}/working/fire_inspetItem.png`,
-				fire_street:`${baseUrlImg}/working/fire_street.png`,
+				fireSpecial: `${baseUrlImg}/working/fireSpecial.png`,
+				fireWork: `${baseUrlImg}/working/fireWork.png`,
+				fire_inspetItem: `${baseUrlImg}/working/fire_inspetItem.png`,
+				fire_street: `${baseUrlImg}/working/fire_street.png`,
 				items: ['事件中心', '管理中心'],
 				current: 0,
 				urlList: [],
@@ -112,10 +112,20 @@
 			this.urlList = []
 			this.urlList1 = []
 			this.urlList2 = [];
-			if(this.$store.state.user&&this.$store.state.user.id){
-				this.getData()
-				this.getMenu()
-			}
+			let count = 0;
+			const intervalId = setInterval(() => {
+				if (this.$store.state.user && this.$store.state.user.id) {
+					this.getData();
+					this.getMenu();
+					clearInterval(intervalId); // 中止循环
+				}
+
+				count++;
+
+				if (count >= 5) {
+					clearInterval(intervalId); // 如果超过5秒仍未找到用户ID,中止循环
+				}
+			}, 1000);
 		},
 		methods: {
 			getData() {
@@ -129,6 +139,7 @@
 				getMenusByUser({
 					id: this.$store.state.user.id
 				}).then(response => {
+					console.log('response======',response)
 					response.data.map(i => {
 						if (i.menuSort.toString().startsWith("1")) {
 							this.urlList1.push(i);
@@ -190,10 +201,10 @@
 				} else if (val == 'fire_inspetItem') {
 					// return this.archive;
 					return this.fire_inspetItem
-				} else if(val=='fire_street'){
+				} else if (val == 'fire_street') {
 					// return this.archive;
 					return this.fire_street
-				}else if (val == 'fireWork') {
+				} else if (val == 'fireWork') {
 					// return this.archive;
 					return this.fireWork
 				} else if (val == 'fireSpecial') {

+ 42 - 42
pagesA/components/my-nav/nav.vue

@@ -1,42 +1,42 @@
-<template>
-	<view>  
-					<u-navbar :bgImg="bgImg" :bgColor="bgColor" :title="title" :titleStyle="titleStyle "  :placeholder="true" :safeAreaInsetTop="true" autoBack @click-left="back" >
-					<!-- 	<view class="u-nav-slot" slot="left" @click.native="back">
-							<u-icon name="arrow-left" size="19"></u-icon>
-							<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
-							<u-icon name="arrow-left" size="20"  @click.native="back"></u-icon>
-						</view> -->
-					</u-navbar> 
-					
-		</view> 
-</template>
-<script> 
-	export default { 
-		props:{
-			  title: {type:String,default:"testTitle"},
-			   titleStyle: { type: Object, default: () => ({ fontSize: "17px" }) }
-		},
-		data() {
-			return { 
-				bgColor: 'transparent !important',
-				bgImg:true
-			}
-		},
-		created() { 
-		},
-		mounted() {			 
-				} ,
-		methods: {
-			//获取屏幕导航栏高度 
-			//返回
-			back() {
-				uni.navigateBack({
-					delta: 1
-				})
-			},
-		}
-	}
-</script>
-<style lang="scss" scoped>
-// 
-</style>
+<template>
+	<view>  
+					<u-navbar :bgImg="bgImg" :bgColor="bgColor" :title="title" :titleStyle="titleStyle "  :placeholder="true" :safeAreaInsetTop="true" autoBack @click-left="back" style="cursor: pointer;" >
+					<!-- 	<view class="u-nav-slot" slot="left" @click.native="back">
+							<u-icon name="arrow-left" size="19"></u-icon>
+							<u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
+							<u-icon name="arrow-left" size="20"  @click.native="back"></u-icon>
+						</view> -->
+					</u-navbar> 
+					
+		</view> 
+</template>
+<script> 
+	export default { 
+		props:{
+			  title: {type:String,default:"testTitle"},
+			   titleStyle: { type: Object, default: () => ({ fontSize: "17px" }) }
+		},
+		data() {
+			return { 
+				bgColor: 'transparent !important',
+				bgImg:true
+			}
+		},
+		created() { 
+		},
+		mounted() {			 
+				} ,
+		methods: {
+			//获取屏幕导航栏高度 
+			//返回
+			back() {
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+		}
+	}
+</script>
+<style lang="scss" scoped>
+// 
+</style>