|
@@ -185,7 +185,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
.spa-page-pay-success .result-content {
|
|
.spa-page-pay-success .result-content {
|
|
- background: #c7af34;
|
|
|
|
|
|
+ background: #8bc34a;
|
|
padding-top: 38px;
|
|
padding-top: 38px;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -220,8 +220,8 @@
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
padding: 10px 25px;
|
|
padding: 10px 25px;
|
|
margin-top: 0;
|
|
margin-top: 0;
|
|
- background: #c7af34;
|
|
|
|
- border-color: #c7af34;
|
|
|
|
|
|
+ background: #8bc34a;
|
|
|
|
+ border-color: #8bc34a;
|
|
}
|
|
}
|
|
|
|
|
|
.spa-page-pay-success #icon-success {
|
|
.spa-page-pay-success #icon-success {
|
|
@@ -291,6 +291,7 @@
|
|
<script>
|
|
<script>
|
|
if (location.search.length > 1) {
|
|
if (location.search.length > 1) {
|
|
var urlParam = {};
|
|
var urlParam = {};
|
|
|
|
+ // 循环遍历WebApp通过url传过来的参数,赋值给urlParam
|
|
for (var aItKey, nKeyId = 0, aCouples = location.search.substr(1).split("&"); nKeyId < aCouples.length; nKeyId++) {
|
|
for (var aItKey, nKeyId = 0, aCouples = location.search.substr(1).split("&"); nKeyId < aCouples.length; nKeyId++) {
|
|
aItKey = aCouples[nKeyId].split("=");
|
|
aItKey = aCouples[nKeyId].split("=");
|
|
urlParam[decodeURIComponent(aItKey[0])] = aItKey.length > 1 ? decodeURIComponent(aItKey[1]) : "";
|
|
urlParam[decodeURIComponent(aItKey[0])] = aItKey.length > 1 ? decodeURIComponent(aItKey[1]) : "";
|
|
@@ -299,9 +300,8 @@
|
|
var amount = urlParam.amount,
|
|
var amount = urlParam.amount,
|
|
created = urlParam.created,
|
|
created = urlParam.created,
|
|
bookingTime = urlParam.bookingTime,
|
|
bookingTime = urlParam.bookingTime,
|
|
- body = urlParam.body,
|
|
|
|
- isSpecial = urlParam.isSpecial;
|
|
|
|
-
|
|
|
|
|
|
+ body = urlParam.body;
|
|
|
|
+ // 获取当前年月日时分
|
|
function formatDate(now) {
|
|
function formatDate(now) {
|
|
var d = new Date(now * 1000);
|
|
var d = new Date(now * 1000);
|
|
var year = d.getFullYear();
|
|
var year = d.getFullYear();
|
|
@@ -314,7 +314,6 @@
|
|
|
|
|
|
created = formatDate(created);
|
|
created = formatDate(created);
|
|
amount = amount / 100;
|
|
amount = amount / 100;
|
|
-
|
|
|
|
$('#order-name').text(body);
|
|
$('#order-name').text(body);
|
|
if (bookingTime != 'undefined') {
|
|
if (bookingTime != 'undefined') {
|
|
$('#order-time').text(bookingTime);
|
|
$('#order-time').text(bookingTime);
|
|
@@ -323,7 +322,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
$('#order-result').text(amount + '元');
|
|
$('#order-result').text(amount + '元');
|
|
-
|
|
|
|
|
|
+ // 支付
|
|
$('.btn-pay').click(function () {
|
|
$('.btn-pay').click(function () {
|
|
callpay();
|
|
callpay();
|
|
});
|
|
});
|
|
@@ -341,12 +340,8 @@
|
|
}, function (res) {
|
|
}, function (res) {
|
|
console.log(res);
|
|
console.log(res);
|
|
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
|
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
|
- if (isSpecial) {
|
|
|
|
- location.href = '/o2o/web/index#bargain';
|
|
|
|
- } else {
|
|
|
|
- $('.j-pay-btn').hide();
|
|
|
|
- $('.j-pay-result').show();
|
|
|
|
- }
|
|
|
|
|
|
+ $('.j-pay-btn').hide();
|
|
|
|
+ $('.j-pay-result').show();
|
|
} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
|
} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
|
// alert('取消支付');
|
|
// alert('取消支付');
|
|
} else {
|
|
} else {
|