Procházet zdrojové kódy

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

张延森 před 5 roky
rodič
revize
7c91c6df51

+ 4
- 4
config/dev.js Zobrazit soubor

@@ -5,14 +5,14 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    // HOST: '"https://dev.pawoma.cn"',//测试
9
-    // WSS_HOST: '"wss://dev.pawoma.cn"',
8
+    HOST: '"https://dev.pawoma.cn"',//测试
9
+    WSS_HOST: '"wss://dev.pawoma.cn"',
10 10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
11 11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
12 12
     // HOST: '"https://lt.pawoma.cn"',
13 13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14
-    HOST: '"http://127.0.0.1:8080"',
15
-    WSS_HOST: '"ws://127.0.0.1:8080"',
14
+    // HOST: '"http://127.0.0.1:8080"',
15
+    // WSS_HOST: '"ws://127.0.0.1:8080"',
16 16
     Version: 'V3.5.9'
17 17
   },
18 18
   weapp: {},

+ 2
- 0
src/app.js Zobrazit soubor

@@ -120,6 +120,8 @@ class App extends Component {
120 120
           'pages/houseList/index',
121 121
           'pages/help/index',
122 122
           'pages/records/index',
123
+          'pages/detail/index',
124
+          'pages/detail/resultPage',
123 125
         ],
124 126
       }
125 127
     ],

binární
src/onlineSelling/assets/fail2.png Zobrazit soubor


binární
src/onlineSelling/assets/going.png Zobrazit soubor


binární
src/onlineSelling/assets/location.png Zobrazit soubor


+ 143
- 0
src/onlineSelling/pages/detail/index.js Zobrazit soubor

@@ -0,0 +1,143 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import AchievePhone from '@/components/achievePhone'
4
+import AchieveAvatar from '@/components/achieveAvatar'
5
+import { connect } from '@tarojs/redux'
6
+import ready from '@/utils/ready'
7
+
8
+@connect(
9
+  ({ user }) => ({ ...user })
10
+)
11
+
12
+export default class Index extends Component {
13
+  config = {
14
+    navigationBarTitleText: '房源详情',
15
+  }
16
+
17
+  state = {
18
+    grantPhoneVisible: false, // 授权电话
19
+    grantAvatarVisible: false, // 授权头像
20
+  }
21
+
22
+
23
+
24
+  componentWillMount() {
25
+
26
+    ready.queue(() => {
27
+      // 分享场景需要先授权手机, 再授权头像
28
+      if (this.toggleGrantPhone()) {
29
+        this.toggleGrantAvatar()
30
+      }
31
+
32
+
33
+    })
34
+  }
35
+
36
+
37
+
38
+  // 调起授权电话
39
+  toggleGrantPhone = () => {
40
+    const { userInfo: { person: { phone, tel } } } = this.props
41
+    if (!phone && !tel) {
42
+      this.setState({ grantPhoneVisible: true })
43
+      return false
44
+    }
45
+    console.log('phone:', phone, 'tel:', tel, '!!!!!')
46
+    console.log(this.props, 'this.propsphone!!!!!')
47
+
48
+    return true
49
+  }
50
+
51
+  // 调起授权头像
52
+  toggleGrantAvatar = () => {
53
+    const { userInfo: { person: { avatarurl } } } = this.props
54
+
55
+    if (!avatarurl || avatarurl.indexOf('wx.qlogo.cn') === -1) {
56
+      this.setState({ grantAvatarVisible: true })
57
+      return false
58
+    }
59
+
60
+    console.log(avatarurl, "avatarurl")
61
+    console.log(this.props.userInfo, "this.props")
62
+    return true
63
+  }
64
+  chooseBtn() {
65
+    Taro.navigateTo({
66
+      url: '/onlineSelling/pages/detail/resultPage'
67
+    })
68
+  }
69
+
70
+
71
+  render() {
72
+    const { grantPhoneVisible, grantAvatarVisible } = this.state
73
+    const { userInfo = { person: {} } } = this.props
74
+
75
+    return (
76
+      <Block>
77
+        {
78
+          grantPhoneVisible &&
79
+          <AchievePhone user={userInfo.person} onSuccess={this.toggleGrantAvatar}></AchievePhone>
80
+        }
81
+        {
82
+          grantAvatarVisible &&
83
+          <AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
84
+        }
85
+
86
+        <View className='detail'>
87
+          <View className='detail-top'>
88
+            <Image className="norecord-img" mode="aspectFill" src={require('../../assets/norecord.png')}></Image>
89
+            <View className="norecord-text">暂无户型信息</View>
90
+            {/* <Image className="cover-img" mode="aspectFill" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1581369637322&di=6065c2aee90f790b00d0c815f465ebc5&imgtype=0&src=http%3A%2F%2Fcyzs97.com%2FUploads%2FEditor%2FPicture%2F2018-10-18%2F5bc8330f2d06f.jpg"></Image> */}
91
+          </View>
92
+          <ScrollView
93
+            enableBackToTop
94
+            className="wrap"
95
+            scrollY>
96
+            <View className='detail__main'>
97
+              <View style="padding: 0 30rpx;">
98
+
99
+                <View className="title">
100
+                  <View className="name">A户型</View>
101
+                  <View className="btn">询问优惠</View>
102
+                </View>
103
+                <View className="price">
104
+                  现价:234万
105
+              </View>
106
+                <View className="area">
107
+                  <Text> 建面<Text style="color:#FE1C1C">270</Text>m²</Text>
108
+                  <Text style="margin-left:20rpx"> 套内<Text style="color:#FE1C1C">270</Text>m²</Text>
109
+                </View>
110
+                <View className="address">
111
+                  <Image className="location-icon" src={require('../../assets/location.png')}></Image> XX嘉园1号楼2单元3楼303号
112
+              </View>
113
+                <View className="date">
114
+                  预选时间:2/12 12:23:33--2/13 12:23:34
115
+              </View>
116
+                <View className="date">
117
+                  认筹时间:2/12 12:23:33--2/13 12:23:34
118
+              </View>
119
+              </View>
120
+              <View className="num">
121
+                已有12人预选此房源,快快预选认筹~
122
+              </View>
123
+              <View style="padding: 0 30rpx;">
124
+                <View className="choose-btn" onClick={()=>this.chooseBtn()}>
125
+                  预选此房源
126
+              </View>
127
+                <View className="close-btn">
128
+                  认筹功能未开放
129
+              </View>
130
+              </View>
131
+
132
+
133
+            </View>
134
+          </ScrollView>
135
+
136
+
137
+
138
+        </View>
139
+
140
+      </Block>
141
+    );
142
+  }
143
+}

