Files
addons
app_download_files
extend
hyhproject
admin
behavior
common
conf
controller
Accreds.php
Addons.php
Adgoods.php
Adpositions.php
Ads.php
Areas.php
Articlecats.php
Articles.php
Attributes.php
Banks.php
Base.php
Brands.php
Carts.php
Cashdraws.php
Chargeitems.php
Cronjobs.php
Datacats.php
Datas.php
Ectday.php
Ectdeal.php
Ecttarget.php
Express.php
Friendlinks.php
Goods.php
Goodsappraises.php
Goodscats.php
Goodsclassify.php
Goodsconsult.php
Homemenus.php
Hooks.php
Images.php
Index.php
Informs.php
Logmoneys.php
Logoperates.php
Logsms.php
Logstafflogins.php
Member.php
Menus.php
Messages.php
Mobilebtns.php
Navs.php
Ordercomplains.php
Orderrefunds.php
Orders.php
Payments.php
Platform.php
Privileges.php
Recommends.php
Reports.php
Roles.php
Settlements.php
Shops.php
Speccats.php
Staffs.php
Styles.php
Sysconfigs.php
Templatemsgs.php
Userranks.php
Users.php
Userscores.php
Wsysconfigs.php
Wxmenus.php
Wxpassivereplys.php
Wxtemplatemsgs.php
Wxusers.php
model
validate
view
app
common
home
home2
mobile2
wechat2
.htaccess
command.php
mobile
oss
static
thinkphp
upload
vendor
wxtmp
.gitignore
.htaccess
.user.ini
404.html
H5B854518.wgt
admin.php
app-release.apk
app_download.html
cash.lock
demo.php
get_startup.php
get_version.php
get_version_new.php
index.html
index.php
qlg.tar.gz
reg.lock
robots.txt
qlg.tsgz.moe/hyhproject/admin/controller/Images.php
2019-09-06 23:53:10 +08:00

103 lines
3.5 KiB
PHP
Executable File

<?php
namespace wstmart\admin\controller;
use wstmart\admin\model\Images as M;
/**
* ============================================================================
* 图片空间控制器
*/
class Images extends Base{
/**
* 进入主页面
*/
public function index(){
return $this->fetch();
}
/**
* 获取概况
* 后台商城消息 编辑器中的图片只记录上传图片容量 删除相关数据时无法标记图片为已删除状态
*/
public function summary(){
$m = new M();
$data = $m->summary();
return WSTReturn("", 1,$data);
}
/**
* 进入列表页面
*/
public function lists(){
$datas = model('Datas')->listQuery(3);
$this->assign('datas',$datas);
$this->assign('keyword',input('get.keyword'));
return $this->fetch('list');
}
/**
* 获取分页
*/
public function pageQuery(){
$m = new M();
return WSTGrid($m->pageQuery());
}
/**
* 检测图片信息
*/
// public function checkImages(){
// $imgPath = input('get.imgPath');
// $m = WSTConf('CONF.wstMobileImgSuffix');
// $imgPath = str_replace($m.'.','.',$imgPath);
// $imgPath = str_replace($m.'_thumb.','.',$imgPath);
// $imgPath = str_replace('_thumb.','.',$imgPath);
// $imgPath_thumb = str_replace('.','_thumb.',$imgPath);
// $mimg = '';
// $mimg_thumb = '';
// if($m!=''){
// $mimg = str_replace('.',$m.'.',$imgPath);
// $mimg_thumb = str_replace('.',$m.'_thumb.',$imgPath);
// }
// $data['imgpath']=$imgPath;
// $data['img']=file_exists(WSTRootPath()."/".$imgPath)?true:false;
// $data['thumb']=file_exists(WSTRootPath()."/".$imgPath_thumb)?true:false;
// $data['thumbpath']=$imgPath_thumb;
// $data['mimg']=file_exists(WSTRootPath()."/".$mimg)?true:false;
// $data['mimgpath']=$mimg;
// $data['mthumb']=file_exists(WSTRootPath()."/".$mimg_thumb)?true:false;
// $data['mthumbpath']=$mimg_thumb;
// return $this->fetch('view',$data);
// }
/**
* 检测图片信息 mark 20180609
*/
public function checkImages(){
$imgPath = input('get.imgPath');
$m = WSTConf('CONF.wstMobileImgSuffix');
$imgPath = str_replace($m.'.','.',$imgPath);
$imgPath = str_replace($m.'_thumb.','.',$imgPath);
$imgPath = str_replace('_thumb.','.',$imgPath);
$imgPath_thumb = str_replace('.','_thumb.',$imgPath);
$mimg = '';
$mimg_thumb = '';
if($m!=''){
$mimg = str_replace('.',$m.'.',$imgPath);
$mimg_thumb = str_replace('.',$m.'_thumb.',$imgPath);
}
$data['imgpath']=$imgPath;
$data['img']=file_exists(WSTRootPath()."/".$imgPath)?true:false;
//添加判断oss上是否存在 mark 2010608 by zl
$data['img_oss']=file_exists_oss($imgPath)?true:false;
$data['thumb']=file_exists(WSTRootPath()."/".$imgPath_thumb)?true:false;
$data['thumbpath']=$imgPath_thumb;
$data['mimg']=file_exists(WSTRootPath()."/".$mimg)?true:false;
$data['mimgpath']=$mimg;
$data['mthumb']=file_exists(WSTRootPath()."/".$mimg_thumb)?true:false;
$data['mthumbpath']=$mimg_thumb;
return $this->fetch('view',$data);
}
/**
* 删除
*/
public function del(){
$m = new M();
return $m->del();
}
}