@dongkboy 1 долоо хоног өмнө
parent
commit
10287dde60

+ 2 - 2
config/baseUrl.js

@@ -4,13 +4,13 @@ let socketUrl = "";
 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.59:8080"; //蔡雅茹
 	// 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";
-	baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
+	// baseUrl = "https://sxzgkj.baoxianzhanggui.com/web-api"; //生产
 	h5BaseUrl = "https://sxzgkj.baoxianzhanggui.com/copartnerH5";
 	socketUrl = "";
 } else if (process.env.NODE_ENV === 'production') {

+ 3 - 1
config/login.js

@@ -198,7 +198,9 @@ function judgeLogin(callback, type = "judge") {
 //获取登录用户信息
 async function getLoginUserInfo(data, userId) {
 	let Author = "Bearer" + " " + data.token;
-	let userInfoRes = await $http.get('/APPPartner/getUserInfo', {type:uni.getStorageSync('type')}, {
+	let userInfoRes = await $http.get('/newAppPartner/getUserInfo', {
+		type: uni.getStorageSync('type')
+	}, {
 		header: {
 			Authorization: Author,
 		}

+ 3 - 11
pages.json

@@ -240,20 +240,12 @@
 				"navigationBarTitleText": "申请成为合伙人",
 				"app-plus": {
 					"bounce": "none", //关闭反弹效果
-					"scrollIndicator": "none" //隐藏滚动条
-				}
-			}
-		},
-		{
-			"path": "pages/index/applystudio",
-			"style": {
-				"navigationBarTitleText": "申请工作室",
-				"app-plus": {
-					"bounce": "none", //关闭反弹效果
-					"scrollIndicator": "none" //隐藏滚动条
+					"scrollIndicator": "none", //隐藏滚动条
+					"titleNView": false
 				}
 			}
 		},
+
 		{
 			"path": "pages/index/applyteam",
 			"style": {

+ 230 - 245
pages/index/applypartner.vue

@@ -1,54 +1,35 @@
 <template>
 	<view>
 		<public-module></public-module>
-		
-		<view class="box"  :style="{background:`url(${indexBackgroundImage})`,backgroundSize: 'contain',backgroundRepeat: 'no-repeat'}">
-		<view class="box-con">
-			<uni-forms ref="personData"  :rules="rules" :value="personData"  label-width="100" validate-trigger="bind"
-					 err-show-type="toast">
-				<uni-forms-item label="姓名" required name="name">
-					<input class="uni-input-input textColor" placeholder="输入姓名" v-model="personData.name"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="手机号" required   name="mobile">
-					<input class="uni-input-input textColor" maxlength="11"  placeholder="输入手机号" v-model="personData.mobile"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="证件号" required  name="identity">
-					<input class="uni-input-input textColor" placeholder="输入证件号" v-model="personData.identity"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="密码" required  name="password">
-					<input class="uni-input-input textColor" placeholder="输入密码" v-model="personData.password"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="地址" required  name="address">
-					<input class="uni-input-input textColor" placeholder="输入地址" v-model="personData.address"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-			</uni-forms>
-		</view>
+
+		<view class="box"
+			:style="{background:`url(${indexBackgroundImage})`,backgroundSize: 'contain',backgroundRepeat: 'no-repeat'}">
+			<view class="box-con">
+				<uni-forms ref="personData" :rules="rules" :value="personData" label-width="100" validate-trigger="bind"
+					err-show-type="toast">
+					<uni-forms-item label="姓名" required name="name">
+						<input class="uni-input-input textColor" placeholder="输入姓名" v-model="personData.name"
+							placeholder-style="font-size:28upx" />
+					</uni-forms-item>
+					<uni-forms-item label="手机号" required name="mobile">
+						<input class="uni-input-input textColor" maxlength="11" placeholder="输入手机号"
+							v-model="personData.mobile" placeholder-style="font-size:28upx" />
+					</uni-forms-item>
+					<uni-forms-item label="证件号" required name="identity">
+						<input class="uni-input-input textColor" placeholder="输入证件号" v-model="personData.identity"
+							placeholder-style="font-size:28upx" />
+					</uni-forms-item>
+					<uni-forms-item label="密码" required name="password">
+						<input class="uni-input-input textColor" placeholder="输入密码" v-model="personData.password"
+							placeholder-style="font-size:28upx" />
+					</uni-forms-item>
+					<uni-forms-item label="地址" required name="address">
+						<input class="uni-input-input textColor" placeholder="输入地址" v-model="personData.address"
+							placeholder-style="font-size:28upx" />
+					</uni-forms-item>
+				</uni-forms>
+			</view>
 		</view>
-		<!-- <view class="box-con" style="margin-top:10px">
-			<uni-forms :rules="carRules" :value="personData" ref="personData" validate-trigger="bind"
-				 err-show-type="toast" label-width="100">
-				<uni-forms-item label="开户行">
-					<input class="uni-input-input textColor" placeholder="输入开户行" v-model="personData.bankName"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="开户账号">
-					<input class="uni-input-input textColor" placeholder="输入开户账号" v-model="personData.accountno"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<view >
-					<view>银行卡照片</view>
-					<view class="dis j-c" >
-						<image style="height: 95px;width: 150px;padding: 10px 0;" :src=" userfrontImg?userfrontImg:'/static/image/my/yinhangka.png'" mode=""
-							@click="userfrontChange"></image>
-					</view>
-				</view>
-			</uni-forms>
-		</view> -->
 		<view class="userBox" style="margin-top:10px">
 			<text>身份证件照</text>
 			<view class="dis j-s" style="margin: 10px 0;">
@@ -58,242 +39,241 @@
 					<view>人像面</view>
 				</view>
 				<view class="imgOcr-border">
-					<image :src="userbackImg?userbackImg:'/static/image/my/shenzf.png'" mode=""
-						@click="userbackChange"></image>
-						<view>国徽面</view>
+					<image :src="userbackImg?userbackImg:'/static/image/my/shenzf.png'" mode="" @click="userbackChange">
+					</image>
+					<view>国徽面</view>
 				</view>
 			</view>
 		</view>
-		<!-- <view class="userBox">
-			<u-checkbox v-model="checked"></u-checkbox>
-			<text>同时创建我的团队</text>
-		</view> -->
 		<view class="submit" @click="submit()">
 			提交
 		</view>
 	</view>
 </template>
-
 <script>
-	// import {
-	// 	mapState,
-	// 	mapMutations
-	// } from "vuex"
-	// import store from '@/store';
-	 import indexBackgroundImage from "@/static/shenqing.png"
+	import indexBackgroundImage from "@/static/shenqing.png"
+	import {
+		mapState,
+		mapMutations
+	} from "vuex"
 	export default {
-		// computed: {
-		// 	...mapState(['userInfo', "userCheckInfo", ]),
-		// },
-		data(){
+		data() {
 			return {
-				indexBackgroundImage:indexBackgroundImage,
-				checked:false,
+				indexBackgroundImage: indexBackgroundImage,
+				checked: false,
 				userfrontImg: "",
 				userbackImg: "",
-				personData:{
-					name:'',
-					mobile:'',
-					identity:'',
-					password:'',
-					address:'',
-					esmUserImageVo:[]
+				personData: {
+					name: '',
+					mobile: '',
+					identity: '',
+					password: '',
+					address: '',
+					esmUserImageVo: []
 				},
-				rules:{
-					name:{
+				rules: {
+					name: {
 						rules: [{
 							required: true,
 							errorMessage: '姓名不能为空'
 						}]
 					},
-					mobile:{
+					mobile: {
 						rules: [{
-							required: true,
-							errorMessage: '请输入手机号',
-						},
-						{
-							pattern: /^1[3-9]\d{9}$/,
-							errorMessage: '请输入正确的手机号',
-						}]
+								required: true,
+								errorMessage: '请输入手机号',
+							},
+							{
+								pattern: /^1[3-9]\d{9}$/,
+								errorMessage: '请输入正确的手机号',
+							}
+						]
 					},
-					identity:{
+					identity: {
 						rules: [{
-							required: true,
-							errorMessage: '请输入身份证号',
-						},
-						{
-							pattern: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/,
-							errorMessage: '请输入正确的身份证号',
-						}]
+								required: true,
+								errorMessage: '请输入身份证号',
+							},
+							{
+								pattern: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/,
+								errorMessage: '请输入正确的身份证号',
+							}
+						]
 					},
-					password:{
+					password: {
 						rules: [{
 							required: true,
 							errorMessage: '请输入密码'
 						}]
 					},
-					address:{
+					address: {
 						rules: [{
 							required: true,
 							errorMessage: '请输入地址',
 						}]
 					},
 				},
-				level:'',
-				id:'',
-				userId:''
+				grade: '',
+				id: '',
 			}
-	},
-	
-	async onLoad(e) {
-		this.level=e.level?e.level:''
-		this.userId=e.userId?e.userId:''
-		if(e.id){
-			this.id=e.id
-			this.$http.get('/user/' +e.id).then(res=>{
-				if(res.code==200){
-					this.personData={...res.data.sysUser,esmUserImageVo:[]}
-					this.personData.password = ''
-				}
-				else{
-					uni.showModal({
-						showCancel: false,
-						title: res.msg
-					})
-				}
-			})
-		}
-	},
-	methods:{
-		 submit(){
-			this.$refs.personData.submit().then(res => {
-				if(this.id){
-					this.$http.post('/user/updateUserInfo1/' +this.id, {
-						 esmUserImageVo: this.personData.esmUserImageVo,
-						 sysUser: this.personData,
-						 sysUserInfo:this.personData,
-					}).then(res=>{
-						if(res.code==200){
-						let obj = JSON.stringify({id:this.id,mobile:this.personData.mobile});
-						uni.redirectTo({
-							url: "/pages/index/success?data="+obj
+		},
+		computed: {
+			...mapState(['userInfo', "userCheckInfo"]),
+		},
+		async onLoad(options) {
+			console.log(options);
+			this.grade = options.grade ? options.grade : ''
+		},
+		methods: {
+			//提交注册
+			submit() {
+				this.$refs.personData.submit().then(res => {
+					if (this.id) {
+						this.$http.post('/user/updateUserInfo1/' + this.id, {
+							esmUserImageVo: this.personData.esmUserImageVo,
+							sysUser: this.personData,
+							sysUserInfo: this.personData,
+						}).then(res => {
+							if (res.code == 200) {
+								let obj = JSON.stringify({
+									id: this.id,
+									mobile: this.personData.mobile
+								});
+								uni.redirectTo({
+									url: "/pages/index/success?data=" + obj
+								})
+							} else {
+								uni.showModal({
+									showCancel: false,
+									title: res.msg
+								})
+							}
 						})
-						}
-						else{
-							uni.showModal({
-								showCancel: false,
-								title: res.msg
-							})
-						}
-					})
-				}else{
-					this.$http.post('/user/saveUserInfoByPartner', {
-						isPartner:"1",
-						sysUser:{...this.personData,roleId:"22",referrerId:this.userId,level:this.level,type:1},
-						esmUserImageVo:this.personData.esmUserImageVo
-					}).then(res=>{
-						if(res.code==200){
-							let obj = JSON.stringify({id:res.data.id,mobile:res.data.mobile});
-							uni.redirectTo({
-								url: "/pages/index/success?data="+obj
-							})
-						}
-						else{
-							uni.showModal({
-								showCancel: false,
-								title: res.msg
-							})
-						}
+					} else {
+						this.$http.post('/user/newSaveUserInfoByPartner', {
+							sysUser: {
+								...this.personData,
+								roleId: "97",
+								referrerId: this.userInfo.sysUser.userId,
+								grade: this.grade,
+							},
+							esmUserImageVo: this.personData.esmUserImageVo
+						}).then(res => {
+							if (res.code == 200) {
+								let obj = JSON.stringify({
+									id: res.data.id,
+									mobile: res.data.mobile
+								});
+								uni.redirectTo({
+									url: "/pages/index/success?data=" + obj
+								})
+							} else {
+								uni.showModal({
+									showCancel: false,
+									title: res.msg
+								})
+							}
+						})
+					}
+				}).catch(err => {
+					console.log('err', err);
+				})
+			},
+			async userfrontChange() {
+				let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
+					count: 1,
+					sizeType: ['compressed']
+				});
+
+				let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
+				if (!size) {
+					this.$refs.uToast.show({
+						title: '上传图片大小不能超过 5MB!',
+						type: 'error',
 					})
+					return false
 				}
-			}).catch(err => {
-				console.log('err', err);
-			})
-		},
-		async userfrontChange() {
-			let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
-				count: 1,
-				sizeType: ['compressed']
-			});
-		
-			let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
-			if (!size) {
-				this.$refs.uToast.show({
-					title: '上传图片大小不能超过 5MB!',
-					type: 'error',
-				})
-				return false
-			}
-			if (chooseImageRes) {
-				this.userfrontImg = chooseImageRes.tempFilePaths[0];
-				uni.uploadFile({
-					url: this.$base.baseUrl + '/ins/taskImage/uploadFileByPartner',
-					filePath: chooseImageRes.tempFilePaths[0],
-					name: "multipartFile",
-					formData: {
-						'type': 'image',
-					},
-					// header: {
-					// 	Authorization: store.state.token,
-					// },
-					success: (imgRes) => {
-						let data = JSON.parse(imgRes.data);
-						if (data.code == '200') {
-							// this.personData.esmUserImageVo[0]=data.data
-							this.personData.esmUserImageVo.push(
-								{
-								imageId: data.data.id,
-            					type: "SFZ_01",
+				if (chooseImageRes) {
+					this.userfrontImg = chooseImageRes.tempFilePaths[0];
+					uni.uploadFile({
+						url: this.$base.baseUrl + '/ins/taskImage/uploadFileByPartner',
+						filePath: chooseImageRes.tempFilePaths[0],
+						name: "multipartFile",
+						formData: {
+							'type': 'image',
+						},
+						// header: {
+						// 	Authorization: store.state.token,
+						// },
+						success: (imgRes) => {
+							let data = JSON.parse(imgRes.data);
+							if (data.code == '200') {
+								if (this.personData.esmUserImageVo.some(v => v.type == 'SFZ_01')) {
+									this.personData.esmUserImageVo.map(val => {
+										if (val.imageType == 'SFZ_01') {
+											val.imageId = data.data.id;
+										}
+									})
+								} else {
+									this.personData.esmUserImageVo.push({
+										imageId: data.data.id,
+										type: "SFZ_01",
+									})
+								}
+
 							}
-							)
+
 						}
-		
-					}
+					});
+				}
+			},
+			async userbackChange() {
+				let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
+					count: 1,
+					sizeType: ['compressed']
 				});
-			} 
-		},
-		async userbackChange() {
-			let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
-				count: 1,
-				sizeType: ['compressed']
-			});
-			let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
-			if (!size) {
-				this.$refs.uToast.show({
-					title: '上传图片大小不能超过 5MB!',
-					type: 'error',
-				})
-				return false
-			}
-			if (chooseImageRes) {
-				this.userbackImg = chooseImageRes.tempFilePaths[0];
-				uni.uploadFile({
-					url: this.$base.baseUrl + '/ins/taskImage/uploadFileByPartner',
-					filePath: chooseImageRes.tempFilePaths[0],
-					name: "multipartFile",
-					formData: {
-						'type': 'image',
-					},
-					// header: {
-					// 	Authorization: store.state.token,
-					// },
-					success: (imgRes) => {
-						let data = JSON.parse(imgRes.data);
-						if (data.code == '200') {
-							this.personData.esmUserImageVo.push(
-								{
-								imageId: data.data.id,
-            					type: "SFZ_02",
+				let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
+				if (!size) {
+					this.$refs.uToast.show({
+						title: '上传图片大小不能超过 5MB!',
+						type: 'error',
+					})
+					return false
+				}
+				if (chooseImageRes) {
+					this.userbackImg = chooseImageRes.tempFilePaths[0];
+					uni.uploadFile({
+						url: this.$base.baseUrl + '/ins/taskImage/uploadFileByPartner',
+						filePath: chooseImageRes.tempFilePaths[0],
+						name: "multipartFile",
+						formData: {
+							'type': 'image',
+						},
+						// header: {
+						// 	Authorization: store.state.token,
+						// },
+						success: (imgRes) => {
+							let data = JSON.parse(imgRes.data);
+							if (data.code == '200') {
+								if (this.personData.esmUserImageVo.some(v => v.type == 'SFZ_02')) {
+									this.personData.esmUserImageVo.map(val => {
+										if (val.imageType == 'SFZ_02') {
+											val.imageId = data.data.id;
+										}
+									})
+								} else {
+									this.personData.esmUserImageVo.push({
+										imageId: data.data.id,
+										type: "SFZ_02",
+									})
+								}
 							}
-							)
-							// this.personData.esmUserImageVo[1]=data.data
+
 						}
-		
-					}
-				});
-			} 
+					});
+				}
+			},
 		},
-	},
 	}
 </script>
 
@@ -307,28 +287,32 @@
 		padding: 130px 15px 0 15px;
 		// padding: 200px 16px 15px 16px;
 	}
-	.box-con{
+
+	.box-con {
 		background: #FFFFFF;
 		padding: 10px 15px;
 		border-radius: 5px 5px 5px 5px;
 	}
-	.userBox{
+
+	.userBox {
 		border-radius: 5px 5px 5px 5px;
-		margin:10px 15px;
+		margin: 10px 15px;
 		padding: 10px 15px;
 		background: #fff;
 		font-size: 15px;
 		color: #666666;
+
 		.imgOcr-border {
 			// position: relative;
 			width: 48%;
 			text-align: center;
+
 			image {
 				display: inline-block;
 				height: 95px;
 				width: 100%;
 			}
-			
+
 			// .del_btn {
 			// 	position: absolute;
 			// 	cursor: pointer;
@@ -342,13 +326,14 @@
 			// }
 		}
 	}
-	.submit{
+
+	.submit {
 		margin: 15px;
 		text-align: center;
 		color: #fff;
 		height: 46px;
 		line-height: 46px;
-		background: linear-gradient( 133deg, #2DD9FF 0%, #2D6DFF 100%);
+		background: linear-gradient(133deg, #2DD9FF 0%, #2D6DFF 100%);
 		border-radius: 31px 31px 31px 31px;
 	}
 </style>

+ 0 - 434
pages/index/applystudio.vue

@@ -1,434 +0,0 @@
-<template>
-	<view>
-		<public-module></public-module>
-		
-		<view class="box"  :style="{background:`url(${indexBackgroundImage})`,backgroundSize: 'contain',backgroundRepeat: 'no-repeat'}">
-		<view class="box-con">
-			<uni-forms  :value="personData" ref="personData" validate-trigger="bind"
-				 err-show-type="toast" label-width="100" :rules="rules" >
-				<uni-forms-item label="姓名" name="name" required >
-					<input class="uni-input-input textColor" placeholder="输入姓名" v-model="personData.name"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="手机号" required  name="mobile">
-					<input class="uni-input-input textColor"  maxlength="11"  placeholder="输入手机号" v-model="personData.mobile"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="证件号" required  name="identity">
-					<input class="uni-input-input textColor" placeholder="输入证件号" v-model="personData.identity"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="密码" required  name="password">
-					<input class="uni-input-input textColor" placeholder="输入密码" v-model="personData.password"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="地址" required  name="address">
-					<input class="uni-input-input textColor" placeholder="输入地址" v-model="personData.address"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-			</uni-forms>
-		</view>
-		</view>
-		<!-- <view class="box-con" style="margin-top:10px">
-			<uni-forms :rules="carRules" :value="personData" ref="personData" validate-trigger="bind"
-				 err-show-type="toast" label-width="100">
-				<uni-forms-item label="开户行">
-					<input class="uni-input-input textColor" placeholder="输入开户行" v-model="personData.bankName"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<uni-forms-item label="开户账号">
-					<input class="uni-input-input textColor" placeholder="输入开户账号" v-model="personData.accountno"
-						placeholder-style="font-size:28upx"  />
-				</uni-forms-item>
-				<view >
-					<view>银行卡照片</view>
-					<view class="dis j-c" >
-						<image style="height: 95px;width: 150px;padding: 10px 0;" :src=" userfrontImg?userfrontImg:'/static/image/my/yinhangka.png'" mode=""
-							@click="userfrontChange"></image>
-					</view>
-				</view>
-			</uni-forms>
-		</view> -->
-		<view class="userBox" style="margin-top:10px">
-			<text>身份证件照</text>
-			<view class="dis j-s" style="margin: 10px 0;">
-				<view class="imgOcr-border">
-					<image :src=" userfrontImg?userfrontImg:'/static/image/my/shenfenzz.png'" mode=""
-						@click="userfrontChange"></image>
-					<view>人像面</view>
-				</view>
-				<view class="imgOcr-border">
-					<image :src="userbackImg?userbackImg:'/static/image/my/shenzf.png'" mode=""
-						@click="userbackChange"></image>
-						<view>国徽面</view>
-				</view>
-			</view>
-		</view>
-		<!-- <view class="userBox">
-			<uni-forms :rules="carRules" :value="personData" ref="personData" validate-trigger="bind"
-				 err-show-type="toast" label-width="100">
-				<uni-forms-item label="选择来源" required  name="deptSourceName">
-					<u-input v-model="personData.deptSourceName" type="select" :select-open="energyTypeShow"
-						@click="energyTypeShow = true" :custom-style="{textAlign:'right'}"
-						placeholder-style="color:#808080" placeholder="请选择来源" />
-					<u-select mode="single-column" :list="energyTypeoptions" v-model="energyTypeShow"
-						label-name="lable" value-name="value"
-						@confirm="dictionaryConfirm($event)"></u-select>
-				</uni-forms-item>
-				<uni-forms-item label="机构类型" required  name="deptName">
-					<u-input v-model="personData.deptName" type="select" :select-open="deptShow"
-						@click="deptShow = true" :custom-style="{textAlign:'right'}"
-						placeholder-style="color:#808080" placeholder="请选择机构类型" />
-					<u-select mode="single-column" :list="deptoptions" v-model="deptShow"
-						label-name="lable" value-name="value"
-						@confirm="deptConfirm($event)"></u-select>
-				</uni-forms-item>
-			</uni-forms>
-		</view> -->
-		<!-- <view class="userBox">
-			<u-checkbox v-model="checked"></u-checkbox>
-			<text>同时创建我的团队</text>
-		</view> -->
-		<view class="submit" @click="submit('personData')">
-			提交
-		</view>
-	</view>
-</template>
-
-<script>
-	// import {
-	// 	mapState,
-	// 	mapMutations
-	// } from "vuex"
-	// import store from '@/store';
-	import indexBackgroundImage from "@/static/shenqing.png"
-	export default {
-		// computed: {
-		// 	...mapState(['userInfo' ]),
-		// },
-		data(){
-			return {
-				indexBackgroundImage:indexBackgroundImage,
-				rules: {
-					name:{
-						rules: [{
-							required: true,
-							errorMessage: '姓名不能为空'
-						}]
-					},
-					mobile:{
-						rules: [{
-							required: true,
-							errorMessage: '请输入手机号',
-						},
-						{
-							pattern: /^1[3-9]\d{9}$/,
-							errorMessage: '请输入正确的手机号',
-						}]
-					},
-					identity:{
-						rules: [{
-							required: true,
-							errorMessage: '请输入身份证号',
-						},
-						{
-							pattern: /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/,
-							errorMessage: '请输入正确的身份证号',
-						}]
-					},
-					password:{
-						rules: [{
-							required: true,
-							errorMessage: '请输入密码'
-						}]
-					},
-					address:{
-						rules: [{
-							required: true,
-							errorMessage: '请输入地址',
-						}]
-					},
-				},
-				energyTypeShow:false,
-				deptShow:false,
-				deptoptions:[
-					{
-						lable:'股份',
-						value:'gufen'
-					},{
-						lable:'直营',
-						value:'dir'
-					},{
-						lable:'加盟',
-						value:'jiameng'
-					}],
-				energyTypeoptions:[
-					{
-						lable:'渠道',
-						value:'1'
-					},{
-						lable:'个代',
-						value:'2'
-					}],
-				checked:false,
-				userfrontImg: "",
-				userbackImg: "",
-				personData:{
-					name:'',
-					mobile:'',
-					identity:'',
-					password:'',
-					address:'',
-					esmUserImageVo:[]
-				},
-				
-				deptSource:'',
-				userId:''
-			}
-	},
-	async onLoad(e) {
-		this.deptSource=e.deptSource?e.deptSource:''
-		this.userId=e.userId?e.userId:''
-		if(e.id){
-			this.id=e.id
-			this.$http.get('/user/' +e.id).then(res=>{
-				if(res.code==200){
-					this.personData={...res.data.sysUser,esmUserImageVo:[]}
-					this.personData.password = ''
-				}
-				else{
-					uni.showModal({
-						showCancel: false,
-						title: res.msg
-					})
-				}
-			})
-		}
-	},
-
-	methods:{
-		submit(){
-			this.$refs.personData.validate().then(res => {
-				if(this.id){
-					this.$http.post('/user/updateUserInfo1/' +this.id, {
-						 esmUserImageVo: this.personData.esmUserImageVo,
-						 sysUser: this.personData,
-						 sysUserInfo:this.personData,
-					}).then(res=>{
-						if(res.code==200){
-							// let obj = JSON.stringify({id:res.data.id,mobile:res.data.mobile});
-							let obj = JSON.stringify({id:this.id,mobile:this.personData.mobile});
-							uni.redirectTo({
-								url: "/pages/index/success?data="+obj
-							})
-						}
-						else{
-							uni.showModal({
-								showCancel: false,
-								title: res.msg
-							})
-						}
-					})
-				}else{
-					this.$http.post('/user/saveUserInfoByPartner', {
-						isPartner:"1",
-						sysUser:{...this.personData,roleId:"22",referrerId:this.userId,type:2,deptSource:this.deptSource},
-						esmUserImageVo:this.personData.esmUserImageVo
-					}).then(res=>{
-						if(res.code==200){
-							let obj = JSON.stringify({id:res.data.id,mobile:res.data.mobile});
-							uni.redirectTo({
-								url: "/pages/index/success?data="+obj
-							})
-						}
-						else{
-							uni.showModal({
-								showCancel: false,
-								title: res.msg
-							})
-						}
-					})
-				}
-				
-			}).catch(err => {
-				console.log('err', err);
-			})
-		},
-		//  submit(){
-		// 	 uni.redirectTo({
-		// 	 	url: "/pages/index/result?key="+encodeURIComponent(JSON.stringify({status:2}))
-		// 	 	// url: "/pages/index/result?status=1&remark=111"
-		// 	 })
-		// 	// this.$refs.personData.validate().then(res => {
-		// 		this.$refs.baseForm.submit().then(res => {
-		// 			this.$http.post('/user/saveUserInfo', {
-		// 				isPartner:"1",
-		// 				sysUser:{...this.personData,roleId:"22",referrerId:this.userInfo.sysUser.userId,type:2,deptSource:this.deptSource},
-		// 				esmUserImageVo:this.personData.esmUserImageVo
-		// 			}).then(res=>{
-		// 				if(res.code==200){
-		// 					uni.redirectTo({
-		// 						url: "/pages/index/result?key="+encodeURIComponent(JSON.stringify({status:1}))
-		// 					})
-		// 				}
-		// 				else{
-		// 					uni.showModal({
-		// 						showCancel: false,
-		// 						title: res.msg
-		// 					})
-		// 					// uni.showToast({
-		// 					// 	title: res.msg
-		// 					// })
-		// 				}
-		// 			})
-				
-		// 		// if (data.code == '200') {
-		// 		// }
-		// 	}).catch(err => {
-		// 		console.log('err', err);
-		// 	})
-		// },
-		dictionaryConfirm(val){
-			this.personData.deptSourceName=val[0].label
-			this.personData.deptSource=val[0].value
-		},
-		deptConfirm(val){
-			this.personData.deptName=val[0].label
-			this.personData.deptType=val[0].value
-		},
-		async userfrontChange() {
-			// this.personData.esmUserImageVo[0]={}
-			let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
-				count: 1,
-				sizeType: ['compressed']
-			});
-		
-			let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
-			if (!size) {
-				this.$refs.uToast.show({
-					title: '上传图片大小不能超过 5MB!',
-					type: 'error',
-				})
-				return false
-			}
-			if (chooseImageRes) {
-				this.userfrontImg = chooseImageRes.tempFilePaths[0];
-				uni.uploadFile({
-					url: this.$base.baseUrl + '/ins/taskImage/uploadFileByPartner',
-					filePath: chooseImageRes.tempFilePaths[0],
-					name: "multipartFile",
-					formData: {
-						'type': 'image',
-					},
-					// header: {
-					// 	Authorization: store.state.token,
-					// },
-					success: (imgRes) => {
-						let data = JSON.parse(imgRes.data);
-						if (data.code == '200') {
-							this.personData.esmUserImageVo.push(
-								{
-								imageId: data.data.id,
-            					type: "SFZ_01",
-							}
-							)
-							// this.personData.esmUserImageVo[0]={
-							// 	imageId: data.data.id,
-            				// 	type: "SFZ_01",
-							// }
-						}
-		
-					}
-				});
-			} 
-		},
-		async userbackChange() {
-			// this.personData.esmUserImageVo[1]={}
-			let [chooseImageErr, chooseImageRes] = await uni.chooseImage({
-				count: 1,
-				sizeType: ['compressed']
-			});
-			let size = chooseImageRes.tempFiles[0].size / 1024 / 1024 < 5;
-			if (!size) {
-				this.$refs.uToast.show({
-					title: '上传图片大小不能超过 5MB!',
-					type: 'error',
-				})
-				return false
-			}
-			if (chooseImageRes) {
-				this.userbackImg = chooseImageRes.tempFilePaths[0];
-				uni.uploadFile({
-					url: this.$base.baseUrl + '/ins/taskImage/uploadFileByPartner',
-					filePath: chooseImageRes.tempFilePaths[0],
-					name: "multipartFile",
-					formData: {
-						'type': 'image',
-					},
-					// header: {
-					// 	Authorization: store.state.token,
-					// },
-					success: (imgRes) => {
-						let data = JSON.parse(imgRes.data);
-						if (data.code == '200') {
-							// this.personData.esmUserImageVo[1]=data.data
-							this.personData.esmUserImageVo.push(
-								{
-								imageId: data.data.id,
-            					type: "SFZ_02",
-							}
-							)
-						}
-		
-					}
-				});
-			} 
-		},
-	},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.box {
-		height: 330px;
-		width: 100%;
-		// background-repeat: no-repeat;
-		// background: #F9F9F9;
-		// background: url(/static/shenqing.png) no-repeat;
-		// background-size: contain;
-		padding: 130px 15px 0 15px;
-		// padding: 200px 16px 15px 16px;
-	}
-	.box-con{
-		background: #FFFFFF;
-		padding: 10px 15px;
-		border-radius: 5px 5px 5px 5px;
-	}
-	.userBox{
-		border-radius: 5px 5px 5px 5px;
-		margin:10px 15px;
-		padding: 10px 15px;
-		background: #fff;
-		font-size: 15px;
-		color: #666666;
-		.imgOcr-border {
-			// position: relative;
-			width: 48%;
-			text-align: center;
-			image {
-				display: inline-block;
-				height: 95px;
-				width: 100%;
-			}
-		}
-	}
-	.submit{
-		margin: 15px;
-		text-align: center;
-		color: #fff;
-		height: 46px;
-		line-height: 46px;
-		background: linear-gradient( 133deg, #2DD9FF 0%, #2D6DFF 100%);
-		border-radius: 31px 31px 31px 31px;
-	}
-</style>

+ 164 - 88
pages/index/index.vue

@@ -19,54 +19,152 @@
 				<image src="/static/home/icon2.png" class="image2" mode=""></image>
 				<view class="data dis f-wrap j-s">
 					<view class="dis f-c a-start view">
-						<text>3213213</text>
+						<text>{{numberFormat(todayOverview.addPerNumber || 0) }}</text>
 						<text>订单(笔)</text>
 					</view>
 					<view class="dis f-c a-start view">
-						<text>3213213</text>
+						<text>{{numberFormat(todayOverview.commission || 0) }}</text>
 						<text>新增人员</text>
 					</view>
 					<view class="dis f-c a-start view">
-						<text>3213213</text>
+						<text>{{numberFormat(todayOverview.numberOrders || 0)}}</text>
 						<text>保费(元)</text>
 					</view>
 					<view class="dis f-c a-start view">
-						<text>3213213</text>
+						<text>{{numberFormat(todayOverview.premium || 0 ) }}</text>
 						<text>佣金(元)</text>
 					</view>
 				</view>
 			</view>
 			<view class="statistics">
-				<u-tabs :list="list" :is-scroll="true" active-color="#333" inactive-color="#999" :current="current"
-					@change="change" style="background: transparent;border-bottom: 1rpx solid #EEEEEE;"></u-tabs>
+				<u-tabs :list="teamOverview" :is-scroll="true" name="gradeName" active-color="#333"
+					inactive-color="#999" :current="current" @change="change"
+					style="background: transparent;border-bottom: 1rpx solid #EEEEEE;"></u-tabs>
 				<view class="count">
-					<image src="/static/home/icon4.png" class="mb-2" mode="" @click="invitationCode"></image>
-					<view class="data dis f-wrap j-s mb-3">
-						<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;" @click="closePartner">
-							<text>22</text>
-							<text>我的管理人</text>
+					<template v-if="teamOverviewInfo.grade==1">
+						<image src="/static/home/icon4.png" class="mb-2" mode=""
+							@click="invitationCode(teamOverviewInfo.grade)">
+						</image>
+						<view class="data dis f-wrap j-s mb-3">
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="closePartner">
+								<text>{{teamOverviewInfo.vo1.v1}}</text>
+								<text>我的管理人</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo1.v2}}</text>
+								<text>管理人的合伙人</text>
+							</view>
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="todayclosePartner">
+								<text>{{teamOverviewInfo.vo1.v3}}</text>
+								<text>我今日新增管理人</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo1.v4}}</text>
+								<text>今日管理人邀请的合伙人</text>
+							</view>
 						</view>
-						<view class="dis f-c a-c view">
-							<text>22</text>
-							<text>管理人的工作室</text>
+					</template>
+					<template v-if="teamOverviewInfo.grade==2 ">
+						<image src="/static/home/icon5.png" class="mb-2" mode=""
+							@click="invitationCode(teamOverviewInfo.grade)">
+						</image>
+						<view class="data dis f-wrap j-s mb-3">
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="closePartner">
+								<text>{{teamOverviewInfo.vo2.v1}}</text>
+								<text>我的合伙人</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo2.v2}}</text>
+								<text>合伙人的工作室</text>
+							</view>
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="todayclosePartner">
+								<text>{{teamOverviewInfo.vo2.v3}}</text>
+								<text>我今日新增合伙人</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo2.v4}}</text>
+								<text>今日合伙人邀请的工作室</text>
+							</view>
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
+								<text>{{teamOverviewInfo.vo2.v5}}</text>
+								<text>今日保费</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo2.v6}}</text>
+								<text>今日佣金</text>
+							</view>
 						</view>
-						<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
-							<text>22</text>
-							<text>我今日新增合伙人</text>
+					</template>
+					<template v-if="teamOverviewInfo.grade==3 ">
+						<image src="/static/home/icon6.png" class="mb-2" mode=""
+							@click="invitationCode(teamOverviewInfo.grade)">
+						</image>
+						<view class="data dis f-wrap j-s mb-3">
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="closePartner">
+								<text>{{teamOverviewInfo.vo3.v1}}</text>
+								<text>我的工作室</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo3.v2}}</text>
+								<text>工作室下的业务团队</text>
+							</view>
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="todayclosePartner">
+								<text>{{teamOverviewInfo.vo3.v3}}</text>
+								<text>我今日新增工作室</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo3.v4}}</text>
+								<text>今日工作室邀请的团队</text>
+							</view>
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
+								<text>{{teamOverviewInfo.vo3.v5}}</text>
+								<text>今日保费</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo3.v6}}</text>
+								<text>今日佣金</text>
+							</view>
 						</view>
-						<view class="dis f-c a-c view">
-							<text>22</text>
-							<text>今日管理人邀请的工作室</text>
+					</template>
+					<template v-if="teamOverviewInfo.grade==4 ">
+						<image src="/static/home/icon7.png" class="mb-2" mode=""
+							@click="invitationCode(teamOverviewInfo.grade)">
+						</image>
+						<view class="data dis f-wrap j-s mb-3">
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="closePartner">
+								<text>{{teamOverviewInfo.vo4.v1}}</text>
+								<text>我的团队</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo4.v2}}</text>
+								<text>代理人人数</text>
+							</view>
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
+								@click="todayclosePartner">
+								<text>{{teamOverviewInfo.vo4.v3}}</text>
+								<text>我今日新增团队</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo4.v4}}</text>
+								<text>今日新增代理人</text>
+							</view>
+							<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
+								<text>{{teamOverviewInfo.vo4.v5}}</text>
+								<text>今日保费</text>
+							</view>
+							<view class="dis f-c a-c view">
+								<text>{{teamOverviewInfo.vo4.v6}}</text>
+								<text>今日佣金</text>
+							</view>
 						</view>
