Selaa lähdekoodia

feat:用户小程序页面功能开发

jinx 4 vuotta sitten
vanhempi
commit
64e2f4263c
48 muutettua tiedostoa jossa 4728 lisäystä ja 155 poistoa
  1. 5 2
      apps/RealtorEasier/app.js
  2. 1 0
      apps/RealtorEasier/app.json
  3. 1 0
      apps/RealtorEasier/app.wxss
  4. 1 0
      apps/RealtorEasier/components/chat-input/chat-input.js
  5. 22 2
      apps/RealtorEasier/components/detail-components/detail-banner/detail-banner.js
  6. 2 0
      apps/RealtorEasier/components/detail-components/detail-banner/detail-banner.wxml
  7. 15 1
      apps/RealtorEasier/components/detail-components/detail-banner/detail-banner.wxss
  8. 51 7
      apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.js
  9. 67 37
      apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.wxml
  10. 30 3
      apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.wxss
  11. 1 0
      apps/RealtorEasier/components/header-nav/header-nav.wxml
  12. 12 0
      apps/RealtorEasier/components/header-nav/header-nav.wxss
  13. 107 0
      apps/RealtorEasier/components/home-header-nav/home-header-nav.js
  14. 4 0
      apps/RealtorEasier/components/home-header-nav/home-header-nav.json
  15. 21 0
      apps/RealtorEasier/components/home-header-nav/home-header-nav.wxml
  16. 79 0
      apps/RealtorEasier/components/home-header-nav/home-header-nav.wxss
  17. 5 4
      apps/RealtorEasier/components/house-item/house-item.wxml
  18. 15 2
      apps/RealtorEasier/components/tabs-house-list/tabs-house-list.wxml
  19. 1 1
      apps/RealtorEasier/pages/about/about.wxml
  20. 3 1
      apps/RealtorEasier/pages/chat-list/chat-list.json
  21. 1 0
      apps/RealtorEasier/pages/chat-list/chat-list.wxml
  22. 1 1
      apps/RealtorEasier/pages/chat-list/chat-list.wxss
  23. 4 0
      apps/RealtorEasier/pages/chat/chat.js
  24. 4 2
      apps/RealtorEasier/pages/chat/chat.json
  25. 2 1
      apps/RealtorEasier/pages/chat/chat.wxml
  26. 179 20
      apps/RealtorEasier/pages/city/city.js
  27. 62 4
      apps/RealtorEasier/pages/city/city.wxml
  28. 176 9
      apps/RealtorEasier/pages/city/city.wxss
  29. 2826 0
      apps/RealtorEasier/pages/city/json/cities.js
  30. 517 0
      apps/RealtorEasier/pages/city/json/states.js
  31. 75 43
      apps/RealtorEasier/pages/index/index.js
  32. 3 1
      apps/RealtorEasier/pages/index/index.json
  33. 7 5
      apps/RealtorEasier/pages/index/index.wxml
  34. 2 2
      apps/RealtorEasier/pages/index/index.wxss
  35. 4 2
      apps/RealtorEasier/pages/my/my.json
  36. 1 0
      apps/RealtorEasier/pages/my/my.wxml
  37. 69 0
      apps/RealtorEasier/pages/test/test.js
  38. 3 0
      apps/RealtorEasier/pages/test/test.json
  39. 2 0
      apps/RealtorEasier/pages/test/test.wxml
  40. 1 0
      apps/RealtorEasier/pages/test/test.wxss
  41. 1 0
      apps/RealtorEasier/pages/web/web.js
  42. 3 0
      apps/RealtorEasier/utils/login.js
  43. 14 0
      apps/RealtorEasier/utils/storage.js
  44. 212 0
      apps/RealtorEasier/utils/wxaSortPicker/wxaSortPicker.js
  45. 38 0
      apps/RealtorEasier/utils/wxaSortPicker/wxaSortPicker.wxml
  46. 44 0
      apps/RealtorEasier/utils/wxaSortPicker/wxaSortPicker.wxss
  47. 9 1
      apps/agent/components/drop-down/drop-down.wxml
  48. 25 4
      apps/agent/pages/index/index.js

+ 5 - 2
apps/RealtorEasier/app.js

@@ -1,7 +1,8 @@
 //app.js
 import {
   loadToken,
-  loadUserInfo
+  loadUserInfo,
+  loadUserCode
 } from './utils/storage'
 
 import ImApi from './apis/im'
