张延森 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
     console.log('------posterData------', posterData)
507
     console.log('------posterData------', posterData)
508
     console.log('------posterConfigs------', posterConfigs)
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
     return (
512
     return (
513
       <Block>
513
       <Block>
631
                     !isStarter && actState === ActInProcess && groupState === GroupInProcess &&
631
                     !isStarter && actState === ActInProcess && groupState === GroupInProcess &&
632
 
632
 
633
                     <View className="btn-box">
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
                     </View>
639
                     </View>
637
 
640
 
638
                   }
641
                   }

+ 11
- 4
src/pages/project/index.js 查看文件

112
         },
112
         },
113
       })
113
       })
114
     }).catch(err => {
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
       console.error(err)
126
       console.error(err)
120
       this.updateCity(cityList[0])
127
       this.updateCity(cityList[0])
121
     })
128
     })