Authored by uedxwg

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into feature/xieweiguang

@@ -107,7 +107,7 @@ @@ -107,7 +107,7 @@
107 } 107 }
108 108
109 ## 首页 109 ## 首页
110 - 110 +
111 { 111 {
112 headerDownload: { 112 headerDownload: {
113 img: '', 113 img: '',
@@ -249,7 +249,7 @@ @@ -249,7 +249,7 @@
249 249
250 ## 逛 250 ## 逛
251 ### 资讯(公用) 251 ### 资讯(公用)
252 - 252 +
253 { 253 {
254 id: 1, 254 id: 1,
255 showTags: true/false, //是否显示标签 255 showTags: true/false, //是否显示标签
@@ -305,9 +305,9 @@ @@ -305,9 +305,9 @@
305 } 305 }
306 306
307 ### 逛列表页 307 ### 逛列表页
308 - 308 +
309 { 309 {
310 - infos: 310 + infos:
311 [ 311 [
312 {...}, //标签 312 {...}, //标签
313 ... 313 ...
@@ -724,7 +724,7 @@ @@ -724,7 +724,7 @@
724 }, 724 },
725 ... 725 ...
726 ] 726 ]
727 - 727 +
728 } 728 }
729 729
730 ## 商品列表页 730 ## 商品列表页
@@ -987,14 +987,14 @@ @@ -987,14 +987,14 @@
987 canceled: true, //已取消 987 canceled: true, //已取消
988 unpaid: true, //or 未支付 988 unpaid: true, //or 未支付
989 unreceived: '', //or 待收货(未发货/未收货),查看物流URL 989 unreceived: '', //or 待收货(未发货/未收货),查看物流URL
990 - 990 +
991 //待收货时传递物流参数 991 //待收货时传递物流参数
992 logisticsUrl: '' 992 logisticsUrl: ''
993 993
994 } 994 }
995 995
996 ### 订单详情页 996 ### 订单详情页
997 - 997 +
998 { 998 {
999 orderDetail: { 999 orderDetail: {
1000 orderNum: '', //订单号 1000 orderNum: '', //订单号
@@ -1006,7 +1006,7 @@ @@ -1006,7 +1006,7 @@
1006 orderStatus: '订单成功', //订单取消...等订单状态 1006 orderStatus: '订单成功', //订单取消...等订单状态
1007 orderNum: '', 1007 orderNum: '',
1008 orderTime: '', 1008 orderTime: '',
1009 - 1009 +
1010 //订单状态 1010 //订单状态
1011 canceled: true, //是否是取消的订单 1011 canceled: true, //是否是取消的订单
1012 completed: true, //是否是已完成订单 1012 completed: true, //是否是已完成订单
@@ -1060,7 +1060,7 @@ @@ -1060,7 +1060,7 @@
1060 'navHome': 'sss ', 1060 'navHome': 'sss ',
1061 'navTitle': '商品详情' 1061 'navTitle': '商品详情'
1062 }, 1062 },
1063 - 1063 +
1064 'bannerTop': { 1064 'bannerTop': {
1065 'list': [ 1065 'list': [
1066 { 1066 {
@@ -1090,7 +1090,7 @@ @@ -1090,7 +1090,7 @@
1090 is_soon_sold_out: true //即将售罄 1090 is_soon_sold_out: true //即将售罄
1091 } 1091 }
1092 ], 1092 ],
1093 - 1093 +
1094 'goodsName' : 'Stussy No. 4 BOX TEE ', 1094 'goodsName' : 'Stussy No. 4 BOX TEE ',
1095 'goodsSubtitle' : '【全民拼抢购】经典印花T恤,满4件免一件!', 1095 'goodsSubtitle' : '【全民拼抢购】经典印花T恤,满4件免一件!',
1096 1096
@@ -1166,25 +1166,25 @@ @@ -1166,25 +1166,25 @@
1166 1166
1167 'detail' : { 1167 'detail' : {
1168 'list' : [ 1168 'list' : [
1169 - { 1169 + {
1170 'params' : [ 1170 'params' : [
1171 - { 1171 + {
1172 'param' : '尺寸' 1172 'param' : '尺寸'
1173 }, 1173 },
1174 - ... 1174 + ...
1175 ] 1175 ]
1176 }, 1176 },
1177 ... 1177 ...
1178 ] 1178 ]
1179 } 1179 }
1180 }, 1180 },
1181 - 1181 +
1182 'measurementMethod' : { 1182 'measurementMethod' : {
1183 'title': '测量方式', 1183 'title': '测量方式',
1184 'enTitle': 'MEASUREMENT METHOD', 1184 'enTitle': 'MEASUREMENT METHOD',
1185 'img' : '', 1185 'img' : '',
1186 }, 1186 },
1187 - 1187 +
1188 'reference' : { 1188 'reference' : {
1189 'title' : '模特试穿', 1189 'title' : '模特试穿',
1190 'enTitle' : '', 1190 'enTitle' : '',
@@ -1243,6 +1243,32 @@ @@ -1243,6 +1243,32 @@
1243 'cartInfo' : { 1243 'cartInfo' : {
1244 'numInCart' : 3, 1244 'numInCart' : 3,
1245 'goodsInstore' : 0, 1245 'goodsInstore' : 0,
1246 - 'isCollect':true// 1246 + 'isCollect':true//
1247 } 1247 }
1248 } 1248 }
  1249 +
  1250 +### 支付中心
  1251 +
  1252 + {
  1253 + 'payAppInfo' : {
  1254 + 'appIcon' : 'http://static.yohobuy.com/images/icon.png',
  1255 + 'payLink' : '/weixin/pay/'
  1256 + 'app' : '微信支付',
  1257 + 'hint' : '需下载微信客户端',
  1258 + 'subHint' : '推荐使用'
  1259 + }
  1260 + }
  1261 +
  1262 +### 物流详情
  1263 +
  1264 + {
  1265 + 'logisticImg' : 'http://static.yohobuy.com/images/icon.png',
  1266 + 'logisticUrl' : 'http://www.shunfeng.com',
  1267 + 'logisticCompany' : '顺丰',
  1268 + 'logisticNumber' : '1231231231',
  1269 + 'logisticDetail' : {
  1270 + 'status' : '南京市 派送中',
  1271 + 'date' : '2015-12-03'
  1272 + }
  1273 + }
  1274 +
@@ -15,3 +15,5 @@ require('./address'); @@ -15,3 +15,5 @@ require('./address');
15 require('./suggest'); 15 require('./suggest');
16 require('./browse-record'); 16 require('./browse-record');
17 require('./address-act'); 17 require('./address-act');
  18 +require('./logistic');
  19 +require('./pay');
@@ -3,12 +3,11 @@ @@ -3,12 +3,11 @@
3 * @author: 赵彪<bill.zhao@yoho.cn> 3 * @author: 赵彪<bill.zhao@yoho.cn>
4 * @date: 2015/12/03 4 * @date: 2015/12/03
5 */ 5 */
6 - 6 +var loading = require('../plugin/loading');
7 7
8 function isWXOpen() { 8 function isWXOpen() {
9 var ua = navigator.userAgent.toLowerCase(); 9 var ua = navigator.userAgent.toLowerCase();
10 10
11 -  
12 if (ua.match(/MicroMessenger/i) === 'micromessenger') { 11 if (ua.match(/MicroMessenger/i) === 'micromessenger') {
13 return true; 12 return true;
14 } else { 13 } else {
@@ -19,7 +18,6 @@ function isWXOpen() { @@ -19,7 +18,6 @@ function isWXOpen() {
19 function hideWeChatPay() { 18 function hideWeChatPay() {
20 var payApps = document.getElementsByClassName('app'); 19 var payApps = document.getElementsByClassName('app');
21 20
22 -  
23 [].forEach.call(payApps, function(app, index) { 21 [].forEach.call(payApps, function(app, index) {
24 if (app.innerHTML.indexOf('微信') !== -1) { 22 if (app.innerHTML.indexOf('微信') !== -1) {
25 app.parentNode.style.display = 'none'; 23 app.parentNode.style.display = 'none';
@@ -29,9 +27,61 @@ function hideWeChatPay() { @@ -29,9 +27,61 @@ function hideWeChatPay() {
29 } 27 }
30 28
31 function handleForWX() { 29 function handleForWX() {
32 - if (isWXOpen()) { 30 + if (!isWXOpen()) {
33 hideWeChatPay(); 31 hideWeChatPay();
34 } 32 }
35 } 33 }
36 34
37 -window.onload = handleForWX; 35 +function setIcon(div, appName) {
  36 +
  37 + if (appName.indexOf('百度') !== -1) {
  38 + div.style.backgroundPositionY = '-2.7rem';
  39 + return false;
  40 + }
  41 +
  42 + if (appName.indexOf('微信') !== -1) {
  43 + div.style.backgroundPositionY = '-1.2rem';
  44 + return false;
  45 + }
  46 +
  47 + if (appName.indexOf('银联') !== -1) {
  48 + div.style.backgroundPositionY = '-4rem';
  49 + return false;
  50 + }
  51 +
  52 + if (appName.indexOf('QQ') !== -1) {
  53 + div.style.backgroundPositionY = '-5.4rem';
  54 + return false;
  55 + }
  56 +}
  57 +
  58 +function loadIcon() {
  59 + var boxs = document.getElementsByClassName('box');
  60 + var div = null;
  61 + var appName = null;
  62 +
  63 + [].forEach.call(boxs, function(box, index) {
  64 + div = box.getElementsByClassName('icon')[0].getElementsByTagName('div')[0];
  65 + if (div) {
  66 + appName = box.getElementsByClassName('app')[0].innerHTML;
  67 + setIcon(div, appName);
  68 + }
  69 + });
  70 +}
  71 +
  72 +function showPage() {
  73 + var pageList = document.getElementsByClassName('payapp-list')[0];
  74 +
  75 + pageList.style.visibility = 'visible';
  76 +}
  77 +
  78 +function main() {
  79 + handleForWX();
  80 + loading.hideLoadingMask();
  81 + showPage();
  82 + loadIcon();
  83 +}
  84 +
  85 +loading.showLoadingMask();
  86 +
  87 +window.onload = main;
1 $vip: sprite-map("me/vip/*.png", $spacing: 10px); 1 $vip: sprite-map("me/vip/*.png", $spacing: 10px);
2 $fav: sprite-map("me/fav/*.png", $spacing: 5px); 2 $fav: sprite-map("me/fav/*.png", $spacing: 5px);
3 3
4 -@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp", "browse-record"; 4 +@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp", "browse-record", "pay";
5 5
1 .pay-page { 1 .pay-page {
2 padding: (40rem / $pxConvertRem) (20rem / $pxConvertRem) 0; 2 padding: (40rem / $pxConvertRem) (20rem / $pxConvertRem) 0;
3 3
  4 + .payapp-list {
  5 + visibility: hidden;
  6 + }
  7 +
4 .box { 8 .box {
5 border: 1px solid #eee; 9 border: 1px solid #eee;
6 border-radius: 10rem / $pxConvertRem; 10 border-radius: 10rem / $pxConvertRem;
@@ -16,31 +20,37 @@ @@ -16,31 +20,37 @@
16 } 20 }
17 21
18 .icon { 22 .icon {
19 - flex-grow: 0.3; 23 + width: 15%;
20 24
21 img { 25 img {
22 width: 60rem / $pxConvertRem; 26 width: 60rem / $pxConvertRem;
23 margin: 0; 27 margin: 0;
24 } 28 }
  29 + > div {
  30 + width: 60rem / $pxConvertRem;
  31 + height: 60rem / $pxConvertRem;
  32 + background-image: url(http://localhost:8000/img/layout/pay-icon.png);
  33 + background-size: 90%;
  34 + background-position-y: 8rem / $pxConvertRem;
  35 + background-position-x: center;
  36 + background-repeat: no-repeat;
  37 + }
25 } 38 }
26 39
27 .app { 40 .app {
28 - flex-grow: 3; 41 + width: 40%;
29 font-size: 32rem / $pxConvertRem; 42 font-size: 32rem / $pxConvertRem;
30 color: #414141; 43 color: #414141;
31 -  
32 - //padding-left: 20rem/$pxConvertRem  
33 -  
34 } 44 }
35 45
36 .hint { 46 .hint {
37 - flex-grow: 4; 47 + width: 40%;
38 font-size: 24rem / $pxConvertRem; 48 font-size: 24rem / $pxConvertRem;
39 color: #4b4b4b; 49 color: #4b4b4b;
40 } 50 }
41 51
42 .iconfont { 52 .iconfont {
43 - flex-grow: 1; 53 + width: 5%;
44 justify-content: flex-end; 54 justify-content: flex-end;
45 color: #e0e0e0; 55 color: #e0e0e0;
46 font-size: 28rem / $pxConvertRem; 56 font-size: 28rem / $pxConvertRem;
1 -{{> layout/header}}  
2 -<div class="logistic-page yoho-page">  
3 - <div class="overview">  
4 - <div class="left" >  
5 - <div class="icon" style='background-image:url("{{logisticImg}}")'> </div>  
6 - </div>  
7 -  
8 - <div class="right">  
9 - <div>  
10 - <span class='info'>物流公司:</span>  
11 - <span >{{logisticCompany}}</span>  
12 - </div>  
13 - <div>  
14 - <span class='info'>快递单号:</span>  
15 - <span>{{logisticNumber}}</span>  
16 - </div>  
17 - </div>  
18 -  
19 - </div>  
20 -  
21 - <div class="title">  
22 - <span>物流详情</span>  
23 - </div>  
24 -  
25 - <div class="detail">  
26 - {{# logisticDetail}}  
27 - <div class="timeline-box ">  
28 - <span class="timeline-node"></span>  
29 - <div class="timeline-info">  
30 - <div class="timeline-info-row">  
31 - {{ city}}&nbsp;&nbsp;&nbsp;{{ status}}  
32 - </div>  
33 - <div class="timeline-info-row">  
34 - {{date}}  
35 - </div>  
36 - </div>  
37 - </div>  
38 - {{/ logisticDetail}}  
39 - </div>  
40 -</div>  
41 -{{> layout/footer}}  
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="pay-page yoho-page"> 2 <div class="pay-page yoho-page">
3 - {{# payAppInfo}}  
4 - <div class="box">  
5 - <div class="icon">  
6 - <img src="{{appIcon}}" alt="app图标">  
7 - </div>  
8 - <div class="app">{{app}}</div>  
9 - <div class="hint">  
10 - {{hint}}  
11 - {{#if subHint}}  
12 - <br>  
13 - {{subHint}}  
14 - {{/if}}  
15 -  
16 - </div>  
17 - <div class="iconfont">&#xe604</div> 3 + <div class="payapp-list">
  4 + {{# payAppInfo}}
  5 + <a href="{{payLink}}">
  6 + <div class="box">
  7 + <div class="icon">
  8 + {{#if appIcon}}
  9 + <img src="{{appIcon}}" alt="app图标">
  10 + {{else}}
  11 + <div></div>
  12 + {{/if}}
  13 + </div>
  14 + <div class="app">{{app}}</div>
  15 + <div class="hint">
  16 + {{hint}}
  17 + {{#if subHint}}
  18 + <br>
  19 + {{subHint}}
  20 + {{/if}}
  21 + </div>
  22 + <div class="iconfont">&#xe604</div>
  23 + </div>
  24 + </a>
  25 + {{/ payAppInfo}}
18 </div> 26 </div>
19 - {{/ payAppInfo}}  
20 -  
21 </div> 27 </div>
22 {{> layout/footer}} 28 {{> layout/footer}}
23 29
@@ -288,7 +288,10 @@ @@ -288,7 +288,10 @@
288 </script> 288 </script>
289 {{/if}} 289 {{/if}}
290 {{#if logisticInfoPage}} 290 {{#if logisticInfoPage}}
291 -<script>  
292 seajs.use('js/me/logistic'); 291 seajs.use('js/me/logistic');
  292 +{{/if}}
  293 +{{#if payCenterPage}}
  294 +<script>
  295 + seajs.use('js/me/pay');
293 </script> 296 </script>
294 {{/if}} 297 {{/if}}