修复错误

This commit is contained in:
mkm 2023-05-12 17:10:56 +08:00
parent 811d472acb
commit b155e394b4

View File

@ -39,6 +39,7 @@ use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\exception\ValidateException;
use think\facade\Cache;
use think\facade\Db;
use think\facade\Log;
use think\facade\Queue;
use crmeb\jobs\SendSmsJob;
@ -165,6 +166,19 @@ class Auth extends BaseController
Cache::set($key,true, new \DateTime($day.' 23:59:59'));
}
}
$data['is_wsxx'] = 0;
$data['mer_info'] = [];
// 判断是否是商户,并且有没有完善信息
//这里有点小问题以后要修改
$store_service = Db::name('store_service')->where('uid', $data['uid'])->find();
if ($store_service) {
$mer_arr = Db::name('merchant')->where('mer_id', $store_service['mer_id'])->where('is_del', 0)->where('status', 1)->field('type_id,mer_avatar,mer_banner,mer_info,service_phone,mer_address,uid,mer_name')->find();
if ($mer_arr && $mer_arr['mer_avatar'] != '' && $mer_arr['mer_banner'] != '' && $mer_arr['mer_info'] && $mer_arr['service_phone'] != '' && $mer_arr['mer_address'] != '') {
$data['is_wsxx'] = 1;
}
$data['mer_info'] = $mer_arr;
}
return app('json')->success($data);
}