shish 2 maanden geleden
bovenliggende
commit
f3f94ff699
2 gewijzigde bestanden met toevoegingen van 13 en 2 verwijderingen
  1. 12 1
      hdApp/src/admin/home/workbench.vue
  2. 1 1
      hdApp/src/utils/pendingGhsInvite.js

+ 12 - 1
hdApp/src/admin/home/workbench.vue

@@ -105,6 +105,7 @@ export default {
     getWeixinId().then(res => {
       this.getappIdList = res.data;
     });
+    this.hideWorkbenchShareMenu();
   },
   onShow() {
     if (!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentShopId > 0) {
@@ -113,8 +114,12 @@ export default {
       this.loginStyle = 0;
     }
     this.scheduleActivePanelSync();
+    this.hideWorkbenchShareMenu();
   },
   onShareAppMessage(res) {
+    if (!res || res.from !== "button") {
+      return;
+    }
     if (this.loginStyle === 1 && this.$refs.ghsPanel) {
       const msg = this.$refs.ghsPanel.getShareMessage(res);
       if (msg) return msg;
@@ -122,10 +127,16 @@ export default {
     if (this.loginStyle === 2 && this.$refs.mallPanel) {
       return this.$refs.mallPanel.getShareMessage(res);
     }
-    return { title: "花掌柜,花店管家婆", desc: "", imageUrl: "", path: "admin/home/workbench" };
   },
   methods: {
     iconSrc,
+    hideWorkbenchShareMenu() {
+      // #ifdef MP-WEIXIN
+      uni.hideShareMenu({
+        menus: ["shareAppMessage", "shareTimeline"]
+      });
+      // #endif
+    },
     forwardToActivePanel(methodName) {
       if (this.loginStyle === 1 && this.$refs.ghsPanel && this.$refs.ghsPanel[methodName]) {
         return this.$refs.ghsPanel[methodName]();

+ 1 - 1
hdApp/src/utils/pendingGhsInvite.js

@@ -2,7 +2,7 @@ import { ghsInfo } from '@/api/ghs/index'
 
 const PENDING_KEY = 'pendingGhsInvite'
 const LEGACY_TS_KEY = 'ghsCgInviteTs'
-const TTL_MS = 3 * 24 * 60 * 60 * 1000
+const TTL_MS = 2 * 24 * 60 * 60 * 1000
 
 function parseSceneToInvite(scene) {
 	if (!scene) {