Authored by 郭成尧

Merge remote-tracking branch 'origin/master' into feature/vip2

... ... @@ -56,6 +56,11 @@ app.enable('trust proxy');
app.disable('x-powered-by');
// docker验证项目是否正常发布
app.use('/node/status.html', (req, res) => {
return res.status(204).end();
});
app.use((req, res, next) => {
req.url = stringProcess.decodeURIComponent(req.url) || '/404';// 错误的网址编码重定向404
req.isApmReport = _.get(req.app.locals, 'wap.open.bughd', false); // 把错误上报的开关绑定到上下文,node-lib 库要使用
... ... @@ -171,11 +176,6 @@ try {
app.use(downloadBar());
app.use(riskManagement());
// docker验证项目是否正常发布
app.use('/node/status.html', (req, res) => {
return res.status(204).end();
});
require('./dispatch')(app);
app.all('*', errorHanlder.notFound()); // 404
... ...
<div class="trend-c no-pb share-activity" id="no-download">
<div class="package-top">
<span></span>
预约后需到店付款
</div>
{{# list}}
{{> trend/activity}}
{{/ list}}
... ...
... ... @@ -5,10 +5,6 @@
<span class="scroll-item" id={{id}}>{{name}}</span>
{{/typeList}}
</div>
<div class="package-top">
<span></span>
预约后需到店付款
</div>
<div class="class-c">
{{# list}}
{{> trend/class}}
... ...
... ... @@ -2,10 +2,6 @@
{{> trend/adviser-info}}
{{#if packageList}}
<div class="big-title">造型套餐</div>
<div class="package-top">
<span></span>
预约后需到店付款
</div>
{{/if}}
<div>
{{# packageList}}
... ...
... ... @@ -22,10 +22,6 @@
{{/ cutterList}}
</div>
<div class="big-title">造型套餐</div>
<div class="package-top">
<span></span>
预约后需到店付款
</div>
<div>
{{# packageList}}
{{> trend/cutter-package}}
... ...
... ... @@ -36,10 +36,6 @@
<span>推荐套餐</span>
</div>
<div class="tab-item">
<div class="package-top">
<span></span>
预约后需到店付款
</div>
<ul class="package">
{{# packageList}}
{{> trend/package}}
... ...
... ... @@ -11,6 +11,7 @@ const moment = require('moment');
const mRoot = '../models';
const headerModel = require('../../../doraemon/models/header');
const seckillModel = require(`${mRoot}/seckill`);
const _ = require('lodash');
let headerData = headerModel.setNav({
navTitle: '秒杀活动',
... ... @@ -18,6 +19,16 @@ let headerData = headerModel.setNav({
});
/**
* hotfix ios 6.5.5 版本隐藏设置提醒按钮
*/
const _iosHideRemindBtn = (products) => {
return _.map(products, goods => {
goods.hideRemind = true;
return goods;
});
};
/**
* [时间缺0补0]
*/
const _timeFormat = (tick) => {
... ... @@ -228,6 +239,10 @@ const indexData = (req, res, next) => {
return fetchProductList(activityInfo, uid).then((resultProducts) => {
result.products = resultProducts;
if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') {
result.products = _iosHideRemindBtn(resultProducts);
}
res.json(result);
});
});
... ... @@ -256,6 +271,9 @@ const getProductList = (req, res, next) => {
};
return fetchProductList(activityInfo, uid).then(resultProducts => {
if (/^6.5.5/.test(req.query.app_version) && req.query.client_type === 'iphone') {
resultProducts = _iosHideRemindBtn(resultProducts);
}
res.json({products: resultProducts});
}).catch(error => {
logger.error(error);
... ...
... ... @@ -45,7 +45,8 @@ const PATH_WHITE_LIST = [
'/product/shop/hfxRaNY27L.txt',
'/product/hfxRaNY27L.txt',
'/.well-known/apple-app-site-association',
'/service/sitemap.xml'
'/service/sitemap.xml',
'/node/status.html'
];
const limiter = (rule, policy, context) => {
... ...
... ... @@ -19,7 +19,7 @@ const _getClientIp = req => {
if (remoteIp.indexOf(',') > 0) {
let arr = remoteIp.split(',');
remoteIp = _.trim(arr[arr.length - 1]);
remoteIp = _.trim(arr[0]);
}
if (_.startsWith(remoteIp, '10.66.')) {
... ...
{
"name": "yohobuywap-node",
"version": "6.5.52",
"version": "6.5.53",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -86,7 +86,7 @@
"xml2js": "^0.4.19",
"yoho-express-session": "^2.0.0",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "=0.6.10",
"yoho-node-lib": "=0.6.12",
"yoho-zookeeper": "^1.0.9"
},
"devDependencies": {
... ...
... ... @@ -4,7 +4,7 @@
<span class="tag">{{tag}}</span>
<img src="{{image2 image mode=2 q=60}}">
<div class="info">
<span class="name">{{name}}</span>
<span class="name eps">{{name}}</span>
{{#if free}}
<span class="free">免费</span>
{{else}}
... ...
... ... @@ -11,6 +11,7 @@ let $ = require('yoho-jquery'),
loading = require('plugin/loading'),
lazyload = require('yoho-jquery-lazyload'),
tip = require('plugin/tip');
let qs = require('yoho-qs');
loading.init($(document.body));
... ... @@ -243,16 +244,22 @@ seckillObj = {
refreshProductList: function(activityId, startTime) {
let self = this;
let url = '/product/seckill/get-product-list';
let reqData = {
uid: yoho.isLogin(), // only app use;
activityId: activityId,
startTime: startTime
};
if (qs.app_version && qs.client_type) {
reqData.app_version = qs.app_version;
reqData.client_type = qs.client_type;
}
loading.showLoading();
self.el.$navList.toggleClass('fix-top', false);
$.ajax({
url: url,
data: {
uid: yoho.isLogin(), // only app use;
activityId: activityId,
startTime: startTime
},
data: reqData,
success: function(data) {
data = $.extend(data, {isApp: yoho.isApp});
$('.product-list').html(self.listTemplate(data));
... ...