where(array('pid' => $user['pid'], 'status' => 1))->find(); $info['wxurls'] = C('shop_http') . $info['wxurl']; $arr = array( 'addconcat' => '/index.php/Admin/Concat/addconcat', ); $authArr = checkFunction($arr); $this->assign('authArr', $authArr); $this->assign('info', $info); $this->display(); } public function addconcat() { $data = I('post.'); $res['info'] = $data; $about = D('RetailAboutus')->getFind(); if (empty($about)) { $user = session('admin_userinfo'); $data['pid'] = $user['pid']; $add = D('RetailAboutus')->addOrder($data); } else { $add = D('RetailAboutus')->updateOrder(array('id' => array('gt', 0)), $data); } if ($add) { $res['status'] = 1; $res['msg'] = '操作成功'; } else { $res['status'] = 0; $res['msg'] = '操作失败'; } $this->ajaxReturn($res); } // 添加二维码操作 public function add_touch() { $retailAbout = D('RetailAboutus')->getFind(); $touch_url = I('post.touch_url'); if (!$touch_url) { $res['status'] = 0; $res['msg'] = '请选择图片'; } else { if (empty($retailAbout)) { $user = session('admin_userinfo'); $save = D('RetailAboutus')->addOrder(array('wxurl' => $touch_url, 'pid' => $user['pid'])); } else { $save = D('RetailAboutus')->updateOrder(array('id' => array('gt', 0)), array('wxurl' => $touch_url)); } if ($save) { $res['status'] = 1; $res['img'] = $touch_url; $res['msg'] = '设置成功'; } else { $res['status'] = 2; $res['msg'] = '设置失败'; } } $this->ajaxReturn($res); } }