Merge branch 'hotfix/fix-jump-to-miniapp' into 'release/6.9.0'
增加一步直接判断是否在小程序中打开 See merge request !1733
Showing
3 changed files
with
10 additions
and
5 deletions
1 | { | 1 | { |
2 | "name": "yohobuywap-node", | 2 | "name": "yohobuywap-node", |
3 | - "version": "6.9.0-2", | 3 | + "version": "6.9.0-3", |
4 | "private": true, | 4 | "private": true, |
5 | "description": "A New Yohobuy Project With Express", | 5 | "description": "A New Yohobuy Project With Express", |
6 | "repository": { | 6 | "repository": { |
@@ -14,7 +14,10 @@ | @@ -14,7 +14,10 @@ | ||
14 | <div class="price" | 14 | <div class="price" |
15 | style="{{#if ../productStyle.priceFontColor}}color:{{../productStyle.priceFontColor}};{{/if}}"> | 15 | style="{{#if ../productStyle.priceFontColor}}color:{{../productStyle.priceFontColor}};{{/if}}"> |
16 | <span class="seckill-price">¥{{secKillPrice}}</span> | 16 | <span class="seckill-price">¥{{secKillPrice}}</span> |
17 | - <span class="market-price">¥{{marketPrice}}</span> | 17 | + {{#if marketPrice}} |
18 | + <span class="market-price">¥{{marketPrice}}</span> | ||
19 | + {{/if}} | ||
20 | + | ||
18 | </div> | 21 | </div> |
19 | <div class="status-type"> | 22 | <div class="status-type"> |
20 | {{#if over}} | 23 | {{#if over}} |
@@ -28,6 +31,6 @@ | @@ -28,6 +31,6 @@ | ||
28 | <div class="status-bg {{#if over}}status-over{{else if wait}}status-wait{{else}}status-go{{/if}}"></div> | 31 | <div class="status-bg {{#if over}}status-over{{else if wait}}status-wait{{else}}status-go{{/if}}"></div> |
29 | </div> | 32 | </div> |
30 | </div> | 33 | </div> |
31 | - </a> | 34 | + </a> |
32 | </div> | 35 | </div> |
33 | -{{/ list}} | ||
36 | +{{/ list}} |
@@ -990,7 +990,9 @@ $(function() { | @@ -990,7 +990,9 @@ $(function() { | ||
990 | getShopProductLinks(); | 990 | getShopProductLinks(); |
991 | 991 | ||
992 | // 小程序相关处理 | 992 | // 小程序相关处理 |
993 | - if (!window.WeixinJSBridge || !window.WeixinJSBridge.invoke) { | 993 | + if (navigator.userAgent.match(/MicroMessenger/i) && navigator.userAgent.match(/miniProgram/i)) { |
994 | + miniProgramHandleInit(); | ||
995 | + } else if (!window.WeixinJSBridge || !window.WeixinJSBridge.invoke) { | ||
994 | document.addEventListener('WeixinJSBridgeReady', miniProgramHandleInit, false); | 996 | document.addEventListener('WeixinJSBridgeReady', miniProgramHandleInit, false); |
995 | } else { | 997 | } else { |
996 | miniProgramHandleInit(); | 998 | miniProgramHandleInit(); |
-
Please register or login to post a comment