上传解除屏蔽

This commit is contained in:
“wanyongkang”
2024-04-17 16:12:42 +08:00
parent 19a4ddb8e2
commit e58a2b6ca4
2 changed files with 87 additions and 1 deletions

View File

@@ -20,6 +20,14 @@ class Index extends Controller
$userid = $this->userinfo['UserId'];
$data = $_POST;
$agreement_model = new AgreementModel;
$is_ipload = $agreement_model->getOne(['user_id' => $userid]);
if (!empty($is_ipload)) {
echo json_encode(['code' => -1,'msg'=>'已经上传过!']);die;
}
$xieyi = $_FILES['xieyi'];
@@ -56,7 +64,6 @@ class Index extends Controller
list($ret, $err) = $uploadMgr->putFile($token, $xieyi_key, $xieyi_filePath, null, 'application/octet-stream', true, null, 'v2');
$agreement_data['xieyi'] = 'http://zip.juip.com/'.$xieyi_key;
$agreement_model = new AgreementModel;
$status = $agreement_model->add($agreement_data);
if ($status) {