appfunc.js 955 B

12345678910111213141516171819202122232425262728293031323334
  1. // 彩图奔跑APP中的JS函数调用
  2. var appfunc = {
  3. /*
  4. 微信分享
  5. 参数data格式: {
  6. title: "彩图奔跑商家版",
  7. url: "https://oss-mbh5.colormaprun.com/shop/",
  8. image: "https://oss-mbh5.colormaprun.com/shop/static/logo.png",
  9. scene: "session" // session:分享到对话 timeline:分享到朋友圈 favorite:分享到收藏
  10. };
  11. */
  12. shareWx(data) {
  13. data = JSON.stringify(data);
  14. // console.log("[appfunc] shareWx: data", data);
  15. share_wx.postMessage(data);
  16. },
  17. /*
  18. 打开微信小程序
  19. 参数data格式: {
  20. username: "gh_bea09156da8d", // 小程序原始ID
  21. path: "" // 小程序页面路径(为空则表示进入默认首页) 商家首页:pages/index/index?mall_id=3892 积分中心:pages/integralRedeem/index?mall_id=3892
  22. };
  23. */
  24. launchWxMini(data) {
  25. data = JSON.stringify(data);
  26. console.log("[appfunc] launchWxMini: data", data);
  27. wx_launch_mini.postMessage(data);
  28. }
  29. }
  30. export default appfunc;