Authored by 周少峰

Merge branch 'master' into feature/https

@@ -143,6 +143,8 @@ const submit = (req, res, next) => { @@ -143,6 +143,8 @@ const submit = (req, res, next) => {
143 userAgent: userAgent 143 userAgent: userAgent
144 }); 144 });
145 145
  146 + params.udid = req.cookies._yasvd || 'yoho_pc';
  147 +
146 if (params.sku) { // 快捷结算 148 if (params.sku) { // 快捷结算
147 easypayModel.easypayOrderSubmit(uid, 'ordinary', params, remoteIp).then(result => { 149 easypayModel.easypayOrderSubmit(uid, 'ordinary', params, remoteIp).then(result => {
148 res.json(result); 150 res.json(result);
@@ -172,6 +172,12 @@ const easypayOrderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliver @@ -172,6 +172,12 @@ const easypayOrderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliver
172 } 172 }
173 } 173 }
174 174
  175 + if (other.udid) {
  176 + Object.assign(param, {
  177 + udid: other.udid
  178 + });
  179 + }
  180 +
175 return api.get('', param, { 181 return api.get('', param, {
176 headers: {'X-Forwarded-For': remoteIp || ''} 182 headers: {'X-Forwarded-For': remoteIp || ''}
177 }); 183 });
@@ -167,6 +167,12 @@ const orderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliveryWay, p @@ -167,6 +167,12 @@ const orderSubmitAsync = (uid, cartType, addressId, deliveryTime, deliveryWay, p
167 }); 167 });
168 } 168 }
169 169
  170 + if (other.udid) {
  171 + Object.assign(param, {
  172 + udid: other.udid
  173 + });
  174 + }
  175 +
