Authored by zhangxiaoru

merge

... ... @@ -6,7 +6,7 @@
'use strict';
const service = global.yoho.ServiceAPI;
const service = global.yoho.StoreAPI;
const moment = require('moment');
// 格式年月日
... ...
... ... @@ -21,6 +21,9 @@ const index = (req, res) => {
signurl: helpers.urlFormat('/signin.html')
};
// 唤起 APP 的路径
res.locals.appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.shopcart","params":{}}';
res.render('index', Object.assign(pageData, {
title: '购物车',
module: 'cart',
... ...
... ... @@ -29,6 +29,9 @@ let index = (req, res, next) => {
};
let channel;
// 唤起 APP 的路径
res.locals.appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.attention","params":{"actiontype":"1"}}';
if (!req.query.channel) {
channel = '1';
} else if (!typeLib.channels[req.query.channel]) {
... ...
... ... @@ -7,6 +7,8 @@ const footerModel = require('../../../doraemon/models/footer_tab'); // 底部tab
const helpers = global.yoho.helpers;
let index = (req, res, next) => {
// 唤起 APP 的路径
res.locals.appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.attention","params":{"actiontype":"0"}}';
cateModel.getCateData(req.yoho.channel).then((result) => {
res.render('cate', {
... ...
... ... @@ -210,6 +210,10 @@ const index = (req, res, next) => {
res.set('Cache-Control', 'no-cache');
}
}
// 唤起 APP 的路径
res.locals.appPath = `yohobuy://yohobuy.com/goapp?openby:yohobuy= {"action":"go.guangchannel","params":{"id":${param.type}}}`;
res.render('guang', Object.assign(responseData, result, {
localCss: true
}));
... ...
... ... @@ -26,6 +26,9 @@ exports.index = (req, res, next) => {
let studentSwitch = !_.get(req.app.locals.wap, 'user.removeStudentIdentification', true);
// 唤起 APP 的路径
res.locals.appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy= {"action":"go.mine"}';
indexModel.index(params).then(result => {
if (result) {
res.render('home', Object.assign(result, {
... ...
... ... @@ -69,6 +69,9 @@ const shop = {
params.brand = brandId;
// 唤起 APP 的路径
res.locals.appPath = `yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.brand","params":{"brand_id":"${brandId}"}}`;
let searchParam = Object.assign({
isApp: req.yoho.isApp,
brand: brandId,
... ...
... ... @@ -17,6 +17,7 @@ const domains = {
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
global: 'http://api-global.yohobuy.com',
store: 'http://192.168.102.210:8080/portal-gateway/',
// liveApi: 'http://api.live.yoho.cn/',
// singleApi: 'http://single.yoho.cn/',
... ... @@ -114,6 +115,7 @@ if (isProduction) {
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/',
global: 'http://api-global.yohobuy.com',
store: '', // 线上域名尚未确定
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/',
imSocket: 'wss://imsocket.yohobuy.com:443',
... ... @@ -162,7 +164,8 @@ if (isProduction) {
domains: {
api: process.env.TEST_API || 'http://api-test1.yohops.com:9999/',
service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/',
global: process.env.TEST_GLOBAL || 'http://global-test-soa.yohops.com:9999',
global: process.env.TEST_GLOBAL || 'http://global-test-soa.yohops.com:9999/',
store: process.env.TEST_STORE || 'http://192.168.102.210:8080/portal-gateway/',
liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',
singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/',
imSocket: process.env.TEST_IM_SOCKET || 'ws://socket.yohobuy.com:10240',
... ...
... ... @@ -22,6 +22,9 @@
</span>
{{/if}}
</p>
{{#if appearDate}}
<span class="appear-date">上市期:{{appearDate}}</span>
{{/if}}
<p class="row price-wrap">
<span class="price">
¥{{price}}
... ... @@ -29,9 +32,6 @@
<span class="count">
×{{count}}
</span>
{{#if appearDate}}
<span class="appear-date">上市期:{{appearDate}}</span>
{{/if}}
</p>
</div>
</div>
... ...
{
"name": "m-yohobuy-node",
"version": "5.6.4",
"version": "5.7.0",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -26,7 +26,7 @@
"body-parser": "^1.16.1",
"captchapng": "0.0.1",
"cheerio": "^0.22.0",
"client-sessions": "^0.7.0",
"client-sessions": "^0.8.0",
"compression": "^1.6.2",
"connect-memcached": "^0.2.0",
"connect-multiparty": "^2.0.0",
... ... @@ -37,7 +37,7 @@
"lodash": "^4.17.4",
"memory-cache": "^0.1.6",
"moment": "^2.18.1",
"oneapm": "^1.2.20",
"oneapm": "^2.0.0",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"passport-qq": "0.0.3",
... ... @@ -45,20 +45,20 @@
"passport-strategy": "^1.0.0",
"passport-weixin": "^0.1.0",
"request": "^2.81.0",
"request-promise": "^3.0.0",
"request-promise": "^4.2.0",
"uuid": "^3.0.1",
"xml2js": "^0.4.17",
"yoho-express-session": "^2.0.0",
"yoho-md5": "^2.0.0",
"yoho-node-lib": "=0.2.22",
"yoho-node-lib": "=0.2.25",
"yoho-zookeeper": "^1.0.8"
},
"devDependencies": {
"autoprefixer": "^6.7.4",
"babel-core": "^6.24.1",
"babel-loader": "^6.4.1",
"babel-loader": "^7.0.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.3.3",
"babel-preset-env": "^1.4.0",
"css-loader": "^0.28.0",
"cssnano": "^3.10.0",
"eslint": "^3.19.0",
... ... @@ -66,7 +66,7 @@
"eslint-loader": "^1.7.1",
"eslint-plugin-html": "^2.0.1",
"extract-text-webpack-plugin": "^2.1.0",
"handlebars-loader": "^1.4.0",
"handlebars-loader": "^1.5.0",
"happypack": "^3.0.3",
"husky": "^0.13.3",
"nodemon": "^1.11.0",
... ... @@ -78,24 +78,24 @@
"postcss-import": "^9.1.0",
"postcss-loader": "^1.3.1",
"postcss-position": "^0.5.0",
"postcss-pxtorem": "^4.0.0",
"postcss-pxtorem": "^4.0.1",
"postcss-scss": "^0.4.1",
"postcss-short": "^3.0.3",
"postcss-sprites": "^4.2.0",
"postcss-sprites": "^4.2.1",
"postcss-use": "^2.3.0",
"precss": "^1.4.0",
"shelljs": "^0.7.6",
"style-loader": "^0.16.1",
"style-loader": "^0.17.0",
"stylelint": "^7.10.1",
"stylelint-config-yoho": "^1.2.8",
"stylelint-formatter-table": "^1.0.2",
"stylelint-processor-html": "^1.0.0",
"stylelint-webpack-plugin": "^0.7.0",
"vue": "^2.2.6",
"vue-loader": "^11.3.4",
"vue-template-compiler": "^2.2.6",
"webpack": "^2.3.3",
"webpack-dev-server": "^2.4.2",
"vue": "^2.3.0",
"vue-loader": "^12.0.2",
"vue-template-compiler": "^2.3.0",
"webpack": "^2.4.1",
"webpack-dev-server": "^2.4.5",
"webpack-uglify-parallel": "^0.1.3",
"yoho-cookie": "^1.2.0",
"yoho-fastclick": "^1.0.6",
... ...
... ... @@ -27,7 +27,7 @@ _.mergeWith(baseConfig, {
}]
},
devServer: {
host: '0.0.0.0',
host: devInfo.host,
port: devInfo.port,
publicPath: devInfo.publicPath,
contentBase: [path.join(__dirname, './bundle/'), path.join(__dirname, '../')],
... ...
... ... @@ -235,7 +235,9 @@ function pullPicBig(cIndex) {
$('.swiper-pagination-bullet:eq(' + cIndex + ')').click();
mySwiper.slideTo(cIndex, 1000, false);
$('.big-pic').show();
if ($('.share-photography').length === 0) {
$('.foot-btn').hide();
}
$('.swiper-slide img').each(
function() {
let newTop = (w_height - $(this).height()) / 2;
... ... @@ -298,7 +300,10 @@ $(
}
if ($('.clearCookie').length > 0) {
$('.foot-btn').on('click', function() {
clearCookieArr(3);
chosenDefault();
});
}
// 默认选中菜单
... ...
... ... @@ -360,6 +360,8 @@
.appear-date {
color: #f00;
float: right;
margin-right: 30px;
}
}
... ...