张延森 5 jaren geleden
bovenliggende
commit
6095635eae
3 gewijzigde bestanden met toevoegingen van 13 en 17 verwijderingen
  1. 2
    2
      config/dev.js
  2. 10
    14
      src/pages/checkin/index.js
  3. 1
    1
      src/pages/shop/index.js

+ 2
- 2
config/dev.js Bestand weergeven

@@ -9,8 +9,8 @@ module.exports = {
9 9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    HOST: '"http://192.168.0.172:8080"',
13
-    WSS_HOST: '"ws://192.168.0.172:8080"',
12
+    HOST: '"http://127.0.0.1:8080"',
13
+    WSS_HOST: '"ws://127.0.0.1:8080"',
14 14
   },
15 15
   weapp: {},
16 16
   h5: {}

+ 10
- 14
src/pages/checkin/index.js Bestand weergeven

@@ -71,9 +71,7 @@ export default class checkin extends Component {
71 71
   }
72 72
 
73 73
   render () {
74
-    const { data, style } = this.props
75
-
76
-
74
+    const { data = { person: {}, dynamic: {} }, style } = this.props
77 75
 
78 76
     return (
79 77
       <View className="checkin" style="width:100vw;height:100vh;" >
@@ -81,13 +79,13 @@ export default class checkin extends Component {
81 79
         {/* <checkinsuccess></checkinsuccess> */}
82 80
         {/* <achievePhone></achievePhone> */}
83 81
         <View>
84
-          <Image className="img" src={this.state.data.dynamic.imgUrl}  ></Image>
82
+          <Image className="img" src={data.dynamic.imgUrl}  ></Image>
85 83
         </View>
86 84
         <View style="margin-bottom:20px"  >
87
-          <View className="text1"> <Text>{this.state.data.dynamic.title}</Text></View>
85
+          <View className="text1"> <Text>{data.dynamic.title}</Text></View>
88 86
         </View >
89 87
 
90
-        {this.state.data.enlist != null && <View>
88
+        {data.enlist != null && <View>
91 89
           <View style="text-align: center;">
92 90
             <Text className="line">- - - - - - - - - </Text>
93 91
             <Text className="text2">活动报名信息</Text>
@@ -97,24 +95,22 @@ export default class checkin extends Component {
97 95
           <View className="text3">
98 96
             <View className='at-row'>
99 97
               <View className='at-col at-col-3'>用户名:</View>
100
-              <View className='at-col at-col-9'>{this.state.data.person.name || this.state.data.person.nickname}</View>
98
+              <View className='at-col at-col-9'>{data.person.name || data.person.nickname}</View>
101 99
             </View>
102 100
             <View className='at-row'>
103 101
               <View className='at-col at-col-3'>手机号:</View>
104
-              <View className='at-col at-col-9'>{this.state.data.person.tel || this.state.data.person.phone}</View>
102
+              <View className='at-col at-col-9'>{data.person.tel || data.person.phone}</View>
105 103
             </View>
106 104
             <View className='at-row'>
107 105
               <View className='at-col at-col-3'>参与人数:</View>
108
-              <View className='at-col at-col-9'>{this.state.data.enlist.attendNum}</View>
106
+              <View className='at-col at-col-9'>{(data.enlist || {}).attendNum}</View>
109 107
             </View>
110 108
           </View>
111 109
 
112
-
113
-
114
-          {!this.state.data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkin.png')} onClick={this.checkinActive}   ></Image>}
115
-          {this.state.data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkined.png')}></Image>}
110
+          {!data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkin.png')} onClick={this.checkinActive}   ></Image>}
111
+          {data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkined.png')}></Image>}
116 112
         </View>}
117
-        {this.state.data.enlist == null && <View className="unregistered">
113
+        {data.enlist == null && <View className="unregistered">
118 114
           <View>
119 115
             <Image className="img1" src={require('@assets/checkin/noentry.png')} ></Image>
120 116
           </View>

+ 1
- 1
src/pages/shop/index.js Bestand weergeven

@@ -242,7 +242,7 @@ export default class Shop extends Component {
242 242
   renderDetail() {
243 243
     // const { user } = this.state
244 244
     const { userInfo: { person }, curCity } = this.props
245
-    const { bannerList } = this.state
245
+    const { bannerList = [] } = this.state
246 246
     return (
247 247
       <View className="page">
248 248
         {/* <Search placeholder="请输入要搜索的商品名称" onSearch={this.onSearch} /> */}