Quellcode durchsuchen

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

# Conflicts:
#	src/components/charts/Line.js
许静 vor 5 Jahren
Ursprung
Commit
83bb255c11

+ 124
- 121
src/components/charts/Line.js Datei anzeigen

@@ -2,19 +2,115 @@ import Taro, { Component } from '@tarojs/taro'
2 2
 import echarts from '../ec-canvas/echarts'
3 3
 import './style.scss'
4 4
 
5
-function initChart(callback, options) {
5
+function initChart(options, callback) {
6 6
   return function (canvas, width, height) {
7 7
     const chart = echarts.init(canvas, null, {
8 8
       width: width,
9 9
       height: height
10 10
     });
11 11
     canvas.setChart(chart);
12
-    chart.setOption(options);
12
+    chart.setOption(options);    
13 13
     callback && callback(chart);
14 14
     return chart;
15 15
   }
16 16
 }
17 17
 
18
+function createLineOptions(source = []) {
19
+  const colorWithOpacity = op => `rgba(187,156,121, ${op})`
20
+
21
+  const defaultOpt = {
22
+    color: [colorWithOpacity(1)],
23
+    xAxis: {
24
+      type: 'category',
25
+      boundaryGap: false,
26
+      axisLabel: {
27
+        textStyle: {
28
+          color: '#666'
29
+        }
30
+      }
31
+
32
+    },
33
+    yAxis: {
34
+      type: 'value',
35
+      axisLabel: {
36
+        textStyle: {
37
+          color: '#666'
38
+        }
39
+      }
40
+    },
41
+    grid: {
42
+      left: '10%',
43
+      right: '8%',
44
+      bottom: '12%',
45
+      top: '10%',
46
+    },
47
+    series: [],
48
+  }
49
+
50
+  // 数据展示只展示 5 个
51
+  const endValue = source.length - 1 > 0 ? source.length - 1 : 0
52
+  const startValue = endValue - 5 > 0 ? endValue - 5 : 0
53
+
54
+  return {
55
+    ...defaultOpt,
56
+    dataset: { source },
57
+    dataZoom: [{
58
+      type: 'slider',
59
+      startValue, endValue,
60
+      show: true,
61
+      xAxisIndex: [0],
62
+      handleSize: 10,//滑动条的 左右2个滑动条的大小  
63
+      height: 20,//组件高度  
64
+      left: 30, //左边的距离  
65
+      right: 30,//右边的距离  
66
+      bottom: 0,//下边的距离  
67
+      handleColor: 'rgba(0,0,0,0.1)',//h滑动图标的颜色  
68
+      realtime : true,
69
+      handleStyle: {
70
+        borderColor: "#999",
71
+        borderWidth: "1",
72
+        shadowBlur: 2,
73
+        background: "rgba(0,0,0,0.1)",
74
+        shadowColor: "rgba(0,0,0,0.1)",
75
+      },
76
+      backgroundColor: 'rgba(0,0,0,0.1)',//两边未选中的滑动条区域的颜色  
77
+      showDataShadow: false,//是否显示数据阴影 默认auto  
78
+      showDetail: false,
79
+
80
+    }],
81
+    series: [{
82
+      type: 'line',
83
+      dimensions: ['name', 'value'],
84
+      symbolSize: 6,
85
+      smooth: true,
86
+      label: {
87
+        show: true,
88
+        formatter: '{@value}人'
89
+      },
90
+      lineStyle: {
91
+        shadowColor: colorWithOpacity(0.5),
92
+        shadowBlur: 5,
93
+        shadowOffsetY: 7
94
+      },
95
+      areaStyle: {
96
+        color: {
97
+          type: 'linear',
98
+          x: 0,
99
+          y: 0,
100
+          x2: 0,
101
+          y2: 1,
102
+          colorStops: [{
103
+            offset: 0, color: colorWithOpacity(0.2) // 0% 处的颜色
104
+          }, {
105
+            offset: 1, color: colorWithOpacity(0) // 100% 处的颜色
106
+          }],
107
+          global: false,
108
+        }
109
+      },
110
+    }],
111
+  }
112
+}
113
+
18 114
 /**
19 115
  * 传入 source 的格式为 [{ name: xxx, value: xxx }, {}]
20 116
  */
@@ -25,148 +121,55 @@ export default class LineChart extends Component {
25 121
     }
26 122
   }
27 123
 
