浏览代码

shop points

许静 5 年前
父节点
当前提交
9594cd08c2
共有 3 个文件被更改,包括 13 次插入15 次删除
  1. 4
    4
      config/dev.js
  2. 7
    5
      src/pages/person/customerAnalysis/index.js
  3. 2
    6
      src/pages/shop/index.js

+ 4
- 4
config/dev.js 查看文件

@@ -5,12 +5,12 @@ 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.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    HOST:  '"https://dev.jinchengjiaye.com"',//测试
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.84:8080"',
13
-    WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    // HOST: '"http://192.168.0.84:8080"',
13
+    // WSS_HOST: '"ws://192.168.0.84:8080"',
14 14
   },
15 15
   weapp: {},
16 16
   h5: {}

+ 7
- 5
src/pages/person/customerAnalysis/index.js 查看文件

@@ -60,15 +60,17 @@ export default class customer extends Taro.Component {
60 60
 
61 61
   render() {
62 62
     const tabList = [{ title: '客户分析' }, { title: '我的客户' }]
63
-    const { customerNum } = this.state
63
+    const { customerNum, current } = this.state
64 64
     return (
65
-      <AtTabs className="tab-box" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
66
-        <AtTabsPane current={this.state.current} index={0} >
65
+      <AtTabs className="tab-box" current={current} tabList={tabList} onClick={this.handleClick.bind(this)}>
66
+        <AtTabsPane current={current} index={0} >
67 67
           <View >
68
-            <Analysis></Analysis>
68
+            {
69
+              current != 1 && <Analysis></Analysis>
70
+            }
69 71
           </View>
70 72
         </AtTabsPane>
71
-        <AtTabsPane current={this.state.current} index={1}>
73
+        <AtTabsPane current={current} index={1}>
72 74
           <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
73 75
             <View className="my-customer" onClick={this.toFollowUpCustomer} style="border-right:1px solid rgba(0,0,0,0.12)">
74 76
               <Image mode="widthFix" src={require('@assets/person/genjin.png')} className='img'></Image>

+ 2
- 6
src/pages/shop/index.js 查看文件

@@ -36,6 +36,8 @@ export default class Shop extends Component {
36 36
     goodsBuilding: [],
37 37
     goodsList: [],
38 38
     user: {},
39
+    current: 0,
40
+    points:0
39 41
   }
40 42
 
41 43
   componentDidShow() {
@@ -245,11 +247,6 @@ export default class Shop extends Component {
245 247
         return;
246 248
     }
247 249
   }
248
-  state = {
249
-    current: 0,
250
-  }
251
-
252
-
253 250
 
254 251
   renderGoods() {
255 252
     const { goods: { records = [] } } = this.props
@@ -385,7 +382,6 @@ export default class Shop extends Component {
385 382
             <Banner list={bannerList} onClick={this.handleBannerClick} indicatorDots={false}></Banner>
386 383
           }
387 384
 
388
-
389 385
           {this.renderGoods()}
390 386
         </ScrollView>
391 387
       </View >