瀏覽代碼

feat:更新实例化字段和QQ地图的key

jinx 4 年之前
父節點
當前提交
ddd4007855

+ 2 - 1
apps/RealtorEasier/app.js

@@ -29,7 +29,8 @@ App({
     this.appIMDelegate = new AppIMDelegate(this);
     this.appIMDelegate.onLaunch(options);
     this.globalData.qqmapsdk = new QQMapWX({
-      key: 'RG7BZ-G2KRV-XWPP2-U5GWL-WWQPF-RIBUW'
+      // key: 'RG7BZ-G2KRV-XWPP2-U5GWL-WWQPF-RIBUW'
+      key: 'LDZBZ-4CSL5-PCGI3-QKU7B-7BSYJ-4KFBA&output=jsonp' // 美房 appkey
     });
     if (this.globalData.token) {
       wx.nextTick((callback => {

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

@@ -76,19 +76,19 @@ Component({
       {
         label: '建设年份',
         value: '2009',
-        name: 'build_time',
-        format: fotmatDate
+        name: 'constructionYear',
+        // format: fotmatDate
       },
       {
         label: '浴室个数',
         value: '1',
-        name: 'bathRoom_num',
+        name: 'showerroomAmount',
         // format: fotmatDate
       },
       {
         label: '卧室数量',
         value: '3',
-        name: 'bedRomm_num'
+        name: 'bedroomAmount'
       },
       {
         label: '单位价格',
@@ -98,17 +98,17 @@ Component({
       {
         label: '物业编号',
         value: '12321321',
-        name: 'unit_number'
+        name: 'propertyNumber'
       },
       {
         label: '建筑面积',
         value: '123',
-        name: 'build_area'
+        name: 'buildingArea'
       },
       {
         label: '土地面积',
         value: '123',
-        name: 'land_area'
+        name: 'floorSpace'
       },
     ]
   },

+ 24 - 17
apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.wxml

@@ -3,7 +3,8 @@
 <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" wx:for="{{house.houseLabel}}" wx:key="index">{{ item }}</view>
+            <!-- <view class="tab-item" wx:for="{{house.tags}}" wx:key="index">{{ item }}</view> -->
             <!-- <view class="tab-item" > 满两年 </view>
             <view class="tab-item" > 随时可看 </view> -->
         </view>
@@ -32,15 +33,18 @@
         </view>
         <view class="house-parameter">
             <view class="parameter-item">
-                <view class="price">{{ house.price / 10000 }}万</view>
+                <!-- <view class="price">${{ house.price / 10000 }}万</view> -->
+                <view class="price">${{ house.price }}万</view>
                 <view class="parameter-name">售价</view>
             </view>
             <view class="parameter-item">
-                <view class="price">{{ house.house_type || '暂无数据' }}</view>
+                <!-- <view class="price">{{ house.house_type || '暂无数据' }}</view> -->
+                <view class="price">{{house.bedroomAmount+'卧'+house.showerroomAmount+'卫' || '暂无数据' }}</view>
                 <view class="parameter-name">房型</view>
             </view>
             <view class="parameter-item">
-                <view class="price">{{ house.area ? house.area + 'm²' : '暂无数据' }}</view>
+                <!-- <view class="price">{{ house.area ? house.area + 'm²' : '暂无数据' }}</view> -->
+                <view class="price">{{ house.buildingArea ? house.buildingArea + 'ft²' : '暂无数据' }}</view>
                 <view class="parameter-name">建筑面积</view>
             </view>
         </view>
@@ -49,9 +53,9 @@
                 <text class="label">{{ item.label }}:</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=='bedroomAmount' ||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>
+                <text class="value" wx:if="{{item.name=='buildingArea' ||item.name=='floorSpace' }}">平方英尺</text>
             </view>
         </view>
         <view class="vr-tip" wx:if="{{!isAgency && house.vrLink}}">
@@ -68,7 +72,8 @@
             <view class="detail-title">位置及周边配套</view>
             <view class="location-item">
                 <text class="location-label">位置:</text>
-                <text class="location-value">{{ house.city + house.estate_name }}</text>
+                <!-- <text class="location-value">{{ house.city + house.estate_name }}</text> -->
+                <text class="location-value">{{ house.city + house.address }}</text>
             </view>
             <view class="location-item" wx:if="{{!isAgency}}">
                 <text class="location-label">学校信息:</text>
@@ -90,29 +95,31 @@
             <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 wx:for="house.remarks" :key="name">
+                <view class="detail-text">{{item.title}}</view>
+                <view class="detail-text">
+                  {{item.text}}
+                </view>
             </view>
+
         </view>
     </view>
 
     <!-- 配套设施 -->
-    <view class=" padding-container">
+    <view class=" padding-container" wx:if="{{house.ancillaryFacility.length>0}}">
         <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" wx:for="{{house.ancillaryFacility}}" wx:key="name">{{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>
-                <text class="tag-item">藏书师</text>
-                
+                <text class="tag-item">藏书师</text> -->
+
             </view>
         </view>
     </view>

+ 1 - 0
apps/RealtorEasier/components/detail-components/detail-scroll/detail-scroll.wxss

@@ -159,6 +159,7 @@
   margin-bottom: 26rpx;
   font-weight: bold;
 }
+
 .detail-text {
   font-size: 30rpx;
   color: #111;

+ 6 - 3
apps/RealtorEasier/components/house-item/house-item.wxml

@@ -9,15 +9,18 @@
     </view>
     <view class="content">
       <view class="houseinfo">
-        <view class="text-black address" >{{ house.district }}/{{ house.address }}</view>
+        <!-- <view class="text-black address" >{{ house.district }}/{{ house.address }}</view> -->
+        <view class="text-black address" >{{ house.city }}/{{ 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.house_type}}">{{house.house_type}}</view>
+        <!-- <view class="tap-item" wx:if="{{house.house_type}}">{{house.house_type}}</view> -->
+        <view class="tap-item">{{house.bedroomAmount}}卧{{house.showerroomAmount}}卫</view>
       </view>
     <view class="price-w">
-        <text class="price text-bold">${{ house.price/10000 }}万</text>
+        <!-- <text class="price text-bold">${{ house.price/10000 }}万</text> -->
+        <text class="price text-bold">${{ house.price }}万</text>
         <!-- <text class="price-tip">{{ house.unit_price }}元/平</text> -->
       </view>
     </view>

+ 6 - 0
apps/RealtorEasier/config/config.js

@@ -1,6 +1,12 @@
 export const IM_HOST = 'wss://vrhouse2.4dkankan.com'
 
 export const API_BASE_URL = 'https://vrhouse2.4dkankan.com'
+//以上是最新引用
+// export const IM_HOST = 'wss://testusa.4dkankan.com'
+
+// export const API_BASE_URL = 'https://testusa.4dkankan.com'
+
+// 以下是屏蔽内容
 
 
 // export const IM_HOST = 'ws://192.168.0.83:8085'

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

@@ -20,6 +20,7 @@ Page({
      * 组件的属性列表
      */
     data: {
+        token:app.globalData.token,
         tabList: [],
         show_empty: false,
         houses: [],
@@ -84,6 +85,7 @@ Page({
         }
     },
     onShow: function () {
+  
         var that = this;
         var city = app.globalData.city;
         if (city !== this.data.fetcherData.city) {
@@ -126,7 +128,6 @@ Page({
         wx.getSetting({
             success: (res) => {
                 var statu = res.authSetting;
-                console.log('****************')
                 console.log(res)
                 this.getPermission()
             },
@@ -237,7 +238,6 @@ Page({
     },
     getPhoneNumber (e) {
         this.triggerEvent('toVrHouse')
-  
         loginFn(e, app.globalData.user_code, this.properties.isAgency ? true : false).then(res => {
          
           this.setData({

+ 1 - 0
apps/RealtorEasier/pages/index/index.wxml

@@ -11,6 +11,7 @@
         <view>{{ fetcherData.city }}</view>
     </view>
 </view>
+
 <!-- <button class="getPhoneNum" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">测试获取手机号</button>  -->
 <!-- 屏蔽栏目 -->
 <!-- <view class="icon-list {{ isFixedTop ? 'fixed' : ''}}">

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

@@ -61,6 +61,7 @@ Page({
         })
     },
     onShow: function () {
+      
         this.setData({
             isLogined: app.globalData.token ? true : false,
             userinfo: app.globalData.userinfo

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

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

+ 5 - 1
apps/RealtorEasier/utils/login.js

@@ -1,5 +1,5 @@
 import UserApi from "../apis/user"
-import { saveToken, saveUserInfo } from './storage'
+import { saveToken, saveUserInfo ,removeUserCode,saveUserCode} from './storage'
 import EventEmitter from './eventEmitter'
 const app = getApp()
 function wxLogin() {
@@ -7,7 +7,10 @@ function wxLogin() {
     wx.login({
       success(res) {
         getApp().globalData.user_code = res.code
+        console.log(res)
         saveUserInfo(res.code)
+        removeUserCode()//先删除再存入
+        saveUserCode(res.code)
         resovle(res.code)
       },
       fail(err) {
@@ -108,6 +111,7 @@ function tips (res) {
 
 export default function Login(phone_data, code, isAgency) {
   const { encryptedData, iv } = phone_data.detail
+  console.log(phone_data)
   
   if (!encryptedData || !iv) {
     return new Promise((_, reject) => reject())