@@ -161,10 +162,12 @@ getContact(isNewMsg) {
   globalData: {
     token: loadToken(),
     raw_city: true,
-    city: '珠海', // 默认进入首页的地址
+    // city: '定位中...', // 默认进入首页的地址
+    city: '安克雷奇', // 默认进入首页的地址
     province: '广东省',
     district: '',
     userinfo: loadUserInfo() || {},
+    user_code:loadUserCode() ||'',
     io: '',
     messageList: [],
     unViewMsg: 0,

+ 1 - 0
apps/RealtorEasier/app.json

@@ -19,6 +19,7 @@
     "pages/detail-intro/detail-intro",
     "pages/view-history/view-history",
     "pages/shared/shared"
+    
   ],
   "usingComponents": {
     "search-bar": "components/searchbar/searchbar",

+ 1 - 0
apps/RealtorEasier/app.wxss

@@ -3,6 +3,7 @@ page{
   height: 100%;
   background: #ffffff;
   -webkit-overflow-scrolling : touch;
+    /* border-top: 1rpx solid rgba(0,0,0,0.1); */
 }
 view, text {
   font-family:PingFang SC;

+ 1 - 0
apps/RealtorEasier/components/chat-input/chat-input.js

@@ -66,6 +66,7 @@ Component({
         }
     },
     methods: {
+       
         getRecordStatus() {
             return {...status};
         },

+ 22 - 2
apps/RealtorEasier/components/detail-components/detail-banner/detail-banner.js

@@ -1,11 +1,14 @@
 // components/house-item/house-item.js
+import loginFn from '../../../utils/login'
+const app = getApp();
 Component({
   /**
    * 组件的属性列表
    */
   properties: {
     imglist: Array,
-    vrLink: String
+    vrLink: String,
+    isAgency:Boolean
   },
 
   /**
@@ -13,7 +16,8 @@ Component({
    */
   data: {
     currentIndex: 0,
-    preIndex: 1
+    preIndex: 1,
+   
   },
 
   /**
@@ -33,6 +37,22 @@ Component({
     },
     toVrHouse () {
       this.triggerEvent('toVrHouse')
+    },
+    getPhoneNumber (e) {
+      this.triggerEvent('toVrHouse')
+
+      loginFn(e, app.globalData.user_code, this.properties.isAgency ? true : false).then(res => {
+       
+        this.setData({
+          loginStatus: app.globalData.token ? true : false,
+          userinfo: app.globalData.userinfo,
+        })
+        // this.getHouseFocusStatus().then(res => {
+        //   if (!res) {
+        //     this.changeFocusStatus()
+        //   }
+        // })
+      })
     }
   }
 })

+ 2 - 0
apps/RealtorEasier/components/detail-components/detail-banner/detail-banner.wxml

@@ -8,6 +8,8 @@
         >
           <image src="{{item}}" mode="aspectFill" lazy-load="true"></image>
           <image src="/image/4Dage/vr-icon-big.svg" class="can-vr" wx-if="{{vrLink && index === 0}}" bind:tap="toVrHouse" />
+          <!-- <button class="getPhoneNum" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button> -->
+          
         </swiper-item>
     </swiper>
     <view class="vr-click-tip" wx:if="{{vrLink}}" bindtap="onlineWatch">语音云带看</view>

+ 15 - 1
apps/RealtorEasier/components/detail-components/detail-banner/detail-banner.wxss

@@ -8,7 +8,19 @@
   z-index: 1111;
   background: #e5e5e5;
   min-height: 468rpx;
-	border-radius: 12rpx;
+  border-radius: 12rpx;
+  position: relative;
+}
+.screen-swiper .getPhoneNum{
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  margin: -60rpx 0 0 -60rpx;
+  width: 120rpx;
+  height: 120rpx;
+  z-index: 1111;
+  /* background: none; */
+  opacity: 0;
 }
 .screen-swiper .can-vr {
   position: absolute;
@@ -31,6 +43,7 @@
   color: #fff;
   text-align: center;
   font-size: 22rpx;
+  z-index: 9999999;
 }
 .swiper-page .mask {
   border-radius: 25rpx;
@@ -62,6 +75,7 @@
   background-color: rgba(0, 0, 0, 0.7);
   background-size: 48rpx 48rpx;
   background-position-x: 8rpx;
+  z-index: 99999;
 }
 
 image {

+ 51 - 7
apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.js

@@ -70,6 +70,46 @@ Component({
         value: '',
         name: 'house_usage'
       },
+    ],
+
+    new_detailItems: [
+      {
+        label: '建设年份',
+        value: '2009',
+        name: 'build_time',
+        format: fotmatDate
+      },
+      {
+        label: '浴室个数',
+        value: '1',
+        name: 'bathRoom_num',
+        // format: fotmatDate
+      },
+      {
+        label: '卧室数量',
+        value: '3',
+        name: 'bedRomm_num'
+      },
+      {
+        label: '单位价格',
+        value: '3',
+        name: 'unit_price'
+      },
+      {
+        label: '物业编号',
+        value: '12321321',
+        name: 'unit_number'
+      },
+      {
+        label: '建筑面积',
+        value: '123',
+        name: 'build_area'
+      },
+      {
+        label: '土地面积',
+        value: '123',
+        name: 'land_area'
+      },
     ]
   },
   pageLifetimes: {
@@ -89,17 +129,20 @@ Component({
     this.getHouseDetail(this.properties.house_id)
     this.fetchRecommendHouseList()
     this.msgManager = new MsgManager(this)
+  
     if (!this.data.loginStatus) {
-      wx.login({
-        success: (res) => {
-          this.setData({
-            user_code: res.code
-          })
-        }
-      })
+      // wx.login({
+      //   success: (res) => {
+      //     this.setData({
+      //       user_code: res.code
+      //     })
+      //   }
+      // })
     } else {
+     
       this.getHouseFocusStatus()
     }
+    
   },
   /**
    * 组件的方法列表
@@ -289,6 +332,7 @@ Component({
       return getApp().getIMHandler().newFriendSendMsg({content: defaultContent})
     },
     toVrHouse (room_id, isAuto) {
+      // console.log(app.globalData)
       if (typeof room_id !== 'string') room_id = ''
       
       this.postDataToOpen(room_id).then(res => {

+ 67 - 37
apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.wxml

@@ -1,29 +1,35 @@
-<detail-banner imglist="{{house.detail_images}}" vrLink="{{house.vrLink}}" bind:onlineWatch="onlineWatch" bind:toVrHouse="toVrHouse" />
+<detail-banner imglist="{{house.detail_images}}" vrLink="{{house.vrLink}}" bind:onlineWatch="onlineWatch"
+    bind:toVrHouse="toVrHouse" />
 <scroll-view class="contanerbox" scroll-y="true" wx:if="{{house.house_id}}">
     <view class="house-info padding-container">
         <view class="tab-list">
             <view class="tab-item" wx:for="{{house.tags}}" wx:key="index">{{ item }}</view>
+            <!-- <view class="tab-item" > 满两年 </view>
+            <view class="tab-item" > 随时可看 </view> -->
         </view>
         <view class="follow-status-w">
-          <button class="follow-status" open-type="getPhoneNumber" bindgetphonenumber="bindgetphonenumber" wx:if="{{ !loginStatus && app_type !== 'user' }}">
-            <image class="follow-icon" src="/image/4Dage/detail/icon-follow.svg" />
-            关注
-          </button>
-          <button class="follow-status" data-action="changeFocusStatus" open-type="getUserInfo" bindtap="bindgetuserinfo" wx:elif="{{ !loginStatus && app_type === 'user' }}">
-            <image class="follow-icon" src="/image/4Dage/detail/icon-follow.svg" />
-            关注
-          </button>
-          <view class="follow-status" wx:elif="{{ !isFocused }}" bindtap="changeFocusStatus">
-            <image class="follow-icon" src="/image/4Dage/detail/icon-follow.svg" />
-            关注
-          </view>
-          <view class="follow-status" wx:elif="{{ isFocused }}" bindtap="cancleFocusStatus">
-            <image class="follow-icon" src="/image/4Dage/detail/icon-follow-active.svg" />
-            已关注
-          </view>
+            <button class="follow-status" open-type="getPhoneNumber" bindgetphonenumber="bindgetphonenumber"
+                wx:if="{{ !loginStatus && app_type !== 'user' }}">
+                <image class="follow-icon" src="/image/4Dage/detail/icon-follow.svg" />
+                关注
+            </button>
+            <button class="follow-status" data-action="changeFocusStatus" open-type="getUserInfo"
+                bindtap="bindgetuserinfo" wx:elif="{{ !loginStatus && app_type === 'user' }}">
+                <image class="follow-icon" src="/image/4Dage/detail/icon-follow.svg" />
+                关注
+            </button>
+            <view class="follow-status" wx:elif="{{ !isFocused }}" bindtap="changeFocusStatus">
+                <image class="follow-icon" src="/image/4Dage/detail/icon-follow.svg" />
+                关注
+            </view>
+            <view class="follow-status" wx:elif="{{ isFocused }}" bindtap="cancleFocusStatus">
+                <image class="follow-icon" src="/image/4Dage/detail/icon-follow-active.svg" />
+                已关注
+            </view>
         </view>
         <view class="house-name ">{{ house.title }}</view>
-        <view class="contact-user">房源负责人:{{ agent_user.name }}<view class="icon-idcard" bind:tap="toAgentDetail"></view></view>
+        <view class="contact-user">房源负责人:{{ agent_user.name }}<view class="icon-idcard" bind:tap="toAgentDetail"></view>
+        </view>
         <view class="house-parameter">
             <view class="parameter-item">
                 <view class="price">{{ house.price / 10000 }}万</view>
@@ -39,9 +45,13 @@
             </view>
         </view>
         <view class="house-detail">
-            <view class="detail-item" wx:for="{{detailItems}}" wx:key="name">
+            <view class="detail-item" wx:for="{{new_detailItems}}" wx:key="name">
                 <text class="label">{{ item.label }}:</text>
-                <text class="value">{{ item.value }}</text>
+                <text class="value"> <text class="value" wx:if="{{item.name=='unit_price' }}"> $</text>{{ item.value
+                    }}</text>
+                <text class="value" wx:if="{{item.name=='bedRomm_num' ||item.name=='bathRoom_num' }}">个</text>
+                <text class="value" wx:if="{{item.name=='unit_price' }}">万</text>
+                <text class="value" wx:if="{{item.name=='build_area' ||item.name=='land_area' }}">平方英尺</text>
             </view>
         </view>
         <view class="vr-tip" wx:if="{{!isAgency && house.vrLink}}">
@@ -60,34 +70,54 @@
                 <text class="location-label">位置:</text>
                 <text class="location-value">{{ house.city + house.estate_name }}</text>
             </view>
-            <view class="location-item"  wx:if="{{!isAgency}}">
+            <view class="location-item" wx:if="{{!isAgency}}">
                 <text class="location-label">学校信息:</text>
                 <text class="location-link" bindtap="sendSchoolMsg">咨询经纪人中小学情况</text>
             </view>
         </view>
     </view>
     <view class="map-w">
-      <map
-      id="map"
-      class="detail-map"
-      longitude="{{markers[0].longitude}}" 
-      latitude="{{markers[0].latitude}}"
-      enable-scroll="{{ false }}"
-      enable-zoom="{{ false }}"
-      markers="{{markers}}"
-      show-location>
-      </map>
-      <view class="cover" bindtap="toMap"></view>
+        <map id="map" class="detail-map" longitude="{{markers[0].longitude}}" latitude="{{markers[0].latitude}}"
+            enable-scroll="{{ false }}" enable-zoom="{{ false }}" markers="{{markers}}" show-location>
+        </map>
+        <view class="cover" bindtap="toMap"></view>
     </view>
-    
-    <view class=" padding-container" bind:tap="toMoreIntro">
+
+    <!-- <view class=" padding-container" bind:tap="toMoreIntro"> -->
+    <view class=" padding-container">
         <view class="location-text-info border-btn">
-            <view class="detail-title">房源介绍
-                <view class="arrow-right fr"></view>
+            <!-- <view class="detail-title">房源介绍 -->
+            <view class="detail-title">物业特色
+                <!-- <view class="arrow-right fr"></view> -->
+            </view>
+            <!-- <view class="detail-text">{{ house.remarks }}</view> -->
+            <view class="detail-text">
+                位于美国佐治亚州Suwanee的房产,其为一座优雅的乡村风格小屋,拥有独特的定制装饰和高质量手工工艺。优雅与天然在这座壮丽住宅内完美相融。该住宅共设有5间卧室、6间全浴卫生间和3间半浴室,可以看到格雷格·诺曼高尔夫球场(Greg
+                Norman Golf
+                Course)、一个池塘和葱郁树林。5间卧室中有2间卧室为业主套房。后院设有带热水浴缸的泳池、瀑布和火坑,供您日常享受;还有2间厨房、6台壁炉、带桑拿浴室的露台水疗区、蒸汽淋浴间、按摩室、健身室和有氧室;更有3间洗衣房、电梯,并铺设有宽木板手刮胡桃木地板。
+            </view>
+        </view>
+    </view>
+
+    <!-- 配套设施 -->
+    <view class=" padding-container">
+        <view class="location-text-info border-btn">
+            <view class="detail-title m-t-32">配套设施
+            </view>
+            <view class="detail-tag">
+                <text class="tag-item">壁炉</text>
+                <text class="tag-item">大理石</text>
+                <text class="tag-item">微波炉</text>
+                <text class="tag-item">洗碗机</text>
+                <text class="tag-item">浴缸</text>
+                <text class="tag-item">食品储蓄室</text>
+                <text class="tag-item">藏书师</text>
+                
             </view>
-            <view class="detail-text">{{ house.remarks }}</view>
         </view>
     </view>
+
+
     <view class="padding-container">
         <view class="detail-title m-t-32">推荐房源({{recommendList.length}})</view>
         <view class="house-list">

+ 30 - 3
apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.wxss

@@ -6,7 +6,7 @@
   position: relative;
 }
 .contanerbox {
-  margin-top: 48rpx;
+  margin-top: 34rpx;
   padding-bottom: 160rpx;
 }
 
@@ -77,8 +77,18 @@
   line-height: 42rpx;
   margin-bottom: 12rpx;
 }
+.detail-item:nth-of-type(n+5){
+  /* display: inline-block; */
+  width: 100%;
+  /* font-size: 30rpx;
+  color: #79868F;
+  font-weight: 400;
+  line-height: 42rpx;
+  margin-bottom: 12rpx; */
+}
 .detail-item .value {
   color: #111;
+  font-weight: bold;
 }
 
 .vr-tip {
@@ -120,6 +130,23 @@
   font-size: 30rpx;
   padding-bottom: 30rpx;
 }
+.detail-tag{
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+  justify-content: flex-start;
+}
+.tag-item{
+  padding: 0 20rpx;
+  height: 72rpx;
+  background: #E8F8FE;
+  font-size: 28rpx;
+  color: #79868F;
+  display:block;
+  line-height: 72rpx;
+  margin-right: 12rpx;
+  margin-bottom: 12rpx;
+}
 .m-t-32 {
   margin-top: 32rpx;
 }
@@ -141,9 +168,9 @@
   word-break: break-all;
   font-size: 30rpx;
   line-height: 42rpx;
-  display:-webkit-box;
+  /* display:-webkit-box;
   -webkit-box-orient:vertical;
-  -webkit-line-clamp: 5;
+  -webkit-line-clamp: 5; */
 }
 .location-item {
   margin-bottom: 2rpx;

+ 1 - 0
apps/RealtorEasier/components/header-nav/header-nav.wxml

@@ -16,5 +16,6 @@
       <text style='{{textStyle}}'>{{titleText}}</text>
     </view>
   </view>
+  <view class="borderline"></view>
 </view>
 <view class="auto-padding" style='height: {{status + navHeight}}px'></view>

+ 12 - 0
apps/RealtorEasier/components/header-nav/header-nav.wxss

@@ -3,10 +3,22 @@
   width: 100%;
   background: #fff;
   z-index: 10000000;
+ 
 }
 .navbar {
   position: relative;
 }
+.nav .borderline{
+  position: fixed;
+  width: 100%;
+  height: 1rpx;
+  background:rgba(0, 0, 0, 0.1);
+  z-index: 10000000;
+  /* border-width: 1rpx  ;
+  border-bottom: solid;
+  border-color: rgba(0, 0, 0, 0.1); */
+  box-sizing: border-box;
+}
 .navbar-left {
   width: 80px;
   height: 27px;

+ 107 - 0
apps/RealtorEasier/components/home-header-nav/home-header-nav.js

@@ -0,0 +1,107 @@
+Component({
+  properties: {
+    background: {
+      type: String,
+      value: 'rgba(255, 255, 255, 1)'
+    },
+    color: {
+      type: String,
+      value: 'rgba(0, 0, 0, 1)'
+    },
+    titleText: {
+      type: String,
+      value: '导航栏'
+    },
+    titleImg: {
+      type: String,
+      value: ''
+    },
+    backIcon: {
+      type: String,
+      value: '/image/4Dage/icon-back.svg'
+    },
+    homeIcon: {
+      type: String,
+      value: '/image/4Dage/icon-home.svg'
+    },
+    fontSize: {
+      type: Number,
+      value: 16
+    },
+    iconHeight: {
+      type: Number,
+      value: 19
+    },
+    iconWidth: {
+      type: Number,
+      value: 58
+    },
+    showLeft:{
+      type:Boolean,
+      value:false
+    }
+  },
+  attached: function () {
+    var that = this;
+    that.setNavSize();
+    that.setStyle();
+  },
+  data: {
+  },
+  methods: {
+    // 通过获取系统信息计算导航栏高度 
+    setNavSize: function () {
+      var that = this
+        , sysinfo = wx.getSystemInfoSync()
+        , statusHeight = sysinfo.statusBarHeight
+        , isiOS = sysinfo.system.indexOf('iOS') > -1
+        , navHeight;
+      if (!isiOS) {
+        navHeight = 48;
+      } else {
+        navHeight = 44;
+      }
+      that.setData({
+        status: statusHeight,
+        navHeight: navHeight
+      })
+    },
+    setStyle: function () {
+      var that = this
+        , containerStyle
+        , textStyle
+        , iconStyle;
+      containerStyle = [
+        'background:' + that.data.background
+      ].join(';');
+      textStyle = [
+        'color:' + that.data.color,
+        'font-size:' + that.data.fontSize + 'px'
+      ].join(';');
+      iconStyle = [
+        'width: ' + that.data.iconWidth + 'px',
+        'height: ' + that.data.iconHeight + 'px'
+      ].join(';');
+      that.setData({
+        containerStyle: containerStyle,
+        textStyle: textStyle,
+        iconStyle: iconStyle
+      })
+    },
+    // 返回事件 
+    back: function () {
+      wx.navigateBack({
+        delta: 1
+      })
+      getApp().autoSubcrebe && getApp().autoSubcrebe()
+      this.triggerEvent('back', { back: 1 })
+    },
+    home: function () {
+      getApp().autoSubcrebe && getApp().autoSubcrebe()
+      wx.switchTab({
+        url: '/pages/index/index'
+      })
+      this.triggerEvent('home', {});
+    }
+  }
+})

+ 4 - 0
apps/RealtorEasier/components/home-header-nav/home-header-nav.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 21 - 0
apps/RealtorEasier/components/home-header-nav/home-header-nav.wxml

@@ -0,0 +1,21 @@
+<view class='nav' style='height: {{status + navHeight}}px'>
+  <view class='status' style='height: {{status}}px;{{containerStyle}}'></view>
+  <view class='navbar' style='height:{{navHeight}}px;{{containerStyle}}'>
+    <view class="navbar-left" wx:if="{{showLeft}}">
+      <view class='back-icon' wx:if="{{backIcon}}" bindtap='back'>
+        <image src='{{backIcon}}'></image>
+      </view>
+      <view class='home-icon' wx:if="{{homeIcon}}" bindtap='home'>
+        <image src='{{homeIcon}}'></image>
+      </view>
+    </view>
+    <!-- <view class='nav-icon' wx:if="{{titleImg}}">
+      <image src='{{titleImg}}' style='{{iconStyle}}'></image>
+    </view> -->
+    <view class='nav-title' wx:if="{{titleText && !titleImg}}">
+      <text style='{{textStyle}}'>{{titleText}}</text>
+    </view>
+  </view>
+  <view class="borderline"></view>
+</view>
+<view class="auto-padding" style='height: {{status + navHeight}}px'></view>

+ 79 - 0
apps/RealtorEasier/components/home-header-nav/home-header-nav.wxss

@@ -0,0 +1,79 @@
+.nav {
+  position: fixed;
+  width: 100%;
+  background: #fff;
+  z-index: 10000000;
+ 
+}
+.navbar {
+  position: relative;
+}
+.nav .borderline{
+  position: fixed;
+  width: 100%;
+  height: 1rpx;
+  background:rgba(0, 0, 0, 0.1);
+  z-index: 10000000;
+  /* border-width: 1rpx  ;
+  border-bottom: solid;
+  border-color: rgba(0, 0, 0, 0.1); */
+  box-sizing: border-box;
+}
+.navbar-left {
+  width: 80px;
+  height: 27px;
+  border: 1rpx solid #EAEAEA;
+  border-radius: 14px;
+  position: absolute;
+  left: 14rpx;
+  top: 50%;
+  transform: translateY(-50%);
+}
+.back-icon,
+.home-icon {
+  width: 40px;
+  height: 100%;
+  position: absolute;
+  transform: translateY(-50%);
+  top: 50%;
+  display: flex;
+}
+.back-icon {
+  left: 0;
+}
+.back-icon::after {
+  content: '';
+  display: block;
+  position: absolute;
+  height: 16px;
+  width: 1rpx;
+  background: #e5e5e5;
+  right: 0;
+  top: 5.5px;
+}
+.home-icon {
+  left: 40px;
+}
+.back-icon image {
+  width: 9px;
+  height: 15px;
+  margin: auto;
+}
+.home-icon image {
+  width: 15px;
+  height: 15px;
+  margin: auto;
+}
+.nav-title,
+.nav-icon {
+  position: absolute;
+  transform: translate(-50%, -50%);
+  left: 50%;
+  top: 50%;
+  font-size: 0;
+  font-weight: bold;
+}
+
+.auto-padding {
+  width: 100%;
+}

+ 5 - 4
apps/RealtorEasier/components/house-item/house-item.wxml

@@ -12,12 +12,13 @@
         <view class="text-black address" >{{ house.district }}/{{ house.address }}</view>
       </view>
       <view class="tap-list" >
-        <view class="tap-item" wx:if="{{house.vrLink}}">云看房</view>
-        <view class="tap-item" wx:if="{{house.vrLink}}">随时可看</view>
+        <!-- <view class="tap-item" wx:if="{{house.vrLink}}">云看房</view> -->
+        <!-- <view class="tap-item" wx:if="{{house.vrLink}}">云看房</view> -->
+        <view class="tap-item" wx:if="{{house.house_type}}">{{house.house_type}}</view>
       </view>
     <view class="price-w">
-        <text class="price text-bold">{{ house.price/10000 }}万</text>
-        <text class="price-tip">{{ house.unit_price }}元/平</text>
+        <text class="price text-bold">${{ house.price/10000 }}万</text>
+        <!-- <text class="price-tip">{{ house.unit_price }}元/平</text> -->
       </view>
     </view>
   </view>

+ 15 - 2
apps/RealtorEasier/components/tabs-house-list/tabs-house-list.wxml

@@ -1,4 +1,4 @@
-<van-tabs active="{{ active }}" line-width="20" color="#1FE4DC" bind:change="onChange">
+<!-- <van-tabs active="{{ active }}" line-width="20" color="#1FE4DC" bind:change="onChange">
   <van-tab title="{{ tabs.name }}" wx:for="{{tabs}}" wx:for-item="tabs" wx:key="index">
     <view >
       <view class="no-data" wx:if="{{tabs.house_list.length === 0}}">暂无数据</view>
@@ -8,4 +8,17 @@
       <no-more-bar wx:if="{{tabs.house_list.length !== 0}}" />
     </view>
   </van-tab>
-</van-tabs>
+</van-tabs> -->
+
+
+<!-- <van-tabs active="{{ active }}" line-width="20" color="#1FE4DC" bind:change="onChange">
+  <van-tab title="{{ tabs.name }}" wx:for="{{tabs}}" wx:for-item="tabs" wx:key="index"> -->
+    <view >
+      <view class="no-data" wx:if="{{tabs[0].house_list.length === 0}}">暂无数据</view>
+      <view class="house-list" wx:else>
+        <house-item wx:for="{{ tabs[0].house_list }}" house="{{ item }}" wx:key="id" />
+      </view>
+      <no-more-bar wx:if="{{tabs[0].house_list.length !== 0}}" />
+    </view>
+  <!-- </van-tab>
+</van-tabs> -->

+ 1 - 1
apps/RealtorEasier/pages/about/about.wxml

@@ -2,7 +2,7 @@
 <view class="about">
   <view class="about-content">
     <image class="logo" src="/image/4Dage/about/logo.png"></image>
-    <view class="about-title">看房 4DKanKan</view>
+    <view class="about-title">Realtor Easier</view>
     <view class="about-sub-title">找房大平台</view>
   </view>
   <view class="about-bottom">

+ 3 - 1
apps/RealtorEasier/pages/chat-list/chat-list.json

@@ -1,7 +1,9 @@
 {
   "navigationBarTitleText": "会话列表",
+  "navigationStyle": "custom",
   "usingComponents": {
     "no-more-bar": "/components/no-more-bar/no-more-bar",
-    "tab-bar": "/components/tab-bar/tab-bar"
+    "tab-bar": "/components/tab-bar/tab-bar",
+    "home-header-nav": "/components/home-header-nav/home-header-nav"
   }
 }

+ 1 - 0
apps/RealtorEasier/pages/chat-list/chat-list.wxml

@@ -1,4 +1,5 @@
 <import src="view/chat-item.wxml"/>
+<home-header-nav titleText="会话列表"></home-header-nav>
 <view class="chat-list">
     
     <view >

+ 1 - 1
apps/RealtorEasier/pages/chat-list/chat-list.wxss

@@ -2,7 +2,7 @@
 @import "view/chat-item.wxss";
 
 .chat-list {
-  border-top: 2rpx solid #E5E5E5;
+  /* border-top: 2rpx solid #E5E5E5; */
 }
 .chat-item-style:last-child .content {
   border-bottom: none;

+ 4 - 0
apps/RealtorEasier/pages/chat/chat.js

@@ -25,6 +25,7 @@ Page({
             picName: 'take_photos',
             description: '拍摄'
         },],
+        toName:'聊天页面'
     },
 
     /**
@@ -39,6 +40,9 @@ Page({
         wx.setNavigationBarTitle({
             title: options.toName || '聊天页面'
         })
+        this.setData({
+            toName: options.toName || '聊天页面'
+        })
         
         this.getAgencyDetail(options.toId).then(res => {
             console.log(res)

+ 4 - 2
apps/RealtorEasier/pages/chat/chat.json

@@ -1,6 +1,8 @@
 {
   "usingComponents": {
-    "chat-input": "../../components/chat-input/chat-input"
+    "chat-input": "../../components/chat-input/chat-input",
+    "home-header-nav": "/components/home-header-nav/home-header-nav"
   },
-  "navigationBarTitleText": "会话页面"
+  "navigationBarTitleText": "会话页面",
+  "navigationStyle": "custom"
 }

+ 2 - 1
apps/RealtorEasier/pages/chat/chat.wxml

@@ -1,12 +1,13 @@
 <!--pages/list/list.wxml-->
 <import src="../../modules/chat-page/chat-item.wxml"/>
 <import src="../../modules/chat-page/chat-page-status.wxml"/>
-
 <scroll-view
         style="height:{{pageHeight}}px;width: 100%;display: flex;flex-direction: column;padding-bottom: 120rpx;"
         scroll-y="true"
         scroll-top="{{scrollTopVal}}"
         bindtap="resetInputStatus">
+<home-header-nav titleText="{{toName}}" showLeft="{{true}}"></home-header-nav>
+
     <block wx:for="{{chatItems}}" wx:key="{{id}}">
         <template is="chat-item"
                   data="{{length:chatItems.length,index:index,item:item}}"/>

+ 179 - 20
apps/RealtorEasier/pages/city/city.js

@@ -1,5 +1,10 @@
 import CityApi from '../../apis/city'
-import { getLocation } from './../../utils/tools'
+import {
+  getLocation
+} from './../../utils/tools'
+import states from './json/states'
+import cities from './json/cities'
+var wxaSortPicker = require('../../utils/wxaSortPicker/wxaSortPicker.js');
 const app = getApp();
 const CHINA = {}
 let _animation; // 动画实体
@@ -10,16 +15,35 @@ Page({
   data: {
     allCitys: [],
     resultTip: [],
-    alphabet: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I','J','K','L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
+    alphabet: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
     citys: [],
-    city: ''
+    city: '',
+    states: states.states,
+    cities: cities.cities,
+    all_cities: cities.cities,
+    new_cities: [],
+    toView: '',
+    // state_id: states.states[0].id, //省、州id
+    state_id: 0, //省、州id
+    apl_posArr: [],
+    apl_index: 0,
+    b_top: 0,
   },
+
   onLoad() {
     this.fetchCityList()
+    this.set_new_alphabet(this.data.all_cities)
+
+    // var that = this
+    //初始化
+
+
+    // wxaSortPicker.init(this.data.cities, that);
   },
   onReady() {
+
   },
-  onShow () {
+  onShow() {
     this.setData({
       city: app.globalData.city
     })
@@ -30,8 +54,77 @@ Page({
       transformOrigin: '50% 50% 0'
     })
   },
-  getLocation () {
-    
+
+  getAplPos() {
+    this.setData({
+      apl_index: this.data.new_cities[0].alphabetIndex
+    })
+    wx.createSelectorQuery().select('.select-box').boundingClientRect((res_b) => {
+      // let b_top = res_b.top
+      this.setData({
+        b_top: res_b.top
+
+      })
+
+      let tab = this.data.new_cities
+      let arr = []
+
+      for (let i = 0; i < tab.length; i++) {
+        wx.createSelectorQuery().select('#item' + i).boundingClientRect((res_i) => {
+          console.log(res_i)
+          tab[i].top = res_i.top - this.data.b_top;
+          this.setData({
+            new_cities: tab,
+            apl_posArr: arr
+          })
+
+        }).exec()
+      }
+
+
+    }).exec()
+
+
+  },
+  onPageScroll(e) {
+    //创建节点选择器
+    let query = wx.createSelectorQuery();
+    //选择id
+    // let that = this; 
+    query.select('.city-side').boundingClientRect((rect) => {
+      // console.log(e.detail.scrollTop)
+      let scrollTop = e.detail.scrollTop
+      let tabs = this.data.new_cities
+      console.log(scrollTop, this.data.b_top, tabs[tabs.length - 1].top)
+
+      for (let i = 0; i < tabs.length; i++) {
+        if (scrollTop > tabs[i].top && scrollTop < tabs[i + 1].top) {
+          this.setData({
+            apl_index: tabs[i].alphabetIndex
+          })
+          // console.log(tabs[i].alphabetIndex)
+        } else if (scrollTop + this.data.b_top+30 >= tabs[tabs.length - 1].top) {
+          console.log('到底了')
+          this.setData({
+            apl_index: tabs[tabs.length - 1].alphabetIndex
+          })
+        }
+      }
+
+      // console.log()
+      // if (e.scrollTop > rect.height - 20) { // 页面上卷高度 大于页面固定按钮位置
+      //   that.setData({
+      //     fixedInputPhone: true // 显示指定区域
+      //   })
+      // } else {
+      //   that.setData({
+      //     fixedInputPhone: false  // 隐藏指定区域
+      //   })
+      // }
+    }).exec();
+  },
+  getLocation() {
+
     this.startAnimationInterval()
     this.setData({
       animation: _animation.export()
@@ -45,9 +138,12 @@ Page({
       this.stopAnimationInterval()
     })
   },
-  fetchCityList () {
+
+  fetchCityList() {
     return CityApi.getCityList().then(res => {
-      const { alphabet } = this.data
+      const {
+        alphabet
+      } = this.data
       let showCity = []
       res.data.forEach(item => {
         const index = alphabet.indexOf(item.first_alphabet)
@@ -67,29 +163,35 @@ Page({
       })
     })
   },
-  searchResult (e) {
-    const { value } = e.detail
+  searchResult(e) {
+    const {
+      value
+    } = e.detail
     let resultTip = []
     if (value) {
       resultTip = this.data.allCitys.filter(item => item.name.indexOf(value) !== -1)
     }
     this.setData({
-      resultTip 
+      resultTip
     })
   },
-  hideResultTip () {
+  hideResultTip() {
     this.setData({
       resultTip: []
     })
   },
-  handleCityClick (e) {
+  handleCityClick(e) {
     console.log(e)
-    const { city } = e.currentTarget.dataset
-    app.globalData.city = city.replace('市', '')
+    const {
+      city
+    } = e.currentTarget.dataset
+    // app.globalData.city = city.replace('市', '')
+    app.globalData.city = city
     wx.navigateBack()
   },
-  selectLocation () {
-    app.globalData.city = '珠海'
+  selectLocation() {
+    // app.globalData.city = '珠海'
+    app.globalData.city = this.data.city
     wx.navigateBack()
   },
   /**
@@ -109,16 +211,73 @@ Page({
     that.rotateAni(++_animationIndex); // 进行一次旋转
     _animationIntervalId = setInterval(function () {
       that.rotateAni(++_animationIndex);
-    },  _ANIMATION_TIME); // 每间隔_ANIMATION_TIME进行一次旋转
+    }, _ANIMATION_TIME); // 每间隔_ANIMATION_TIME进行一次旋转
   },
 
   /**
    * 停止旋转
    */
   stopAnimationInterval: function () {
-    if (_animationIntervalId> 0) {
+    if (_animationIntervalId > 0) {
       clearInterval(_animationIntervalId);
       _animationIntervalId = 0;
     }
   },
-})
+  //选中返回值
+  // wxaSortPickerItemTap: function(e){
+  //   console.log(e.target.dataset.text);
+  //   console.log(e.target.dataset.value);//字符串数组无此字段
+  // }
+  jumpTo: function (e) {
+    // 获取标签元素上自定义的 data-opt 属性的值
+    let target = e.currentTarget.dataset.opt;
+    let index = e.currentTarget.dataset.index;
+    console.log(e)
+    this.setData({
+      toView: target,
+      apl_index: index
+    })
+  },
+  set_new_alphabet(cities) {
+    let showCity = []
+    const {
+      alphabet
+    } = this.data
+    cities.forEach((item) => {
+      const index = alphabet.indexOf(item.FirstLetter)
+      if (showCity[index]) {
+        showCity[index].citys.push(item)
+      } else {
+        showCity[index] = {
+          alphabetIndex: index,
+          citys: [item]
+        }
+      }
+    })
+    this.setData({
+      new_cities: showCity.filter(item => item),
+    }, () => {
+
+      this.getAplPos()
+
+    })
+  },
+  getCities(e) {
+    let {
+      id
+    } = e.currentTarget.dataset;
+    console.log(id)
+    let cities = this.data.all_cities.filter(item => id == item.state_id)
+    this.setData({
+      state_id: id,
+      cities: cities,
+    }, () => {
+      let data = id == 0 ? this.data.all_cities : this.data.cities
+      this.set_new_alphabet(data)
+      // this.getAplPos()
+
+    })
+
+  },
+
+})

+ 62 - 4
apps/RealtorEasier/pages/city/city.wxml

@@ -1,7 +1,10 @@
+<!-- <import src="../../utils/wxaSortPicker/wxaSortPicker.wxml" /> -->
+
 <view class="search-w">
-    <input class="search-input" bindinput="searchResult"  placeholder="输入城市名称进行搜索"></input>
+    <input class="search-input" bindinput="searchResult" placeholder="输入城市名称进行搜索"></input>
     <view class="result-tip">
-        <view class="search-input" wx:for="{{resultTip}}" data-city="{{item.name}}" bindtap="handleCityClick">{{ item.name }}</view>
+        <view class="search-input" wx:for="{{resultTip}}" data-city="{{item.name}}" bindtap="handleCityClick">{{
+            item.name }}</view>
     </view>
 </view>
 
@@ -9,11 +12,11 @@
     <view class="city-label">选择城市</view>
     <view class="search-input" bindtap="selectLocation">
         <text>{{ city }}</text>
-        <view class="refresh-btn " animation="{{animation}}"  catchtap="getLocation"></view>
+        <view class="refresh-btn " animation="{{animation}}" catchtap="getLocation"></view>
     </view>
 </view>
 
-<view class="citys-w">
+<!-- <view class="citys-w">
     <view class="city-label">全部城市(按首字母顺序)</view>
     <view wx:for="{{citys}}">
         <view class="city-label">{{alphabet[item.alphabetIndex]}}</view>
@@ -21,4 +24,59 @@
             <view data-city="{{city.name}}" bindtap="handleCityClick" wx:for="{{item.citys}}" wx:for-item="city">{{city.name}}</view>
         </view>
     </view>
+</view> -->
+<view class="histroy-city">
+    <view class="history-title">
+        <view class="city-label">浏览记录</view>
+        <text class="hitstroy-destory">清空</text>
+    </view>
+
+    <view class="histroy-box">
+        <view class="history-item">纽约纽约纽约纽约</view>
+        <view class="history-item">纽约</view>
+        <view class="history-item">纽约</view>
+    </view>
+</view>
+
+<view class="city-label">全部城市</view>
+<view class="select-box">
+    <view class="btn_jump">
+        <view class="btn_item {{apl_index ==item.alphabetIndex ?'active':''}}" bindtap='jumpTo' data-index="{{item.alphabetIndex}}"  data-opt="item{{idx}}" wx:for="{{new_cities}}" wx:for-index="idx">
+            {{alphabet[item.alphabetIndex]}}</view>
+    </view>
+    <view class="loacation-box">
+        <view class="states-side">
+            <view class="states-item {{state_id==0 ? ' active':''}}" data-id="{{0}}" bindtap="getCities">
+                全国
+            </view>
+            <view bindtap="getCities" data-id="{{item.id}}" wx:for="{{states}}"
+                class="states-item  {{state_id==item.id ? ' active':''}}">
+                {{item.cname}}
+            </view>
+        </view>
+        <view class="city-side">
+
+
+            <scroll-view bindscroll="onPageScroll" class="jump_list" scroll-into-view="{{toView}}" scroll-y="true"
+                scroll-with-animation="true">
+                <view wx:for="{{new_cities}}" wx:for-index="idx">
+                    <!-- <view class="city-label" id="item{{idx}}">{{alphabet[item.alphabetIndex]}}</view> -->
+                    <view class="city-label-apl" id="item{{idx}}">
+                        {{alphabet[item.alphabetIndex]}}</view>
+                    <view class="citys-container">
+
+                        <view class="city-item {{city==city_item.cname ? 'active':''}}" data-city="{{city_item.cname}}"
+                            bindtap="handleCityClick" wx:for="{{item.citys}}" wx:for-item="city_item">
+                            {{city_item.cname}}
+                            <!-- {{apl_index}}
+                            {{item.alphabetIndex}}
+                            {{apl_index ==item.alphabetIndex}} -->
+
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+
+    </view>
 </view>

+ 176 - 9
apps/RealtorEasier/pages/city/city.wxss

@@ -1,7 +1,12 @@
+/**index.wxss**/
+/* @import "../../utils/wxaSortPicker/wxaSortPicker.wxss"; */
 page {
     background: #F2F2F2;
     padding: 0 32rpx;
     box-sizing: border-box;
+    width: 100vw;
+    height: 100%;
+    overflow-y: hidden;
 }
 
 .search-w {
@@ -9,7 +14,7 @@ page {
     line-height: 70rpx;
     color: #111;
     font-size: 24rpx;
-    margin-bottom: 36rpx;
+    /* margin-bottom: 36rpx; */
     position: relative;
 }
 
@@ -22,12 +27,14 @@ page {
     font-size: 24rpx;
     line-height: 70rpx;
 }
+
 .result-tip {
     position: absolute;
     width: 100%;
     left: 0;
     top: 72rpx;
 }
+
 .location-w .search-input {
     padding-left: 60rpx;
     padding-right: 28rpx;
@@ -43,6 +50,7 @@ page {
     margin-bottom: 30rpx;
     margin-top: 36rpx;
 }
+
 .refresh-btn {
     width: 26rpx;
     height: 26rpx;
@@ -57,20 +65,179 @@ page {
     border-radius: 8rpx;
     display: flex;
     flex-wrap: wrap;
-    /* padding: 26rpx 0 0 0; */
+
+    padding: 0 32rpx;
+    box-sizing: border-box;
 }
 
-.citys-container view {
-    width: 33.3333%;
-    text-align: center;
-    line-height: 94rpx;
-    /* margin-bottom: 26rpx; */
+.city-label-apl {
+    height: 60rpx;
+    line-height: 60rpx;
+    color: #A3A4A5;
     font-size: 30rpx;
+    padding: 0 32rpx;
+    box-sizing: border-box;
+    background-color: #fff;
+
 }
 
+
+.citys-container .city-item {
+    width: 100%;
+    height: 96rpx;
+    line-height: 94rpx;
+    color: #111111;
+    font-size: 30rpx;
+    border-bottom: 2rpx solid rgba(0, 0, 0, 0.1);
+    font-weight: bold;
+}
+.citys-container .city-item.active{
+    color: #1FE4DC;
+    position: relative;
+}
+.citys-container .city-item.active::before{
+    content: '';
+    width: 24rpx;
+    height: 15rpx;
+    border: 2rpx solid #1FE4DC;
+    position: absolute;
+    right: 0rpx;
+    top: 50%;
+    transform: translateY(-50%);
+}
 .citys-w {
     padding-bottom: 100rpx;
 }
-.refresh-btn.animation {
-    
+
+.refresh-btn.animation {}
+
+.select-box {
+    height: calc(100vh - 540rpx);
+    width: 100%;
+    padding-bottom: 20rpx;
+    box-sizing: border-box;
+    position: relative;
+
+}
+
+.select-box .loacation-box {
+    width: 100%;
+    height: 100%;
+    display: flex;
+}
+
+.select-box .loacation-box .states-side {
+    width: 34%;
+    height: 100%;
+    overflow-y: auto;
+    border-radius: 8rpx 0px 0px 8rpx;
+}
+
+.select-box .loacation-box .states-item {
+    width: 100%;
+    height: 96rpx;
+    border-radius: 8rpx 0rpx 0rpx 8rpx;
+    font-size: 30rpx;
+    color: #111111;
+    padding: 0 0 0 32rpx;
+    box-sizing: border-box;
+    line-height: 96rpx;
+    font-weight: bold;
+}
+
+.select-box .loacation-box .states-item.active {
+    background: #ffffff;
+    position: relative;
+}
+
+.select-box .loacation-box .states-item.active::before {
+    content: "";
+    width: 8rpx;
+    height: 32rpx;
+    background: #1FE4DC;
+    position: absolute;
+    left: 0;
+    top: 50%;
+    transform: translateY(-50%);
+}
+
+.select-box .loacation-box .city-side {
+    width: 66%;
+    height: 100%;
+    border-radius: 0px 8rpx 8rpx 0px;
+    overflow-y: auto;
+}
+
+/* 锚点 */
+.btn_jump {
+    font-size: 12px;
+    text-align: center;
+    position: absolute;
+    z-index: 9;
+    top: 50%;
+    transform: translateY(-50%);
+    right: -32rpx;
+    width: 32rpx;
+}
+
+.btn_jump .btn_item {
+    /* border: 1rpx solid #aaa; */
+    /* margin-bottom: 30rpx; */
+    font-size: 20rpx;
+    color: #646566;
+}
+.btn_jump  .btn_item.active{
+    color: #1FE4DC;
+}
+
+.jump_list {
+    position: relative;
+    height: 100%;
+}
+
+.list_item {
+    height: 80rpx;
+}
+
+.list_item:nth-of-type(even) {
+    background: #f8f8f8;
+}
+
+.histroy-city {}
+
+.histroy-city .history-title {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+
+.hitstroy-destory {
+    font-size: 24rpx;
+    color: #666;
+}
+
+.histroy-box {
+    display: flex;
+    align-items: center;
+    flex-wrap: wrap;
+}
+
+.histroy-box .history-item {
+    width: 218rpx;
+    height: 70rpx;
+    background: #FFFFFF;
+    border-radius: 8rpx;
+    text-align: center;
+    line-height: 70rpx;
+    margin-right: 16rpx;
+    padding: 0 19rpx;
+    box-sizing: border-box;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    font-weight: bold;
+}
+
+.histroy-box .history-item:nth-of-type(3n) {
+    margin-right: 0rpx;
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2826 - 0
apps/RealtorEasier/pages/city/json/cities.js


+ 517 - 0
apps/RealtorEasier/pages/city/json/states.js

@@ -0,0 +1,517 @@
+var states  = [
+      {
+          "id":"209",
+          "country_id":"226",
+          "code":"AK",
+          "name":"Alaska",
+          "cname":"阿拉斯加",
+          "lower_name":"alaska",
+          "code_full":"USA0AK",
+          "area_id":""
+      },
+      {
+          "id":"210",
+          "country_id":"226",
+          "code":"AL",
+          "name":"Alabama",
+          "cname":"阿拉巴马",
+          "lower_name":"alabama",
+          "code_full":"USA0AL",
+          "area_id":"5"
+      },
+      {
+          "id":"211",
+          "country_id":"226",
+          "code":"AR",
+          "name":"Arkansas",
+          "cname":"阿肯色",
+          "lower_name":"arkansas",
+          "code_full":"USA0AR",
+          "area_id":"5"
+      },
+      {
+          "id":"212",
+          "country_id":"226",
+          "code":"AZ",
+          "name":"Arizona",
+          "cname":"亚利桑那",
+          "lower_name":"arizona",
+          "code_full":"USA0AZ",
+          "area_id":"9"
+      },
+      {
+          "id":"213",
+          "country_id":"226",
+          "code":"CA",
+          "name":"California",
+          "cname":"加利福尼亚",
+          "lower_name":"california",
+          "code_full":"USA0CA",
+          "area_id":"8"
+      },
+      {
+          "id":"214",
+          "country_id":"226",
+          "code":"CO",
+          "name":"Colorado",
+          "cname":"科罗拉多",
+          "lower_name":"colorado",
+          "code_full":"USA0CO",
+          "area_id":"7"
+      },
+      {
+          "id":"215",
+          "country_id":"226",
+          "code":"CT",
+          "name":"Connecticut",
+          "cname":"康涅狄格",
+          "lower_name":"connecticut",
+          "code_full":"USA0CT",
+          "area_id":"1"
+      },
+      {
+          "id":"216",
+          "country_id":"226",
+          "code":"DC",
+          "name":"District of Columbia",
+          "cname":"哥伦比亚特区",
+          "lower_name":"district of columbia",
+          "code_full":"USA0DC",
+          "area_id":""
+      },
+      {
+          "id":"217",
+          "country_id":"226",
+          "code":"DE",
+          "name":"Delaware",
+          "cname":"特拉华",
+          "lower_name":"delaware",
+          "code_full":"USA0DE",
+          "area_id":"2"
+      },
+      {
+          "id":"218",
+          "country_id":"226",
+          "code":"FL",
+          "name":"Florida",
+          "cname":"佛罗里达",
+          "lower_name":"florida",
+          "code_full":"USA0FL",
+          "area_id":"3"
+      },
+      {
+          "id":"219",
+          "country_id":"226",
+          "code":"GA",
+          "name":"Georgia",
+          "cname":"佐治亚",
+          "lower_name":"georgia",
+          "code_full":"USA0GA",
+          "area_id":"3"
+      },
+      {
+          "id":"220",
+          "country_id":"226",
+          "code":"HI",
+          "name":"Hawaii",
+          "cname":"夏威夷",
+          "lower_name":"hawaii",
+          "code_full":"USA0HI",
+          "area_id":""
+      },
+      {
+          "id":"221",
+          "country_id":"226",
+          "code":"IA",
+          "name":"Iowa",
+          "cname":"爱荷华",
+          "lower_name":"iowa",
+          "code_full":"USA0IA",
+          "area_id":"6"
+      },
+      {
+          "id":"222",
+          "country_id":"226",
+          "code":"ID",
+          "name":"Idaho",
+          "cname":"爱达荷",
+          "lower_name":"idaho",
+          "code_full":"USA0ID",
+          "area_id":"7"
+      },
+      {
+          "id":"223",
+          "country_id":"226",
+          "code":"IL",
+          "name":"Illinois",
+          "cname":"伊利诺斯",
+          "lower_name":"illinois",
+          "code_full":"USA0IL",
+          "area_id":"4"
+      },
+      {
+          "id":"224",
+          "country_id":"226",
+          "code":"IN",
+          "name":"Indiana",
+          "cname":"印第安那",
+          "lower_name":"indiana",
+          "code_full":"USA0IN",
+          "area_id":"4"
+      },
+      {
+          "id":"225",
+          "country_id":"226",
+          "code":"KS",
+          "name":"Kansas",
+          "cname":"堪萨斯",
+          "lower_name":"kansas",
+          "code_full":"USA0KS",
+          "area_id":"6"
+      },
+      {
+          "id":"226",
+          "country_id":"226",
+          "code":"KY",
+          "name":"Kentucky",
+          "cname":"肯塔基",
+          "lower_name":"kentucky",
+          "code_full":"USA0KY",
+          "area_id":"5"
+      },
+      {
+          "id":"227",
+          "country_id":"226",
+          "code":"LA",
+          "name":"Louisiana",
+          "cname":"路易斯安那",
+          "lower_name":"louisiana",
+          "code_full":"USA0LA",
+          "area_id":"5"
+      },
+      {
+          "id":"228",
+          "country_id":"226",
+          "code":"MA",
+          "name":"Massachusetts",
+          "cname":"马萨诸塞",
+          "lower_name":"massachusetts",
+          "code_full":"USA0MA",
+          "area_id":"1"
+      },
+      {
+          "id":"229",
+          "country_id":"226",
+          "code":"MD",
+          "name":"Maryland",
+          "cname":"马里兰",
+          "lower_name":"maryland",
+          "code_full":"USA0MD",
+          "area_id":"2"
+      },
+      {
+          "id":"230",
+          "country_id":"226",
+          "code":"ME",
+          "name":"Maine",
+          "cname":"缅因",
+          "lower_name":"maine",
+          "code_full":"USA0ME",
+          "area_id":"1"
+      },
+      {
+          "id":"231",
+          "country_id":"226",
+          "code":"MI",
+          "name":"Michigan",
+          "cname":"密歇根",
+          "lower_name":"michigan",
+          "code_full":"USA0MI",
+          "area_id":"4"
+      },
+      {
+          "id":"232",
+          "country_id":"226",
+          "code":"MN",
+          "name":"Minnesota",
+          "cname":"明尼苏达",
+          "lower_name":"minnesota",
+          "code_full":"USA0MN",
+          "area_id":"6"
+      },
+      {
+          "id":"233",
+          "country_id":"226",
+          "code":"MO",
+          "name":"Missouri",
+          "cname":"密苏里",
+          "lower_name":"missouri",
+          "code_full":"USA0MO",
+          "area_id":"6"
+      },
+      {
+          "id":"234",
+          "country_id":"226",
+          "code":"MS",
+          "name":"Mississippi",
+          "cname":"密西西比",
+          "lower_name":"mississippi",
+          "code_full":"USA0MS",
+          "area_id":"5"
+      },
+      {
+          "id":"235",
+          "country_id":"226",
+          "code":"MT",
+          "name":"Montana",
+          "cname":"蒙大拿",
+          "lower_name":"montana",
+          "code_full":"USA0MT",
+          "area_id":"7"
+      },
+      {
+          "id":"236",
+          "country_id":"226",
+          "code":"NC",
+          "name":"North Carolina",
+          "cname":"北卡罗来纳",
+          "lower_name":"north carolina",
+          "code_full":"USA0NC",
+          "area_id":"3"
+      },
+      {
+          "id":"237",
+          "country_id":"226",
+          "code":"ND",
+          "name":"North Dakota",
+          "cname":"北达科他",
+          "lower_name":"north dakota",
+          "code_full":"USA0ND",
+          "area_id":"6"
+      },
+      {
+          "id":"238",
+          "country_id":"226",
+          "code":"NE",
+          "name":"Nebraska",
+          "cname":"内布拉斯加",
+          "lower_name":"nebraska",
+          "code_full":"USA0NE",
+          "area_id":"6"
+      },
+      {
+          "id":"239",
+          "country_id":"226",
+          "code":"NH",
+          "name":"New Hampshire",
+          "cname":"新罕布什尔",
+          "lower_name":"new hampshire",
+          "code_full":"USA0NH",
+          "area_id":"1"
+      },
+      {
+          "id":"240",
+          "country_id":"226",
+          "code":"NJ",
+          "name":"New Jersey",
+          "cname":"新泽西",
+          "lower_name":"new jersey",
+          "code_full":"USA0NJ",
+          "area_id":"2"
+      },
+      {
+          "id":"241",
+          "country_id":"226",
+          "code":"NM",
+          "name":"New Mexico",
+          "cname":"新墨西哥",
+          "lower_name":"new mexico",
+          "code_full":"USA0NM",
+          "area_id":"9"
+      },
+      {
+          "id":"242",
+          "country_id":"226",
+          "code":"NV",
+          "name":"Nevada",
+          "cname":"内华达",
+          "lower_name":"nevada",
+          "code_full":"USA0NV",
+          "area_id":"7"
+      },
+      {
+          "id":"243",
+          "country_id":"226",
+          "code":"NY",
+          "name":"New York",
+          "cname":"纽约",
+          "lower_name":"new york",
+          "code_full":"USA0NY",
+          "area_id":"2"
+      },
+      {
+          "id":"244",
+          "country_id":"226",
+          "code":"OH",
+          "name":"Ohio",
+          "cname":"俄亥俄",
+          "lower_name":"ohio",
+          "code_full":"USA0OH",
+          "area_id":"4"
+      },
+      {
+          "id":"245",
+          "country_id":"226",
+          "code":"OK",
+          "name":"Oklahoma",
+          "cname":"俄克拉荷马",
+          "lower_name":"oklahoma",
+          "code_full":"USA0OK",
+          "area_id":""
+      },
+      {
+          "id":"246",
+          "country_id":"226",
+          "code":"OR",
+          "name":"Oregon",
+          "cname":"俄勒冈",
+          "lower_name":"oregon",
+          "code_full":"USA0OR",
+          "area_id":"8"
+      },
+      {
+          "id":"247",
+          "country_id":"226",
+          "code":"PA",
+          "name":"Pennsylvania",
+          "cname":"宾夕法尼亚",
+          "lower_name":"pennsylvania",
+          "code_full":"USA0PA",
+          "area_id":"2"
+      },
+      {
+          "id":"248",
+          "country_id":"226",
+          "code":"RI",
+          "name":"Rhode Island",
+          "cname":"罗德岛",
+          "lower_name":"rhode island",
+          "code_full":"USA0RI",
+          "area_id":"1"
+      },
+      {
+          "id":"249",
+          "country_id":"226",
+          "code":"SC",
+          "name":"South Carolina",
+          "cname":"南卡罗来纳",
+          "lower_name":"south carolina",
+          "code_full":"USA0SC",
+          "area_id":"3"
+      },
+      {
+          "id":"250",
+          "country_id":"226",
+          "code":"SD",
+          "name":"South Dakota",
+          "cname":"南达科他",
+          "lower_name":"south dakota",
+          "code_full":"USA0SD",
+          "area_id":"6"
+      },
+      {
+          "id":"251",
+          "country_id":"226",
+          "code":"TN",
+          "name":"Tennessee",
+          "cname":"田纳西",
+          "lower_name":"tennessee",
+          "code_full":"USA0TN",
+          "area_id":"5"
+      },
+      {
+          "id":"252",
+          "country_id":"226",
+          "code":"TX",
+          "name":"Texas",
+          "cname":"德克萨斯",
+          "lower_name":"texas",
+          "code_full":"USA0TX",
+          "area_id":"9"
+      },
+      {
+          "id":"253",
+          "country_id":"226",
+          "code":"UT",
+          "name":"Utah",
+          "cname":"犹他",
+          "lower_name":"utah",
+          "code_full":"USA0UT",
+          "area_id":"7"
+      },
+      {
+          "id":"254",
+          "country_id":"226",
+          "code":"VA",
+          "name":"Virginia",
+          "cname":"维吉尼亚",
+          "lower_name":"virginia",
+          "code_full":"USA0VA",
+          "area_id":"2"
+      },
+      {
+          "id":"255",
+          "country_id":"226",
+          "code":"VT",
+          "name":"Vermont",
+          "cname":"佛蒙特",
+          "lower_name":"vermont",
+          "code_full":"USA0VT",
+          "area_id":"1"
+      },
+      {
+          "id":"256",
+          "country_id":"226",
+          "code":"WA",
+          "name":"Washington",
+          "cname":"华盛顿",
+          "lower_name":"washington",
+          "code_full":"USA0WA",
+          "area_id":"8"
+      },
+      {
+          "id":"257",
+          "country_id":"226",
+          "code":"WI",
+          "name":"Wisconsin",
+          "cname":"威斯康星",
+          "lower_name":"wisconsin",
+          "code_full":"USA0WI",
+          "area_id":"4"
+      },
+      {
+          "id":"258",
+          "country_id":"226",
+          "code":"WV",
+          "name":"West Virginia",
+          "cname":"西佛吉尼亚",
+          "lower_name":"west virginia",
+          "code_full":"USA0WV",
+          "area_id":"2"
+      },
+      {
+          "id":"259",
+          "country_id":"226",
+          "code":"WY",
+          "name":"Wyoming",
+          "cname":"怀俄明",
+          "lower_name":"wyoming",
+          "code_full":"USA0WY",
+          "area_id":"7"
+      }
+  ]
+
+  module.exports = { //数据暴露出去
+    states: states
+   }
+  

+ 75 - 43
apps/RealtorEasier/pages/index/index.js

@@ -1,8 +1,17 @@
 import houseApi from '../../apis/house'
-import { encryption } from '../../utils/encryption'
-import { changeDateFormat } from '../../utils/date'
-import { isPhoneX } from './../../utils/tools'
-import { removeUserInfo, removeToken } from '../../utils/storage'
+import {
+    encryption
+} from '../../utils/encryption'
+import {
+    changeDateFormat
+} from '../../utils/date'
+import {
+    isPhoneX
+} from './../../utils/tools'
+import {
+    removeUserInfo,
+    removeToken
+} from '../../utils/storage'
 import EventEmitter from '../../utils/eventEmitter'
 const app = getApp();
 Page({
@@ -11,13 +20,24 @@ Page({
      */
     data: {
         tabList: [],
-        show_empty:false,
+        show_empty: false,
         houses: [],
         //todo 4个 icon栏位,可后台配置, 调用IconClick函数。
-        icon_list: [
-            {name: '推荐',icon:'edit',type: 0},
-            {name: '二手房',icon:'edit',type: 2},
-            {name: '新房',icon:'write',type: 1},
+        icon_list: [{
+                name: '推荐',
+                icon: 'edit',
+                type: 0
+            },
+            {
+                name: '二手房',
+                icon: 'edit',
+                type: 2
+            },
+            {
+                name: '新房',
+                icon: 'write',
+                type: 1
+            },
             // {name: '租房',icon:'edit',type: 3},
         ],
         fetcherData: {
@@ -39,7 +59,7 @@ Page({
     onReachBottomDistance: 50,
     onReachBottom: function () {
         if (this.data.has_next) {
-            let page =  this.data.fetcherData.page_num++
+            let page = this.data.fetcherData.page_num++
             this.setData({
                 'fetcherData.page_num': this.data.fetcherData.page_num++
             })
@@ -47,7 +67,7 @@ Page({
         }
         return
     },
-    onPageScroll: function (e) {  // 调用showImg函数
+    onPageScroll: function (e) { // 调用showImg函数
         var top = e.scrollTop;
         try {
             //判断'滚动条'滚动的距离 和 '元素在初始时'距顶部的距离进行判断
@@ -57,7 +77,7 @@ Page({
             }
             this.setData({
                 isFixedTop: isSatisfy
-            }); 
+            });
         } catch (e) {
             console.log(e)
         }
@@ -97,21 +117,26 @@ Page({
                 isIphoneX: res
             })
         })
-        app.SetProvinceCity('广东省', '珠海');
-        this.setData({
-            'fetcherData.city': '珠海'
-        })
-        this.getHouseList(0);
-        // wx.getSetting({
-        //     success: (res) => {
-        //         var statu = res.authSetting;
-        //         this.getPermission()
-        //     },
-        //     fail: (err) => {
-        //         console.log(err, 'err')
-        //         this.getHouseList(0);
-        //     }
+        // app.SetProvinceCity('广东省', '珠海');
+        // this.setData({
+        //     'fetcherData.city': '珠海'
         // })
+        // this.getHouseList(0);
+        wx.getSetting({
+            success: (res) => {
+                var statu = res.authSetting;
+                console.log('****************')
+                console.log(res)
+                this.getPermission()
+            },
+            fail: (err) => {
+                console.log(err, 'err')
+                this.setData({
+                    'fetcherData.city': '定位失败'
+                })
+                this.getHouseList(0);
+            }
+        })
         if (getApp().globalData.userinfo.name === getApp().globalData.userinfo.phone) {
             removeUserInfo()
             removeToken()
@@ -119,9 +144,9 @@ Page({
             getApp().globalData.userinfo = {}
             EventEmitter.emit('logout')
         }
-        
+
     },
-    getPermission:function(){
+    getPermission: function () {
         var that = this;
         return new Promise((resolve, reject) => {
             wx.getLocation({
@@ -139,14 +164,16 @@ Page({
                             let province = ad_info.province;
                             let city = ad_info.city.replace('市', '');
                             let district = ad_info.district;
-                            app.SetProvinceCity('广东省', '珠海');
+                            // app.SetProvinceCity('广东省', '珠海');
+                            app.SetProvinceCity('广东省', city);
                             that.setData({
-                                'fetcherData.city': '珠海'
+                                // 'fetcherData.city': '珠海'
+                                'fetcherData.city': city
                             })
                             that.getHouseList(0);
-                            app.ShowToast('定位城市:' + city)
+                            // app.ShowToast('定位城市:' + city)
                         },
-                        fail:function (res) {
+                        fail: function (res) {
                             // wx.showModal({
                             //     title: '定位失败,请手动选择城市',
                             // });
@@ -163,10 +190,12 @@ Page({
             })
         })
     },
-    changeListType (e) {
-        const { type } = e.currentTarget.dataset
+    changeListType(e) {
+        const {
+            type
+        } = e.currentTarget.dataset
         wx.showLoading({
-          title: '正在加载中...',
+            title: '正在加载中...',
         })
         this.setData({
             'fetcherData.saleType': type,
@@ -175,7 +204,7 @@ Page({
         })
         this.getHouseList()
     },
-    bindconfirm (e) {
+    bindconfirm(e) {
         this.setData({
             'fetcherData.title': e.detail.value,
             'fetcherData.page_num': 1,
@@ -183,9 +212,11 @@ Page({
         })
         this.getHouseList()
     },
-    searchHouse (e) {
+    searchHouse(e) {
         clearTimeout(this.timer)
-        const { value } = e.detail
+        const {
+            value
+        } = e.detail
         this.timer = setTimeout(() => {
             this.setData({
                 'fetcherData.title': value,
@@ -196,11 +227,12 @@ Page({
         }, 300)
     },
     onShareAppMessage: function (res) {
-        var path ='/pages/index/index'
+        var path = '/pages/index/index'
         return {
-          title: '四维看看,海量复刻真房源',
-          path: path,
-          imageUrl: 'https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/4dHouse/share.png', // 分享的封面图
+            title: '四维看看,海量复刻真房源',
+            path: path,
+            imageUrl: 'https://4d-tjw.oss-cn-shenzhen.aliyuncs.com/4dHouse/share.png', // 分享的封面图
         }
-      },
+    },
+
 });

+ 3 - 1
apps/RealtorEasier/pages/index/index.json

@@ -2,8 +2,10 @@
   "navigationBarBackgroundColor": "#fff",
   "navigationBarTextStyle": "black",
   "navigationBarTitleText": "Realtor Easier",
+  "navigationStyle": "custom",
   "usingComponents": {
     "house-item": "./../../components/house-item/house-item",
-    "tab-bar": "/components/tab-bar/tab-bar"
+    "tab-bar": "/components/tab-bar/tab-bar",
+    "home-header-nav": "/components/home-header-nav/home-header-nav"
   }
 }

+ 7 - 5
apps/RealtorEasier/pages/index/index.wxml

@@ -1,8 +1,9 @@
+<home-header-nav titleText="Realtor Easier"></home-header-nav>
 <view class="search-w" >
 
     <view class="search-w-left">
         <text class="cuIcon-search"></text>
-        <input class="search-input" type="text" bindinput="searchHouse"   placeholder="请输入房源信息" bindconfirm="bindconfirm"
+        <input class="search-input" type="text" bindinput="searchHouse"   placeholder="你想住在哪?" bindconfirm="bindconfirm"
                confirm-type="search" />
     </view>
     <view class="action" bindtap="CitySelect">
@@ -10,16 +11,17 @@
         <view>{{ fetcherData.city }}</view>
     </view>
 </view>
-
-<view class="icon-list {{ isFixedTop ? 'fixed' : ''}}">
+<!-- 屏蔽栏目 -->
+<!-- <view class="icon-list {{ isFixedTop ? 'fixed' : ''}}">
     <view wx:for="{{icon_list}}" class="icon-item {{ fetcherData.saleType === item.type ? 'is-active' : ''}}"  wx:key bindtap="changeListType" data-type="{{item.type}}">
         <text class="text-center {{ houseType === item.type ? 'text-cyan' : 'text-black'}} margin-top-xs  text-bold">{{item.name}}</text>
         <view class="line bg-cyan"></view>
     </view>
-</view>
+</view> -->
 
 <!--首页筛选器-->
-<view style="padding-bottom: {{isIphoneX ? '150rpx' : '100rpx'}}; padding-top: {{ isFixedTop ? '86rpx' : '0px'}}" >
+<!-- <view style="padding-bottom: {{isIphoneX ? '150rpx' : '100rpx'}}; padding-top: {{ isFixedTop ? '86rpx' : '0px'}}" > -->
+<view style="padding-bottom: {{isIphoneX ? '150rpx' : '100rpx'}}" >
     <view wx:for="{{houses}}"  wx:key class="house-list">
         <house-item house="{{item}}"></house-item>
     </view>

+ 2 - 2
apps/RealtorEasier/pages/index/index.wxss

@@ -3,11 +3,11 @@
   border: 2rpx solid #E5E5E5;
   border-radius: 8rpx;
   width: 658rpx;
-  margin: 0 auto;
+  margin: 18rpx auto 20rpx;
   display: flex;
   height: 80rpx;
   line-height: 80rpx;
-  margin-bottom: 66rpx;
+  /* margin-bottom: 66rpx; */
 }
 .search-w-left {
   display: flex;

+ 4 - 2
apps/RealtorEasier/pages/my/my.json

@@ -1,6 +1,8 @@
 {
   "usingComponents": {
-    "tab-bar": "/components/tab-bar/tab-bar"
+    "tab-bar": "/components/tab-bar/tab-bar",
+    "home-header-nav": "/components/home-header-nav/home-header-nav"
   },
-   "navigationBarTitleText": "个人中心"
+   "navigationBarTitleText": "个人中心",
+   "navigationStyle": "custom"
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
apps/RealtorEasier/pages/my/my.wxml


+ 69 - 0
apps/RealtorEasier/pages/test/test.js

@@ -0,0 +1,69 @@
+// pages/test/test.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    a:1
+  },
+  a(){
+  },
+ 
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 3 - 0
apps/RealtorEasier/pages/test/test.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 2 - 0
apps/RealtorEasier/pages/test/test.wxml

@@ -0,0 +1,2 @@
+<!--pages/test/test.wxml-->
+<text >pages/test/test.wxml</text>

+ 1 - 0
apps/RealtorEasier/pages/test/test.wxss

@@ -0,0 +1 @@
+/* pages/test/test.wxss */

+ 1 - 0
apps/RealtorEasier/pages/web/web.js

@@ -47,6 +47,7 @@ Page({
     this.setData({
       socketOpts: opts,
       url: `${vr_link}&room_id=${opts.roomId}${options.is_auto? `&vr=1` : ''}`,
+      // url: `http://192.168.0.207:8080/realtor-easier.html?m=t-LloMBfU&appname=realtor-easier&role=customer&room_id=10507db19f478ed5f551621558258956&user_id=10021912303a282f2a41620886147753&room_id=10507db19f478ed5f551621558258956`,
       room_id: opts.roomId,
       house_id: options.house_id || '',
       vr_link: vr_link,

+ 3 - 0
apps/RealtorEasier/utils/login.js

@@ -6,6 +6,8 @@ function wxLogin() {
   return new Promise((resovle, reject) => {
     wx.login({
       success(res) {
+        getApp().globalData.user_code = res.code
+        saveUserInfo(res.code)
         resovle(res.code)
       },
       fail(err) {
@@ -106,6 +108,7 @@ function tips (res) {
 
 export default function Login(phone_data, code, isAgency) {
   const { encryptedData, iv } = phone_data.detail
+  
   if (!encryptedData || !iv) {
     return new Promise((_, reject) => reject())
   }

+ 14 - 0
apps/RealtorEasier/utils/storage.js

@@ -1,5 +1,6 @@
 // 定义key名
 const USER_INFO_KEY = 'wx_user_info'
+const USER_CODE_KEY = 'wx_user_code'
 const TOKEN_KEY = 'wx_token'
 const VIEW_HISTORY_KEY = 'view_history'
 
@@ -48,9 +49,22 @@ export function loadUserInfo () {
   return loadStorage(USER_INFO_KEY)
 }
 
+
 export function removeUserInfo () {
   return removeStorage(USER_INFO_KEY)
 }
+export function saveUserCode (usercode) {
+  return saveStorage(USER_CODE_KEY, usercode, 86400 / 24)
+}
+
+export function loadUserCode () {
+  return loadStorage(USER_CODE_KEY)
+}
+
+
+export function removeUserCode () {
+  return removeStorage(USER_CODE_KEY)
+}
 
 export function saveToken (token) {
   return saveStorage(TOKEN_KEY, token, 86400 / 24)

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 212 - 0
apps/RealtorEasier/utils/wxaSortPicker/wxaSortPicker.js


+ 38 - 0
apps/RealtorEasier/utils/wxaSortPicker/wxaSortPicker.wxml

@@ -0,0 +1,38 @@
+
+<template name="wxaSortPicker">
+    <scroll-view class="wxaSortPickerList" scroll-y="true" style="height: {{wxaSortPickerData.view.scrollHeight}}px;" bindscrolltoupper="wxaSortPickerUpper" bindscrolltolower="wxaSortPickerLower" bindscroll="wxaSortPickerScroll" scroll-into-view="{{wxaSortPickerData.wxaSortPickertoView}}">    
+        <block wx:for="{{wxaSortPickerData.textData}}" wx:for-item="item" wx:key="">
+            <view id="{{item.tag}}" class="wxaSortPickerTag">{{item.tag}}</view>
+            <view class='wxaSortPickerItem-box'>              
+              <template is="wxaSortPickerItem" data="{{item,dataType}}"/>
+            </view>
+        </block>
+    </scroll-view>
+    <template is="wxaSortPickerTemTags"/>
+</template>
+
+<template name="wxaSortPickerItem">  
+  <block wx:if='{{dataType == "object"}}'>
+    <block wx:for="{{item.textArray}}" wx:for-item="child" wx:key="">
+        <view class="wxaSortPickerItem" data-text="{{child.cname}}" data-value="{{child.name}}"  catchtap= "wxaSortPickerItemTap">
+          {{child.cname}}       
+        </view>
+    </block>
+  </block>
+  <block wx:else>
+    <block wx:for="{{item.textArray}}" wx:for-item="child" wx:key="">
+        <view class="wxaSortPickerItem" data-text="{{child}}"  catchtap= "wxaSortPickerItemTap">
+          {{child}}       
+        </view>
+    </block>
+  </block>
+    
+</template>
+
+<template name="wxaSortPickerTemTags">
+    <scroll-view style="width:20px;height: {{wxaSortPickerData.view.scrollHeight}}px;" class="wxaSortPickerTemTags">
+        <block wx:for="{{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']}}" wx:for-item="item" wx:key="">
+            <view bindtap="wxaSortPickerTemTagTap" data-tag="{{item}}" class="wxaSortPickerTemTag">{{item}}</view>
+        </block>
+    </scroll-view>
+</template>

+ 44 - 0
apps/RealtorEasier/utils/wxaSortPicker/wxaSortPicker.wxss

@@ -0,0 +1,44 @@
+.wxaSortPickerTemTags{
+  position: fixed;
+  top: 50%;
+  right: 20rpx;
+  color: #1CC2F7;
+  transform: translate(0,-50%);
+}
+.wxaSortPickerTemTag{
+  text-align: center;
+  padding: 2rpx;
+  font-size: 32rpx;
+  line-height: 34rpx;
+}
+.wxaSortPickerFixedTag{
+  position: fixed;
+  width: 100%;
+}
+
+.wxaSortPickerTag{
+  background-color: #F3F7F8;
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #46595F;
+  height: 60rpx;
+  line-height: 60rpx;
+  padding: 0 32rpx;
+}
+
+.wxaSortPickerItem-box{
+  background-color: #fff;
+  padding: 0 32rpx;
+}
+
+.wxaSortPickerItem{
+  height: 88rpx;
+  line-height: 88rpx;
+  border-bottom: 1px solid #DEE4E4;
+  color: #46595F;
+  font-size: 32rpx;
+}
+
+.wxaSortPickerItem:last-child{
+  border-bottom: none;
+}

+ 9 - 1
apps/agent/components/drop-down/drop-down.wxml

@@ -11,7 +11,15 @@
         <input type="number" value="{{maxjiage}}" placeholder="最大" bindinput="bindInput" data-key="{{'max'+item.id}}"></input>
       <view data-type="{{item.id}}" bindtap="comfirm" class="btn">确定</view>
     </view>
-    <view class="filter {{item.filter==='居室'?'':'hidden'}}">
+    <view class="filter {{item.filter==='卧室'?'':'hidden'}}">
+        <text>自定义{{item.filter}}:</text>
+        <input class="hidden" />
+        <input type="number" value="{{minjushi}}" placeholder="最小" bindinput="bindInput" data-key="{{'min'+item.id}}"></input>
+        <input type="number" value="{{maxjushi}}" placeholder="最大" bindinput="bindInput" data-key="{{'max'+item.id}}"></input>
+        <input class="hidden" />
+      <view data-type="{{item.id}}" bindtap="comfirm" class="btn">确定</view>
+    </view>
+    <view class="filter {{item.filter==='浴室'?'':'hidden'}}">
         <text>自定义{{item.filter}}:</text>
         <input class="hidden" />
         <input type="number" value="{{minjushi}}" placeholder="最小" bindinput="bindInput" data-key="{{'min'+item.id}}"></input>

+ 25 - 4
apps/agent/pages/index/index.js

@@ -52,9 +52,9 @@ const panelData={
                 id:'250#300'
             }]
         }],
-    'jushi':[{
+    'woshi':[{
             id:'jushi',
-            filter:'室',
+            filter:'室',
             items:[{
                 name:'不限',
                 id:''
@@ -71,7 +71,27 @@ const panelData={
                 name:'4室',
                 id:'4'
             }]
-    }]
+    }],
+    'yushi':[{
+        id:'yushi',
+        filter:'浴室',
+        items:[{
+            name:'不限',
+            id:''
+        },{
+            name:'1室',
+            id:'1'
+        },{
+            name:'2室',
+            id:'2'
+        },{
+            name:'3室',
+            id:'3'
+        },{
+            name:'4室',
+            id:'4'
+        }]
+}]
 }
 
 
@@ -96,7 +116,8 @@ Page({
         tab_panel:panelData[type_acive]||[],
         icon_list: [
             {name: '总价',icon:'edit',type:"jiage"},
-            {name: '居室',icon:'write',type:"jushi"}
+            {name: '卧室',icon:'write',type:"woshi"},
+            {name: '浴室',icon:'write',type:"yushi"}
         ],
         fetcherData: {
             page_num: 1,