Merge branch 'hotfix/getExpress' into 'release/6.5.3'
Hotfix/get express See merge request !1312
Showing
9 changed files
with
67 additions
and
31 deletions
@@ -153,8 +153,6 @@ try { | @@ -153,8 +153,6 @@ try { | ||
153 | app.use(itemNameHandler); | 153 | app.use(itemNameHandler); |
154 | app.use(setYohoData()); | 154 | app.use(setYohoData()); |
155 | app.use(user()); | 155 | app.use(user()); |
156 | - app.use(seo()); | ||
157 | - app.use(setPageInfo()); | ||
158 | 156 | ||
159 | // 请求限制中间件 | 157 | // 请求限制中间件 |
160 | if (!app.locals.devEnv) { | 158 | if (!app.locals.devEnv) { |
@@ -165,6 +163,8 @@ try { | @@ -165,6 +163,8 @@ try { | ||
165 | app.use(devtools()); | 163 | app.use(devtools()); |
166 | } | 164 | } |
167 | 165 | ||
166 | + app.use(seo()); | ||
167 | + app.use(setPageInfo()); | ||
168 | app.use(layoutTools()); | 168 | app.use(layoutTools()); |
169 | app.use(pageCache()); | 169 | app.use(pageCache()); |
170 | app.use(routeEncode.md); | 170 | app.use(routeEncode.md); |
@@ -4,7 +4,18 @@ | @@ -4,7 +4,18 @@ | ||
4 | const path = require('path'); | 4 | const path = require('path'); |
5 | 5 | ||
6 | module.exports = { | 6 | module.exports = { |
7 | + | ||
8 | + /** | ||
9 | + * 有货小程序验证 | ||
10 | + */ | ||
7 | verify(req, res) { | 11 | verify(req, res) { |
8 | res.sendFile(path.join(__dirname, '../../../public/static/hfxRaNY27L.txt')); | 12 | res.sendFile(path.join(__dirname, '../../../public/static/hfxRaNY27L.txt')); |
13 | + }, | ||
14 | + | ||
15 | + /** | ||
16 | + * 线下店小程序验证 | ||
17 | + */ | ||
18 | + store(req, res) { | ||
19 | + res.sendFile(path.join(__dirname, '../../../public/static/OFRuhJ43rY.txt')); | ||
9 | } | 20 | } |
10 | }; | 21 | }; |
@@ -40,7 +40,13 @@ router.get('/activity/manifest.json', pwa.manifest); | @@ -40,7 +40,13 @@ router.get('/activity/manifest.json', pwa.manifest); | ||
40 | // 小程序使用的域名验证文件 | 40 | // 小程序使用的域名验证文件 |
41 | router.get('/hfxRaNY27L.txt', miniapp.verify); | 41 | router.get('/hfxRaNY27L.txt', miniapp.verify); |
42 | router.get('/activity/hfxRaNY27L.txt', miniapp.verify); | 42 | router.get('/activity/hfxRaNY27L.txt', miniapp.verify); |
43 | -router.get('/shop/hfxRaNY27L.txt', miniapp.verify); | 43 | +router.get('/product/shop/hfxRaNY27L.txt', miniapp.verify); |
44 | router.get('/product/hfxRaNY27L.txt', miniapp.verify); | 44 | router.get('/product/hfxRaNY27L.txt', miniapp.verify); |
45 | 45 | ||
46 | +// 线下店使用的域名验证文件 | ||
47 | +router.get('/OFRuhJ43rY.txt', miniapp.store); | ||
48 | +router.get('/activity/OFRuhJ43rY.txt', miniapp.store); | ||
49 | +router.get('/product/shop/OFRuhJ43rY.txt', miniapp.store); | ||
50 | +router.get('/product/OFRuhJ43rY.txt', miniapp.store); | ||
51 | + | ||
46 | module.exports = router; | 52 | module.exports = router; |
@@ -201,14 +201,9 @@ module.exports = class extends global.yoho.BaseModel { | @@ -201,14 +201,9 @@ module.exports = class extends global.yoho.BaseModel { | ||
201 | }); | 201 | }); |
202 | } | 202 | } |
203 | 203 | ||
204 | - if (orderDetail.links) { | ||
205 | - _.forEach(orderDetail.links, (val) => { | ||
206 | - if (val === 'getExpress') { | ||
207 | - orderDetail = _.assign(orderDetail, { | ||
208 | - expressUrl: helpers.urlFormat('/home/logistic', {order_code: orderCode}) | ||
209 | - }); | ||
210 | - return; | ||
211 | - } | 204 | + if (_.get(orderDetail, 'orderDetailInfo.ext.needHref') === 'Y') { |
205 | + orderDetail = _.assign(orderDetail, { | ||
206 | + expressUrl: helpers.urlFormat('/home/logistic', {order_code: orderCode}) | ||
212 | }); | 207 | }); |
213 | } | 208 | } |
214 | 209 |
@@ -148,17 +148,17 @@ module.exports = { | @@ -148,17 +148,17 @@ module.exports = { | ||
148 | } | 148 | } |
149 | }, | 149 | }, |
150 | REQUEST_LIMIT: { | 150 | REQUEST_LIMIT: { |
151 | - // 10s 最多访问5次 | ||
152 | - 10: 10, | 151 | + // 10s 最多访问20次 |
152 | + 10: 20, | ||
153 | 153 | ||
154 | - // 30s 最多访问15次 | ||
155 | - 30: 20, | 154 | + // 30s 最多访问40次 |
155 | + 30: 40, | ||
156 | 156 | ||
157 | - // 60s 最多访问15次 | ||
158 | - 60: 30, | 157 | + // 60s 最多访问60次 |
158 | + 60: 60, | ||
159 | 159 | ||
160 | - // 100s 最多访问15次 | ||
161 | - 600: 100 | 160 | + // 100s 最多访问200次 |
161 | + 600: 200 | ||
162 | }, | 162 | }, |
163 | superCapture: '93c70db61fe276f93ce781ad17dc47cd', | 163 | superCapture: '93c70db61fe276f93ce781ad17dc47cd', |
164 | from: from | 164 | from: from |
@@ -19,18 +19,33 @@ const IP_WHITE_LIST = [ | @@ -19,18 +19,33 @@ const IP_WHITE_LIST = [ | ||
19 | '218.94.75.58', | 19 | '218.94.75.58', |
20 | '218.94.75.50', | 20 | '218.94.75.50', |
21 | '218.94.77.166', | 21 | '218.94.77.166', |
22 | + '10.66.70.21', // 联盟 生产 IP | ||
22 | '222.73.196.18' // B站合作方单击次数快加白名单 | 23 | '222.73.196.18' // B站合作方单击次数快加白名单 |
23 | ]; | 24 | ]; |
24 | 25 | ||
25 | const PATH_WHITE_LIST = [ | 26 | const PATH_WHITE_LIST = [ |
26 | '/3party/check', | 27 | '/3party/check', |
27 | '/3party/check/submit', | 28 | '/3party/check/submit', |
28 | - '/passport/imagesNode', | ||
29 | - '/passport/cert/headerTip', | ||
30 | '/passport/captcha/get', | 29 | '/passport/captcha/get', |
31 | - '/passport/images', | ||
32 | '/passport/img-check.jpg', | 30 | '/passport/img-check.jpg', |
33 | - '/passport/geetest/register' | 31 | + '/passport/geetest/register', |
32 | + '/activity/individuation', | ||
33 | + '/activity/individuation/coupon', | ||
34 | + '/activity/share', | ||
35 | + '/activity/wechat/share', | ||
36 | + '/activity/wechat/1111', | ||
37 | + '/api/switch', | ||
38 | + '/passport/login/user', | ||
39 | + '/sw.js', | ||
40 | + '/manifest.json', | ||
41 | + '/activity/sw.js', | ||
42 | + '/activity/manifest.json', | ||
43 | + '/hfxRaNY27L.txt', | ||
44 | + '/activity/hfxRaNY27L.txt', | ||
45 | + '/product/shop/hfxRaNY27L.txt', | ||
46 | + '/product/hfxRaNY27L.txt', | ||
47 | + '/.well-known/apple-app-site-association', | ||
48 | + '/service/sitemap.xml' | ||
34 | ]; | 49 | ]; |
35 | 50 | ||
36 | const limiter = (rule, policy, context) => { | 51 | const limiter = (rule, policy, context) => { |
@@ -59,7 +59,7 @@ module.exports = () => { | @@ -59,7 +59,7 @@ module.exports = () => { | ||
59 | req.url = `/product/search${req.path}`; | 59 | req.url = `/product/search${req.path}`; |
60 | } | 60 | } |
61 | 61 | ||
62 | - if (/^\/(list|shop)/.test(req.url) && req.url.indexOf('hfxRaNY27L') < 0) { | 62 | + if (/^\/(list|shop)/.test(req.url)) { |
63 | // 商品列表页、全球购商品列表页、店铺首页路由 | 63 | // 商品列表页、全球购商品列表页、店铺首页路由 |
64 | req.url = `/product${req.url}`; | 64 | req.url = `/product${req.url}`; |
65 | } | 65 | } |
public/static/OFRuhJ43rY.txt
0 → 100644
1 | +84e2e0416b10c7872b4983ad2c63892e |
1 | User-Agent: * | 1 | User-Agent: * |
2 | -Disallow: /passport | ||
3 | -Disallow: /cart | 2 | + |
3 | +Disallow: /passport/ | ||
4 | +Disallow: /cart/ | ||
4 | Disallow: /home/ | 5 | Disallow: /home/ |
5 | Disallow: /service/ | 6 | Disallow: /service/ |
6 | -Disallow: /3party | ||
7 | -Disallow: /api | ||
8 | -Disallow: /hf | ||
9 | -Disallow: /rn | ||
10 | -Sitemap: https://m.yohobuy.com/sitemap.xml | ||
7 | +Disallow: /3party/ | ||
8 | +Disallow: /api/ | ||
9 | +Disallow: /hf/ | ||
10 | +Disallow: /rn/ | ||
11 | +Disallow: /*?* | ||
12 | +Disallow: /coupon/ | ||
13 | +Disallow: /brands/search/ | ||
14 | +Disallow: /activity/ | ||
15 | +Disallow: /product/detail/ | ||
16 | +Disallow: /reg.html | ||
17 | +Disallow: /signin.html | ||
18 | +Disallow: /search/ |
-
Please register or login to post a comment