瀏覽代碼

地址选择器修改,用户端绑定楼盘接口

一懒众山小 3 年之前
父節點
當前提交
eb9ff9e4b5

+ 267 - 279
src/components/page-component/app-area-picker/app-area-picker.vue

xqd xqd xqd
@@ -1,24 +1,32 @@
 <template>
 	<view class="dir-left-nowrap cross-center">
 		<!-- #ifdef MP-WEIXIN || MP-BAIDU || H5 -->
-		<picker class="box-grow-1 area-picker-left" mode="multiSelector" @change="bindMultiPickerChange"
-			@columnchange="bindMultiPickerColumnChange" :value="multiIndex" range-key="name" :range="multiArray">
-			<slot>
-				<text v-if="place!==`请选择`" class="address-name-color">{{place}}</text>
-				<text v-else class="address-place-name-color">{{place}}</text>
-			</slot>
+		<picker
+			class="box-grow-1 area-picker-left"
+			mode="multiSelector"
+			@change="bindMultiPickerChange"
+			@columnchange="bindMultiPickerColumnChange"
+			:value="multiIndex"
+			range-key="name"
+			:range="multiArray"
+		>	
+			<template v-if="$slots.default">
+				<slot></slot>
+			</template>
+			<template v-else>
+				<text v-if="place !== `请选择`" class="address-name-color">{{ place }}</text>
+				<text v-else class="address-place-name-color">{{ place }}</text>
+			</template>
 		</picker>
 		<!-- #endif -->
 
 		<!-- #ifdef MP-ALIPAY || MP-TOUTIAO -->
 		<view class="area-picker-left" @click="showAreaPicker">
-			<text v-if="place!==`请选择`" class="address-name-color">{{place}}</text>
-			<text v-else class="address-place-name-color">{{place}}</text>
+			<text v-if="place !== `请选择`" class="address-name-color">{{ place }}</text>
+			<text v-else class="address-place-name-color">{{ place }}</text>
 		</view>
 		<view class="area-picker" :class="area_picker_show">
-			<view class="area-picker-bg" bindtap="hideAreaPicker">
-				<scroll-view></scroll-view>
-			</view>
+			<view class="area-picker-bg" bindtap="hideAreaPicker"><scroll-view></scroll-view></view>
 			<view class="area-picker-body">
 				<scroll-view>
 					<view class="area-picker-top">
@@ -26,21 +34,26 @@
 						<text class="area-picker-confirm" @click="areaPickerConfirm">确认</text>
 					</view>
 					<view class="area-picker-row">
-						<picker-view v-if="multiIndex && multiIndex.length" indicator-style="height: 50px"
-							style="width: 100%; height: 250px;" :value="multiIndex" @change="areaPickerChange">
+						<picker-view
+							v-if="multiIndex && multiIndex.length"
+							indicator-style="height: 50px"
+							style="width: 100%; height: 250px;"
+							:value="multiIndex"
+							@change="areaPickerChange"
+						>
 							<picker-view-column>
-								<view v-if="multiArray[0]" v-for="(item,index) in multiArray[0]" :key="index"
-									style="line-height: 50px;height: 50px;text-align: center">{{item.name}}
+								<view v-if="multiArray[0]" v-for="(item, index) in multiArray[0]" :key="index" style="line-height: 50px;height: 50px;text-align: center">
+									{{ item.name }}
 								</view>
 							</picker-view-column>
 							<picker-view-column>
-								<view v-if="multiArray[1]" v-for="(item,index) in multiArray[1]" :key="index"
-									style="line-height: 50px;height: 50px;text-align: center">{{item.name}}
+								<view v-if="multiArray[1]" v-for="(item, index) in multiArray[1]" :key="index" style="line-height: 50px;height: 50px;text-align: center">
+									{{ item.name }}
 								</view>
 							</picker-view-column>
 							<picker-view-column>
-								<view v-if="multiArray[2]" v-for="(item,index) in multiArray[2]" :key="index"
-									style="line-height: 50px;height: 50px;text-align: center">{{item.name}}
+								<view v-if="multiArray[2]" v-for="(item, index) in multiArray[2]" :key="index" style="line-height: 50px;height: 50px;text-align: center">
+									{{ item.name }}
 								</view>
 							</picker-view-column>
 						</picker-view>
@@ -49,308 +62,283 @@
 			</view>
 		</view>
 		<!-- #endif -->
-		<slot>
-			<image class="box-grow-0 arrow-image"
-				src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png"></image>
-		</slot>
+		<image v-if="!$slots.default" class="box-grow-0 arrow-image" src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png"></image>
 	</view>
 </template>
 
 <script>
