Przeglądaj źródła

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

张延森 5 lat temu
rodzic
commit
e4ca58394d

+ 2
- 2
config/prod.js Wyświetl plik

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"http://192.168.0.172:8080"',
7
-    WSS_HOST: '"wss://192.168.0.172:8080"',
6
+    HOST: '"http://192.168.0.84:8080"',
7
+    WSS_HOST: '"wss://192.168.0.84:8080"',
8 8
     // HOST: '"https://lt.pawoma.cn"',
9 9
     // WSS_HOST: '"wss://lt.pawoma.cn"',
10 10
   },

+ 2
- 1
src/app.js Wyświetl plik

@@ -40,9 +40,10 @@ class App extends Component {
40 40
       }
41 41
     },
42 42
     pages: [
43
+      'pages/activity/activity',
43 44
       'pages/shop/index',
44 45
       'pages/project/index',
45
-      'pages/activity/activity',
46
+     
46 47
       'pages/project/detail/index',
47 48
       'pages/person/index',
48 49
       'pages/activity/assemblePage',

BIN
src/assets/helpgroup/bg.png Wyświetl plik


BIN
src/assets/helpgroup/fail.png Wyświetl plik


BIN
src/assets/helpgroup/logo.png Wyświetl plik


BIN
src/assets/helpgroup/shouquan.png Wyświetl plik


BIN
src/assets/helpgroup/waiting for help.png Wyświetl plik


BIN
src/assets/helpgroup/助力切图/help failure.png Wyświetl plik


BIN
src/assets/helpgroup/助力切图/help success.png Wyświetl plik


BIN
src/assets/helpgroup/助力切图/help success1.png Wyświetl plik


BIN
src/assets/helpgroup/拼团切图/already formed.png Wyświetl plik


BIN
src/assets/helpgroup/拼团切图/group number.png Wyświetl plik


BIN
src/assets/helpgroup/拼团切图/team failure.png Wyświetl plik


BIN
src/assets/helpgroup/拼团切图/team success.png Wyświetl plik


BIN
src/assets/shop/hottip.png Wyświetl plik


+ 2
- 2
src/components/ListView/index.js Wyświetl plik

@@ -17,9 +17,9 @@ export default class ListView extends Component {
17 17
     distanceToRefresh: 30,
18 18
     isEmpty: false,
19 19
     emptyText: '',
20
-    noMore: '暂无更多内容',
20
+    noMore: '已经到底了~',
21 21
     footerLoadingText: '加载中...',
22
-    footerLoadedText: '暂无更多内容',
22
+    footerLoadedText: '已经到底了~',
23 23
     scrollTop: 0,
24 24
     touchScrollTop: 0,
25 25
     onScrollToLower: () => { },

+ 3
- 1
src/components/ListView/index.scss Wyświetl plik

@@ -17,7 +17,9 @@
17 17
 .loading,
18 18
 .loaded {
19 19
   text-align: center;
20
-  padding: 12px;
20
+  padding: 50px;
21
+  color: #999;
22
+  font-size:28px;
21 23
   //animation: loading infinite 1000ms ease;
22 24
 }
23 25
 

+ 92
- 0
src/components/achievePhone/index.js Wyświetl plik

@@ -0,0 +1,92 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import getUserPhone from '@utils/getUserPhone'
3
+import './index.scss'
4
+
5
+export default class Index extends Component {
6
+
7
+  state = {
8
+    // maskVisible: false,
9
+  }
10
+
11
+  componentDidMount() {
12
+    // this.setState({
13
+    //   maskVisible: true
14
+    // })
15
+    if (this.props.user.phone) {
16
+      this.props.onSuccess();
17
+    }
18
+
19
+  }
20
+  getPhoneNumber(e) {
21
+    console.log(e, "eeeeeeeeeeeee")
22
+    getUserPhone(e, (phoneNumber) => {
23
+      if (!phoneNumber) {
24
+        Taro.showToast({
25
+          title: '获取手机号失败',
26
+          icon: 'none'
27
+        })
28
+        return
29
+      } else {
30
+        this.props.onSuccess();
31
+
32
+      }
33
+    })
34
+  }
35
+  renderMaskBanner() {
36
+    const { maskBanner } = this.state
37
+    return (
38
+      <View>
39
+        <Image src={require('@assets/helpgroup/bg.png')} className='bg_img'></Image>
40
+        <View className="phone-page">
41
+
42
+          <View className="content">
43
+            <Image src={require('@assets/index/logo.png')} className='logo_img'></Image>
44
+            <View className="text">
45
+              授权手机后,可享受以下功能
46
+          </View>
47
+            <View className="flex">
48
+              <View className="item">
49
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>在线咨询
50
+            </View>
51
+              <View className="item">
52
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>收藏分享楼盘
53
+            </View>
54
+            </View>
55
+            <View className="flex">
56
+              <View className="item">
57
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>专属顾问
58
+            </View>
59
+              <View className="item">
60
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>参与助力活动            </View>
61
+            </View>
62
+            <View className="flex">
63
+              <View className="item">
64
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>推荐客户
65
+            </View>
66
+              <View className="item">
67
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>参与拼团活动
68
+            </View>
69
+            </View>
70
+            <View className="flex">
71
+              <View className="item">
72
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>获取积分好礼
73
+            </View>
74
+              <View className="item">
75
+                <Image className="shouquan" src={require('@assets/helpgroup/shouquan.png')} ></Image>更多精彩权益
76
+            </View>
77
+            </View>
78
+            <Button className="btn" open-type="getPhoneNumber" lang="zh_CN" onGetphonenumber={this.getPhoneNumber}>授权手机</Button>
79
+          </View>
80
+        </View>
81
+      </View>
82
+    )
83
+  }
84
+  render() {
85
+
86
+    return (
87
+      <Block>
88
+        {!this.props.user.phone && this.renderMaskBanner()}
89
+      </Block>
90
+    )
91
+  }
92
+}

+ 72
- 0
src/components/achievePhone/index.scss Wyświetl plik

@@ -0,0 +1,72 @@
1
+.bg_img{
2
+  width: 100vw;
3
+  height: 100vh;
4
+}
5
+.phone-page{
6
+  position: fixed;
7
+  width: 100vw;
8
+  height: 100vh;
9
+  left: 0;
10
+  top: 0;
11
+  z-index: 9999;
12
+  background: rgba(0, 0, 0, 0.22);
13
+  display: flex;
14
+  flex-direction: column;
15
+  justify-content: center;
16
+  align-items: center;
17
+  
18
+  .content {
19
+    width: 94vw;
20
+    height: 640px;
21
+    position: absolute;
22
+    left: 50%;
23
+    top: 50%;
24
+    margin-left: -47vw;
25
+    transform: translateY(-50%);
26
+    background-color: #fff;
27
+    border-radius: 12px;
28
+    padding: 0 40px;
29
+    .logo_img{
30
+      width: 132px;
31
+      height: 106px;
32
+      display: block;
33
+      margin: 30px auto 24px auto;
34
+    }
35
+    .text{
36
+      font-size: 34px;
37
+      color:#333;
38
+      margin-bottom: 38px;
39
+    }
40
+    .flex{
41
+      display: flex;
42
+      align-items: center;
43
+      padding: 0 70px;
44
+      justify-content: space-between;
45
+      margin-bottom:28px; 
46
+      .item{
47
+        display: flex;
48
+        align-items: center;
49
+        font-size: 28px;
50
+        color: #666;
51
+        .shouquan{
52
+          width: 28px;
53
+          height: 28px;
54
+          margin-right: 16px;
55
+          margin-top: 4px;
56
+        }
57
+
58
+      }
59
+     
60
+    }
61
+    .btn{
62
+      width:310px;
63
+      height:100px;
64
+      background:rgba(187,156,121,1);
65
+      border-radius:12px;
66
+      font-size: 36px;
67
+      color: #fff;
68
+      line-height: 100px;
69
+      margin-top: 6px;
70
+    }
71
+  }
72
+}

+ 17
- 13
src/pages/activity/activity.js Wyświetl plik

@@ -9,6 +9,8 @@ import News from '../news/index'
9 9
 import { savePoint, updatePoint } from '@services/common'
10 10
 import { connect } from '@tarojs/redux'
11 11
 
12
+
13
+
12 14
 let pageIndex = 1
13 15
 
14 16
 @connect(state => state.city)
@@ -31,20 +33,22 @@ export default class active extends Component {
31 33
 
32 34
   render() {
33 35
     const { isEmpty, hasMore, list } = this.state
34
-
35 36
     return (
36
-      <AtTabs className="tab-box" scroll current={this.state.current} tabList={[{ title: '热门活动' }, { title: '最新资讯' }]} onClick={this.handleClick.bind(this)}>
37
-        <AtTabsPane current={this.state.current} index={0} >
38
-          <View >
39
-            <Activity ></Activity >
40
-          </View>
41
-        </AtTabsPane>
42
-        <AtTabsPane current={this.state.current} index={1}>
43
-          <View >
44
-            <News ></News>
45
-          </View>
46
-        </AtTabsPane>
47
-      </AtTabs>
37
+
38
+      <View style="height:100vh">
39
+        <AtTabs className="tab-box" scroll current={this.state.current} tabList={[{ title: '热门活动' }, { title: '最新资讯' }]} onClick={this.handleClick.bind(this)}>
40
+          <AtTabsPane current={this.state.current} index={0} >
41
+            <View >
42
+              <Activity ></Activity >
43
+            </View>
44
+          </AtTabsPane>
45
+          <AtTabsPane current={this.state.current} index={1}>
46
+            <View >
47
+              <News ></News>
48
+            </View>
49
+          </AtTabsPane>
50
+        </AtTabs>
51
+      </View>
48 52
     );
49 53
   }
50 54
 }

+ 1
- 0
src/pages/activity/detail/index.scss Wyświetl plik

@@ -95,6 +95,7 @@
95 95
   }
96 96
 
97 97
   &-con {
98
+    margin-bottom: 100px;
98 99
     &__title {
99 100
       font-size: 32px;
100 101
       font-weight: bold;

+ 9
- 3
src/pages/activity/item/index.js Wyświetl plik

@@ -17,14 +17,20 @@ export default class Item extends Component {
17 17
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
18 18
         <Image className="pic" mode="aspectFill" src={data.mainImg}></Image>
19 19
         <View className="box">
20
-
21 20
           <View className="title">{data.title}</View>
21
+          {
22
+            data.weight == '1' &&
23
+            <Image className="hot-tip" src={require('@assets/shop/hottip.png')}></Image>
24
+          }
25
+          {(data.type == 'help' || data.type == 'group') &&
26
+            <View className={data.type == 'help' ? 'type' : 'type2'}>{data.type == 'help' ? '助力' : '拼团'}</View>
27
+          }
22 28
 
23 29
           {/* <View className="time">活动开始时间:{`${dayjs(data.startDate).format('YYYY-MM-DD hh:mm:ss')}`}</View> */}
24 30
 
25 31
           <View className="left">
26
-            <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY-MM-DD hh:mm:ss')}`}</View>
27
-            <View className={data.isSign ? "alreay-btn" : "btn"}>{data.isSign ? "已参与" : "立即参与"}</View>
32
+            <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 hh:mm:ss')}`}</View>
33
+            <View className={data.activityStatus == 0 ? "btn jionin " : data.activityStatus == 1 ? "btn nostart" : data.activityStatus == 2 ? "btn jioned" : "btn"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已参与" : "已结束"}</View>
28 34
           </View>
29 35
         </View>
30 36
       </View >

+ 50
- 20
src/pages/activity/item/index.scss Wyświetl plik

@@ -8,23 +8,53 @@
8 8
 }
9 9
 
10 10
 .item {
11
-  border-radius: 10px;
11
+  border-radius: 12px;
12 12
   box-shadow: 0 2px 10px #EAEAEA;
13 13
   overflow: hidden;
14
-  margin-bottom: 50px;
14
+  margin-bottom: 20px;
15 15
   width: 100%;
16
+  position: relative;
17
+  padding-bottom: 4px;
18
+  .type{
19
+    position: absolute;
20
+    left:0;
21
+    top:0;
22
+    color: #fff;
23
+    background: #F6B61D;
24
+    padding: 10px 36px;
25
+    border-radius: 12px 0 12px 0;
26
+    font-size: 24px;
27
+  }
28
+  .type2{
29
+    position: absolute;
30
+    left:0;
31
+    top:0;
32
+    color: #fff;
33
+    background: #BB9C79;
34
+    padding: 12px 36px;
35
+    border-radius: 12px 0 12px 0;
36
+    font-size: 24px;
37
+
38
+  }
39
+  .hot-tip{
40
+    position: absolute;
41
+    right:0;
42
+    top:0;
43
+    width: 76px;
44
+    height: 68px;
16 45
 
46
+  }
17 47
   .pic {
18 48
     width: 100%;
19
-    height:260px;
49
+    height:332px;
20 50
     display: block;
21 51
   }
22 52
 
23 53
   .box {
24 54
     padding:30px;
25 55
     .title {
26
-      font-size: 30px;
27
-      width: 390px;
56
+      font-size: 28px;
57
+      width: 620px;
28 58
       @include text-ellipsis;
29 59
     }
30 60
 
@@ -36,14 +66,15 @@
36 66
 
37 67
 
38 68
       .time {
39
-        margin-top: 15px;
40
-        font-size: 26px;
69
+        margin-top: 20px;
70
+        font-size: 24px;
41 71
         color: #8E8E8E;
42 72
       }
43 73
     }
44 74
 
45 75
     .btn {
46
-      background:#FF6A6A;
76
+  
77
+      background:#DADADA;
47 78
       border-radius:30px;
48 79
       text-align: center;
49 80
       color: white;
@@ -52,18 +83,17 @@
52 83
       font-size: 26px;
53 84
       height: 48px;
54 85
       line-height: 48px;
86
+      margin-top: 14px;
87
+    }
88
+    .jionin{
89
+      background:#FF6A6A;
90
+    }
91
+		.nostart {
92
+      
93
+      background:#FDC080;
94
+    }
95
+    .jioned{
96
+      background: #9B9B9B;
55 97
     }
56
-		.alreay-btn {
57
-		  background:#9B9B9B;
58
-		  border-radius:30px;
59
-		  text-align: center;
60
-		  color: white;
61
-		  display: block;
62
-		  padding: 10px 0;
63
-      width: 148px;
64
-      font-size: 26px;
65
-      height: 48px;
66
-      line-height: 48px;
67
-		}
68 98
   }
69 99
 }

+ 10
- 13
src/pages/news/item.scss Wyświetl plik

@@ -1,17 +1,14 @@
1 1
 @import "@styles/theme.scss";
2 2
 .item {
3
-  padding: 50px 0;
4
-  border-bottom: solid 1px $border-color-light;
3
+  border-bottom: solid 2px $border-color-light;
5 4
   display: flex;
6 5
   justify-content: space-between;
7 6
   align-items: center;
8
-	margin:0 30px;
9
-
10 7
   &-img {
11
-    width: 400px;
12
-    height: 200px;
13
-    margin-right: 30px;
14
-    border-radius: 10px;
8
+    width: 300px;
9
+    height: 160px;
10
+    margin-right: 24px;
11
+    border-radius: 4px;
15 12
   }
16 13
 
17 14
   &-con {
@@ -22,14 +19,14 @@
22 19
     height: 200px;
23 20
 
24 21
     &__title {
25
-      font-size: $font-size-title;
26
-			margin-top: 20px;
22
+      font-size: 28px;
23
+			margin-top: 32px;
27 24
     }
28 25
 
29 26
     &__date {
30
-      font-size: $font-size-content;
31
-      color: $text-color-lighter;
32
-			margin-bottom: 20px;
27
+      font-size: 24px;
28
+      color: #999;
29
+			margin-bottom: 32px;
33 30
     }
34 31
   }
35 32
 }

+ 5
- 5
src/pages/person/index.js Wyświetl plik

@@ -161,20 +161,20 @@ export default class Person extends Component {
161 161
         <View className="info">
162 162
           <Image className="bg" src={require('@assets/mine/background.png')} mode='widthFix'></Image>
163 163
           <View className="content">
164
-            <View className="info-block" onClick={this.goPersonDetail}>
165
-              <View className="avatar">
164
+            <View className="info-block">
165
+              <View className="avatar" onClick={this.goPersonDetail}>
166 166
                 <Image className="info__headimg" src={user.avatar} />
167 167
                 <View className="info-intro">{this.getRoleName(user.personType)}</View>
168 168
               </View>
169 169
 
170
-              <View className="info-text">
170
+              <View className="info-text" onClick={this.goPersonDetail}>
171 171
                 <View className="info-text__name">{user.name ? user.name : user.nickname} {/* <Text className="iconfont icon-more"></Text> */}</View>
172 172
                 <View className="info-text__intro">积分 {user.points || 0}</View>
173 173
               </View>
174
-              <View className="tuiguang">
174
+              <Navigator url={`/pages/person/spread/index`}  className="tuiguang">
175 175
                 <Image style="width:40px;height:36px" src={require('@assets/mine/tuiguangma.png')} ></Image>
176 176
                 <View className="info-text__intro" style="margin:4px 0 0 4px">推广码</View>
177
-              </View>
177
+              </Navigator>
178 178
             </View>
179 179
             {/* <View
180 180
               className={`sign__btn ${user.havaSigned && 'signed'}`}