Authored by 郝肖肖

'商品详情mip'

... ... @@ -75,6 +75,7 @@ class BaiduLinkSubmit extends global.yoho.BaseModel {
let products = {
pc: [],
wap: [],
mip: [],
pcUrl: 'https://www.yohobuy.com',
wapUrl: 'https://m.yohobuy.com'
};
... ... @@ -98,7 +99,8 @@ class BaiduLinkSubmit extends global.yoho.BaseModel {
return [
{code: 201, data: {}, message: `PC: ${message}`},
{code: 201, data: {}, message: `WAP: ${message}`}
{code: 201, data: {}, message: `WAP: ${message}`},
{code: 201, data: {}, message: `MIP: ${message}`}
];
}
... ... @@ -107,19 +109,22 @@ class BaiduLinkSubmit extends global.yoho.BaseModel {
products.pc.push(`${products.pcUrl}/product/${val}.html`);
products.wap.push(`${products.wapUrl}/product/${val}.html`);
products.mip.push(`${products.wapUrl}/mip/product/${val}.html`);
});
rdata = yield Promise.all([
that.sendUrl(products.pc, products.pcUrl),
that.sendUrl(products.wap, products.wapUrl)
that.sendUrl(products.wap, products.wapUrl),
that.sendUrl(products.mip, products.wapUrl, 'mip')
]);
if (rdata[0].code !== 200 || rdata[1].code !== 200) {
if (rdata[0].code !== 200 || rdata[1].code !== 200 || rdata[2].code !== 200) {
return rdata;
}
yield redis.hmsetAsync('global:yoho:seo:linksubmit:goods', tids);
products = {};
ids = [];
tids = [];
... ... @@ -179,13 +184,14 @@ class BaiduLinkSubmit extends global.yoho.BaseModel {
that.sendUrl(guangs.mip, guangs.mipUrl, 'mip')
]);
if (rdata[0].code !== 200 || rdata[1].code !== 200) {
if (rdata[0].code !== 200 || rdata[1].code !== 200 || rdata[2].code !== 200) {
return rdata;
}
yield redis.hmsetAsync('global:yoho:seo:linksubmit:guang', tids);
guangs = {};
ids = [];
tids = [];
... ... @@ -269,6 +275,7 @@ class BaiduLinkSubmit extends global.yoho.BaseModel {
yield redis.hmsetAsync('global:yoho:seo:linksubmit:newsBoys', tlinks);
initData = {};
links = [];
tlinks = [];
... ... @@ -328,6 +335,7 @@ class BaiduLinkSubmit extends global.yoho.BaseModel {
yield redis.hmsetAsync('global:yoho:seo:linksubmit:newsGirls', tlinks);
initData = {};
links = [];
tlinks = [];
... ...