-	export default {
-		name: "app-area-picker",
-		props: {
-			ids: {
-				type: Array,
-				default: function() {
-					return []
-				}
+export default {
+	name: 'app-area-picker',
+	props: {
+		ids: {
+			type: Array,
+			default: function() {
+				return [];
 			}
-		},
-		data() {
-			return {
-				tempIds: this.ids,
-				area_picker_show: '',
-				list: [],
-				multiIndex: [],
-				multiArray: [],
-				place: '',
+		}
+	},
+	data() {
+		return {
+			tempIds: this.ids,
+			area_picker_show: '',
+			list: [],
+			multiIndex: [],
+			multiArray: [],
+			place: ''
+		};
+	},
+	created: function() {
+		this.tempIds = this.tempIds.concat();
+	},
+	watch: {
+		ids: {
+			handler: function(newData, oldData) {
+				this.tempIds = this.ids;
 			}
 		},
-		created: function() {
-			this.tempIds = this.tempIds.concat();
-		},
-		watch: {
-			ids: {
-				handler: function(newData, oldData) {
-					this.tempIds = this.ids;
-				},
-			},
-			tempIds: {
-				handler: function(newData, oldData) {
-					const self = this;
-					self.before((data) => {
-						self.init(data);
-					})
-					this.$emit('ids', this.tempIds);
-				},
-				deep: true,
-				immediate: true,
-			},
-		},
-
-		methods: {
-			//#ifdef MP-ALIPAY || MP-TOUTIAO
-			showAreaPicker: function() {
-				this.area_picker_show = 'active';
+		tempIds: {
+			handler: function(newData, oldData) {
+				const self = this;
+				self.before(data => {
+					self.init(data);
+				});
+				this.$emit('ids', this.tempIds);
 			},
+			deep: true,
+			immediate: true
+		}
+	},
 
-			hideAreaPicker: function() {
-				this.area_picker_show = '';
-			},
+	methods: {
+		//#ifdef MP-ALIPAY || MP-TOUTIAO
+		showAreaPicker: function() {
+			this.area_picker_show = 'active';
+		},
 
-			areaPickerConfirm: function(e) {
-				this.bindMultiPickerChange({
-					detail: {
-						value: this.multiIndex
-					}
-				});
-				this.hideAreaPicker();
-			},
+		hideAreaPicker: function() {
+			this.area_picker_show = '';
+		},
 
-			areaPickerChange: function(e) {
-				const self = this;
-				if (self.area_picker_show == '') return;
-				let detail = {
-					column: '',
-					value: '',
-				};
-				for (let i = 0; i < 3; i++) {
-					if (e.detail.value[i] !== self.multiIndex[i]) {
-						detail.column = i;
-						detail.value = e.detail.value[i];
-						break;
-					}
+		areaPickerConfirm: function(e) {
+			this.bindMultiPickerChange({
+				detail: {
+					value: this.multiIndex
 				}
-				self.multiIndex = e.detail.value;
-				self.bindMultiPickerColumnChange({
-					detail: detail
-				});
-			},
-			//#endif
+			});
+			this.hideAreaPicker();
+		},
 
-			before(cb) {
-				const self = this;
-				const district = this.$storage.getStorageSync("_DISTRICT");
-				if (district) {
-					cb(district);
-				} else {
-					this.$request({
-						url: self.$api.default.district,
-					}).then(info => {
-						if (info.code === 0) {
-							this.$storage.setStorageSync("_DISTRICT", info.data.list);
-							cb(info.data.list);
-						}
-					})
+		areaPickerChange: function(e) {
+			const self = this;
+			if (self.area_picker_show == '') return;
+			let detail = {
+				column: '',
+				value: ''
+			};
+			for (let i = 0; i < 3; i++) {
+				if (e.detail.value[i] !== self.multiIndex[i]) {
+					detail.column = i;
+					detail.value = e.detail.value[i];
+					break;
 				}
-			},
+			}
+			self.multiIndex = e.detail.value;
+			self.bindMultiPickerColumnChange({
+				detail: detail
+			});
+		},
+		//#endif
 
-			init: function(list) {
-				const null_status = this.tempIds.length === 3 && this.tempIds[0] != 0;
-				const ids = null_status ? this.tempIds : [2, 3, 4];
-				const multiIndex = this.getIndex(list, ids);
-				const multiArray = [
-					list,
-					list[multiIndex[0]].list,
-					list[multiIndex[0]].list[multiIndex[1]].list
-				];
-				let place = multiArray[0][multiIndex[0]].name +
-					',' +
-					multiArray[1][multiIndex[1]].name +
-					',' +
-					multiArray[2][multiIndex[2]].name;
+		before(cb) {
+			const self = this;
+			const district = this.$storage.getStorageSync('_DISTRICT');
+			if (district) {
+				cb(district);
+			} else {
+				this.$request({
+					url: self.$api.default.district
+				}).then(info => {
+					if (info.code === 0) {
+						this.$storage.setStorageSync('_DISTRICT', info.data.list);
+						cb(info.data.list);
+					}
+				});
+			}
+		},
 
-				/////初始化
-				let eve = [
-					multiArray[0][multiIndex[0]],
-					multiArray[1][multiIndex[1]],
-					multiArray[2][multiIndex[2]],
-				];
-				////
-				this.setEvent(eve, null_status);
-				[this.list, this.multiArray, this.multiIndex, this.place] = [list, multiArray, multiIndex,
-					null_status ? place : '请选择'
-				]
-			},
+		init: function(list) {
+			const null_status = this.tempIds.length === 3 && this.tempIds[0] != 0;
+			const ids = null_status ? this.tempIds : [2, 3, 4];
+			const multiIndex = this.getIndex(list, ids);
+			const multiArray = [list, list[multiIndex[0]].list, list[multiIndex[0]].list[multiIndex[1]].list];
+			let place = multiArray[0][multiIndex[0]].name + ',' + multiArray[1][multiIndex[1]].name + ',' + multiArray[2][multiIndex[2]].name;
 
-			getIndex: function(list, data) {
-				let arr = [];
-				list.map((item, index) => {
-					if (data[0] == item.id) arr.push(index)
-				});
+			/////初始化
+			let eve = [multiArray[0][multiIndex[0]], multiArray[1][multiIndex[1]], multiArray[2][multiIndex[2]]];
+			////
+			this.setEvent(eve, null_status);
+			[this.list, this.multiArray, this.multiIndex, this.place] = [list, multiArray, multiIndex, null_status ? place : '请选择'];
+		},
 
-				list[arr[0]].list.map((item, index) => {
-					if (data[1] == item.id) arr.push(index)
-				});
+		getIndex: function(list, data) {
+			let arr = [];
+			list.map((item, index) => {
+				if (data[0] == item.id) arr.push(index);
+			});
 
-				list[arr[0]].list[arr[1]].list.map((item, index) => {
-					if (data[2] == item.id) arr.push(index);
-				});
-				return arr;
-			},
+			list[arr[0]].list.map((item, index) => {
+				if (data[1] == item.id) arr.push(index);
+			});
 
-			bindMultiPickerChange: function(e) {
-				let list = [
-					this.multiArray[0][e.detail.value[0]],
-					this.multiArray[1][e.detail.value[1]],
-					this.multiArray[2][e.detail.value[2]],
-				];
+			list[arr[0]].list[arr[1]].list.map((item, index) => {
+				if (data[2] == item.id) arr.push(index);
+			});
+			return arr;
+		},
 
-				let place = list[0].name +
-					',' +
-					list[1].name +
-					',' +
-					list[2].name;
-				[this.multiIndex, this.place] = [e.detail.value, place];
-				this.setEvent(list);
-			},
+		bindMultiPickerChange: function(e) {
+			let list = [this.multiArray[0][e.detail.value[0]], this.multiArray[1][e.detail.value[1]], this.multiArray[2][e.detail.value[2]]];
 
-			setEvent: function(list, status = true) {
-				let data = {
-					province: {
-						id: list[0].id,
-						name: list[0].name
-					},
-					city: {
-						id: list[1].id,
-						name: list[1].name
-					},
-					district: {
-						id: list[2].id,
-						name: list[2].name
-					},
-				};
-				this.$emit('customevent', status ? data : null);
-			},
+			let place = list[0].name + ',' + list[1].name + ',' + list[2].name;
+			[this.multiIndex, this.place] = [e.detail.value, place];
+			this.setEvent(list);
+		},
 
-			bindMultiPickerColumnChange: function(e) {
-				let data = {
-					multiArray: this.multiArray,
-					multiIndex: this.multiIndex
-				};
-				data.multiIndex[e.detail.column] = e.detail.value;
-				switch (e.detail.column) {
-					case 0:
-						data.multiIndex.splice(1, 1, 0);
-						data.multiIndex.splice(2, 1, 0);
-						data.multiArray.splice(1, 1, this.list[data.multiIndex[0]].list);
-						data.multiArray.splice(2, 1, this.list[data.multiIndex[0]].list[data.multiIndex[1]].list);
-						break;
-					case 1:
-						data.multiIndex.splice(2, 1, 0);
-						data.multiArray.splice(2, 1, this.list[data.multiIndex[0]].list[data.multiIndex[1]].list);
-						break;
+		setEvent: function(list, status = true) {
+			let data = {
+				province: {
+					id: list[0].id,
+					name: list[0].name
+				},
+				city: {
+					id: list[1].id,
+					name: list[1].name
+				},
+				district: {
+					id: list[2].id,
+					name: list[2].name
 				}
-				[this.multiArray, this.multiIndex] = [data.multiArray, data.multiIndex]
-			},
+			};
+			this.$emit('customevent', status ? data : null);
 		},
+
+		bindMultiPickerColumnChange: function(e) {
+			let data = {
+				multiArray: this.multiArray,
+				multiIndex: this.multiIndex
+			};
+			data.multiIndex[e.detail.column] = e.detail.value;
+			switch (e.detail.column) {
+				case 0:
+					data.multiIndex.splice(1, 1, 0);
+					data.multiIndex.splice(2, 1, 0);
+					data.multiArray.splice(1, 1, this.list[data.multiIndex[0]].list);
+					data.multiArray.splice(2, 1, this.list[data.multiIndex[0]].list[data.multiIndex[1]].list);
+					break;
+				case 1:
+					data.multiIndex.splice(2, 1, 0);
+					data.multiArray.splice(2, 1, this.list[data.multiIndex[0]].list[data.multiIndex[1]].list);
+					break;
+			}
+			[this.multiArray, this.multiIndex] = [data.multiArray, data.multiIndex];
+		}
 	}
+};
 </script>
 
 <style scoped lang="scss">
-	.area-picker-left {
-		min-width: #{115rpx};
-		font-size: #{28rpx};
-		padding-right: #{24rpx};
-		line-height: 1.5;
-		margin-left: auto;
-
-		.address-name-color {
-			color: #353535;
-		}
+.area-picker-left {
+	min-width: #{115rpx};
+	font-size: #{28rpx};
+	padding-right: #{24rpx};
+	line-height: 1.5;
+	margin-left: auto;
 
-		.address-place-name-color {
-			color: #999999;
-		}
+	.address-name-color {
+		color: #353535;
 	}
 
-	.arrow-image {
-		width: #{12rpx};
-		height: #{24rpx};
+	.address-place-name-color {
+		color: #999999;
 	}
+}
 
-	/* #ifdef MP-ALIPAY || MP-TOUTIAO  */
-	.area-picker {
-		position: fixed;
-		z-index: 1600;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		transform: translateY(100%);
-		transition: 250ms opacity;
-		opacity: 0;
-		background: rgba(0, 0, 0, .3);
-	}
+.arrow-image {
+	width: #{12rpx};
+	height: #{24rpx};
+}
 
-	.area-picker.active {
-		transform: translateY(0);
-		opacity: 1;
-	}
+/* #ifdef MP-ALIPAY || MP-TOUTIAO  */
+.area-picker {
+	position: fixed;
+	z-index: 1600;
+	left: 0;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	transform: translateY(100%);
+	transition: 250ms opacity;
+	opacity: 0;
+	background: rgba(0, 0, 0, 0.3);
+}
 
-	.area-picker .area-picker-bg {
-		flex-grow: 1;
-		position: relative;
-	}
+.area-picker.active {
+	transform: translateY(0);
+	opacity: 1;
+}
 
-	.area-picker .area-picker-bg>scroll-view {
-		left: 0;
-		top: 0;
-		height: 100%;
-		width: 100%;
-		position: absolute;
-	}
+.area-picker .area-picker-bg {
+	flex-grow: 1;
+	position: relative;
+}
 
-	.area-picker .area-picker-body {
-		flex-grow: 0;
-		height: #{600rpx};
-		background: #fff;
-		transform: translateY(100%);
-		transition: 250ms transform;
-		position: relative;
-	}
+.area-picker .area-picker-bg > scroll-view {
+	left: 0;
+	top: 0;
+	height: 100%;
+	width: 100%;
+	position: absolute;
+}
 
-	.area-picker.active .area-picker-body {
-		transform: translateY(0);
-	}
+.area-picker .area-picker-body {
+	flex-grow: 0;
+	height: #{600rpx};
+	background: #fff;
+	transform: translateY(100%);
+	transition: 250ms transform;
+	position: relative;
+}
 
-	.area-picker .area-picker-body>scroll-view {
-		left: 0;
-		top: 0;
-		height: 100%;
-		width: 100%;
-		position: absolute;
-	}
+.area-picker.active .area-picker-body {
+	transform: translateY(0);
+}
 
-	.area-picker .area-picker-cancel,
-	.area-picker .area-picker-confirm {
-		display: inline-block;
-		padding: #{24rpx};
-		color: #888;
-	}
+.area-picker .area-picker-body > scroll-view {
+	left: 0;
+	top: 0;
+	height: 100%;
+	width: 100%;
+	position: absolute;
+}
 
-	.area-picker .area-picker-confirm {
-		float: right;
-		color: #00aa00;
-	}
+.area-picker .area-picker-cancel,
+.area-picker .area-picker-confirm {
+	display: inline-block;
+	padding: #{24rpx};
+	color: #888;
+}
 
-	.area-picker .area-picker-row {
-		width: 100%;
-		height: #{500rpx};
-	}
+.area-picker .area-picker-confirm {
+	float: right;
+	color: #00aa00;
+}
+
+.area-picker .area-picker-row {
+	width: 100%;
+	height: #{500rpx};
+}
 
-	/* #endif */
+/* #endif */
 </style>

+ 4 - 0
src/core/apiUrl.js

xqd
@@ -21,6 +21,10 @@ const apiUrl = {
         status: 'api/index/shop-status',
         //test: 'api/test/index',
         indexWechat: 'api/index/index-wechat',
+		
+		// hxj新增
+		binding_estate:'api/estate/binding-estate-sale',
+		sale_list:'api/estate/sale-list'
     },
     finance: {
         cash: 'api/finance/cash',

+ 1 - 1
src/pages.json

xqd
@@ -13,7 +13,7 @@
 		, {
 			"path": "pages/index/binding/binding",
 			"style": {
-				"navigationBarTitleText": "绑定楼盘",
+				"navigationBarTitleText": "我的楼盘",
 				"enablePullDownRefresh": false
 			}
 

+ 3 - 3
src/pages/case/hot_sale_project.vue

xqd
@@ -19,11 +19,11 @@
 			<view class="item" v-for="(item,index) in CompositionList" :key="index" @click="goPage(item.id)">
 				<view class="main-between img">
 					<view style="width: 419rpx;height: 281rpx;">
-						<image style="width: 419rpx;height: 281rpx;" src="https://img0.baidu.com/it/u=2763244517,2282347331&fm=26&fmt=auto" mode=""></image>
+						<image style="width: 419rpx;height: 281rpx;" :src="item.banner_imgs[0]" mode=""></image>
 					</view>
 					<view style="width: 206rpx;">
-						<image style="width: 206rpx;height: 136rpx;" src="https://img0.baidu.com/it/u=3232043632,3119790085&fm=26&fmt=auto" mode=""></image>
-						<image style="width: 206rpx;height: 136rpx;" src="https://img0.baidu.com/it/u=2817072178,3148297616&fm=26&fmt=auto" mode=""></image>
+						<image style="width: 206rpx;height: 136rpx;" :src="item.banner_imgs[1]?item.banner_imgs[1]:'https://img0.baidu.com/it/u=3232043632,3119790085&fm=26&fmt=auto'" mode=""></image>
+						<image style="width: 206rpx;height: 136rpx;" :src="item.banner_imgs[1]?item.banner_imgs[1]:'https://img0.baidu.com/it/u=2817072178,3148297616&fm=26&fmt=auto'" mode=""></image>
 					</view>
 				</view>
 				<view class="main-between pl" >

+ 28 - 19
src/pages/index/binding/binding.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="properties_list">
-			<view class="item main-left" v-for="(item,index) in dataList">
+			<view class="item main-left" v-for="(item,index) in dataList" :key="index">
 				<view class="left">
 					<image :src="item.cover_img" mode=""></image>
 				</view>
@@ -20,15 +20,6 @@
 		</view> -->
 		<view class="form-box">
 			<view class="title">楼盘信息</view>
-			<view class="main-between cross-center item" @click="selectBuild">
-				<view class="title_1">楼盘名称</view>
-				<view class="main-right cross-center">
-					<text :class="{'val':name!=='','pla':name===''}">{{name===''?'请选择':name}}</text>
-					<image class="arrow-right" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png"
-						mode=""></image>
-				</view>
-			</view>
-			<view class="line"></view>
 			<AppAreaPicker @customevent="areaEvent">
 				<view class="main-between cross-center item" style="padding-right: 8rpx;">
 					<view class="title_1">区域信息</view>
@@ -41,6 +32,16 @@
 				</view>
 			</AppAreaPicker>
 			<view class="line"></view>
+			<view class="main-between cross-center item" @click="selectBuild">
+				<view class="title_1">楼盘名称</view>
+				<view class="main-right cross-center">
+					<text :class="{'val':name!=='','pla':name===''}">{{name===''?'请选择':name}}</text>
+					<image class="arrow-right" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png"
+						mode=""></image>
+				</view>
+			</view>
+			
+			<!-- <view class="line"></view>
 			<picker mode="selector" @change="bindPickerNature" :range="natureList">
 				<view class="main-between cross-center item">
 					<view class="title_1">楼盘性质</view>
@@ -51,9 +52,9 @@
 						</image>
 					</view>
 				</view>
-			</picker>
-			<view class="line"></view>
-			<view class="main-between cross-center item" @click="selectSale">
+			</picker> -->
+			<view class="line" v-show="name!=''"></view>
+			<view class="main-between cross-center item" @click="selectSale" v-show="name!=''">
 				<view class="title_1">绑定销售</view>
 				<view class="main-right cross-center">
 					<text :class="{'val':sale!=='','pla':sale===''}">{{sale?sale:'请选择'}}</text>
@@ -77,8 +78,12 @@
 			return {
 				name: '',
 				region: '',
+				regionId:{},
 				nature: '',
 				sale: '',
+				
+				estate_id:'',
+				sale_id:'',
 
 				natureList: ['住宅用房', '非住宅用房'],
 
@@ -109,7 +114,9 @@
 			var currPage = pages[pages.length - 1]; //当前页面
 
 			'estateInfo' in currPage.$vm ? this.name = currPage.$vm.estateInfo.name : ''
+			'estateInfo' in currPage.$vm ? this.estate_id = currPage.$vm.estateInfo.id : ''
 			'saleInfo' in currPage.$vm ? this.sale = currPage.$vm.saleInfo.name : ''
+			'saleInfo' in currPage.$vm ? this.sale_id = currPage.$vm.saleInfo.id : ''
 
 			console.log(currPage.$vm)
 		},
@@ -118,7 +125,7 @@
 		},
 		methods: {
 			addmyEstate() {
-				if(this.name==='' || this.region==='' || this.nature==='' || this.sale===''){
+				if(this.name==='' || this.region===''  || this.sale===''){
 					uni.showToast({
 						title:'请完整填写信息',
 						icon:'none'
@@ -149,10 +156,12 @@
 			},
 			areaEvent(data) {
 				if (data) {
-					// this.form.province_id = data.province.id;
-			 	// this.form.city_id = data.city.id;
-					// this.form.district_id = data.district.id;
+					this.regionId.province_id = data.province.id;
+					this.regionId.city_id = data.city.id;
+					this.regionId.district_id = data.district.id;
 					this.region = [data.province.name, data.city.name, data.district.name].join('')
+					
+					this.selectBuild()
 				}
 			},
 			getDate(page, name) {
@@ -172,12 +181,12 @@
 			},
 			selectBuild() {
 				uni.navigateTo({
-					url: '/pages/sale/properties/addProperties'
+					url: `/pages/sale/properties/addProperties?regionId=${JSON.stringify(this.regionId)}`
 				})
 			},
 			selectSale() {
 				uni.navigateTo({
-					url: '/pages/index/binding/bindingSale'
+					url: `/pages/index/binding/bindingSale?estate_id=${this.estate_id}`
 				})
 			},
 			bindPickerNature(e) {

+ 23 - 6
src/pages/index/binding/bindingSale.vue

xqd xqd
@@ -11,17 +11,18 @@
 				<view class="title">世龙广场销售人员</view>
 				<view class="main-right cross-center"><text class="pla">更多</text><image class="arrow-right" src="https://t17.9026.com/web/statics/image/index/arrow-right-gray.png" mode=""></image></view>
 			</view>
-			<view class="main-between cross-center item" v-for="(item,index) in 4" :key="index" @click="selectSale(index)">
+			<view class="main-between cross-center item" v-for="(item,index) in dataList" :key="index" @click="selectSale(index,item.id,item.salesperson.name)">
 				<view class="main-left">
-					<image style="width: 79rpx;height: 79rpx;border-radius: 50%;margin-right: 24rpx;" src="https://img2.baidu.com/it/u=304846655,1860504905&fm=26&fmt=auto" mode=""></image>
+					<image style="width: 79rpx;height: 79rpx;border-radius: 50%;margin-right: 24rpx;" :src="item.salesperson.pic_url" mode=""></image>
 					<view>
-						<view class="name">王晓晓</view>
-						<view class="phone">15888888888</view>
+						<view class="name">{{item.salesperson.name}}</view>
+						<view class="phone">{{item.salesperson.mobile}}</view>
 					</view>
 				</view>
 				<image v-show="selectSaleIndex===index" style="width: 36rpx;height: 36rpx;" src="https://t17.9026.com/web/statics/image/index/select_sale.png" mode=""></image>
 			</view>
 		</view>
+		<view style="height: 150rpx;"></view>
 		<button type="default" @click="bindingSale" :class="{'add':true, 'allow-add':selectSaleIndex!==-1, 'not-add':selectSaleIndex===-1}" :disabled="fasle">确认绑定</button>
 	</view>
 </template>
@@ -31,15 +32,31 @@
 		data() {
 			return {
 				selectSaleIndex:-1,
+				
+				dataList:[],
 			};
 		},
+		onLoad(option) {
+			console.log(option.estate_id)
+			this.$request({
+				url:this.$api.index.sale_list,
+				data:{
+					estate_id:option.estate_id
+				},
+				method:'post'
+			}).then(res=>{
+				if(res.code===0){
+					this.dataList=res.data
+				}
+			})
+		},
 		methods:{
-			selectSale(index){
+			selectSale(index,id,name){
 				this.selectSaleIndex=index
 				var pages = getCurrentPages();
 				var currPage = pages[pages.length - 1]; //当前页面
 				var prevPage = pages[pages.length - 2]; //上一个页面
-				prevPage.$vm.saleInfo={id:1,name:'王晓晓'}
+				prevPage.$vm.saleInfo={id:id,name:name}
 			},
 			bindingSale(){
 				if(this.selectSaleIndex===-1){

+ 2 - 2
src/pages/index/index.vue

xqd
@@ -26,9 +26,9 @@
 						 :hasHeight="false"
 						 @leftClick="navProperties"
             ></app-nav-bar>
-			<app-diy-page @buyProduct="buyProduct" v-if="destroy" :page-hide="pageHide" :home-pages="homePages"
+			<!-- <app-diy-page @buyProduct="buyProduct" v-if="destroy" :page-hide="pageHide" :home-pages="homePages"
                           :is_storage="is_storage" :theme="getTheme" :page_id="page_id" :is_required="is_required"
-                          :coupon_req="coupon_req"></app-diy-page>
+                          :coupon_req="coupon_req"></app-diy-page> -->
 
 			<hxj-index :home-pages="homePages"></hxj-index>
 		</template>

+ 4 - 1
src/pages/sale/properties/addProperties.vue

xqd xqd xqd
@@ -59,9 +59,11 @@
 				
 				dataList:[],
 				selectIndex:-1,
+				regionId:{},
 			};
 		},
 		onLoad(option) {
+			this.regionId=JSON.parse(option.regionId)
 			this.type=option.type
 			this.getDate(1)
 		},
@@ -95,7 +97,7 @@
 			},
 			search(e){
 				this.$utils.debounce(()=>{
-					this.getDate(1,this.name)
+					this.getDate(1)
 				},800)
 			},
 			getDate(page){
@@ -105,6 +107,7 @@
 						page: page,
 						is_myself: 0,
 						name: this.name,
+						...this.regionId
 					},
 					method: 'post'
 				}).then(res=>{

+ 0 - 474
src/pages/user-center/user-center - 副本.vue

xqd
@@ -1,474 +0,0 @@
-<template>
-    <app-layout>
-        <app-user-center-top
-            :top-style="userCenter.top_style"
-            :top-pic-url="userCenter.top_pic_url"
-            :member-pic-url="userCenter.member_pic_url"
-            :is_icon_super_vip="is_icon_super_vip"
-            :user-name-color="userCenter.user_name_color"
-        ></app-user-center-top>
-
-        <view class="u-foot-box main-center" v-if="userCenter.is_foot_bar_status == 1">
-            <view @click="router(item.name)" class="u-foot-item main-center" v-for="(item, key) in foot_bar" :key="key">
-                <image class="u-icon" :src="item.icon_url"></image>
-                <view class="u-foot-info">
-                    <view class="u-foot-num">{{item.name | showNum(userInfo)}}</view>
-                    <view>{{item.name}}</view>
-                </view>
-            </view>
-            <view class="u-line"></view>
-        </view>
-
-        <view style="padding: 0 24rpx">
-            <app-vip-card></app-vip-card>
-        </view>
-
-        <app-account-balance
-            v-if="account_bar_status == 1"
-            :margin="true"
-            :round="true"
-            :input-user-center="userCenter"
-        ></app-account-balance>
-
-        <app-my-order
-            v-if="userCenter.is_order_bar_status == 1"
-            :margin="true"
-            :round="true"
-            :theme="getTheme"
-            :order_bar="userCenter.order_bar"
-        ></app-my-order>
-
-        <view class="app-my-service" v-if="userCenter.is_menu_status == 1">
-            <view class="title" v-if="userCenter.menu_title">{{userCenter.menu_title}}</view>
-            <view class="list" :class="[listStyle]">
-                <!--  #ifdef MP -->
-                <view class="item" v-for="(item, index) in userCenter.menus" :key="index" >
-                    <app-jump-button form
-                                     :url="item.link_url"
-                                     :open_type="item.open_type"
-                                     :item="item"
-                                     :arrangement="`${userCenter.menu_style === '1' ? 'row' : userCenter.menu_style === '2' ? 'column' : ''}`">
-                        <view style="width: 100%"
-                              class="item-container"
-                              :class="[
-                                  userCenter.menu_style=='1'?'dir-left-nowrap cross-center':'',
-                                  userCenter.menu_style=='2'?'dir-top-nowrap cross-center':'',
-                              ]">
-                            <view class="box-grow-0">
-                                <image :src="item.icon_url" class="icon"></image>
-                            </view>
-                            <view class="box-grow-1" style="max-width: 100%">
-                                <view class="name">{{item.name}}</view>
-                            </view>
-                            <view class="box-grow-0" v-if="userCenter.menu_style=='1'">
-                                <image src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png" class="arrow"></image>
-                            </view>
-                        </view>
-                    </app-jump-button>
-                </view>
-                <!--  #endif -->
-                <!--  #ifdef H5 -->
-                <block v-for="(item, index) in menus" :key="index">
-                    <view class="item" v-if="item.open_type !== 'app'">
-                        <app-jump-button form
-                                         :url="item.link_url"
-                                         :open_type="item.open_type"
-                                         :item="item"
-                                         :arrangement="`${userCenter.menu_style === '1' ? 'row' : userCenter.menu_style === '2' ? 'column' : ''}`">
-                            <view style="width: 100%"
-                                  class="item-container"
-                                  :class="[
-                                  userCenter.menu_style=='1'?'dir-left-nowrap cross-center':'',
-                                  userCenter.menu_style=='2'?'dir-top-nowrap cross-center':'',
-                              ]">
-                                <view class="box-grow-0">
-                                    <image :src="item.icon_url" class="icon"></image>
-                                </view>
-                                <view class="box-grow-1" style="max-width: 100%">
-                                    <view class="name">{{item.name}}</view>
-                                </view>
-                                <view class="box-grow-0" v-if="userCenter.menu_style=='1'">
-                                    <image src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png" class="arrow"></image>
-                                </view>
-                            </view>
-                        </app-jump-button>
-                    </view>
-                    <view  v-else :id="item.id" class="item"></view>
-                </block>
-
-                <!--  #endif -->
-            </view>
-        </view>
-        <!-- #ifdef H5 -->
-        <view v-if="userInfo && isShowSetting" class="bd-setting dir-left-nowrap main-between cross-center" @click="routerGo">
-            <view>设置</view>
-            <image src="https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png" class="bd-arrow"></image>
-        </view>
-        <!-- #endif -->
-
-        <app-copyright
-            v-if="copyright && copyright.status == '1'"
-            background-color="transparent"
-            :link="copyrightLink"
-            :pic-url="copyright.pic_url"
-            :text="copyright.description"
-        ></app-copyright>
-    </app-layout>
-</template>
-
-<script>
-    import {mapGetters, mapState} from 'vuex';
-    import AppUserCenterTop from '../../components/page-component/app-user-center-top/app-user-center-top.vue';
-    import AppAccountBalance from '../../components/page-component/app-account-balance/app-account-balance.vue';
-    import AppMyOrder from '../../components/page-component/app-my-order/app-my-order.vue';
-    import AppCopyright from '../../components/page-component/app-copyright/app-copyright.vue';
-    import AppVipCard from '../../components/page-component/app-vip-card/app-vip-card.vue';
-
-    export default {
-        name: 'user-center',
-        components: {
-            AppCopyright,
-            AppUserCenterTop,
-            AppAccountBalance,
-            AppMyOrder,
-            AppVipCard,
-        },
-        computed: {
-            ...mapState({
-                copyright: state => state.mallConfig.copyright,
-                userInfo: state => state.user.info,
-                is_icon_super_vip: function (state) {
-                    return state.mallConfig.mall.setting.is_icon_super_vip;
-                },
-                foot_bar: function(state) {
-                    return state.userCenter.data.foot_bar;
-                },
-                account_bar_status: function() {
-                    return this.userCenter.account_bar ? this.userCenter.account_bar.status : 0;
-                },
-                // #ifdef H5
-                isWechat: function() {
-                    return this.$jwx.isWechat();
-                },
-                menus: function() {
-                    let menus = this.userCenter.menus;
-                    menus.forEach(item => {
-                        if(item.open_type === 'app') {
-                            item.id = this.$utils.guid('user-center');
-                            let username = this.$utils.getUrlParamApp(item.link_url, 'username');
-                            let path = this.$utils.getUrlParamApp(item.link_url, 'path');
-                            let strImg = ``;
-                            let size = uni.upx2px(50) + 'px';
-                            let style = `
-                                <style>
-                                .app-button-row {
-                                    height: 100%;
-                                    width: 100%;
-                                    display: flex;
-                                    flex-direction: row;
-                                    justify-content: center;
-                                    align-items: center;
-                                }
-
-                                .app-button-column {
-                                    height: 100%;
-                                    width: 100%;
-                                    display: flex;
-                                    flex-direction: column;
-                                    justify-content: center;
-                                    align-items: center;
-                                }
-                                .box-grow-0 {
-                                  min-width: 0;
-                                  -webkit-box-flex: 0;
-                                  -webkit-flex-grow: 0;
-                                  -ms-flex-positive: 0;
-                                  flex-grow: 0;
-                                  -webkit-flex-shrink: 0;
-                                  -ms-flex-negative: 0;
-                                  flex-shrink: 0;
-                                }
-
-                                .box-grow-1 {
-                                  min-width: 0;
-                                  -webkit-box-flex: 1;
-                                  -webkit-flex-grow: 1;
-                                  -ms-flex-positive: 1;
-                                  flex-grow: 1;
-                                  -webkit-flex-shrink: 1;
-                                  -ms-flex-negative: 1;
-                                  flex-shrink: 1;
-                                }
-
-                                    .name {
-                                        color: #666666;
-                                        white-space: nowrap;
-                                        overflow: hidden;
-                                        text-overflow: ellipsis;
-                                    }
-                                    .dir-left-nowrap {
-                                      display: -webkit-box;
-                                      display: -webkit-flex;
-                                      display: flex;
-                                      -webkit-flex-direction: row;
-                                      flex-direction: row;
-                                      flex-wrap: nowrap;
-                                    }
-
-                                .dir-top-nowrap {
-                                  display: -webkit-box;
-                                  display: -webkit-flex;
-                                  display: flex;
-                                  -webkit-box-orient: vertical;
-                                  -webkit-flex-direction: column;
-                                  flex-direction: column;
-                                  flex-wrap: nowrap;
-                                }
-
-                                .cross-center {
-                                  display: -webkit-box;
-                                  display: -webkit-flex;
-                                  display: flex;
-                                  -webkit-align-items: center;
-                                  align-items: center;
-                                }
-</style>
-                            `;
-                            let classStr = '';
-                            let font = '';
-                            let padding = '';
-                            let arrow = require("https://shop.9026.com/web/statics/image/mall/static/icon/arrow-right.png");
-                            if (this.userCenter.menu_style == 1) {
-                                let margin = uni.upx2px(16);
-                                strImg = `<img src="${item.icon_url}" width="${size}" height="${size}" style="margin-right: ${margin}px"/>`;
-                                font = '17px';
-                                padding = 0;
-                            } else if (this.userCenter.menu_style == 2) {
-                                let margin = uni.upx2px(28);
-                                strImg = `<img src="${item.icon_url}" width="${size}" height="${size}" style="margin-bottom: ${margin}px"/>`;
-                                classStr = 'name';
-                                font = uni.upx2px(24) + 'px';
-                                padding = `0px` + ' ' +uni.upx2px(12) +'px';
-                            }
-
-                            let str = `<div class="box-grow-0">${strImg}</div>
-                                        <div class="box-grow-1" style="max-width: 100%;"><div style="padding:${padding};font-size: ${font}" class="${classStr}">${item.name}</div></div>`;
-                            if (this.userCenter.menu_style == 1) {
-                                let width = uni.upx2px(12);
-                                let height = uni.upx2px(22);
-                                str+= ` <div class="box-grow-0">
-                                    <img src="${arrow}" width="${width}px" height="${height}px"/>
-                                </div>`
-                            }
-                            let div = ``;
-                            let div1 = '';
-                            if (this.userCenter.menu_style == 1) {
-                                let padding1 = uni.upx2px(20) + 'px';
-                                let padding2 = uni.upx2px(32) + 'px';
-                                div1 = `<div style="width: 100%;padding: ${padding1} ${padding2}" class="dir-left-nowrap cross-center">${str}</div>`
-                            } else {
-                                let padding = uni.upx2px(24) + 'px';
-                                div1 = `<div style="width: 100%;padding: ${padding} 0" class="dir-top-nowrap cross-center">${str}</div>`
-                            }
-                            if (this.userCenter.menu_style == 1) {
-                                div = `<div class="app-button-row">${div1}</div>`
-                            } else {
-                                div = `<div class="app-button-column">${div1}</div>`
-                            }
-                            style += div;
-                            this.$utils.createWxOpenLaunchWeapp(item.id, username, path, style);
-                        }
-                    });
-                    return menus;
-                }
-                // #endif
-            }),
-            copyrightLink() {
-                if (!this.copyright) return {};
-                let { open_type, new_link_url, params } = this.copyright.link;
-                return {
-                    openType: open_type,
-                    url: new_link_url,
-                    params: params ? params : []
-                };
-            },
-            ...mapGetters('mallConfig', {
-                getTheme: 'getTheme'
-            }),
-            ...mapGetters('userCenter',{
-                userCenter: 'userCenter'
-            }),
-            listStyle() {
-                if (this.userCenter.menu_style == 1) return 'row';
-                if (this.userCenter.menu_style == 2) return 'grid dir-left-wrap';
-                return '';
-            },
-            // #ifdef H5
-            isShowSetting: function () {
-                return this.$storage.getStorageSync('platform') !== 'wechat';
-            }
-            // #endif
-        },
-        onLoad() { this.$commonLoad.onload();
-            // #ifdef H5
-            this.$jwx.config();
-            // #endif
-			console.log('查看',this)
-        },
-        onShow() {
-            this.$event.on(this.$const.EVENT_USER_LOGIN).then(() => {
-                uni.redirectTo({
-                    url: `/pages/user-center/user-center`
-                });
-            });
-            if (this.$user.isLogin()) {
-                this.$store.dispatch('user/refresh');
-            }
-            this.$nextTick().then(() => {
-                this.$store.dispatch('userCenter/data');
-            });
-        },
-        methods: {
-            router(name) {
-                let url = '';
-                if (name === '我的收藏') {
-                    url = `/pages/favorite/favorite`;
-                } else {
-                    url = `/pages/foot/index/index`;
-                }
-                uni.navigateTo({
-                    url: url
-                });
-            },
-            // #ifdef H5
-            routerGo() {
-                uni.navigateTo({
-                    url: '/pages/registered/setting'
-                });
-            },
-            // #endif
-
-        },
-        filters: {
-            showNum(name, userInfo) {
-                if (name === '我的收藏') {
-                    return userInfo && userInfo.favorite ? userInfo.favorite : 0;
-                } else {
-                    return userInfo && userInfo.footprint ? userInfo.footprint : 0;
-                }
-            }
-        }
-    }
-</script>
-
-<style scoped lang="scss">
-.app-my-service {
-    width: #{702rpx};
-    border-radius: #{16rpx};
-    margin: #{24rpx} auto;
-    box-shadow: 0 0 #{8rpx} rgba(0, 0, 0, .05);
-    background: #fff;
-
-    .title {
-        padding: #{32rpx} #{32rpx} #{16rpx};
-    }
-
-    .list {
-        .item {
-            .icon {
-                width: #{50rpx};
-                height: #{50rpx};
-                display: block;
-            }
-
-            .arrow {
-                width: #{12rpx};
-                height: #{22rpx};
-            }
-        }
-    }
-
-    .list.row {
-        .item-container {
-            padding: #{20rpx} #{32rpx};
-        }
-
-        .icon {
-            margin-right: #{16rpx};
-        }
-    }
-
-    .list.grid {
-        .item {
-            width: 25%;
-
-            .icon {
-                margin-bottom: #{28rpx};
-            }
-
-            .name {
-                padding: 0 #{12rpx};
-                font-size: $uni-font-size-weak-one;
-                color: $uni-general-color-one;
-                white-space: nowrap;
-                overflow: hidden;
-                text-overflow: ellipsis;
-            }
-        }
-
-        .item-container {
-            padding: #{24rpx} 0;
-        }
-    }
-}
-.u-foot-box {
-    position: relative;
-    height: 104upx;
-}
-.u-icon {
-    margin-top: 44upx;
-    width: 40upx;
-    height: 40upx;
-    margin-right: 17upx;
-}
-.u-foot-item {
-    font-size: #{26rpx};
-    color: #666666;
-    padding-top: #{14rpx};
-    width: 50%;
-}
-.u-foot-info {
-    text-align: center;
-}
-.u-foot-num {
-    font-size: 32upx;
-    margin-bottom: 10upx;
-}
-.u-line {
-    height: 40upx;
-    width: 2upx;
-    background-color: #666666;
-    position: absolute;
-    top: 45upx;
-    left: 50%;
-    margin-left: -2upx;
-}
-// #ifdef H5
-.bd-setting {
-    width: 702upx;
-    height: 100upx;
-    line-height: 100upx;
-    border-radius: 16upx;
-    padding: 0 33upx;
-    background: #ffffff;
-    margin: 24upx auto;
-    box-shadow: 0 0 #{8rpx} rgba(0, 0, 0, .05);
-    font-size:32upx;
-    color: #353535;
-}
-.bd-arrow {
-    width: #{12rpx};
-    height: #{22rpx};
-}
-// #endif
-</style>