张延森 5 年 前
コミット
210168238c
共有2 個のファイルを変更した17 個の追加7 個の削除を含む
  1. 6
    3
      src/pages/activity/detail/assemble.js
  2. 11
    4
      src/pages/project/index.js

+ 6
- 3
src/pages/activity/detail/assemble.js ファイルの表示

@@ -507,7 +507,7 @@ export default class Detail extends Component {
507 507
     console.log('------posterData------', posterData)
508 508
     console.log('------posterConfigs------', posterConfigs)
509 509
 
510
-    console.log(isStarter, actState, groupState)
510
+    const isJoin = memberList.filter(x => x.personId === userInfo.person.personId)[0] || isStarter
511 511
 
512 512
     return (
513 513
       <Block>
@@ -631,8 +631,11 @@ export default class Detail extends Component {
631 631
                     !isStarter && actState === ActInProcess && groupState === GroupInProcess &&
632 632
 
633 633
                     <View className="btn-box">
634
-                      <Button className="assistance-btn" onClick={this.joinGroup}>立即参团</Button>
635
-                      <Button className={groupState === GroupInProcess ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
634
+                      {
635
+                        (groupState === GroupInProcess && !isJoin) &&
636
+                        (<Button className="assistance-btn" onClick={this.joinGroup}>立即参团</Button>)
637
+                      }                      
638
+                      <Button className={groupState === GroupInProcess && !isJoin ? "set-btn" : "assistance-btn"} onClick={this.startMine}>发起我的拼团</Button>
636 639
                     </View>
637 640
 
638 641
                   }

+ 11
- 4
src/pages/project/index.js ファイルの表示

@@ -112,10 +112,17 @@ export default class Index extends Component {
112 112
         },
113 113
       })
114 114
     }).catch(err => {
115
-      Taro.showToast({
116
-        title: `定位城市错误...`,
117
-        icon: 'none',
118
-      })
115
+      if (err.errMsg === 'getLocation:fail auth deny') {
116
+        Taro.showModal({
117
+          content: '请同意授权您的定位功能',
118
+          showCancel: false,
119
+        })
120
+      } else {
121
+        Taro.showToast({
122
+          title: `定位城市错误...`,
123
+          icon: 'none',
124
+        })
125
+      }
119 126
       console.error(err)
120 127
       this.updateCity(cityList[0])
121 128
     })