合并解决冲突
This commit is contained in:
@@ -15,8 +15,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-border">
|
<view class="item-border">
|
||||||
<DropDownItem v-if="activeIndex !== -1" :list="tablist" @cancelDrop="cancelDrop" @getQueryInfo="getQueryInfo"
|
<DropDownItem v-show="activeIndex !== -1" :list="tablist" @cancelDrop="cancelDrop" @getQueryInfo="getQueryInfo"
|
||||||
:type="title[activeIndex]" />
|
:type="title[activeIndex]" :activeChoose = "setActiveTag" :key="tablist" ref="dropdownitem" @cancelPageNum="cancelPageNum"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -35,29 +35,58 @@
|
|||||||
return {
|
return {
|
||||||
title: ['行业', '区域', '面积', '筛选'],
|
title: ['行业', '区域', '面积', '筛选'],
|
||||||
activeIndex: -1,
|
activeIndex: -1,
|
||||||
|
// 是否显示下拉框
|
||||||
|
isShow: false,
|
||||||
postlist: [
|
postlist: [
|
||||||
['全部', '餐饮美食', '百货超市', '美容美发'],
|
[],
|
||||||
['区域1', '区域2', '区域3', '区域4'],
|
[],
|
||||||
['小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
|
['全部','小于50m²', '50-200m²', '200-600m²', '600-800m²', '800-1000m²', '1000m²以上'],
|
||||||
['面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
|
['全部','面积从大到小', '面积从小到大', '租金从大到小', '租金从小到大']
|
||||||
],
|
],
|
||||||
queryInfo: {
|
queryInfo: {
|
||||||
region: '',
|
region: '',
|
||||||
sortType: '',
|
sortType: '',
|
||||||
areatype: '',
|
areatype: '',
|
||||||
business: ''
|
business: ''
|
||||||
}
|
},
|
||||||
|
// 当前选中的行业下拉列表项
|
||||||
|
currentClassActive: 0,
|
||||||
|
// 当前选中的区域下拉列表项
|
||||||
|
currentRegionActive: 0,
|
||||||
|
// 当前选中的面积下拉列表项
|
||||||
|
currentAreaActive: 0,
|
||||||
|
// 当前选中的筛选下拉列表项
|
||||||
|
currentFilterActive: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tablist: function() {
|
tablist: function() {
|
||||||
return this.postlist[this.activeIndex]
|
return this.postlist[this.activeIndex]
|
||||||
|
},
|
||||||
|
setActiveTag: function(){
|
||||||
|
if(this.activeIndex == 0){
|
||||||
|
return this.currentClassActive
|
||||||
|
}else if(this.activeIndex == 1){
|
||||||
|
return this.currentRegionActive
|
||||||
|
}else if(this.activeIndex == 2){
|
||||||
|
return this.currentAreaActive
|
||||||
|
}else if(this.activeIndex == 3){
|
||||||
|
return this.currentFilterActive
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.postlist[0] = JSON.parse(uni.getStorageSync('classList'))
|
this.postlist[0] = JSON.parse(uni.getStorageSync('classList'))
|
||||||
// this.postlist[0].unshift('全部')
|
this.postlist[0].unshift('全部')
|
||||||
this.postlist[1] = JSON.parse(uni.getStorageSync('regionList'))
|
this.postlist[1] = JSON.parse(uni.getStorageSync('regionList'))
|
||||||
|
this.postlist[1].unshift('全区域')
|
||||||
|
// this.postlist[2].unshift('所有面积')
|
||||||
|
// this.postlist[3].unshift('全部')
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
setActiveTag (reset){
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeActiveIndex(index) {
|
changeActiveIndex(index) {
|
||||||
@@ -69,16 +98,54 @@
|
|||||||
cancelDrop() {
|
cancelDrop() {
|
||||||
this.activeIndex = -1;
|
this.activeIndex = -1;
|
||||||
},
|
},
|
||||||
|
cancelPageNum(){
|
||||||
|
this.$emit('cancelPageNum')
|
||||||
|
},
|
||||||
getQueryInfo(querys) {
|
getQueryInfo(querys) {
|
||||||
|
|
||||||
|
console.log(querys, 'getquerysinfo');
|
||||||
|
// 修改当前选择的各选项卡下标
|
||||||
|
// 记忆各下拉框数据
|
||||||
|
|
||||||
|
if (this.activeIndex === 0) {
|
||||||
|
this.currentClassActive = querys.business
|
||||||
|
}else if (this.activeIndex === 1) {
|
||||||
|
this.currentRegionActive = querys.region
|
||||||
|
}else if (this.activeIndex === 2) {
|
||||||
|
this.currentAreaActive = querys.areatype
|
||||||
|
}else if (this.activeIndex === 3) {
|
||||||
|
this.currentFilterActive = querys.sortType
|
||||||
|
}
|
||||||
|
// 特殊处理行业、区域
|
||||||
|
if(querys.business){
|
||||||
|
querys.business = this.tablist[this.currentClassActive]
|
||||||
|
}
|
||||||
|
if(querys.region){
|
||||||
|
querys.region = this.tablist[this.currentRegionActive]
|
||||||
|
}
|
||||||
|
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
...this.queryInfo,
|
...this.queryInfo,
|
||||||
...querys
|
...querys
|
||||||
}
|
}
|
||||||
const query = this.$u.queryParams(this.queryInfo)
|
const query = this.$u.queryParams(this.queryInfo)
|
||||||
console.log(query, 'dropquery');
|
console.log(querys, 'dropquery');
|
||||||
this.$emit('getQueryInfo', this.queryInfo)
|
this.$emit('getQueryInfo', this.queryInfo)
|
||||||
|
},
|
||||||
return query
|
resetInfo(){
|
||||||
|
console.log("重置了Dropdown");
|
||||||
|
this.queryInfo = {
|
||||||
|
region: '',
|
||||||
|
sortType: '',
|
||||||
|
areatype: '',
|
||||||
|
business: ''
|
||||||
|
}
|
||||||
|
this.currentClassActive = 0
|
||||||
|
this.currentRegionActive = 0
|
||||||
|
this.currentAreaActive = 0
|
||||||
|
this.currentFilterActive = 0
|
||||||
|
// 重置各下拉框保存的数据
|
||||||
|
this.$refs.dropdownitem.resetQueryInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<view class="root">
|
<view class="root">
|
||||||
<view class="mask" @click="handleMask"></view>
|
<view class="mask" @click="handleMask"></view>
|
||||||
<view class="list-container">
|
<view class="list-container">
|
||||||
<view class="item" v-for="(item,index) in list" :class="{isActive: activeIndex === index}"
|
<view class="item" v-for="(item,index) in list" :key="item" :class="{isActive: (activeChoose == index)}"
|
||||||
@click="handleActive(index)">
|
@click="handleActive(index)">
|
||||||
<text class="list-text">{{item}}</text>
|
<text class="list-text">{{item}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -22,15 +22,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
|
||||||
default () {
|
default () {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
activeChoose: {
|
||||||
|
type: Number,
|
||||||
|
default () {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeIndex: -1,
|
activeIndex: 0,
|
||||||
queryInfo: {}
|
queryInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -39,29 +44,77 @@
|
|||||||
this.$emit('cancelDrop');
|
this.$emit('cancelDrop');
|
||||||
},
|
},
|
||||||
sendQueryInfo() {
|
sendQueryInfo() {
|
||||||
|
console.log(this.queryInfo);
|
||||||
|
console.log(this.type);
|
||||||
|
console.log(this.activeIndex);
|
||||||
|
|
||||||
if (this.type === '行业') {
|
if (this.type === '行业') {
|
||||||
|
if(this.list[this.activeIndex] == '全部'){
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
business: this.list[this.activeIndex]
|
business: ''
|
||||||
}
|
}
|
||||||
} else if (this.type === '区域') {
|
}else{
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
region: this.list[this.activeIndex]
|
business: this.activeIndex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (this.type === '区域') {
|
||||||
|
if(this.list[this.activeIndex] == '全区域'){
|
||||||
|
this.queryInfo = {
|
||||||
|
region: ''
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.queryInfo = {
|
||||||
|
region: this.activeIndex
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (this.type === '面积') {
|
} else if (this.type === '面积') {
|
||||||
|
if(this.list[this.activeIndex] == '任意面积'){
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
areatype: this.activeIndex + 1
|
areatype: ''
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
this.queryInfo = {
|
||||||
|
areatype: this.activeIndex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (this.type === '筛选') {
|
} else if (this.type === '筛选') {
|
||||||
|
if(this.list[this.activeIndex] == '全部'){
|
||||||
this.queryInfo = {
|
this.queryInfo = {
|
||||||
sortType: this.activeIndex + 1
|
sortType: ''
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
this.queryInfo = {
|
||||||
|
sortType: this.activeIndex
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 发送queryInfo
|
// 发送queryInfo
|
||||||
|
console.log(this.queryInfo, 'sendqueryInfo');
|
||||||
this.$emit('getQueryInfo', this.queryInfo);
|
this.$emit('getQueryInfo', this.queryInfo);
|
||||||
},
|
},
|
||||||
|
resetQueryInfo(){
|
||||||
|
console.log("重置了DropdownItem");
|
||||||
|
this.currentClassActive = 0
|
||||||
|
this.currentRegionActive = 0
|
||||||
|
this.currentAreaActive = 0
|
||||||
|
this.currentFilterActive = 0
|
||||||
|
this.activeIndex = 0
|
||||||
|
this.queryInfo = {
|
||||||
|
region: '',
|
||||||
|
sortType: '',
|
||||||
|
areatype: '',
|
||||||
|
business: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
async handleActive(index) {
|
async handleActive(index) {
|
||||||
this.activeIndex = index;
|
this.activeIndex = index;
|
||||||
this.sendQueryInfo(index);
|
// 取消当前页面的pageNum参数
|
||||||
|
this.$emit('cancelPageNum');
|
||||||
|
this.sendQueryInfo();
|
||||||
// 设置一个定时器,等待200毫秒
|
// 设置一个定时器,等待200毫秒
|
||||||
const delayPromise = this.delay(200);
|
const delayPromise = this.delay(200);
|
||||||
// 等待定时器完成
|
// 等待定时器完成
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<ShowShopListItem v-for="item in shopInfoList" :key="shopid" :shopInfo="item" :is-adshow="isADshow"
|
<ShowShopListItem v-for="item in shopInfoList" :shopInfo="item" :is-adshow="isADshow"
|
||||||
:adlinkPath="adlinkPath" :show-style="showStyle" :is-edit="isEdit" @delItem="handleDel"
|
:adlinkPath="adlinkPath" :show-style="showStyle" :is-edit="isEdit" @delItem="handleDel"
|
||||||
@updateItem="hanldeUpdate"></ShowShopListItem>
|
@updateItem="hanldeUpdate"></ShowShopListItem>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="location-detail">
|
<view class="location-detail">
|
||||||
<text>行业:{{shopInfo.trade1}}</text>
|
<text>行业:{{shopInfo.trade1+'-'}}{{shopInfo.trade2}}</text>
|
||||||
<text>区域:{{shopInfo.area1}}</text>
|
<text>区域:{{shopInfo.area1}}</text>
|
||||||
<text v-if="search">地址:{{shopInfo.adress}}</text>
|
<text v-if="search">地址:{{shopInfo.adress}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -49,7 +49,9 @@
|
|||||||
<view class="bot-tab">
|
<view class="bot-tab">
|
||||||
<view class="tab-left">
|
<view class="tab-left">
|
||||||
<view class="share" @click="share()">
|
<view class="share" @click="share()">
|
||||||
|
<button open-type="share" session-from="sessionFrom" class="service-btn">
|
||||||
<image src="../../static/shoplist/share.png" style="width: 41rpx;height: 58rpx;"></image>
|
<image src="../../static/shoplist/share.png" style="width: 41rpx;height: 58rpx;"></image>
|
||||||
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<button open-type="contact" session-from="sessionFrom" class="service-btn">
|
<button open-type="contact" session-from="sessionFrom" class="service-btn">
|
||||||
<image src="../../static/shoplist/service.png" style="width: 41rpx;height: 58rpx;margin-top: 11px;"></image>
|
<image src="../../static/shoplist/service.png" style="width: 41rpx;height: 58rpx;margin-top: 11px;"></image>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown @getQueryInfo="getShopList"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="3" :shopInfoList="shopInfoList" />
|
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="3" :shopInfoList="shopInfoList" />
|
||||||
@@ -55,6 +55,7 @@
|
|||||||
// this.pageNum=1
|
// this.pageNum=1
|
||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
|
this.$refs.dropdown.resetInfo()
|
||||||
|
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
@@ -128,6 +129,10 @@
|
|||||||
this.customQuery = q
|
this.customQuery = q
|
||||||
return q
|
return q
|
||||||
},
|
},
|
||||||
|
cancelPageNum() {
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.refresh = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown @getQueryInfo="getShopList"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4" :shopInfoList="shopInfoList" />
|
<ShowShopList :showStyle="2" :adlinkPath="adlinkPath" :listType="4" :shopInfoList="shopInfoList" />
|
||||||
@@ -55,6 +55,7 @@
|
|||||||
// this.pageNum=1
|
// this.pageNum=1
|
||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
|
this.$refs.dropdown.resetInfo()
|
||||||
|
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
@@ -128,6 +129,10 @@
|
|||||||
this.customQuery = q
|
this.customQuery = q
|
||||||
return q
|
return q
|
||||||
},
|
},
|
||||||
|
cancelPageNum() {
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.refresh = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown @getQueryInfo="getShopList"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
// this.pageNum=1
|
// this.pageNum=1
|
||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
|
this.$refs.dropdown.resetInfo()
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -127,6 +127,10 @@
|
|||||||
this.customQuery = q
|
this.customQuery = q
|
||||||
return q
|
return q
|
||||||
},
|
},
|
||||||
|
cancelPageNum() {
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.refresh = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view>
|
<view>
|
||||||
<DropDown @getQueryInfo="getShopList"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList" />
|
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList" />
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
// this.pageNum=1
|
// this.pageNum=1
|
||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
|
this.$refs.dropdown.resetInfo()
|
||||||
|
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
@@ -127,6 +128,10 @@
|
|||||||
this.customQuery = q
|
this.customQuery = q
|
||||||
return q
|
return q
|
||||||
},
|
},
|
||||||
|
cancelPageNum() {
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.refresh = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -27,21 +27,24 @@
|
|||||||
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm" @change="changeHandler"></u-picker>
|
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm" @change="changeHandler"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
||||||
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="预计投资" label-position="top" border-bottom="true" label-width="auto" prop="transferFee">
|
<u-form-item label="预计投资" label-position="top" border-bottom="true" label-width="auto" prop="transferFee">
|
||||||
<u-input v-model="form.transferFee" placeholder="请输入预计投资" placeholder-class="input-class" type="number"
|
<u-input v-model="form.transferFee" placeholder="请输入预计投资" placeholder-class="input-class" type="number"
|
||||||
border="none"></u-input>
|
border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
||||||
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contactPerson">
|
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contactPerson">
|
||||||
<u-input v-model="form.contactPerson" placeholder="请输入联系人姓名" placeholder-class="input-class"
|
<u-input v-model="form.contactPerson" placeholder="请输入联系人姓名" placeholder-class="input-class"
|
||||||
border="none"></u-input>
|
border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="phone">
|
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="phone">
|
||||||
<u-input v-model="form.phone" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.phone" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="details">
|
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="details">
|
||||||
<u-input v-model="form.details" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.details" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
||||||
|
|||||||
@@ -21,8 +21,9 @@
|
|||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
|
<u-picker :columns="[regionColumns]" ref="regionPicker" :show="show1" :closeOnClickOverlay="true"
|
||||||
v-model="form.region" @confirm="regionConfirm"></u-picker>
|
@close="show1 = false" v-model="form.region" @confirm="regionConfirm"
|
||||||
|
@change="changeRegionHandler"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="项目地址" label-position="top" border-bottom="true" prop="address" label-width="auto">
|
<u-form-item label="项目地址" label-position="top" border-bottom="true" prop="address" label-width="auto">
|
||||||
<u-input v-model="form.address" placeholder="请输入项目地址" placeholder-class="input-class" border="none"
|
<u-input v-model="form.address" placeholder="请输入项目地址" placeholder-class="input-class" border="none"
|
||||||
@@ -39,17 +40,20 @@
|
|||||||
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm" @change="changeHandler"></u-picker>
|
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm" @change="changeHandler"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
||||||
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
||||||
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contactPerson">
|
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contactPerson">
|
||||||
<u-input v-model="form.contactPerson" placeholder="请输入联系人姓名" placeholder-class="input-class"
|
<u-input v-model="form.contactPerson" placeholder="请输入联系人姓名" placeholder-class="input-class"
|
||||||
border="none"></u-input>
|
border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="phone">
|
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="phone">
|
||||||
<u-input v-model="form.phone" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.phone" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="details">
|
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="details">
|
||||||
<u-input v-model="form.details" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.details" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
||||||
@@ -69,6 +73,9 @@
|
|||||||
imageLength: 0,
|
imageLength: 0,
|
||||||
fileList1: [],
|
fileList1: [],
|
||||||
regionColumns: [],
|
regionColumns: [],
|
||||||
|
regionSecondColumns: [],
|
||||||
|
regionId: [],
|
||||||
|
regionCheckId: '',
|
||||||
form: {
|
form: {
|
||||||
title: '',
|
title: '',
|
||||||
region: '',
|
region: '',
|
||||||
@@ -227,6 +234,8 @@
|
|||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
...this.form,
|
...this.form,
|
||||||
|
address: this.form.region.split('-')[1] + this.form.address,
|
||||||
|
region: this.form.region.split('-')[0],
|
||||||
images: temp.join(',')
|
images: temp.join(',')
|
||||||
}
|
}
|
||||||
console.log("项目招商:", data)
|
console.log("项目招商:", data)
|
||||||
@@ -256,28 +265,31 @@
|
|||||||
// console.log('changeAddress', e);
|
// console.log('changeAddress', e);
|
||||||
this.getAddressList(e)
|
this.getAddressList(e)
|
||||||
},
|
},
|
||||||
changeHandler(e) {
|
changeRegionHandler(e) {
|
||||||
const {
|
const {
|
||||||
columnIndex,
|
columnIndex,
|
||||||
value,
|
value,
|
||||||
values, // values为当前变化列的数组内容
|
values, // values为当前变化列的数组内容
|
||||||
index,
|
index,
|
||||||
// 微信小程序无法将picker实例传出来,只能通过ref操作
|
// 微信小程序无法将picker实例传出来,只能通过ref操作
|
||||||
picker = this.$refs.uPicker
|
picker = this.$refs.regionPicker
|
||||||
} = e
|
} = e
|
||||||
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
||||||
console.log(e);
|
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
// picker为选择器this实例,变化第二列对应的选项
|
// picker为选择器this实例,变化第二列对应的选项
|
||||||
this.ClassCheckId = this.pid[index]
|
this.regionCheckId = this.regionId[index]
|
||||||
this.$api.getClassList(this.ClassCheckId).then(res => {
|
const that = this
|
||||||
console.log(res);
|
uni.request({
|
||||||
this.Karmacolumns = res.data.data.map((item) => {
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + that.regionCheckId + '&key=' +
|
||||||
return item = item.name
|
that.$api.key,
|
||||||
|
success(res) {
|
||||||
|
that.regionSecondColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
picker.setColumnValues(1, that.regionSecondColumns)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log('请求区域失败:', err);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
picker.setColumnValues(1, this.Karmacolumns)
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRegionList() {
|
getRegionList() {
|
||||||
@@ -286,7 +298,20 @@
|
|||||||
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + uni.getStorageSync('city_code') + '&key=' +
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + uni.getStorageSync('city_code') + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
that.regionColumns = [res.data.result[0].map(item => item.fullname)]
|
that.regionColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
that.regionId = res.data.result[0].map(item => item.id)
|
||||||
|
var that1 = that
|
||||||
|
uni.request({
|
||||||
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + that1.regionId[0] + '&key=' +
|
||||||
|
that1.$api.key,
|
||||||
|
success(res) {
|
||||||
|
that1.regionSecondColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
that1.$refs.regionPicker.setColumnValues(1, that1.regionSecondColumns)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log('请求区域失败:', err);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log('请求区域失败:', err);
|
console.log('请求区域失败:', err);
|
||||||
@@ -299,7 +324,6 @@
|
|||||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('diz', res.data.result.location);
|
|
||||||
if (res.data.message == "query ok") {
|
if (res.data.message == "query ok") {
|
||||||
// console.log('lat', res.data.result.location.lat);
|
// console.log('lat', res.data.result.location.lat);
|
||||||
that.form.latitude = res.data.result.location.lat
|
that.form.latitude = res.data.result.location.lat
|
||||||
@@ -325,7 +349,7 @@
|
|||||||
},
|
},
|
||||||
regionConfirm(e) {
|
regionConfirm(e) {
|
||||||
this.show1 = false
|
this.show1 = false
|
||||||
this.form.region = e.value[0]
|
this.form.region = e.value[0] + '-' + e.value[1]
|
||||||
},
|
},
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
console.log('type, id', type, id);
|
console.log('type, id', type, id);
|
||||||
|
|||||||
@@ -21,8 +21,9 @@
|
|||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
|
<u-picker :columns="[regionColumns]" ref="regionPicker" :show="show1" :closeOnClickOverlay="true"
|
||||||
v-model="form.region" @confirm="regionConfirm"></u-picker>
|
@close="show1 = false" v-model="form.region" @confirm="regionConfirm"
|
||||||
|
@change="changeRegionHandler"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="地址" label-position="top" border-bottom="true" prop="address" label-width="auto">
|
<u-form-item label="地址" label-position="top" border-bottom="true" prop="address" label-width="auto">
|
||||||
<u-input v-model="form.address" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
<u-input v-model="form.address" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
||||||
@@ -30,7 +31,8 @@
|
|||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
||||||
prop="business">
|
prop="business">
|
||||||
<text @click="show2 = true" class="checkedtext" v-if="form.business">{{form.business}}-{{form.commercial}}</text>
|
<text @click="show2 = true" class="checkedtext"
|
||||||
|
v-if="form.business">{{form.business}}-{{form.commercial}}</text>
|
||||||
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
||||||
@@ -48,16 +50,19 @@
|
|||||||
:columns="[Karmacolumns]" v-model="form.commercial" @confirm="karmaConfirm"></u-picker>
|
:columns="[Karmacolumns]" v-model="form.commercial" @confirm="karmaConfirm"></u-picker>
|
||||||
</u-form-item> -->
|
</u-form-item> -->
|
||||||
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
||||||
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
||||||
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contact">
|
<u-form-item label="联系人" label-position="top" border-bottom="true" label-width="auto" prop="contact">
|
||||||
<u-input v-model="form.contact" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.contact" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="mobile">
|
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="mobile">
|
||||||
<u-input v-model="form.mobile" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.mobile" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="content">
|
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="content">
|
||||||
<u-input v-model="form.content" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.content" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
||||||
@@ -76,8 +81,10 @@
|
|||||||
return {
|
return {
|
||||||
imageLength: '0',
|
imageLength: '0',
|
||||||
fileList1: [],
|
fileList1: [],
|
||||||
regionColumns: [JSON.parse(uni.getStorageSync('regionList'))] || [],
|
regionColumns: [],
|
||||||
|
regionSecondColumns: [],
|
||||||
|
regionId: [],
|
||||||
|
regionCheckId: '',
|
||||||
form: {
|
form: {
|
||||||
title: '',
|
title: '',
|
||||||
region: '',
|
region: '',
|
||||||
@@ -241,6 +248,8 @@
|
|||||||
}
|
}
|
||||||
let data = {
|
let data = {
|
||||||
...this.form,
|
...this.form,
|
||||||
|
address: this.form.region.split('-')[1] + this.form.address,
|
||||||
|
region: this.form.region.split('-')[0],
|
||||||
images: temp.join(',')
|
images: temp.join(',')
|
||||||
}
|
}
|
||||||
console.log("提交表单信息:", data)
|
console.log("提交表单信息:", data)
|
||||||
@@ -278,6 +287,59 @@
|
|||||||
// console.log('changeAddress', e);
|
// console.log('changeAddress', e);
|
||||||
this.getAddressList(e)
|
this.getAddressList(e)
|
||||||
},
|
},
|
||||||
|
changeRegionHandler(e) {
|
||||||
|
const {
|
||||||
|
columnIndex,
|
||||||
|
value,
|
||||||
|
values, // values为当前变化列的数组内容
|
||||||
|
index,
|
||||||
|
// 微信小程序无法将picker实例传出来,只能通过ref操作
|
||||||
|
picker = this.$refs.regionPicker
|
||||||
|
} = e
|
||||||
|
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
// picker为选择器this实例,变化第二列对应的选项
|
||||||
|
this.regionCheckId = this.regionId[index]
|
||||||
|
const that = this
|
||||||
|
uni.request({
|
||||||
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + that.regionCheckId + '&key=' +
|
||||||
|
that.$api.key,
|
||||||
|
success(res) {
|
||||||
|
that.regionSecondColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
picker.setColumnValues(1, that.regionSecondColumns)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log('请求区域失败:', err);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getRegionList() {
|
||||||
|
var that = this
|
||||||
|
uni.request({
|
||||||
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + uni.getStorageSync('city_code') + '&key=' +
|
||||||
|
that.$api.key,
|
||||||
|
success(res) {
|
||||||
|
that.regionColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
that.regionId = res.data.result[0].map(item => item.id)
|
||||||
|
var that1 = that
|
||||||
|
uni.request({
|
||||||
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + that1.regionId[0] + '&key=' +
|
||||||
|
that1.$api.key,
|
||||||
|
success(res) {
|
||||||
|
that1.regionSecondColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
that1.$refs.regionPicker.setColumnValues(1, that1.regionSecondColumns)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log('请求区域失败:', err);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log('请求区域失败:', err);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getAddressList(value) {
|
getAddressList(value) {
|
||||||
if (!this.form.region) {
|
if (!this.form.region) {
|
||||||
uni.$u.toast('请先选择区域')
|
uni.$u.toast('请先选择区域')
|
||||||
@@ -324,14 +386,12 @@
|
|||||||
})
|
})
|
||||||
picker.setColumnValues(1, this.Karmacolumns)
|
picker.setColumnValues(1, this.Karmacolumns)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tradeConfirm(e) {
|
tradeConfirm(e) {
|
||||||
this.show2 = false
|
this.show2 = false
|
||||||
this.form.business = e.value[0]
|
this.form.business = e.value[0]
|
||||||
this.form.commercial = e.value[1]
|
this.form.commercial = e.value[1]
|
||||||
|
|
||||||
},
|
},
|
||||||
karmaConfirm(e) {
|
karmaConfirm(e) {
|
||||||
this.show3 = false
|
this.show3 = false
|
||||||
@@ -339,7 +399,7 @@
|
|||||||
},
|
},
|
||||||
regionConfirm(e) {
|
regionConfirm(e) {
|
||||||
this.show1 = false
|
this.show1 = false
|
||||||
this.form.region = e.value[0]
|
this.form.region = e.value[0] + '-' + e.value[1]
|
||||||
},
|
},
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
console.log('type, id', type, id);
|
console.log('type, id', type, id);
|
||||||
|
|||||||
@@ -20,8 +20,9 @@
|
|||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show1 = true"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<u-picker :columns="regionColumns" :show="show1" :closeOnClickOverlay="true" @close="show1 = false"
|
<u-picker :columns="[regionColumns]" ref="regionPicker" :show="show1" :closeOnClickOverlay="true"
|
||||||
v-model="form.region" @confirm="regionConfirm"></u-picker>
|
@close="show1 = false" v-model="form.region" @confirm="regionConfirm"
|
||||||
|
@change="changeRegionHandler"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="地址" label-position="top" border-bottom="true" prop="address" label-width="auto">
|
<u-form-item label="地址" label-position="top" border-bottom="true" prop="address" label-width="auto">
|
||||||
<u-input v-model="form.address" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
<u-input v-model="form.address" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
||||||
@@ -29,7 +30,8 @@
|
|||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker" label-width="auto"
|
||||||
prop="business">
|
prop="business">
|
||||||
<text @click="show2 = true" class="checkedtext" v-if="form.business">{{form.business}}-{{form.commercial}}</text>
|
<text @click="show2 = true" class="checkedtext"
|
||||||
|
v-if="form.business">{{form.business}}-{{form.commercial}}</text>
|
||||||
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
<text @click="show2 = true" class="checktext" v-else>请选择店铺行业与业态</text>
|
||||||
<view class="arrow-icon">
|
<view class="arrow-icon">
|
||||||
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
<u-icon name="arrow-right" size="30px" @click="show2 = true"></u-icon>
|
||||||
@@ -38,10 +40,12 @@
|
|||||||
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm" @change="changeHandler"></u-picker>
|
:columns="[Classcolumns]" v-model="form.business" @confirm="tradeConfirm" @change="changeHandler"></u-picker>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
<u-form-item label="面积" label-position="top" border-bottom="true" label-width="auto" prop="area">
|
||||||
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.area" placeholder="请输入店铺面积" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
<u-form-item label="租金(元/月)" label-position="top" border-bottom="true" label-width="auto" prop="rent">
|
||||||
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.rent" placeholder="请输入店铺租金" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="auto" prop="transferFee">
|
<u-form-item label="转让费(万元)" label-position="top" border-bottom="true" label-width="auto" prop="transferFee">
|
||||||
<u-input v-model="form.transferFee" placeholder="请输入店铺转让费" placeholder-class="input-class" type="number"
|
<u-input v-model="form.transferFee" placeholder="请输入店铺转让费" placeholder-class="input-class" type="number"
|
||||||
@@ -51,7 +55,8 @@
|
|||||||
<u-input v-model="form.contact" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.contact" placeholder="请输入联系人姓名" placeholder-class="input-class" border="none"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="mobile">
|
<u-form-item label="手机号码" label-position="top" border-bottom="true" label-width="auto" prop="mobile">
|
||||||
<u-input v-model="form.mobile" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none" type="number"></u-input>
|
<u-input v-model="form.mobile" placeholder="请输入联系人手机号码" placeholder-class="input-class" border="none"
|
||||||
|
type="number"></u-input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="content">
|
<u-form-item label="详情介绍" label-position="top" border-bottom="true" label-width="auto" prop="content">
|
||||||
<u-input v-model="form.content" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
<u-input v-model="form.content" placeholder="请输入介绍详情" placeholder-class="input-class" border="none"></u-input>
|
||||||
@@ -70,7 +75,9 @@
|
|||||||
imageLength: 0,
|
imageLength: 0,
|
||||||
fileList1: [],
|
fileList1: [],
|
||||||
regionColumns: [],
|
regionColumns: [],
|
||||||
|
regionSecondColumns: [],
|
||||||
|
regionId: [],
|
||||||
|
regionCheckId: '',
|
||||||
form: {
|
form: {
|
||||||
title: '',
|
title: '',
|
||||||
region: '',
|
region: '',
|
||||||
@@ -238,11 +245,14 @@
|
|||||||
uni.$u.toast('请输入准确地址')
|
uni.$u.toast('请输入准确地址')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
...this.form,
|
...this.form,
|
||||||
|
address: this.form.region.split('-')[1] + this.form.address,
|
||||||
|
region: this.form.region.split('-')[0],
|
||||||
images: temp.join(',')
|
images: temp.join(',')
|
||||||
}
|
}
|
||||||
console.log('提交表单信息', data, this.form);
|
console.log('提交表单信息', data);
|
||||||
this.$api.publishTransfer(data).then(res => {
|
this.$api.publishTransfer(data).then(res => {
|
||||||
console.log('发布店铺转让', res);
|
console.log('发布店铺转让', res);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
@@ -277,13 +287,53 @@
|
|||||||
// console.log('changeAddress', e);
|
// console.log('changeAddress', e);
|
||||||
this.getAddressList(e)
|
this.getAddressList(e)
|
||||||
},
|
},
|
||||||
|
changeRegionHandler(e) {
|
||||||
|
const {
|
||||||
|
columnIndex,
|
||||||
|
value,
|
||||||
|
values, // values为当前变化列的数组内容
|
||||||
|
index,
|
||||||
|
// 微信小程序无法将picker实例传出来,只能通过ref操作
|
||||||
|
picker = this.$refs.regionPicker
|
||||||
|
} = e
|
||||||
|
// 当第一列值发生变化时,变化第二列(后一列)对应的选项
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
// picker为选择器this实例,变化第二列对应的选项
|
||||||
|
this.regionCheckId = this.regionId[index]
|
||||||
|
const that = this
|
||||||
|
uni.request({
|
||||||
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + that.regionCheckId + '&key=' +
|
||||||
|
that.$api.key,
|
||||||
|
success(res) {
|
||||||
|
that.regionSecondColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
picker.setColumnValues(1, that.regionSecondColumns)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log('请求区域失败:', err);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
getRegionList() {
|
getRegionList() {
|
||||||
var that = this
|
var that = this
|
||||||
uni.request({
|
uni.request({
|
||||||
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + uni.getStorageSync('city_code') + '&key=' +
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + uni.getStorageSync('city_code') + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
that.regionColumns = [res.data.result[0].map(item => item.fullname)]
|
that.regionColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
that.regionId = res.data.result[0].map(item => item.id)
|
||||||
|
var that1 = that
|
||||||
|
uni.request({
|
||||||
|
url: 'https://apis.map.qq.com/ws/district/v1/getchildren?id=' + that1.regionId[0] + '&key=' +
|
||||||
|
that1.$api.key,
|
||||||
|
success(res) {
|
||||||
|
that1.regionSecondColumns = res.data.result[0].map(item => item.fullname)
|
||||||
|
that1.$refs.regionPicker.setColumnValues(1, that1.regionSecondColumns)
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
console.log('请求区域失败:', err);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
console.log('请求区域失败:', err);
|
console.log('请求区域失败:', err);
|
||||||
@@ -301,7 +351,7 @@
|
|||||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
|
||||||
that.$api.key,
|
that.$api.key,
|
||||||
success(res) {
|
success(res) {
|
||||||
console.log('地址转经纬度', res.data);
|
console.log('地址转经纬度', that.form.region, res.data);
|
||||||
if (res.data.message == "query ok") {
|
if (res.data.message == "query ok") {
|
||||||
// console.log('lat', res.data.result.location.lat);
|
// console.log('lat', res.data.result.location.lat);
|
||||||
that.form.latitude = res.data.result.location.lat
|
that.form.latitude = res.data.result.location.lat
|
||||||
@@ -347,11 +397,10 @@
|
|||||||
},
|
},
|
||||||
karmaConfirm(e) {
|
karmaConfirm(e) {
|
||||||
this.show3 = false
|
this.show3 = false
|
||||||
|
|
||||||
},
|
},
|
||||||
regionConfirm(e) {
|
regionConfirm(e) {
|
||||||
this.show1 = false
|
this.show1 = false
|
||||||
this.form.region = e.value[0]
|
this.form.region = e.value[0] + '-' + e.value[1]
|
||||||
},
|
},
|
||||||
getDetail(type, id) {
|
getDetail(type, id) {
|
||||||
console.log('type, id', type, id);
|
console.log('type, id', type, id);
|
||||||
@@ -423,8 +472,6 @@
|
|||||||
this.$refs.uPicker.setColumnValues(1, this.Karmacolumns)
|
this.$refs.uPicker.setColumnValues(1, this.Karmacolumns)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
isChecked(index) {
|
isChecked(index) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<DropDown @getQueryInfo="getShopList"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||||
@@ -52,6 +52,7 @@
|
|||||||
// this.pageNum=1
|
// this.pageNum=1
|
||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
|
this.$refs.dropdown.resetInfo()
|
||||||
|
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
@@ -133,6 +134,10 @@
|
|||||||
...query
|
...query
|
||||||
})
|
})
|
||||||
return q
|
return q
|
||||||
|
},
|
||||||
|
cancelPageNum() {
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.refresh = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<DropDown @getQueryInfo="getShopList"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
// this.pageNum=1
|
// this.pageNum=1
|
||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
|
this.$refs.dropdown.resetInfo()
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -133,6 +133,10 @@
|
|||||||
...query
|
...query
|
||||||
})
|
})
|
||||||
return q
|
return q
|
||||||
|
},
|
||||||
|
cancelPageNum() {
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.refresh = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ const service = {
|
|||||||
header: header,
|
header: header,
|
||||||
success: res => {
|
success: res => {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
console.log('res===',res);
|
|
||||||
isOutTime(res);
|
isOutTime(res);
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
|
|||||||
Reference in New Issue
Block a user