share-17:49

youmengting-dev
游梦婷 1 year ago
parent f185fccb68
commit 3767a086b9
  1. 5
      common/share.js
  2. 6
      pages/welcome/welcome.vue

@ -143,6 +143,7 @@ export default {
}, },
/* 小程序分享 */ /* 小程序分享 */
// #ifdef MP-WEIXIN
onShareAppMessage(res) { onShareAppMessage(res) {
this.share.path = this.getCurrentRouteYm(); this.share.path = this.getCurrentRouteYm();
// console.log(this.share.path, "this.share.path", res); // console.log(this.share.path, "this.share.path", res);
@ -164,5 +165,7 @@ export default {
}) })
} }
} }
} },
// #endif
} }

@ -107,18 +107,16 @@
value = value.slice(0,value.lastIndexOf("#")); value = value.slice(0,value.lastIndexOf("#"));
if(value == "/pages/tabBar/home/home" || value == "/pages/tabBar/category/category" || value == "/pages/tabBar/user/user"){ if(value == "/pages/tabBar/home/home" || value == "/pages/tabBar/category/category" || value == "/pages/tabBar/user/user"){
uni.switchTab({ uni.reLaunch({
url: value url: value
}) })
return return
} }
if(value != "/"){ uni.reLaunch({
uni.navigateTo({
url: value url: value
}) })
return; return;
}
} }

Loading…
Cancel
Save