+ 149
- 0
src/onlineSelling/pages/detail/index.scss Zobrazit soubor

@@ -0,0 +1,149 @@
1
+@import "@/styles/mixins.scss";
2
+@import "@/styles/theme.scss";
3
+.detail {
4
+  position: relative;
5
+  width: 100%;
6
+  font-weight: 300;
7
+  background-color: #F8F8F8;
8
+  .detail-top{
9
+    width:100%;
10
+    height:600px;
11
+    position: fixed;
12
+    top: 0;
13
+    text-align: center;
14
+    .cover-img{
15
+      width:100%;
16
+      height:100%;
17
+    }
18
+    .norecord-img{
19
+      width:280px;
20
+      height:220px;
21
+      margin: 140px auto 4px auto;
22
+    }
23
+    .norecord-text{
24
+     font-size: 28px;
25
+     color: #999;
26
+    }
27
+  }
28
+ 
29
+  .wrap {
30
+    padding-top: 570px;
31
+    background: transparent;
32
+  }
33
+
34
+  &__main {
35
+    background: #fff;
36
+    border-radius: 40px 40px 0 0;
37
+    padding: 60px 0;
38
+    .title{
39
+      display: flex;
40
+      align-items: center;
41
+      justify-content: space-between;
42
+      .name{
43
+        font-size: 44px;
44
+        color: #333333;
45
+        font-weight: 600;
46
+      }
47
+      .btn{
48
+        background-color: #F3B82E;
49
+        font-size: 30px;
50
+        color: #fff;
51
+        padding: 14px 28px;
52
+        font-weight: 300;
53
+        border-radius: 36px;
54
+      }
55
+    }
56
+    .price{
57
+      color: #FE1C1C;
58
+      font-size: 38px;
59
+      font-weight: 600;
60
+    }
61
+    .area{
62
+      font-size: 34px;
63
+      color: #666;
64
+      font-weight: 300;
65
+      line-height: 50px;
66
+    }
67
+    .address{
68
+      font-size: 30px;
69
+      color: #666;
70
+      font-weight: 300;
71
+      margin-bottom: 10px;
72
+      display: flex;
73
+      align-items: center;
74
+      margin: 0;
75
+      line-height: 60px;
76
+      .location-icon{
77
+        width:40px;
78
+        height:40px;
79
+        margin-left: -6px;
80
+        margin-right: 6px;
81
+      }
82
+    }
83
+    .date{
84
+      font-size: 22px;
85
+      color: #999;
86
+      line-height: 1.7;
87
+    }
88
+    .num{
89
+      font-size: 26px;
90
+      color: #999;
91
+      background-color: #F8F8F8;
92
+      line-height: 54px;
93
+      padding: 0 30px;
94
+      margin-top: 10px;
95
+      font-weight: 300;
96
+      margin-bottom: 78px;
97
+   
98
+    }
99
+    .choose-btn{
100
+      color: #fff;
101
+      font-size: 36px;
102
+      background-color: $primary-color;
103
+      line-height: 94px;
104
+      border-radius:10px;
105
+      text-align: center; 
106
+    }
107
+    .close-btn{
108
+      color: $primary-color;
109
+      font-size: 36px;
110
+      background-color: #F8F8F8;
111
+      line-height: 94px;
112
+      border-radius:10px;
113
+      text-align: center;
114
+      margin: 40px 0;
115
+    }
116
+  }
117
+}
118
+
119
+
120
+.result{
121
+  background-color: #fff;
122
+  height: 100vh;
123
+  width: 100vw;
124
+  position: relative;
125
+  text-align: center;
126
+  padding-top: 20vh;
127
+  font-weight: 300;
128
+  .result-img{
129
+    width:168px;
130
+    height:168px;
131
+  }
132
+  .status{
133
+    font-size: 36px;
134
+    color: #333;
135
+    line-height: 1.8;
136
+  }
137
+  .tip{
138
+    font-size: 34px;
139
+    color: #999;
140
+  }
141
+  .contact{
142
+    position: absolute;
143
+    bottom: 8vh;
144
+    font-size: 36px;
145
+    color: #3DE344;
146
+    left: 50%;
147
+    margin-left: -108px;
148
+  }
149
+}

