周立森 5 년 전
부모
커밋
6b7a261f73
2개의 변경된 파일15개의 추가작업 그리고 6개의 파일을 삭제
  1. 6
    2
      src/pages/person/index.js
  2. 9
    4
      src/pages/project/index.js

+ 6
- 2
src/pages/person/index.js 파일 보기

191
           </View>
191
           </View>
192
           <View className='qiandao-con'>
192
           <View className='qiandao-con'>
193
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
193
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
194
-            <View className={user.havaSigned ? 'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View>
195
-
194
+            {/* <View className={user.havaSigned ? 'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View> */}
195
+            {
196
+                user.havaSigned ?
197
+                  ( <View className='reday-qiandao-btn' onClick={this.doSign}> 已签到</View> ):
198
+                  (<View className="qiandao__btn" onClick={this.doSign}>签到</View>)
199
+              }
196
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
200
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
197
 
201
 
198
           </View>
202
           </View>

+ 9
- 4
src/pages/project/index.js 파일 보기

101
       const payload = { location: `${location.longitude},${location.latitude}` }
101
       const payload = { location: `${location.longitude},${location.latitude}` }
102
 
102
 
103
       getLocationCity(payload).then(res => {
103
       getLocationCity(payload).then(res => {
104
-        const curCity = res
105
-        this.updateCity(curCity)
106
-      }).catch(err=>{
104
+
105
+        let curCity = cityList.filter(item => {
106
+          return item.name == res.name
107
+        })
108
+
109
+        console.log('-----curCity-->', curCity)
110
+        this.updateCity(curCity[0] || defaultCity)
111
+      }).catch(err => {
107
         Taro.showToast({
112
         Taro.showToast({
108
           title: `定位错误: ${err.message}`,
113
           title: `定位错误: ${err.message}`,
109
           icon: 'none',
114
           icon: 'none',
162
   }
167
   }
163
   loadBannerList () {
168
   loadBannerList () {
164
     const { curCity } = this.props
169
     const { curCity } = this.props
165
-    console.log(this.props,'this.props')
170
+    console.log(this.props, 'this.props')
166
     // 获取首页banner
171
     // 获取首页banner
167
     const payload = {
172
     const payload = {
168
       showPosition: 'index'
173
       showPosition: 'index'