Commit a23d313f authored by wangzhengwen's avatar wangzhengwen

5.26

parent f00549db
......@@ -12,9 +12,7 @@ use think\App;
class PayController
{
protected $middleware = [
Auth::class,
];
/**
* 创建支付订单
......@@ -85,8 +83,8 @@ class PayController
// 发起支付
$alipay = Pay::alipay(PayService::getPayConfig(PayService::PAY_METHOD_ALIPAY))->web($order);
return $alipay->send();
// return redirect($alipay->getTargetUrl());
halt($alipay);
return redirect($alipay->getTargetUrl());
} catch (\Exception $e) {
Log::error("支付创建错误: {$orderNo} - " . $e->getMessage());
return json(['code' => 500, 'msg' => $e->getMessage()]);
......@@ -143,7 +141,7 @@ class PayController
$alipay = Pay::alipay(PayService::getPayConfig(PayService::PAY_METHOD_ALIPAY));
try {
$data = $alipay->verify();
$data = Pay::alipay()->callback();
// 处理支付回调
$result = PayService::handlePaymentNotify($data->out_trade_no, $data->all());
......
......@@ -229,5 +229,34 @@ class User extends BaseController
}
public function editPassword(Request $request)
{
$vo = (new UserValidate())->goCheck(['confirm_password','password','old_password']);
if ($vo !== true) {
return $vo;
}
$data = $request->param();
$userId = $request->userId;
$user = userModel::where('id',$userId)->find();
if (!$user)
{
return $this->returnMsg('用户不存在',0);
}
$data['old_password'] = md5($data['old_password'].$user['salt']);
if ($data['old_password']!=$user['password'])
{
return $this->returnMsg('密码不正确');
}
userModel::where('id',$userId)->update(['password'=>md5($data['password'].$user['salt'])]);
return $this->returnMsg('success',1);
}
}
\ No newline at end of file
<?php
// This file is automatically generated at:2025-05-23 16:08:46
// This file is automatically generated at:2025-05-23 17:01:16
declare (strict_types = 1);
return array (
0 => 'think\\captcha\\CaptchaService',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment