Skip to content

Commit add9c2d

Browse files
author
dreamn
committed
修复内置商城无法微信支付的问题
1 parent 504ce95 commit add9c2d

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
**普通更新,直接删除install目录直接覆盖安装即可,注意修改config.php的相关配置文件**
22

3+
#### Ver. 2.4(2020.05.09)
4+
5+
1、[BUG]修复内置商城无法使用微信支付的问题
6+
37
#### Ver. 2.3(2020.05.09)
48

59
1、[更新]修复因为文件写入权限问题导致二维码识别失败的情况
@@ -8,6 +12,7 @@
812
**重要更新**
913

1014
1、[BUG]修复核心框架组件导致的客户端无法访问的问题
15+
1116
2、[BUG]修复添加应用失败的问题
1217

1318
#### Ver. 2.1(2020.05.04)

install/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
define('APP_NAME','Vpay');
3-
define('APP_VER','2.3');
3+
define('APP_VER','2.4');
44
define('APP_UPDATE','2020.05.09');
55
define('APP_AUTHOR','Dreamn');
66
define('APP_TITLE','V免签安装向导');

protected/controller/admin/BaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class BaseController extends Controller
99
{
1010
public $layout = "layout";
11-
public $version='2.3';
11+
public $version='2.4';
1212

1313
function init()
1414
{

protected/controller/index/BuyController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function actionCreate(){
9494

9595
$payId=$vpay->getPayId($price,$param);
9696

97-
$type=intval(arg('type'))===1?1:2;
97+
98+
$type=intval(arg('type'));
9899

99100
$html=1;//是否使用自带的支付页面,为0表示不使用自带的支付页面
100101

protected/model/Order.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ public function createOrder($arg)
183183
$timeout=intval($time)*60+$createDate;
184184
//获得真实的支付金额
185185
if (!$this->getPayMoney($arg["price"], $arg["type"],$timeout))return false;
186-
//对参数进行解码,进行url编码防止传输过程中中断
187-
$json=json_decode(urldecode($arg["param"]));
188186

189187
//取得支付二维码
190188
if (!$this->getPayPic())return false;

protected/view/index/buy_return.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ <h2>优雅的个人自动化收款解决方案</h2>
6464
form = layui.form;
6565
form.on('submit(alipay)',function () {
6666
var arr=form.val('Tsetform');
67-
arr.type=1;
67+
arr.type=2;
6868
post('<{url c="buy" a="create"}>',arr);
6969
return false;
7070
});
7171
form.on('submit(wechat)',function () {
7272
var arr=form.val('Tsetform');
73-
arr.type=2;
73+
arr.type=1;
7474
post('<{url c="buy" a="create"}>',arr);
7575
return false;
7676
});

protected/view/index/shop_index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <h2>优雅的个人自动化收款解决方案</h2>
4747
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
4848
<legend>支付测试</legend>
4949
</fieldset>
50-
<form class="layui-form layui-form-pane" style="max-width: 500px;margin: 0 auto" lay-filter="Tsetform">
50+
<form class="layui-form layui-form-pane" style="max-width: 500px;margin: 0 auto" lay-filter="Testform">
5151
<div class="layui-form-item">
5252
<label class="layui-form-label">商品选择</label>
5353
<div class="layui-input-block">
@@ -85,13 +85,13 @@ <h2>优雅的个人自动化收款解决方案</h2>
8585
element = layui.element,
8686
form = layui.form;
8787
form.on('submit(alipay)',function () {
88-
var arr=form.val('Tsetform');
88+
var arr=form.val('Testform');
8989
arr.type=1;
9090
post('<{url c="buy" a="create"}>',arr);
9191
return false;
9292
});
9393
form.on('submit(wechat)',function () {
94-
var arr=form.val('Tsetform');
94+
var arr=form.val('Testform');
9595
arr.type=2;
9696
post('<{url c="buy" a="create"}>',arr);
9797
return false;

0 commit comments

Comments
 (0)