Authored by 陈峰

Merge branch 'gray' into 'master'

Gray



See merge request !1417
... ... @@ -4,6 +4,7 @@ const helpers = global.yoho.helpers;
const ROOTPATH = '../../../';
const contentCodeConfig = require(`${ROOTPATH}config/content-code`);
const productProcess = require(`${ROOTPATH}utils/product-process`);
const decodeURIComponent = require('../../../utils/string-process').decodeURIComponent;
class TideModel extends global.yoho.BaseModel {
constructor(ctx) {
... ... @@ -21,7 +22,9 @@ class TideModel extends global.yoho.BaseModel {
resource: _.get(res[0], 'data', []),
contents: []
};
let sindex = _.findIndex(tide.resource, {template_name: 'image_list'});
let sindex = _.findIndex(tide.resource, {
template_name: 'image_list'
});
if (sindex > -1) {
tide.resource[sindex].title = '# 精彩活动 #';
... ... @@ -36,9 +39,9 @@ class TideModel extends global.yoho.BaseModel {
});
let tdata = {
sortInfo: Object.assign({}, item.sortInfo, {
url: helpers.urlFormat(`/list/mi${item.sortInfo.itemId}`, {
url: decodeURIComponent(helpers.urlFormat(`/list/mi${item.sortInfo.itemId}`, {
'openby:yohobuy': `{"action":"go.list","params":{"misort":"${item.sortInfo.itemId}"}}`
})
}))
}),
goods: goods
};
... ... @@ -109,7 +112,9 @@ class TideModel extends global.yoho.BaseModel {
shopInfo: [],
contents: []
};
let sindex = _.findIndex(tide.resource, {template_name: 'image_list'});
let sindex = _.findIndex(tide.resource, {
template_name: 'image_list'
});
if (sindex > -1) {
tide.resource[sindex].title = '# 精彩活动 #';
... ... @@ -118,9 +123,9 @@ class TideModel extends global.yoho.BaseModel {
let shopInfo = _.get(res[1], 'data.shopInfo', {});
if (shopInfo.shopId) {
shopInfo.url = helpers.urlFormat(`/shop/${shopInfo.shopDomain}-${shopInfo.shopId}.html`, {
'openby:yohobuy': `{"action":"go.shop","params":{"shop_id":"${shopInfo.shopId}","shop_template_type":"${shopInfo.shopTemplateType}","shop_name":"${shopInfo.shopName}"}}` //eslint-disable-line
});
shopInfo.url = decodeURIComponent(helpers.urlFormat(`/shop/${shopInfo.shopDomain}-${shopInfo.shopId}.html`, { //eslint-disable-line
'openby:yohobuy': `{"action":"go.shop","params":{"shop_id":"${shopInfo.shopId}","shop_template_type":"${shopInfo.shopTemplateType}","shop_name":"${shopInfo.shopName}","is_red_shop":${shopInfo.is_red_shop || 1}}}` //eslint-disable-line
}));
}
if (shopInfo.imageUrl || _.get(res[1], 'data.productList', []).length) {
... ... @@ -136,9 +141,9 @@ class TideModel extends global.yoho.BaseModel {
_.each(_.get(res[2], 'data', []), (item) => {
tide.brands.push(Object.assign({}, item, {
url: helpers.urlFormat(`/shop/${item.shopDomain}-${item.shopId}.html`, {
'openby:yohobuy': `{"action":"go.shop","params":{"shop_id":"${item.shopId}","shop_template_type":"${item.shopTemplateType}","shop_name":"${item.shopName}"}}` //eslint-disable-line
})
url: decodeURIComponent(helpers.urlFormat(`/shop/${item.shopDomain}-${item.shopId}.html`, { //eslint-disable-line
'openby:yohobuy': `{"action":"go.shop","params":{"shop_id":"${item.shopId}","shop_template_type":"${item.shopTemplateType}","shop_name":"${item.shopName}","is_red_shop":${item.is_red_shop || 1}}}` //eslint-disable-line
}))
}));
});
... ... @@ -163,7 +168,9 @@ class TideModel extends global.yoho.BaseModel {
platform: 'iphone'
}, params),
api: global.yoho.ServiceAPI,
param: {cache: true}
param: {
cache: true
}
}).then(result => {
return result;
});
... ...
{
"name": "yohobuywap-node",
"version": "6.6.5",
"version": "6.6.7",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -65,13 +65,16 @@ class GoodsShowYasRpter {
this.lastShowSkns = cacheTheShowSkns;
if (typeof _yas !== 'undefined' && this.reportParams.DATA && this.reportParams.DATA.length) {
window._yas.sendCustomInfo({
op: 'YB_SHOW_EVENT',
appop: 'YB_SHOW_EVENT',
param: JSON.stringify(this.reportParams)
}, true);
}
setTimeout(() => {
if (typeof window._yas !== 'undefined' && window._yas.sendCustomInfo &&
this.reportParams.DATA && this.reportParams.DATA.length) {
window._yas.sendCustomInfo({
op: 'YB_SHOW_EVENT',
appop: 'YB_SHOW_EVENT',
param: JSON.stringify(this.reportParams)
}, true);
}
}, 1000);
}
getPname() {
... ...
... ... @@ -2,7 +2,7 @@
position: fixed;
left: 0;
bottom: 0;
z-index: 1;
z-index: 1000;
width: 100%;
img {
... ...