Authored by 陈峰

限定商品详情页支持限定频道小程序二维码

@@ -221,6 +221,13 @@ exports.limit = (req, res, next) => { @@ -221,6 +221,13 @@ exports.limit = (req, res, next) => {
221 } 221 }
222 222
223 result.appSrc = appSrc.common; 223 result.appSrc = appSrc.common;
  224 + result.miniPath = helpers.urlFormat('/api/wechat/miniapp.jpg', {
  225 + miniapp_type: 4,
  226 + param: JSON.stringify({
  227 + limitProductCode: productCode,
  228 + }),
  229 + miniQrType: 11,
  230 + });
224 result.wxshare = { 231 result.wxshare = {
225 shareLink: helpers.urlFormat('/product/detail/limit', {code: productCode}), 232 shareLink: helpers.urlFormat('/product/detail/limit', {code: productCode}),
226 shareImg: result.banner.replace('//', 'http://'), 233 shareImg: result.banner.replace('//', 'http://'),
@@ -7,4 +7,11 @@ $(function() { @@ -7,4 +7,11 @@ $(function() {
7 desc: $('#shareDesc').val(), 7 desc: $('#shareDesc').val(),
8 imgUrl: $('#shareImg').val(), 8 imgUrl: $('#shareImg').val(),
9 }); 9 });
  10 + setTimeout(() => {
  11 + const $miniAppOpen = $('#mini-app-open');
  12 +
  13 + if ($miniAppOpen[0]) {
  14 + $miniAppOpen[0].click();
  15 + }
  16 + }, 500);
10 }); 17 });