Authored by shuaiguo

Merge branch 'release/6.9.9' into 'master'

Release/6.9.9



See merge request !11
... ... @@ -49,14 +49,22 @@ class featureModel extends global.yoho.BaseModel {
_.forEach(result, item => {
_.get(item, 'data.product_list', []).forEach(function(val) {
var obj = {
producturl: `//m.yohobuy.com/product/${val.product_skn}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${val.product_skn}","from_page_name":"${yasProcess.getPname(ctx.req)}","from_page_param":"${_.get(ctx,'req.url', '')}"}}`, // eslint-disable-line
let productURL = `//m.yohobuy.com/product/${val.product_skn}.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${val.product_skn}","from_page_name":"${yasProcess.getPname(ctx.req)}","from_page_param":"${_.get(ctx,'req.url', '')}"}}`; // eslint-disable-line
if (val.collage_price && val.collage_activity_id) {
productURL = `//m.yohobuy.com/activity/group/detail?activityId=${val.collage_activity_id}&productSkn=${val.product_skn}&openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"${val.product_skn}","activity_id":"${val.collage_activity_id}","activity_type":"groupPurchase"}}`; // eslint-disable-line
}
let obj = {
producturl: productURL,
productimg: helpers.image(val.default_images, 213, 284, 2, 60).replace('quality/80', 'quality/60'), // eslint-disable-line
productname: val.product_name,
vipprice: val.vip_price,
saleprice: val.sales_price,
marketprice: val.sales_price === val.market_price ? '' : val.market_price,
brandname: val.brand_name,
collageprice: val.collage_price,
collage_activity_id: val.collage_activity_id,
product_skn: val.product_skn,
product_price_plan_list: _.sortBy(val.product_price_plan_list, o => {
return +o.show_begin_time;
... ...
... ... @@ -32,18 +32,31 @@
{{#if conf.priceBgImage}}
<a class="second-part">
<div class="new-brand-div" style="top: 0;">
{{#isEqualOr conf.showSalePrice '1'}}
<div class="new-price"
{{#if collageprice}}
<div class="new-price collage-price"
style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}{{#if
conf.priceFontColor}}color:{{conf.priceFontColor}};{{/if}}; text-align: left;">
<span class="sale-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{saleprice}}</span>
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{collageprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{else}}
{{#isEqualOr conf.showSalePrice '1'}}
<div class="new-price"
style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}{{#if
conf.priceFontColor}}color:{{conf.priceFontColor}};{{/if}}; text-align: left;">
<span class="sale-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{/if}}
</div>
<img class="price-img" src="{{image2 conf.priceBgImage q=85}}">
</a>
... ...
... ... @@ -11,18 +11,31 @@
{{#if conf.priceBgImage}}
<a class="second-part" style="position: absolute; bottom: 0; left: 0; right: 0;">
<div class="new-brand-div" style="top: 0;">
{{#isEqualOr conf.showSalePrice '1'}}
<div class="new-price"
{{#if collageprice}}
<div class="new-price collage-price"
style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}{{#if
conf.priceFontColor}}color:{{conf.priceFontColor}};{{/if}}; text-align: left;">
<span class="sale-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{saleprice}}</span>
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{collageprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{else}}
{{#isEqualOr conf.showSalePrice '1'}}
<div class="new-price"
style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}{{#if
conf.priceFontColor}}color:{{conf.priceFontColor}};{{/if}}; text-align: left;">
<span class="sale-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.priceFontColor}}
style="color:{{conf.priceFontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{/if}}
</div>
<img class="price-img" src="{{image2 conf.priceBgImage q=85}}">
</a>
... ...
... ... @@ -28,20 +28,30 @@
{{#if conf.brandImg}}
<a class="second-part">
<div class="new-brand-div">
{{#isEqualOr conf.showSalePrice '1'}}
<div class="new-price" style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}{{#if conf.priceFontColor}}color:{{conf.priceFontColor}};{{/if}}">
<span class="sale-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if collageprice}}
<div class="new-price collage-price" style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}{{#if conf.priceFontColor}}color:{{conf.priceFontColor}};{{/if}}">
<span class="sale-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{collageprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{#isEqualOr conf.showVipPrice '1'}}
<div class="vipprice" style="{{#if conf.vipFontColor}}color:{{conf.vipFontColor}};{{/if}}{{#if conf.vipBgColor}}background:{{conf.vipBgColor}};{{/if}}">
<span class="vip-price-text">VIP价</span>
<span class="vip-price-val">¥{{vipprice}}</span>
</div>
{{/isEqualOr}}
{{else}}
{{#isEqualOr conf.showSalePrice '1'}}
<div class="new-price" style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}{{#if conf.priceFontColor}}color:{{conf.priceFontColor}};{{/if}}">
<span class="sale-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{#isEqualOr conf.showVipPrice '1'}}
<div class="vipprice" style="{{#if conf.vipFontColor}}color:{{conf.vipFontColor}};{{/if}}{{#if conf.vipBgColor}}background:{{conf.vipBgColor}};{{/if}}">
<span class="vip-price-text">VIP价</span>
<span class="vip-price-val">¥{{vipprice}}</span>
</div>
{{/isEqualOr}}
{{/if}}
</div>
<img class="brand-img" src="{{image2 conf.brandImg q=85}}">
</a>
... ...
... ... @@ -26,20 +26,29 @@
<p class="product-name">{{productname}}</p>
{{/isEqualOr}}
<div class="product-detail-text">
{{#isEqualOr conf.showSalePrice '1'}}
<div class="price" style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}">
<span class="sale-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if collageprice}}
<div class="price collage-price" style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}">
<span class="sale-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{collageprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{#isEqualOr conf.showVipPrice '1'}}
<div class="vipprice" style="{{#if conf.vipFontColor}}color:{{conf.vipFontColor}};{{/if}}{{#if conf.vipBgColor}}background:{{conf.vipBgColor}};{{/if}}">
<span class="vip-price-text">VIP价</span>
<span class="vip-price-val">¥{{vipprice}}</span>
</div>
{{/isEqualOr}}
{{else}}
{{#isEqualOr conf.showSalePrice '1'}}
<div class="price" style="{{#if conf.salePriceBgColor}}background:{{conf.salePriceBgColor}};{{/if}}">
<span class="sale-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if marketprice}}
<span class="market-price"{{#if conf.fontColor}} style="color:{{conf.fontColor}};" {{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{#isEqualOr conf.showVipPrice '1'}}
<div class="vipprice" style="{{#if conf.vipFontColor}}color:{{conf.vipFontColor}};{{/if}}{{#if conf.vipBgColor}}background:{{conf.vipBgColor}};{{/if}}">
<span class="vip-price-text">VIP价</span>
<span class="vip-price-val">¥{{vipprice}}</span>
</div>
{{/isEqualOr}}
{{/if}}
</div>
</a>
{{#if conf.brandImg}}
... ...
... ... @@ -20,14 +20,23 @@
{{/isEqualOr}}
</div>
<div class="goods-info">
{{#isEqualOr ../showSalePrice '1'}}
<div class="pro-price {{#if ../brandImg}}pro-price-cover{{/if}}" style="{{#if ../salePriceBgColor}}background:{{../salePriceBgColor}};{{/if}}{{#if ../priceFontColor}}color:{{../priceFontColor}};{{/if}}">
<span class="sale-price"{{#if ../fontColor}} style="color:{{../fontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if collageprice}}
<div class="pro-price collage-price {{#if ../brandImg}}pro-price-cover{{/if}}" style="{{#if ../salePriceBgColor}}background:{{../salePriceBgColor}};{{/if}}{{#if ../priceFontColor}}color:{{../priceFontColor}};{{/if}}">
<span class="sale-price"{{#if ../fontColor}} style="color:{{../fontColor}};" {{/if}}>¥{{collageprice}}</span>
{{#if marketprice}}
<span class="market-price" {{#if ../fontColor}} style="color:{{../fontColor}};"{{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{else}}
{{#isEqualOr ../showSalePrice '1'}}
<div class="pro-price {{#if ../brandImg}}pro-price-cover{{/if}}" style="{{#if ../salePriceBgColor}}background:{{../salePriceBgColor}};{{/if}}{{#if ../priceFontColor}}color:{{../priceFontColor}};{{/if}}">
<span class="sale-price"{{#if ../fontColor}} style="color:{{../fontColor}};" {{/if}}>¥{{saleprice}}</span>
{{#if marketprice}}
<span class="market-price" {{#if ../fontColor}} style="color:{{../fontColor}};"{{/if}}>¥{{marketprice}}</span>
{{/if}}
</div>
{{/isEqualOr}}
{{/if}}
{{#isEqualOr ../showPrdName '1'}}
<div class="product-name">
... ...
... ... @@ -49,7 +49,7 @@ const domains = {
module.exports = {
app: 'h5',
appVersion: '6.6.0', // 调用api的版本
appVersion: '6.8.9', // 调用api的版本
appName: 'yohobuywap-node-activity',
port: 6001,
siteUrl: '//m.yohobuy.com',
... ... @@ -57,7 +57,7 @@ module.exports = {
testCode: 'yoho4946abcdef#$%&!@',
domains: domains,
yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc',
// yohoVerifyUdid: 'ca5c462a-e28b-407d-8061-5e204398e3cc',
signExtend: {
business_line: 'yohobuy'
},
... ... @@ -134,7 +134,7 @@ module.exports = {
notifyUrl: domains.service + 'payment/weixin_notify',
},
geetestJs: '//static.geetest.com/static/tools/gt.js',
jsSdk: '//cdn.yoho.cn/js-sdk/1.3.22/jssdk.js',
jsSdk: '//cdn.yoho.cn/js-sdk/1.3.23/jssdk.js',
redis: {
connect: {
host: '192.168.102.49',
... ...
{
"name": "yohobuywap-node-activity",
"version": "6.9.9-5",
"version": "6.9.9-10beta1",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -17,7 +17,7 @@ let isWechat = /micromessenger/i.test(navigator.userAgent);
let isApp = /yohobuy/i.test(navigator.userAgent);
let isWechatMiniProgram = /miniprogram/i.test(navigator.userAgent);
let app_info = {
uid: '0',
uid: 0,
session_key: '',
app_version: '',
client_type: ''
... ... @@ -90,10 +90,11 @@ function hideShare() {
}
function getParams() { // 获取登录相关信息
let app_uid = cookie.get('app_uid') || qs.uid || app_info.uid;
let app_session_key = cookie.get('app_session_key') || qs.session_key || app_info.session_key;
let app_version = cookie.get('app_version') || qs.app_version || '';
let app_client_type = cookie.get('app_client_type') || qs.app_client_type || '';
let app_uid = parseInt(app_info.uid, 10) || qs.uid || cookie.get('app_uid');
let app_session_key = app_info.session_key || qs.session_key || cookie.get('app_session_key');
let app_version = qs.app_version || cookie.get('app_version') || '';
let app_client_type = qs.app_client_type || cookie.get('app_client_type') || '';
if (isApp) {
if (/android/i.test(navigator.userAgent)) {
... ... @@ -129,9 +130,19 @@ function getCoupon() { // 分享成功后领券
if (result.code === 200) {
showWebShareTips(result.message);
} else if (result.code === 401) {
if (result.message) {
if (result.message.indexOf('登录') >= 0) {
showWebShareTips(result.message);
} else {
showWebShareTips('您已领取过该优惠券');
}
} else {
showWebShareTips('您已领取过该优惠券');
}
} else if (result.code === 501) {
showWebShareTips('您已领取过该优惠券');
} else if (result.code === 402) {
showWebShareTips('登录信息异常');
showWebShareTips('登录信息异常,请退出重新登录');
} else {
showWebShareTips(result.message);
}
... ... @@ -313,6 +324,21 @@ function initWebShare() {
if (appInterface) {
initWebShareButtons('app');
}
appInterface.triggerEvent(function(uid) {
if (parseInt(uid, 10)) {
app_info.uid = uid;
}
}, function() {}, {
method: 'get.uid'
});
appInterface.triggerEvent(function(sid) {
if (sid) {
app_info.session_key = sid;
}
}, function() {}, {
method: 'get.sessionId'
});
});
$('.web-share-buttons-container .button-download').hide();
} else if (isWechatMiniProgram) {
... ... @@ -401,7 +427,6 @@ function ceXuanFuInit() {
$('#sidebar').load(href + pageid + '.html', function() {
$('.sidebar-img').click(function() {
$('.sidebar').show();
$('.sidebar').show();
});
$('.sidebar').click(function(e) {
var $cur = $(e.target);
... ...
... ... @@ -95,7 +95,7 @@ let loginUrl = function() {
}
});
} else if (enviroment === 'pc') {
url = 'https://www.yoho/signin.html?refer=' + encodeURIComponent(location.href);
url = 'https://www.yohobuy.com/signin.html?refer=' + encodeURIComponent(location.href);
} else if (enviroment === 'miniprogram') {
url = '/pages/userCenter/userCenter';
} else {
... ...
... ... @@ -5,6 +5,8 @@
*/
let $ = require('yoho-jquery');
let yohoCookie = require('yoho-cookie');
const lazyLoad = require('yoho-jquery-lazyload');
let $footer = $('#yoho-footer'),
$yohoPage = $('.yoho-page'),
... ... @@ -25,6 +27,8 @@ let _ChannelVary = {
require('./common/share');
lazyLoad($('img.lazy'));
function cookie(name) {
// var re = new RegExp(name + '=([^;$]*)', 'i'),
... ...