application/admin/controller/MoneyWebAccount.php
(完整代码) 1KB<?php
namespace app\admin\controller;
use app\admin\model\MoneyWebAccountSpace;
class MoneyWebAccount extends Base {
//商品品牌列表
public function index() {
$web_accountlist = MoneyWebAccountSpace::all();
foreach ($web_accountlist as $value) {
$value['arr_pic']=explode(",", $value['pic']);
$web_accountlist_new[]= $value;
}
$this->assign('web_accountlist', $web_accountlist_new);
return $this->fetch();
}
//添加商品品牌 页面
public function add_web_account() {
$cate=goods_type_tree();
$this->assign('cate', $cate);
return $this->fetch();
}
//编辑商品品牌 页面
public function edit_web_account($id) {
$MoneyWebAccountSpace = MoneyWebAccountSpace::get(['id' => $id]);
if($MoneyWebAccountSpace['pic']){
$arr_pic=explode(",", $MoneyWebAccountSpace['pic']);
}
$this->assign('MoneyWebAccountSpace', $MoneyWebAccountSpace);
$this->assign('arr_pic', $arr_pic);
$this->assign('web_account_id', $id);
return $this->fetch();
}
//添加或修改商品品牌动作
public function add_web_account_action() {
$MoneyWebAccountSpace=new MoneyWebAccountSpace;
$MoneyWebAccountSpace->add();
$this->redirect('MoneyWebAccount/index');
}
public function edit_web_account_action() {
$MoneyWebAccountSpace=new MoneyWebAccountSpace;
$MoneyWebAccountSpace->edit(request()->param('id'));
$this->redirect('MoneyWebAccount/index');
}
//删除商品品牌 动作
public function del_web_account_action($id) {
$res=MoneyWebAccountSpace::where('id', '=', $id)->delete();
return $this->json_data($res);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。