zs 3 年之前
父节点
当前提交
ff6594c40e
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. 7 4
      pages/me/index.js

+ 7 - 4
pages/me/index.js

@@ -57,7 +57,7 @@ Page({
   // 我的服务-功能按钮
   toCommon: function (e) {
     let type = this.data.item1.type
-    let { route, method } = e.currentTarget.dataset;
+    let { routes, route, method } = e.currentTarget.dataset;
     let list = JSON.stringify(e.currentTarget.dataset.item);
     let id = e.currentTarget.dataset.id;
     if (method == 'signout') {
@@ -76,12 +76,15 @@ Page({
         }
       })
     } else {
-      if (id != undefined) {
+      if (id != undefined || list != undefined) {
         wx.navigateTo({ url: `/${route}?id=` + id })
         wx.navigateTo({ url: `/${routes}?id=` + id + `&list=` + list })
       } else {
-        wx.navigateTo({ url: `/${route}?id=` + id })
-        if (type == 1) wx.showToast({ title: `暂无团队`, icon: 'error', duration: 2000 })
+        if (route == 'pages/photo/index' || route == 'pages/password/index') {
+          wx.navigateTo({ url: `/${route}?id=` + id })
+        } else {
+          wx.showToast({ title: `暂无团队`, icon: 'error', duration: 2000 })
+        }
       }
     }
   },