230320a303 2 달 전
부모
커밋
db6c156d50

+ 7 - 1
src/app.jsx

@@ -135,6 +135,12 @@ class App extends Component {
           'yhBaike',
         ]
       },
+      {
+        root: 'pagesDesc/',
+        pages: [
+          'desc',
+        ]
+      },
       {
         root: 'pagesRoom/',
         pages: [
@@ -176,7 +182,7 @@ class App extends Component {
           'index',
           'integralRecord',
           'channel/index',
-          'foodout/index',
+          // 'foodout/index',
           'map/dtl',
           'map/dtl2',
           'map/metro',

+ 8 - 4
src/pages/index/index.jsx

@@ -80,7 +80,7 @@ class Index extends Component {
   componentWillMount () {
     const that = this
     Taro.$AHU(this)
-    this.getSaleData()
+    // this.getSaleData()
     const uoObj = Taro.getStorageSync('APP_userInfo')
     if (uoObj) {
       this.setState({
@@ -203,12 +203,16 @@ class Index extends Component {
       <View className="index-banner">
         <View className='ad-img' onClick={this.saleChat.bind(this)} >
           <Image src={cbg} className="img" />
-          <LoginJudge />
+          {/* <LoginJudge /> */}
         </View>
       </View>
     )
   }
   saleChat () {
+    Taro.navigateTo({
+      url: `/pagesDesc/desc`
+    })
+    return
     let token = Taro.getStorageSync('APP_token')
     if (!token) {
       return
@@ -278,7 +282,7 @@ class Index extends Component {
         <SwiperItem key={index}>
           <View className='ad-img' onClick={this.bannerHandle.bind(this, item)} >
             <Image src={item.images} className="img" />
-            <LoginJudge />
+            {/* <LoginJudge /> */}
           </View>
         </SwiperItem>
       )
@@ -290,7 +294,7 @@ class Index extends Component {
           ?
           <View className='ad-img' onClick={this.saleChat.bind(this)} >
             <Image src={oneObj.images} className="img" />
-            <LoginJudge />
+            {/* <LoginJudge /> */}
           </View>
           :
           <Swiper

+ 112 - 0
src/pagesDesc/desc.jsx

@@ -0,0 +1,112 @@
+import Taro, { Component } from '@tarojs/taro'
+import { View, Image, Text } from '@tarojs/components'
+import LoginJudge from '@/c/login/Judge'
+
+import './desc.scss'
+
+class Index extends Component {
+
+  config = {
+    navigationBarTitleText: '点击底部领资料',
+    // navigationStyle: 'custom',
+    // navigationBarTextStyle: 'white',
+  }
+
+  onShareAppMessage() {
+    return {
+      title: '让买房,更省心!',
+    }
+  }
+  onShareTimeline () {
+    return {
+      title: '洪楼Plus,专注南昌本地房地产市场,让买房,更省心!',
+    }
+  }
+
+
+  constructor (props) {
+    super(props)
+    this.state = {
+      userInfo: {},
+      curSaleObj: {},
+    }
+  }
+
+  componentWillMount () {
+    Taro.$AHU(this)
+    this.getDtl()
+  }
+
+
+  saleChat () {
+    let token = Taro.getStorageSync('APP_token')
+    if (!token) {
+      return
+    }
+    const { curSaleObj } = this.state
+    let params = {
+      target_id: 999,
+      target_type: 3,
+      sale_id: curSaleObj.sale_id,
+      click_type: '1'
+    }
+    Taro.api.room.apiusercontactclick(params).then((res) => {
+      Taro.navigateTo({
+        url: `/pagesQa/msg/chat?to_user_id=${curSaleObj.user_id}&diyText=领取楼盘资料`
+      })
+    }).catch(() => {
+      Taro.navigateTo({
+        url: `/pagesQa/msg/chat?to_user_id=${curSaleObj.user_id}&diyText=领取楼盘资料`
+      })
+    })
+  }
+  getDtl = () => {
+    const curSaleObj = Taro.getStorageSync('APP_cur_sale')
+    if (curSaleObj.curObj) {
+      this.setState({
+        curSaleObj: curSaleObj.curObj,
+      })
+    } else {
+      this.getSaleList()
+    }
+  }
+  getSaleList () {
+    let params = {
+      show_status: 1,
+      page_size: 99
+    }
+    const referrer = Taro.getStorageSync('APP_MY_REFERRER')
+    if (referrer) params.referrer = referrer
+    Taro.api.room.apisalelist(params).then(res => {
+      const list = res.list || []
+      if (list.length === 0) {
+        return
+      }
+      const arrIndex = Math.floor(Math.random() * list.length)
+      this.setState({
+        curSaleObj: list[arrIndex],
+      })
+      Taro.setStorageSync('APP_cur_sale', {curObj: list[arrIndex]})
+    })
+  }
+
+  render () {
+    const img1 = require('./img/desc/desc_01.jpg')
+    const img2 = require('./img/desc/desc_02.jpg')
+    const img3 = require('./img/desc/desc_03.jpg')
+    const img4 = require('./img/desc/desc_04.jpg')
+    return (
+      <View className="l-box">
+        <View className="desc-box">
+          <Image className="db-img1" src={img1} />
+          <Image className="db-img2" src={img2} />
+          <Image className="db-img3" src={img3} />
+          <Image className="db-img4" src={img4} onClick={this.saleChat.bind(this)} />
+          <LoginJudge />
+        </View>
+      </View>
+    )
+  }
+}
+
+export default Index

+ 26 - 0
src/pagesDesc/desc.scss

@@ -0,0 +1,26 @@
+@import '@css/mixin.scss';
+Page {
+  background: #15325a;
+}
+
+.desc-box {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  .db-img1 {
+    width: 750rpx;
+    height: 1674rpx;
+  }
+  .db-img2 {
+    width: 750rpx;
+    height: 3467rpx;
+  }
+  .db-img3 {
+    width: 750rpx;
+    height: 3677rpx;
+  }
+  .db-img4 {
+    width: 750rpx;
+    height: 193rpx;
+  }
+}

BIN
src/pagesDesc/img/desc/desc_01.jpg


BIN
src/pagesDesc/img/desc/desc_02.jpg


BIN
src/pagesDesc/img/desc/desc_03.jpg


BIN
src/pagesDesc/img/desc/desc_04.jpg


+ 2 - 2
src/pagesOther/index.jsx

@@ -173,10 +173,10 @@ class Index extends Component {
                 <View className="t2">Lv2修改昵称</View>
               </View>
             }
-            <View className="op" onClick={this.linkMore.bind(this, '/pagesOther/foodout/index')}>
+            {/* <View className="op" onClick={this.linkMore.bind(this, '/pagesOther/foodout/index')}>
               <Image className="img" src={iconFoodout} />
               <View className="t3">外卖红包</View>
-            </View>
+            </View> */}
             <View className="op">
               <Image className="img" src={lock01} />
               <View className="t2">敬请期待</View>