Browse Source

签到bug

傅行帆 5 years ago
parent
commit
6abd5070d9
2 changed files with 8 additions and 5 deletions
  1. 1
    5
      src/pages/person/index.js
  2. 7
    0
      src/pages/person/index.scss

+ 1
- 5
src/pages/person/index.js View File

49
   doSign() {
49
   doSign() {
50
     const { user: { id, havaSigned } } = this.state
50
     const { user: { id, havaSigned } } = this.state
51
     if (havaSigned) {
51
     if (havaSigned) {
52
-      Taro.showToast({
53
-        title: '你已经签到过了',
54
-        icon: 'none'
55
-      })
56
       return
52
       return
57
     }
53
     }
58
 
54
 
175
           </View>
171
           </View>
176
           <View className='qiandao-con'>
172
           <View className='qiandao-con'>
177
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
173
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
178
-            <View className="qiandao-btn" onClick={this.doSign}>签到</View>
174
+            <View className={user.havaSigned?'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View>
179
 
175
 
180
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
176
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
181
 
177
 

+ 7
- 0
src/pages/person/index.scss View File

105
       border:2px solid #fff;
105
       border:2px solid #fff;
106
       border-radius: 12px;
106
       border-radius: 12px;
107
     }
107
     }
108
+    .reday-qiandao-btn{
109
+      padding: 6px 18px;
110
+      font-size: 28px;
111
+      color: #ddd;
112
+      border:2px solid #ddd;
113
+      border-radius: 12px;
114
+    }
108
  
115
  
109
   }
116
   }
110
   .bg {
117
   .bg {