切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
096f45347fb60132679559fc2f2ba6259bd596ea
1 个父辈
353c025a
1 个管道 的构建
通过
耗费 0 秒
54
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
16 行增加
和
5 行删除
app/portal/controller/OrderpageController.php
app/portal/controller/PayController.php
public/themes/simpleboot3/portal/pay/index.html
app/portal/controller/OrderpageController.php
查看文件 @
096f453
...
...
@@ -157,6 +157,20 @@ class OrderpageController extends WeChatBaseController{
}
/**
* 取消支付时
*/
public
function
cancel_pay
(){
$indent_id
=
$this
->
request
->
param
();
$data
=
Db
::
name
(
'indent'
)
->
where
(
'id'
,
$indent_id
[
'id'
])
->
find
();
$money_ratio
=
Db
::
name
(
'money_ratio'
)
->
where
(
'id'
,
1
)
->
find
();
if
(
$data
[
'indent_type'
]
==
2
&&
$data
[
'is_courier'
]
==
2
){
Db
::
name
(
'indent'
)
->
where
(
'id'
,
$indent_id
[
'id'
])
->
setDec
(
'money'
,
$money_ratio
[
'courier'
]);
}
$this
->
redirect
(
'index/index'
);
}
...
...
app/portal/controller/PayController.php
查看文件 @
096f453
...
...
@@ -66,6 +66,7 @@ class PayController extends HomeBaseController
$this
->
assign
(
'name'
,
'北京煊坤博文图书有限公司'
);
$this
->
assign
(
'price'
,
$data
[
'money'
]);
$this
->
assign
(
'order_number'
,
$data
[
'order_number'
]);
$this
->
assign
(
'indent_id'
,
$data
[
'id'
]);
$this
->
assign
(
'jsApiParameters'
,
json_encode
(
$jsApiParameters
));
return
$this
->
fetch
();
}
else
{
...
...
@@ -241,11 +242,6 @@ class PayController extends HomeBaseController
}
}
else
{
cache
(
'a'
,
'33333'
);
if
(
$order
[
'indent_type'
]
==
2
&&
$order
[
'is_courier'
]
==
2
){
cache
(
'a'
,
'33333'
);
}
}
return
true
;
// 返回处理完成
...
...
public/themes/simpleboot3/portal/pay/index.html
查看文件 @
096f453
...
...
@@ -17,6 +17,7 @@
alert
(
res
.
err_code
+
res
.
err_desc
+
res
.
err_msg
);
if
(
res
.
err_msg
==
'get_brand_wcpay_request:cancel'
){
//支付取消逻辑
window
.
location
.
href
=
"{:url('Orderpage/cancel_pay',array('id'=>$indent_id))}"
;
}
else
if
(
res
.
err_msg
==
'get_brand_wcpay_request:ok'
){
//支付成功逻辑
window
.
location
.
href
=
"{:url('index/index')}"
;
...
...
请
注册
或
登录
后发表评论