周立森 5 年之前
父節點
當前提交
d8f3976469

二進制
chengjiaojinfang.zip 查看文件


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

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

+ 16
- 14
src/pages/person/index.js 查看文件

25
     tourist: false,//普通用户,
25
     tourist: false,//普通用户,
26
     menus: [],
26
     menus: [],
27
     roleName: '普通用户',
27
     roleName: '普通用户',
28
+
28
   }
29
   }
29
 
30
 
30
   componentDidShow () {
31
   componentDidShow () {
34
   }
35
   }
35
 
36
 
36
   loadUserInfo () {
37
   loadUserInfo () {
38
+  
37
     queryUserInfo().then(user => {
39
     queryUserInfo().then(user => {
38
       const [roleSetting, roleName] = this.getRoleName(user.personType)
40
       const [roleSetting, roleName] = this.getRoleName(user.personType)
39
-
41
+     
40
       this.setState({
42
       this.setState({
41
         user,
43
         user,
42
         phone: user.phone,
44
         phone: user.phone,
54
     }
56
     }
55
 
57
 
56
     doUserSignin({ id }).then(res => {
58
     doUserSignin({ id }).then(res => {
57
-      Taro.Toast({
59
+      Taro.showToast({
58
         title: '签到成功'
60
         title: '签到成功'
59
       })
61
       })
60
       // this.setState({
62
       // this.setState({
93
 
95
 
94
 
96
 
95
       putRegisterConsultant().then(res => {
97
       putRegisterConsultant().then(res => {
96
-        console.log("res", res)
98
+    
97
 
99
 
98
-        if (res) {
100
+        // if (res) {
99
           Taro.showToast({
101
           Taro.showToast({
100
             title: "匹配成功,请退出小程序重新登录即可",
102
             title: "匹配成功,请退出小程序重新登录即可",
101
             icon: "none",
103
             icon: "none",
102
             duration: 3000
104
             duration: 3000
103
           })
105
           })
104
-        } else {
105
-          Taro.showToast({
106
-            title: "匹配失败,请联系相关管理人员",
107
-            icon: "none",
108
-            duration: 3000
109
-          })
110
-        }
106
+        // } else {
107
+        //   Taro.showToast({
108
+        //     title: "匹配失败,请联系相关管理人员",
109
+        //     icon: "none",
110
+        //     duration: 3000
111
+        //   })
112
+        // }
111
       }).catch(err => {
113
       }).catch(err => {
112
         console.error(err)
114
         console.error(err)
113
         Taro.showToast({
115
         Taro.showToast({
200
           </View>
202
           </View>
201
           <View className='qiandao-con'>
203
           <View className='qiandao-con'>
202
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
204
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
203
-            {/* <View className={user.havaSigned ? 'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View> */}
204
-            {
205
+            <View className={user.havaSigned ? 'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View>
206
+            {/* {
205
               user.havaSigned ?
207
               user.havaSigned ?
206
                 (<View className='reday-qiandao-btn' onClick={this.doSign}> 已签到</View>) :
208
                 (<View className='reday-qiandao-btn' onClick={this.doSign}> 已签到</View>) :
207
                 (<View className='qiandao-btn' onClick={this.doSign}>签到</View>)
209
                 (<View className='qiandao-btn' onClick={this.doSign}>签到</View>)
208
-            }
210
+            } */}
209
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
211
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
210
 
212
 
211
           </View>
213
           </View>

+ 15
- 5
src/pages/project/detail/index.js 查看文件

151
     const { buildingId } = this.state
151
     const { buildingId } = this.state
152
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
152
     const payload = { pageSize: 999, pageNumber: 1, buildingId }
153
     queryActivityList(payload).then(res => {
153
     queryActivityList(payload).then(res => {
154
+      console.log(res,'Activity')
154
       this.setState({
155
       this.setState({
155
-        activityList: res.list || []
156
+        activityList: res || []
156
       })
157
       })
157
     })
158
     })
158
   }
159
   }
861
       <Block>
862
       <Block>
862
         {
863
         {
863
           activityList.length > 0 && (
864
           activityList.length > 0 && (
864
-            <View className="activity" onClick={this.handleActivityMoreClick}>
865
+            <View className="activity" >
865
               {console.log(activityList, '----activityList-----')}
866
               {console.log(activityList, '----activityList-----')}
866
-              <View className="title">热门活动</View>
867
+              <View className="section-head">
868
+                 <Text className="section-head__title">热门活动</Text>
869
+                 <View className="section-head__more" onClick={this.handleActivityMoreClick}>
870
+                   更多活动<Text className="iconfont icon-more"></Text>
871
+                 </View>
872
+               </View>
867
               <View
873
               <View
868
                 style={{ position: 'relative' }}>
874
                 style={{ position: 'relative' }}>
869
                 <HelpGroupBanner
875
                 <HelpGroupBanner
878
 
884
 
879
               </View>
885
               </View>
880
             </View>
886
             </View>
881
-            // <View className="house-type">
887
+            // <View classN                                                                                                                                                                                                                                                                                                                                                                                                                                                    ame="house-type">
882
             //   <View className="section-head">
888
             //   <View className="section-head">
883
             //     <Text className="section-head__title">热门活动</Text>
889
             //     <Text className="section-head__title">热门活动</Text>
884
             //     <View className="section-head__more" onClick={this.handleActivityMoreClick}>
890
             //     <View className="section-head__more" onClick={this.handleActivityMoreClick}>
980
           }}
986
           }}
981
           id='myVideo'
987
           id='myVideo'
982
           controls={true}
988
           controls={true}
989
+          initialTime='0'
990
+  
991
+          loop={false}
992
+          muted={false}
983
         // autoplay={false}
993
         // autoplay={false}
984
         // initialTime='0'
994
         // initialTime='0'
985
         // loop={true}
995
         // loop={true}
986
         // muted={false}
996
         // muted={false}
987
 
997
 
988
-        show-mute-btn='true'
998
+        show-mute-btn={true}
989
         // onPlay={this.onPlay}
999
         // onPlay={this.onPlay}
990
         // show-center-play-btn='false'
1000
         // show-center-play-btn='false'
991
         // onPause= {this.onPause}
1001
         // onPause= {this.onPause}

+ 2
- 0
src/pages/project/index.js 查看文件

256
           title: '当前城市暂无楼盘',
256
           title: '当前城市暂无楼盘',
257
           icon: 'none'
257
           icon: 'none'
258
         })
258
         })
259
+     
259
       }
260
       }
261
+    
260
       Taro.hideLoading()
262
       Taro.hideLoading()
261
       this.setState({
263
       this.setState({
262
         loaded: true
264
         loaded: true

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

17
   state = {
17
   state = {
18
     goodsId: null,
18
     goodsId: null,
19
     visibleExcBtn: true,
19
     visibleExcBtn: true,
20
+    datas: {},
21
+    inventory: null
20
   }
22
   }
21
 
23
 
22
   componentWillMount () {
24
   componentWillMount () {
49
 
51
 
50
     this.props.dispatchGoodsExchange(goodsId).then(res => {
52
     this.props.dispatchGoodsExchange(goodsId).then(res => {
51
       hasClick = true
53
       hasClick = true
52
-      Taro.showToast({ title: '兑换成功' })
54
+
55
+      Taro.showModal({
56
+        title: '兑换成功',
57
+        showCancel: false
58
+      })
59
+      this.setState({
60
+        inventory: res.inventory
61
+      })
62
+
63
+
64
+      // else{
65
+      //   Taro.showToast({ title: '积分不足,请先获取积分' })
66
+      // }
67
+      // Taro.showToast({ title: '兑换成功' })
53
       // App.zhuge.track('兑换商品', {
68
       // App.zhuge.track('兑换商品', {
54
       //   '商品id': goodsId,
69
       //   '商品id': goodsId,
55
       //   '商品名称': goodsName
70
       //   '商品名称': goodsName
56
       // })
71
       // })
72
+      // this.loadDetail()
57
     }).catch(err => {
73
     }).catch(err => {
74
+      console.log(err.message, 'err-----')
58
       hasClick = true
75
       hasClick = true
59
     })
76
     })
60
   }
77
   }
61
 
78
 
62
   render () {
79
   render () {
63
     const { goodsDetail } = this.props
80
     const { goodsDetail } = this.props
81
+    const { inventory } = this.state
64
     return (
82
     return (
65
       <View className="page">
83
       <View className="page">
66
         <ScrollView
84
         <ScrollView
87
               <Text className="num">{goodsDetail.pointPrice}积分</Text>
105
               <Text className="num">{goodsDetail.pointPrice}积分</Text>
88
               <Text className="detail__title-surplus">
106
               <Text className="detail__title-surplus">
89
                 <Text>剩余数量</Text>
107
                 <Text>剩余数量</Text>
90
-                <Text className="num">{goodsDetail.inventory}</Text>
108
+                <Text className="num">{inventory || goodsDetail.inventory}</Text>
91
               </Text>
109
               </Text>
92
             </View>
110
             </View>
93
           </View>
111
           </View>

+ 4
- 0
src/pages/shop/index.scss 查看文件

199
       line-height: 60px;
199
       line-height: 60px;
200
       font-weight: bold;
200
       font-weight: bold;
201
       padding: 0 20px;
201
       padding: 0 20px;
202
+      width:334px;
203
+      overflow:hidden; 
204
+      text-overflow:ellipsis; 
205
+      white-space: nowrap
202
     }
206
     }
203
 
207
 
204
     &__des {
208
     &__des {

+ 8
- 4
src/utils/redux.js 查看文件

7
 export function createAction(options) {
7
 export function createAction(options) {
8
   const { url, payload, method, fetchOptions, cb, type } = options
8
   const { url, payload, method, fetchOptions, cb, type } = options
9
   return (dispatch) => {
9
   return (dispatch) => {
10
-    return fetch({ url, payload, method, ...fetchOptions }).then((res) => {
11
-      dispatch({ type, payload: cb ? cb(res) : res })
12
-      return res
13
-    })
10
+    try {
11
+      return fetch({ url, payload, method, ...fetchOptions }).then((res) => {
12
+        dispatch({ type, payload: cb ? cb(res) : res })
13
+        return res
14
+      })
15
+    } catch (e) {
16
+      throw e
17
+    }
14
   }
18
   }
15
 }
19
 }
16
 
20
 

+ 8
- 3
src/utils/request.js 查看文件

70
           })
70
           })
71
         }
71
         }
72
       }
72
       }
73
-      console.error(res.data)
73
+
74
       Taro.showToast({
74
       Taro.showToast({
75
         title: message,
75
         title: message,
76
         icon: 'none'
76
         icon: 'none'
77
       })
77
       })
78
+
79
+      throw res.data
78
     }
80
     }
79
   }).catch((err) => {
81
   }).catch((err) => {
80
-    console.error(err, "444")
81
-
82
+    
82
     let errMessage = `请求失败: ${err.errMsg}`
83
     let errMessage = `请求失败: ${err.errMsg}`
83
     if (err.errMsg === 'request:fail timeout') {
84
     if (err.errMsg === 'request:fail timeout') {
84
       errMessage = '请检查网络'
85
       errMessage = '请检查网络'
85
     }
86
     }
86
 
87
 
88
+    if (err.message) {
89
+      errMessage = err.message
90
+    }
91
+
87
     Taro.showToast({
92
     Taro.showToast({
88
       title: errMessage,
93
       title: errMessage,
89
       icon: 'none'
94
       icon: 'none'