From e9f8449468248d728d989ec208b383d04481f470 Mon Sep 17 00:00:00 2001
From: tpingzhang <635929049@qq.com>
Date: Fri, 18 Oct 2019 14:54:48 +0800
Subject: [PATCH] =?UTF-8?q?eregi=20php5.3=20=E5=BA=9F=E5=BC=83=20preg=5Fma?=
=?UTF-8?q?tch=20apple=20=E6=94=AF=E4=BB=98=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Sdk/View/default/Spend/pay_way.html | 485 +++++++++---------
.../Vendor/WxPayPubHelper/WxPayPubHelper.php | 3 +-
2 files changed, 234 insertions(+), 254 deletions(-)
diff --git a/Application/Sdk/View/default/Spend/pay_way.html b/Application/Sdk/View/default/Spend/pay_way.html
index a810aed6f..eea05953e 100644
--- a/Application/Sdk/View/default/Spend/pay_way.html
+++ b/Application/Sdk/View/default/Spend/pay_way.html
@@ -1,270 +1,249 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
- 支付中心
-
-
+ return false;
+ });
+
+ $('#alipaybtn').on('click',function() {
+ var that = $(this),url = $.trim(that.attr('data-url'));
+ if(that.hasClass('disabledbtn')){return false;}
+ that.addClass('disabled');
+ $.ajax({
+ type:'post',
+ dataType:'json',
+ data:{},
+ url:url,
+ success:function(result) {
+ if(result.code==200) {
+ var data = result.data;
+ if(data.wap==1) {
+
+ location.href = data.url;
+
+ } else if (data.wap==1) {
+ window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
+ }
+ else {
-
-
-
-
-
-
-
{$balance+$bind_balance}平台币
-
-
-
-
-
-
-¥{$balance+$bind_balance}
-
-
-
-
-
+ window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
-
-
- 确认支付
-
-
-
+
\ No newline at end of file
diff --git a/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php b/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php
index ecabb54c8..7b843e63e 100644
--- a/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php
+++ b/ThinkPHP/Library/Vendor/WxPayPubHelper/WxPayPubHelper.php
@@ -406,7 +406,8 @@ class UnifiedOrder_pub extends Wxpay_client_pub
$ips=explode (', ', $_SERVER['HTTP_X_FORWARDED_FOR']);
if($ip){ array_unshift($ips, $ip); $ip=FALSE; }
for ($i=0; $i < count($ips); $i++){
- if(!eregi ('^(10│172.16│192.168).', $ips[$i])){
+ if(!preg_match ('/^(10│172.16│192.168)./', $ips[$i])){
+// if(!eregi ('^(10│172.16│192.168).', $ips[$i])){
$ip=$ips[$i];
break;
}