Authored by hf

fixes bug to call product detail api and order status

@@ -1261,9 +1261,9 @@ @@ -1261,9 +1261,9 @@
1261 },{ 1261 },{
1262 'appIcon' : 'http://static.yohobuy.com/images/icon.png', 1262 'appIcon' : 'http://static.yohobuy.com/images/icon.png',
1263 'payLink' : '/weixin/pay/', 1263 'payLink' : '/weixin/pay/',
1264 - 'appId': 'baidu',  
1265 - 'app' : '百度支付',  
1266 - 'hint' : '需下载微信客户端', 1264 + 'appId': 'alipay',
  1265 + 'app' : '支付宝支付',
  1266 + 'hint' : '需下载支付宝客户端',
1267 'subHint' : '推荐使用' 1267 'subHint' : '推荐使用'
1268 } 1268 }
1269 ] 1269 ]
@@ -4721,7 +4721,7 @@ define("js/product/detail/detail", ["jquery","swiper","hammer","lazyload","index @@ -4721,7 +4721,7 @@ define("js/product/detail/detail", ["jquery","swiper","hammer","lazyload","index
4721 * @author: liangzhifeng<zhifeng.liang@yoho.cn> 4721 * @author: liangzhifeng<zhifeng.liang@yoho.cn>
4722 * @date: 2015/10/20 4722 * @date: 2015/10/20
4723 */ 4723 */
4724 - var $ = require("jquery"), 4724 +var $ = require("jquery"),
4725 Swiper = require("swiper"), 4725 Swiper = require("swiper"),
4726 Hammer = require("hammer"), 4726 Hammer = require("hammer"),
4727 lazyLoad = require("lazyload"); 4727 lazyLoad = require("lazyload");
@@ -4733,6 +4733,8 @@ var goodsSwiper, @@ -4733,6 +4733,8 @@ var goodsSwiper,
4733 var goodsDiscountEl = document.getElementById('goodsDiscount'), 4733 var goodsDiscountEl = document.getElementById('goodsDiscount'),
4734 goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl); 4734 goodsDiscountHammer = goodsDiscountEl && new Hammer(goodsDiscountEl);
4735 4735
  4736 +var $cart = $('.cart-bar');
  4737 +
4736 require("js/product/detail/desc"); 4738 require("js/product/detail/desc");
4737 require("js/product/detail/comments-consults"); 4739 require("js/product/detail/comments-consults");
4738 require("js/product/recommend-for-you-product-desc"); 4740 require("js/product/recommend-for-you-product-desc");
@@ -4787,6 +4789,16 @@ if (goodsDiscountHammer) { @@ -4787,6 +4789,16 @@ if (goodsDiscountHammer) {
4787 }); 4789 });
4788 } 4790 }
4789 4791
  4792 +//购物车商品数量
  4793 +$.ajax({
  4794 + type: 'GET',
  4795 + url: '/cart/index/count',
  4796 + success: function(data) {
  4797 + if (data.code === 200) {
  4798 + $cart.find('.num-tag').html(data.data.cart_goods_count).removeClass('hide');
  4799 + }
  4800 + }
  4801 +});
