多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
文件路径:shop/controllers/Seller/Shop/SupplierCtl.php 一、供货商 1.添加供货商 控制器:shop/controllers/Seller/Shop/SupplierCtl.php 模型:shop/models/shop/SupplierModel.php 视图:根据URL获得参数act的值,判断视图 ~~~ $act = request_string('act'); if ($act == 'edit') { $supplier_id = request_int('supplier_id'); $cond_row['id'] = $supplier_id; $data = $this->shopSupplierModel->getSupplierinfo($supplier_id); $this->view->setMet('setSupplier'); } elseif ($act == 'add') { $this->view->setMet('setSupplier'); $data = array(); } ~~~ * shop/views/default/Seller/Shop/SupplierCtl/supplier.php 供应商列表:`$data = $this->shopSupplierModel->getSupplierlist($cond_row, array(), $page, $rows);` 方法:supplier() * shop/views/default/Seller/Shop/SupplierCtl/setSupplier.php 编辑、添加、删除供货商:editSupplier()、addSupplier()、delSupplier() 编辑:`$flag = $this->shopSupplierModel->editsupplier($supplier_id, $supplier);` 添加:`$flag = $this->shopSupplierModel->addsupplier($supplier);` 删除:`$flag = $this->shopSupplierModel->removeSupplier($supplier_id);`