1.4.5.2
This commit is contained in:
37
EdgeUser/web/views/@default/finance/pay/index.css
Normal file
37
EdgeUser/web/views/@default/finance/pay/index.css
Normal file
@@ -0,0 +1,37 @@
|
||||
.pay-box {
|
||||
position: relative;
|
||||
}
|
||||
.pay-box .pay-mask {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.pay-box .pay-mask .inner-box {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -2em;
|
||||
margin-left: -2em;
|
||||
}
|
||||
.pay-box .pay-mask .inner-box .qrcode-box {
|
||||
padding: 1em 0;
|
||||
}
|
||||
.pay-box .pay-mask .inner-box .qrcode-box .qrcode-title-box {
|
||||
color: white;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.pay-box .pay-mask .inner-box .qrcode-box img {
|
||||
width: 16em;
|
||||
}
|
||||
.pay-box .pay-mask .inner-box.qrcode {
|
||||
margin-top: -15em;
|
||||
}
|
||||
.pay-box .pay-mask .cancel {
|
||||
margin-top: 1em;
|
||||
}
|
||||
/*# sourceMappingURL=index.css.map */
|
||||
1
EdgeUser/web/views/@default/finance/pay/index.css.map
Normal file
1
EdgeUser/web/views/@default/finance/pay/index.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,kBAAA;;AADD,QAGC;EACC,eAAA;EACA,WAAA;EACA,8BAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,kBAAA;;AAXF,QAGC,UAUC;EACC,kBAAA;EACA,QAAA;EACA,SAAA;EACA,gBAAA;EACA,iBAAA;;AAlBH,QAGC,UAUC,WAOC;EACC,cAAA;;AArBJ,QAGC,UAUC,WAOC,YAGC;EACC,YAAA;EACA,kBAAA;;AAzBL,QAGC,UAUC,WAOC,YAQC;EACC,WAAA;;AA7BL,QAGC,UA+BC,WAAU;EACT,iBAAA;;AAnCH,QAGC,UAmCC;EACC,eAAA","file":"index.css"}
|
||||
63
EdgeUser/web/views/@default/finance/pay/index.html
Normal file
63
EdgeUser/web/views/@default/finance/pay/index.html
Normal file
@@ -0,0 +1,63 @@
|
||||
{$layout}
|
||||
|
||||
<div class="margin"></div>
|
||||
|
||||
<div class="pay-box">
|
||||
<form class="ui form">
|
||||
<table class="ui table definition selectable">
|
||||
<tr>
|
||||
<td class="title">订单号</td>
|
||||
<td>{{order.code}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单金额</td>
|
||||
<td>
|
||||
¥{{order.amount}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单类型</td>
|
||||
<td>
|
||||
{{order.typeName}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式</td>
|
||||
<td>{{order.method.name}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单状态</td>
|
||||
<td>
|
||||
<span v-if="order.isExpired" class="red">已过期</span>
|
||||
<span :class="{green: order.status == 'finished'}" v-else>{{order.statusName}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- URL支付 -->
|
||||
<a :href="order.payURL" target="_blank" class="ui button primary" type="button" v-if="order.canPay && order.urlQRCodeKey.length == 0" @click="goPay">去支付 »</a>
|
||||
|
||||
<!-- QRCode支付 -->
|
||||
<a href="" class="ui button primary" type="button" v-if="order.canPay && order.urlQRCodeKey.length > 0" @click.prevent="goPay">去支付 »</a>
|
||||
|
||||
<span class="red" v-if="order.isExpired">订单已过期,无需支付</span>
|
||||
<a :href="fromURL" v-if="fromURL.length > 0" class="grey">[上一步]</a>
|
||||
</form>
|
||||
|
||||
<div class="pay-mask" v-if="isPaying">
|
||||
<div class="inner-box" :class="{qrcode: order.urlQRCodeKey.length > 0}">
|
||||
<div class="qrcode-box" v-if="order.urlQRCodeKey.length > 0">
|
||||
<div class="qrcode-title-box">
|
||||
<span v-if="order.qrcodeTitle.length > 0">{{order.qrcodeTitle}}</span>
|
||||
<span v-else>请扫描以下二维码完成支付:</span>
|
||||
</div>
|
||||
<img :src="'/qrcode?key=' + order.urlQRCodeKey"/>
|
||||
</div>
|
||||
<div>
|
||||
<a :href="returnURL" class="ui button primary large">我已完成支付</a>
|
||||
</div>
|
||||
<div class="cancel">
|
||||
<a href="" @click.prevent="cancel">暂不支付</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
22
EdgeUser/web/views/@default/finance/pay/index.js
Normal file
22
EdgeUser/web/views/@default/finance/pay/index.js
Normal file
@@ -0,0 +1,22 @@
|
||||
Tea.context(function () {
|
||||
this.isPaying = false
|
||||
|
||||
if (this.returnURL.length == 0) {
|
||||
this.returnURL = "/finance"
|
||||
}
|
||||
|
||||
// 自动刷新页面
|
||||
this.$delay(function () {
|
||||
if (!this.isPaying) {
|
||||
window.location.reload()
|
||||
}
|
||||
}, 600 * 1000)
|
||||
|
||||
this.goPay = function () {
|
||||
this.isPaying = true
|
||||
}
|
||||
|
||||
this.cancel = function () {
|
||||
this.isPaying = false
|
||||
}
|
||||
})
|
||||
43
EdgeUser/web/views/@default/finance/pay/index.less
Normal file
43
EdgeUser/web/views/@default/finance/pay/index.less
Normal file
@@ -0,0 +1,43 @@
|
||||
.pay-box {
|
||||
position: relative;
|
||||
|
||||
.pay-mask {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
|
||||
.inner-box {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -2em;
|
||||
margin-left: -2em;
|
||||
|
||||
.qrcode-box {
|
||||
padding: 1em 0;
|
||||
|
||||
.qrcode-title-box {
|
||||
color: white;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 16em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.inner-box.qrcode {
|
||||
margin-top: -15em;
|
||||
}
|
||||
|
||||
.cancel {
|
||||
margin-top: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user