mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 07:20:56 +00:00
【程序目录】新增检测小程序是否存在方法
This commit is contained in:
parent
d3c3b379d1
commit
a8cc4a734f
@ -360,9 +360,9 @@ class UserBillController
|
||||
$systemAttachment->delete(['name' => $name]);
|
||||
}
|
||||
$siteUrl = sys_config('site_url');
|
||||
if (!$imageInfo) {
|
||||
/** @var QrcodeServices $qrCode */
|
||||
$qrCode = app()->make(QrcodeServices::class);
|
||||
/** @var QrcodeServices $qrCode */
|
||||
$qrCode = app()->make(QrcodeServices::class);
|
||||
if (!$imageInfo && !$qrCode->qrCOdeExist($user['uid'], 'spread')) {
|
||||
$resForever = $qrCode->qrCodeForever($user['uid'], 'spread', '', '');
|
||||
$resCode = MiniProgramService::qrcodeService()->appCodeUnlimit($resForever->id, '', 280);
|
||||
if ($resCode) {
|
||||
|
||||
@ -340,4 +340,16 @@ class QrcodeServices extends BaseServices
|
||||
}
|
||||
return $re;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测是否存在
|
||||
* @param int $thirdId
|
||||
* @param string $thirdType
|
||||
* @return bool
|
||||
*/
|
||||
public function qrCodeExist($thirdId = 0, $thirdType = 'spread')
|
||||
{
|
||||
return !!$this->dao->getCount(['third_id' => $thirdId, 'third_type' => $thirdType]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user