public function deleteMenu() { if (!IS_POST) { _404('页面不存在', U('index')); } import('@.WechatMenu.MenuDbControl'); $menuControl = new MenuDbControl(session("ecid")); $code = $menuControl->delMenuItem($_POST["id"]); $this->ajaxReturn($code, Error::getErrMsg($code), 0); }
public function change() { $this->assign('userName', session('user_name')); //用户名 import('@.WechatMenu.MenuDbControl'); $menuControl = new MenuDbControl(session("ecid")); $result = $menuControl->getWeixinMenuArray(); $material = M("Company_" . session("ecid") . "_material_group"); $materialCount = $material->count(); $materialPage = ceil($materialCount / 4); $this->setToken(); $this->assign('materialCount', $materialCount); // 素材总数 $this->assign('materialPage', $materialPage); // 素材页数 $this->assign('result', array("button" => $result)); $this->display(); }