Authored by 周少峰

Merge branch 'feature/https' into gray

{{{content}}}
<div class="qrcode-activity" data-id={{id}}>
<i class="iconfont close-btn">&#xe6ee;</i>
<div id="qrcode-img" class="qrcode-img" data-url="http://union.yoho.cn/union/app-downloads.html"></div>
<div id="qrcode-img" class="qrcode-img" data-url="https://union.yoho.cn/union/app-downloads.html"></div>
<p>扫一扫,手机逛更方便</p>
</div>
<!-- updateAt {{updateTime}} -->
... ...
<div class="yoho-dialog cart-together-goods togethor"
data-role=""
style="margin-top: -374.5px; margin-left: -350px; display:none;">
<span class="close">
<i class="iconfont">&#xe60d;</i>
</span>
<div class="content">
<div class="detail-body">
<div class="detail-goods">
<div class="detail-bigpic">
<div class="bigpic">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="piclist">
<span class="pre"></span>
<div class="con">
<ul>
<li class="active"><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
</ul>
</div>
<span class="next"></span>
</div>
</div>
<div class="detail-bigpic none">
<div class="bigpic">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="bigpic none">
<img src="">
</div>
<div class="piclist">
<span class="pre"></span>
<div class="con">
<ul>
<li class="active"><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
<li><img src=""></li>
</ul>
</div>
<span class="next"></span>
</div>
</div>
<div class="detail-info">
<div class="title">
<h2>哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈{{name}}</h2>
</div>
<div class="price">
<span class="newprice">现价:<b class="promotion-price">¥7777{{salePrice}}</b></span>
<span class="activityprice">活动价:<b class="promotion-price">¥5555{{marketPrice}}</b></span>
</div>
<div class="order">
<dl>
<dd class="color-box">选颜色:</dd>
<dt>
<div class="color-box">
<ul>
<li class="color active">
<p class="{{#if focus}}atcive{{/if}}"><span></span><img src=""></p>
<span>{{name}}</span>
</li>
<li class="color">
<p class="{{#if focus}}atcive{{/if}}"><span></span><img src=""></p>
<span>{{name}}</span>
</li>
</ul>
</div>
</dt>
</dl>
<dl>
<dd class="show-size-box">选尺码:</dd>
<dt>
<div class="show-size-box">
<span data-sku="{{sku}}" data-num="{{num}}" class="disabled">40码{{name}}</span>
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
<span data-sku="{{sku}}" data-num="{{num}}">40码{{name}}</span>
</div>
<p class="size-p">内长&nbsp;25.5com</p>
</dt>
</dl>
<dl>
<dd>选件数:</dd>
<dt>
<div class="amount-wrapper">
<input type="text" id="num" class="num" value="1" readonly="readonly">
<a class="amount cut"><i class="iconfont">&#xe6c0;</i></a>
<a class="amount add"><i class="iconfont">&#xe6c1;</i></a>
</div>
</dt>
</dl>
</div>
<div class="submit">
<button class="btn-red"><i class="addCart iconfont">&#xe600;</i>添加到购物车</button>
<button class="btn-fav-count"><i class="fav-count iconfont">&#xe68f;</i>收藏商品</button>
</div>
</div>
<div class="detail-size">
<h3>尺码信息(单位:厘米)</h3>
<table>
<thead>
<tr>
<th width="{{width}}">吊牌吃吗</th>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
<th width="{{width}}">吊牌吃吗
</td>
</tr>
</thead>
<tbody>
<tr>
<td>6666{{.}}</td>
</tr>
<tr>
<td>4444{{.}}</td>
</tr>
</tbody>
</table>
<div class="size-info">
※ 以上尺寸为实物实际测量,因测量方式不同会有略微误差,相关数据仅作参考,以收到实物为准。
</div>
</div>
</div>
</div>
</div>
</div>
... ... @@ -151,7 +151,7 @@ const _footerBanner = co(function * () {
const CODE = '20110609-152143';
let banner = yield indexApi.getByNodeContent(CODE);
return _.get(banner, 'data', '').replace('http://', '//');
return _.get(banner, 'data', '').replace(/http:\/\//g, '//');
});
/**
... ...
... ... @@ -6,7 +6,7 @@
const api = global.yoho.API;
const aes = require('./aes-pwd');
const YOHOBUY_URL = 'http://www.yohobuy.com/';
const YOHOBUY_URL = 'https//www.yohobuy.com/';
/**
* 获取地区数据
... ...
... ... @@ -15,7 +15,7 @@ const indexService = require('./index-service');
*/
const getLeftBannerAsync = (resourceCode) => {
const DEFAULT_VALUE = {
img: 'http://img12.static.yhbimg.com/' +
img: 'https://img12.static.yhbimg.com/' +
'yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190',
url: ''
};
... ...
... ... @@ -7,7 +7,7 @@ const api = require('./user-api');
const helpers = global.yoho.helpers;
const DEFAULT_HEAD_IMG_ICO = 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
const DEFAULT_HEAD_IMG_ICO = 'https://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
/**
* 第三方登录 根据手机号获取用户相关信息
... ...
... ... @@ -149,7 +149,7 @@
<li class="relative clearfix center">
<div>
<a class="download-link"
href="http://www.yohobuy.com/download/app">下载Yoho!Buy有货手机APP</a>
href="//www.yohobuy.com/download/app">下载Yoho!Buy有货手机APP</a>
</div>
</li>
</div>
... ... @@ -157,7 +157,7 @@
<input id="country-code-hide" name="countryCode" type="hidden" value="{{countryCode}}">
<input id="captcha-sms-token-hide" name="token" type="hidden">
<input id="qrcode" name="qrcode" type="hidden" value="http://m.yohobuy.com/signin.html">
<input id="qrcode" name="qrcode" type="hidden" value="https://m.yohobuy.com/signin.html">
<input id="uid" type="hidden">
</div>
... ...
... ... @@ -12,7 +12,7 @@ const service = require(`${mRoot}/detail-service`);
const detailHelper = require(`${mRoot}/detail-helper`);
const moment = require('moment');
const DEFAULT_AVATAR_ICO = 'http://static.yohobuy.com/images/v3/boy.jpg';
const DEFAULT_AVATAR_ICO = 'https://static.yohobuy.com/images/v3/boy.jpg';
const _ = require('lodash');
/**
... ...
... ... @@ -11,7 +11,7 @@ const COOKIE_NAME_BOYS = 'boys';
const COOKIE_DOMAIN = '.yohobuy.com';
// 商品详情页的默认头像
const DEFAULT_AVATAR_ICO = 'http://static.yohobuy.com/images/v3/boy.jpg';
const DEFAULT_AVATAR_ICO = 'https://static.yohobuy.com/images/v3/boy.jpg';
const IMAGE_SERVICE_URL = 'http://head.static.yhbimg.com/yhb-head/';
const setSwitchToCookie = (res) => {
... ...
... ... @@ -743,7 +743,7 @@ const _getSizeData = (sizeInfo) => {
// 测量方式
if (sizeInfo.sizeImage) {
size.sizeImg = sizeInfo.sizeImage;
size.sizeImg = sizeInfo.sizeImage.replace('http://', '//');
}
return size;
... ... @@ -894,7 +894,8 @@ const _getDetailDataBySizeInfo = (sizeInfo) => {
'<img border="0" src=': '<img border="0" class="lazy img-responsive" width="720" height="200" ' +
'src="data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==" ' +
'data-original=',
'.jpg"': '.jpg?imageslim"'
'.jpg"': '.jpg?imageslim"',
'http://': '//'
};
let intro = _.get(sizeInfo, 'productIntroBo.productIntro', '');
... ... @@ -1424,7 +1425,7 @@ const _detailDataPkg = (origin, uid, vipLevel, cookies) => {
result.salePrice :
(result.marketPrice || result.presalePrice)).replace('¥', ''); // 数字
statGoodsInfo.imageUrl = helpers.getForceSourceUrl(result.img);
statGoodsInfo.productUrl = 'http:' + helpers.getUrlBySkc(propOrigin('product_id'));
statGoodsInfo.productUrl = 'https:' + helpers.getUrlBySkc(propOrigin('product_id'));
statGoodsInfo.smallSortId = result.smallSortId;
statGoodsInfo.soldOut = soldOut ? 1 : 0;
... ...
... ... @@ -755,7 +755,7 @@ exports.handleFilterData = (origin, params, total) => {
checked: parseInt(params.color, 10) === parseInt(value.color_id, 10),
href: handleFilterUrl(params, {color: value.color_id}),
name: value.color_name,
rgb: value.color_value ? 'url(' + value.color_value + ')' : '#' + value.color_code
rgb: value.color_value ? 'url(' + value.color_value.replace('http://', '//') + ')' : '#' + value.color_code
};
// 处理颜色选中数据
... ...
/*
* @Author: Targaryen
* @Date: 2016-06-01 09:37:28
* @Last Modified by: Targaryen
* @Last Modified time: 2016-06-06 10:12:19
*/
'use strict';
/**
* 奥莱首页模拟数据
* @return {[type]} [description]
*/
exports.index = () => {
let result = {};
result.banner = [{
href: '#',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
}, {
href: '#',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
}, {
href: '#',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
}];
result.column = [{
href: '#',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
}, {
href: '#',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
}, {
href: '#',
img: 'http://img10.static.yhbimg.com/yhb-img01/2016/05/25/09/01ee927cf2bec307e50dbc437141665090.jpg?imageView2/1/w/{width}/h/{height}'
}];
result.limitedBuy = {
name: '限时嗨购',
topic: [{
href: '#',
img: 'http://img11.static.yhbimg.com/yhb-img01/2016/05/25/11/01d71a4867ac110b1894504da65b5cf596.jpg?imageView2/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
discount: '7.5',
title: '多元化潮流风格',
limit: '1500'
}, {
href: '#',
img: 'http://img11.static.yhbimg.com/yhb-img01/2016/05/25/11/01d71a4867ac110b1894504da65b5cf596.jpg?imageView2/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
discount: '7.5',
title: '多元化潮流风格',
limit: '1500'
}, {
href: '#',
img: 'http://img11.static.yhbimg.com/yhb-img01/2016/05/25/11/01d71a4867ac110b1894504da65b5cf596.jpg?imageView2/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
discount: '7.5',
title: '多元化潮流风格',
limit: '1500'
}],
extra: {
sourceImg: {
href: '#',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/04/13/01/023d062b8384103df7a8dfada98afaf204.jpg?imageView2/1/w/{width}/h/{height}'
},
hotType: {
title: '热销推荐',
classify: [{
href: '#',
name: '上衣'
}, {
href: '#',
name: 'T恤'
}, {
href: '#',
name: '裤子'
}]
},
trendGood: {
title: '潮品推荐',
goods: [{
href: '#',
img: 'http://img13.static.yhbimg.com/goodsimg/2015/08/04/10/02129fcc058455de1615ce770d3a4555a6.jpg?imageView/1/w/{width}/h/{height}',
name: 'Life·After Life 像素风sneaker印花长袖衬衫',
market: '¥260',
sale: '¥203',
discount: '2'
}, {
href: '#',
img: 'http://img13.static.yhbimg.com/goodsimg/2015/08/04/10/02129fcc058455de1615ce770d3a4555a6.jpg?imageView/1/w/{width}/h/{height}',
name: 'Life·After Life 像素风sneaker印花长袖衬衫',
market: '¥260',
sale: '¥203',
discount: '2'
}, {
href: '#',
img: 'http://img13.static.yhbimg.com/goodsimg/2015/08/04/10/02129fcc058455de1615ce770d3a4555a6.jpg?imageView/1/w/{width}/h/{height}',
name: 'Life·After Life 像素风sneaker印花长袖衬衫',
market: '¥260',
sale: '¥203',
discount: '2'
}, {
href: '#',
img: 'http://img13.static.yhbimg.com/goodsimg/2015/08/04/10/02129fcc058455de1615ce770d3a4555a6.jpg?imageView/1/w/{width}/h/{height}',
name: 'Life·After Life 像素风sneaker印花长袖衬衫',
market: '¥260',
sale: '¥203',
discount: '2'
}]
}
}
};
result.nearOver = {
name: '即将结束',
topic: [{
href: '#',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/02/05/08/02bb2c8efb12319cf50f247bae13d60dde.jpg?imageView/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
discount: '7.5',
title: '多元化潮流风格',
limit: '1500'
}, {
href: '#',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/02/05/08/02bb2c8efb12319cf50f247bae13d60dde.jpg?imageView/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
discount: '7.5',
title: '多元化潮流风格',
limit: '1500'
}, {
href: '#',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/02/05/08/02bb2c8efb12319cf50f247bae13d60dde.jpg?imageView/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
discount: '7.5',
title: '多元化潮流风格',
limit: '1500'
}, {
href: '#',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/02/05/08/02bb2c8efb12319cf50f247bae13d60dde.jpg?imageView/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
discount: '7.5',
title: '多元化潮流风格',
limit: '1500'
}]
};
result.goodsBoard = {
goodsMenu: {
title: '最新折扣',
menuList: [{
name: 'T恤',
href: '#',
cur: true
}, {
name: '衬衫',
href: '#'
}, {
name: '休闲裤',
href: '#'
}, {
name: '连衣裙',
href: '#'
}],
more: '#'
},
sort: {
sortType: [{
name: '最新',
active: true,
href: '',
hasSortOrient: true
}]
},
list: [{
href: '#',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/02/05/08/02bb2c8efb12319cf50f247bae13d60dde.jpg?imageView/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
price: '¥340',
discount: '7.5',
title: '多元化潮流风格'
}, {
href: '#',
img: 'http://img12.static.yhbimg.com/yhb-img01/2016/02/05/08/02bb2c8efb12319cf50f247bae13d60dde.jpg?imageView/1/w/{width}/h/{height}',
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
price: '¥340',
discount: '7.5',
title: '多元化潮流风格'
}]
};
return result;
};
/**
* [专场详情页假数据]
* @return {[type]} [description]
*/
exports.special = () => {
return {
mainBanner: {
url: '#',
src: 'http://img10.static.yhbimg.com/brandBanner/2014/11/24/07/01ff74fb2a33764c2fd18b3c8a60f5beef.jpg'
},
specialHead: {
logo: 'http://img10.static.yhbimg.com/brandLogo/2012/08/02/15/0119ad6a2407f5505268688a470d6f6c13.jpg',
special: '精品上装专场',
discount: '8',
title: '全部商品',
count: '123533',
limit: '80000000'
}
};
};
... ... @@ -43,7 +43,7 @@
<span class="qrcode-shop">
<i class="qrcode-icon"></i>
<div class="qrcode-box">
<div id="qrcode-img" class="qrcode-img" data-url='http://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.shop","params":{"shop_id":"{{shopId}}","shop_template_type":"1","shop_name":"{{shopName}}"}}'></div>
<div id="qrcode-img" class="qrcode-img" data-url='https://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.shop","params":{"shop_id":"{{shopId}}","shop_template_type":"1","shop_name":"{{shopName}}"}}'></div>
<p>扫一扫,手机逛更方便</p>
</div>
</span>
... ...
... ... @@ -26,7 +26,7 @@
<div class="qrcode-hover-box qrcode-decoration" data-id="{{brandIntro.shopId}}">
<i class="qrcode-icon"></i>
<div class="qrcode-box">
<div id="qrcode-img" class="qrcode-img" data-url='http://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.shop","params":{"shop_id":"{{brandIntro.shopId}}","shop_template_type":"2","shop_name":"{{brandIntro.brandName}}"}}'></div>
<div id="qrcode-img" class="qrcode-img" data-url='https://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.shop","params":{"shop_id":"{{brandIntro.shopId}}","shop_template_type":"2","shop_name":"{{brandIntro.brandName}}"}}'></div>
<p>扫一扫,手机逛更方便</p>
</div>
</div>
... ...
... ... @@ -94,7 +94,7 @@
签收商品未经穿着不影响二次销售的情况下,7日内退货,15日内换货;
退回商品保证吊牌、标签、包装完整,详情点击
<br />
<a href="http://www.yohobuy.com/help/detail?id=49"
<a href="//www.yohobuy.com/help/detail?id=49"
target="_blank">&gt;&gt;退换货政策</a>
</span>
</span>
... ...
... ... @@ -175,7 +175,7 @@
<i class="iconfont">&#xe703;</i>
<em>扫一扫购买</em>
<div class="code-box">
<div id="qrcode-img" class="code-img" data-url='http://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"{{skn}}"}}'></div>
<div id="qrcode-img" class="code-img" data-url='https://union.yoho.cn/union/app-downloads.html?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"{{skn}}"}}'></div>
</div>
</span>
... ...
... ... @@ -7,6 +7,7 @@
'use strict';
const _ = require('lodash');
const Promise = require('bluebird');
const clientAPI = require('./client-api');
... ... @@ -56,6 +57,11 @@ const getClientData = (type, encryptedUid) => {
}
if (res[3] && res[3].code === 200) {
_.each(res[3].data, function (item) {
item.content = (item.content || '').replace(/src=["']https?:/ig, 'src="');
});
qasList = res[3].data;
}
... ...
... ... @@ -74,7 +74,7 @@ const getOnlinePayProvider = () => {
id: val.id,
name: val.payName,
value: val.id + '_platform',
img: val.payIcon
img: val.payIcon.replace('http://', '//')
});
});
... ... @@ -316,54 +316,53 @@ const _execOrderData = (orderInfo, fraudData, payId) => {
* @param uid
*/
const procOrderData = (payResult, uid, payId) => {
return co(function *() {
let orderCode = payResult.orderCode;
let result = {code: 400, message: ''};
if (!orderCode) {
result.message = '订单不存在';
return result;
}
let orderCode = payResult.orderCode;
let result = {code: 400, message: ''};
return Promise.all([orderDetail(uid, orderCode), payApi.getResourceData(FRAUD_CONTENT_CODE)]).then(procData => {
let orderInfo = procData[0].code === 200 && procData[0].data;
if (!orderCode) {
result.message = '订单不存在';
return result;
}
if (!orderInfo) {
result.message = '订单不存在!';
return result;
}
return Promise.all([orderDetail(uid, orderCode), payApi.getResourceData(FRAUD_CONTENT_CODE)]).then(procData => {
let orderInfo = procData[0].code === 200 && procData[0].data;
if (orderInfo.is_cancel === 'Y') {
logger.warn('front pay success but order is cancel.', {payResult: payResult, order: orderInfo});
return {code: 417, message: '支付成功,但订单已取消,需联系客服!', point: _point(orderInfo, payId, 2)};
}
if (!orderInfo) {
result.message = '订单不存在!';
return result;
}
if (orderInfo.payment_status === 'N') {
logger.warn('front pay success but may be notify fail');
}
if (orderInfo.is_cancel === 'Y') {
logger.warn('front pay success but order is cancel.', {payResult: payResult, order: orderInfo});
return {code: 417, message: '支付成功,但订单已取消,需联系客服!', point: _point(orderInfo, payId, 2)};
}
if (_.round(parseFloat(orderInfo.payment_amount), 2) !== _.round(parseFloat(payResult.totalFee), 2)) {
logger.warn('front pay success but the amount is not same.', {payResult: payResult, order: orderInfo});
return {
code: 415,
message: '支付金额与订单金额不一致,订单状态更新失败!',
point: _point(orderInfo, payId, 2)
};
}
if (orderInfo.payment_status === 'N') {
logger.warn('front pay success but may be notify fail');
}
if (_.round(parseFloat(orderInfo.payment_amount), 2) !== _.round(parseFloat(payResult.totalFee), 2)) {
logger.warn('front pay success but the amount is not same.', {payResult: payResult, order: orderInfo});
return {
code: 200,
message: '支付成功,请等待发货',
data: {
order: Object.assign(
orderInfo,
_execOrderData(orderInfo, procData[1] && procData[1].data || {}, payId)
)
}
code: 415,
message: '支付金额与订单金额不一致,订单状态更新失败!',
point: _point(orderInfo, payId, 2)
};
}
});
})();
return {
code: 200,
message: '支付成功,请等待发货',
data: {
order: Object.assign(
orderInfo,
_execOrderData(orderInfo, procData[1] && procData[1].data || {}, payId)
)
}
};
});
};
/**
... ...
... ... @@ -140,7 +140,7 @@ if (isProduction) {
service: 'http://service.yoho.yohoops.org/',
search: 'http://search.yohoops.org/yohosearch/',
serviceNotify: 'http://service.yoho.cn/',
imSocket: 'ws://imsocket.yohobuy.com:10000',
imSocket: 'wss://imsocket.yohobuy.com:443',
imCs: 'https://imhttp.yohobuy.com/api',
platformApi: 'http://api.platform.yohoops.org',
unionApi: 'http://union.yoho.cn/'
... ...
... ... @@ -83,4 +83,5 @@ module.exports = [
origin: '/index.html',
target: helpers.urlFormat('/')
}
];
... ...
{{#if @root.geetest}}
<script>window._geeCaptcha = true;</script>
<script src="http://static.geetest.com/static/tools/gt.js"></script>
<script src="https://static.geetest.com/static/tools/gt.js"></script>
{{/if}}
... ...
... ... @@ -97,7 +97,7 @@ function loadFineProduct(page) {
function fetchLatestWalk(num) {
$.ajax({
url: 'http://www.yohobuy.com/common/recentReview',
url: '//www.yohobuy.com/common/recentReview',
dataType: 'jsonp',
data: {
limit: num || 15
... ...
... ... @@ -327,7 +327,7 @@ function submitSearch() {
searchKey = $.trim(searchKey.toLowerCase());
if (reg.test(searchKey) && searchKey !== '') {
location.href = 'http://search.yohobuy.com/error?query=' + searchKey;
location.href = '//search.yohobuy.com/error?query=' + searchKey;
} else {
if (searchKey === '') {
$('#query-key').val(defaultSearch);
... ... @@ -813,7 +813,7 @@ function actionCover() {
var containertop;
var length = '';
if (window.location.href === 'http://www.yohobuy.com/' &&
if (window.location.href === document.location.protocol + '://www.yohobuy.com/' &&
(typeof gender === 'undefined' || gender === '' || gender === null)) {
$.get('/guide', function(data) {
newMask = document.createElement('div');
... ...
... ... @@ -11,7 +11,7 @@ var sendmessagehtml = $('.validatewrapper').html(); // 发送短信dom
var second = +$('.second').text(); // 倒计时秒数
var dovalidate = false; // 校验验证码标识
var validatecode = false; // 验证码是否通过
var choosedpic = 'http://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片
var choosedpic = 'https://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片
var $wrapper = $('.bindwrapper'),
$phoneTip = $wrapper.find('.phone-err-tip'),
... ... @@ -347,7 +347,7 @@ function nextStep() {
$('#registphone').text(mobile);
$('#username').text(username);
if (headImg === '') {
$('#userphoto').attr('src', 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/' +
$('#userphoto').attr('src', 'https://img10.static.yhbimg.com/headimg/2013/11/28/09/' +
'01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100');
} else {
$('#userphoto').attr('src', headImg);
... ... @@ -372,7 +372,7 @@ function nextStep() {
$('#registphonetwo').text(mobile);
$('#username1').text(username);
if (headImg === '') {
$('#userphoto1').attr('src', 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/' +
$('#userphoto1').attr('src', 'https://img10.static.yhbimg.com/headimg/2013/11/28/09/' +
'01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100');
} else {
$('#userphoto1').attr('src', headImg);
... ...
... ... @@ -5,7 +5,7 @@
*/
var $ = require('yoho-jquery');
var phoneRegx = require('../common/mail-phone-regx').phoneRegx;
var choosedpic = 'http://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片
var choosedpic = 'https://cdn.yoho.cn/yohobuy/assets/img/passport/choosed.png';// 已选择图片
var $wrapper = $('.bindwrapper'),
$phoneTip = $wrapper.find('.phone-err-tip'),
... ...
... ... @@ -25,7 +25,7 @@ function fetchLatestWalk() {
tpl = Handlebars.compile($('#latest-walk-tpl').html());
$.ajax({
url: 'http://www.yohobuy.com/common/recentReview',
url: '//www.yohobuy.com/common/recentReview',
dataType: 'jsonp',
data: {
limit: $latestWalkCount.val()
... ...
... ... @@ -35,7 +35,7 @@ function randomString(len) {
function getSearchRecommend() {
$.ajax({
url: 'http://search.yohobuy.com/product/search/less/recommend',
url: '//search.yohobuy.com/product/search/less/recommend',
dataType: 'json',
success: function(data) {
... ...
... ... @@ -13,6 +13,7 @@ var $ = require('yoho-jquery'),
editArea = require('./edit-area'),
serviceApi = require('./service-api'),
broswer = require('./broswer'),
utility = require('./utility'),
socketChat = require('./socket-chat'),
socketConf = require('./socket-config');
... ... @@ -380,6 +381,7 @@ function pageInit() {
height = 100;
message.newContent = emojiPrefix(message.newContent);
rec.userHead = utility.autoProtocol(rec.userHead);
// 用户头像处理
if (!rec.userHead) {
... ... @@ -393,6 +395,7 @@ function pageInit() {
// 图片添加标签
if (msgType === 2) {
message.content = utility.autoProtocol(message.content);
message.newContent = '<img class="img-msg" src="' + message.content + '">';
dom = cusTpl({
userHead: rec.userHead,
... ... @@ -444,8 +447,10 @@ function pageInit() {
var dom,
image;
rec.csHead = utility.autoProtocol(rec.csHead);
message.newContent = emojiPrefix(message.newContent);
if (msgType === 2) {
message.content = utility.autoProtocol(message.content);
message.newContent = '<img class="img-msg" src="' + message.content + '">';
dom = csTpl({
... ... @@ -503,7 +508,6 @@ function pageInit() {
$evalModal.find('.discontent').empty().append(dom);
}
// todo
// 拉取评价原因
serviceApi.reason({
conversationId: socketConfCM.conversationId
... ... @@ -711,12 +715,15 @@ function pageInit() {
item = msgList[i];
item.chatMessage.newContent = emojiPrefix(item.chatMessage.newContent);
if (item.chatMessage.type === 2) {
item.chatMessage.newContent = utility.autoProtocol(item.chatMessage.newContent);
item.chatMessage.newContent =
['<img class="img-msg" src="', item.chatMessage.newContent, '">'].join('');
}
switch (item.type) {
case allRTs.CU_SEND:
item.userHead = utility.autoProtocol(item.userHead);
if (!item.userHead) {
item.userHead = assetsPrefix + socketConf.defaultUserHead;
} else {
... ... @@ -745,7 +752,7 @@ function pageInit() {
case allRTs.CS_SEND:
dom += csTpl({
csHead: item.csHead,
csHead: utility.autoProtocol(item.csHead),
csName: item.csName,
sendTimeShort: item.sendTimeLong,
newContent: item.chatMessage.newContent
... ... @@ -944,7 +951,6 @@ function pageInit() {
// 发送图片
$sendImgInput.fileupload({
dataType: 'json',
acceptFileTypes: /(\.|\/)(bmp|gif|jpe?g|png)$/i,
maxFileSize: 5000000, // 5M
url: configDomains.imCs + '/fileManage/uploadFile',
... ... @@ -961,7 +967,7 @@ function pageInit() {
// 上传成功后发送图片消息
socketConfCM.type = allRTs.CU_SEND;
socketConfCM.chatMessage.content = res.data.filePath;
socketConfCM.chatMessage.content = utility.autoProtocol(res.data.filePath);
socketConfCM.chatMessage.type = 2;
socketConfCM.uuid = uuid.v4();
socketChat.send(socketConfCM);
... ...
/**
* 链接自适应协议
* @author: lq <qi.li@yoho.cn>
* @date: 2017/04/06
*/
exports.autoProtocol = function (src) {
return (src || '').replace(/^(http:|https:)/, '')
};
... ...