作者 王智

修改

<?php
namespace app\common\controller;
use EasyWeChat\Foundation\Application;
use app\common\library\Auth;
use think\Config;
... ... @@ -14,7 +15,9 @@ use think\Response;
use think\Route;
use think\Validate;
use think\Db;
//use EasyWeChat\Factory;
/**
* API控制器基类
*/
... ... @@ -327,7 +330,7 @@ class Api
protected function IsToken($token)
{
if (empty($token['token'])) {
$this->error('请登录后在操作');
$this->error('请登录后在操作', '', 401);
}
$is_token = Db::name('user')->where(['token' => $token['token']])->find();
if (!$is_token) {
... ... @@ -390,7 +393,8 @@ class Api
}
public function Tuikuan($OrderSn){
public function Tuikuan($OrderSn)
{
$PayOrderInfo = Db::name('pay_order')->where('OrderSn', $OrderSn)->where('type', 1)->find();
$TuiMoney = $PayOrderInfo['UpMoney'] + $PayOrderInfo['Money'];
//配置
... ...