Authored by 郭成尧

mg-master

... ... @@ -27,7 +27,11 @@
"request": "launch",
"name": "Node",
"program": "${workspaceFolder}/app.js",
<<<<<<< HEAD
"console": "integratedTerminal"
=======
"console":"integratedTerminal"
>>>>>>> origin/master
}
]
}
... ...
... ... @@ -21,6 +21,15 @@ const miniapp = (req, res) => {
}).pipe(res); // eslint-disable-line
};
// 微信返回下载页
const download = (req, res) => {
return res.redirect(
301,
'//union.yoho.cn/union/app-downloads.html?union_type=100000000010599'
);
};
module.exports = {
miniapp
miniapp,
download
};
... ...
... ... @@ -25,5 +25,6 @@ router.post('/rn/v1', rn.v1);
router.get('/.well-known/apple-app-site-association', apple.appSiteAssociation);
router.get('/api/wechat/miniapp.jpg', forward.miniapp);
router.get('/api/wechat/download', forward.download);
module.exports = router;
... ...
... ... @@ -40,7 +40,7 @@ let _channelPage = (req, res, data) => {
}
if (result && result.content && result.content.length) {
result.content.length = 6; // 首屏先获取前6个楼层,其余用ajax获取
result.content.length = 8; // 首屏先获取前8个楼层,其余用ajax获取
}
// result.content = [{
... ... @@ -82,7 +82,7 @@ exports.getResourceContent = (req, res, next) => {
}).then(result => {
if (result.length) {
result = result.slice(6);
result = result.slice(8);
}
res.render('channel-resource', {
... ...
... ... @@ -228,8 +228,6 @@ const index = (req, res, next) => {
data.guang.author.url = helpers.https(url);
}
let guang = data.guang;
let singleImages = _.filter(detail.getArticleContent, {singleImage: {template_name: 'single_image'}});
let mipPic = _.get(singleImages, '[0].singleImage.data[0].src', '');
guang.detail = {
id: _.get(detail, 'getArticle.id'),
... ... @@ -305,15 +303,7 @@ const index = (req, res, next) => {
isWeixin: isWeixin,
localCss: true,
isShare: isShare,
id: id,
showAnaJson: {
addBaiduSite: true,
title: data.title,
publishTime: guang.detail.publishTime,
pic: mipPic,
des: guang.shareDesc,
url: `${req.protocol}://m.yohobuy.com/guang/${id}.html`
}
id: id
}, data, parameter));
})().catch(next);
};
... ...
... ... @@ -216,7 +216,6 @@ const detailIndex = (req, res, next) => {
currentHref: `https://m.yohobuy.com/guang/${id}.html`
},
showAnaJson: {
addBaiduSite: false,
title: `${detail.getArticle.article_title} | Yoho!Buy有货 | 潮流购物逛不停`,
publishTime: mipPublishTime,
pic: mipPic,
... ...
'use strict';
const css = require('../css');
const co = require('bluebird').coroutine;
const _ = require('lodash');
const mRoot = '../models';
const productDetailModel = require(`${mRoot}/product-detail`);
exports.index = (req, res, next) => {
co(function* () {
let params = {
productSkn: req.params.skn,
protocol: req.protocol
};
let detailData = yield req.ctx(productDetailModel).index(params);
let mipPic = _.get(detailData, 'baseInfo.goods_list[0].images_list[0].image_url');
let mipDes = _.get(detailData, 'baseInfo.phrase');
let miptitle = _.get(detailData, 'baseInfo.product_name');
return res.render('product/detail', Object.assign({
title: detailData.title,
css: yield css('product/detail.css'),
localStyle: detailData.mipCss,
mipFooter: true,
canonical: {
currentHref: `https://m.yohobuy.com/product/${detailData.baseInfo.product_skn}.html`
},
showAnaJson: {
url: `${req.protocol}://m.yohobuy.com${req.originalUrl}`,
title: `${miptitle} | Yoho!Buy有货 | 潮流购物逛不停`,
pic: mipPic,
des: mipDes,
publishTime: ''
}
}, detailData));
})().catch(next);
};
... ...
... ... @@ -256,12 +256,45 @@
vertical-align: bottom;
}
.list-too-little {
padding: 2% 4%;
border-bottom: 1px solid #e6e6e6;
color: #444;
font-size: 12px;
}
.list-too-little .word {
display: inline-block;
padding: 5px 15px;
border-radius: 10px;
border: 1px solid #bbb;
margin-right: 6px;
margin-top: 5px;
}
/* 底部开始 */
.mip-footer-fixed {
width: 100%;
height: 95px;
position: relative;
clear: both;
}
.mip-footer {
max-width: 750px;
margin: 0 auto;
background-color: #fff;
height: 95px;
width: 100%;
clear: both;
position: relative;
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.mip-footer .option {
background-color: #fff;
font-size: 0;
}
... ... @@ -286,7 +319,6 @@
font-weight: bold;
margin-left: 5px;
transform: scaleY(0.5);
display: inline-block;
}
.mip-footer .copy-right {
... ... @@ -299,24 +331,10 @@
.mip-footer .mip-fixed {
position: relative !important;
z-index: 0 !important;
}
.mip-footer .mip-gototop {
display: inline !important;
}
.list-too-little {
padding: 2% 4%;
border-bottom: 1px solid #e6e6e6;
color: #444;
font-size: 12px;
}
.list-too-little .word {
display: inline-block;
padding: 5px 15px;
border-radius: 10px;
border: 1px solid #bbb;
margin-right: 6px;
margin-top: 5px;
}
/* 底部结束 */
... ...
.detail-page {
max-width: 750px;
width: 100%;
overflow: hidden;
margin: 0 auto;
background-color: #f0f0f0
}
.detail-page * {
box-sizing: border-box;
font-weight: normal;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.detail-page mip-img {
display: block;
margin: 0 auto;
max-width: 100%;
border: 0;
}
.detail-page .banner-pic {
width: 100%;
position: relative;
}
.detail-page .cart-icon {
margin: 0 auto 2px;
width: 24px;
height: 24px;
background-size: 100% 100%;
background-image: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/cart.png");
}
.detail-page .shop-icon {
margin: 0 auto 4px;
width: 22px;
height: 22px;
background-size: 100% 100%;
background-image: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/store-ico.png");
}
.detail-page .banner-pic .pic-container {
margin: 5% auto;
width: 70%;
padding-bottom: 93%;
position: relative;
}
.detail-page .banner-pic .pic-list {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
}
.tag-container {
position: absolute;
top: 1.5%;
left: 2%;
z-index: 2;
height: 35px;
color: #fff;
font-size: 14px;
line-height: 22px;
}
.tag-container .good-tag {
display: inline-block;
box-sizing: border-box;
margin-left: 0.5px;
padding: 0 5px;
text-align: center;
height: 22px;
line-height: 22px;
vertical-align: top;
}
.tag-container .new-tag {
background-color: #78dc7e;
color: #fff;
}
.tag-container .hot-tag {
width: 60px;
background-color: #ff575c;
color: #fff;
}
.tag-container .renew-tag {
background-color: #78dc7e;
color: #fff;
}
.tag-container .sale-tag {
background-color: #ff575c;
color: #fff;
}
.tag-container .new-festival-tag {
color: #000;
width: 120px;
background-image: resolve("product/new-festival.png");
background-repeat: no-repeat;
background-color: #fff;
background-size: 120px 38px;
}
.tag-container .yohood-tag {
background-color: #000;
color: #fff;
}
.tag-container .limit-tag {
border: 1px solid #000;
background-color: #fff;
color: #000;
line-height: 22px;
}
.tag-container .soon-sold-out-tag {
background-color: #ffac5b;
color: #fff;
}
.tag-container .is-presell {
background-color: #000;
color: #fff;
width: 60px;
}
#mip-carousel-example {
padding: 5px 8px;
background: rgba(0, 0, 0, 0.2);
border-radius: 9px;
}
.mip-carousel-indicator-wrapper {
position: absolute;
bottom: 5px;
left: 0;
right: 0;
}
.mip-carousel-indicatorDot .mip-carousel-indecator-item {
width: 9px;
height: 9px;
}
.mip-carousel-indicatorDot .mip-carousel-activeitem {
background-color: #000;
}
.goods-name {
box-sizing: border-box;
padding: 20px;
width: 100%;
background-color: #515150;
color: #fff;
}
.goods-name .name {
font-size: 18px;
line-height: 28px;
}
.price-date {
position: relative;
padding:0 20px;
width: 100%;
height: 55px;
border-bottom: 1px solid #e0e0e0;
background-color: #fff;
color: #b0b0b0;
}
.goods-price {
float: left;
font-size: 16px;
}
.goods-price h2 {
display: inline-block;
line-height: 55px;
}
.goods-price .current-price {
margin-right: 10px;
color: #d0021b;
}
.goods-price .previous-price {
text-decoration: line-through;
}
.goods-discount {
margin-bottom: 15px;
padding-top: 0;
display: block;
width: 100%;
height: auto;
border-bottom: 1px solid #e0e0e0;
background-color: #fff;
color: #444;
font-size: 12px;
}
.goods-discount h2 {
position: relative;
padding: 15px;
line-height: 20px;
}
.goods-discount .promotion-icon {
background-color: #d0021b;
color: #fff;
padding: 0 4px;
border-radius: 4px;
margin-right: 10px;
font-size: 14px;
float: left;
}
.goods-discount .short-text {
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.page-block {
box-sizing: border-box;
margin-bottom: 15px;
padding: 0 15px;
width: 100%;
border-top: 1px solid #e0e0e0;
border-bottom: 1px solid #e0e0e0;
background-color: #fff;
}
.enter-store {
width: 100%;
padding: 0 4% 15%;
position: relative;
}
.enter-store .store-logo {
position: absolute;
top: 0;
left: 4%;
width: 15%;
height: 100%;
}
.enter-store .store-logo img {
width: 100%;
height: 100%;
}
.enter-store .store-name {
margin-left: 2%;
position: absolute;
top: 0;
left: 19%;
height: 100%;
width: 50%;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
display: flex;
align-items: center;
}
.enter-store .store-link {
position: absolute;
right: 4%;
top: 0;
width: 25%;
height: 100%;
display: flex;
justify-content: flex-end;
align-items: center;
}
.enter-store .store-linkspan {
position: absolute;
}
.product-desc{
background-color: #f0f0f0;
padding-bottom: 1px;
}
.goods-desc {
padding-top: 15px;
padding-bottom: 15px;
}
#reference-swiper-container .first-group div .avatar {
display: inline-block;
width: 30px;
width: 30px;
border-radius: 50%;
overflow-x: hidden;
margin-right: 10px;
}
.materials {
overflow: hidden;
}
.materials.page-block {
margin-bottom: 0;
border-bottom: none;
}
.materials.page-block .detail {
margin-bottom: 0;
}
.materials .detail .material-item {
position: relative;
display: block;
overflow: hidden;
margin: 5px 0;
width: 100%;
height: auto;
}
.materials .detail .material-item img {
margin: 0;
}
.materials .detail .material-item .material-image {
position: absolute;
top: 50%;
left: 0;
width: 23%;
transform: translateY(-50%);
}
.materials .detail .material-item .material-desc {
float: right;
box-sizing: border-box;
padding-left: 2%;
width: 76.9%;
height: auto;
color: #4b4b4b;
text-align: left;
word-wrap: break-word;
font-size: 16px;
line-height: 25px;
}
.materials .detail .material-item:last-child {
border-bottom: none;
}
.page-block .service {
width: 100%;
padding-bottom: 4.7%;
background-size: 100% 100%;
background-image: url("//cdn.yoho.cn/yohobuywap-node/6.4.0/img/product/service.png");
}
.page-block .title {
border-bottom: 1px solid #e0e0e0;
color: #444;
font-size: 18px;
line-height: 55px;
}
.page-block .title span {
color: #a0a0a0;
font-size: 12px;
}
.page-block .pro-detail {
margin-top: 20px;
margin-bottom: 20px;
}
.page-block .pro-detail * {
font-size: 18px !important;
color: #444;
line-height: 24px !important;
margin-bottom: 15px;
letter-spacing: 1px;
word-break: break-all;
}
.page-block video {
width: 100%;
height: auto;
}
.page-block .detail {
margin-top: 15px;
margin-bottom: 15px;
font-size: 18px;
line-height: 22px;
}
.goods-desc .detail {
margin-bottom: 1px;
}
.goods-desc .desc-text {
padding: 10px 5px;
background-color: #eee;
color: #444;
font-size: 14px;
}
.page-block .detail b {
font-weight: bold;
}
.page-block .detail i {
font-style: italic;
}
.page-block .detail.table {
width: 100%;
overflow: hidden;
}
.page-block .detail.table .column {
box-sizing: border-box;
padding: 4px 3%;
width: 49.9%;
border: 1px solid #fff;
background-color: #eee;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 16px;
}
.product-desc .swiper-wrapper {
width: 100%;
overflow-x: scroll;
white-space: nowrap;
font-size: 0;
line-height: 0;
}
.product-desc .tips {
margin-top: 10px;
color: #b0b0b0;
font-size: 12px;
}
.product-desc .swiper-slide {
display: inline-block;
}
.product-desc .swiper-slide .cell {
box-sizing: border-box;
padding: 4px 15px;
border: 1px solid #fff;
background-color: #eee;
white-space: nowrap;
font-size: 16px;
text-align: center;
line-height: 24px;
}
.page-block .detail.table .column:nth-child(2n+1) {
float: left;
}
.page-block .detail.table .column:nth-child(2n+2) {
float: right;
}
.page-block .detail.table .oldbox {
float: left;
overflow: hidden;
box-sizing: border-box;
padding: 6px 3%;
width: 49.9%;
height: 100%;
border: 1px solid #fff;
background-color: #eee;
text-overflow: ellipsis;
white-space: nowrap;
}
.wash-tips {
padding-top: 20px;
}
.wash-tips.page-block {
padding-right: 15px;
padding-left: 15px;
}
.wash-tips .tip {
display: inline-block;
vertical-align: top;
width: 16.6%;
}
.wash-tips .tip mip-img {
margin-bottom: 10px;
width: 32px;
height: 32px;
}
.wash-tips .tip .caption {
display: block;
padding: 0 5px;
min-height: 28px;
text-align: center;
font-size: 12px;
line-height: 14px;
}
.remind-tips {
padding-left: 10px;
font-size: 14px;
color: #e9221a;
margin-bottom: 20px;
}
.remind-tips mip-img {
width: 19px;
height: 19px;
float: left;
}
.remind-tips .wash-tags {
line-height: 19px;
margin-left: 5px;
}
.cart-bar-fixed {
height: 60px;
width: 100%;
position: relative;
clear: both;
}
.cart-bar {
position: fixed;
max-width: 750px;
margin: 0 auto;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 60px;
border-top: 1px solid #e0e0e0;
background-color: #fff;
padding: 10px;
z-index: 9;
}
.cart-bar a {
display: inline-block;
}
.cart-bar .new-foot-ico {
width: 20%;
margin-right: 6%;
text-align: center;
vertical-align: bottom;
height: 40px;
}
.cart-bar .new-foot-ico .tip {
color: #444;
font-size: 14px;
line-height: 15px;
}
.cart-bar .opa {
opacity: 0.4;
}
.cart-bar .addto-cart {
width: 45%;
height: 40px;
background-color: #eb0313;
color: #fff;
text-align: center;
font-size: 20px;
line-height: 40px;
}
.goods-container {
float: left;
background-color: #fff;
}
.goods-container .title {
text-align: center;
line-height: 40px;
font-size: 20px;
}
.good-info {
float: left;
box-sizing: border-box;
-webkit-box-sizing: border-box;
width: 44%;
margin-left: 4%;
margin-bottom: 5px;
}
.good-detail-img {
position: relative;
width: 100%;
padding-top: 133.19%;
}
.good-detail-img .good-thumb {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
}
.good-detail-img mip-img {
width: 100%;
}
.good-detail-img .mip-element {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
width: 100%;
height: 100%;
}
.good-info .tag-container {
position: relative;
overflow: hidden;
width: 100%;
height: 20px;
left: 0;
top: 0;
}
.good-info .tag-container .good-tag {
display: block;
float: left;
box-sizing: border-box;
margin-right: 4px;
height: 20px;
text-align: center;
font-size: 12px;
line-height: 20px;
}
.good-info .tag-container .good-tag:last-child {
margin-right: 0;
}
.good-info .tag-container .new-tag {
width: 40px;
background-color: #78dc7e;
color: #fff;
}
.good-info .tag-container .hot-tag {
width: 60px;
background-color: #ff575c;
color: #fff;
}
.good-info .tag-container .renew-tag {
width: 50px;
background-color: #78dc7e;
color: #fff;
}
.good-info .tag-container .sale-tag {
width: 40px;
background-color: #ff575c;
color: #fff;
}
.good-info .tag-container .new-festival-tag {
color: #000;
width: 50px;
background-image: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/new-festival.png");
background-repeat: no-repeat;
background-color: #fff;
background-size: 100px 28px;
}
.good-info .tag-container .limit-tag {
width: 60px;
border: 1px solid #000;
color: #000;
}
.good-info .tag-container .is-presell {
width: 40px;
background-color: #000;
color: #fff;
}
.good-info .tag-container .is-global {
padding: 3px 10px 0 8px;
color: #fff;
background-color: #462e3e;
line-height: 26px;
}
.good-info .tag-container .is-global span {
display: inline-block;
background-image: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/airplane.png");
background-repeat: no-repeat;
padding-left: 32px;
background-size: auto 95%;
}
.good-detail-img .good-islike {
position: absolute;
top: 0;
right: 0;
width: 60px;
height: 60px;
color: #b0b0b0;
text-align: center;
text-decoration: none;
font-size: 30px;
line-height: 60px;
}
.good-detail-img .good-like {
color: #d72928;
}
.good-detail-img mip-img {
display: block;
width: 100%;
}
.good-detail-img .few-tag {
position: absolute;
bottom: 0;
width: 100%;
height: 24px;
background: #ffac5b;
color: #fff;
text-align: center;
font-size: 12px;
line-height: 24px;
}
.good-detail-img .out-tag {
position: absolute;
bottom: 0;
width: 100%;
height: 32px;
background: #b0b0b0;
color: #fff;
text-align: center;
font-size: 18px;
line-height: 32px;
}
.good-detail-img .no-storage {
width: 100%;
height: 100%;
overflow: hidden;
background-color: #000;
opacity: 0.4;
position: absolute;
top: 0;
}
.good-detail-img .no-storage .no-storage-img {
display: block;
width: 100%;
height: 100%;
background-image: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/outlet_sellout_bg.png");
background-repeat: no-repeat;
background-size: contain;
}
.good-detail-text {
position: relative;
}
.good-detail-text .name a {
transform: scale(0.9);
margin: 7px 0 5px;
min-height: 30px;
color: #444;
font-size: 12px;
line-height: 18px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
height: 36px;
}
.good-detail-text .price {
font-size: 12px;
line-height: 22px;
white-space: nowrap;
transform: scale(0.9);
}
.good-detail-text .price .sale-price {
color: #d62927;
}
.good-detail-text .price .sale-price.no-price {
color: #000;
}
.good-detail-text .price .market-price {
font-size: 12px;
margin: 0 0 0 5px;
color: #b0b0b0;
text-decoration: line-through;
}
.good-detail-text .vip-grade {
display: inline-block;
margin-right: 8px;
width: 26px;
height: 16px;
vertical-align: text-bottom;
}
.vip-level {
box-sizing: box-border;
padding-right: 28px;
padding-left: 28px;
min-height: 55px;
border-bottom: 1px solid #e0e0e0;;
background-color: #fff;
color: #999;
font-size: 14px;
}
.vip-level .icons-item {
list-style-type: none;
float: left;
margin: 0;
width: 33.3%;
height: 55px;
}
.vip-level .icons-item.current-level .vip-price {
color: #d0021b;
}
.vip-level .icons-item span {
display: inline-block;
padding-left: 8px;
vertical-align: middle;
line-height: 55px;
}
.vip-level .icons-item .vip-img {
width: 34px;
height: 20px;
}
.vip-level .icons-item:nth-child(1) .vip-img {
background: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/silver.png") no-repeat;
background-size: contain;
}
.vip-level .icons-item:nth-child(2) .vip-img {
background: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/golden.png") no-repeat;
background-size: contain;
}
.vip-level .icons-item:nth-child(3) .vip-img {
background: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/platinum.png") no-repeat;
background-size: contain;
}
.student-price {
float: left;
height: 55px;
line-height: 55px;
}
.student-price .student-value {
font-size: 16px;
}
.student-price .student-name {
background-color: #d0021b;
font-size: 12px;
padding: 3px 5px;
color: #fff;
border-radius: 3px;
margin-right: 15px;
}
.student-price .red {
color: #d0021b;
}
.good-detail-text .vip-grade-1 {
background: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/silver.png") no-repeat;
background-size: contain;
}
.good-detail-text .vip-grade-2 {
background: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/golden.png") no-repeat;
background-size: contain;
}
.good-detail-text .vip-grade-3 {
background: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/platinum.png") no-repeat;
background-size: contain;
}
.good-detail-text .vip-info {
margin-top: 3px;
color: #444;
font-size: 12px;
line-height: 16px;
}
.good-detail-text .vip-info .vip-icon {
display: inline-block;
margin-right: 8px;
width: 44px;
height: 16px;
background: url("//cdn.yoho.cn/yohobuywap-node/6.2.37/img/product/vip-icon.png") no-repeat;
background-size: contain;
vertical-align: bottom;
}
.mip-footer {
bottom: 60px !important;
position: relative !important;
}
/* 底部开始 */
.mip-footer-fixed {
width: 100%;
height: 95px;
position: relative;
clear: both;
}
.mip-footer {
max-width: 750px;
margin: 0 auto;
background-color: #fff;
height: 95px;
width: 100%;
clear: both;
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
.mip-footer .option {
background-color: #fff;
font-size: 0;
}
.mip-footer .option a {
line-height: 50px;
font-size: 13px;
padding: 0 5%;
}
.mip-footer .option .login {
border-right: solid 1px #e0e0e0;
}
.mip-footer .option .back-to-top {
line-height: 50px;
font-size: 13px;
padding: 0 5%;
float: right;
}
.mip-footer .option .back-to-top span {
font-weight: bold;
margin-left: 5px;
transform: scaleY(0.5);
}
.mip-footer .copy-right {
background-color: #eee;
color: #666;
text-align: center;
line-height: 45px;
font-size: 13px;
}
.mip-footer .mip-fixed {
position: relative !important;
z-index: 0 !important;
}
.mip-footer .mip-gototop {
display: inline !important;
}
/* 底部结束 */
... ...
... ... @@ -5,15 +5,15 @@ module.exports = {
/**
* 分离 CSS
* @param {*} $
* @param {*} prefix
* @param {*} option
*/
processStyle($, prefix) {
processStyle($, option) {
let css = [];
$('*').each(function(index) {
let $this = $(this);
let localStyle = $this.attr('style');
let className = `yoho-inline-style-${prefix}-${index}`;
let className = `yoho-inline-style-${option.prefix}-${index}`;
if (localStyle) {
css.push(`.${className}{${localStyle}}`);
... ... @@ -28,13 +28,13 @@ module.exports = {
* 替换标签
* @param {*} $
*/
processTag($) {
processTag($, option) {
let css = [];
// mip-anim
$('img[src*=".gif"]').each(function() {
let $this = $(this);
let mipAnim = `<mip-anim layout="responsive" width="350" height="263" src="${$this.attr('src')}" alt="${$this.attr('alt') || ''}" class="${$this.attr('class') || ''}"></mip-anim>`; // eslint-disable-line
let mipAnim = `<mip-anim layout="container" src="${$this.attr('src')}" alt="${$this.attr('alt') || ''}" class="${$this.attr('class') || ''}"></mip-anim>`; // eslint-disable-line
$this.replaceWith(mipAnim);
});
... ... @@ -42,7 +42,7 @@ module.exports = {
// mip-img
$('img').each(function() {
let $this = $(this);
let mipImg = `<mip-img layout="responsive" width="350" height="263" src="${$this.attr('src')}" alt="${$this.attr('alt') || ''}" class="${$this.attr('class') || ''}"></mip-img>`; // eslint-disable-line
let mipImg = `<mip-img layout="container" src="${$this.attr('src')}" alt="${$this.attr('alt') || ''}" class="${$this.attr('class') || ''}"></mip-img>`; // eslint-disable-line
$this.replaceWith(mipImg);
});
... ... @@ -50,7 +50,7 @@ module.exports = {
// mip-video
$('video').each(function() {
let $this = $(this);
let mipVideo = `<mip-video layout="responsive" width="350" height="263" poster="${$this.attr('poster') || ''}" src="${$this.attr('src')}" alt="${$this.attr('alt') || ''}" class="${$this.attr('class') || ''}"></mip-video>`; // eslint-disable-line
let mipVideo = `<mip-video layout="container" poster="${$this.attr('poster') || ''}" src="${$this.attr('src')}" alt="${$this.attr('alt') || ''}" class="${$this.attr('class') || ''}"></mip-video>`; // eslint-disable-line
$this.replaceWith(mipVideo);
});
... ... @@ -66,18 +66,29 @@ module.exports = {
// mip-iframe
$('iframe').each(function() {
let $this = $(this);
let mipIframe = `<mip-iframe layout="responsive" width="350" height="263" src="${$this.attr('src')}" class="${$this.attr('class') || ''}"></mip-iframe>`; // eslint-disable-line
let mipIframe = `<mip-iframe layout="container" src="${$this.attr('src')}" class="${$this.attr('class') || ''}"></mip-iframe>`; // eslint-disable-line
$this.replaceWith(mipIframe);
});
// mip-input
$('input').each(function() {
let $this = $(this);
let mipInput = `<input id="${$this.attr('id')}" type="hidden" value="${$this.val()}">`;
$this.replaceWith(`<mip-form url="https://m.yohobuy.com/">${mipInput}</mip-form>`);
});
// mip-link
// $('a').each(function() {
// let $this = $(this);
// let mipLink = `<mip-link href="${$this.attr('href')}" class="${$this.attr('class') || ''}"
// title="${$this.attr('title') || ''}">${$this.html()}</mip-link>`; // eslint-disable-line
// $this.replaceWith(mipLink);
// });
if (option.mipLink) {
$('a').each(function() {
let $this = $(this);
let mipLink = `<a data-type="mip" class="${$this.attr('class') || ''}"
href="${$this.attr('href')}">${$this.html()}</a>`;
$this.replaceWith(mipLink);
});
}
// style
$('style').each(function() {
... ... @@ -96,17 +107,17 @@ module.exports = {
/**
* 处理 HTML 为 MIP 所需要的格式
* @param {*} html HTML
* @param {*} prefix CSS 前缀
* @param {*} option.prefix CSS 前缀
*/
process(html = '', prefix = 0) {
process(html = '', option = {prefix: 0}) {
html = _.isString(html) ? html : '';
let $ = cheerio.load(html, {
decodeEntities: false
});
let inlineStyle = this.processStyle($, prefix); // 必须先处理内联样式
let tagHtml = this.processTag($);
let inlineStyle = this.processStyle($, option); // 必须先处理内联样式
let tagHtml = this.processTag($, option);
return {
mipHtml: tagHtml.mipHtml,
... ...
'use strict';
const $ = require('cheerio');
const _ = require('lodash');
const mipUtils = require('../mip-utils');
class ProductDetail extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
baseInfo(params) {
let options = {
data: {
method: 'app.product.data',
product_skn: params.productSkn
},
param: {
code: 200,
cache: true
}
};
return this.get(options).then(result => {
let brandId = _.get(result, 'data.brand_id');
let shopId = _.get(result, 'data.shop_id');
let optionsParams = {
data: {
method: 'app.product.queryShopsInfoById',
brand_id: brandId,
shop_id: shopId
},
param: {
cache: true
}
};
return this.get(optionsParams).then(data => {
if (result.data) {
result.data.enterStore = _.get(data, 'data');
}
return result;
});
});
}
intro(params) {
let options = {
data: {
method: 'app.product.intro',
product_skn: params.productSkn,
app_version: '5.6.0'
},
param: {
cache: true
}
};
return this.get(options).then(result => {
result = _.isString(result) ? result : '';
result = $.load(result);
result = result('#productDesc');
return (result.html() || '');
});
}
preference(params) {
let options = {
data: {
method: 'app.product.preference',
product_skn: params.productSkn
},
param: {
cache: true
}
};
return this.get(options).then(result => {
return result;
});
}
promotion(params) {
let options = {
data: {
method: 'app.product.promotion',
product_skn: params.productSkn
},
param: {
cache: true
}
};
return this.get(options).then(result => {
return result;
});
}
index(params) {
return Promise.all([
this.baseInfo(params),
this.intro(params),
this.preference(params),
this.promotion(params)
]).then(result => {
let resu = {
baseInfo: {},
intro: '',
preference: '',
promotion: [],
enterStore: [],
shoppingCount: '',
title: '',
mipCss: ''
};
let localCss = [];
if (_.get(result, '[0].data')) {
result[0].data.sales_price = result[0].data.sales_price.toFixed(2);
result[0].data.market_price = result[0].data.market_price.toFixed(2);
if (result[0].data.sales_price === result[0].data.market_price) {
result[0].data.market_price = 0;
}
resu.baseInfo = result[0].data;
let picBuild = [];
let build = [];
let tags = {};
_.forEach(result[0].data.tags, (value) => {
tags[value] = value;
});
resu.baseInfo.tags = tags;
_.forEach(result[0].data.goods_list, (value) => {
_.forEach(value.images_list, (item) => {
picBuild.push({
image_url: item.image_url
});
});
});
resu.baseInfo.images_list = picBuild;
_.forEach(result[0].data.enterStore, function(value) {
build.push({
storeName: value.brand_name,
url: `/shop/${value.brand_domain}-${value.shop_id}.html`,
img: value.brand_ico
});
});
resu.enterStore = build;
resu.title = `【${resu.baseInfo.brand_info.brand_name}${resu.baseInfo.middle_sort_name}${resu.baseInfo.product_name}`; // eslint-disable-line
}
if (_.get(result, '[1]')) {
result[1] = result[1].replace(/http:/g, `${params.protocol}:`);
resu.intro = mipUtils.process(result[1]).mipHtml;
localCss.push(mipUtils.process(result[1]).css);
}
if (_.get(result, '[2]')) {
result[2] = result[2].replace(/http:/g, `${params.protocol}:`);
// 处理a标签
let option = {
mipLink: true
};
let resultHtml = _.isString(result[2]) ? result[2] : '';
let goodsContainer = $.load(resultHtml)('#shop-goods-container');
let goodThumb = goodsContainer.find('.good-thumb');
let nameA = goodsContainer.find('.name a');
_.forEach(goodThumb, function(value) {
let href = $(value).attr('href').split('?')[0];
let skn = $(value).closest('.good-info').data('id');
if (skn) {
href = `${params.protocol}://m.yohobuy.com/mip/product/${skn}.html`;
}
$(value).attr('href', href);
});
_.forEach(nameA, function(value) {
let href = $(value).attr('href').split('?')[0];
let skn = $(value).closest('.good-info').data('id');
if (skn) {
href = `${params.protocol}://m.yohobuy.com/mip/product/${skn}.html`;
}
$(value).attr('href', href);
});
resu.preference = mipUtils.process(goodsContainer.html(), option).mipHtml;
}
if (_.get(result, '[3].data')) {
resu.promotion = result[3].data;
}
resu.mipCss = localCss.join('');
return resu;
});
}
}
module.exports = ProductDetail;
... ...
... ... @@ -13,6 +13,7 @@ const rewrite = require('../../doraemon/middleware/rewrite');
const mip = require('../../doraemon/middleware/mip');
const guang = require(`${cRoot}/guang`);
const chanpin = require(`${cRoot}/chanpin`);
const productDetail = require(`${cRoot}/product-detail`);
router.use(mip);
... ... @@ -22,4 +23,6 @@ router.get(/^\/guang\/(.*?)\.html/, rewrite.resolve, guang.detailIndex);
router.get('/chanpin/:id.html', chanpin.index);
router.get('/list/:id.html', chanpin.redirect);
router.get('/product/:skn.html', productDetail.index);
module.exports = router;
... ...
<div class="detail-page yoho-page">
{{# baseInfo}}
<div class="banner-pic">
<div class="pic-container">
<div class="tag-container">
{{# tags}}
{{# is_new}}
<p class="good-tag new-tag">NEW</p>
{{/ is_new}}
{{# is_advance}}
<p class="good-tag renew-tag">再到着</p>
{{/ is_advance}}
{{# is_discount}}
<p class="good-tag sale-tag">SALE</p>
{{/ is_discount}}
{{# is_yohood}}
<p class="good-tag new-festival-tag">新品节</p>
{{/ is_yohood}}
{{# is_limited}}
<p class="good-tag limit-tag">限量</p>
{{/ is_limited}}
{{# is_soon_sold_out}}
<p class="good-tag soon-sold-out-tag">即将售罄</p>
{{/ is_soon_sold_out}}
{{# is_presell}}
<p class="good-tag is-presell">预售</p>
{{/ is_presell}}
{{/ tags}}
</div>
<mip-carousel class="pic-list" layout="responsive" width="450" height="600" indicatorId="mip-carousel-example">
{{# images_list}}
<mip-img src="{{image2 image_url w=450 h=600 q=60}}"></mip-img>
{{/ images_list}}
</mip-carousel>
</div>
<div class="mip-carousel-indicator-wrapper">
<div class="mip-carousel-indicatorDot" id="mip-carousel-example">
{{# images_list}}
{{#if @index}}
<div class="mip-carousel-indecator-item"></div>
{{else}}
<div class="mip-carousel-activeitem mip-carousel-indecator-item"></div>
{{/if}}
{{/ images_list}}
</div>
</div>
</div>
<div class="goods-name">
<h1 class="name">{{product_name}}</h1>
</div>
<div class="price-date">
<div class="goods-price">
<h2 class="current-price">¥{{sales_price}}</h2>
{{#if market_price}}
<h2 class="previous-price">¥{{market_price}}</h2>
{{/if}}
</div>
</div>
{{#if student_price}}
<div class="price-date">
<div class="student-price">
<i class="student-name">学生价</i><span class="student-value">¥{{student_price}}</span>
</div>
</div>
{{else if vip}}
<ul class="vip-level clearfix">
{{#each vip}}
<li class="icons-item {{#if currentLevel}} current-level {{/if}}">
<span class="vip-img">
</span>
<span class="vip-price">{{price}}</span>
</li>
{{/each}}
</ul>
{{/if}}
{{/ baseInfo}}
{{#if promotion}}
<div class="goods-discount" id="goodsDiscount">
{{# promotion}}
<h2 class="short-text"><span class="promotion-icon"></span>{{promotionTitle}}</h2>
{{/ promotion}}
</div>
{{/if}}
{{# enterStore}}
<div id="enter-store" class="enter-store page-block tap-hightlight">
<a class="store-logo" href="{{url}}">
<mip-img src="{{image2 img w=100 h=100 q=90}}" alt="{{storeName}}"></mip-img>
</a>
<a class="store-name" href="{{url}}">{{storeName}}</a>
<a class="store-link" href="{{url}}">进入店铺&nbsp;<span>&gt;</span></a>
</div>
{{/ enterStore}}
<div class="product-desc">
{{{intro}}}
</div>
<div id="shop-goods-container" class="goods-container">{{{preference}}}</div>
<div class="cart-bar-fixed">
<div class="cart-bar">
<a href="//m.yohobuy.com/cart/index/index" class="new-foot-ico" rel="nofollow">
<div class="cart-icon"></div>
<div class="tip">购物车</div>
</a>
<a {{# enterStore}}href="{{url}}"{{/ enterStore}} class="new-foot-ico store{{#unless enterStore}} opa{{/unless}}">
<div class="shop-icon"></div>
<div class="tip">品牌店铺</div>
</a>
{{# baseInfo}}
<a href="//m.yohobuy.com/product/{{product_skn}}.html" class="addto-cart add-to-cart-url">立即购买</a>
{{/ baseInfo}}
</div>
</div>
{{> mip-footer}}
</div>
\ No newline at end of file
... ...
<div class="mip-footer">
<div class="option">
<a href="//m.yohobuy.com/signin.html" class="login">登录</a>
<a href="//m.yohobuy.com/reg.html" class="reg">注册</a>
<mip-fixed class="mip-fixed" type="gototop">
<mip-gototop class="mip-gototop">
<span class="back-to-top">回到顶部<span></span></span>
</mip-gototop>
</mip-fixed>
<div class="mip-footer-fixed">
<div class="mip-footer">
<div class="option">
<a href="//m.yohobuy.com/signin.html" class="login">登录</a>
<a href="//m.yohobuy.com/reg.html" class="reg">注册</a>
<mip-fixed class="mip-fixed" type="gototop">
<mip-gototop class="mip-gototop">
<span class="back-to-top">回到顶部<span></span></span>
</mip-gototop>
</mip-fixed>
</div>
<p class="copy-right">
CopyRight©2007-{{currentYear}} 南京新与力文化传播有限公司
</p>
</div>
<p class="copy-right">
CopyRight©2007-{{currentYear}} 南京新与力文化传播有限公司
</p>
</div>
\ No newline at end of file
... ...
... ... @@ -9,7 +9,6 @@ const newDetailModel = require('../models/new-detail');
const listModel = require('../models/list');
const headerModel = require('../../../doraemon/models/header'); // 头部model
const qs = require('querystring');
const moment = require('moment');
const tdk = require('../../../utils/getTDK');
const helpers = global.yoho.helpers;
... ... @@ -58,12 +57,6 @@ const newDetail = {
let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.productDetail","params":' +
JSON.stringify(appParams) +
'}';
let mipPic = _.get(result, 'bannerTop.list[0].img', '');
mipPic = (mipPic ? mipPic : _.get(result, 'bannerTop.img', '')).replace(
/\?(.*)/g,
'?imageView2/{mode}/w/{width}/h/{height}'
);
let title = `【${result.brandName}${result.sortName}${result.goodsName}|YOHO!BUY 有货`;
let description = result.goodsName + ' 有货网仅售' + result.goodsPrice.currentPrice + '元,购买' +
... ... @@ -84,20 +77,13 @@ const newDetail = {
localCss: true,
appPath: appPath,
isMarsApp: req.yoho.isMarsApp, // 判断mars
showAnaJson: {
addBaiduSite: true,
title: title,
publishTime: moment.unix(result.shelveTime).format('YYYY-MM-DDTHH:mm:ss'), // mip日期必填
pic: mipPic,
des: description,
url: `${req.protocol}://m.yohobuy.com/product/${result.productSkn}.html`
},
miniPath: helpers.urlFormat('/api/wechat/miniapp.jpg', {
miniapp_type: 0,
param: result.productSkn,
miniQrType: 1,
isOpen: _.get(req.app, 'locals.wap.wechat.miniPathOpen', false)
}) // param:品牌ID, name:品牌名称, miniQrType 1:商品 2 品牌,miniapp_type 0:有货,1:新与力
}), // param:品牌ID, name:品牌名称, miniQrType 1:商品 2 品牌,miniapp_type 0:有货,1:新与力
miphtml: `https://m.yohobuy.com/mip/product/${result.productSkn}.html`,
});
}).catch(next);
},
... ...
... ... @@ -78,6 +78,18 @@ const shop = {
},
/**
* 解析店铺的参数
*/
resolveShopParams(req, res, next) {
if (req.params.shopParams) {
req.query.shop_id = _.last(_.split(req.params.shopParams, '-'));
req.query.domain = req.params.shopParams.replace(`-${req.query.shop_id}`, '');
}
return next();
},
/**
* 店铺统一入口
*/
entry(req, res, next) {
... ...
... ... @@ -237,12 +237,29 @@ exports.filter = (req, res, next) => {
let params = {};
let currentUrlParams = {}; // 页面链接伪静态固定参数
if (req.query.currentUrl) {
if (req.query.isShopList === 'Y') {
let shopId;
let pathSplitArr = _.compact(_.split(req.query.currentUrl, '/'));
let pathParams = _.last(pathSplitArr);
if (pathSplitArr.length === 2) {
shopId = _.last(_.split(pathParams, '-'));
} else {
currentUrlParams = listParamsProcess.getParams(pathParams);
let shopInfoPath = _.replace(req.query.currentUrl, `/${pathParams}`, '');
shopId = _.last(_.split(shopInfoPath, '-'));
}
_.assign(req.query, currentUrlParams, {shop_id: shopId});
} else {
currentUrlParams = listParamsProcess.getParams(req.query.currentUrl);
delete req.query.currentUrl;
delete req.query.page;
}
delete req.query.currentUrl;
delete req.query.page;
_.assign(params, currentUrlParams, req.query);
let uid = req.user.uid || 0;
... ...
... ... @@ -170,13 +170,22 @@ router.get('/index/shopFav', list.shopFav);
router.get('/index/category', list.shopCategory);
router.get('/index/getBrandCouponsList', list.getBrandCouponsList);
router.get('/shop', newShop.redirect); // 老路由重定向前置处理
router.get('/shop/:domain-:shop_id.html', newShop.entry); // 新入口
router.get('/shop/:domain-(:shop_id)(/:pathParams)?', rewrite.resolvePathParams, newShop.goodsList); // 店铺商品列表
router.get('/shop/goodslist',
cors,
rewrite.resolveShopPathParamsAjax,
newShop.goodsListAjax); // 店铺商品列表异步查询
router.get('/shop/:shopParams.html',
newShop.resolveShopParams,
newShop.entry); // 新入口
router.get('/shop/:shopParams',
rewrite.resolvePathParams,
newShop.resolveShopParams,
newShop.goodsList); // 店铺商品列表
router.get('/shop/:shopParams/:pathParams',
rewrite.resolvePathParams,
newShop.resolveShopParams,
newShop.goodsList); // 店铺商品列表
router.get('/shop', newShop.redirect); // 老路由重定向前置处理
router.get('/index/brand', newShop.entry); // 旧的路由,走到新的 controller
router.get('/index/brandFav', newShop.brandFav);
... ...
... ... @@ -11,10 +11,24 @@ const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
const domains = {
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
liveApi: 'http://testapi.live.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/',
// gray
// singleApi: 'http://single.gray.yohops.com/',
// api: 'http://apigray.yoho.cn/',
// service: 'http://apigray.yoho.cn/',
// platformApi: 'http://172.16.6.210:8088/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// liveApi: 'http://testapi.live.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api',
global: 'http://api-global.yohobuy.com',
... ...
... ... @@ -162,10 +162,20 @@ const resolvePathParamsAjax = (req, res, next) => {
* 解析 Path 类型店铺商品列表异步请求中 URL 的参数
*/
const resolveShopPathParamsAjax = (req, res, next) => {
let pathParams = _.last(_.split(req.query.currentUrl, '/'));
let currentUrlParams = listParamsProcess.getParams(pathParams);
let shopInfoPath = _.replace(req.query.currentUrl, `/${pathParams}`, '');
let shopId = _.last(_.split(shopInfoPath, '-'));
let shopId;
let currentUrlParams;
let pathSplitArr = _.compact(_.split(req.query.currentUrl, '/'));
let pathParams = _.last(pathSplitArr);
if (pathSplitArr.length === 2) {
shopId = _.last(_.split(pathParams, '-'));
} else {
currentUrlParams = listParamsProcess.getParams(pathParams);
let shopInfoPath = _.replace(req.query.currentUrl, `/${pathParams}`, '');
shopId = _.last(_.split(shopInfoPath, '-'));
}
delete req.query.currentUrl;
... ...
... ... @@ -85,11 +85,9 @@
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-x.png" media="screen and (min-device-width: 751px) and (max-device-width: 1125px)">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-6.png" media="screen and (min-device-width: 641px) and (max-device-width: 750px)">
<link rel="apple-touch-startup-image" href="https://cdn.yoho.cn/h5/forios/startup/startup-orange-5.png" media="screen and (max-device-width: 640px)">
{{> ld-json}}
</head>
<body class="{{pageStyle}}{{#if isWechat}} wechat-body{{/if}}{{#if width750}} width750{{/if}}{{#if isPassportPage}} passport-body{{/if}}{{#if isStarIndexPage}} star-index-bg{{/if}}{{#if isStarDetailPage}} star-class-body{{/if}}{{#if isInstallmentPage}} installment-body{{/if}}{{#if @root.isMarsApp}} is-mars-app{{/if}}{{#if @root.isNowApp}} is-now-app{{/if}}">
<div class="main-wrap" id="main-wrap" {{#if appPath}}data-apppath='{{{appPath}}}'{{/if}} {{#if miniPath}}data-miniPath='{{{miniPath}}}'{{/if}}>
<div class="main-wrap" id="main-wrap" {{#if appPath}}data-apppath='{{{appPath}}}'{{/if}} {{#if miniPath}}data-miniPath='{{{miniPath}}}'{{/if}} {{#if @root.wap.wechat.backDownload}}data-backDownload='{{@root.wap.wechat.backDownload}}'{{/if}}>
{{#if systemUpdate}}
{{> updata}}
{{/if}}
... ... @@ -130,8 +128,5 @@
{{#unless devEnv}}
{{> analysis}}
{{/unless}}
{{# showAnaJson}}
{{#if addBaiduSite}}<script src="//msite.baidu.com/sdk/c.js?appid=1583402501013173"></script>{{/if}}
{{/showAnaJson}}
</body>
</html>
... ...
... ... @@ -2,7 +2,7 @@
<html mip>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>{{title}} | Yoho!Buy有货 | 潮流购物逛不停</title>
<link rel="stylesheet" type="text/css" href="https://mipcache.bdstatic.com/static/v1/mip.css">
{{# canonical}}
... ...
... ... @@ -12,7 +12,7 @@
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.10/yas.js', '_yas'));
}(window, document, 'script', (document.location.protocol === 'https:' ? 'https:' : 'http:') + '//cdn.yoho.cn/yas-jssdk/2.4.11/yas.js', '_yas'));
var _hmt = _hmt || [];
... ... @@ -56,7 +56,7 @@
uid = uid === 0 ? '' : uid;
window._ozuid = uid; // 暴露ozuid
if (window._yas) {
window._yas(1 * new Date(), '2.4.10', 'yohobuy_m', uid, '', '');
window._yas(1 * new Date(), '2.4.11', 'yohobuy_m', uid, '', '');
}
setTimeout(function() {
... ...
{
"name": "yohobuywap-node",
"version": "6.4.0",
"version": "6.3.20",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -10,7 +10,8 @@ const compiler = webpack(webpackConfig);
const devMiddleware = webpackDevMiddleware(compiler, {
publicPath: webpackConfig.output.publicPath,
quiet: true,
logLevel: 'silent',
stats: 'none',
headers: {
'Access-Control-Allow-Origin': '*'
}
... ...
... ... @@ -436,7 +436,6 @@ function givePoint(parameter) {
}, true);
}
/**
* 页面头颜色修正
*/
... ...
// 微信返回注册下载事件
function pushHistory() {
var pages = ['yh_download', 'yh_forward'];
var state = {
title: '下载页面',
page: pages[0],
url: '//m.yohobuy.com/api/wechat/download'
};
var url = location.href;
window.addEventListener('popstate', function(e) {
var temp = e.state;
if (temp && pages.indexOf(temp.page) > -1) {
location.reload();
}
});
if (!window.history.pushState || window.history.length > 1) {
return false;
}
window.history.replaceState(state, null, state.url);
window.history.pushState({page: pages[1]}, null, url);
}
if (/micromessenger/i.test(navigator.userAgent) &&
document.getElementById('main-wrap').getAttribute('data-backDownload')) {
pushHistory();
}
... ...
... ... @@ -9,6 +9,8 @@ const qs = require('yoho-qs');
const tip = require('plugin/tip');
const yoho = require('./yoho-app');
require('./common/back-download');
// 如果不是 App,就把这个 cookie 清理掉,解决之前缓存错误的问题 20171020
const isApp = qs.app_version || /YohoBuy/i.test(navigator.userAgent || '');
... ...
... ... @@ -10,5 +10,5 @@ require('common/footer');
new ProductListWithFilter({
page: 2,
currentUrl: location.pathname,
isNewList: 'Y'
isShopList: 'Y'
}, 'product/shop/goodslist');
... ...
!function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return e[o].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var o=n(17);if(window.YohoAcquisitionObject){var i=window.YohoAcquisitionObject;window[i].p&&(o.apply(this,window[i].p),window[i]=o)}e.exports=o},function(e,t){e.exports=function(e,t,n){if(void 0===t){var o=null;if(document.cookie)for(var i=document.cookie.split(";"),r=0;r<i.length;r++){var a=(i[r]||"").trim();if(a.substring(0,e.length+1)==e+"="){o=decodeURIComponent(a.substring(e.length+1));break}}return o}n=n||{},null===t&&(t="",n.expires=-1);var d="";if(n.expires&&("number"==typeof n.expires||n.expires.toUTCString)){var s;"number"==typeof n.expires?(s=new Date,s.setTime(s.getTime()+24*n.expires*60*60*1e3)):s=n.expires,d="; expires="+s.toUTCString()}var c=n.path?"; path="+n.path:"",p=n.domain?"; domain="+n.domain:"",l=n.secure?"; secure":"";document.cookie=[e,"=",encodeURIComponent(t),d,c,p,l].join("")}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){function o(e,t){for(var n=0;n<e.length;n++){var o=e[n],i=f[o.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](o.parts[r]);for(;r<o.parts.length;r++)i.parts.push(c(o.parts[r],t))}else{for(var a=[],r=0;r<o.parts.length;r++)a.push(c(o.parts[r],t));f[o.id]={id:o.id,refs:1,parts:a}}}}function i(e){for(var t=[],n={},o=0;o<e.length;o++){var i=e[o],r=i[0],a=i[1],d=i[2],s=i[3],c={css:a,media:d,sourceMap:s};n[r]?n[r].parts.push(c):t.push(n[r]={id:r,parts:[c]})}return t}function r(e,t){var n=g(),o=y[y.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function d(e){var t=document.createElement("style");return t.type="text/css",r(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",r(e,t),t}function c(e,t){var n,o,i;if(t.singleton){var r=v++;n=w||(w=d(t)),o=p.bind(null,n,r,!1),i=p.bind(null,n,r,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),o=u.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=d(t),o=l.bind(null,n),i=function(){a(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else i()}}function p(e,t,n,o){var i=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var r=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}function l(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function u(e,t){var n=t.css,o=t.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var f={},m=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},h=m(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),g=m(function(){return document.head||document.getElementsByTagName("head")[0]}),w=null,v=0,y=[];e.exports=function(e,t){t=t||{},void 0===t.singleton&&(t.singleton=h()),void 0===t.insertAt&&(t.insertAt="bottom");var n=i(e);return o(n,t),function(e){for(var r=[],a=0;a<n.length;a++){var d=n[a],s=f[d.id];s.refs--,r.push(s)}if(e){o(i(e),t)}for(var a=0;a<r.length;a++){var s=r[a];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete f[s.id]}}}};var b=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){function n(){var e=document.domain.split("."),t=e.length;return t>1&&isNaN(e[t-1])?"."+e[t-2]+"."+e[t-1]:document.domain}e.exports={version:"1.0",yasPath:"/web/",yasDomain:n(),yasImgDomain:"//analytics.m.yohobuy.com/yas.gif",yasMobileDomain:"//analytics.m.yohobuy.com/yas_mobile"}},,function(e,t,n){var o=n(1);t.flashChecker=function(){var e=0,t=0,n=null;return navigator.plugins&&navigator.plugins.length>0&&(n=navigator.plugins["Shockwave Flash"])&&(e=1,t=n.description.replace("Shockwave Flash","")),{f:e,v:t}},t.Hash=function(e){var t,n=1,o=0;if(e)for(n=0,t=e.length-1;t>=0;t--)o=e.charCodeAt(t),n=(n<<6&268435455)+o+(o<<14),0!==(o=266338304&n)&&(n^=o>>21);return n},t.Random=function(){return Math.round(2147483647*Math.random())},t.hashClientInfo=function(){var e=window.navigator,n=window.history.length;e=[e.appName,e.version,e.language,e.platform,e.userAgent,e.javaEnabled(),window.screen,window.screen.colorDepth,window.document.cookie?window.document.cookie:"",window.document.referrer?window.document.referrer:""].join("");for(var o=e.length;n>0;)e+=n--^o++;return t.Hash(e)},t.merge=function(e,t){var n={};for(var o in e)n[o]=e[o];for(var i in t)n[i]=t[i];return n},t.genParam=function(e){var t=[];for(var n in e)t.push(n+"="+e[n]);return t.join("&")},t.trim=function(e){if(String.prototype.trim)return null===e?"":String.prototype.trim.call(e);var t=/^\s+/,n=/\s+$/,o="";return e?(o=e.toString().replace(t,""),o=o.replace(n,"")):void 0},t.getGeo=function(e){function t(t){var n=t.coords.longitude,o=t.coords.latitude;e(o,n)}function n(t){e(!1)}if(window.navigator.geolocation){var o={enableHighAccuracy:!0};window.navigator.geolocation.getCurrentPosition(t,n,o)}else e(!1)},t.queryString=function(){var e,t,n={},o=window.location.search.slice(1).split("&");for(t=0;t<o.length;t++)e=o[t].split("="),n[e[0]]=e[1];return n},t.closest=function(e,t){for(var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!n.call(e,t);)e=e.parentElement;return e},t.getChannel=function(){return{boys:1,girls:2,kids:3,lifestyle:4}[o("_Channel")||"boys"]};t.getAppVersion=function(){return window.qs.app_version||window.qs.appVersion};var i={"baidu.com":0x5af3107a4037,"so.com":0x5af3107a4031,"sogou.com":0x5af3107a4035,"bing.com":0x5af3107a4039,"m.sm.cn":0x5af3107a403b,"google.com":0x5af3107a403d};"m.yohobuy.com"===location.hostname||/\.m\.yohobuy\.com$/.test(location.hostname)||(i={"baidu.com":0x5af3107a5f73,"so.com":0x5af3107a5f6b,"sogou.com":0x5af3107a5f71,"bing.com":0x5af3107a5f6d,"m.sm.cn":0x5af3107a5f75,"google.com":0x5af3107a5f6f}),t.getMktcBySeo=function(){var e,t=document.referrer;for(var n in i)if(t.indexOf(n)>-1){e=i[n];break}return e},t.setFontSize=function(){var e=document.documentElement;if(!e.style.fontSize){var t=e.clientWidth;if(!t)return;e.style.fontSize=t>=640?"40px":t/640*40+"px"}},t.getMiniAppDialog=function(){var e="//cdn.yoho.cn/static/wechat/miniapp-yohobuy.jpg?imageView2/1/w/258/h/258",t=document.getElementById("main-wrap").getAttribute("data-minipath")||e,n='<div class="mini-app-dialog-bg" id="mini-app-dialog-bg"></div>';return n+='<div class="mini-app-dialog" id="mini-app-dialog">',n+='<div class="mini-app-header"><span class="mini-app-close" id="mini-app-close"></span></div>',n+='<div class="mini-app-content"><img id="mini-app-img" src="'+t+'" onerror="this.src= \''+e+"';this.onerror=null;\" /></div>",n+='<div class="mini-app-footer">长按识别小程序码进入有货精选</div>',n+="</div>"},t.getDownloadStr=function(e){var t='<div class="top-downloadbar';return e&&(t+=" top-downloadbar-wechat"),t+='" id="top-downloadbar"><a href="javascript:void(0);" class="download-close" id="download-close"></a>\t <span class="download-icon"></span><span class="download-text">Yoho!Buy有货</span>',e?(t+='<a class="download-go-wechat" id="download-go" href="https://union.yoho.cn/union/app-downloads.html">立即打开</a>',t+='<a class="mini-app-open" id="mini-app-open" href="javascript:;">进入小程序</a>'):(t+='<p class="download-text-desc">新用户送惊喜礼包</p>',t+='<a class="download-go" id="download-go" href="https://union.yoho.cn/union/app-downloads.html">立即打开</a></div>'),t},t.getAppPath=function(){var e=document.getElementById("main-wrap").dataset||{},t=e.apppath;return t=(t||"").replace("yohobuy://yohobuy.com/goapp?","")||'openby:yohobuy={"action":"go.home","params":{"gender":"1","channel":"2"}}'},t.getUdid=function(){return o("udid")||""||0}},function(e,t,n){t=e.exports=n(2)(),t.push([e.id,'.top-downloadbar{display:block;height:2.25rem;background:rgba(68,68,68,.95);width:100%;padding:.125rem 0;position:relative;box-sizing:content-box}.top-downloadbar .download-close{margin-left:.25rem;width:.7rem;height:.7rem;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNAay06AAAAWUSURBVFiFzZhPTxNdFIefC1iJIq2ZTjG2I7QlKRQQS4IrNLrQIWrFho3GhS7dGL/C+zHcGhewM4qSlh0JK6mCiW2JsWBs6x/qiFQxUGznXWBHSmlpQd68v+2ce+8z5957zj1H+P1+nf+hGnYzyGKx4Ha7URQFWZYxm82YTCYAstksy8vLpNNpEokE8Xicb9++1byGqNZjQgi8Xi/9/f04HA6EEADouk4mk2FtbQ2AgwcP0tzcXPQ9mUwyPT1NNBpF16vboKo85nK5UFUVq9UKQDKZZG5ujoWFBdLpNLlcrsi+vr4eWZZxOp10dHSgKAqKonD27FlCoRDz8/M7O6KSxxoaGlBVlb6+PnRd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XA4zPj4OGtraxXzcGHNAgNsqpKEENy5cwdJknjw4MGeK6JqpSgKt27dQtM07t+/b4Qdw2O6rhMKhRBC4Pf7jQi8nzKZTEZuDYVCRU/5osA1Pz/P7OwskiQZh3y/JITgypUrSJLE7OxsSXVeElGDwSCpVIrOzk4uX768L3BCCC5dukRXVxepVIpgMFhiUwK2vr7O6OioUb0MDw//1W01mUwMDw/T19eHpmmMjo5WV/AW4CKRCE6n02iMfP78mUwmsycoRVG4fv06ra2tfPz4kYcPH5ZtEfwnTRVZljlz5szfaapslsvlYnBwEEmSgI20EYvFePfuXcU2VFtbGx6PB0VREEKgaRrBYHDvbagiw9+Nu9OnT2O3241Lkc/n+f79e1Hj7siRI0UvlULjLhKJVF3dVw22WRaLhfb2dk6cOIEkSdu2OjVN4/3797x9+3Z/W53/tf4F/0jgMDtkmrEAAAAASUVORK5CYII=")}.top-downloadbar .download-close,.top-downloadbar .download-icon{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);background-size:cover}.top-downloadbar .download-icon{width:2rem;height:2rem;left:1.25rem;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNAay06AAABA1SURBVHic7Zx5bFTV28c/996Z6XTolO4bbaFAoIVSWiw7+HMDIQQRRFQCxrBEIbIYC4gSFFCjaILIloASoSzGFcFUFquISABBQSpbaQNtKdCZ6XSZzpTZ7vtHnfu2zNKhCqj4TfrHnHuW53zvOc95lnMrjB49WqYVuFwuGhsbuX79Ok6nE5fLhSy32uxvAUEQEEURlUpFSEgIWq0WlUrVaruANex2Ow0NDVit1r9M0NsNWZZxu904nU4aGxupra0lNDSUdu3aERIS4redX2Jqa2uxWCy3RNg7DZvNhs1mQ6fTERkZ6bOOFzFutxuTyYTdbr/lAt5pWK1W7HY70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79+vVj1qxZHDp0yKuflStXYjabvU42D1SyLAd9wUcUReX2g6eNKIoYDAZEUWzRT1xcHIcPH+bjjz9WEvNOp5OzZ8+Sn5/P/v37iYuLQ6VSeSm/xMREzp8/z+LFi3n77bc5efIkBQUFFBQUcPDgQaDJqPTcsvToOA/Cw8OJjIykpqaG1atXs2bNGsaOHcvcuXMZOnQodrudFStW0L59e5+fMQqCgJCamioH+ymOLMtIkoQkSS2I8ZjhzR1EURSx2+2YTCbFgm0+ieTkZKVPX/C4Hp07d6aoqIiGhgagKWupVquDPjBEUcRms2E0GhFFkenTp1NXV8cnn3xChw4dfJ5IkiQhpKSkBE2MZ5Abk+BarZbQ0FCfK6+57yIIAiqVKqhbVpIk0dDQQE1NDREREYqCbitEUaSxsVHJTHi2nL+xheTk5KCJuVsgSRKqQJGsuxVut/vPXWf9N0MlSZLfvXa3QhRFVFqt1ueNorsZKpUKVXh4OGaz+U7L8rdCu3btUEVHRyv53P/QhNjYWFQhISFERET8t2r+gE6nQ6/XN51KKSkpSlDpbkdaWhrwx61NvV5PTEwMVVVVd1SoO43w8HDlMqbiXaenp990euPfBJVKRWZmpvK7RdghKyvrL//W6J+C3r17t0i1tCBGq9XSp08fv9c5/o3QaDTk5OR4XWnzClSFhoZyzz33EBsbe9uEu1OIjIykT58+PpOFPrMEoiiSkZFBQkICFRUV/7qjPDw8nOTkZK8vZ5ojYPokMjKSyMhI6urqMJlM1NXVKf/A65/ieHpiQBqNBr1eT3R0dFCfAfwfkRV6AFYsdF8AAAAASUVORK5CYII=")}.top-downloadbar .download-text{position:absolute;top:50%;-webkit-transform:translateY(-80%);transform:translateY(-80%);left:3.5rem;color:#fff;font-size:.6rem}.top-downloadbar-wechat .download-text{-webkit-transform:translateY(-50%);transform:translateY(-50%)}.top-downloadbar .download-text-desc{position:absolute;top:50%;-webkit-transform:translateY(-10%) scale(.5);transform:translateY(-10%) scale(.5);-webkit-transform-origin:left center;transform-origin:left center;left:3.5rem;color:#c7c7c7;font-size:1rem}.top-downloadbar .download-go{right:.375rem;background:red}.top-downloadbar .download-go,.top-downloadbar .download-go-wechat{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:.6rem;padding:0 .375rem;height:1.125rem;line-height:1.125rem;border-radius:.125rem;color:#fff;text-decoration:none}.top-downloadbar .download-go-wechat{right:4.7rem;background:#000}.top-downloadbar .download-wechat,.top-downloadbar .mini-app-open{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);right:.375rem;font-size:.6rem;padding:0 .375rem;height:1.125rem;line-height:1.125rem;border-radius:.125rem;background:red;color:#fff;text-decoration:none}',""])},function(e,t,n){t=e.exports=n(2)(),t.push([e.id,'.mini-app-dialog,.mini-app-dialog-bg{display:none}.mini-app-dialog-bg{background-color:#000;opacity:.3;position:fixed;width:100%;z-index:9998;height:100%}.mini-app-dialog{position:fixed;z-index:9999;left:50%;top:50%;width:12.5rem;border-radius:.2rem;background-color:#fff;margin-left:-6.25rem;margin-top:-6.8rem}.mini-app-dialog,.mini-app-dialog div{text-align:center}.mini-app-dialog .mini-app-header{height:2rem;line-height:2rem}.mini-app-dialog .mini-app-content{padding:.625rem}.mini-app-dialog .mini-app-content img{width:6.45rem;height:6.45rem}.mini-app-dialog .mini-app-footer{height:3.65rem;line-height:3.65rem;font-size:.7rem}.mini-app-dialog .mini-app-close{width:.75rem;height:.75rem;position:absolute;right:.25rem;top:.25rem;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmFJREFUeNrMl99OE0EUxrdL9bYYbWoEJajUP5ckXsM2IZJe0IQQqY9AGq0+QY0vUExs+gqQkCblAi0ktPckvUQoQoyihDbE6qWELN9pzjbr6O7MlK7xJB/Tdg/nN+fszOzZkG3bhszK5fIlDI+hKegRdAe6wpe/Q/vQFrQBradSqV+ymCE/MICDGF5AGeiaoWYnUAHKYwJtbTCgaQyLUMzozZpQFvAlJTCAAxjecJb9sCL0DBM48wQzlGY4Z/TXStATN9wUHBYDgJLNchX/zBjZznO2QdpT5553wLx6dy6wkFStBcVptTulzvpAJ3jfNhQCb0Mj0LTH9Sj0snOPke1lyQr+ihkeYExAexKoBd/P9D8+fhlimnwaRX0c38FxCAEpmOUBJ2gCPk34UsarPvGu0ilo8lHoZ2PQpgsuZv6BocfwuYXPVWhUErMDHle4d3GG3wDgkOEfGWq5oDUFKNm4yRkZPcCtHjLtVjGMPxGN7XCP4RbDaSveZOhtjTgRytjW3Iu24m++RuCfGv67XN4jZDoMXcfnL1z2A404P0zJ3hShlgPl8lZd8EkN+B6B67qZMvQudJ/vuS68TuCKxKnB0G8C1LEHDI9plL1icp/U8nFKuqCbAtQNrzKcjswZSWtUcZ5OOXx55eFI5aNM3ivseTo6k9BDaM3D5zUmlwvzF3pIL3g8oWoaq5WAnySPxXy3A+FuMGsEb8+dzrPb+uCHZQxvA4QW3B2n2HNRD70SALQkVvQ3MHeBaW7I+2VFscP8vxr6v7zCZLk1iv6TVxiFl7ZBvtwWXtoqAJ7KYp4LMACryxGMnWAbNgAAAABJRU5ErkJggg==");background-size:cover}',""])},function(e,t,n){var o=n(7);"string"==typeof o&&(o=[[e.id,o,""]]);n(3)(o,{});o.locals&&(e.exports=o.locals)},function(e,t,n){var o=n(8);"string"==typeof o&&(o=[[e.id,o,""]]);n(3)(o,{});o.locals&&(e.exports=o.locals)},function(module,exports){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,o,i,r,a,d=gap,s=t[e];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(e)),"function"==typeof rep&&(s=rep.call(t,e,s)),typeof s){case"string":return quote(s);case"number":return isFinite(s)?String(s):"null";case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(s)){for(r=s.length,n=0;n<r;n+=1)a[n]=str(n,s)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+d+"]":"["+a.join(",")+"]",gap=d,i}if(rep&&"object"==typeof rep)for(r=rep.length,n=0;n<r;n+=1)"string"==typeof rep[n]&&(o=rep[n],(i=str(o,s))&&a.push(quote(o)+(gap?": ":":")+i));else for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(i=str(o,s))&&a.push(quote(o)+(gap?": ":":")+i);return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+d+"}":"{"+a.join(",")+"}",gap=d,i}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var o;if(gap="",indent="","number"==typeof n)for(o=0;o<n;o+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,o,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o=walk(i,n),void 0!==o?i[n]=o:delete i[n]);return reviver.call(e,t,i)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),module.exports=JSON},function(e,t,n){var o=n(6),i=n(4),r=i.yasPath,a=i.yasImgDomain,d=i.yasMobileDomain,s=function(e,t){var n;return window.XMLHttpRequest?n=new XMLHttpRequest:"undefined"!=typeof XDomainRequest?n=new XDomainRequest:window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLHTTP")),n};t.imgSend=function(e,t){var n=o.getAppVersion();if(!(window.appBaseLogs||window.yohoInterface||n>="5.2.1")){var i=new Image(1,1);i.src=a+r+"?"+e,i.onload=function(){i.onload=null,t&&t()}}},t.appSend=function(e,t){if(window.appBaseLogs){var n=s();n&&(n.ontimeout=function(e){console.log("timeout: ",JSON.stringify(e))},n.onerror=function(e){console.log("error: ",JSON.stringify(e))},n.onreadystatechange=function(){4==n.readyState&&200==n.status&&t&&t()},n.open("post",("https:"===document.location.protocol?"https:":"http:")+d,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),n.send(e))}},t.downloadSend=function(e,t,n){var o=s();o&&(o.ontimeout=function(e){console.log("timeout: ",JSON.stringify(e))},o.onerror=function(e){console.log("error: ",JSON.stringify(e))},o.onreadystatechange=function(){4==o.readyState&&200==o.status&&n&&n()},o.open("post",("https:"===document.location.protocol?"https:":"http:")+e,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(t))}},function(e,t){t.addEventHandler=function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},t.removeEventHandler=function(e,t,n){e&&(e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t])}},function(e,t){t.init=function(){"bind"in Function.prototype||(Function.prototype.bind=function(e){var t=this;if(arguments.length<=1)return function(){return t.apply(e,arguments)};var n=Array.prototype.slice.call(arguments,1);return function(){return t.apply(e,0===arguments.length?n:n.concat(Array.prototype.slice.call(arguments)))}}),"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),"indexOf"in Array.prototype||(Array.prototype.indexOf=function(e,t){void 0===t&&(t=0),t<0&&(t+=this.length),t<0&&(t=0);for(var n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1}),"lastIndexOf"in Array.prototype||(Array.prototype.lastIndexOf=function(e,t){for(void 0===t&&(t=this.length-1),t<0&&(t+=this.length),t>this.length-1&&(t=this.length-1),t++;t-- >0;)if(t in this&&this[t]===e)return t;return-1}),"forEach"in Array.prototype||(Array.prototype.forEach=function(e,t){for(var n=0,o=this.length;n<o;n++)n in this&&e.call(t,this[n],n,this)}),"map"in Array.prototype||(Array.prototype.map=function(e,t){for(var n=new Array(this.length),o=0,i=this.length;o<i;o++)o in this&&(n[o]=e.call(t,this[o],o,this));return n}),"filter"in Array.prototype||(Array.prototype.filter=function(e,t){for(var n,o=[],i=0,r=this.length;i<r;i++)i in this&&e.call(t,n=this[i],i,this)&&o.push(n);return o}),"every"in Array.prototype||(Array.prototype.every=function(e,t){for(var n=0,o=this.length;n<o;n++)if(n in this&&!e.call(t,this[n],n,this))return!1;return!0}),"some"in Array.prototype||(Array.prototype.some=function(e,t){for(var n=0,o=this.length;n<o;n++)if(n in this&&e.call(t,this[n],n,this))return!0;return!1})}},,,function(e,t,n){function o(e){var t=m.merge(b,O);t=m.merge(t,R);var n=s();n&&(t=m.merge(t,n));var o=r();o&&(t=m.merge(t,o),h("_yasmp",null,{path:"/",domain:v.yasDomain,expires:73e3}));var i=h("_yascustjson");if(i){var a=JSON.parse(i);t=m.merge(t,a),h("_yascustjson",null,{path:"/",domain:v.yasDomain,expires:73e3})}var d=m.genParam(t);e=e||function(){},g.imgSend(d,e);var c=h("_yasev");c&&g.imgSend(c,function(){h("_yasev",null,{path:"/",domain:v.yasDomain,expires:73e3})})}function i(){var e=h("_yasvd");return e?{cid:e,isNew:"N"}:(e=m.Random()^2147483647&m.hashClientInfo(),h("_yasvd",e,{path:"/",domain:y,expires:73e3}),{cid:e,isNew:"Y"})}function r(){var e=h("_yasmp");if(e){var t=e.split(",");if(3===t.length)return{x:t[0],y:t[1],et:t[2]};if(4===t.length)return{x:t[0],y:t[1],et:t[2],ix:t[3]}}return null}function a(e){var t=0,n=0;return e.pageX||e.pageY?(t=e.pageX,n=e.pageY):(e.clientX||e.clientY)&&(t=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=e.clientY+document.body.scrollTop+document.documentElement.scrollTop),t-=window.screen.width/2,n=window.screen.height/2-n,{x:t,y:n}}function d(){var e=window.qs.mkt_code||window.qs.union_type||m.getMktcBySeo();if(e){var t={path:"/",domain:y,expires:new Date(Date.now()+6048e5)};h("mkt_code")&&h("mkt_code")===e&&"100000000000349"!==e||h("mkt_code",e,t)}}function s(){var e=h("mkt_code")||window.qs.mkt_code||window.qs.union_type;return e?{mktc:e}:null}function c(){for(var e=window.qs.mkt_code||window.qs.union_type||m.getMktcBySeo()||"100000000000349",t=document.getElementsByTagName("a"),n=0;n<t.length;n++){var o=t[n].getAttribute("href")||"",i=o.indexOf("union.yoho.cn/union/downapp.html")>-1,r=o.indexOf("union.yoho.cn/union/app-downloads.html")>-1,a=o.indexOf("union.yoho.cn/union/ClickUnionRest/addUnion4Jump")>-1;if(i||r||a){var d=[];if(e&&-1===o.indexOf("union_type")&&d.push("union_type="+e),-1===o.indexOf("client_id")&&d.push("client_id="+I.cid),-1===o.indexOf("openby:yohobuy")&&r&&d.push(m.getAppPath()),d.length){if(-1===o.indexOf("?"))o+="?",o+=d.join("&");else{o.split("?");o=o[0]+"?"+d.join("&")+o[1]}t[n].setAttribute("href",o)}w.addEventHandler(t[n],"click",function(e){M.sendCustomInfo&&M.sendCustomInfo({op:"YB_DOWNLOAD_C",param:JSON.stringify({C_ID:window.qs.yh_channel||m.getChannel()||1,TO_URL:e.target.getAttribute("href")})},!0)})}}}function p(){if(!E)return!1;m.setFontSize();var e=(n(10),document.createElement("div"));e.innerHTML=m.getMiniAppDialog(),D.appendChild(e);var t,o=document.getElementById("mini-app-close"),i=document.getElementById("mini-app-img");w.addEventHandler(i,"touchstart",function(){t=setTimeout(function(){_hmt&&_hmt.push&&_hmt.push(["_trackEvent","小程序码","长按超过1秒"])},1e3)}),w.addEventHandler(i,"touchend",function(){clearTimeout(t)}),w.addEventHandler(o,"click",function(){_hmt&&_hmt.push&&_hmt.push(["_trackEvent","打开小程序按钮","关闭"]),B()}),(document.getElementById("main-wrap").getAttribute("data-minipath")||"").indexOf("isOpen=true")>-1&&(_hmt&&_hmt.push&&_hmt.push(["_trackEvent","打开小程序按钮","自动打开"]),B())}function l(){var e=document.getElementById("no-download"),t=document.getElementById("top-downloadbar"),o=U.some(function(e){return new RegExp(e,"i").test(location.href)});if(!(e||window.qs.nodownload||"app"===window.qs.openrefer||t||o)&&!A&&(x||E)&&(S||N)){if(t=document.getElementById("float-layer-app"),t&&t.parentNode.removeChild(t),h("_downloadBar"))return;m.setFontSize();var i=(n(9),document.createElement("div"));i.innerHTML=m.getDownloadStr(E),D.appendChild(i);var r=document.getElementById("download-close");w.addEventHandler(r,"click",function(){h("_downloadBar","close",{path:"/",domain:v.yasDomain,expires:new Date(Date.now()+6e4)}),g.downloadSend("//m.yohobuy.com/activitylog.json?close",""),i.style.display="none",_hmt&&_hmt.push&&_hmt.push(["_trackEvent","顶部下载条目","点击关闭Banner"])});var a=document.getElementById("download-go");w.addEventHandler(a,"click",function(e){g.downloadSend("//m.yohobuy.com/activitylog.json?download",""),_hmt&&_hmt.push&&_hmt.push(["_trackEvent","顶部下载条目","所有打开和下载",encodeURIComponent(e.currentTarget.getAttribute("href"))])});var d=document.getElementById("download-wechat");w.addEventHandler(d,"click",function(){g.downloadSend("//m.yohobuy.com/activitylog.json?attenion",""),_hmt&&_hmt.push&&_hmt.push(["_trackEvent","顶部下载条目","微信里面关注"])});var s=document.getElementById("mini-app-open");w.addEventHandler(s,"click",function(){_hmt&&_hmt.push&&_hmt.push(["_trackEvent","打开小程序按钮","打开"]),B()})}}function u(e,t,n,o,i){var r=h("_yasev");r?r+="&":r="",h("_yasev",r+"vd="+O.vd+"&t="+e+"&i="+t+"&l="+o+"&v="+i,{path:"/",domain:y,expires:73e3}),T++}function f(e,t){e.av&&(window.indx=e.indx,window.originUrl=e.origin||location.href,window.appBaseLogs={device:{ak:e.ak,udid:e.udid},status:[{av:e.av,udid:e.udid,sid:e.sid}],events:[{uid:e.uid,sid:e.sid,abtype:e.abtype}]},window.originUrl&&window.qs&&M.sendAppLogs({appop:"YB_H5_PAGE_OPEN_L",param:JSON.stringify({C_ID:window.qs.yh_channel||m.getChannel()||1,PAGE_URL:window.originUrl,PAGE_NAME:decodeURI(window.qs.title||document.title),ACTION_URL:t})},!1))}n(11),n(14).init();var m=n(6),h=n(1),g=n(12),w=n(13),v=n(4),y=(v.version,v.yaPath,v.yasDomain),b={h:document.domain,p:window.location.port,u:window.location.pathname,ft:0,fst:0,sv:"",ab:h("ab_5")||"",op:"YB_PAGE_OPEN_L",apf:window.location.search.indexOf("app_version=")>=0?"Y":"N",udid:m.getUdid()},A=/yoho/i.test(navigator.userAgent)||/app_version=/i.test(window.location.search)||!!window.yohoInterface,x=/(iPhone|Android|iPad|iPod|iOS)/i.test(navigator.userAgent),E=/micromessenger/i.test(navigator.userAgent),S=/m\.yohobuy\.com/i.test(document.domain),N=/feature\.yoho\.cn/i.test(document.domain)||/activity\.yoho\.cn/i.test(document.domain),U=["m.yohobuy.com/brands","m.yohobuy.com/passport"],I=i(),O={ak:"",cd:I.cid,vd:(new Date).getTime()+I.cid,ud:"",rf:document.referrer,ckf:I.isNew},k=m.flashChecker(),R={sr:window.screen.width+"x"+window.screen.height,wr:window.screen.availWidth+"x"+window.screen.availHeight,sd:window.screen.colorDepth,ln:window.navigator.language?window.navigator.language:window.navigator.browserLanguage,sy:window.navigator.platform,ce:window.navigator.cookieEnabled,fv:k.f?k.v:0},C=function(){},D=document.createElement("div");document.body.insertBefore(D,document.body.firstChild);var M=function(e,t,n,i,r,s){window.qs=m.queryString(),O.ak=n,b.sv=t,O.ud=i||"",O.ts=(new Date).getTime();var u=window.qs.yh_channel||m.getChannel();if(u&&(b.param=JSON.stringify({C_ID:u})),h("_yasgeo")){var f=h("_yasgeo").split(",");O.la=f[0],O.lo=f[1],h("_yasgeo",null,{path:"/",domain:v.yasDomain,expires:73e3})}var g=(new Date).getTime(),A=null,x=!1;if(b.ft=g-e,w.addEventHandler(window,"load",function(t){var n=(new Date).getTime();b.fst=n-e,w.removeEventHandler(window,"load",arguments.callee),window.clearTimeout(A),x||o()}),A=window.setTimeout(function(){b.fst=0,b.fse=">3s",x=!0,o()},3e3),r&&m.getGeo(function(e,t){e&&h("_yasgeo",e+","+t,{path:"/",domain:y,expires:73e3})}),p(),l(),d(),c(),s&&s[0])for(var E=0,S=s.length;E<S;E++)s[E].setAttribute("yoho_index",E+1);else w.addEventHandler(document,"click",function(e){e=e||window.event;var t=e.target||e.srcElement;if(t&&("A"===t.nodeName||"IMG"===t.nodeName&&"A"===t.parentNode.nodeName)){var n=a(e),o=n.x+","+n.y+","+e.type,i=t.getAttribute("yoho_index")||t.parentNode.getAttribute("yoho_index");i&&(o+=","+i),h("_yasmp",o,{path:"/",domain:y,expires:73e3})}ix=0})},B=function(){var e=document.getElementById("mini-app-dialog-bg"),t=document.getElementById("mini-app-dialog");e&&t&&(t.style.display="block"===t.style.display?"none":"block",e.style.display=t.style.display)},T=0;if(M.add=function(e,t,n,o,i){T>3?g.imgSend(h("_yasev"),function(){h("_yasev",null,{path:"/",domain:v.yasDomain,expires:73e3}),T=0,u(e,t,n,o,i)}):u(e,t,n,o,i)},M.sendMouseEvent=function(e,t){e=e||window.event;var n=a(e);if(t){var o={x:n.x,y:n.y,et:e.type},i=m.merge(b,O);i=m.merge(i,R),i=m.merge(i,o);var r=m.genParam(i);g.imgSend(r,function(){})}else h("_yasmp",n.x+","+n.y+","+e.type,{path:"/",domain:y,expires:73e3})},M.sendCustomInfo=function(e,t,n){if(window.appBaseLogs&&e.appop)return e.op=e.appop,M.sendAppLogs(e,!0);if(delete e.appop,e.ts=(new Date).getTime(),t){var o=m.merge(b,O);o=m.merge(o,R),o=m.merge(o,e);var i=s();i&&(o=m.merge(o,i));var r=m.genParam(o);g.imgSend(r,n)}else{var a=JSON.stringify(e);h("_yascustjson",a,{path:"/",domain:y,expires:73e3})}},M.sendAppLogs=function(e,t){if(window.appBaseLogs){var n=JSON.parse(e.param);n.F_URL&&(n.F_URL=decodeURIComponent(n.F_URL));var o=window.appBaseLogs.events[0];o.abtype&&(n.AB_TYPE=o.abtype);var i=m.merge(o,{ts:(new Date).getTime().toString(),indx:++window.indx,op:e.appop,param:n}),r=m.merge(window.appBaseLogs,{events:[i]});g.appSend("_mlogs="+encodeURIComponent(JSON.stringify(r))),window._yasloaded=!0,t&&(window.isandroidyas?window.prompt(JSON.stringify({method:"set.analyticEventIndex",arguments:{indx:window.indx}})):window.yohoInterface.triggerEvent(C,C,{method:"set.analyticEventIndex",arguments:{indx:window.indx}}))}},navigator.userAgent.indexOf("YohoBuy-android-yas")>-1){window.isandroidyas=!0;var F=window.prompt(JSON.stringify({method:"get.analyticAppData"}));f(JSON.parse(F||"{}"))}else w.addEventHandler(document,"deviceready",function(e){window._yasloaded=!1;for(var t=[],n=document.getElementsByTagName("a"),o=0;o<n.length;o++){var i=n[o].getAttribute("href");!i||/^#.*$/.test(i)||/^javascript.*$/i.test(i)||t.push(i)}w.addEventHandler(document,"click",function(e){if(window.originUrl){e=e||window.event;var t=e.target||e.srcElement;if(t=m.closest(t,"a")){var n={C_ID:window.qs.yh_channel||m.getChannel()||1,PAGE_URL:window.originUrl,PAGE_NAME:decodeURI(window.qs.title||document.title),F_URL:t.getAttribute("href")},o=t.getAttribute("fp");o&&(o=JSON.parse(o),n.F_ID=o.F_ID,n.F_NM=o.F_NM,n.F_INDEX=o.F_INDEX,n.I_INDEX=o.I_INDEX,n.I_NM=o.I_NM||""),M.sendAppLogs({appop:"YB_H5_PAGE_FLR_C",param:JSON.stringify(n)},!0)}}}),window.yohoInterface.triggerEvent(function(e){f(e,t)},C,{method:"get.analyticAppData"});var r=setInterval(function(){window._yasloaded&&(clearInterval(r),window.yohoInterface.triggerEvent(C,C,{method:"set.analyticEventIndex",arguments:{indx:window.indx}}))},500)});e.exports=M}]);
\ No newline at end of file
... ...
... ... @@ -253,7 +253,7 @@ const processArticleDetail = (articleContent, isApp, gender, isWeixin, isqq, isW
let newText = '';
if (isMip) {
let mipHtml = mipUtils.process(value.text.data.text, index);
let mipHtml = mipUtils.process(value.text.data.text, {prefix: index});
newText = mipHtml.mipHtml;
localStyle.push(mipHtml.css);
... ...