张文飞 3 anni fa
parent
commit
47a0a4c3af
3 ha cambiato i file con 46 aggiunte e 19 eliminazioni
  1. 2 2
      App.vue
  2. 38 11
      pages/homePage/homePage.vue
  3. 6 6
      util/api.js

+ 2 - 2
App.vue

@@ -6,11 +6,11 @@
 			let res = uni.getStorageSync('env')
 			switch(res){
 			   case '1': //dev
-			     BASE_URL = 'http://101.231.166.56:16666' // 开发环境
+			     BASE_URL = 'http://192.168.4.212:8866' // 开发环境
 				 env = 'dev'
 				  break;
 			   case '2': //test
-			      BASE_URL = 'https://gatewaytest.elab-plus.vip'
+			      BASE_URL = 'http://192.168.4.212:8866'
 				  env = 'test'
 				  break;
 			   case '3'://test2

+ 38 - 11
pages/homePage/homePage.vue

@@ -110,20 +110,21 @@
 					</view>
 				</view>
 				
-				<view class="list_item">
-					<image class="house_img" src="https://dm.static.elab-plus.com/yezhu/icon_house_test.png" mode=""></image>
+				<view class="list_item" v-for="(item,index) in  houseList" :key='index'>
+					<image class="house_img" :src="item.image" mode=""></image>
 					<view class="item_content">
-						<text class="house_name">南京青龙山项目</text>
-						<text class="house_hk">获客 ¥2/人、获电 ¥5/人</text>
+						<text class="house_name">{{item.name}}</text>
+						<text class="house_hk" v-if="item.taskCategory">{{(item.taskCategory).join('、')}}</text>
+						<text class="house_hk" v-else></text>
 						<view class="house_address">
 							<image src="https://dm.static.elab-plus.com/yezhu/icon_location.png" mode=""></image>
-							南京 · 4.5万/m² · 住宅
+							<text>{{item.city}} · {{item.minPrice}}-{{item.maxPrice}}万/m² · {{item.bizFormat}}</text>
 						</view>
 						<view class="house_num">
 							<image src="https://dm.static.elab-plus.com/yezhu/icon_family.png" mode=""></image>
-							三口之家
+							<text>{{item.cusGroup}}</text> 
 						</view>
-						<text class="house_desc">11月6日前推广赚佣金</text>
+						<text class="house_desc">{{item.shareRemark}}</text>
 					</view>
 					<view class="item_share">
 						<image class="icon_share" src="https://dm.static.elab-plus.com/yezhu/icon_small_share.png" mode=""></image>
@@ -144,14 +145,31 @@
 	export default {
 		data() {
            return{
-			   color4:'#F5F5F7'
+			   color4:'#F5F5F7',
+			   houseList:[],
 		   }
 		},
 		mounted() {
           this.color4 = app.globalData.color4;
+		  this.getHomePage();
 		},
 		methods: {
-
+            async getHomePage(){
+				let ret =await this.$myRequest({
+					url:"/project/homePage",
+					data:{
+						"city": "",
+						"pageNo": 1,
+						"pageSize": 20,
+						"taskCategoryId": ""
+					}
+				}) 
+				if(ret.data.success){
+					let pageModel = ret.data.pageModel;
+					this.houseList = pageModel.resultSet||[];
+					
+				}
+			}
 		},
 		components:{
 			levelView
@@ -608,6 +626,8 @@
 						height: 240rpx;
 						z-index: 11;
 						margin-top: 20rpx;
+						margin-left: 20rpx;
+						border-radius: 10rpx;
 					}
 					.item_content{
 						display: flex;
@@ -639,11 +659,15 @@
 							text-align: left;
 							color: #b1b1b1;
 							margin-top: 16rpx;
-							align-items: center;
+							
 							image{
 								width: 20rpx;
 								height: 28rpx;
 								margin-right: 8rpx;
+								margin-top: 6rpx;
+							}
+							text{
+								width: 80%;
 							}
 						}
 						.house_num{
@@ -654,11 +678,14 @@
 							text-align: left;
 							color: #b1b1b1;
 							margin-top: 12rpx;
-							align-items: center;
 							image{
 								width: 24rpx;
 								height: 26rpx;
 								margin-right: 8rpx;
+								margin-top: 6rpx;
+							}
+							text{
+								width: 80%;
 							}
 						}
 						.house_desc{

+ 6 - 6
util/api.js

@@ -55,12 +55,12 @@ export const myRequest = (options) => {
 			url: BASE_URL + options.url,
 			method: options.method || "POST",
 			data: options.data || {},
-			header: {
-				'token': options.token || null,
-				'elabprojectname': elabprojectname,
-				'elabsystem': elabsystem,
-				'elabEnvironment': elabEnvironment
-			},
+			// header: {
+			// 	'token': options.token || null,
+			// 	'elabprojectname': elabprojectname,
+			// 	'elabsystem': elabsystem,
+			// 	'elabEnvironment': elabEnvironment
+			// },
 			success: res => {
 
 				// console.log("token", options.token)