-						<view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
-							<text>22</text>
-							<text>今日保费</text>
-						</view>
-						<view class="dis f-c a-c view">
-							<text>22</text>
-							<text>今日佣金</text>
-						</view>
-					</view>
+					</template>
 					<view class="earnings dis a-c j-s " @click="myEarnings">
 						<view class="dis a-c ">
 							<image src="/static/home/wallet.png" mode=""></image>
@@ -99,7 +197,9 @@
 		},
 		data() {
 			return {
-				list: [{
+				teamOverviewInfo: {}, //页面展示数据
+				todayOverview: {}, //今日数据
+				teamOverview: [{
 						name: '我是创始人'
 					}, {
 						name: '我是管理人'
@@ -157,8 +257,16 @@
 			// }
 
 		},
+
 		methods: {
+			//数据格式化
+			numberFormat(value) {
+				return (value).toLocaleString('en-US');
+			},
 			change(index) {
+				const info = this.teamOverview[index];
+				console.log(info);
+				this.teamOverviewInfo = info;
 				this.current = index;
 			},
 			async getList(beginTime, endTime) {
@@ -167,9 +275,15 @@
 					"endTime": endTime || '',
 					"beginTime": beginTime || '',
 				}
-				let res = await this.$http.post('/APPPartner/getHomePage', params);
+				let res = await this.$http.post('/newAppPartner/getHomePage', params); //统计数据
 				if (res.code == '200') {
-					this.totalList = res.data
+					this.todayOverview = res.data.todayOverview; //今日数据
+					this.teamOverview = res.data.teamOverview; //选项卡
+					this.teamOverview.map(val => {
+						val.gradeName = "我是" + val.gradeName;
+						return val;
+					})
+					this.teamOverviewInfo = res.data.teamOverview[0]; //页面赋值第一条数据
 				}
 			},
 			searchPopup() {
@@ -185,60 +299,34 @@
 				this.showData = val
 				this.getList(dateStr, dateStr1)
 			},
-			styleChange(e) {
-				this.deptSource = e.detail.value
-			},
+
 			recruitmentCode() {
 				this.ShowModalCode = true
-				this.teamImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applyteam?userId=" + this.userInfo
+				this.teamImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applyteam?userId=" +
+					this.userInfo
 					.sysUser.userId, {
 						size: parseInt(200) //二维码大小  
 					})
 			},
 			ShowModalCodeSumbit() {
-				console.log(this.deptSource, 44444444);
-				this.ShowModalCode1 = true
-				this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" + this
+				this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl +
+					"/#/pages/index/applystudio?deptSource=" + this
 					.deptSource + '&userId=' + this.userInfo.sysUser.userId, {
 						size: parseInt(200) //二维码大小  
 					})
 			},
-			recruitmentWorkCode() {
-				this.ShowModalCodebusiness = true
-				this.deptSource = 1
-
-			},
-			detail(id) {
-				uni.navigateTo({
-					url: "/pages/institutional/walletDetail?id=" + id
-				})
-			},
-			closeDetailPro(val) {
-				uni.navigateTo({
-					url: `/pages/institutional/detail?deptId=${val.deptId}&deptName=${val.deptName}&startTime=${val.startTime}`
-				})
-			},
-
-			closeInstitution() {
-				// if(this.totalList.workroomNum>0){
-
-				// }
-				// this.totalList.type=1
-				uni.navigateTo({
-					url: "/pages/institutional/institutionalTeam?key=" + encodeURIComponent(JSON.stringify(this
-						.totalList))
-				})
-			},
-			closeStudion() {
+			//人员列表
+			closePartner() {
 				uni.navigateTo({
-					url: "/pages/institutional/institutional?key=" + encodeURIComponent(JSON.stringify(this
-						.totalList))
+					url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade,
 				})
 			},
-			//人员详情
-			closePartner() {
+			//今日人员
+			todayclosePartner() {
+				let dotayDate = new Date().toISOString().split('T')[0] //今日日期
 				uni.navigateTo({
-					url: "/pages/institutional/partner"
+					url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade + '&startTime=' +
+						dotayDate + '&endTime=' + dotayDate,
 				})
 			},
 			//我的收益
@@ -248,24 +336,12 @@
 				})
 			},
 			//邀请码
-			invitationCode() {
-				uni.navigateTo({
-					url: "/pages/institutional/invitationCode"
-				})
-			},
-			viewTeam() {
-				uni.navigateTo({
-					url: "/pages/institutional/institutional"
-				})
-			},
-			bankCard() {
-				uni.navigateTo({
-					url: "/pages/wallet/bankCard"
-				})
-			},
-			bankwallet() {
+			invitationCode(value) {
+				// uni.navigateTo({
+				// 	url: "/pages/institutional/invitationCode?grade=" + value,
+				// })
 				uni.navigateTo({
-					url: "/pages/index/applystudio"
+					url: "/pages/index/applypartner?grade=" + value,
 				})
 			},
 		}

+ 24 - 9
pages/institutional/invitationCode.vue

@@ -51,24 +51,33 @@
 </template>
 
 <script>
-	import {
-		mapState
-	} from "vuex"
 	import {
 		pathToBase64,
 		base64ToPath
 	} from '@/common/pdf.js'
 	import QR from "@/common/wxqrcode.js"
+	import {
+		mapState,
+		mapMutations
+	} from "vuex"
 	export default {
 		data() {
 			return {
 				recommendImg: "", //邀请码
+				grade: "", //等级
 			}
 		},
 		onShow() {
 
 		},
-		onLoad() {
+		computed: {
+			...mapState(['userInfo', "userCheckInfo"]),
+		},
+		onLoad(options) {
+			if (options) {
+				this.grade = options.grade;
+			}
+			console.log(options);
 			this.recommendCode();
 		},
 		methods: {
@@ -78,12 +87,18 @@
 					url: '/pages/institutional/applicationResult'
 				})
 			},
-			//二维码生成
+			//邀请二维码生成
 			recommendCode() {
-				this.recommendImg = QR.createQrCodeImg("/#/pages/register/register?id=", {
-					size: parseInt(300) //二维码大小  
-				})
-				// this.recommendUrl = this.$base.h5BaseUrl + "/#/pages/register/register?id=" ;
+				// this.recommendImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" +
+				// 	this
+				// 	.deptSource + '&userId=' + this.userInfo.sysUser.userId, {
+				// 		size: parseInt(200) //二维码大小  
+				// 	})
+				this.recommendImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applypartner?grade=" +
+					this
+					.grade, {
+						size: parseInt(200) //二维码大小  
+					})
 			},
 			back() {
 				uni.navigateBack({

+ 26 - 81
pages/institutional/partner.vue

@@ -6,8 +6,8 @@
 		<view class="headers dis a-c j-start">
 			<u-icon name="arrow-left" color="#333" size="38" @click="back"></u-icon>
 			<view class="headers-activeTab">
-				<u-tabs :list="list" :is-scroll="true" active-color="#333" inactive-color="#999" :current="current"
-					:show-bar="false" @change="change"
+				<u-tabs :list="tablist" :is-scroll="true" active-color="#333" inactive-color="#999" :current="current"
+					:show-bar="false" @change="change" name="gradeName"
 					style="background: transparent;height: 80rpx;z-index: -1;"></u-tabs>
 			</view>
 			<view class="right dis a-c">
@@ -27,27 +27,27 @@
 			共有 5 笔订单,保费54252.25元,佣金569.35元
 		</view>
 		<view class="body p-2" style="padding-top: 340rpx;">
-			<view class="card mb-2" v-for="i in 10" :key="i" @click="partnerDetail">
+			<view class="card mb-2" v-for="(item,index) in personlist" :key="index" @click="partnerDetail">
 				<view class="card-title dis a-c j-s mb-2">
 					<view class="dis a-c ">
 						<view class="avatar">
 							<image src="/static/image/my/wuxingb.png" mode=""></image>
 						</view>
-						<text class="name ml-1">ZhangXiLin</text>
+						<text class="name ml-1">{{item.userName}}</text>
 					</view>
-					<text>2025.05.21 12:00:59 出单</text>
+					<text>{{item.createTime}} &nbsp;加入</text>
 				</view>
 				<view class="card-data dis a-c j-s ">
 					<view class="view dis f-c a-c ">
-						<text>wangxiaoyu</text>
-						<text>代理人</text>
+						<text>{{item.number}}</text>
+						<text>{{item.gradeName}}</text>
 					</view>
 					<view class="view dis f-c a-c ">
-						<text>22,552.87</text>
+						<text>{{numberFormat(item.premium || 0 )}}</text>
 						<text>保费</text>
 					</view>
 					<view class="view dis f-c a-c ">
-						<text>152.87</text>
+						<text>{{numberFormat(item.commission || 0 )}}</text>
 						<text>我的佣金</text>
 					</view>
 				</view>
@@ -68,7 +68,6 @@
 				</view>
 			</view>
 		</u-popup>
-
 		<u-popup v-model="ShowModalCodebusiness" mode="bottom" border-radius="15">
 			<view>
 				<text class=" ShowModalCode-business">工作室业务</text>
@@ -95,7 +94,7 @@
 				<text>工作室招募码</text>
 				<view class=" ShowModalCode-con">
 					<view>扫码加入</view>
-					<image :src="workImg" mode="widthFix" lazy-load style="width: 150px;"></image>
+					<image :src="workImg" mode="widthFix" lazy-load style="width:150px;"></image>
 				</view>
 			</view>
 		</u-popup>
@@ -128,18 +127,8 @@
 		data() {
 			return {
 				//tab选项
-				list: [{
-						name: '我是创始人'
-					}, {
-						name: '我是管理人'
-					},
-					{
-						name: '我是合伙人'
-					},
-					{
-						name: '我是工作室'
-					}
-				],
+				tablist: [], //动态tab
+				personlist: [],
 				current: 0,
 				dialogContent: '',
 				ShowalertDialog: false,
@@ -189,10 +178,14 @@
 			}
 		},
 		async onLoad(params) {
-			this.queryData()
+			this.queryData(params.grade)
 			this.userLevel = this.userInfo.sysUser.level
 		},
 		methods: {
+			//数据格式化
+			numberFormat(value) {
+				return (value).toLocaleString('en-US');
+			},
 			change(index) {
 				this.current = index;
 			},
@@ -229,14 +222,7 @@
 				this.ShowModalCodebusiness = true
 				this.deptSource = 1
 			},
-			// partnersAndStudios(level){
-			// 	this.level=level
-			// 	this.ShowModal = true
-			// },
-			// recruitment(level) {
-			// 	this.level = level
-			// 	this.ShowModalCodeFun(level)
-			// },
+
 			back() {
 				uni.navigateBack({
 					delta: 1, // 返回的页面数,如果是1表示返回上一页
@@ -263,57 +249,16 @@
 					})
 				}
 			},
-			// onReachBottom() {
-			// 	if (this.pageRequest.pageNum >= this.totalPages) return;
-			// 	this.status = 'loading';
-			// 	this.pageRequest.pageNum = ++this.pageRequest.pageNum;
-			// 	setTimeout(async () => {
-			// 		let res = await this.$http.post('/sysPartner/querySysPartnerAPPPage', {
-			// 			...this.pageRequest,
-			//                      source:this.source
-			// 	});
-			// 		if (res.code == '200') {
-			// 		this.totalSize = res.data.totalSize;
-			// 			this.directLsit = [...this.directLsit, ...res.data.content];
-			// 		}
-			// 		if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
-			// 		else this.status = 'loading';
-			// 	}, 1000)
-			// },
-
-			async queryData(data) {
-				let params = {
-					beginTime: data && data.beginTime || '',
-					endTime: data && data.endTime || '',
-					partnerType: data && data.partnerType || '',
-					industrySector: data && data.industrySector || '',
-					// ...this.pageRequest
-				}
-				let res = await this.$http.post('/APPPartner/info', params);
+			//列表数据
+			async queryData(grade) {
+				let res = await this.$http.get('/newAppPartner/selectByGradeList?grade=' + grade, );
 				if (res.code == '200') {
-					res.data.forEach(e => {
-						switch (e.partnerType) {
-							case 2:
-								this.directLsitOne = e
-								break;
-							case 3:
-								this.directLsitTwo = e
-								break;
-							case 4:
-								this.directLsitThree = e
-								break;
-							case 5:
-								this.directLsitFour = e
-								break;
-							default:
-								break;
-						}
+					this.tablist = res.data; //选项卡
+					this.tablist.map(val => {
+						val.gradeName = "我是" + val.gradeName;
+						return val;
 					})
-					// this.directLsit=res.data
-					// this.totalPages = res.data.totalPages;
-					// this.totalSize = res.data.totalSize;
-					// if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
-					// else this.status = 'loadmore';
+					this.personlist = res.data[0].data; //页面赋值第一条数据
 				}
 			},
 

+ 37 - 9
pages/my/benefits.vue

@@ -4,7 +4,7 @@
 			<view class="dis a-c ">
 				<image :src="backLogo" mode=""></image>
 				<view class="dis f-c title ml-3">
-					<text>创始人</text>
+					<text>{{gradeText}}</text>
 					<text>我的佣金比例</text>
 				</view>
 			</view>
@@ -54,8 +54,8 @@
 					<text class="title">- 各类身份的佣金权益 -</text>
 					<view class="ratio-benefits dis f-c ">
 						<view class=" dis a-c j-s mb-5">
-							<view class="item " v-for="(item,index) in ratioList" :class="{active:index==ratioindex}"
-								:key="index" @click="itemclick(item,index)">
+							<view class="item dis f-c a-c" v-for="(item,index) in ratioList"
+								:class="{active:index==ratioindex}" :key="index" @click="itemclick(item,index)">
 								<image :src="index==ratioindex?item.activeImg:item.img" mode=""></image>
 								<text>{{item.title}}</text>
 							</view>
@@ -101,9 +101,9 @@
 		data() {
 			return {
 				ratiodetailshow: false, //佣金比例弹窗
-				ratioindex: 0,
+				ratioindex: 0, //佣金权益选中下标
 				content: "创始人身份可享受邀请的所有管理人发展的团队成员车险订单的0.1% \n例如:创始人邀请了管理人A,管理人A邀请了合伙人B,合伙人B邀请了工作室C,工作室C邀请了团队D,团队D内的成员出单保费1000元(除车船税),管理人即可获得1000*0.1% = 1元",
-				activeTab: 1,
+				activeTab: 0,
 				backLogo: '', //等级标志
 				tabList: [{
 						label: "身份权益"
@@ -135,14 +135,42 @@
 						activeImg: "/static/image/my/benefits/active4.png",
 						Text: "工作室身份可享受邀请的所有发展的团队成员 车险订单的0.15-0.5%;\n 邀请团队1-3人,为0.1%,\n 邀请团队4-6人,为0.3,\n 邀请团队7人以上,为0.5 \n例如:工作室请了团队A,B,C,达成了0.1%的奖励;工作室邀请了团队A,团队A内的成员出单保费1000元(除车船税),管理人即可获得1000*0.1% = 1元"
 					}
-				]
+				],
+				//角色权益等级匹配列表
+				backLogoList: [{
+						grade: 1,
+						url: "/static/image/my/benefits/active1.png"
+					},
+					{
+						grade: 2,
+						url: "/static/image/my/benefits/active2.png"
+					},
+					{
+						grade: 3,
+						url: "/static/image/my/benefits/active3.png"
+					},
+					{
+						grade: 4,
+						url: "/static/image/my/benefits/active4.png"
+					}
+				],
 			}
 		},
 		computed: {
 			...mapState(['userInfo', "userCheckInfo"]),
+			gradeText() {
+				const gradeMap = {
+					1: '创始人',
+					2: '管理人',
+					3: '合伙人',
+					4: '工作室'
+				}
+				return gradeMap[this.userInfo.sysUser.grade] || ''
+			}
 		},
 		onShow() {
-			this.backLogo = this.userInfo.sysUser.sysPartnerConfig ? this.userInfo.sysUser.sysPartnerConfig.logo : ''
+			this.backLogo = this.backLogoList.find(val => val.grade == this.userInfo.sysUser.grade).url;
+			this.ratioindex = this.userInfo.sysUser.grade - 1;
 		},
 		onLoad() {
 
@@ -181,7 +209,7 @@
 		background-size: 100% 100%;
 
 		image {
-			width: 110rpx;
+			width: 96rpx;
 			height: 110rpx;
 		}
 
@@ -343,7 +371,7 @@
 				color: #999;
 
 				image {
-					width: 82rpx;
+					width: 72rpx;
 					height: 82rpx;
 				}
 			}

+ 55 - 9
pages/my/my.vue

@@ -21,7 +21,8 @@
 
 			</view>
 		</view>
-		<view class="Personnel" :style="{ 'background-image': 'url(' + backImage + ')' }">
+		<image :src="backImage" mode="" style="width: 100%;height: 738rpx;position: absolute;"></image>
+		<view class="Personnel">
 			<view class="Personnel-title" @click="promotionCode">
 				<image src="/static/icon/code.png" mode="">
 				</image>
@@ -53,7 +54,7 @@
 				<view class="dis a-c ">
 					<image :src="backLogo" mode=""></image>
 					<view class="dis f-c title ml-2">
-						<text>创始人权益</text>
+						<text>{{gradeText}}权益</text>
 						<text>多项权益已解锁</text>
 					</view>
 				</view>
@@ -208,18 +209,63 @@
 				workImg: '',
 				pathUrl: '',
 				type: uni.getStorageSync('type'),
-
+				//页面角色背景图匹配列表
+				backImageList: [{
+						grade: 1,
+						url: "/static/image/my/grade1.png"
+					},
+					{
+						grade: 2,
+						url: "/static/image/my/grade2.png"
+					},
+					{
+						grade: 3,
+						url: "/static/image/my/grade3.png"
+					},
+					{
+						grade: 4,
+						url: "/static/image/my/grade4.png"
+					}
+				],
+				//角色权益等级匹配列表
+				backLogoList: [{
+						grade: 1,
+						url: "/static/image/my/benefits/active1.png"
+					},
+					{
+						grade: 2,
+						url: "/static/image/my/benefits/active2.png"
+					},
+					{
+						grade: 3,
+						url: "/static/image/my/benefits/active3.png"
+					},
+					{
+						grade: 4,
+						url: "/static/image/my/benefits/active4.png"
+					}
+				],
 			}
+
 		},
 
 		computed: {
 			...mapState(['userInfo', "userCheckInfo", ]),
+			gradeText() {
+				const gradeMap = {
+					1: '创始人',
+					2: '管理人',
+					3: '合伙人',
+					4: '工作室'
+				}
+				return gradeMap[this.userInfo.sysUser.grade] || ''
+			}
 		},
 
 		async onShow() {
 			// level:0 工作室
-			this.backImage = this.userInfo.sysUser.sysPartnerConfig ? this.userInfo.sysUser.sysPartnerConfig.image : ''
-			this.backLogo = this.userInfo.sysUser.sysPartnerConfig ? this.userInfo.sysUser.sysPartnerConfig.logo : ''
+			this.backImage = this.backImageList.find(val => val.grade == this.userInfo.sysUser.grade).url;
+			this.backLogo = this.backLogoList.find(val => val.grade == this.userInfo.sysUser.grade).url;
 			let res = await this.$http.get('/APPPartner/getFee');
 			if (res.code == 200) {
 				this.getApplication = res.data || [];
@@ -258,7 +304,7 @@
 			// 权益跳转
 			benefitsNavigate() {
 				uni.navigateTo({
-					url: "/pages/my/benefits"
+					url: "/pages/my/benefits?grade=" + this.userInfo.sysUser.grade,
 				})
 			},
 			//修改头像
@@ -642,9 +688,9 @@
 	.Personnel {
 		height: auto;
 		width: 100%;
-		background: #F7F7F7;
+		background: transparent;
 		background-size: 100% 100%;
-		padding: 90px 16px 8px 16px;
+		padding: 90px 30rpx 20rpx 30rpx;
 		position: relative;
 
 	}
@@ -964,7 +1010,7 @@
 		box-sizing: border-box;
 
 		image {
-			width: 82rpx;
+			width: 72rpx;
 			height: 82rpx;
 		}
 

BIN
static/home/icon5.png


BIN
static/home/icon6.png


BIN
static/home/icon7.png


BIN
static/image/my/grade1.png


BIN
static/image/my/grade2.png


BIN
static/image/my/grade3.png


BIN
static/image/my/grade4.png