| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | <?php/** * Created by PhpStorm. * Author: NODELOG * DateTime: 2017/3/8 10:09 * Description: */namespace api\modules\v1\controllers;use abei2017\wx\Application;use abei2017\wx\mini\qrcode\Qrcode;use api\common\behaviors\QueryParamAuth;use api\common\controllers\Controller;use api\common\models\User;use api\modules\v1\models\UserEditForm;use common\enums\CodeEnum;use common\models\Store;use common\models\Voice;use common\modules\attachment\models\Attachment;use Yii;use yii\base\Exception;use yii\helpers\ArrayHelper;use yii\web\NotFoundHttpException;use yii\web\ServerErrorHttpException;class UserController extends Controller{    public function behaviors()    {        return ArrayHelper::merge(parent::behaviors(), [            [                'class' => QueryParamAuth::className(),                'tokenParam' => 'token',            ]        ]);    }    /**     * 刷新用户信息     * @return array     * @author nodelog     */    public function actionRefresh()    {//        request()->setQueryParams(['expand' => 'profile,qrcode,count,countMenu']);        return ['data' => User::findOne(Yii::$app->user->id)];    }}
 |