作者 开飞机的舒克

后台修改

... ... @@ -77,7 +77,7 @@ class Study extends Backend
{
$barcode = $this->model->where('id', $ids)->value('barcode');
if (!empty($barcode)) {
$this->error('已生成二维码,无需重复生成');
$this->error('已生成条形码,无需重复生成');
}
$brpath = Resource::StudyBar($ids);
$this->model->save(['qrcode' => $brpath], ['id' => $ids]);
... ...
... ... @@ -95,7 +95,7 @@ class Index extends Api
$data = \db('banner')
->order('createtime DESC')
->select();
if ($data){
if (!$data){
$this->error('当前还没有轮播图',['status'=>2]);
}
$this->success('获取轮播图成功', [$data, 'status' => 1]);
... ...
... ... @@ -6,9 +6,6 @@ use tinymeng\code\Generate;
class Resource
{
/**
*
*/
public static function StudyBar($id){
$generate = Generate::bar();
/** 二维码存入本地并输出存储路径 */
... ...
... ... @@ -4310,7 +4310,7 @@
</div>
<div class="col-md-6" align="right">
Generated on 2023-03-10 14:57:39 <a href="./" target="_blank">校园活动</a>
Generated on 2023-03-10 15:05:27 <a href="./" target="_blank">校园活动</a>
</div>
</div>
... ...
... ... @@ -106,10 +106,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
title: __('生成条形码'),
classname: 'btn btn-xs btn-primary btn-ajax',
icon: 'fa fa-qrcode',
url: 'study/barcode',
url: 'study/barcode?ids',
confirm: '确认生成新的条形码吗',
success: function (data, ret) {
return data;
return true;
},
error: function (data, ret) {
Toastr.error(ret.msg);
... ...