|
@@ -128,6 +128,11 @@
|
|
|
<script>
|
|
|
$(function () {
|
|
|
var checkout = {
|
|
|
+ data: {
|
|
|
+ token: '',
|
|
|
+ noLogin: false, // 是否免登陆支付
|
|
|
+ orderPrice: ''
|
|
|
+ },
|
|
|
modeMap: {
|
|
|
'weixin': 'wx_js',
|
|
|
},
|
|
@@ -139,10 +144,25 @@
|
|
|
mode: 'wx_js',
|
|
|
loading: null,
|
|
|
init: function () {
|
|
|
+ this.getParams()
|
|
|
this.show()
|
|
|
this.clickEventsWithPayMode()
|
|
|
this.confirmPayEvent()
|
|
|
},
|
|
|
+ getParams: function () {
|
|
|
+ var orderPrice = utils.getParam('order_price')
|
|
|
+ var noLogin= utils.getParam('no_login')
|
|
|
+ var token= utils.getParam('token')
|
|
|
+ if (orderPrice) {
|
|
|
+ this.data.orderPrice = orderPrice
|
|
|
+ }
|
|
|
+ if (noLogin) {
|
|
|
+ this.data.noLogin = noLogin
|
|
|
+ }
|
|
|
+ if (token) {
|
|
|
+ this.data.token = token
|
|
|
+ }
|
|
|
+ },
|
|
|
show: function () {
|
|
|
$(".price-container .price").text(checkout.formatMoney({{.T.data.return_money}} / 100));
|
|
|
},
|