230320a303 hai 11 meses
pai
achega
4d50fc8e72

+ 3 - 0
src/api/room.js

@@ -84,6 +84,9 @@ export default {
   apieshouserecordadd: params => { // 二手房 房源 房源跟进 添加
     return request('/api/eshouse/record/add', params, 'loading')
   },
+  apieshouserecordremind: params => { // 二手房 房源 房源跟进 提醒
+    return request('/api/eshouse/record/remind', params, 'loading')
+  },
   apirenthouselist: params => { // 二手房 出租 列表
     return request('/api/rent/house/list', params, 'loading')
   },

+ 71 - 0
src/pages/index/components/popup/remindRoom.jsx

@@ -0,0 +1,71 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View, Image } from '@tarojs/components'
+import './remindRoom.scss'
+export default class Popup extends Component {
+  constructor (props) {
+    super(props)
+    this.state = {
+      dataList: [],
+      isPopupShow: false
+    }
+  }
+
+
+  componentWillMount () {
+    const uoObj = Taro.getStorageSync('APP_userInfo')
+    if (uoObj) {
+      Taro.api.room.apieshouserecordremind().then(res => {
+        console.log(res)
+        const dataList = res || []
+        this.setState({
+          dataList,
+          isPopupShow: dataList.length > 0 ? true : false
+        })
+      })
+    }
+
+  }
+
+  openPopup () {
+    this.setState({
+      isPopupShow: true
+    })
+  }
+  closePopup () {
+    this.setState({
+      isPopupShow: false
+    })
+  }
+
+  linkRoomDtl (item) {
+    Taro.navigateTo({
+      url: `/pagesRoom/dtl?id=${item.id}`
+    })
+  }
+
+
+  render () {
+    const { isPopupShow, dataList } = this.state
+    const bgClose = require('@img/icon_g_close2.png')
+    return (
+      <View className={isPopupShow ? 'l-modal-box' : 'l-modal-box hide'}>
+        <View className='lmb-bg'></View>
+        <View className='lmb-body'>
+          <View className="scoped-box">
+            <View className="sb-main">
+              <View className="title">待跟进房源</View>
+              {
+                dataList.map(item => {
+                  return(
+                    <View key={item.id} onClick={this.linkRoomDtl.bind(this, item)} className="op">[{item.id}]{item.title}{`${'>>'}`}</View>
+                  )
+                })
+              }
+            </View>
+            <Image src={bgClose} className="close" onClick={this.closePopup.bind(this)} />
+          </View>
+        </View>
+      </View>
+    )
+  }
+}

+ 34 - 0
src/pages/index/components/popup/remindRoom.scss

@@ -0,0 +1,34 @@
+@import '@css/mixin.scss';
+@import '@css/modal.scss';
+.scoped-box {
+  width: 660px;
+  text-align: center;
+  position: relative;
+  .close {
+    width: 60px;
+    height: 60px;
+  }
+  .sb-main {
+    text-align: left;
+    background-color: #fff;
+    padding: 30rpx;
+    max-height: 800rpx;
+    overflow-y: auto;
+    .title {
+      height: 60rpx;
+      line-height: 60rpx;
+      text-align: center;
+      font-size: 30rpx;
+      font-weight: bold;
+      color: #333;
+    }
+    .op {
+      border-bottom: 1PX solid #dcdcdc;
+      padding: 10rpx 0;
+      color: #666;
+      &:last-child {
+        border-bottom: 0;
+      }
+    }
+  }
+}

+ 15 - 1
src/pages/index/index.jsx

@@ -10,6 +10,7 @@ import NewsNews from './components/news'
 import Channel from './components/channel'
 import PopupAd from './components/popup'
 import PopupFullAd from './components/popup/full'
+import RemindRoom from './components/popup/remindRoom'
 // import CountChart from './components/countChart'
 import FooterModule from './components/footerList'
 import './index.scss'
@@ -60,6 +61,7 @@ class Index extends Component {
       scrollTop: 0,
       curScrollObj: {},
       newRoomList: [],
+      uoObj: null,
     }
   }
 