28
-  // this.echart
29
-  echart = null
124
+  // this.ecComponent
125
+  chart = null;
30 126
   ecComponent = null
31 127
 
32 128
   state = {
33 129
     ec: { lazyLoad: true },
130
+    isDisposed: false,
34 131
   }
35 132
 
36
-  // 禁止 props 变更时渲染
37
-  shouldComponentUpdate(nextProps) {
38
-    console.log('--nextProps--->', nextProps)
39
-
40
-    this.refreshChart(nextProps.source)
41
-
42
-    return false
133
+  componentDidShow() {
134
+    this.setState({ isDisposed: false })
43 135
   }
44 136
 
45
-  handleEcComponent(ref) {
46
-    this.ecComponent = ref
137
+  componentDidHide() {
138
+    this.setState({ isDisposed: true })
47 139
   }
48 140
 
49
-  handleChart(chart) {
50
-    this.echart = chart
141
+  componentDidMount() {
142
+    this.ecComponent = this.$scope.selectComponent(`#${this.props.lid}`)
143
+    this.init(this.props)
51 144
   }
52 145
 
53
-  createOptions(source = []) {
54
-    const colorWithOpacity = op => `rgba(187,156,121, ${op})`
55
-
56
-    const defaultOpt = {
57
-      color: [colorWithOpacity(1)],
58
-      xAxis: {
59
-        type: 'category',
60
-        boundaryGap: false,
61
-        axisLabel: {
62
-          textStyle: {
63
-            color: '#666'
64
-          }
65
-        }
146
+  componentWillReceiveProps(nextProps) {
147
+    // 简单优化, 不显示的组件不更新
148
+    // 但是有个 bug 。如果此时有 props 更新, 会导致页面绘制的数据错误
149
+    if (this.state.isDisposed) return
66 150
 
67
-      },
68
-      yAxis: {
69
-        type: 'value',
70
-        axisLabel: {
71
-          textStyle: {
72
-            color: '#666'
73
-          }
74
-        }
75
-      },
76
-      grid: {
77
-        left: '10%',
78
-        right: '9%',
79
-        bottom: '13%',
80
-        top: '11%',
81
-      },
82
-      series: [],
83
-    }
84
-
85
-    // 数据展示只展示 5 个
86
-    const endValue = source.length - 1 > 0 ? source.length - 1 : 0
87
-    const startValue = endValue - 5 > 0 ? endValue - 5 : 0
88
-
89
-    return {
90
-      ...defaultOpt,
91
-      dataset: { source },
92
-      dataZoom: [{
93
-        type: 'slider',
94
-        startValue, endValue,
95
-        show: true,
96
-        xAxisIndex: [0],
97
-        handleSize: 10,//滑动条的 左右2个滑动条的大小 
98
-        height: 24,//组件高度  
99
-        left: 10, //左边的距离  
100
-        right: 10,//右边的距离  
101
-        bottom: 0,//下边的距离  
102
-        handleColor: 'rgba(0,0,0,0.1)',//h滑动图标的颜色  
103
-        realtime : true,
104
-        handleStyle: {
105
-          borderColor: "#999",
106
-          borderWidth: "1",
107
-          shadowBlur: 2,
108
-          background: "rgba(0,0,0,0.1)",
109
-          shadowColor: "rgba(0,0,0,0.1)",
110
-        },
111
-        backgroundColor: 'rgba(0,0,0,0.1)',//两边未选中的滑动条区域的颜色  
112
-        showDataShadow: false,//是否显示数据阴影 默认auto  
113
-        showDetail: false,
114
-
115
-      }],
116
-      series: [{
117
-        type: 'line',
118
-        dimensions: ['name', 'value'],
119
-        symbolSize: 6,
120
-        smooth: true,
121
-        label: {
122
-          show: true,
123
-          formatter: '{@value}人'
124
-        },
125
-        lineStyle: {
126
-          shadowColor: colorWithOpacity(0.5),
127
-          shadowBlur: 5,
128
-          shadowOffsetY: 7,
129
-        },
130
-        areaStyle: {
131
-          color: {
132
-            type: 'linear',
133
-            x: 0,
134
-            y: 0,
135
-            x2: 0,
136
-            y2: 1,
137
-            colorStops: [{
138
-              offset: 0, color: colorWithOpacity(0.2) // 0% 处的颜色
139
-            }, {
140
-              offset: 1, color: colorWithOpacity(0) // 100% 处的颜色
141
-            }],
142
-            global: false,
143
-          }
144
-        },
145
-      }],
151
+    // 简单的性能优化, 只有数据改变了才重新绘图
152
+    if (JSON.stringify(nextProps.source) != JSON.stringify(this.props.source)) {
153
+      this.init(nextProps)
146 154
     }
147 155
   }
148 156
 
149
-  refreshChart(source) {
150
-    const options = this.createOptions(source)
151
-
152
-    if (!this.echart) {
153
-      if (this.ecComponent) {
154
-        const initFunc = initChart(this.handleChart.bind(this), options)
155
-        this.ecComponent.init(initFunc)
156
-      } else {
157
-        console.warn('echart componet not ready')
157
+  init = (props) => {
158
+    const tk = setTimeout(() => {
159
+      if (this.ecComponent && props.source && props.source.length) {
160
+        const options = createLineOptions(props.source)
161
+        this.ecComponent.init(initChart(options, chart => (this.chart = chart)))
158 162
       }
159
-    } else {
160
-      this.echart.setOption(options)
161
-    }
163
+
164
+      clearTimeout(tk)
165
+    }, 500)
162 166
   }
163 167
 
164 168
   render() {
165
-    // this.refreshChart(this.props.source)
166 169
     return (
167 170
       <View style="width:100vw;height:480rpx;position: relative;">
168 171
         <View className="map-container">
169
-          <ec-canvas ref={this.handleEcComponent} ec={this.state.ec}></ec-canvas>
172
+          <ec-canvas id={this.props.lid} ec={this.state.ec}></ec-canvas>
170 173
         </View>
171 174
       </View>
172 175
     )

+ 2
- 1
src/pages/activity/detail/index.js Datei anzeigen

@@ -190,7 +190,7 @@ export default class Detail extends Component {
190 190
         return
191 191
       }
192 192
 
193
-      const { userInfo: { person } } = this.props
193
+      const { userInfo: { person, miniApp } } = this.props
194 194
       const { avatarurl, nickname, personId } = person
195 195
       const { detail: { dynamicId, posters, createDate } } = this.state
196 196
       const payload = {
@@ -208,6 +208,7 @@ export default class Detail extends Component {
208 208
           title: posters[0].posterTitle,//海报标题
209 209
           posterDescription: posters[0].posterDescription,//海报标题
210 210
           createDate: createDate,//时间
211
+          miniAppName: miniApp.name, // 小程序名称
211 212
         }
212 213
         resolve(data)
213 214
       })

+ 3
- 3
src/pages/activity/detail/poster.js Datei anzeigen

@@ -110,16 +110,16 @@ export default class Index extends Component {
110 110
       {
111 111
         x: 100,
112 112
         y: 1065,
113
-        text: '橙蕉',
113
+        text: data.miniAppName,
114 114
         fontSize: 34,
115 115
         color: 'red',
116 116
         baseLine: 'middle',
117 117
         lineHeight: 48,
118
-        width: 120,
118
+        width: (data.miniAppName || '').length * 30 + 60,
119 119
         zIndex: 11
120 120
       },
121 121
       {
122
-        x: 190,
122
+        x: (data.miniAppName || '').length * 30 + 130,
123 123
         y: 1065,
124 124
         text: '热门活动',
125 125
         fontSize: 26,

+ 2
- 2
src/pages/card/index.js Datei anzeigen

@@ -293,7 +293,7 @@ export default class Index extends Component {
293 293
         resolve(posterData)
294 294
         return
295 295
       }
296
-      const { userInfo: { person }, projectDetail: { buildingId }, cardInfo } = this.props
296
+      const { userInfo: { person, miniApp }, projectDetail: { buildingId }, cardInfo } = this.props
297 297
       const { id } = cardInfo
298 298
       const { personId } = person
299 299
       const payload = {
@@ -301,7 +301,7 @@ export default class Index extends Component {
301 301
         "page": 'pages/card/index',
302 302
       }
303 303
       getMiniQrcode(payload).then(qrcode => {
304
-        let data = Object.assign({ qrcode }, cardInfo)
304
+        let data = Object.assign({ qrcode, miniAppName: miniApp.name }, cardInfo)
305 305
         resolve(data)
306 306
       })
307 307
     })

+ 4
- 4
src/pages/card/poster.js Datei anzeigen

@@ -118,16 +118,16 @@ export default class Index extends Component {
118 118
       {
119 119
         x: 170,
120 120
         y: 755,
121
-        text: '橙蕉',
121
+        text: data.miniAppName,
122 122
         fontSize: 34,
123 123
         color: 'red',
124 124
         baseLine: 'middle',
125 125
         lineHeight: 48,
126
-        width: 120,
126
+        width: (data.miniAppName || '').length * 30 + 60,
127 127
         zIndex: 100
128 128
       },
129 129
       {
130
-        x: 260,
130
+        x: (data.miniAppName || '').length * 30 + 200,
131 131
         y: 755,
132 132
         text: '查看主页',
133 133
         fontSize: 26,
@@ -140,7 +140,7 @@ export default class Index extends Component {
140 140
       {
141 141
         x: 320,
142 142
         y: 1075,
143
-        text: '橙蕉',
143
+        text: data.miniAppName,
144 144
         fontSize: 32,
145 145
         color: '#b5b3b3',
146 146
         baseLine: 'middle',

+ 3
- 2
src/pages/news/detail/index.js Datei anzeigen

@@ -154,7 +154,7 @@ export default class NewsDetail extends Component {
154 154
         resolve(posterData)
155 155
         return
156 156
       }
157
-      const { userInfo: { person } } = this.props
157
+      const { userInfo: { person, miniApp } } = this.props
158 158
       const { avatarurl, nickname, personId } = person
159 159
       const { newsId, detail: { posters, newsName, createDate } } = this.state
160 160
       const payload = {
@@ -171,7 +171,8 @@ export default class NewsDetail extends Component {
171 171
           title: posters[0].posterTitle,//资讯海报标题
172 172
           posterDescription: posters[0].posterDescription,//资讯海报描述
173 173
           createDate: createDate,//资讯时间
174
-          poster: posters[0].posterImg
174
+          poster: posters[0].posterImg,
175
+          miniAppName: miniApp.name,
175 176
         }
176 177
         resolve(data)
177 178
       })

+ 3
- 3
src/pages/news/detail/poster.js Datei anzeigen

@@ -110,16 +110,16 @@ export default class Index extends Component {
110 110
       {
111 111
         x: 100,
112 112
         y: 1065,
113
-        text: '橙蕉',
113
+        text: data.miniAppName,
114 114
         fontSize: 34,
115 115
         color: 'red',
116 116
         baseLine: 'middle',
117 117
         lineHeight: 48,
118
-        width: 120,
118
+        width: (data.miniAppName || '').length * 30 + 60,
119 119
         zIndex: 11
120 120
       },
121 121
       {
122
-        x: 190,
122
+        x: (data.miniAppName || '').length * 30 + 130,
123 123
         y: 1065,
124 124
         text: '查看资讯',
125 125
         fontSize: 26,

+ 6
- 4
src/pages/person/customerAnalysis/analysis.js Datei anzeigen

@@ -12,6 +12,7 @@ import { connect } from '@tarojs/redux'
12 12
 import LineChart from "../../../components/charts/Line";
13 13
 const nothing = require('@assets/person/nothing.png')
14 14
 
15
+const rand = n => Math.random().toString(36).substr(2, n)
15 16
 
16 17
 @connect(({ user, city }) => ({ user, city }))
17 18
 export default class analysis extends Taro.Component {
@@ -28,6 +29,7 @@ export default class analysis extends Taro.Component {
28 29
     chartInfo: [],
29 30
     chartInfo2: [],
30 31
     chartInfo3: [],
32
+    lineIds: [ rand(7), rand(7), rand(7) ],
31 33
   }
32 34
 
33 35
   componentWillUnmount() {
@@ -160,7 +162,7 @@ export default class analysis extends Taro.Component {
160 162
 
161 163
     const tabList = [{ title: '新增客户' }, { title: '跟进客户' }, { title: '到访客户' }]
162 164
     const dailyMonth = ['日', '月']
163
-    const { sexInfo, chartInfo, chartInfo2, chartInfo3, checkedWhich, current } = this.state
165
+    const { sexInfo, chartInfo, chartInfo2, chartInfo3, checkedWhich, current, lineIds } = this.state
164 166
 
165 167
     return (
166 168
       <View>
@@ -179,7 +181,7 @@ export default class analysis extends Taro.Component {
179 181
               </View>
180 182
               {
181 183
                 chartInfo.length &&
182
-                <LineChart source={chartInfo} />
184
+                <LineChart source={chartInfo} lid={lineIds[0]} />
183 185
               }
184 186
               {
185 187
                 !chartInfo.length &&
@@ -218,7 +220,7 @@ export default class analysis extends Taro.Component {
218 220
                 </View>
219 221
               </View>
220 222
               {chartInfo2.length &&
221
-                <LineChart source={chartInfo2} />
223
+                <LineChart source={chartInfo2} lid={lineIds[1]}/>
222 224
               }
223 225
               {
224 226
                 !chartInfo2.length &&
@@ -258,7 +260,7 @@ export default class analysis extends Taro.Component {
258 260
               </View>
259 261
               {
260 262
                 chartInfo3.length &&
261
-                <LineChart source={chartInfo3} />
263
+                <LineChart source={chartInfo3} lid={lineIds[2]} />
262 264
               }
263 265
               {
264 266
                 !chartInfo3.length &&

+ 3
- 2
src/pages/project/detail/index.js Datei anzeigen

@@ -297,7 +297,7 @@ export default class Index extends Component {
297 297
         return
298 298
       }
299 299
       const {
300
-        userInfo: { person: { avatarurl, nickname, personId } },
300
+        userInfo: { person: { avatarurl, nickname, personId }, miniApp },
301 301
         projectDetail: { posters, buildingId, poster, price, buildingRestaurant, createDate, buildingName, tel, buildingTag, uvList = {} }
302 302
       } = this.props
303 303
       const { total = 0 } = uvList
@@ -319,7 +319,8 @@ export default class Index extends Component {
319 319
           buildingName: posters[0].posterTitle,//标题
320 320
           createDate: createDate,//时间
321 321
           buildingTag: buildingTag,//标签,
322
-          total: total//围观人数
322
+          total: total, //围观人数
323
+          miniAppName: miniApp.name,
323 324
         }
324 325
         resolve(data)
325 326
       })

+ 3
- 3
src/pages/project/detail/poster.js Datei anzeigen

@@ -101,16 +101,16 @@ export default class Index extends Component {
101 101
       {
102 102
         x: 100,
103 103
         y: 1070,
104
-        text: '橙蕉',
104
+        text: data.miniAppName,
105 105
         fontSize: 34,
106 106
         color: 'red',
107 107
         baseLine: 'middle',
108 108
         lineHeight: 48,
109
-        width: 120,
109
+        width: (data.miniAppName || '').length * 30 + 60,
110 110
         zIndex: 11
111 111
       },
112 112
       {
113
-        x: 190,
113
+        x: (data.miniAppName || '').length * 30 + 130,
114 114
         y: 1070,
115 115
         text: '项目详情',
116 116
         fontSize: 26,

+ 21
- 21
src/pages/shop/index.js Datei anzeigen

@@ -3,7 +3,7 @@ import { getWindowHeight } from '@utils/style'
3 3
 import { AtTabs, AtTabsPane } from 'taro-ui'
4 4
 import "taro-ui/dist/style/components/tabs.scss"
5 5
 import './index.scss'
6
-import {getThumbnail } from '@utils/tools'
6
+import { getThumbnail } from '@utils/tools'
7 7
 // import Search from '@components/search'
8 8
 import Banner from './banner'
9 9
 import ready from '@utils/ready'
@@ -37,10 +37,10 @@ export default class Shop extends Component {
37 37
     goodsList: [],
38 38
     user: {},
39 39
     current: 0,
40
-    points:0
40
+    points: 0
41 41
   }
42 42
 
43
-  componentDidShow() {
43
+  componentDidShow () {
44 44
 
45 45
     Taro.showLoading()
46 46
     ready.queue(() => {
@@ -53,7 +53,7 @@ export default class Shop extends Component {
53 53
     Taro.hideLoading()
54 54
   }
55 55
 
56
-  loadBannerList() {
56
+  loadBannerList () {
57 57
     const payload = {
58 58
       showPosition: 'mall',
59 59
       cityId: this.props.curCity.id
@@ -65,7 +65,7 @@ export default class Shop extends Component {
65 65
     })
66 66
   }
67 67
 
68
-  loadList() {
68
+  loadList () {
69 69
 
70 70
 
71 71
     Taro.showLoading()
@@ -88,7 +88,7 @@ export default class Shop extends Component {
88 88
     })
89 89
   }
90 90
 
91
-  loadGoodsBuilding() {
91
+  loadGoodsBuilding () {
92 92
     const payload = {
93 93
 
94 94
       cityId: this.props.curCity.id
@@ -115,7 +115,7 @@ export default class Shop extends Component {
115 115
     })
116 116
   }
117 117
 
118
-  handleClick(value) {
118
+  handleClick (value) {
119 119
 
120 120
     this.setState({
121 121
       current: value
@@ -136,32 +136,32 @@ export default class Shop extends Component {
136 136
 
137 137
   }
138 138
 
139
-  onViewDetail(item) {
139
+  onViewDetail (item) {
140 140
     Taro.navigateTo({
141 141
       url: `/pages/shop/detail/index?id=${item.goodsId}`
142 142
     })
143 143
   }
144 144
 
145
-  goPointRecords() {
145
+  goPointRecords () {
146 146
     const { person: { points } } = this.props.userInfo
147 147
     Taro.navigateTo({
148 148
       url: `/pages/shop/integralDetail/index?points=` + points
149 149
     })
150 150
   }
151 151
 
152
-  goPointRule() {
152
+  goPointRule () {
153 153
     Taro.navigateTo({
154 154
       url: `/pages/shop/rule/index`
155 155
     })
156 156
   }
157 157
 
158
-  handleLocationClick() {
158
+  handleLocationClick () {
159 159
     Taro.navigateTo({
160 160
       url: `/pages/city/index`
161 161
     })
162 162
   }
163 163
 
164
-  doSign() {
164
+  doSign () {
165 165
     const { user: { id, havaSigned } } = this.state
166 166
     if (havaSigned) {
167 167
       return
@@ -183,7 +183,7 @@ export default class Shop extends Component {
183 183
     })
184 184
   }
185 185
 
186
-  loadUserInfo() {
186
+  loadUserInfo () {
187 187
     // debugger
188 188
     queryUserInfo().then(user => {
189 189
       console.log(user, "user")
@@ -196,14 +196,14 @@ export default class Shop extends Component {
196 196
     })
197 197
   }
198 198
 
199
-  renderLogin() {
199
+  renderLogin () {
200 200
     return <Authorize></Authorize>
201 201
   }
202 202
   handleBannerClick = (item) => {
203 203
     console.log(this, "this")
204 204
     this.redirectTo(item)
205 205
   }
206
-  redirectTo({ targetId, contentType, buildingId } = {}) {
206
+  redirectTo ({ targetId, contentType, buildingId } = {}) {
207 207
     switch (contentType) {
208 208
       // 项目
209 209
       case 'project':
@@ -248,7 +248,7 @@ export default class Shop extends Component {
248 248
     }
249 249
   }
250 250
 
251
-  renderGoods() {
251
+  renderGoods () {
252 252
     const { goods: { records = [] } } = this.props
253 253
     const { goodsList, goodsBuilding, current } = this.state
254 254
 
@@ -261,9 +261,9 @@ export default class Shop extends Component {
261 261
             {
262 262
               goodsList.length &&
263 263
               goodsList.map(item => (
264
-                
264
+
265 265
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
266
-                  {console.log(item,'--item---')}
266
+                  {console.log(item, '--item---')}
267 267
                   <Image className="item__img" mode="aspectFill" src={item.imgUrl} />
268 268
                   <View className="item__title">{item.goodsName}</View>
269 269
                   <View className="item__des">
@@ -288,7 +288,7 @@ export default class Shop extends Component {
288 288
         {
289 289
           goodsBuilding && goodsBuilding.length >= 2 &&
290 290
           <View className="list__wrap">
291
-            <View className="hot_title" style={{marginBottom:'0'}}>热门商品</View>
291
+            <View className="hot_title" style={{ marginBottom: '0' }}>热门商品</View>
292 292
             <AtTabs scroll tabDirection='horizontal' current={current} tabList={goodsBuilding} onClick={this.handleClick.bind(this)}>
293 293
 
294 294
               {goodsBuilding.map((l_item, index) => (
@@ -330,7 +330,7 @@ export default class Shop extends Component {
330 330
     )
331 331
   }
332 332
 
333
-  renderDetail() {
333
+  renderDetail () {
334 334
     const { user, points } = this.state
335 335
     const { userInfo: { person }, curCity } = this.props
336 336
     const { bannerList = [] } = this.state
@@ -389,7 +389,7 @@ export default class Shop extends Component {
389 389
     );
390 390
   }
391 391
 
392
-  render() {
392
+  render () {
393 393
     const { person: { phone, tel } } = this.props.userInfo
394 394
 
395 395
     return (