liujq 3 tahun lalu
induk
melakukan
ac4cdf29bb

+ 3 - 0
src/api/base.js

@@ -36,4 +36,7 @@ export default {
   apiuserintegrallist: params => { // 用户积分明细列表
     return request('/api/user/integral/list', params)
   },
+  apiuserinfolist: params => { // 用户信息列表
+    return request('/api/user/info/list', params)
+  },
 }

+ 9 - 0
src/api/room.js

@@ -9,4 +9,13 @@ export default {
   apiestatehouselist: params => { // 房源 二手楼盘列表
     return request('/api/estate/house/list', params)
   },
+  apiuserchatlist: params => { // 消息 -历史消息列表
+    return request('/api/user/chat/list', params)
+  },
+  apiuserdialoglist: params => { // 消息 - socket 消息
+    return request('/api/user/dialog/list', params)
+  },
+  apiusersendmessage: params => { // 消息 - 发送消息
+    return request('/api/user/send/message', params)
+  },
 }

+ 3 - 1
src/app.jsx

@@ -67,7 +67,6 @@ class App extends Component {
           'center/feedback',
           'center/loanCalc',
           'center/webViews',
-          'center/message',
           'center/coupon',
           'center/sxf',
           'center/saleEdit',
@@ -106,6 +105,9 @@ class App extends Component {
           'add',
           'dtl',
           'dtlSub',
+          'msg/index',
+          'msg/chat',
+          'msg/message',
         ]
       },
       {

+ 1 - 1
src/components/lform/MultiSelect.jsx

@@ -125,7 +125,7 @@ export default class MultiSelect extends Component {
     if (keyWord) params[moreOptions.skey] = keyWord
     Taro.api[apiUrlArr[0]][apiUrlArr[1]]({
       page_size: 20,
-      params,
+      ...params,
     }).then(res => {
       const arr = res.list || res || []
       const remoteOptions = []

+ 1 - 1
src/components/lform/RadioSelect.jsx

@@ -68,7 +68,7 @@ export default class RadioSelect extends Component {
     if (keyWord) params[moreOptions.skey] = keyWord
     Taro.api[apiUrlArr[0]][apiUrlArr[1]]({
       page_size: 20,
-      params,
+      ...params,
     }).then(res => {
       const arr = res.list || res || []
       const remoteOptions = []

+ 2 - 2
src/pagesHouse/components/priceChart/EchartPie.jsx

@@ -45,7 +45,7 @@ export default class TopPie extends Component {
     const seriesData = newArr.sort((a, b) => {
       return b.value - a.value
     })
-    seriesData[0].selected = true
+    // seriesData[0].selected = true
     setTimeout(() => {
       if (!this.chart) return
       this.chart.setOption({
@@ -63,7 +63,7 @@ export default class TopPie extends Component {
             name: '访问来源',
             type: 'pie',
             clockwise: false,
-            radius: ['30%','50%'],
+            radius: '40%',
             center: ['40%', '50%'],
             label: {
               normal: {

+ 5 - 4
src/pagesHouse/priceChart.jsx

@@ -91,10 +91,11 @@ class Index extends Component {
         isListLoading: false
       })
       if (lineData.length > 0) {
-        if (this.subLine) this.subLine.getData(lineData.reverse() || [])
-        if (this.subTotalPrice) this.subTotalPrice.getData(lineData.reverse() || [])
-        if (this.subPie) this.subPie.getData(lineData.reverse() || [])
-        if (this.subCompany) this.subCompany.getData(lineData.reverse() || [])
+        const subList = lineData.reverse()
+        if (this.subLine) this.subLine.getData(subList || [])
+        if (this.subTotalPrice) this.subTotalPrice.getData(subList || [])
+        if (this.subPie) this.subPie.getData(subList || [])
+        if (this.subCompany) this.subCompany.getData(subList || [])
       }
     })
   }

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

@@ -197,7 +197,7 @@ class Index extends Component {
           </Navigator>
           : ''
         }
-        <Navigator url="/pagesMore/center/message" className="entry-op">
+        <Navigator url="/pagesQa/msg/index" className="entry-op">
           <Image src={icon9} className="entry-icon"></Image>
           <View className="entry-text">我的消息</View>
           <View className="entry-right">

+ 323 - 0
src/pagesQa/msg/chat.jsx

@@ -0,0 +1,323 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View, ScrollView } from '@tarojs/components'
+import ListMore from '@/c/pageDataList/listMore'
+import { strTrim, arrToObj } from '@utils'
+import './chat.scss'
+
+class Index extends Component {
+
+  constructor (props) {
+    super(props)
+    const {id: curId} = this.$router.params
+    this.state = {
+      page_size: 10,
+      page: 1,
+      isListEnd: false,
+      isListLoading: false,
+      isListEmpty: false,
+      dataList: [],
+      curId,
+      curObj: {},
+      commentVal: '',
+      msgSocketList: [],
+      uObj: {},
+      chatUserObj: {},
+      viewId: '',
+    }
+  }
+
+  config = {
+    navigationBarTitleText: '在线聊天',
+  }
+
+
+  componentWillMount () {
+    const that = this
+    let uObj = Taro.getStorageSync('APP_userInfo')
+    const { to_user_id } = this.$router.params
+    this.setState({
+      uObj
+    }, () => {
+      let uArr = [uObj.user_id, to_user_id]
+      Taro.api.base.apiuserinfolist({
+        user_ids: uArr.join(',')
+      }).then(res => {
+        let chatUserObj = {}
+        const list = res.list || []
+        list.forEach(item => {
+          chatUserObj[item.id] = item
+        })
+        that.setState({
+          chatUserObj
+        })
+      })
+      Taro.$AHU(this)
+      this.getDataList()
+      this.initSocket()    
+    })
+  }
+
+  getDataList () {
+    const { to_user_id } = this.$router.params
+    let { page_size, page, dataList, isListEmpty } = this.state
+    Taro.api.room.apiuserchatlist({
+      page,
+      page_size,
+      to_user_id,
+    }).then(res => {
+      let curData = res.list || []
+      curData = curData.reverse()
+      let isListEnd = false
+      if (curData.length > 0) {
+        if (page === 1) {
+          dataList = curData
+        } else {
+          dataList = [].concat(curData, dataList)
+        }
+        if (curData.length === page_size && res.total !== curData.length) {
+          isListEnd = false
+        } else {
+          isListEnd = true
+        }
+      }
+      if (curData.length === 0 && page === 1) {
+        isListEmpty = true
+        dataList = []
+      } else {
+        isListEmpty = false
+      }
+      const that = this
+      this.setState({
+        dataList,
+        isListEnd,
+        isListEmpty,
+        isListLoading: false
+      }, () => {
+        if (page > 1) {
+          setTimeout(() => {
+            that.setState({
+              viewId: `history11`
+            })
+          }, 100)
+        }
+      })
+    })
+  }
+  onScrollToUpper (e) {
+    let { isListEnd, isListLoading, page } = this.state
+    if (!isListEnd && !isListLoading) {
+      page++
+      this.setState({
+        page,
+        isListLoading: true
+      }, () => {
+        this.getDataList()
+      })
+    }
+  }
+
+  initSocket () {
+    const that = this
+    Taro.connectSocket({
+      url: 'ws://192.168.101.147:8089/acc',
+      success: function () {
+        console.log('connect success')
+      }
+    }).then(task => {
+      task.onOpen(function () {
+        // console.log('onOpen')
+        const { to_user_id } = this.$router.params
+        let token = Taro.getStorageSync('APP_token')
+        task.send({ data: '{"seq":"' + that.sendId() + '","cmd":"login","data":{"userId":"' + to_user_id + '","appId":101,"serviceToken":"' + token + '"}}' })
+        setInterval(() => {
+          task.send({data: '{"seq":"' + that.sendId() + '","cmd":"heartbeat","data":{}}'});
+        }, 30000)
+      })
+      task.onMessage(function (msg) {
+        // console.log('onMessage: ', msg)
+        let { msgSocketList } = that.state
+        const data = JSON.parse(msg.data)
+        // console.log(data)
+        if (data.cmd === 'msg' || data.cmd === 'login') {
+          const res = data.response || {}
+          if (res.code === 200) {
+            if (data.cmd === 'login') {
+              msgSocketList.push({msg: '登录成功~'})
+            } else {
+              msgSocketList.push(res.data)
+            }
+            that.setState({
+              msgSocketList
+            }, () => {
+              setTimeout(() => {
+                that.setState({
+                  viewId: `item${msgSocketList.length - 1}`
+                })
+              }, 100)
+            })
+          }
+        }
+        // task.close()
+      })
+      task.onError(function () {
+        console.log('onError')
+      })
+      task.onClose(function (e) {
+        console.log('onClose: ', e)
+      })
+    })
+  }
+  sendId () {
+    let timeStamp = +new Date()
+    let randId = parseInt(Math.random() *  1000000)
+    return `${timeStamp}-${randId}`
+  }
+
+
+  componentDidShow () { }
+
+  componentDidHide () { }
+
+
+  renderList () {
+    const { chatUserObj, uObj, viewId } = this.state
+    const { dataList, isListEnd, isListLoading, isListEmpty } = this.state
+    const itemList = dataList.map((item, index) => {
+      return (
+        <View className="sl-item" key={index} id={`history${index}`}>
+          <View className={item.user_id === uObj.user_id ? 'sl-wrap' : 'sl-wrap t2'}>
+            <View className="sl-img">
+              <Image className="img" src={chatUserObj[item.user_id].avatar}></Image>
+            </View>
+            <View className="sl-right">
+              <View className="sign"></View>
+              <View className="sl-text">{item.content}</View>
+              <View className="sl-time">{item.create_at}</View>
+            </View>
+          </View>
+        </View>
+      )
+    })
+    return (
+      <ScrollView
+        className='l-scroll-view'
+        scrollY
+        scrollWithAnimation
+        upperThreshold="10"
+        scrollIntoView={viewId}
+        onScrollToUpper={this.onScrollToUpper.bind(this)}
+      >
+        <ListMore isListEnd={isListEnd} isListLoading={isListLoading} isListEmpty={isListEmpty} text="暂无历史消息" />
+        <View className="scoped-list">
+          {itemList}
+        </View>
+        {/* {
+          dataList.length > 0
+          &&
+          <AtDivider content="以上为历史消息"  fontColor='#ccc' lineColor='#ccc' />
+        } */}
+        {this.renderMsgList()}
+        <View id="msgId"></View>
+      </ScrollView>
+    )
+  }
+
+
+  renderMsgList () {
+    const { msgSocketList } = this.state
+    const { chatUserObj, uObj } = this.state
+    const curItems = msgSocketList.map((item, index) => {
+      return (
+        <View className="sl-item" key={index} id={`item${index}`}>
+          {
+            item.from
+            ?
+            <View className={item.from === uObj.user_id ? 'sl-wrap' : 'sl-wrap t2'}>
+              <View className="sl-img">
+                <Image className="img" src={chatUserObj[item.from].avatar}></Image>
+              </View>
+              <View className="sl-right">
+                <View className="sign"></View>
+                <View className="sl-text">{item.msg}</View>
+              </View>
+            </View>
+            :
+            <View className="scoped-msg-tips">{item.msg}</View>
+          }
+        </View>
+      )
+    })
+    return (
+      <View className="scoped-list">
+        {curItems}
+      </View>
+    )
+  }
+
+
+  sendHandle () {
+    const that = this
+    const { uObj } = this.state
+    const { commentVal } = this.state
+    let { msgSocketList } = this.state
+    const { to_user_id } = this.$router.params
+    let apiStr = 'apiusersendmessage'
+    if (commentVal) {
+      Taro.api.room[apiStr]({
+        message: commentVal,
+        type: 'text',
+        to_user: to_user_id,
+      }).then(res => {
+        msgSocketList.push({
+          from: uObj.user_id,
+          msg: commentVal
+        })
+        this.setState({
+          msgSocketList,
+          commentVal: '',
+        }, () => {
+          setTimeout(() => {
+            that.setState({
+              viewId: `item${msgSocketList.length - 1}`
+            })
+          }, 100)
+        })
+      })
+    } else {
+      Taro.$msg('请输入')
+    }
+  }
+
+  changeInput (e) {
+    const val = strTrim(e.target.value)
+    this.setState({
+      commentVal: val
+    })
+  }
+
+  renderFooter () {
+    const { commentVal } = this.state
+    return (
+      <View className="l-floor-footer">
+        <View className="scoped-footer">
+          <View className="sf-input">
+            <Input className="input" placeholder={`请输入`} value={commentVal}  onInput={this.changeInput.bind(this)} />
+            <View className="btn" onClick={this.sendHandle.bind(this)}>发送</View>
+          </View>
+        </View>
+      </View>
+    )
+  }
+
+
+  render () {
+    return (
+      <View className="l-box has-footer">
+        {this.renderList()}
+        {this.renderFooter()}
+      </View>
+    )
+  }
+}
+
+export default Index

+ 101 - 0
src/pagesQa/msg/chat.scss

@@ -0,0 +1,101 @@
+@import '@css/mixin.scss';
+page {
+  height: 100%;
+  background: #f2f2f2;
+  font-size: 28px;
+}
+.l-scroll-view {
+  height: calc(100vh - 140px);
+  box-sizing: border-box;
+}
+.scoped-footer {
+  .sf-input {
+    display: flex;
+    background: #f2f2f2;
+    padding: 10px 20px;
+    border-radius: 10px;
+    .input {
+      flex: 1;
+      height: 70px;
+    }
+    .btn {
+      width: 140px;
+      height: 70px;
+      line-height: 70px;
+      margin-left: 20px;
+      background: $mainColor;
+      color: #fff;
+      font-size: 28px;
+      text-align: center;
+      border-radius: 10px;
+    }
+  }
+}
+
+.scoped-list {
+  padding: 20px;
+  .sl-item {
+    margin-bottom: 20px;
+  }
+  .sl-wrap {
+    display: flex;
+    &.t2 {
+      flex-direction: row-reverse;
+      .sl-right {
+        margin-left: 0;
+        margin-right: 20px;
+        .sign {
+          border-color: transparent transparent transparent #fff;
+          left: auto;
+          right: -26px;
+        }
+      }
+      .sl-text, .sl-time {
+        text-align: right;
+      }
+    }
+  }
+  .sl-img {
+    width: 90px;
+    height: 90px;
+    border-radius: 50%;
+    overflow: hidden;
+    .img {
+      width: 90px;
+      height: 90px;
+      border-radius: 50%;
+      overflow: hidden;
+    }
+  }
+  .sl-right {
+    display: inline-block;
+    max-width: 450px;
+    background: #fff;
+    border-radius: 10px;
+    padding: 20px;
+    margin-left: 20px;
+    position: relative;
+    .sign {
+      position: absolute;
+      border-style: solid;
+      border-width: 16px;
+      border-color: transparent #fff transparent transparent ;
+      top: 20px;
+      left: -26px;
+    }
+  }
+  .sl-text {
+    color: #313131;
+    font-size: 28px;
+  }
+  .sl-time {
+    font-size: 24px;
+    color: #999;
+  }
+}
+
+.scoped-msg-tips {
+  text-align: center;
+  color: #999;
+  font-size: 24px;
+}

+ 138 - 0
src/pagesQa/msg/index.jsx

@@ -0,0 +1,138 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View, Image, Text, Navigator } from '@tarojs/components'
+
+import ListMore from '@/c/pageDataList/listMore'
+import './index.scss'
+import { arrToObj } from '@utils'
+
+class Index extends Component {
+
+  constructor (props) {
+    super(props)
+    this.state = {          
+      page_size: 10,
+      page: 1,
+      isListEnd: false,
+      isListLoading: false,
+      isListEmpty: false,
+      dataList: [],
+      isRuleShow: false,
+      curObj: {},
+    }
+  }
+
+  config = {
+    navigationBarTitleText: '我的消息',
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    this.getDataList()
+  }
+
+  componentDidShow () { }
+
+  componentDidHide () { }
+
+  getDataList () {
+    let { page_size, page, dataList, isListEmpty } = this.state
+    Taro.api.room.apiuserdialoglist({
+      page,
+      page_size,
+    }).then(res => {
+      const curData = res.list || []
+      let isListEnd = false
+      if (curData.length > 0) {
+        if (page === 1) {
+          dataList = curData
+        } else {
+          dataList = dataList.concat(curData)
+        }
+        if (curData.length === page_size && res.total !== curData.length) {
+          isListEnd = false
+        } else {
+          isListEnd = true
+        }
+      }
+      if (curData.length === 0 && page === 1) {
+        isListEmpty = true
+        dataList = []
+      } else {
+        isListEmpty = false
+      }
+      this.setState({
+        dataList,
+        isListEnd,
+        isListEmpty,
+        isListLoading: false
+      })
+    })
+  }
+  onScrollToLower (e) {
+    let { isListEnd, isListLoading, page } = this.state
+    if (!isListEnd && !isListLoading) {
+      page++
+      this.setState({
+        page,
+        isListLoading: true
+      }, () => {
+        this.getDataList()
+      })
+    }
+  }
+
+  renderList () {
+    const { dataList, isListEnd, isListLoading, isListEmpty } = this.state
+    const itemList = dataList.map((item, index) => {
+      return (
+        <View className="sl-item" key={index}>
+          <Navigator url={`/pagesQa/msg/chat?to_user_id=${item.to_user_id}`} className="sl-wrap">
+            <View className="sl-img">
+              <Image className="img" src={item.avatar}></Image>
+            </View>
+            <View className="sl-right">
+              <View className="sl-p1">{item.nickname}</View>
+              <View className="sl-p2">{item.message_content}</View>
+              <View className="sl-p3">{item.num}条消息未读</View>
+              <View className="sl-r1">{item.format_update_at}</View>
+            </View>
+          </Navigator>
+        </View>
+      )
+    })
+    return (
+      <ScrollView
+        className='l-scroll-view'
+        scrollY
+        scrollWithAnimation
+        scrollTop="0"
+        lowerThreshold="30"
+        onScrollToLower={this.onScrollToLower.bind(this)}
+      >
+        <View className="scoped-list">
+          {itemList}
+        </View>
+        <ListMore isListEnd={isListEnd} isListLoading={isListLoading} isListEmpty={isListEmpty} />
+      </ScrollView>
+    )
+  }
+
+
+  linkHouseDtl () {
+    const { curObj } = this.state
+    Taro.navigateTo({
+      url: `/pagesHouse/indexDtl?id=${curObj.estate_id}`
+    })
+  }
+
+
+  render () {
+    return (
+      <View className="l-box">
+        {this.renderList()}
+      </View>
+    )
+  }
+}
+
+export default Index

+ 48 - 0
src/pagesQa/msg/index.scss

@@ -0,0 +1,48 @@
+@import '@css/mixin.scss';
+.l-scroll-view {
+  height: calc(100vh);
+  box-sizing: border-box;
+}
+.scoped-list {
+  .sl-wrap {
+    display: flex;
+    padding: 20px;
+    border-bottom: 1PX solid #f2f2f2;
+    position: relative;
+  }
+  .sl-img {
+    width: 120px;
+    height: 120px;
+    .img {
+      width: 120px;
+      height: 120px;
+    }
+  }
+  .sl-right {
+    flex: 1;
+    padding-left: 20px;
+  }
+  .sl-p1 {
+    color: #313131;
+    font-size: 30px;
+    font-weight: bold;
+    padding-bottom: 10px;
+    padding-top: 10px;
+  }
+  .sl-p2 {
+    color: #666;
+    font-size: 26px;
+    @include textOverflows();
+  }
+  .sl-p3 {
+    color: $dangerColor;
+    font-size: 24px;
+  }
+  .sl-r1 {
+    position: absolute;
+    top: 30px;
+    right: 20px;
+    color: #999;
+    font-size: 26px;
+  }
+}

+ 169 - 0
src/pagesQa/msg/message.jsx

@@ -0,0 +1,169 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View, Image, Text, Navigator } from '@tarojs/components'
+
+import ListMore from '@/c/pageDataList/listMore'
+import './message.scss'
+import { arrToObj } from '@utils'
+
+class Index extends Component {
+
+  constructor (props) {
+    super(props)
+    this.state = {          
+      page_size: 10,
+      page: 1,
+      isListEnd: false,
+      isListLoading: false,
+      isListEmpty: false,
+      dataList: [],
+    }
+  }
+
+  config = {
+    navigationBarTitleText: '我的消息',
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    this.getDataList()
+  }
+
+  componentDidShow () { }
+
+  componentDidHide () { }
+
+  getDataList () {
+    const HideMan = require('@img/icon_hide_man.png')
+    let { page_size, page, dataList, isListEmpty } = this.state
+    Taro.api.other.notifylist({
+      page,
+      page_size,
+    }).then(res => {
+      const curData = res.list || []
+      let isListEnd = false
+      if (curData.length > 0) {
+        if (page === 1) {
+          dataList = curData
+        } else {
+          dataList = dataList.concat(curData)
+        }
+        if (curData.length === page_size && res.total !== curData.length) {
+          isListEnd = false
+        } else {
+          isListEnd = true
+        }
+      }
+      if (curData.length === 0 && page === 1) {
+        isListEmpty = true
+        dataList = []
+      } else {
+        isListEmpty = false
+      }
+      // dataList.map(item => {
+      //   if (item.is_anon === '1') {
+      //     item.nickname = '洪楼粉丝'
+      //     item.avatar = HideMan
+      //   }
+      // })
+      this.setState({
+        dataList,
+        isListEnd,
+        isListEmpty,
+        isListLoading: false
+      })
+    })
+  }
+  onScrollToLower (e) {
+    let { isListEnd, isListLoading, page } = this.state
+    if (!isListEnd && !isListLoading) {
+      page++
+      this.setState({
+        page,
+        isListLoading: true
+      }, () => {
+        this.getDataList()
+      })
+    }
+  }
+
+  renderList () {
+    const dictData = Taro.getStorageSync('dictData')
+    const { dataList, isListEnd, isListLoading, isListEmpty } = this.state
+    const itemList = dataList.map((item, index) => {
+      let curTypeStr = ''
+      if (item.action === 1 || item.action === 2) curTypeStr = '楼盘评论'
+      if (item.action === 3 || item.action === 4) curTypeStr = '学校评论'
+      if (item.action === 5 || item.action === 6) curTypeStr = '提问'
+      const targetCont = item.target_cont.length > 11 ? item.target_cont.substring(0, 11) + '...' : item.target_cont
+      return (
+        <View className="sm-item" key={index} onClick={this.linkDtlMore.bind(this, item)}>
+          <View className="sm-img">
+            <Image className="img" src={item.avatar} />
+          </View>
+          <View className="sm-info">
+            <View className="sm-p1">
+              <View className="n">{item.nickname}</View>  
+              {
+                item.action === 1 || item.action === 3 || item.action === 5
+                ? `回复了你的${curTypeStr}`
+                : ''
+              }
+            </View>
+            <View className="sm-p2">{item.content}{(item.action === 2 || item.action === 4 || item.action === 6)  ? `的${curTypeStr}` : ''}</View>
+            <View className="sm-p3">{item.create_at}</View>
+          </View>
+          <View className="sm-right">{targetCont}</View>
+        </View>
+      )
+    })
+    return (
+      <ScrollView
+        className='l-scroll-view'
+        scrollY
+        scrollWithAnimation
+        scrollTop="0"
+        lowerThreshold="30"
+        onScrollToLower={this.onScrollToLower.bind(this)}
+      >
+        <View className="scoped-message">
+          {itemList}
+        </View>
+        <ListMore isListEnd={isListEnd} isListLoading={isListLoading} isListEmpty={isListEmpty} />
+      </ScrollView>
+    )
+  }
+
+  linkDtlMore (item) {
+    if (item.action === 1 || item.action === 2) {
+      Taro.navigateTo({
+        url: `/pagesMore/comment/dtl?id=${item.target_id}&estateId=${item.option_id}`
+      })
+    }
+    if (item.action === 3 || item.action === 4) {
+      Taro.navigateTo({
+        url: `/pagesMore/comment/dtl?id=${item.target_id}&schoolId=${item.option_id}`
+      })
+    }
+    if (item.action === 5 || item.action === 6) {
+      Taro.navigateTo({
+        // url: `/pagesMore/qa/dtl?id=${item.target_id}`
+        url: `/pagesQa/dtl?id=${item.target_id}`
+      })
+    }
+    if (item.action === 7 || item.action === 8) {
+      Taro.navigateTo({
+        url: `/pagesQa/dtl?id=${item.target_id}`
+      })
+    }
+  }
+  // pagesMore/comment/dtl
+  render () {
+    return (
+      <View className="l-box">
+        {this.renderList()}
+      </View>
+    )
+  }
+}
+
+export default Index

+ 57 - 0
src/pagesQa/msg/message.scss

@@ -0,0 +1,57 @@
+@import '@css/mixin.scss';
+.l-scroll-view {
+  height: calc(100vh);
+  box-sizing: border-box;
+}
+.scoped-message {
+  padding: 20px;
+  .sm-item {
+    border-bottom: 1PX solid #f2f2f2;
+    padding: 20px 0;
+    display: flex;
+  }
+  .sm-img {
+    width: 120px;
+    text-align: center;
+    .img {
+      width: 90px;
+      height: 90px;
+      border-radius: 50%;
+      overflow: hidden;
+    }
+  }
+  .sm-info {
+    flex: 1;
+    padding-right: 10px;
+  }
+  .sm-p1 {
+    color: #8c8c8c;
+    font-size: 24px;
+    .n {
+      display: inline-block;
+      color: #262626;
+      font-weight: bold;
+      padding-right: 10px;
+    }
+  }
+  .sm-p2 {
+    color: #313131;
+    font-size: 28px;
+    padding-top: 10px;
+  }
+  .sm-p3 {
+    font-size: 24px;
+    color: #9d9d9d;
+    padding-top: 10px;
+  }
+  .sm-right {
+    width: 140px;
+    height: 140px;
+    color: #7d7d7d;
+    box-sizing: border-box;
+    padding: 20px;
+    font-size: 24px;
+    text-align: center;
+    background: #f9f9f9;
+  }
+}

+ 4 - 1
src/pagesRoom/dtl.jsx

@@ -279,7 +279,10 @@ class Index extends Component {
 
 
   netLink () {
-    Taro.$msg('正在开发,敬请期待~')
+    const { curObj } = this.state
+    Taro.navigateTo({
+      url: `/pagesQa/msg/chat?to_user_id=${curObj.user_id}`
+    })
   }
   callHandle (saleObj) {
     Taro.makePhoneCall({

+ 1 - 1
src/utils/http.js

@@ -23,7 +23,7 @@ const Http = (options = { data: {} }) => {
       }
     }
     try {
-      // let baseUrl = 'http://api.kaolanet.com'
+      // let baseUrl = 'http://api.dev.com'
       let baseUrl = 'https://api.honglouplus.com'
       // let baseUrl = 'https://api.honglounews.com'
       const resX = Taro.request({