+ 43
- 0
src/onlineSelling/pages/detail/resultPage.js Zobrazit soubor

@@ -0,0 +1,43 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import { connect } from '@tarojs/redux'
4
+import ready from '@/utils/ready'
5
+
6
+@connect(
7
+  ({ user }) => ({ ...user })
8
+)
9
+
10
+export default class Index extends Component {
11
+  config = {
12
+    navigationBarTitleText: '预选结果',
13
+  }
14
+
15
+  state = {
16
+    status: 2,
17
+  }
18
+
19
+  componentWillMount() {
20
+
21
+    ready.queue(() => {
22
+
23
+
24
+    })
25
+  }
26
+
27
+
28
+  render() {
29
+    const { status } = this.state
30
+    return (
31
+      <View className="result">
32
+        {status == 1 && <Image className="result-img" src={require('../../assets/success.png')}></Image>}
33
+        {status == 2 && <Image className="result-img" src={require('../../assets/going.png')}></Image>}
34
+        {status == 3 && <Image className="result-img" src={require('../../assets/fail2.png')}></Image>}
35
+        <View className="status">{status == 1 ? '预选成功' : status == 2 ? '正在处理' : '预选失败'}</View>
36
+        <View className="tip">已提交申请,等待系统处理</View>
37
+
38
+        <View className="contact">联系置业顾问</View>
39
+      </View>
40
+
41
+    );
42
+  }
43
+}

+ 15
- 0
src/pages/project/detail/index.js Zobrazit soubor

@@ -1069,6 +1069,19 @@ export default class Index extends Component {
1069 1069
       </Block>
1070 1070
     )
1071 1071
   }
1072
+  renderChooseHouse() {
1073
+
1074
+    return (
1075
+      <Block>
1076
+        <View className="activity">
1077
+          <View className="title">在线选房</View>
1078
+          <View style={{ position: 'relative', padding: '0 30rpx' }} >
1079
+            <Image style="height:388rpx;width:100%;border-radius: 24rpx;" src={transferImage(require('@/assets/empty.png'))} mode="aspectFill"></Image>
1080
+          </View>
1081
+        </View>
1082
+      </Block>
1083
+    )
1084
+  }
1072 1085
 
1073 1086
   handleHelpClick(item) {
1074 1087
     Taro.navigateTo({
@@ -1524,6 +1537,8 @@ export default class Index extends Component {
1524 1537
                   </View>
1525 1538
                   {/* 项目亮点 */}
1526 1539
                   {projectDetail.highlightsCover && this.renderPoints()}
1540
+                  {/* 在线选房 */}
1541
+                  {/* {this.renderChooseHouse()} */}
1527 1542
                   {/* 项目顾问 */}
1528 1543
                   {this.renderConsuler()}
1529 1544
                   {/* 周边 */}