170 // 友盟有关信息的传递 176 // 友盟有关信息的传递
171 if (other.qhyUnion) { 177 if (other.qhyUnion) {
172 Object.assign(param, { 178 Object.assign(param, {
@@ -71,6 +71,7 @@ const modifyAddress = (req, res, next) => { @@ -71,6 +71,7 @@ const modifyAddress = (req, res, next) => {
71 return ''; 71 return '';
72 } 72 }
73 }()); 73 }());
  74 + let udid = req.cookies._yasvd || 'yoho_pc';
74 75
75 if (!orderId || !userName || !areaCode || !address) { 76 if (!orderId || !userName || !areaCode || !address) {
76 return res.json({ 77 return res.json({
@@ -79,7 +80,7 @@ const modifyAddress = (req, res, next) => { @@ -79,7 +80,7 @@ const modifyAddress = (req, res, next) => {
79 }); 80 });
80 } 81 }
81 82
82 - ordersService.updateDeliveryAddress(orderId, userName, areaCode, address, mobile, phone, uid) 83 + ordersService.updateDeliveryAddress(orderId, userName, areaCode, address, mobile, phone, uid, udid)
83 .then(result => res.json(result)) 84 .then(result => res.json(result))
84 .catch(next); 85 .catch(next);
85 }; 86 };
@@ -153,7 +153,7 @@ exports.closeReasons = ()=>{ @@ -153,7 +153,7 @@ exports.closeReasons = ()=>{
153 * @param type address_id 153 * @param type address_id
154 * @return type 154 * @return type
155 */ 155 */
156 -exports.updateDeliveryAddress = (orderId, userName, areaCode, address, mobile, phone, uid)=>{ 156 +exports.updateDeliveryAddress = (orderId, userName, areaCode, address, mobile, phone, uid, udid)=>{
157 let options = { 157 let options = {
158 method: 'app.SpaceOrders.updateDeliveryAddress', 158 method: 'app.SpaceOrders.updateDeliveryAddress',
159 order_code: orderId, 159 order_code: orderId,
@@ -171,6 +171,10 @@ exports.updateDeliveryAddress = (orderId, userName, areaCode, address, mobile, p @@ -171,6 +171,10 @@ exports.updateDeliveryAddress = (orderId, userName, areaCode, address, mobile, p
171 Object.assign(options, {phone: phone}); 171 Object.assign(options, {phone: phone});
172 } 172 }
173 173
  174 + if (udid) {
  175 + Object.assign(options, {udid: udid});
  176 + }
  177 +
174 return api.get('', options); 178 return api.get('', options);
175 }; 179 };
176 180
@@ -322,7 +322,8 @@ const _getSkuDataByProductBaseInfo = (data) => { @@ -322,7 +322,8 @@ const _getSkuDataByProductBaseInfo = (data) => {
322 goodsDetail.thumbs.push({ 322 goodsDetail.thumbs.push({
323 url: '', 323 url: '',
324 shower: good.image_url, 324 shower: good.image_url,
325 - img: good.image_url 325 + img: good.image_url,
  326 + title: goodsDetail.title
326 }); 327 });
327 } 328 }
328 }); 329 });
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 {{#if homeUrl}} 3 {{#if homeUrl}}
4 <div class="center-content clearfix"> 4 <div class="center-content clearfix">
5 <a class="pull-left" href="{{homeUrl}}"> 5 <a class="pull-left" href="{{homeUrl}}">
6 - <img src="{{image2 logo w=45 h=45}}"> 6 + <img src="{{image2 logo w=45 h=45}}" alt="{{brandName}}">
7 </a> 7 </a>
8 8
9 <div class="opt pull-right"> 9 <div class="opt pull-right">
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 {{#each colors}} 4 {{#each colors}}
5 <li class="{{#if focus}}focus{{/if}} {{#if disable}}disable{{/if}} pull-left" 5 <li class="{{#if focus}}focus{{/if}} {{#if disable}}disable{{/if}} pull-left"
6 title="{{title}}" data-color="{{name}}" data-total="{{total}}"> 6 title="{{title}}" data-color="{{name}}" data-total="{{total}}">
7 - <img src="{{image2 src w=25 h=32}}"><span class="color-name">{{name}}</span> 7 + <img src="{{image2 src w=25 h=32}}" alt="{{title}}"><span class="color-name">{{name}}</span>
8 </li> 8 </li>
9 {{/each}} 9 {{/each}}
10 </ul> 10 </ul>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 </div> 31 </div>
32 32
33 <div id="min-img"> 33 <div id="min-img">
34 - <img id="img-show" class="img-show" src="{{image2 img w=420 h=560}}"> 34 + <img id="img-show" class="img-show" src="{{image2 img w=420 h=560}}" alt="{{name}}">
35 <div class="magnifier move-object hide"></div> 35 <div class="magnifier move-object hide"></div>
36 <div class="magnifier move-over"></div> 36 <div class="magnifier move-over"></div>
37 <div id="max" class="magnifier max hide"> 37 <div id="max" class="magnifier max hide">
@@ -49,12 +49,14 @@ @@ -49,12 +49,14 @@
49 {{#if focus}} 49 {{#if focus}}
50 {{# thumbs}} 50 {{# thumbs}}
51 <img class="thumb {{#if @first}}active{{/if}}" src="{{image2 img w=75 h=100}}" 51 <img class="thumb {{#if @first}}active{{/if}}" src="{{image2 img w=75 h=100}}"
  52 + alt="{{title}}"
52 data-shower="{{image2 shower w=420 h=560}}" 53 data-shower="{{image2 shower w=420 h=560}}"
53 data-origin="{{image2 shower w=750 h=1000}}"> 54 data-origin="{{image2 shower w=750 h=1000}}">
54 {{/ thumbs}} 55 {{/ thumbs}}
55 {{^}} 56 {{^}}
56 {{# thumbs}} 57 {{# thumbs}}
57 <img class="thumb lazy" 58 <img class="thumb lazy"
  59 + alt="{{title}}"
58 data-original="{{image2 img w=75 h=100}}" 60 data-original="{{image2 img w=75 h=100}}"
59 data-shower="{{image2 shower w=420 h=560}}" 61 data-shower="{{image2 shower w=420 h=560}}"
60 data-origin="{{image2 shower w=750 h=1000}}"> 62 data-origin="{{image2 shower w=750 h=1000}}">
@@ -92,7 +92,7 @@ const applysave = (req, res, next) => { @@ -92,7 +92,7 @@ const applysave = (req, res, next) => {
92 92
93 try { 93 try {
94 for (let key in req.body) { 94 for (let key in req.body) {
95 - if (req.body.hasOwnProperty(key)) { 95 + if (req.body[key]) {
96 key = key + ''; 96 key = key + '';
97 param[_.camelCase(key)] = req.body[key]; 97 param[_.camelCase(key)] = req.body[key];
98 } 98 }
@@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
6 <li style="{{#if bgColor}}background:{{bgColor}}{{/if}}"> 6 <li style="{{#if bgColor}}background:{{bgColor}}{{/if}}">
7 <a href="{{url}}" target= "_blank" title="{{title}}"> 7 <a href="{{url}}" target= "_blank" title="{{title}}">
8 {{#if @first}} 8 {{#if @first}}
9 - <img src="{{image2 src w=1150 h=450}}"> 9 + <img src="{{image2 src w=1150 h=450}}" alt="{{title}}-YOHO!BUY有货">
10 {{^}} 10 {{^}}
11 - <img class="lazy" data-original="{{image2 src w=1150 h=450}}" alt="{{alt}}"> 11 + <img class="lazy" data-original="{{image2 src w=1150 h=450}}" alt="{{title}}-YOHO!BUY有货">
12 {{/if}} 12 {{/if}}
13 </a> 13 </a>
14 {{# tips}} 14 {{# tips}}