Merge branch 'feature/reSeckill' into 'release/5.5'
秒杀商品在非秒杀路径跳转秒杀路径 See merge request !347
Showing
1 changed file
with
2 additions
and
1 deletions
@@ -109,6 +109,7 @@ setTimeout(() => { | @@ -109,6 +109,7 @@ setTimeout(() => { | ||
109 | success: (data) => { | 109 | success: (data) => { |
110 | // 如果当前是秒杀商品,且不在秒杀路径下,跳到该商品的秒杀详情页 | 110 | // 如果当前是秒杀商品,且不在秒杀路径下,跳到该商品的秒杀详情页 |
111 | var reg = /\/product\/show_([\d]+)/; | 111 | var reg = /\/product\/show_([\d]+)/; |
112 | + var reg2 = /\/product\/([\d]+)/; | ||
112 | var regPro = /\/product\/pro_([\d]+)_([\d]+)/; | 113 | var regPro = /\/product\/pro_([\d]+)_([\d]+)/; |
113 | var regSeckill = /\/product\/seckill/; | 114 | var regSeckill = /\/product\/seckill/; |
114 | 115 | ||
@@ -117,7 +118,7 @@ setTimeout(() => { | @@ -117,7 +118,7 @@ setTimeout(() => { | ||
117 | var thisRefer = document.referrer; | 118 | var thisRefer = document.referrer; |
118 | 119 | ||
119 | if (!regSeckill.test(thisRefer)) { | 120 | if (!regSeckill.test(thisRefer)) { |
120 | - if (data.isSecKill === 'Y' && (reg.test(thisHref) || regPro.test(thisHref))) { | 121 | + if (data.isSecKill === 'Y' && (reg.test(thisHref) || regPro.test(thisHref) || reg2.test(thisHref))) { |
121 | window.location.replace('/product/seckill/show_' + productSkn + '.html'); | 122 | window.location.replace('/product/seckill/show_' + productSkn + '.html'); |
122 | } | 123 | } |
123 | } | 124 | } |
-
Please register or login to post a comment