Test.php 540 字节
<?php

namespace app\api\controller;
use think\Controller;
use think\Db;
use app\common\model\Appraise;
use app\common\library\Token;
use app\common\controller\Api;

/**
 * 测试
 */
class Test extends Api
{
    protected $noNeedLogin = ['test'];
    protected $noNeedRight = '*';

    /**
     * 测试方法
     */
    public function test(){
    	dump($this->auth->getUser());
    	echo '<br>';
        halt(\app\common\model\Cart::where('user_id',$this->auth->getUser()['id'])->where('isbuynow','0')->sum('goods_num'));
    }

    
}