<?php

namespace app\api\controller;

use app\common\controller\Common;
use think\facade\Session;
use think\Request;

/**
 * 常用api
 * Class Toget
 * @package app\api\controller
 */
class Customer extends Common
{
    /**
     * 退出
     * @param Request $r
     */
    public function logout(Request $r)
    {
        if ($r->isAjax()) {
            Session::delete('cust_info');
            Session::delete('yes_apply');
            Session::delete('login_status');
            Session::delete('to_apply');
            return json(['code' => 200, 'url' => '']);
        }
    }
}