From 7042c7e5d070c5db613924d766e408351b82e9fb Mon Sep 17 00:00:00 2001
From: hot777zz <912275990@qq.com>
Date: Mon, 27 Nov 2023 10:25:14 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A2=81=E8=88=AA=EF=BC=9A=E8=A1=A8=E5=8D=95?=
=?UTF-8?q?=E4=BA=8C=E7=BA=A7=E8=81=94=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../publish/publishAddress/publishAddress.vue | 62 +++++++++++--------
.../publishInvestment/publishInvestment.vue | 53 +++++++++++-----
pages/publish/publishRent/publishRent.vue | 1 +
3 files changed, 76 insertions(+), 40 deletions(-)
diff --git a/pages/publish/publishAddress/publishAddress.vue b/pages/publish/publishAddress/publishAddress.vue
index 21c0b2c..512c990 100644
--- a/pages/publish/publishAddress/publishAddress.vue
+++ b/pages/publish/publishAddress/publishAddress.vue
@@ -18,23 +18,13 @@
- {{form.business}}
- 请选择行业
+ {{form.business}}-{{form.commercialForm}}
+ 请选择店铺行业与业态
-
-
-
- {{form.commercialForm}}
- 请选择业态
-
-
-
-
+
@@ -217,6 +207,30 @@
this.show3 = true
}
},
+ changeHandler(e) {
+ const {
+ columnIndex,
+ value,
+ values, // values为当前变化列的数组内容
+ index,
+ // 微信小程序无法将picker实例传出来,只能通过ref操作
+ picker = this.$refs.uPicker
+ } = e
+ // 当第一列值发生变化时,变化第二列(后一列)对应的选项
+ console.log(e);
+ if (columnIndex === 0) {
+ // picker为选择器this实例,变化第二列对应的选项
+ this.ClassCheckId = this.pid[index]
+ this.$api.getClassList(this.ClassCheckId).then(res => {
+ console.log(res);
+ this.Karmacolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ picker.setColumnValues(1, this.Karmacolumns)
+ })
+
+ }
+ },
getRegionList() {
var that = this
uni.request({
@@ -233,17 +247,7 @@
tradeConfirm(e) {
this.show2 = false
this.form.business = e.value[0]
- this.ClassCheckId = this.pid[e.indexs[0]]
- this.$api.getClassList(this.ClassCheckId).then(res => {
- // console.log(res);
- this.Karmacolumns = res.data.data.map((item) => {
- return item = item.name
- })
- })
- },
- karmaConfirm(e) {
- this.show3 = false
- this.form.commercialForm = e.value[0]
+ this.form.commercialForm = e.value[1]
},
regionConfirm(e) {
this.show1 = false
@@ -272,8 +276,14 @@
})
this.pid = res.data.data.map((item) => {
return item = item.id
+
+ })
+ this.$api.getClassList(9).then(res => {
+ this.Karmacolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ this.$refs.uPicker.setColumnValues(1,this.Karmacolumns)
})
-
})
},
computed: {
diff --git a/pages/publish/publishInvestment/publishInvestment.vue b/pages/publish/publishInvestment/publishInvestment.vue
index 4055179..259bda7 100644
--- a/pages/publish/publishInvestment/publishInvestment.vue
+++ b/pages/publish/publishInvestment/publishInvestment.vue
@@ -28,15 +28,15 @@
-
- {{form.business}}
- 请选择项目行业
+ {{form.business}}-{{form.commercial}}
+ 请选择店铺行业与业态
-
+
@@ -83,6 +83,7 @@
longitude: '',
latitude: '',
id: '',
+ commercial: '',
},
Classcolumns: [],
@@ -255,6 +256,30 @@
// console.log('changeAddress', e);
this.getAddressList(e)
},
+ changeHandler(e) {
+ const {
+ columnIndex,
+ value,
+ values, // values为当前变化列的数组内容
+ index,
+ // 微信小程序无法将picker实例传出来,只能通过ref操作
+ picker = this.$refs.uPicker
+ } = e
+ // 当第一列值发生变化时,变化第二列(后一列)对应的选项
+ console.log(e);
+ if (columnIndex === 0) {
+ // picker为选择器this实例,变化第二列对应的选项
+ this.ClassCheckId = this.pid[index]
+ this.$api.getClassList(this.ClassCheckId).then(res => {
+ console.log(res);
+ this.Karmacolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ picker.setColumnValues(1, this.Karmacolumns)
+ })
+
+ }
+ },
getRegionList() {
var that = this
uni.request({
@@ -292,17 +317,11 @@
tradeConfirm(e) {
this.show2 = false
this.form.business = e.value[0]
- this.ClassCheckId = this.pid[e.indexs[0]]
- this.$api.getClassList(this.ClassCheckId).then(res => {
- // console.log(res);
- this.Karmacolumns = res.data.data.map((item) => {
- return item = item.name
- })
- })
+ this.form.commercial = e.value[1]
},
karmaConfirm(e) {
this.show3 = false
- this.form.commercial = e.value[0]
+
},
regionConfirm(e) {
this.show1 = false
@@ -368,8 +387,14 @@
})
this.pid = res.data.data.map((item) => {
return item = item.id
+
+ })
+ this.$api.getClassList(9).then(res => {
+ this.Karmacolumns = res.data.data.map((item) => {
+ return item = item.name
+ })
+ this.$refs.uPicker.setColumnValues(1,this.Karmacolumns)
})
-
})
},
computed: {
diff --git a/pages/publish/publishRent/publishRent.vue b/pages/publish/publishRent/publishRent.vue
index a9c2a65..3a60c31 100644
--- a/pages/publish/publishRent/publishRent.vue
+++ b/pages/publish/publishRent/publishRent.vue
@@ -396,6 +396,7 @@
} else {
console.log('发布');
}
+ this.getRegionList()
this.$api.getClassList().then(res => {
// console.log(res.data.data.length);
this.Classcolumns = res.data.data.map((item) => {