Authored by biao

add pay center page

/**
* 支付页面
* @author: 赵彪<bill.zhao@yoho.cn>
* @date: 2015/12/03
*/
function isWXOpen() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) === 'micromessenger') {
return true;
} else {
return false;
}
}
function hideWeChatPay() {
var payApps = document.getElementsByClassName('app');
Arrary.prototype.forEach.call(payApps, function(app, index) {
if (app.innerHTML.indexOf('微信') != -1) {
app.parentNode.style.display = 'none';
return false;
}
});
}
function handleForWX() {
if (isWXOpen()) {
hideWeChatPay();
}
}
window.onload = handleForWX;
... ...
$vip: sprite-map("me/vip/*.png", $spacing: 10px);
$fav: sprite-map("me/fav/*.png", $spacing: 5px);
@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp", "browse-record";
@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang", "ihelp", "browse-record", "pay";
... ...
.pay-page {
padding: (40rem / $pxConvertRem) (20rem / $pxConvertRem) 0;
.box {
border: 1px solid #eee;
border-radius: 10rem / $pxConvertRem;
padding: (12rem / $pxConvertRem) (20rem / $pxConvertRem);
display: flex;
align-items: center;
margin-bottom: 20rem / $pxConvertRem;
> div {
min-height: 40rem / $pxConvertRem;
display: flex;
align-items: center;
}
.icon {
flex-grow: 0.3;
img {
width: 60rem / $pxConvertRem;
margin: 0;
}
}
.app {
flex-grow: 3;
font-size: 32rem / $pxConvertRem;
color: #414141;
//padding-left: 20rem/$pxConvertRem
}
.hint {
flex-grow: 4;
font-size: 24rem / $pxConvertRem;
color: #4b4b4b;
}
.iconfont {
flex-grow: 1;
justify-content: flex-end;
color: #e0e0e0;
font-size: 28rem / $pxConvertRem;
}
}
}
... ...
{{> layout/header}}
<div class="pay-page yoho-page">
{{# payAppInfo}}
<div class="box">
<div class="icon">
<img src="{{appIcon}}" alt="app图标">
</div>
<div class="app">{{app}}</div>
<div class="hint">
{{hint}}
{{#if subHint}}
<br>
{{subHint}}
{{/if}}
</div>
<div class="iconfont">&#xe604</div>
</div>
{{/ payAppInfo}}
</div>
{{> layout/footer}}
... ...
... ... @@ -277,15 +277,12 @@
</script>
{{/if}}
{{#if browseRecordPage}}
<<<<<<< HEAD
<script>
seajs.use('js/me/browse-record');
</script>
{{/if}}
{{#if logisticInfoPage}}
=======
>>>>>>> feature/hf
{{#if payCenterPage}}
<script>
seajs.use('js/me/logistic');
seajs.use('js/me/pay');
</script>
{{/if}}
... ...