💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
文件路径:shop/controllers/Seller/Shop/InfoCtl.php 首先判断一下是不是自营店铺如果是自营店铺就没有店铺公司信息以及续费申请 ~~~ $shop_id = Perm::$shopId; $shop = $this->shopBaseModel->getOne($shop_id); ~~~ 一、经营类目 经营类目状态:参数:shop_class_bind_enable ~~~ public static $shop_class_bind_enable = array( "0" => '拒绝', "1" => "未审核", "2" => "已审核" ); ~~~ 1.添加类目 控制器:shop/controllers/Seller/Shop/InfoCtl.php ->info() 视图:根据URL获得参数act的值,判断视图 ~~~ if ($act == 'renew') { $this->view->setMet('renew'); } elseif ($act == 'info') { //店铺信息 //视图:info.php } else { $this->view->setMet('category'); } ~~~ * 类目列表视图:shop/views/default/Seller/Shop/InfoCtl/category.php * 添加类目视图: shop/views/default/Seller/Shop/InfoCtl/addcategory.php 方法:addcategoryInfo()、addcategoryrow() * 申请续签shop/views/default/Seller/Shop/InfoCtl/renew.php * 店铺信息视图:shop/views/default/Seller/Shop/InfoCtl/info.php 二、店铺信息 如果店铺是平台自营店铺,则没有店铺信息 控制器:shop/controllers/Seller/Shop/InfoCtl.php ->info() 模型:shop/models/shop/BaseModel.php、shop/models/shop/CompanyModel.php 视图:shop/views/default/Seller/Shop/InfoCtl/info.php 详细信息:`$data = $this->shopBaseModel->getbaseAllList($shop_id);` 三、续签申请 如果店铺是平台自营店铺,则没有续签申请 控制器:shop/controllers/Seller/Shop/InfoCtl.php 模型:shop/models/shop/RenewalModel.php、shop/models/shop/GradeModel.php 视图:shop/views/default/Seller/Shop/InfoCtl/renew.php ~~~ if ($act == 'renew') { //推算出续签时间(前一个月即可申请) $frontmonth = date("Y-m-d H:i:s", strtotime("$shop[shop_end_time] - 1 month")); $date = date("Y-m-d h:i:s", time()); $data = $this->shopRenewalModel->getRenewalList(array("shop_id" => $shop_id)); $grade = $this->shopGradeModel->getGradeWhere(); $this->view->setMet('renew'); } ~~~ 提交申请:`$('#form').validator({})` 申请状态:申请成功、申请中(参数:status、模型:shop/models/shop/RenewalModel.php) ~~~ public static $renewal_status = array( "0" => "申请中", "1" => "申请成功" ); ~~~ 方法:addRenew(); `$flag = $this->shopRenewalModel->addRenewal($renew_row);` 删除:delRenew(); `$flag = $this->shopRenewalModel->removeRenewal($renew_id);`