Parcourir la source

划分三档品牌系

qukaidi il y a 4 ans
Parent
commit
60158b3b71
2 fichiers modifiés avec 30 ajouts et 15 suppressions
  1. 12 12
      pages/home/index.vue
  2. 18 3
      pages/login/register_3.vue

+ 12 - 12
pages/home/index.vue

@@ -117,13 +117,13 @@
 			system() {
 			system() {
 				uni.getSystemInfo({
 				uni.getSystemInfo({
 					success: res => {
 					success: res => {
-						console.log(res.platform);
+						// console.log(res.platform);
 					},
 					},
 					complete: err => {
 					complete: err => {
 						if (err.platform == 'android') {
 						if (err.platform == 'android') {
 							this.onLaunch_s()
 							this.onLaunch_s()
 						} else if (err.platform == 'ios') {
 						} else if (err.platform == 'ios') {
-							console.log("暂无数据")
+							// console.log("暂无数据")
 							this.iosstartup()
 							this.iosstartup()
 						}
 						}
 					}
 					}
@@ -137,14 +137,14 @@
 							osType: 1
 							osType: 1
 						}
 						}
 					}).then(res => {
 					}).then(res => {
-						console.log(res)
-						console.log(res.data.code)
-						console.log(res.data.forceVersion) //最低版本
-						console.log(res.data.msg) //更新文案
-						console.log(res.data.version) //最新版本
+						// console.log(res)
+						// console.log(res.data.code)
+						// console.log(res.data.forceVersion) //最低版本
+						// console.log(res.data.msg) //更新文案
+						// console.log(res.data.version) //最新版本
 
 
 						plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
 						plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
-							console.log(wgtinfo);
+							// console.log(wgtinfo);
 							console.log(wgtinfo.version); //版本号
 							console.log(wgtinfo.version); //版本号
 							if (wgtinfo.version == res.data.version) {
 							if (wgtinfo.version == res.data.version) {
 								this.show_s = true
 								this.show_s = true
@@ -153,9 +153,9 @@
 								// 	title: '已是最新版本',
 								// 	title: '已是最新版本',
 								// 	position: "bottom"
 								// 	position: "bottom"
 								// })
 								// })
-								console.log("已是最新版本")
+								// console.log("已是最新版本")
 							} else if (wgtinfo.version != res.data.forceVersion) {
 							} else if (wgtinfo.version != res.data.forceVersion) {
-								console.log("强制版本更新"+res)
+								// console.log("强制版本更新"+res)
 								res.data.msg = res.data.msg.replace(/\\n/g,"\n")
 								res.data.msg = res.data.msg.replace(/\\n/g,"\n")
 								uni.showModal({
 								uni.showModal({
 									title: "发现新版本",
 									title: "发现新版本",
@@ -164,7 +164,7 @@
 									confirmText: "立即去AppStore更新",
 									confirmText: "立即去AppStore更新",
 									success: function(res) {
 									success: function(res) {
 										if (res.confirm) {
 										if (res.confirm) {
-											console.log('用户点击确定');
+											// console.log('用户点击确定');
 											let appleId = 1518555723
 											let appleId = 1518555723
 											plus.runtime.launchApplication({
 											plus.runtime.launchApplication({
 												action: `itms-apps://itunes.apple.com/cn/app/id${appleId}?mt=8`
 												action: `itms-apps://itunes.apple.com/cn/app/id${appleId}?mt=8`
@@ -305,7 +305,7 @@
 				})
 				})
 			},
 			},
 			inInlineshop() {
 			inInlineshop() {
-				this.$u.toast('线订货暂不开放');
+				this.$u.toast('线订货暂不开放');
 				// this.$u.route({
 				// this.$u.route({
 				// 	url: 'pages/home/inline-shop/inline_shop',
 				// 	url: 'pages/home/inline-shop/inline_shop',
 				// })
 				// })

+ 18 - 3
pages/login/register_3.vue

@@ -157,11 +157,11 @@
 				this.formData = data.formData
 				this.formData = data.formData
 				this.dataUrl = data.dataUrl
 				this.dataUrl = data.dataUrl
 			})
 			})
+			this.getAllbrandlist()
 		},
 		},
 		mounted() {
 		mounted() {
 			this.getAgentArea()
 			this.getAgentArea()
 			this.getTasknum()
 			this.getTasknum()
-			this.getAllbrandlist()
 		},
 		},
 		methods: {
 		methods: {
 			getAgentArea() {
 			getAgentArea() {
@@ -196,6 +196,7 @@
 									taskNum: "",
 									taskNum: "",
 									disabledGroup: false,
 									disabledGroup: false,
 									checked: false,
 									checked: false,
+									seriesCode: ""
 								})
 								})
 							}
 							}
 							return res;
 							return res;
@@ -285,9 +286,15 @@
 				if (item.checked == true) {
 				if (item.checked == true) {
 					this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
 					this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
 						false)
 						false)
+					this.checkedAgentlist.filter(e => (e.seriesCode === item.seriesCode && e.agent_id != item.agent_id)).forEach(e =>
+						e.disabledGroup =
+						false)
 				} else {
 				} else {
 					this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
 					this.checkedAgentlist.filter(e => (e.brand === item.brand && e.agent_id != item.agent_id)).forEach(e => e.disabledGroup =
 						true)
 						true)
+					this.checkedAgentlist.filter(e => (e.seriesCode === item.seriesCode && e.agent_id != item.agent_id)).forEach(e =>
+						e.disabledGroup =
+						true)
 				}
 				}
 			},
 			},
 			clickitem(item, e) {
 			clickitem(item, e) {
@@ -301,7 +308,15 @@
 			getCooperation() {
 			getCooperation() {
 				if (this.cooperations != null) {
 				if (this.cooperations != null) {
 					this.form.cooperation = this.cooperations.toString();
 					this.form.cooperation = this.cooperations.toString();
+					this.allbrandList.map(item => {
+						this.agentList.map(e => {
+							if (e.brand == item.brandCode) {
+								e.seriesCode = item.seriesCode
+							}
+						})
+					})
 					this.checkedAgentlist = this.agentList.filter(item => this.cooperations.indexOf(item.brand) > -1)
 					this.checkedAgentlist = this.agentList.filter(item => this.cooperations.indexOf(item.brand) > -1)
+					console.log(this.checkedAgentlist)
 					this.checkedBrandlist = this.checkedAgentlist.reduce((res, item, index, array) => {
 					this.checkedBrandlist = this.checkedAgentlist.reduce((res, item, index, array) => {
 						res.push(item.brand)
 						res.push(item.brand)
 						return res;
 						return res;
@@ -322,7 +337,7 @@
 				this.$refs.uForm.validate(valid => {
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
 					if (valid) {
 						this.brandAgentLvQueryList = this.checkedAgentlist.filter(item => (item.disabledGroup != true))
 						this.brandAgentLvQueryList = this.checkedAgentlist.filter(item => (item.disabledGroup != true))
-						let checkenLength = this.checkedAgentlist.filter(item => (item.checked == false&&item.disabledGroup==false))
+						let checkenLength = this.checkedAgentlist.filter(item => (item.checked == false && item.disabledGroup == false))
 						if (!this.brandAgentLvQueryList.length) return this.$u.toast('未正确选择经销商,请正确选择');
 						if (!this.brandAgentLvQueryList.length) return this.$u.toast('未正确选择经销商,请正确选择');
 						if (checkenLength.length != 0) return this.$u.toast('请选择' + checkenLength[0].brand + "品牌签约任务");
 						if (checkenLength.length != 0) return this.$u.toast('请选择' + checkenLength[0].brand + "品牌签约任务");
 						if (!this.protocol) return this.$u.toast('请阅读并同意用户协议和隐私协议');
 						if (!this.protocol) return this.$u.toast('请阅读并同意用户协议和隐私协议');
@@ -376,7 +391,7 @@
 							this.$u.route({
 							this.$u.route({
 								url: 'pages/login/index',
 								url: 'pages/login/index',
 							})
 							})
-							uni.$emit('loginphone',this.formData.phone)
+							uni.$emit('loginphone', this.formData.phone)
 						}, 2000)
 						}, 2000)
 					}
 					}
 					if (res.data.code == 500) {
 					if (res.data.code == 500) {