4790 4802
4791 require("js/product/detail/like"); 4803 require("js/product/detail/like");
4792 4804
@@ -4887,19 +4899,24 @@ $(window).scroll(function() { @@ -4887,19 +4899,24 @@ $(window).scroll(function() {
4887 4899
4888 4900
4889 }); 4901 });
4890 -define("js/product/detail/comments-consults", ["jquery"], function(require, exports, module){ 4902 +define("js/product/detail/comments-consults", ["jquery","hammer"], function(require, exports, module){
4891 /** 4903 /**
4892 * 商品详情 --评论和咨询tab 4904 * 商品详情 --评论和咨询tab
4893 * @author: Lynnic 4905 * @author: Lynnic
4894 * @date: 2015/11/18 4906 * @date: 2015/11/18
4895 */ 4907 */
4896 var $ = require("jquery"), 4908 var $ = require("jquery"),
4897 - tip = require("js/plugin/tip");  
4898 -var commentsNum; 4909 + tip = require("js/plugin/tip"),
  4910 + Hammer = require("hammer");
  4911 +
  4912 +var commentsNum,consultsNum;
  4913 +
  4914 +var consultFooterEle = document.getElementById('consult-content-footer'),
  4915 + consultFooterHammer = consultFooterEle && new Hammer(consultFooterEle);
4899 4916
4900 4917
4901 (function() { 4918 (function() {
4902 - var consultsNum = $('#nav-tab .consults-num').html() - 0; 4919 + consultsNum = $('#nav-tab .consults-num').html() - 0;
4903 4920
4904 commentsNum = $('#nav-tab .comments-num').html() - 0; 4921 commentsNum = $('#nav-tab .comments-num').html() - 0;
4905 4922
@@ -4941,6 +4958,12 @@ $('#nav-tab li').on('touchend', function() { @@ -4941,6 +4958,12 @@ $('#nav-tab li').on('touchend', function() {
4941 } 4958 }
4942 } 4959 }
4943 }); 4960 });
  4961 +
  4962 +if (consultFooterHammer) {
  4963 + consultFooterHammer.on('tap', function() {
  4964 + location.href = $(consultFooterEle).find('a').attr('href');
  4965 + });
  4966 +}
4944 }); 4967 });
4945 define("js/product/recommend-for-you-product-desc", ["swiper","jquery","index"], function(require, exports, module){ 4968 define("js/product/recommend-for-you-product-desc", ["swiper","jquery","index"], function(require, exports, module){
4946 /** 4969 /**
@@ -4987,70 +5010,77 @@ var $ = require("jquery"), @@ -4987,70 +5010,77 @@ var $ = require("jquery"),
4987 Hammer = require("hammer"), 5010 Hammer = require("hammer"),
4988 tip = require("js/plugin/tip"); 5011 tip = require("js/plugin/tip");
4989 5012
4990 -var likeHammer = new Hammer(document.getElementById('likeBtn')),  
4991 - addToCartHammer = new Hammer(document.getElementById('addtoCart')), 5013 +var likeEle = document.getElementById('likeBtn'),
  5014 + likeHammer = likeEle && new Hammer(likeEle);
  5015 +
  5016 +var addToCartEle = document.getElementById('addtoCart'),
  5017 + addToCartHammer = addToCartEle && new Hammer(addToCartEle),
4992 productId = $('#productId').val(); 5018 productId = $('#productId').val();
4993 5019
4994 -likeHammer.on('tap', function(e) {  
4995 - var opt,  
4996 - favorite; 5020 +if (likeHammer) {
  5021 + likeHammer.on('tap', function(e) {
  5022 + var opt,
  5023 + favorite;
4997 5024
4998 - var $this = $(e.target); 5025 + var $this = $(e.target);
4999 5026
5000 - if ($this.hasClass('liked')) {  
5001 - opt = 'cancel';  
5002 - favorite = 0;  
5003 - } else {  
5004 - opt = 'ok';  
5005 - favorite = 1;  
5006 - }  
5007 - $.ajax({  
5008 - type: 'POST',  
5009 - url: '/product/opt/favoriteProduct',  
5010 - data: {  
5011 - id: productId,  
5012 - opt: opt  
5013 - },  
5014 - success: function(data) {  
5015 - if (data.code === 200) {  
5016 - $this.toggleClass('liked'); 5027 + if ($this.hasClass('liked')) {
  5028 + opt = 'cancel';
  5029 + favorite = 0;
  5030 + } else {
  5031 + opt = 'ok';
  5032 + favorite = 1;
  5033 + }
  5034 + $.ajax({
  5035 + type: 'POST',
  5036 + url: '/product/opt/favoriteProduct',
  5037 + data: {
  5038 + id: productId,
  5039 + opt: opt
  5040 + },
  5041 + success: function(data) {
  5042 + if (data.code === 200) {
  5043 + $this.toggleClass('liked');
5017 5044
5018 - if ('cancel' === opt) {  
5019 - tip.show('取消收藏成功');  
5020 - } else if ('ok' === opt) {  
5021 - tip.show('收藏成功'); 5045 + if ('cancel' === opt) {
  5046 + tip.show('取消收藏成功');
  5047 + } else if ('ok' === opt) {
  5048 + tip.show('收藏成功');
  5049 + }
  5050 + } else if (data.code === 400) {
  5051 + location.href = data.data;//未登录跳转登录页
  5052 + } else {
  5053 + tip.show(data.message);
5022 } 5054 }
5023 - } else if (data.code === 400) {  
5024 - location.href = data.data;//未登录跳转登录页  
5025 - } else {  
5026 - tip.show(data.message);  
5027 - }  
5028 5055
5029 - // 统计代码:用于统计用户加入或取消商品收藏的动作  
5030 - if (window._yas) {  
5031 - window._yas.sendCustomInfo({  
5032 - pd: productId,  
5033 - fa: favorite  
5034 - }); 5056 + // 统计代码:用于统计用户加入或取消商品收藏的动作
  5057 + if (window._yas) {
  5058 + window._yas.sendCustomInfo({
  5059 + pd: productId,
  5060 + fa: favorite
  5061 + });
  5062 + }
  5063 + },
  5064 + error: function() {
  5065 + tip.show('网络断开连接了~');
5035 } 5066 }
5036 - },  
5037 - error: function() {  
5038 - tip.show('网络断开连接了~');  
5039 - } 5067 + });
5040 }); 5068 });
  5069 +}
5041 5070
5042 -}); 5071 +if (addToCartHammer) {
  5072 + addToCartHammer.on('tap', function(e) {
5043 5073
5044 -addToCartHammer.on('tap', function(e) { 5074 + // 统计代码:用于统计用户加入购物车的动作
  5075 + if (window._yas) {
  5076 + window._yas.sendCustomInfo({
  5077 + pd: productId,
  5078 + by: 1
  5079 + });
  5080 + }
  5081 + });
  5082 +}
5045 5083
5046 - // 统计代码:用于统计用户加入购物车的动作  
5047 - if (window._yas) {  
5048 - window._yas.sendCustomInfo({  
5049 - pd: productId,  
5050 - by: 1  
5051 - });  
5052 - }  
5053 -});  
5054 5084
5055 5085
5056 5086
@@ -5134,16 +5164,14 @@ $consultForm.on('submit', function() { @@ -5134,16 +5164,14 @@ $consultForm.on('submit', function() {
5134 }); 5164 });
5135 5165
5136 }); 5166 });
5137 -define("js/product/newsale/hot-rank", ["jquery","hammer","swiper","lazyload","index"], function(require, exports, module){ 5167 +define("js/product/newsale/hot-rank", ["jquery","swiper","lazyload","index"], function(require, exports, module){
5138 var $ = require("jquery"), 5168 var $ = require("jquery"),
5139 - Hammer = require("hammer"),  
5140 Swiper = require("swiper"), 5169 Swiper = require("swiper"),
5141 lazyLoad = require("lazyload"), 5170 lazyLoad = require("lazyload"),
5142 loading = require("js/plugin/loading"); 5171 loading = require("js/plugin/loading");
5143 5172
5144 var page = 1, 5173 var page = 1,
5145 winH, 5174 winH,
5146 - hotnav,  
5147 listTop, 5175 listTop,
5148 navSwiper, 5176 navSwiper,
5149 notab = 0, 5177 notab = 0,
@@ -5152,42 +5180,6 @@ var page = 1, @@ -5152,42 +5180,6 @@ var page = 1,
5152 hotrankNav, 5180 hotrankNav,
5153 noResult = '<p class="no-result">未找到相关搜索结果</p>'; 5181 noResult = '<p class="no-result">未找到相关搜索结果</p>';
5154 5182
5155 -// var renderRank = {  
5156 -// errMsg: '<p class="no-result">未找到相关搜索结果</p>',  
5157 -// navSelector: '.goods-nav',  
5158 -// rankSelector: '#hotRank',  
5159 -// navHTML: null,  
5160 -// data: null,  
5161 -// inited: 0,  
5162 -// setData: function(data) {  
5163 -// this.data = data;  
5164 -// },  
5165 -// showDataEmptyMsg: function() {  
5166 -// $(this.rankSelector).append(this.errMsg);  
5167 -// },  
5168 -// isDataEmpty: function() {  
5169 -// if (this.data.indexOf('>') === -1) {  
5170 -// return true;  
5171 -// } else {  
5172 -// return false;  
5173 -// }  
5174 -// },  
5175 -// appendData: function() {  
5176 -// if (!this.inited) {  
5177 -// this.inited = 1;  
5178 -// }  
5179 -// $(this.rankSelector).append(this.data);  
5180 -// },  
5181 -// render: function(data) {  
5182 -// this.setData(data);  
5183 -// if (!this.isDataEmpty()) {  
5184 -// this.appendData();  
5185 -// } else {  
5186 -// this.showDataEmptyMsg();  
5187 -// }  
5188 -// }  
5189 -  
5190 -// };  
5191 5183
5192 function hotrank(page, sort, tabId, notab) { 5184 function hotrank(page, sort, tabId, notab) {
5193 loading.showLoadingMask(); 5185 loading.showLoadingMask();
@@ -5201,27 +5193,6 @@ function hotrank(page, sort, tabId, notab) { @@ -5201,27 +5193,6 @@ function hotrank(page, sort, tabId, notab) {
5201 notab: notab 5193 notab: notab
5202 }, 5194 },
5203 success: function(data) { 5195 success: function(data) {
5204 -  
5205 - // if (page === 1) {  
5206 - // $('.no-result').remove();  
5207 - // $('.rank-main').remove();  
5208 - // }  
5209 -  
5210 - // if (notab === 1) {  
5211 - // if (data === ' ' && $('.rank-main').length < 1) {  
5212 - // var hotrankNav = $('.goods-nav').prop("outerHTML");  
5213 -  
5214 - // $('#hotRank').html(hotrankNav + noResult);  
5215 - // } else {  
5216 - // $('#hotRank').append(data);  
5217 - // }  
5218 - // } else {  
5219 - // if (data === ' ') {  
5220 - // $('#hotRank').html(noResult);  
5221 - // } else {  
5222 - // $('#hotRank').append(data);  
5223 - // }  
5224 - // }  
5225 if (data === ' ') { 5196 if (data === ' ') {
5226 if ($('.rank-main').length < 1 && $('.goods-nav').length < 1) { 5197 if ($('.rank-main').length < 1 && $('.goods-nav').length < 1) {
5227 $('#hotRank').html(noResult); 5198 $('#hotRank').html(noResult);
@@ -5237,11 +5208,6 @@ function hotrank(page, sort, tabId, notab) { @@ -5237,11 +5208,6 @@ function hotrank(page, sort, tabId, notab) {
5237 $('.rank-main').remove(); 5208 $('.rank-main').remove();
5238 $('#hotRank').append(data); 5209 $('#hotRank').append(data);
5239 } 5210 }
5240 -  
5241 - // renderRank.render(data);  
5242 -  
5243 -  
5244 -  
5245 lazyLoad($('img.lazy')); 5211 lazyLoad($('img.lazy'));
5246 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top'); 5212 $('.rank-main ul li:gt(2)').find('.item-content i').removeClass('top');
5247 winH = $(window).height(); 5213 winH = $(window).height();
@@ -5273,14 +5239,12 @@ function scrollHandler() { @@ -5273,14 +5239,12 @@ function scrollHandler() {
5273 hotrank(page, sort, id, notab); 5239 hotrank(page, sort, id, notab);
5274 } 5240 }
5275 5241
5276 -//srcoll to load more  
5277 $(window).scroll(function() { 5242 $(window).scroll(function() {
5278 window.requestAnimationFrame(scrollHandler); 5243 window.requestAnimationFrame(scrollHandler);
5279 }); 5244 });
5280 5245
5281 hotrank(page, sort, id, notab); 5246 hotrank(page, sort, id, notab);
5282 -hotnav = new Hammer(document.getElementById('hotRank'));  
5283 -hotnav.on('tap', function(e) { 5247 +$('#hotRank').on('touchend touchcancel', function(e) {
5284 var ev = ev || window.event; 5248 var ev = ev || window.event;
5285 var target = ev.target || ev.srcElement; 5249 var target = ev.target || ev.srcElement;
5286 5250
@@ -5290,14 +5254,24 @@ hotnav.on('tap', function(e) { @@ -5290,14 +5254,24 @@ hotnav.on('tap', function(e) {
5290 id = target.getAttribute('data-id') ? target.getAttribute('data-id') : ''; 5254 id = target.getAttribute('data-id') ? target.getAttribute('data-id') : '';
5291 sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : ''; 5255 sort = target.getAttribute('data-sort') ? target.getAttribute('data-sort') : '';
5292 page = 1; 5256 page = 1;
5293 -  
5294 - // notab = renderRank.inited;  
5295 notab = 1; 5257 notab = 1;
5296 -  
5297 -  
5298 hotrank(page, sort, id, notab); 5258 hotrank(page, sort, id, notab);
5299 } 5259 }
5300 }); 5260 });
  5261 +$('#hotRank').bind('contextmenu', function(e) {
  5262 + return false;
  5263 +});
  5264 +$('#hotRank').on('touchstart', function(e) {
  5265 + var ev = ev || window.event;
  5266 + var target = ev.target || ev.srcElement;
  5267 +
  5268 + if (target.nodeName.toLowerCase() === 'span') {
  5269 + target.parentNode.className = 'bgActive ' + target.parentNode.className;
  5270 + }
  5271 +}).on('touchend touchcancel', function() {
  5272 + $('.s-goods-nav .nav-item').removeClass('bgActive');
  5273 +});
  5274 +
5301 5275
5302 }); 5276 });
5303 define("js/me/entry", ["jquery","hammer","lazyload","handlebars","source-map","swiper","mlellipsis","index"], function(require, exports, module){ 5277 define("js/me/entry", ["jquery","hammer","lazyload","handlebars","source-map","swiper","mlellipsis","index"], function(require, exports, module){
@@ -7310,7 +7284,7 @@ $page.on('touchstart', '.del-icon', function() { @@ -7310,7 +7284,7 @@ $page.on('touchstart', '.del-icon', function() {
7310 }); 7284 });
7311 setTimeout(function() { 7285 setTimeout(function() {
7312 window.history.go(0); 7286 window.history.go(0);
7313 - }, 1000); 7287 + }, 2500);
7314 } 7288 }
7315 }, 7289 },
7316 complete: function() { 7290 complete: function() {
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3 <svg xmlns="http://www.w3.org/2000/svg"> 3 <svg xmlns="http://www.w3.org/2000/svg">
4 <metadata> 4 <metadata>
5 -Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015 5 +Created by FontForge 20120731 at Sat Dec 5 16:26:44 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015 @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015
19 bbox="-0.75 -224 3943 833" 19 bbox="-0.75 -224 3943 833"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 - unicode-range="U+0078-E63E" 22 + unicode-range="U+0078-E63F"
23 /> 23 />
24 <missing-glyph horiz-adv-x="374" 24 <missing-glyph horiz-adv-x="374"
25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> 25 d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" />
@@ -252,5 +252,10 @@ t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5 @@ -252,5 +252,10 @@ t-3.5 -16.5t-5.5 -16.5t-7.5 -15.5t-10 -15t-11.5 -14t-13 -12.5t-14.5 -11.5t-15.5
252 l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4 252 l-47 -98q-3 -6 -7 -11t-10 -8t-12.5 -4t-13 0.5t-12.5 5.5q-8 3 -13.5 9t-8 13.5t-1.5 16.5t5 16l47 99q23 42 62 64.5t83 16.5q45 -7 77 -39l141 -141q29 -28 38 -65t-4 -75q-17 -43 -34 -60l-72 -73q-5 -4 -9.5 -7t-9.5 -4t-11 -1zM602 87q-4 0 -9 1.5t-8 2.5t-9 4
253 q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5 253 q-77 58 -154 128q-76 77 -128 154q-9 12 -6 29.5t19 30.5q6 3 13 5t13.5 2t13 -2t11.5 -5.5t9 -8.5q15 -21 27 -36.5t27.5 -35t32 -37t32.5 -32.5q14 -12 21 -18.5t19.5 -17.5t20.5 -18t19.5 -17t20.5 -17.5t19.5 -15.5t20.5 -15q11 -7 16 -17t3 -21.5t-10 -21.5
254 q-6 -21 -34 -21z" /> 254 q-6 -21 -34 -21z" />
  255 + <glyph glyph-name="uniE63F" unicode="&#xe63f;" horiz-adv-x="1025"
  256 +d="M512 -66q-10 0 -24.5 -0.5t-25 -1t-24 0t-24.5 1.5l-222 -146q0 227 5 243q-164 117 -192 282q-5 30 -5 60q0 122 68.5 223t186 158.5t257.5 57.5q104 0 199 -34t163.5 -92.5t109 -140t40.5 -172.5q0 -167 -126 -290q-124 -121 -312 -144q-37 -5 -74 -5zM512 763
  257 +q-91 0 -176.5 -31.5t-148.5 -83.5t-100.5 -124.5t-37.5 -150.5q0 -95 53 -179t142 -138v-170l146 97q16 -3 35.5 -4t49 0t37.5 1q41 0 81 6.5t77 18.5t72 29.5t65 39.5t56.5 47.5t47 55t35 61t22 66t7.5 69.5q0 104 -63.5 194.5t-170.5 143t-229 52.5zM768 300
  258 +q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM512 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5zM256 300q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5
  259 +t45.5 -18.5t18.5 -45.5t-18.5 -45.5t-45.5 -18.5z" />
255 </font> 260 </font>
256 </defs></svg> 261 </defs></svg>
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 {{/isLogin}} 13 {{/isLogin}}
14 {{^isLogin}} 14 {{^isLogin}}
15 <div class="user-info"> 15 <div class="user-info">
16 - <a class="login-btn" href="/signin.html"> 16 + <a class="login-btn" href="/signin.html?refer=/home">
17 登录/注册 17 登录/注册
18 </a> 18 </a>
19 </div> 19 </div>
@@ -760,8 +760,8 @@ class HomeController extends AbstractAction @@ -760,8 +760,8 @@ class HomeController extends AbstractAction
760 $this->setNavHeader('物流详情'); 760 $this->setNavHeader('物流详情');
761 761
762 $orderCode = $this->get('order_code'); 762 $orderCode = $this->get('order_code');
763 - $data = OrderModel::Logistics($orderCode, $this->_uid);  
764 - 763 + $data = OrderModel::Logistics($orderCode, $this->_uid);
  764 +
765 $data['logisticInfoPage'] = true; 765 $data['logisticInfoPage'] = true;
766 $data['pageFooter'] = true; 766 $data['pageFooter'] = true;
767 767
@@ -774,26 +774,37 @@ class HomeController extends AbstractAction @@ -774,26 +774,37 @@ class HomeController extends AbstractAction
774 774
775 public function payAction() 775 public function payAction()
776 { 776 {
  777 + // 审判跳转登录页
  778 + $this->auditJumpLogin();
  779 +
777 $this->setTitle('支付'); 780 $this->setTitle('支付');
778 $this->setNavHeader('支付'); 781 $this->setNavHeader('支付');
779 782
  783 + $orderCode = $this->get('order_code');
  784 + if (empty($orderCode)) {
  785 + $this->error();
  786 + }
  787 +
780 $this->_view->display('pay', array( 788 $this->_view->display('pay', array(
781 'payAppInfo' => array( 789 'payAppInfo' => array(
782 0 => array( 790 0 => array(
783 'appIcon' => '', 791 'appIcon' => '',
784 - 'appId' => 'weixin',  
785 - 'app' => '微信支付',  
786 - 'hint' => '需下载微信客户端', 792 + 'payLink' => Helpers::url('/shopping/pay/index', array('order_code' => $orderCode, 'payment_type' => 18)),
  793 + 'appId' => 'alipay',
  794 + 'app' => '支付宝支付',
  795 + 'hint' => '需下载支付宝客户端',
787 'subHint' => '推荐使用', 796 'subHint' => '推荐使用',
788 ), 797 ),
789 1 => array( 798 1 => array(
790 'appIcon' => '', 799 'appIcon' => '',
791 - 'appId' => 'baidu',  
792 - 'app' => '百度支付',  
793 - 'hint' => '需下载百度支付客户端', 800 + 'payLink' => '',
  801 + 'appId' => 'weixin',
  802 + 'app' => '微信支付',
  803 + 'hint' => '需下载微信客户端',
794 'subHint' => '推荐使用', 804 'subHint' => '推荐使用',
795 ), 805 ),
796 ), 806 ),
  807 + 'orderCode' => $orderCode,
797 )); 808 ));
798 } 809 }
799 810
@@ -90,8 +90,9 @@ class OrderModel @@ -90,8 +90,9 @@ class OrderModel
90 //支付方式为非货到付款时,计算订单状态。 90 //支付方式为非货到付款时,计算订单状态。
91 if ($vo['payment_type'] != 2) { 91 if ($vo['payment_type'] != 2) {
92 switch ($vo['status']) { 92 switch ($vo['status']) {
93 - case 0: // 备货中 93 + case 0: // 待付款
94 $result[$key]['unpaid'] = true; 94 $result[$key]['unpaid'] = true;
  95 + $result[$key]['payUrl'] = Helpers::url('/home/pay', array('order_code' => $vo['order_code']));
95 break; 96 break;
96 //未发货&未收货 状态,统一合并到待收货状态。 97 //未发货&未收货 状态,统一合并到待收货状态。
97 case 1: 98 case 1:
@@ -117,7 +118,7 @@ class OrderModel @@ -117,7 +118,7 @@ class OrderModel
117 118
118 //订单为货到付款订单时,计算订单状态。(货到付款没有待付款状态) 119 //订单为货到付款订单时,计算订单状态。(货到付款没有待付款状态)
119 switch ($vo['status']) { 120 switch ($vo['status']) {
120 - case 0: 121 + case 0: // 备货中
121 $result[$key]['unpaid'] = true; 122 $result[$key]['unpaid'] = true;
122 break; 123 break;
123 case 1: 124 case 1: