application/admin/controller/GoodsOrder.php
(完整代码) 1KB<?php
namespace app\admin\controller;
use app\admin\model\UserOrderSpace;
class GoodsOrder extends Base {
public function index() {
$orderlist = UserOrderSpace::all();
foreach ($orderlist as $value) {
$value['arr_pic']=explode(",", $value['pic']);
$orderlist_new[]= $value;
}
$this->assign('orderlist', $orderlist_new);
return $this->fetch();
}
public function add_order() {
return $this->fetch();
}
public function edit_order($id) {
$UserOrderSpace = UserOrderSpace::get(['id' => $id]);
if($UserOrderSpace['pic']){
$arr_pic=explode(",", $UserOrderSpace['pic']);
}
$this->assign('UserOrderSpace', $UserOrderSpace);
$this->assign('arr_pic', $arr_pic);
$this->assign('order_id', $id);
return $this->fetch();
}
public function add_order_action() {
$UserOrderSpace=new UserOrderSpace;
$UserOrderSpace->add();
$this->redirect('Order/index');
}
public function edit_order_action() {
$UserOrderSpace=new UserOrderSpace;
$UserOrderSpace->edit(request()->param('id'));
$this->redirect('Order/index');
}
public function del_order_action($id) {
$res=UserOrderSpace::where('id', '=', $id)->delete();
return $this->json_data($res);
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。