admin/app/api/controller/Controller.php
@@ -10,6 +10,9 @@
use app\JjjController;
use think\facade\Env;
use think\facade\Cache;
use app\api\model\branch\Branch as BranchModel;
use app\common\model\branch\User as BranchUserModel;
/**
 * API控制器基类
 */
@@ -94,6 +97,20 @@
        return $user['supplierUser'];
    }
    /**
     * 获取当前用户分会信息
     */
    protected function getBranch($user)
    {
        // 判断用户是不是分会管理员
        $user = BranchUserModel::detail(['user_id' => $user['user_id']]);
        if (!$user) {
            throw new BaseException(['msg' => '您不是分会的管理员,无法操作', 'code' => -1]);
        }
        return BranchModel::detail($user['branch_id']);
    }
    protected function getShareParams($url, $title = '', $desc = '', $link = '', $imgUrl = '')
    {