Authored by 郝肖肖

gulp ge 4.8.4

... ... @@ -12805,7 +12805,7 @@ if (window.wx) {
}
function onBridgeReady() {
document.addEventListener('WeixinJSBridgeReady', function () {
document.addEventListener('WeixinJSBridgeReady', function() {
window.WeixinJSBridge && window.WeixinJSBridge.call('hideOptionMenu');
});
}
... ... @@ -12830,7 +12830,7 @@ function jsApiCall(orderCode, jsApiParameters) {
window.WeixinJSBridge && window.WeixinJSBridge.invoke(
'getBrandWCPayRequest',
jsApiParameters,
function (res) {
function(res) {
window.location.href = '/home/orders/detail?order_code=' + orderCode + '&openId=' + openId;
}
);
... ... @@ -12849,6 +12849,7 @@ function callpay(orderCode) {
document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
}
} else {
console.log(openId, '=====');
$.ajax({
type: 'GET',
url: '/shopping/pay/wechatwapapi',
... ... @@ -12857,7 +12858,7 @@ function callpay(orderCode) {
'openId': openId,
},
dataType: 'json',
success: function (res) {
success: function(res) {
if (res.code === 200) {
jsApiParameters = res.data.jsApiParameters;
jsApiCall(orderCode, jsApiParameters);
... ... @@ -12865,10 +12866,10 @@ function callpay(orderCode) {
tip.show('微信支付调取失败');
}
},
error: function () {
error: function() {
tip.show('请刷新本页面,完成微信支付');
},
complete: function () {
complete: function() {
$loadingToast.addClass("hide");
}
});
... ... @@ -12885,7 +12886,7 @@ function isWXOpen() {
function hideWeChatPay() {
var $payApps = $('.app');
$payApps.each(function (idx, app) {
$payApps.each(function(idx, app) {
if ($(app).parent().attr('id') === 'weixin') {
$(app).parent().css('display', 'none');
return false;
... ... @@ -12909,7 +12910,7 @@ function loadIcon() {
var $div = null;
var appid = null;
$boxs.each(function (idx, box) {
$boxs.each(function(idx, box) {
$div = $(box).find('.icon').find('div');
if ($div.length > 0) {
appid = $(box).attr('id');
... ... @@ -12927,15 +12928,15 @@ function showPage() {
function bindTouchedEvent() {
var $boxs = $('.box');
$boxs.on('touchstart', function (e) {
$boxs.on('touchstart', function(e) {
$(this).addClass('bytouch');
}).on('touchend touchcancel', function () {
}).on('touchend touchcancel', function() {
$boxs.removeClass('bytouch');
});
}
if (wxHammer) {
wxHammer.on('tap', function () {
wxHammer.on('tap', function() {
callpay(theOrderCode);
});
}
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.