Bläddra i källkod

1、微信、支付登录
2、修改手机号
3、修改密码

lihongxiao 6 månader sedan
förälder
incheckning
89426301a3

+ 6 - 6
config/baseUrl.js

@@ -5,8 +5,8 @@ if (process.env.NODE_ENV === 'development') {
 	// 开发环境
 	// baseUrl = "http://192.168.0.106:8080"; //屈晨
 	// baseUrl = "http://192.168.0.55:8080"; //蔡雅茹
-	baseUrl = "http://192.168.0.52:8080"; //贺礼霄
-	// baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
+	// baseUrl = "http://192.168.0.52:8080"; //贺礼霄
+	baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
 	h5BaseUrl = "https://test.baoxianzhanggui.com/copartnerH5";
 	// baseUrl = "https://pre.baoxianzhanggui.com/web-api"; //预生产
 	// h5BaseUrl = "https://pre.baoxianzhanggui.com/h5";
@@ -15,12 +15,12 @@ if (process.env.NODE_ENV === 'development') {
 	socketUrl = "";
 } else if (process.env.NODE_ENV === 'production') {
 	// 生产环境
-	baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
-	h5BaseUrl = "https://test.baoxianzhanggui.com/copartnerH5";
+	// baseUrl = "https://test.baoxianzhanggui.com/web-api"; //测试
+	// h5BaseUrl = "https://test.baoxianzhanggui.com/copartnerH5";
 	// baseUrl = "https://pre.baoxianzhanggui.com/web-api"; //预生产
 	// h5BaseUrl = "https://pre.baoxian8zhanggui.com/copartnerH5";
-	// baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
-	// h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/copartnerH5";
+	baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
+	h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/copartnerH5";
 	socketUrl = "";
 }
 const courtConfig = {

+ 1 - 2
config/login.js

@@ -54,7 +54,7 @@ async function login(options = {}) {
 		} else {
 			uni.setStorageSync('username', res.data.userId);
 			uni.setStorageSync('type', res.data.type);
-			let loginStatus = await getLoginUserInfo(res.data.token, res.data.userId);
+			let loginStatus = await getLoginUserInfo(res.data, res.data.userId);
 			if (loginStatus) {
 				// 跳转到首页
 				uni.switchTab({
@@ -203,7 +203,6 @@ async function getLoginUserInfo(data, userId) {
 			Authorization: Author,
 		}
 	}); //用户信息
-
 	store.commit('setUserModules', {
 		title: 'userInfo',
 		data: {

+ 8 - 6
manifest.json

@@ -9,8 +9,8 @@
             "src" : "图片路径"
         }
     ],
-    "versionName" : "1.1.4",
-    "versionCode" : 114,
+    "versionName" : "1.1.8",
+    "versionCode" : 118,
     "app-plus" : {
         "error" : {
             "url" : "hybrid/html/error.html"
@@ -80,16 +80,18 @@
                 "ad" : {},
                 "oauth" : {
                     "weixin" : {
-                        "appid" : "wx612ca90988c46947",
+                        "appid" : "wx8e8efe710bd99de2",
+                        "appsecret" : "69d6024eb2f2a96a71f1f859a21cc9bf",
                         "UniversalLinks" : ""
                     }
                 },
                 "share" : {
                     "weixin" : {
-                        "appid" : "wx612ca90988c46947",
+                        "appid" : "wx8e8efe710bd99de2",
                         "UniversalLinks" : ""
                     }
-                }
+                },
+                "push" : {}
             },
             "icons" : {
                 "android" : {
@@ -150,7 +152,7 @@
             "minified" : false
         },
         "usingComponents" : true,
-        "appid" : "wxe57ddfbe230bcfba",
+        "appid" : "wx8e8efe710bd99de2",
         "permission" : {}
     },
     "h5" : {

+ 1 - 1
pages/components/leverStaff.vue

@@ -36,7 +36,7 @@ export default {
     computed: {
 		...mapState(['userInfo']),
 	},
-    onLoad() {
+    mounted() {
 		this.level = this.userInfo.sysUser.level
 		if (this.level == 2) {
 			this.partnerTypeOption = this.partnerTypeOption.slice(0, -1);

+ 115 - 0
pages/components/year.vue

@@ -0,0 +1,115 @@
+<template>
+    <view>
+        <view class="search-data">
+            <text v-for="(val, index) in year" :key="index" :class="val.startShow ? 'active' : ''"
+                @click="onSeachYear(val, index)">{{ val.lable }}</text>
+        </view>
+    </view>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            year: [{
+				lable: '日',
+				startShow: false
+			}, {
+				lable: '周',
+				startShow: false
+			}, {
+				lable: '月',
+				startShow: false
+			}],
+        }
+    },
+    methods: {
+        onSeachYear(val, index) {
+            console.log(val, index,99999999);
+			this.year.map((value, i) => i === index ? value.startShow = !value.startShow : value.startShow = false)
+			let now = new Date();
+			let year = now.getFullYear();
+			let month = now.getMonth() + 1; // 月份是从0开始的,所以需要加1
+			let day = now.getDate();
+			if (index == 0 && val.startShow) {
+				let theDay = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
+				let beginTime = theDay + ' 00:00:01'
+				let endTime = theDay + ' 23:59:59'
+                this.$emit("time",beginTime,endTime) 
+				this.$emit("queryData") 
+			}
+			else if (index == 1 && val.startShow) {
+				let dayOfWeek = now.getDay();
+				let firstDayOfWeek = new Date(year, now.getMonth(), day - dayOfWeek + 1);
+				let lastDayOfWeek = new Date(year, now.getMonth(), day + (7 - dayOfWeek));
+				let monday = this.formatDate(firstDayOfWeek);
+				let sunday = this.formatDate(lastDayOfWeek);
+				let beginTime = monday + ' 00:00:01'
+				let endTime = sunday + ' 23:59:59'
+                this.$emit("time",beginTime,endTime) 
+				this.$emit("queryData") 
+			}
+			else if (index == 2 && val.startShow) {
+				let beginTime = this.getCurrentMonthFirst() + ' 00:00:01'
+				let endTime = this.getCurrentMonthLast() + ' 23:59:59'
+                this.$emit("time",beginTime,endTime) 
+				this.$emit("queryData") 
+			}
+			else {
+				let beginTime = ''
+				let endTime = ''
+				// type == 1 ? this.queryData() : this.analysisQueryData()
+                this.$emit("time",beginTime,endTime) 
+				this.$emit("queryData") 
+			}
+
+		},
+        formatDate(date) {
+			let year = date.getFullYear();
+			let month = date.getMonth() + 1;
+			let day = date.getDate();
+			month = month < 10 ? '0' + month : month;
+			day = day < 10 ? '0' + day : day;
+			return year + '-' + month + '-' + day;
+		},
+		getCurrentMonthFirst() {
+			// 获取当月第一天数据
+			let date = new Date()
+			date.setDate(1)
+			let month = parseInt(date.getMonth() + 1)
+			let day = date.getDate()
+			if (month < 10) month = '0' + month
+			if (day < 10) day = '0' + day
+			return date.getFullYear() + '-' + month + '-' + day
+		},
+		getCurrentMonthLast() {
+			// 获取当月最后一天数据
+			let date = new Date()
+			let year = date.getFullYear()
+			let month = date.getMonth() + 1
+			month = month < 10 ? '0' + month : month
+			let day = new Date(year, month, 0)
+			return year + '-' + month + '-' + day.getDate()
+		},
+    }
+}
+</script>
+<style lang="scss" scoped>
+.search-data {
+	color: #666666;
+	border: 1px solid #EEEEEE;
+
+	.active {
+		color: #FFFFFF;
+		background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
+	}
+
+	text {
+		padding: 5px 6px;
+		border-left: 1px solid #EEEEEE;
+	}
+
+	text:first-child {
+		border-left: none
+	}
+}
+</style>

+ 6 - 6
pages/institutional/partner.vue

@@ -190,7 +190,7 @@
 								<view>
 									<text>一级合伙人</text>
 									<image style="display: inline-block; width: 45px;height:18px;vertical-align: sub;"
-										src="/static/icon/jibie.png" mode=""></image>
+										src="/static/icon/jibie1.png" mode=""></image>
 								</view>
 								<view @click="ShowModalCodeFun(3,1)">
 									<image style="display: inline-block; width: 13px;height:13px;vertical-align: -1px;"
@@ -230,7 +230,7 @@
 								<view>
 									<text>二级合伙人</text>
 									<image style="display: inline-block; width: 45px;height:18px;vertical-align: sub;"
-										src="/static/icon/jibie3.png" mode=""></image>
+										src="/static/icon/jibie.png" mode=""></image>
 								</view>
 								<view @click="ShowModalCodeFun(4,2)">
 									<image style="display: inline-block; width: 13px;height:13px;vertical-align: -1px;"
@@ -270,7 +270,7 @@
 								<view>
 									<text>三级合伙人</text>
 									<image style="display: inline-block; width: 45px;height:18px;vertical-align: sub;"
-										src="/static/icon/jibie4.png" mode=""></image>
+										src="/static/icon/jibie3.png" mode=""></image>
 								</view>
 								<view @click="ShowModalCodeFun(5,3)" >
 									<image style="display: inline-block; width: 13px;height:13px;vertical-align: -1px;" src="/static/icon/code2.png" mode=""></image>
@@ -312,7 +312,7 @@
 								<view>
 									<text>一级合伙人</text>
 									<image style="display: inline-block; width: 45px;height:18px;vertical-align: sub;"
-										src="/static/icon/jibie3.png" mode=""></image>
+										src="/static/icon/jibie1.png" mode=""></image>
 								</view>
 								<view @click="ShowModalCodeFun(4,1)">
 									<image style="display: inline-block; width: 13px;height:13px;vertical-align: -1px;"
@@ -352,7 +352,7 @@
 								<view>
 									<text>二级合伙人</text>
 									<image style="display: inline-block; width: 45px;height:18px;vertical-align: sub;"
-										src="/static/icon/jibie4.png" mode=""></image>
+										src="/static/icon/jibie.png" mode=""></image>
 								</view>
 								<view @click="ShowModalCodeFun(5,2)" >
 									<image style="display: inline-block; width: 13px;height:13px;vertical-align: -1px;" src="/static/icon/code2.png" mode=""></image>
@@ -394,7 +394,7 @@
 								<view>
 									<text>一级合伙人</text>
 									<image style="display: inline-block; width: 45px;height:18px;vertical-align: sub;"
-										src="/static/icon/jibie4.png" mode=""></image>
+										src="/static/icon/jibie1.png" mode=""></image>
 								</view>
 								<view @click="ShowModalCodeFun(5,1)" >
 									<image style="display: inline-block; width: 13px;height:13px;vertical-align: -1px;" src="/static/icon/code2.png" mode=""></image>

+ 1 - 2
pages/login/login.vue

@@ -547,7 +547,7 @@
 			onzfbAppLogin() {
 				let urls =
 					'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=2021004193614682&scope=auth_user&redirect_uri=https://test.baoxianzhanggui.com/partnerPay/';
-					urls = encodeURIComponent(urls); //将地址编码成浏览器访问的格式
+					urls = encodeURIComponent(urls); //将地址编码成浏览器访问的格式 
 				plus.runtime.openURL(
 					'alipays://platformapi/startapp?appId=20000067&url=' + urls,
 					res => {
@@ -575,7 +575,6 @@
 						title: res.msg,
 						icon: 'none'
 					});
-					socket.init();
 					return;
 				})
 			},

+ 1 - 1
pages/set/mobile.vue

@@ -54,7 +54,7 @@
 					return uni.showToast({title: '请输入正确的手机号码',icon: 'none'});
 				}
 				// 请求服务器,发送验证码
-				let res = await this.$http.post('/user/updatePartnerMobile?id='+this.userInfo.sysUser.id+'&mobile='+this.phone);
+				let res = await this.$http.post('/user/updatePartnerMobile?id='+this.userInfo.sysUser.userId+'&mobile='+this.phone);
 				this.phone="";
 				uni.showToast({ title: '修改绑定手机成功,请重新登录', icon:"none",duration:2000 });
 				setTimeout(() => {

+ 50 - 10
pages/set/password.vue

@@ -6,13 +6,36 @@
 		<view class="form">
 			<view class="password">
 				<view class="icon iconfont icon-icon-mima"></view>
-				<input placeholder="请设置新密码(6-15位数字与字母组合)" v-model="pwd" password=true
+				<input  type="text" placeholder="请输入旧密码" v-model="oepwd"  :password="isHidePassword"
 					placeholder-style="color: #C5C5C5;font-size:26upx" />
+					<view class=" position-absolute top-0 right-0 d-flex a-center j-center"
+							style="padding-right: 10px;height: 100%;">
+							<image
+								:src="isHidePassword?'../../static/image/login/biyan.png':'../../static/image/login/zhengyan.png'"
+								@tap="isHidePassword = !isHidePassword" mode="" style="width: 18px;height: 18px;">
+						</view>
 			</view>
 			<view class="password">
 				<view class="icon iconfont icon-icon-mima"></view>
-				<input placeholder="再次输入新密码" v-model="repwd" password=true
+				<input type="text" placeholder="请设置新密码(6-15位数字与字母组合)" v-model="pwd" :password="isHidePassword1"
 					placeholder-style="color: #C5C5C5;font-size:26upx" />
+					<view class=" position-absolute top-0 right-0 d-flex a-center j-center"
+							style="padding-right: 10px;height: 100%;">
+							<image
+								:src="isHidePassword1?'../../static/image/login/biyan.png':'../../static/image/login/zhengyan.png'"
+								@tap="isHidePassword1 = !isHidePassword1" mode="" style="width: 18px;height: 18px;">
+						</view>
+			</view>
+			<view class="password">
+				<view class="icon iconfont icon-icon-mima"></view>
+				<input type="text" placeholder="再次输入新密码" v-model="repwd"  :password="isHidePassword2"
+					placeholder-style="color: #C5C5C5;font-size:26upx" />
+					<view class=" position-absolute top-0 right-0 d-flex a-center j-center"
+							style="padding-right: 10px;height: 100%;">
+							<image
+								:src="isHidePassword2?'../../static/image/login/biyan.png':'../../static/image/login/zhengyan.png'"
+								@tap="isHidePassword2 = !isHidePassword2" mode="" style="width: 18px;height: 18px;">
+						</view>
 			</view>
 			<button class="user-set-btn d-flex a-center j-center main-bg-color" :loading="loading"
 				:class="{'main-bf-hover-color':disabled}" :disabled="disabled" type="primary" @tap="submit">完成</button>
@@ -22,15 +45,20 @@
 
 <script>
 	import {
-		mapState
+		mapState,mapMutations
 	} from "vuex"
 	export default {
 		data() {
 			return {
+				oepwd:'',
 				pwd: "",
 				repwd: "",
 				loading: false,
 				disabled: true,
+				isHidePassword: true, //是否隐藏密码
+				isHidePassword1: true, //是否隐藏密码
+				isHidePassword2: true, //是否隐藏密码
+
 			}
 		},
 		watch: {
@@ -46,6 +74,7 @@
 			...mapState(['userInfo'])
 		},
 		methods: {
+			...mapMutations(['emptyUserInfo']),
 			// 改变按钮状态
 			OnBtnChange() {
 				if (this.pwd && this.repwd) {
@@ -68,16 +97,27 @@
 					});
 				}
 
-				let res = await this.$http.post('/user/updatePartnerPwd?id=' + this.userInfo.sysUser.id + '&password=' + this
-					.pwd);
+				let res = await this.$http.post('/user/updatePartnerPwd?id=' + this.userInfo.sysUser.userId + '&password=' + this
+					.pwd+'&oldPassword=' + this.oepwd);
 				if (res.code == 200) {
 					this.pwd = "";
 					this.repwd = "";
-					return uni.showToast({
-						title: "修改密码成功",
-						icon: "none"
-					});
-				}
+					this.oepwd = "";
+					uni.showToast({ title:  res.msg, icon:"none",duration:2000 });
+					setTimeout(() => {
+						this.emptyUserInfo();
+							uni.reLaunch({
+								url:"/pages/login/login"
+							})
+							return true;
+					}, 2000);
+					}
+					else{
+						return uni.showToast({
+							title: res.msg,
+							icon: "none"
+						});
+					}
 
 			}
 		}

+ 33 - 33
pages/set/set.vue

@@ -99,37 +99,37 @@
 			this.bindingStatus();
 			this.isBindAlipay();
 			//#endif
-			if (this.userInfo.sysUser.status == '0' && this.userInfo.sysUser.managementSource == '2') {
-				if (this.userInfo.sysUser.factorVerify == '2') {
-					this.list[1].text = '实名认证失败';
-					this.list[1].borderColor = '#FF0000';
-					this.list[1].backColor = '#FFE2E2';
-					this.lsit[1].url = '/pages/user/authInfo';
-				} else {
-					this.list[1].text = '未认证';
-					this.list[1].borderColor = '#0052FF';
-					this.list[1].backColor = '#DDE8FF';
-				}
-			} else if (this.userInfo.sysUser.status == '8') {
-				this.list[1].text = '待补充资料';
-				this.list[1].borderColor = '#FFB800';
-				this.list[1].backColor = '#FFF3D3';
-				this.lsit[1].url = '/pages/user/practitionerInfo';
-			} else if (this.userInfo.sysUser.status == '3') {
-				this.list[1].text = '审核不通过';
-				this.list[1].borderColor = '#FF0000';
-				this.list[1].backColor = '#FFE2E2';
-				this.lsit[1].url = '/pages/user/practitionerInfo';
-			} else if (this.userInfo.sysUser.status == '2') {
-				this.list[1].text = '资料审核中';
-				this.list[1].borderColor = '#FFB800';
-				this.list[1].backColor = '#FFF3D3';
-				this.lsit[1].url = '/pages/user/authResult1';
-			} else if (this.userInfo.sysUser.status == '1') {
-				this.list[1].text = '已认证';
-				this.list[1].borderColor = '#0052FF';
-				this.list[1].backColor = '#DDE8FF';
-			}
+			// if (this.userInfo.sysUser.status == '0' && this.userInfo.sysUser.managementSource == '2') {
+			// 	if (this.userInfo.sysUser.factorVerify == '2') {
+			// 		this.list[1].text = '实名认证失败';
+			// 		this.list[1].borderColor = '#FF0000';
+			// 		this.list[1].backColor = '#FFE2E2';
+			// 		this.lsit[1].url = '/pages/user/authInfo';
+			// 	} else {
+			// 		this.list[1].text = '未认证';
+			// 		this.list[1].borderColor = '#0052FF';
+			// 		this.list[1].backColor = '#DDE8FF';
+			// 	}
+			// } else if (this.userInfo.sysUser.status == '8') {
+			// 	this.list[1].text = '待补充资料';
+			// 	this.list[1].borderColor = '#FFB800';
+			// 	this.list[1].backColor = '#FFF3D3';
+			// 	this.lsit[1].url = '/pages/user/practitionerInfo';
+			// } else if (this.userInfo.sysUser.status == '3') {
+			// 	this.list[1].text = '审核不通过';
+			// 	this.list[1].borderColor = '#FF0000';
+			// 	this.list[1].backColor = '#FFE2E2';
+			// 	this.lsit[1].url = '/pages/user/practitionerInfo';
+			// } else if (this.userInfo.sysUser.status == '2') {
+			// 	this.list[1].text = '资料审核中';
+			// 	this.list[1].borderColor = '#FFB800';
+			// 	this.list[1].backColor = '#FFF3D3';
+			// 	this.lsit[1].url = '/pages/user/authResult1';
+			// } else if (this.userInfo.sysUser.status == '1') {
+			// 	this.list[1].text = '已认证';
+			// 	this.list[1].borderColor = '#0052FF';
+			// 	this.list[1].backColor = '#DDE8FF';
+			// }
 		},
 		async onShow() {
 			// #ifdef APP
@@ -177,7 +177,7 @@
 			async bindingStatus() {
 				let res = await this.$http.get("/APPPartner/checkBindWechat")
 				if (res.code == '200') {
-					this.list[2].text = "已绑定"
+					this.list[1].text = "已绑定"
 					this.status.weixinstatus = true;
 				} else {
 					this.status.weixinstatus = false;
@@ -187,7 +187,7 @@
 			async isBindAlipay() {
 				let res = await this.$http.get("/APPPartner/checkBindAlipay")
 				if (res.code == '200') {
-					this.list[3].text = "已绑定"
+					this.list[2].text = "已绑定"
 					this.status.zhifubaostatus = true;
 				} else {
 					this.status.zhifubaostatus = false;

+ 63 - 85
pages/statistics/statistics.vue

@@ -13,15 +13,13 @@
 				</view> -->
 			</view>
 		</view>
-		<view class="body-box" style="margin-top: 100px" v-if="type == 1">
+		<view class="body-box" style="margin-top: 100px" v-if="type == 1 && level!==5">
 			<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
 				<view class="statistics-title">新增人员汇总统计</view>
-				<view class="search-data">
-					<text v-for="(val, index) in year" :key="index" :class="val.startShow ? 'active' : ''"
-						@click="onSeachYear(val, index, 1)">{{ val.lable }}</text>
-				</view>
+				<year @queryData="queryData" @time="getTime"></year>
+			
 			</view>
-			<view class="statistics-number ">
+			<view class="statistics-number "> 
 				<view v-if="level <= 4">
 					<text>{{ echartsList.onePartnerNum || 0 }}</text>
 					<text>一级合伙人</text>
@@ -77,21 +75,20 @@
 			<qiun-data-charts v-else type="area" :opts="opts1" :chartData="chartData1" />
 
 		</view>
-		<view class="body-box" v-if="type == 1">
+		<view class="body-box" v-if="type == 1 && level!==5">
 			<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
 				<view class="statistics-title">新增人员占比分析</view>
-				<view class="search-data">
-					<text v-for="(val, index) in year" :key="index" :class="val.startShow ? 'active' : ''"
-						@click="onSeachYear(val, index, 2)">{{ val.lable }}</text>
-				</view>
+				<year @queryData="analysisQueryData" @time="getTime"></year>
+
 			</view>
 			<leverStaff @getPartnerType="getPartnerType2"></leverStaff>
-			<!-- <o-empty v-if="echartsList.countUserNumVoList && echartsList.countUserNumVoList.length==0" height="20vh" /> -->
-			<view class="charts-box" style="height: 200px;">
+			<o-empty v-if="!echartsList2.newProportion && !echartsList2.oldProportion" height="20vh" />
+			<view v-else class="charts-box" style="height: 200px;">
 				<qiun-data-charts type="ring" :eopts="ringOpts" :chartData="chartsDataPie2" />
 			</view>
+
 		</view>
-		<view class="body-box" style="padding-bottom: 10px;" v-if="type == 1">
+		<view class="body-box" style="padding-bottom: 10px;" v-if="type == 1 && level!==5">
 			<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
 				<view class="statistics-title">排名</view>
 			</view>
@@ -122,13 +119,39 @@
 
 			</view>
 		</view>
-		<view class="body-box" style="margin-top: 100px;" v-if="type == 2">
+		<view class="body-box" style="margin-top: 100px;" v-if="type == 1&& level==5">
 			<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
 				<view class="statistics-title">新增人员汇总统计</view>
-				<view class="search-data">
-					<text v-for="(val, index) in year" :key="index" :class="val.startShow ? 'active' : ''"
-						@click="onSeachYear(val, index, 1)">{{ val.lable }}</text>
+				<year @queryData="queryData" @time="getTime"></year>
+
+			</view>
+			<view class="statistics-number ">
+				<view>
+					<text>{{ echartsList.workSum || 0 }}</text>
+					<text>工作室</text>
+				</view>
+				<view>
+					<text>{{ echartsList.deptSum || 0 }}</text>
+					<text>团队</text>
 				</view>
+				<view>
+					<text>{{ echartsList.deptManSum || 0 }}</text>
+					<text>代理人</text>
+				</view>
+			</view>
+			<view class="statistics-type">
+				<text :class="typeStatistics == 1 ? 'selected' : ''" @click="getStatistics(1)">工作室</text>
+				<text :class="typeStatistics == 2 ? 'selected' : ''" @click="getStatistics(2)">团队</text>
+				<text :class="typeStatistics == 3 ? 'selected' : ''" @click="getStatistics(3)">代理人</text>
+			</view>
+			<o-empty v-if="echartsList.countUserNumVoList && echartsList.countUserNumVoList.length == 0" height="20vh" />
+			<qiun-data-charts v-else type="area" :opts="opts1" :chartData="chartData1" />
+		</view>
+		<view class="body-box" style="margin-top: 100px;" v-if="type == 2">
+			<view class=" dis j-s a-c" style="padding: 10px 10px 0 0;">
+				<view class="statistics-title">新增人员汇总统计</view>
+				<year @queryData="queryData" @time="getTime"></year>
+
 			</view>
 			<view class="statistics-number ">
 				<view>
@@ -159,9 +182,11 @@ import {
 	mapState,
 } from "vuex"
 import leverStaff from "../components/leverStaff.vue"
+import year from "../components/year.vue"
 export default {
 	components: {
-		leverStaff
+		leverStaff,
+		year
 	},
 	data() {
 		return {
@@ -175,6 +200,7 @@ export default {
 				dataLabel: true,
 			},
 			chartsDataPie2: {},
+			echartsList2:{},
 			level: '',
 			type: null,
 			typeStatistics: 1,
@@ -281,7 +307,7 @@ export default {
 		// 	this.queryData({type:1})
 		// }
 		this.queryData()
-		if (this.type == 1) {
+		if (this.type == 1 && this.level!==5) {
 			this.analysisQueryData()
 			this.rankingQueryData()
 		}
@@ -324,67 +350,7 @@ export default {
 				fail: (err) => { }
 			});
 		},
-		onSeachYear(val, index, type) {
-			this.year.map((value, i) => i === index ? value.startShow = !value.startShow : value.startShow = false);
-			let now = new Date();
-			let year = now.getFullYear();
-			let month = now.getMonth() + 1; // 月份是从0开始的,所以需要加1
-			let day = now.getDate();
-			if (index == 0 && val.startShow) {
-				let theDay = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
-				this.beginTime = theDay + ' 00:00:01'
-				this.endTime = theDay + ' 23:59:59'
-				type == 1 ? this.queryData() : this.analysisQueryData()
-			}
-			else if (index == 1 && val.startShow) {
-				let dayOfWeek = now.getDay();
-				let firstDayOfWeek = new Date(year, now.getMonth(), day - dayOfWeek + 1);
-				let lastDayOfWeek = new Date(year, now.getMonth(), day + (7 - dayOfWeek));
-				let monday = this.formatDate(firstDayOfWeek);
-				let sunday = this.formatDate(lastDayOfWeek);
-				this.beginTime = monday + ' 00:00:01'
-				this.endTime = sunday + ' 23:59:59'
-				type == 1 ? this.queryData() : this.analysisQueryData()
-			}
-			else if (index == 2 && val.startShow) {
-				this.beginTime = this.getCurrentMonthFirst() + ' 00:00:01'
-				this.endTime = this.getCurrentMonthLast() + ' 23:59:59'
-				type == 1 ? this.queryData() : this.analysisQueryData()
-			}
-			else {
-				this.beginTime = ''
-				this.endTime = ''
-				type == 1 ? this.queryData() : this.analysisQueryData()
-			}
-
-		},
-		formatDate(date) {
-			let year = date.getFullYear();
-			let month = date.getMonth() + 1;
-			let day = date.getDate();
-			month = month < 10 ? '0' + month : month;
-			day = day < 10 ? '0' + day : day;
-			return year + '-' + month + '-' + day;
-		},
-		getCurrentMonthFirst() {
-			// 获取当月第一天数据
-			let date = new Date()
-			date.setDate(1)
-			let month = parseInt(date.getMonth() + 1)
-			let day = date.getDate()
-			if (month < 10) month = '0' + month
-			if (day < 10) day = '0' + day
-			return date.getFullYear() + '-' + month + '-' + day
-		},
-		getCurrentMonthLast() {
-			// 获取当月最后一天数据
-			let date = new Date()
-			let year = date.getFullYear()
-			let month = date.getMonth() + 1
-			month = month < 10 ? '0' + month : month
-			let day = new Date(year, month, 0)
-			return year + '-' + month + '-' + day.getDate()
-		},
+		
 		async analysisQueryData() {
 			let params = {
 				beginTime: this.beginTime,
@@ -392,7 +358,8 @@ export default {
 				type: this.typeStatistics2,
 			}
 			let res = await this.$http.post('/APPPartner/getPartnerProportion', params);
-			if (res.code == '200') {
+			if (res.code == '200' ) {
+				this.echartsList2=res.data
 				this.chartsDataPie2 = {
 					series: [{
 						// "data": [
@@ -402,8 +369,8 @@ export default {
 						// 	{ name: "历史", value: res.data.oldProportion, labelText: `历史:${res.data.oldProportion}%` }
 						// ]
 						"data": [
-							{ name: `新增`, value: res.data.newProportion},
-							{ name: "历史", value: res.data.oldProportion}
+							{ name: `新增`, value: res.data.newProportion?res.data.newProportion:0},
+							{ name: "历史", value: res.data.oldProportion?res.data.oldProportion:0}
 						]
 					}]
 				}
@@ -420,6 +387,10 @@ export default {
 				this.directLsit = res.data
 			}
 		},
+		getTime(beginTime,endTime){
+			this.beginTime=beginTime
+			this.endTime=endTime
+		},
 		async queryData() {
 			let params = {
 				beginTime: this.beginTime,
@@ -427,8 +398,15 @@ export default {
 				type: this.typeStatistics,
 			}
 			let res = {}
-			if (this.type == 1) {
+			if (this.type == 1 &&this.level!==5) {
 				res = await this.$http.post('/APPPartner/getPartnerCount', params);
+			}else if (this.type == 1 &&this.level==5) {
+				params = {
+					beginTime: this.beginTime,
+					endTime: this.endTime,
+					number: this.typeStatistics,
+				}
+				res = await this.$http.post('/APPPartner/getFivePartnerCount', params);
 			}
 			else {
 				res = await this.$http.post('/APPPartner/getCountUser', params);