@@ -76,6 +78,12 @@ class Index extends Component {
   componentWillMount () {
     const that = this
     Taro.$AHU(this)
+    const uoObj = Taro.getStorageSync('APP_userInfo')
+    if (uoObj) {
+      this.setState({
+        uoObj
+      })
+    }
     // const isFirstOpen = Taro.getStorageSync('APP_isFirstOpen')
     // if (isFirstOpen) {
     //   this.setState({
@@ -946,7 +954,7 @@ class Index extends Component {
 
 
   render () {
-    const { scrollTop, curScrollObj } = this.state
+    const { scrollTop, curScrollObj, uoObj } = this.state
     // // const bargainBg = require('./img/bg_bargain.gif')
     // const { isFirstOpen } = this.state
     const bg = require('./img/toper_bg2.jpg')
@@ -954,6 +962,12 @@ class Index extends Component {
     const isFullGray = Taro.$isFullGray
     return (
       <View className={isFullGray ? 'l-box has-footer page-gray-all' : 'l-box has-footer'}>
+        {
+          uoObj && uoObj.is_sale == 1
+          ?
+          <RemindRoom />
+          : ''
+        }
         <ScrollView
           scrollY
           scrollWithAnimation

+ 1 - 1
src/pagesMore/center/uploadRoom2.jsx

@@ -100,7 +100,7 @@ class Index extends Component {
               video: cObj.video || '',
               product_type: cObj.product_type || '',
             },
-            curProductTypeName: `${cObj.product_type}-${cObj.house_type.replace(/-/g, '')}`,
+            curProductTypeName: cObj.product_type && cObj.house_type ? `${cObj.product_type}-${cObj.house_type.replace(/-/g, '')}` : '',
             imgArr: (cObj.images && cObj.images.length > 0) ? cObj.images.split(',') : [],
             addr1: addr[0],
             addr2: addr[1],

+ 82 - 87
src/pagesRoom/follow/roomAdd.jsx

@@ -458,88 +458,93 @@ class Index extends Component {
       <View className="l-box">
         
         {this.renderTop()}
-
-        <View className='scoped-has-right'>
-          <View className="scoped-box">
-            <View className="sb-title">跟进证明的视频
-              {
-                formObj.video
-                ?
-                <View className="s4" onClick={() => {
-                  this.setState({
-                    formObj: {
-                      ...formObj,
-                      video: ''
-                    }
-                  })
-                }}>清除当前视频</View>
-                : ''
-              }
-            </View>
-            
-              {
-                formObj.video
-                ?
-                <View className="scoped-audio">
-                  <View className="si-op">
-                    <Video
-                      src={formObj.video}
-                      controls={true}
-                      autoplay={false}
-                      className="img"
-                    />
-                  </View>
+        <View className="scoped-box">
+          <View className="sb-title">备注(必填)</View>
+          <AtTextarea
+            value={formObj.remark}
+            onChange={this.baseFormChange.bind(this, 'remark')}
+            maxLength={300}
+            height={200}
+            placeholder='备注信息'
+          />
+        </View>
+        <View className="scoped-box">
+          <View className="sb-title">跟进证明的视频
+            {
+              formObj.video
+              ?
+              <View className="s4" onClick={() => {
+                this.setState({
+                  formObj: {
+                    ...formObj,
+                    video: ''
+                  }
+                })
+              }}>清除当前视频</View>
+              : ''
+            }
+          </View>
+          
+            {
+              formObj.video
+              ?
+              <View className="scoped-audio">
+                <View className="si-op">
+                  <Video
+                    src={formObj.video}
+                    controls={true}
+                    autoplay={false}
+                    className="img"
+                  />
                 </View>
-                :
-                <View className="scoped-img">
-                  <View className="si-op" onClick={this.viviHandle.bind(this)}>
-                    <Image src={addIcon2} className="img"/>
-                  </View>
+              </View>
+              :
+              <View className="scoped-img">
+                <View className="si-op" onClick={this.viviHandle.bind(this)}>
+                  <Image src={addIcon2} className="img"/>
                 </View>
-              }
-          </View>
+              </View>
+            }
         </View>
-        <View className='scoped-has-right'>
-          <View className="scoped-box">
-            <View className="sb-title">跟进证明的录音
-              {
-                formObj.record_audio
-                ?
-                <View className="s4" onClick={() => {
-                  this.setState({
-                    formObj: {
-                      ...formObj,
-                      record_audio: ''
-                    }
-                  })
-                }}>清除当前录音</View>
-                : ''
-              }
-            </View>
-              {
-                formObj.record_audio
-                ?
-                <View className="scoped-audio">
-                  <View className="si-op">
-                    <Audio
-                      src={formObj.record_audio}
-                      controls={true}
-                      autoplay={false}
-                      loop={false}
-                      muted={true}
-                      initialTime='30'
-                    />
-                  </View>
+        <View className="scoped-box">
+          <View className="sb-title">跟进证明的录音
+            {
+              formObj.record_audio
+              ?
+              <View className="s4" onClick={() => {
+                this.setState({
+                  formObj: {
+                    ...formObj,
+                    record_audio: ''
+                  }
+                })
+              }}>清除当前录音</View>
+              : ''
+            }
+          </View>
+            {
+              formObj.record_audio
+              ?
+              <View className="scoped-audio">
+                <View className="si-op">
+                  <Audio
+                    src={formObj.record_audio}
+                    controls={true}
+                    autoplay={false}
+                    loop={false}
+                    muted={true}
+                    initialTime='30'
+                  />
                 </View>
-                :
-                <View className="scoped-img">
-                  <View className="si-op" onClick={this.audioHandle.bind(this)}>
-                    <Image src={addIcon3} className="img"/>
-                  </View>
+              </View>
+              :
+              <View className="scoped-img">
+                <View className="si-op" onClick={this.audioHandle.bind(this)}>
+                  <Image src={addIcon3} className="img"/>
                 </View>
-              }
-            
-          </View>
+              </View>
+            }
+          
         </View>
         <View className="scoped-box">
           <View className="sb-title">跟进证明的图片
@@ -556,16 +561,6 @@ class Index extends Component {
             }
           </View>
         </View>
-        <View className="scoped-box">
-          <View className="sb-title">备注</View>
-          <AtTextarea
-            value={formObj.remark}
-            onChange={this.baseFormChange.bind(this, 'remark')}
-            maxLength={300}
-            height={200}
-            placeholder='备注信息'
-          />
-        </View>
         <View className="l-floor-footer t2">
           <View className="lff-flex">
             <View className="lff-btn full" onClick={this.saveHandle.bind(this)}>添加跟进</View>