Browse Source

【缺陷修复】自己查看自己的分享时移除 shareId

puhui999 8 months ago
parent
commit
25fc972833
1 changed files with 5 additions and 5 deletions
  1. 5 5
      sheep/platform/share.js

+ 5 - 5
sheep/platform/share.js

@@ -189,12 +189,12 @@ const bindBrokerageUser = async (val = undefined) => {
     if (!shareId) {
       return;
     }
-    const { data } = await BrokerageApi.bindBrokerageUser({ bindUserId: shareId });
-    if (!data) {
-      return;
-    }
+    const { data, msg } = await BrokerageApi.bindBrokerageUser({ bindUserId: shareId });
     // 绑定成功后清除缓存
-    uni.removeStorageSync('shareId');
+    if (!!data || msg.includes('不能绑定自己')) {
+      uni.removeStorageSync('shareId');
+    }
+
   } catch (e) {
     console.error(e);
   }