Browse Source

feat: 回调后更新标题

zhangyuhan 6 months ago
parent
commit
516859da05

+ 8 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -351,7 +351,7 @@ var vNode = {
     }
     }
   },
   },
   methods: {
   methods: {
-    doMiniPostMessageShare (title) {
+    doMiniPostMessageShareFn (title) {
       try {
       try {
         wx.miniProgram.postMessage({ data: {
         wx.miniProgram.postMessage({ data: {
             post: 'share',
             post: 'share',
@@ -363,6 +363,13 @@ var vNode = {
         console.log(e)
         console.log(e)
       }
       }
     },
     },
+    doMiniPostMessageShare (title) {
+      this.doMiniPostMessageShareFn(title)
+      var _that = this
+       window.miniAppInitLoaded = function () {
+        _that.doMiniPostMessageShareFn(title)
+      }
+    },
     restoreTab: function() {
     restoreTab: function() {
       var tab = utils.getParam('tab') || ''
       var tab = utils.getParam('tab') || ''
       if (tab) {
       if (tab) {

+ 8 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -359,7 +359,7 @@ var vNode = {
     window.removeEventListener("resize", this.init, 20);
     window.removeEventListener("resize", this.init, 20);
   },
   },
   methods: {
   methods: {
-    doMiniPostMessageShare (title) {
+    doMiniPostMessageShareFn (title) {
       try {
       try {
         wx.miniProgram.postMessage({ data: {
         wx.miniProgram.postMessage({ data: {
             post: 'share',
             post: 'share',
@@ -371,6 +371,13 @@ var vNode = {
         console.log(e)
         console.log(e)
       }
       }
     },
     },
+    doMiniPostMessageShare (title) {
+      this.doMiniPostMessageShareFn(title)
+      var _that = this
+      window.miniAppInitLoaded = function () {
+        _that.doMiniPostMessageShareFn(title)
+      }
+    },
     restoreTab: function() {
     restoreTab: function() {
       var tab = utils.getParam('tab') || ''
       var tab = utils.getParam('tab') || ''
       if (tab) {
       if (tab) {