zs 3 years ago
parent
commit
97c186296e
3 changed files with 20 additions and 5 deletions
  1. 2 1
      app.json
  2. 16 2
      pages/team/apply.js
  3. 2 2
      pages/team/apply.wxml

+ 2 - 1
app.json

@@ -1,5 +1,6 @@
 {
   "pages": [
+    "pages/team/apply",
     "pages/login/index",
     "pages/home/index",
     "pages/search/index",
@@ -9,7 +10,7 @@
     "pages/team/index",
     "pages/team/detail",
     "pages/team/examine",
-    "pages/team/apply",
+    
     "pages/ranking/index",
     "pages/me/index",
     "pages/index/index",

+ 16 - 2
pages/team/apply.js

@@ -45,9 +45,23 @@ Page({
       }
     ],
   },
-  back: function () {
-    wx.navigateBack({ url: '/pages/home/index' })
+  tabPath(e) {
+    let query = e.detail.detail;
+    if (query) wx.redirectTo({ url: `/pages/${query}/index` })
   },
+  out(){
+    wx.showModal({
+     title: '',
+     content: '是否确认退出团队',
+     success(res) {
+      if (res.confirm) {
+       console.log('用户点击确定')
+      } else if (res.cancel) {
+       console.log('用户点击取消')
+      }
+     }
+    })
+   },
   /**
    * 生命周期函数--监听页面加载
    */

+ 2 - 2
pages/team/apply.wxml

@@ -1,4 +1,4 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+<mobile-main frameStyle="{{frameStyle}}" bind:tabPath="tabPath">
   <view slot="info" class="main" style="height:{{infoHeight}}px;">
     <view class="one">
       <view class="one-1">
@@ -66,7 +66,7 @@
     <view class="four">
       <button class="button" form-type="submit">待通过</button>
       <button class="button" form-type="submit">申请加入</button>
-      <button class="button" form-type="submit">退出团队</button>
+      <button class="button" form-type="submit" bindtap='out'>退出团队</button>
     </view>
   </view>
 </mobile-main>