From 8f7b295fe5af5e602a1fc985ef46f5821a666d71 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Thu, 24 Feb 2022 08:58:34 +0800
Subject: [PATCH] 电子保安员证

---
 pages.json                  |   12 +++
 pages/business/business.vue |  132 +++++++++++++++++++++++++------------------
 store/state.js              |    3 
 3 files changed, 90 insertions(+), 57 deletions(-)

diff --git a/pages.json b/pages.json
index e05b3a7..fc0fc0b 100644
--- a/pages.json
+++ b/pages.json
@@ -535,7 +535,17 @@
                "navigationBarTextStyle": "white"
             }
             
-        }
+        },
+		{
+		    "path" : "pages/voting/information",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "电子证件",
+		        "navigationBarBackgroundColor": "#103289",
+		        "navigationBarTextStyle": "white"
+		    }
+		    
+		}
     ],
 	"globalStyle": { //将组件安装在项目的components目录下,并符合components/组件名称/组件名称.vue目录结构。可以不用引用、注册,直接在页面中使用。
 		"autoscan": true
diff --git a/pages/business/business.vue b/pages/business/business.vue
index f578e12..a0c0c9d 100644
--- a/pages/business/business.vue
+++ b/pages/business/business.vue
@@ -20,7 +20,7 @@
 				</view>
 			</view>
 			<!-- 我的订阅 end -->
-			
+
 			<view class="card wrap">
 				<view class="title">管理</view>
 				<view class="list">
@@ -34,7 +34,7 @@
 					</u-grid>
 				</view>
 			</view>
-			
+
 		</view>
 		<u-toast ref="uToast" />
 		<!-- 底部导航条 -->
@@ -46,93 +46,116 @@
 	export default {
 		data() {
 			return {
-				tabbar:this.$store.state.tabbar,
-				dataOne:[{
-					title:'群防任务',
-					img:'../../static/workbench/task1.png',
-					url:''
-				},{
-					title:'巡逻任务',
-					img:'../../static/workbench/task2.png',
-					url:'/pages/patrol/patrol'
-				},{
-					title:'事件上报',
-					img:'../../static/workbench/task3.png',
-					url:'/pages/reported/reported'
-				},{
-					title:'积分商城',
-					img:'../../static/workbench/task8.png',
-					url:''
-				},{
-					title:'通讯录',
-					img:'../../static/workbench/task4.png',
-					url:''
-				},{
-					title:'电子证件',
-					img:'../../static/workbench/task9.png',
-					url:''
+				tabbar: this.$store.state.tabbar,
+				dataOne: [{
+					title: '群防任务',
+					img: '../../static/workbench/task1.png',
+					url: ''
+				}, {
+					title: '巡逻任务',
+					img: '../../static/workbench/task2.png',
+					url: '/pages/patrol/patrol'
+				}, {
+					title: '事件上报',
+					img: '../../static/workbench/task3.png',
+					url: '/pages/reported/reported'
+				}, {
+					title: '积分商城',
+					img: '../../static/workbench/task8.png',
+					url: ''
+				}, {
+					title: '通讯录',
+					img: '../../static/workbench/task4.png',
+					url: ''
+				}, {
+					title: '电子证件',
+					img: '../../static/workbench/task9.png',
+					url: ''
 				}],
-				dataTwo:[{
-					title:'参与投票',
-					img:'../../static/workbench/task5.png',
-					url:'/pages/voting/voteManage'
-				},{
-					title:'投票发起',
-					img:'../../static/workbench/task7.png',
-					url:'/pages/voting/vote'
-				},{
-					title:'投票排行',
-					img:'../../static/workbench/task6.png',
-					url:'/pages/voting/votRanking'
+				dataTwo: [{
+					title: '参与投票',
+					img: '../../static/workbench/task5.png',
+					url: '/pages/voting/voteManage'
+				}, {
+					title: '投票发起',
+					img: '../../static/workbench/task7.png',
+					url: '/pages/voting/vote'
+				}, {
+					title: '投票排行',
+					img: '../../static/workbench/task6.png',
+					url: '/pages/voting/votRanking'
 				}]
 			};
 		},
 		onLoad() {
-			
-		},mounted(){
-			if(this.$store.state.UserData.stype != "1"){
+
+		},
+		mounted() {
+			if (this.$store.state.UserData.stype != "1") {
 				this.$refs.uToast.show({
 					title: '功能暂未开放',
 					type: 'warning',
 				});
 			}
-		},methods: {
+		},
+		methods: {
 			//页面跳转
-			goOnePage(url,index){
-				if(this.$store.state.UserData.stype != "1"){
+			goOnePage(url, index) {
+				if (this.$store.state.UserData.stype != "1") {
 					this.$refs.uToast.show({
 						title: '功能暂未开放',
 						type: 'warning',
 					});
 					return;
-				}else if(index == "0" || index == "3" || index == "4" || index == "5"){
+				} else if (index == "0" || index == "3" || index == "4") {
 					this.$refs.uToast.show({
 						title: '功能研发中',
 						type: 'warning',
 					});
 					return;
-				}else{
+				} else if (index == 5) {
+					this.getUser();
+				} else {
 					uni.navigateTo({
-						url:url
+						url: url
 					})
 				}
 			},
-			goTwoPage(url,index){
-				if(this.$store.state.UserData.stype != "1"){
+			//获取用户信息
+			getUser() {
+				var that = this;
+				uni.request({
+					url: that.$store.state.BaopiAPI + '/blade-user/detail',
+					method: 'GET',
+					data: {
+						cardid: that.$store.state.UserData.cardid,
+						isDeleted:0,
+						status : 1,
+					},
+					success: (res) => {
+						var urls="http://223.82.109.183:2080/securityInfo.html?securityNumber="+res.data.data.securitynumber;
+						uni.navigateTo({
+							url: '../voting/information?url=' + urls
+						});
+					}
+				});
+			},
+			goTwoPage(url, index) {
+				if (this.$store.state.UserData.stype != "1") {
 					this.$refs.uToast.show({
 						title: '功能暂未开放',
 						type: 'warning',
 					});
 					return;
-				}else if(index == "2" ){
+				} else if (index == "2") {
 					this.$refs.uToast.show({
 						title: '功能研发中',
 						type: 'warning',
 					});
 					return;
-				}else{
+				} else {
 					uni.navigateTo({
-						url:url
+						url: url
 					})
 				}
 			},
@@ -247,8 +270,7 @@
 			color: #000000;
 
 			&::before {
-				content
-				: "";
+				content: "";
 				display: block;
 				width: 5rpx;
 				height: 36rpx;
diff --git a/store/state.js b/store/state.js
index ed952de..d0318a6 100644
--- a/store/state.js
+++ b/store/state.js
@@ -9,7 +9,8 @@
 	logPath: '',
 	piAPI: apis.api,
 	// piAPI: 'http://223.82.109.183:2082/api/',
-	// piAPI: 'http://192.168.0.108:83/',
+	 piAPI: 'http://192.168.0.110:83/',
+	 BaopiAPI: 'http://223.82.109.183:2080/api/',
 	puserName: '',
 	puserID: '',
 	puserIphone: '',

--
Gitblit v1.9.3