|
|
@@ -620,6 +620,22 @@ class UserController
|
|
|
return app('json')->success('ok', $member ? $member->toArray() : []);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public function getMember($type, Request $request)
|
|
|
+ {
|
|
|
+ $name = $request->get('name', '');
|
|
|
+ $idcard = $request->get('idcard', '');
|
|
|
+ $info = MemberCheck::where(['status' => 1, 'paid' => 1])->where(compact('type', 'name'));
|
|
|
+ if ($type == 1) $info = $info->where('idcard', $idcard);
|
|
|
+ $info = $info->find();
|
|
|
+ if (!$info) {
|
|
|
+ return app('json')->fail('找不到会员,请检查查询项');
|
|
|
+ } else {
|
|
|
+ $info['grade_info'] = MemberCheck::where(['type' => $info['type'], 'grade' => $info['grade']])->find();
|
|
|
+ return app('json')->success('ok', ['data' => $info]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public function applyMemberCheck(Request $request)
|
|
|
{
|
|
|
$uid = $request->uid();
|