Browse Source

综合统计

zhengkaixin 3 months ago
parent
commit
d46aa31d35

+ 2 - 4
apis/utils/init.js

@@ -9,9 +9,7 @@ import {
 } from '@/apis/utils'
 var checkOpenId = true; //是否需要获取openId
 var openId = jphelp.getOpenId();
-var uid = jphelp.getUID();
-var unionPhone=jphelp.getUnionPhone()
-var app = {
+ var app = {
 
 	init: function() {
 
@@ -19,7 +17,7 @@ var app = {
 		if (isWeiXin() || (process.env.NODE_ENV === "development")) {
 
 			if (checkOpenId) {
-				 if (!openId&&!uid) {
+				 if (!openId) {
 					this.getOpenId();
 
 				} else {

+ 97 - 97
apis/utils/mixin.js

@@ -1,98 +1,98 @@
-var prefix = 'jp-floorlock-manage-' + process.jphelp.NODE_ENV + '_';
-
-var app = {
-
-	getGzDate: (key) => {
-		var tdate = new Date().toJSON().substr(0, 10).replace("T", " ")
-		var date = uni.getStorageSync(prefix + "is_gz_date")
-
-		if (tdate == date) {
-			return false
-		} else {
-			return true;
-		}
-
-	},
-	
-	
-	setGzDate: () => uni.setStorageSync(prefix + "is_gz_date", new Date().toJSON().substr(0, 10).replace("T", " ")),
-
-	
-
-
-	getPrefix: () => prefix,
-	get: key => uni.getStorageSync(prefix + key),
-
-	set: (key, value) => uni.setStorageSync(prefix + key, value),
-	remove: key => uni.removeStorageSync(prefix + key),
-	setConfig: (value) => uni.setStorageSync(prefix + '_config_$', value),
-	getConfig: () => {
-		var config = uni.getStorageSync(prefix + '_config_$')
-		var configure = {}
-		if (config) {
-			for (var i in config) {
-				var con = config[i];
-				configure[con.key] = con.value
-			}
-		}
-		return configure;
-	},
-
-	setConfigMessage: (value) => uni.setStorageSync(prefix + '_config_tips_$', value),
-	getConfigMessage: () => {
-		var config = uni.getStorageSync(prefix + '_config_tips_$')
-		if (!config) {
-			config = []
-		}
-		return config;
-	},
-
-	logoff: () => {
-		uni.removeStorageSync(prefix + 'token_tdate')
-		uni.removeStorageSync(prefix + 'token')
-		uni.removeStorageSync(prefix + 'personInfo');
-		uni.removeStorageSync(prefix + 'personInfoPlus');
-		//	uni.removeStorageSync(prefix + 'getElderModeClass');
-		//uni.removeStorageSync(prefix+'wx_openId');
-
-	},
-
-	getPersonInfo: () => {
-		return uni.getStorageSync(prefix + 'personInfo')
-	},
-	getPersonInfoPlus: () => {
-		return uni.getStorageSync(prefix + 'personInfoPlus')
-	},
-	signOut: () => uni.removeStorageSync(prefix + 'personInfo'),
-	getOpenId: () => uni.getStorageSync(prefix + 'wx_openId' + process.jphelp.VUE_APP_WXAPPID),
-	setOpenId: (value) => uni.setStorageSync(prefix + 'wx_openId' + process.jphelp.VUE_APP_WXAPPID, value),
-
-	getOpenIdALI: () => uni.getStorageSync(prefix + 'ali_openId' + process.jphelp.VUE_APP_WXAPPID),
-	setOpenIdALI: (value) => uni.setStorageSync(prefix + 'ali_openId' + process.jphelp.VUE_APP_WXAPPID, value),
-
-	getUserInfo: () => {
-		return uni.getStorageSync(prefix + 'xpgj_wx_user_info')
-	},
-
-	setPersonInfo: (value) => uni.setStorageSync(prefix + 'personInfo', value),
-	setPersonInfoPlus: (value) => uni.setStorageSync(prefix + 'personInfoPlus', value),
-
-	setUserInfo: (value) => uni.setStorageSync(prefix + 'xpgj_wx_user_info', value),
-
-	getToken: (options) => {
-		//不同权限 ,不同token
-
-		return uni.getStorageSync(prefix + 'token')
-	},
-	setToken: (value) => {
-		uni.setStorageSync(prefix + 'token', value)
-
-		if (value) {
-			var tdate = new Date(+new Date() + 8 * 3600 * 1000).toJSON().substr(0, 15).replace("T", " ")
-			uni.setStorageSync(prefix + 'token_tdate', tdate)
-		}
-	},
-
-}
-
+var prefix = 'jp-floorlock-manage-' + process.jphelp.NODE_ENV + '_';
+
+var app = {
+
+	getGzDate: (key) => {
+		var tdate = new Date().toJSON().substr(0, 10).replace("T", " ")
+		var date = uni.getStorageSync(prefix + "is_gz_date")
+
+		if (tdate == date) {
+			return false
+		} else {
+			return true;
+		}
+
+	},
+
+
+	setGzDate: () => uni.setStorageSync(prefix + "is_gz_date", new Date().toJSON().substr(0, 10).replace("T", " ")),
+
+
+
+
+	getPrefix: () => prefix,
+	get: key => uni.getStorageSync(prefix + key),
+
+	set: (key, value) => uni.setStorageSync(prefix + key, value),
+	remove: key => uni.removeStorageSync(prefix + key),
+	setConfig: (value) => uni.setStorageSync(prefix + '_config_$', value),
+	getConfig: () => {
+		var config = uni.getStorageSync(prefix + '_config_$')
+		var configure = {}
+		if (config) {
+			for (var i in config) {
+				var con = config[i];
+				configure[con.key] = con.value
+			}
+		}
+		return configure;
+	},
+
+	setConfigMessage: (value) => uni.setStorageSync(prefix + '_config_tips_$', value),
+	getConfigMessage: () => {
+		var config = uni.getStorageSync(prefix + '_config_tips_$')
+		if (!config) {
+			config = []
+		}
+		return config;
+	},
+
+	logoff: () => {
+		uni.removeStorageSync(prefix + 'token_tdate')
+		uni.removeStorageSync(prefix + 'token')
+		uni.removeStorageSync(prefix + 'personInfo');
+		uni.removeStorageSync(prefix + 'personInfoPlus');
+		//	uni.removeStorageSync(prefix + 'getElderModeClass');
+		//uni.removeStorageSync(prefix+'wx_openId');
+
+	},
+
+	getPersonInfo: () => {
+		return uni.getStorageSync(prefix + 'personInfo')
+	},
+	getPersonInfoPlus: () => {
+		return uni.getStorageSync(prefix + 'personInfoPlus')
+	},
+	signOut: () => uni.removeStorageSync(prefix + 'personInfo'),
+	getOpenId: () => uni.getStorageSync(prefix + 'wx_openId' + process.jphelp.VUE_APP_WXAPPID),
+	setOpenId: (value) => uni.setStorageSync(prefix + 'wx_openId' + process.jphelp.VUE_APP_WXAPPID, value),
+
+	getOpenIdALI: () => uni.getStorageSync(prefix + 'ali_openId' + process.jphelp.VUE_APP_WXAPPID),
+	setOpenIdALI: (value) => uni.setStorageSync(prefix + 'ali_openId' + process.jphelp.VUE_APP_WXAPPID, value),
+
+	getUserInfo: () => {
+		return uni.getStorageSync(prefix + 'xpgj_wx_user_info')
+	},
+
+	setPersonInfo: (value) => uni.setStorageSync(prefix + 'personInfo', value),
+	setPersonInfoPlus: (value) => uni.setStorageSync(prefix + 'personInfoPlus', value),
+
+	setUserInfo: (value) => uni.setStorageSync(prefix + 'xpgj_wx_user_info', value),
+
+	getToken: (options) => {
+		//不同权限 ,不同token
+
+		return uni.getStorageSync(prefix + 'token')
+	},
+	setToken: (value) => {
+		uni.setStorageSync(prefix + 'token', value)
+
+		if (value) {
+			var tdate = new Date(+new Date() + 8 * 3600 * 1000).toJSON().substr(0, 15).replace("T", " ")
+			uni.setStorageSync(prefix + 'token_tdate', tdate)
+		}
+	},
+
+}
+
 module.exports = app

File diff suppressed because it is too large
+ 3 - 0
assets/img/index/pie1-1.svg


+ 6 - 0
assets/img/index/pie1-2.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1092 1024" width="20" height="18.76" style="" filter="none">
+    
+    <g>
+    <path d="M546.133333 68.266667c306.449067 0 450.3552 235.383467 477.866667 443.733333h-84.650667a36.864 36.864 0 0 1-35.2256-26.112C848.6912 306.0736 729.361067 216.1664 546.133333 216.1664c-183.227733 0-302.557867 89.9072-357.9904 269.7216A36.864 36.864 0 0 1 152.917333 512H68.266667C95.778133 303.616 239.684267 68.266667 546.133333 68.266667z" fill="rgba(153,153,153,1)" p-id="3768" stroke="none"></path><path d="M546.133333 34.133333C227.771733 34.133333 34.133333 292.795733 34.133333 591.633067v150.9376C34.133333 822.613333 98.986667 887.466667 179.029333 887.466667h734.208C993.28 887.466667 1058.133333 822.613333 1058.133333 742.570667v-150.9376C1058.133333 292.795733 864.494933 34.133333 546.133333 34.133333z m0 68.266667c275.6608 0 443.733333 224.529067 443.733334 489.233067v150.9376A76.629333 76.629333 0 0 1 913.237333 819.2H179.029333A76.629333 76.629333 0 0 1 102.4 742.570667v-150.9376C102.4 326.929067 270.472533 102.4 546.133333 102.4z" fill="rgba(153,153,153,1)" p-id="3769" stroke="none"></path><path d="M170.666667 775.304533l0.170666-1.809066c6.075733-30.856533 165.410133-55.7056 363.383467-56.661334h23.620267c201.9328 0.955733 363.758933 26.760533 363.758933 58.4704v156.0576C921.6 963.652267 753.493333 989.866667 546.133333 989.866667s-375.466667-26.2144-375.466666-58.504534v-156.0576z" fill="rgba(153,153,153,1)" p-id="3770" stroke="none"></path>
+    </g>
+  </svg>

+ 6 - 0
assets/img/index/pie1-3.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="20" height="20" style="" filter="none">
+    
+    <g>
+    <path d="M16 14.667c3.682 0 6.667 2.985 6.667 6.667v0 8h-13.333v-8c0-3.682 2.985-6.667 6.667-6.667v0zM7.051 18.675c-0.2 0.649-0.334 1.401-0.372 2.178l-0.001 0.022-0.011 0.459v8h-4v-6c0-0 0-0.001 0-0.001 0-2.398 1.809-4.374 4.137-4.637l0.021-0.002 0.227-0.019zM24.949 18.675c2.453 0.154 4.384 2.181 4.384 4.659v6h-4v-8c0-0.924-0.133-1.816-0.384-2.659zM7.333 10.667c1.841 0 3.333 1.492 3.333 3.333s-1.492 3.333-3.333 3.333v0c-1.841 0-3.333-1.492-3.333-3.333s1.492-3.333 3.333-3.333v0zM24.667 10.667c1.841 0 3.333 1.492 3.333 3.333s-1.492 3.333-3.333 3.333v0c-1.841 0-3.333-1.492-3.333-3.333s1.492-3.333 3.333-3.333v0zM16 2.667c2.946 0 5.333 2.388 5.333 5.333s-2.388 5.333-5.333 5.333v0c-2.946 0-5.333-2.388-5.333-5.333s2.388-5.333 5.333-5.333v0z" fill="rgba(161,165,169,1)"></path>
+    </g>
+  </svg>

+ 3 - 3
components/JPcontent.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content"  >
-		<view v-if="status==0" style="display: flex;justify-content: center;margin: 40px 0;" >
+		<view v-show="status==0" style="display: flex;justify-content: center;margin: 40px 0;" >
 			
 			<view class="uni-toast" style="display: flex;font-size: 60rpx;    color: rgb(192, 196, 204);" >
 				<i class="uni-icon_toast uni-loading"
@@ -11,11 +11,11 @@
 			"
 			></i><p class="uni-toast__content">  </p>加载中...</view>
 		</view>
-		<view v-if="status==1">
+		<view v-show="status==1">
 			<u-divider :isnone="true"  nonetext="无记录"
 				border-color="#fff"></u-divider>
 		</view>
-		<view v-if="status==2">
+		<view v-show="status==2">
 			<slot ></slot>
 		</view>
 		

+ 4 - 14
config/.env.dev.js

@@ -10,25 +10,15 @@ const UNI_APP = {
 	
 	NODE_ENV :"dev",
 	SIMPLE_RUN:true,// 无视权限控制跳转页面   , 用于样式人员快速访问各种功能 ,快速测试等
-	 openId:"1234",//开发人员2
-	 openId:"55555",//测试人员 开发环境
-	openId:"oLowyuNkSxqovYoobKbeHB1nSkm0", //sz
-	//openId:"oK9Wr57rAcNzihDN2PEdptprT0As", 
-	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",
-	//openId:"oLowyuOJvTszgk96C0f8j0XfcEXg",//zkx
-	
-	//openId:"oLowyuAJ1Ld0ivnLj4qp1k5Vy_l4", //老板
-	//openId:"oLowyuFTU3SzpvU4pGNzWk7NC9y0", //wky
-	
-	openId:"oLowyuHCGgMomNBQEXZSbb5SJxfQ",//杨所
+
+
+	openId:"123456",
 	
-	//openId:"oLowyuMMjIkA_bLA4MXzRQ3KJB2E",//fjj
-	//openId:"oLowyuB1PliW0qAnJJ56axydeUOM",//zq
+
 
 	//appid
 	VUE_APP_WXAPPID:"wx0b3c41a903053808",
 	VUE_APP_ALIAPPID:"2021003131641247",
-	BACK_URL:"https://xpgj.hbjp.com.cn/prod/jp-property-platform-test/index/#/master/",
 	
 }  
 

+ 10 - 1
main.js

@@ -54,7 +54,16 @@ Vue.mixin({
 
 	},
 	methods: {
-	
+		loginset(response){
+			
+			var token = response ? response.data.token : '';
+			this.jphelp.setToken(token);
+			this.jphelp.setPersonInfo(response.data.user);
+			this.jphelp.setPersonInfoPlus(response.data)
+			
+			//this.gotoUrl("pages/user/index")
+			
+		},
 		jpAmount(amount){
 			if(amount){
 				return amount.toFixed(2)

+ 497 - 221
pages/index/index.vue

@@ -1,238 +1,514 @@
-<template>
-	<view>
-		<u-navbar v-show="false"
-		 title="首页" title-color="#101010"></u-navbar>
-		 
-		<view class="navbar" >
-			智泊e家 运管端
-
-		</view>
-		<view class="tabs-box">
-			
-		</view>
-		<view class="main">
-			
-			
-			<view class="statistics">
-				<view class="title">
-					<view class="icon">
-						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
-					</view>
-					<view class="text">
-						综合统计
-					</view>
-				
-				</view>
-				
-				<view class="content"  >
-					<jpContent :status="jpContentMap.body1">
-						<table>
-							<tr>
-								<td rowspan="2" >
-									<view id="body1pie1" class="body1pie">
+<template>
+	<view>
+		<u-navbar v-show="false" title="首页" title-color="#101010"></u-navbar>
+
+		<view class="navbar">
+			智泊e家 运管端
+
+		</view>
+		<view class="tabs-box">
+
+		</view>
+		<view class="main">
+
+
+			<view class="statistics ">
+				<view class="title">
+					<view class="icon">
+						<image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
+					</view>
+					<view class="text">
+						综合统计
+					</view>
+
+				</view>
+
+				<view class="content">
+					<jpContent :status="jpContentMap.body1">
+						<view class="body1pie-table">
+							<view class="tr">
+								<view  class="td td1" >
+									<view id="body1pie1" class="body1pie">
+
+									</view>
+								</view>
+								<view  class="td td2">
+									<view class="td td3">
+										<view class="td td4">空闲<span class="body1pie-num color53B56B">5</span>台</view>
+										<view class="td td4">占用<span class="body1pie-num colorAAAAAA">5</span>台</view>
+									</view>
+									<view class="td td3">
+									
+										<view class="td td4">公共车位<span class="body1pie-num colorEF8132">5</span>台</view>
+										<view class="td td4">私家车位<span class="body1pie-num colorDC4441">5</span>台</view>
+									</view>
+								</view>
+								
+							</view>
+							
+							<view  class="tr" >
+								<view  class="td td1" >
+									<view id="body1pie2" class="body1pie">
+
+									</view>
+								</view>
+								<view  class="td td2" >
+									<view  class="td td3" >
 										
+										<view class="td td4">正常<span class="body1pie-num color53B56B">5</span>台</view>
+										<view class="td td4">离线<span class="body1pie-num colorAAAAAA">5</span>台</view>
 									</view>
-								</td>
-								<td>空闲5台</td>
-								<td>占用5台</td>
-							</tr>
-							<tr>
-								
-								<td>公共车位3台</td>
-								<td>私家车位1台</td>
-							</tr>
-							<tr>
-								<td rowspan="2" >
-									<view id="body1pie2" class="body1pie">
+									<view  class="td td3" >
 										
+										<view class="td td4">故障<span class="body1pie-num colorEF8132">5</span>台</view>
+										<view class="td td4">低电量<span class="body1pie-num colorDC4441">5</span>台</view>
 									</view>
-								</td>
-								<td>空闲5台</td>
-								<td>占用5台</td>
-							</tr>
-							<tr>
-								
-								<td>公共车位3台</td>
-								<td>私家车位1台</td>
-							</tr>
-							<tr>
-								<td rowspan="2" >
-									<view id="body1pie3" class="body1pie">
+								</view>
+							</view>
+							
+							<view  class="tr">
+								<view  class="td td1">
+									<view id="body1pie3" class="body1pie">
+
+									</view>
+								</view>
+								<view  class="td td2" >
+									<view  class="td td3" >
 										
+										<view class="td td4">管理员<span class="body1pie-num color307AF6">5</span>人</view>
+										<view class="td td4">白名单<span class="body1pie-num color53B56B">5</span>人</view>
 									</view>
-								</td>
-								<td>空闲5台</td>
-								<td>占用5台</td>
-							</tr>
-							<tr>
-								
-								<td>公共车位3台</td>
-								<td>私家车位1台</td>
-							</tr>
-							
-						</table>
-					</jpContent>
-				</view>
-			</view>
-			
-		</view>
-		<tabbar :current="0"></tabbar>
-		
-	</view>
-</template>
-
-<script>
-	import Tabbar from '@/components/Tabbar.vue'
-	import jpContent from '@/components/JPcontent.vue'
-	
-	import * as API from '@/apis/pagejs/index.js'
-	
-	export default {
-		components: {
-			Tabbar,jpContent
-		},
-		data() {
-			return {
-				isReady:false,
-				jpContentMap:{
-					body1:2
+									<view  class="td td3" >
+										
+										<view class="td td4">游客<span class="body1pie-num colorEF8375">5</span>人次</view>
+										<view class="td td4"></view>
+									</view>
+								</view>
+								
+							</view>
+					
+
+						</view>
+					</jpContent>
+				</view>
+			</view>
+
+		</view>
+		<tabbar :current="0"></tabbar>
+
+	</view>
+</template>
+
+<script>
+	import Tabbar from '@/components/Tabbar.vue'
+	import jpContent from '@/components/JPcontent.vue'
+	import * as echarts from 'echarts';
+
+	import * as API from '@/apis/pagejs/index.js'
+
+	export default {
+		components: {
+			Tabbar,
+			jpContent
+		},
+		data() {
+			return {
+				isReady: false,
+				echartsList: {
+
+				},
+				jpContentMap: {
+					body1: 2
+				}
+			}
+		},
+		onLoad() {
+
+		},
+		onReady() {
+			this.getfindByOpenId();
+		},
+		methods: {
+			getbody1pie1() {
+				var img=require("@/assets/img/index/pie1-1.svg")
+				var key = "body1pie1"
+				var myChart = this.echartsList[key];
+				if (!myChart) {
+					myChart = echarts.init(document.getElementById(key), null, {
+						width: uni.upx2px(88),
+						height: uni.upx2px(88)
+					})
+
+				}
+				myChart.clear()
+				var option = {
+
+					series: [{
+						silent: true,
+						type: 'pie',
+						radius: ['70%', '100%'],
+						label: {
+							show: false,
+						},
+
+						data: [{
+								value: 1048,
+								 itemStyle: { color: '#AAAAAA' }
+							},
+							{
+								value: 735 ,
+								 itemStyle: { color: '#53B56B' }
+							}
+						]
+					}],
+					grid: {
+						top: 0,
+						left: 0,
+						right: 0,
+						bottom: 0,
+						containLabel: true
+					},
+					graphic: [{
+						type: 'image',
+						id: 'logo',
+						left: 'center',
+						top: 'center',
+						style: {
+							image: img, // 图片路径
+							width: uni.upx2px(40),
+							height: uni.upx2px(40)
+						}
+					}]
+				}
+				myChart.setOption(option);
+				this.echartsList[key] = myChart;
+			},
+			getbody1pie2() {
+				var img=require("@/assets/img/index/pie1-2.svg")
+				
+				var key = "body1pie2"
+				var myChart = this.echartsList[key];
+				if (!myChart) {
+					myChart = echarts.init(document.getElementById(key), null, {
+						width: uni.upx2px(88),
+						height: uni.upx2px(88)
+					})
+
+				}
+				myChart.clear()
+				var option = {
+				
+					series: [{
+						silent: true,
+						type: 'pie',
+						radius: ['70%', '100%'],
+						label: {
+							show: false,
+						},
+				
+						data: [{
+								value: 1048,
+								 itemStyle: { color: '#AAAAAA' }
+							},
+							{
+								value: 735 ,
+								 itemStyle: { color: '#53B56B' }
+							},
+							{
+									value: 1048,
+									 itemStyle: { color: '#EF8132' }
+								},
+								{
+									value: 735 ,
+									 itemStyle: { color: '#DC4441' }
+								}
+						]
+					}],
+					grid: {
+						top: 0,
+						left: 0,
+						right: 0,
+						bottom: 0,
+						containLabel: true
+					},
+					graphic: [{
+						type: 'image',
+						id: 'logo',
+						left: 'center',
+						top: 'center',
+						style: {
+							image: img, // 图片路径
+							width: uni.upx2px(40),
+							height: uni.upx2px(40)
+						}
+					}]
 				}
-			}
-		},
-		onLoad() {
-			this.getfindByOpenId();
-		},
-		onReady() {
-			
-		},
-		methods: {
-			init(){
+				myChart.setOption(option);
+				this.echartsList[key] = myChart;
+			},
+			getbody1pie3() {
+				var img=require("@/assets/img/index/pie1-3.svg")
+				
+				var key = "body1pie3"
+				var myChart = this.echartsList[key];
+				if (!myChart) {
+					myChart = echarts.init(document.getElementById(key), null, {
+						width: uni.upx2px(88),
+						height: uni.upx2px(88)
+					})
+
+				}
+				myChart.clear()
+				var option = {
 				
-			},
-			getfindByOpenId() {
-				uni.showLoading({
-					title: "加载中",
-					mask: true,
-				})
-				API.findByOpenId({
-					openId: this.jphelp.getOpenId(),
-				}).then((response) => {
-					uni.hideLoading();
-					this.isReady = true;
-					
-					this.init()
-				}).catch(error => {
-					uni.showToast({
-						title: error,
-						icon: "none"
-					})
-				})
-			}
-		}
-	}
-</script>
+					series: [{
+						type: 'pie',
+						silent: true, // 禁用交互效果
 
+						radius: ['70%', '100%'],
+						label: {
+							show: false,
+						},
+				
+						data: [
+							{
+								value: 735 ,
+								 itemStyle: { color: '#53B56B' }
+							},
+							{
+								value: 735 ,
+								 itemStyle: { color: '#EF8375' }
+							},
+							{
+								value: 735 ,
+								 itemStyle: { color: '#307AF6' }
+							}
+						]
+					}],
+					grid: {
+						top: 0,
+						left: 0,
+						right: 0,
+						bottom: 0,
+						containLabel: true
+					},
+					graphic: [{
+						type: 'image',
+						id: 'logo',
+						left: 'center',
+						top: 'center',
+						style: {
+							image: img, // 图片路径
+							width: uni.upx2px(40),
+							height: uni.upx2px(40)
+						}
+					}]
+				}
+				myChart.setOption(option);
+				this.echartsList[key] = myChart;
+			},
+			init() {
+				this.getbody1pie1()
+				this.getbody1pie2()
+				this.getbody1pie3()
+			},
+			getfindByOpenId() {
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.findByOpenId({
+					openId: this.jphelp.getOpenId(),
+				}).then((response) => {
+
+					uni.hideLoading();
+					this.isReady = true;
+					this.loginset(response)
+					try {
+						this.init()
+					} catch (e) {
+						console.log(e)
+						uni.showToast({
+							title: e,
+							icon: "none"
+						})
+					}
+
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+					uni.redirectTo({
+						url: '/pages/login/login'
+					})
+				})
+			}
+		}
+	}
+</script>
+
 <style scoped lang="scss">
-	// 导航栏
-	.navbar {
-		
-		
-		background-color: rgba(22, 119, 255, 1);
-		color: #fff;
-		line-height: 88rpx;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 0 32rpx;
-		color: rgba(255, 255, 255, 1);
-		font-size: 36rpx;
-		position: fixed;
-		left: 0;
-		right: 0;
-		top: 0;
-		z-index: 999999;
-		    font-weight: bold;
-		
+	.color307AF6{
+		color:#307AF6
 	}
-	.main {
-		border-radius: 16px 16px 0px 0px;
-		background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
-		margin-top: -24rpx;
-		padding: 32rpx ;
-		.statistics {
-			border-radius: 8px;
-			background-color: rgba(255, 255, 255, 1);
-			box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
-			margin-bottom: 24rpx;
-			padding: 40rpx;
-		
-			.title {
-				display: flex;
-				align-items: center;
-				margin-bottom: 16rpx;
-		
-				.img {
-					width: 36rpx;
-					height: 36rpx;
-					vertical-align: middle;
-					border-radius: 999px;
-		
-				}
-		
-				.change {
-					display: flex;
-					align-items: center;
-		
-					.change-img {
-						width: 32rpx;
-						height: 32rpx;
-						vertical-align: middle;
-					}
-		
-					text {
-		
-						margin-left: 8rpx;
-					}
-				}
-		
-		
-				.text {
-					color: rgba(16, 16, 16, 1);
-					font-size: 36rpx;
-					margin-left: 16rpx;
-					font-weight: bold;
-				}
-		
-				.change {
-					margin-left: 16rpx;
-					font-size: 24rpx;
-					color: #838383;
-		
+	.color53B56B{
+		color:#53B56B
+	}
+	.colorAAAAAA{
+		color:#AAAAAA
+	}
+	.colorEF8132{
+		color:#EF8132
+	}
+	.colorDC4441{
+		color:#DC4441
+	}
+	.colorEF8375{
+		color:#EF8375
+	}
+	
+	.body1pie-table{
+		color: rgba(51,51,51,1);
+		font-size: 32rpx;
+		font-weight: bold;
+		.tr{
+				.td1{
+						padding-right: 24rpx;
 				}
-		
-				.check-all {
-					margin-left: auto;
-					color: rgba(131, 131, 131, 1);
-					font-size: 24rpx;
+			    display: flex;
+				margin-bottom: 40rpx;
+				.td2{
+					  
+					       width: 100%;
+						.td3{
+							  display: flex;
+							
+							 .td4{
+								 width: 120px; 
+							 }
+						}
 				}
-			}
 		}
-	}
-	.tabs-box {
-		padding: 32rpx 0;
-		margin-top: 66rpx;
-		padding-right: 32rpx;
-		background-color: rgba(22, 119, 255, 1);
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-	
-		.tabs {
-			width: 97%;
+		// td{
+		// 	padding-right: 24rpx;
+			
+		// }
+		.body1pie{
+			
 		}
-		.more{
-			padding-right: 12rpx;
+		.body1pie-num{
+			margin: 0 8rpx;
 		}
-	
 	}
-</style>
+	
+	// 导航栏
+	.navbar {
+
+
+		background-color: rgba(22, 119, 255, 1);
+		color: #fff;
+		line-height: 88rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 32rpx;
+		color: rgba(255, 255, 255, 1);
+		font-size: 36rpx;
+		position: fixed;
+		left: 0;
+		right: 0;
+		top: 0;
+		z-index: 999999;
+		font-weight: bold;
+
+	}
+
+	.main {
+		border-radius: 16px 16px 0px 0px;
+		background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
+		margin-top: -24rpx;
+		padding: 32rpx;
+
+		.statistics {
+			border-radius: 8px;
+			background-color: rgba(255, 255, 255, 1);
+			box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
+			margin-bottom: 24rpx;
+			padding: 40rpx;
+
+			.title {
+				display: flex;
+				align-items: center;
+				margin-bottom: 32rpx;
+
+				.img {
+					width: 36rpx;
+					height: 36rpx;
+					vertical-align: middle;
+					border-radius: 999px;
+
+				}
+
+				.change {
+					display: flex;
+					align-items: center;
+
+					.change-img {
+						width: 32rpx;
+						height: 32rpx;
+						vertical-align: middle;
+					}
+
+					text {
+
+						margin-left: 8rpx;
+					}
+				}
+
+
+				.text {
+					color: rgba(16, 16, 16, 1);
+					font-size: 36rpx;
+					margin-left: 16rpx;
+					font-weight: bold;
+				}
+
+				.change {
+					margin-left: 16rpx;
+					font-size: 24rpx;
+					color: #838383;
+
+				}
+
+				.check-all {
+					margin-left: auto;
+					color: rgba(131, 131, 131, 1);
+					font-size: 24rpx;
+				}
+			}
+		}
+		.statistics-end {
+			padding-bottom: 0;
+		}
+	}
+
+	.tabs-box {
+		padding: 32rpx 0;
+		margin-top: 66rpx;
+		padding-right: 32rpx;
+		background-color: rgba(22, 119, 255, 1);
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.tabs {
+			width: 97%;
+		}
+
+		.more {
+			padding-right: 12rpx;
+		}
+
+	}
+</style>

+ 7 - 12
pages/login/login.vue

@@ -43,18 +43,7 @@
 			this.query()
 		},
 		methods: {
-			loginset(response){
-				
-				var token = response ? response.data.token : '';
-				this.jphelp.setToken(token);
-				this.jphelp.setPersonInfo(response.data.regUser);
-				this.jphelp.setPersonInfoPlus(response.data)
-				
-				//this.gotoUrl("pages/user/index")
-				uni.redirectTo({
-					url: '/pages/statistics/statistics'
-				})
-			},
+			
 			query(){
 				uni.showLoading({
 					title: "加载中",
@@ -79,6 +68,9 @@
 						}
 					}else{
 						this.loginset(response)
+						uni.redirectTo({
+							url: '/pages/index/index'
+						})
 					}
 					
 					
@@ -142,6 +134,9 @@
 						}
 					}else{
 						this.loginset(response)
+						uni.redirectTo({
+							url: '/pages/index/index'
+						})
 					}
 				
 				}).catch(error => {

Some files were not shown because too many files changed in this diff