SellerEditablePage.php 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. <?php
  2. namespace app\home\controller;
  3. use think\facade\View;
  4. use think\facade\Lang;
  5. use think\facade\Db;
  6. /**
  7. *
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * 控制器
  12. */
  13. class SellerEditablePage extends BaseSeller
  14. {
  15. var $type = 'pc';
  16. var $model_dir = 'home@default/base/editable_page_model/';
  17. public function initialize()
  18. {
  19. parent::initialize();
  20. Lang::load(base_path() . 'home/lang/' . config('lang.default_lang') . '/seller_editable_page.lang.php');
  21. Lang::load(base_path() . 'admin/lang/' . config('lang.default_lang') . '.php');
  22. }
  23. public function page_list($type = 'pc')
  24. {
  25. $this->type = $type;
  26. $keyword = input('param.editable_page_name');
  27. $condition = array();
  28. if ($keyword) {
  29. $condition[] = array('editable_page_name', 'like', '%' . $keyword . '%');
  30. }
  31. View::assign('filtered', empty($condition) ? 0 : 1);
  32. if (!in_array($type, array('pc', 'h5'))) {
  33. $type = 'pc';
  34. }
  35. $editable_page_model = model('editable_page');
  36. $condition = array_merge(array(array('store_id', '=', $this->store_info['store_id']), array('editable_page_client', '=', $type)), $condition);
  37. $editable_page_list = $editable_page_model->getEditablePageList($condition, 10);
  38. foreach ($editable_page_list as $key => $val) {
  39. if ($val['editable_page_client'] == 'pc') {
  40. $editable_page_list[$key]['edit_url'] = (string)url('SellerEditablePage/page_setting', ['store_id' => $this->store_info['store_id'], 'editable_page_id' => $val['editable_page_id']]);
  41. $editable_page_list[$key]['view_url'] = (string)url('StoreSpecial/index', ['store_id' => $this->store_info['store_id'], 'special_id' => $val['editable_page_id']]);
  42. } else {
  43. $editable_page_list[$key]['edit_url'] = (string)url('SellerEditablePage/mobile_page_setting', array('store_id' => $this->store_info['store_id'], 'editable_page_id' => $val['editable_page_id']));
  44. $editable_page_list[$key]['view_url'] = config('ds_config.h5_site_url') . '/' . 'pages/home/storespecial/Index' . '?' . http_build_query(['id' => $this->store_info['store_id'], 'special_id' => $val['editable_page_id']]);
  45. }
  46. }
  47. View::assign('show_page', $editable_page_model->page_info->render());
  48. View::assign('editable_page_list', $editable_page_list);
  49. View::assign('type', $type);
  50. /* 设置卖家当前菜单 */
  51. $this->setSellerCurMenu($type == 'h5' ? 'seller_editable_page_h5' : 'seller_editable_page_pc');
  52. /* 设置卖家当前栏目 */
  53. $this->setSellerCurItem('page_list');
  54. return View::fetch($this->template_dir . 'page_list');
  55. }
  56. public function h5_page_list()
  57. {
  58. return $this->page_list('h5');
  59. }
  60. /**
  61. * 新增页面
  62. */
  63. public function page_add()
  64. {
  65. $editable_page_path = input('param.editable_page_path');
  66. $editable_page_item_id = intval(input('param.editable_page_item_id'));
  67. $editable_page_model = model('editable_page');
  68. if (!request()->isPost()) {
  69. return View::fetch($this->template_dir . 'page_form');
  70. } else {
  71. $data = array(
  72. 'store_id' => $this->store_info['store_id'],
  73. 'editable_page_name' => input('post.editable_page_name'),
  74. 'editable_page_path' => $editable_page_path,
  75. 'editable_page_item_id' => $editable_page_item_id,
  76. 'editable_page_client' => input('param.type', 'pc'),
  77. 'editable_page_theme' => 'style_1',
  78. 'editable_page_edit_time' => TIMESTAMP,
  79. 'editable_page_theme_config' => json_encode(array(
  80. 'back_color' => input('param.back_color')
  81. ))
  82. );
  83. $result = $editable_page_model->addEditablePage($data);
  84. $condition = array();
  85. $condition[] = array('store_id', '=', $data['store_id']);
  86. $condition[] = array('editable_page_id', '<>', $result);
  87. $condition[] = array('editable_page_path', '=', $data['editable_page_path']);
  88. $condition[] = array('editable_page_client', '=', $data['editable_page_client']);
  89. if (!in_array($data['editable_page_path'], array('store/index'))) {
  90. $condition[] = array('editable_page_item_id', '=', $data['editable_page_item_id']);
  91. }
  92. $editable_page_model->editEditablePage($condition, array('editable_page_path' => '', 'editable_page_item_id' => 0));
  93. if ($result) {
  94. $this->recordSellerlog(lang('ds_add') . ($data['editable_page_client'] == 'h5' ? lang('editable_page_h5') : lang('editable_page_pc')) . '[flex_' . $result . ':' . input('post.editable_page_name') . ']');
  95. ds_json_encode(10000, lang('ds_common_op_succ'));
  96. } else {
  97. ds_json_encode(10001, lang('ds_common_op_fail'));
  98. }
  99. }
  100. }
  101. public function page_setting()
  102. {
  103. $editable_page_id = intval(input('param.editable_page_id'));
  104. $editable_page_model = model('editable_page');
  105. $editable_page_info = $editable_page_model->getOneEditablePage(array('editable_page_id' => $editable_page_id));
  106. if (!$editable_page_info) {
  107. $this->error(lang('param_error'));
  108. }
  109. $editable_page_info['editable_page_theme_config'] = json_decode($editable_page_info['editable_page_theme_config'], true);
  110. View::assign('editable_page', $editable_page_info);
  111. $editable_page_config_model = model('editable_page_config');
  112. $editable_page_config_list = $editable_page_config_model->getEditablePageConfigList(array(array('editable_page_id', '=', $editable_page_id)));
  113. $config_list = array();
  114. foreach ($editable_page_config_list as $key => $val) {
  115. $config_info = json_decode($val['editable_page_config_content'], true);
  116. $model_id = $val['editable_page_model_id'];
  117. $var_html = array();
  118. $var_config = array();
  119. if (!empty($config_info)) {
  120. require_once PLUGINS_PATH . '/editable_page_model/' . $model_id . '/config.php';
  121. $model_name = 'Model' . $model_id;
  122. $model = new $model_name();
  123. $res = $model->filterData($config_info);
  124. if ($res['code']) {
  125. $var_config['config_info'] = $res['data'];
  126. $res = $model->formatData(json_encode($res['data']), $this->store_info['store_id']);
  127. if ($res['code']) {
  128. $var_html['config_info'] = $res['data'];
  129. }
  130. }
  131. }
  132. $html = View::fetch('../../../plugins/editable_page_model/' . $model_id . '/index', $var_html);
  133. $config = View::fetch('../../../plugins/editable_page_model/' . $model_id . '/config', $var_config);
  134. $config_list[] = array(
  135. 'val' => $val,
  136. 'html' => $html,
  137. 'config' => $config
  138. );
  139. }
  140. View::assign('config_list', $config_list);
  141. return View::fetch($this->template_dir . 'page_setting');
  142. }
  143. /**
  144. * 设置手机端页面
  145. */
  146. public function mobile_page_setting()
  147. {
  148. $this->type = 'h5';
  149. $editable_page_id = intval(input('param.editable_page_id'));
  150. $editable_page_model = model('editable_page');
  151. $editable_page_info = $editable_page_model->getOneEditablePage(array('editable_page_id' => $editable_page_id));
  152. if (!$editable_page_info) {
  153. $this->error(lang('param_error'));
  154. }
  155. $editable_page_info['editable_page_theme_config'] = json_decode($editable_page_info['editable_page_theme_config'], true);
  156. View::assign('editable_page', $editable_page_info);
  157. $editable_page_config_model = model('editable_page_config');
  158. $editable_page_config_list = $editable_page_config_model->getEditablePageConfigList(array(array('editable_page_id', '=', $editable_page_id)));
  159. $config_list = array();
  160. foreach ($editable_page_config_list as $key => $val) {
  161. $config_info = json_decode($val['editable_page_config_content'], true);
  162. $model_id = $val['editable_page_model_id'];
  163. $var_html = array();
  164. $var_config = array();
  165. if (!empty($config_info)) {
  166. require_once PLUGINS_PATH . '/editable_page_model/h5_' . $model_id . '/config.php';
  167. $model_name = 'Model' . $model_id;
  168. $model = new $model_name();
  169. $res = $model->filterData($config_info);
  170. if ($res['code']) {
  171. $var_config['config_info'] = $res['data'];
  172. $res = $model->formatData(json_encode($res['data']), $this->store_info['store_id']);
  173. if ($res['code']) {
  174. $var_html['config_info'] = $res['data'];
  175. }
  176. }
  177. }
  178. $html = View::fetch('../../../plugins/editable_page_model/h5_' . $model_id . '/index', $var_html);
  179. $config = View::fetch('../../../plugins/editable_page_model/h5_' . $model_id . '/config', $var_config);
  180. $config_list[] = array(
  181. 'val' => $val,
  182. 'html' => $html,
  183. 'config' => $config
  184. );
  185. }
  186. View::assign('store_info', $this->store_info);
  187. View::assign('config_list', $config_list);
  188. /* 设置卖家当前菜单 */
  189. $this->setSellerCurMenu($this->type == 'h5' ? 'seller_editable_page_h5' : 'seller_editable_page_pc');
  190. /* 设置卖家当前栏目 */
  191. $this->setSellerCurItem('mobile_page_setting');
  192. return View::fetch($this->template_dir . 'mobile_page_setting');
  193. }
  194. /**
  195. * 编辑页面
  196. */
  197. public function page_edit()
  198. {
  199. $editable_page_id = intval(input('param.editable_page_id'));
  200. $editable_page_model = model('editable_page');
  201. $editable_page_info = $editable_page_model->getOneEditablePage(array('store_id' => $this->store_info['store_id'], 'editable_page_id' => $editable_page_id));
  202. if (!$editable_page_info) {
  203. ds_json_encode(10001, lang('param_error'));
  204. }
  205. $editable_page_info['editable_page_theme_config'] = json_decode($editable_page_info['editable_page_theme_config'], true);
  206. if (!request()->isPost()) {
  207. View::assign('editable_page', $editable_page_info);
  208. return View::fetch($this->template_dir . 'page_form');
  209. } else {
  210. $data = array(
  211. 'editable_page_path' => input('post.editable_page_path'),
  212. 'editable_page_item_id' => intval(input('post.editable_page_item_id')),
  213. 'editable_page_name' => input('post.editable_page_name'),
  214. 'editable_page_theme_config' => json_encode(array(
  215. 'back_color' => input('param.back_color')
  216. ))
  217. );
  218. $result = $editable_page_model->editEditablePage(array('editable_page_id' => $editable_page_id), $data);
  219. $condition = array();
  220. $condition[] = array('store_id', '=', $this->store_info['store_id']);
  221. $condition[] = array('editable_page_id', '<>', $editable_page_id);
  222. $condition[] = array('editable_page_path', '=', $data['editable_page_path']);
  223. $condition[] = array('editable_page_client', '=', $editable_page_info['editable_page_client']);
  224. if (!in_array($data['editable_page_path'], array('store/index'))) {
  225. $condition[] = array('editable_page_item_id', '=', $data['editable_page_item_id']);
  226. }
  227. $editable_page_model->editEditablePage($condition, array('editable_page_path' => '', 'editable_page_item_id' => 0));
  228. if ($result) {
  229. $this->recordSellerlog(lang('ds_edit') . ($editable_page_info['editable_page_client'] == 'h5' ? lang('editable_page_h5') : lang('editable_page_pc')) . '[' . $editable_page_info['editable_page_name'] . ']');
  230. ds_json_encode(10000, lang('ds_common_op_succ'));
  231. } else {
  232. ds_json_encode(10000, lang('ds_common_op_fail'));
  233. }
  234. }
  235. }
  236. /**
  237. * 删除页面
  238. */
  239. public function page_del()
  240. {
  241. $editable_page_id = intval(input('param.editable_page_id'));
  242. $editable_page_model = model('editable_page');
  243. $editable_page_info = $editable_page_model->getOneEditablePage(array('store_id' => $this->store_info['store_id'], 'editable_page_id' => $editable_page_id));
  244. if (!$editable_page_info) {
  245. ds_json_encode(10001, lang('param_error'));
  246. }
  247. if (!$editable_page_model->delEditablePage($editable_page_id)) {
  248. ds_json_encode(10001, lang('ds_common_op_fail'));
  249. }
  250. $this->recordSellerlog(lang('ds_del') . ($editable_page_info['editable_page_client'] == 'h5' ? lang('editable_page_h5') : lang('editable_page_pc')) . '[ID:' . $editable_page_info['editable_page_id'] . ':' . $editable_page_info['editable_page_name'] . ']');
  251. ds_json_encode(10000, lang('ds_common_del_succ'));
  252. }
  253. /**
  254. * 搜索店铺
  255. */
  256. public function search_store()
  257. {
  258. $store_model = model('store');
  259. /**
  260. * 查询条件
  261. */
  262. $where = array();
  263. $search_store_name = trim(input('param.keyword'));
  264. if ($search_store_name != '') {
  265. $where[] = array('store_name', 'like', '%' . $search_store_name . '%');
  266. }
  267. $store_list = $store_model->getStoreOnlineList($where, 12);
  268. View::assign('store_list', $store_list);
  269. View::assign('show_page', $store_model->page_info->render());
  270. echo View::fetch($this->model_dir . 'search_store');
  271. exit;
  272. }
  273. /**
  274. * 搜索商品
  275. */
  276. public function search_goods()
  277. {
  278. $goods_model = model('goods');
  279. /**
  280. * 查询条件
  281. */
  282. $where = array();
  283. $where[] = array('store_id', '=', $this->store_info['store_id']);
  284. $search_goods_name = trim(input('param.keyword'));
  285. $type = trim(input('param.type'));
  286. if ($search_goods_name != '') {
  287. $where[] = array('goods_name|store_name', 'like', '%' . $search_goods_name . '%');
  288. }
  289. switch ($type) {
  290. case 'bargain':
  291. $condition = array();
  292. $condition[] = array('bargain_state', '=', \app\common\model\Pbargain::PINTUAN_STATE_NORMAL);
  293. $condition[] = array('bargain_endtime', '>', TIMESTAMP);
  294. $subQuery = Db::name('pbargain')->field('bargain_goods_id')->where($condition)->buildSql();
  295. $where[] = array('goods_id', 'exp', Db::raw('in ' . $subQuery));
  296. break;
  297. case 'groupbuy':
  298. $condition = array();
  299. $condition[] = array('groupbuy_state', '=', \app\common\model\Groupbuy::GROUPBUY_STATE_NORMAL);
  300. $condition[] = array('groupbuy_endtime', '>', TIMESTAMP);
  301. $subQuery = Db::name('groupbuy')->field('goods_commonid')->where($condition)->buildSql();
  302. $where[] = array('goods_commonid', 'exp', Db::raw('in ' . $subQuery));
  303. break;
  304. case 'pintuan':
  305. $condition = array();
  306. $condition[] = array('pintuan_state', '=', \app\common\model\Ppintuan::PINTUAN_STATE_NORMAL);
  307. $condition[] = array('pintuan_end_time', '>', TIMESTAMP);
  308. $subQuery = Db::name('ppintuan')->field('pintuan_goods_commonid')->where($condition)->buildSql();
  309. $where[] = array('goods_commonid', 'exp', Db::raw('in ' . $subQuery));
  310. break;
  311. case 'presell':
  312. $condition = array();
  313. $condition[] = array('presell_state', '=', \app\common\model\Presell::PRESELL_STATE_NORMAL);
  314. $condition[] = array('presell_end_time', '>', TIMESTAMP);
  315. $subQuery = Db::name('presell')->field('goods_id')->where($condition)->buildSql();
  316. $where[] = array('goods_id', 'exp', Db::raw('in ' . $subQuery));
  317. break;
  318. case 'xianshi':
  319. $condition = array();
  320. $condition[] = array('xianshigoods_state', '=', \app\common\model\Pxianshigoods::XIANSHI_GOODS_STATE_NORMAL);
  321. $condition[] = array('xianshigoods_end_time', '>', TIMESTAMP);
  322. $subQuery = Db::name('pxianshigoods')->field('goods_id')->where($condition)->buildSql();
  323. $where[] = array('goods_id', 'exp', Db::raw('in ' . $subQuery));
  324. break;
  325. }
  326. $goods_list = $goods_model->getGoodsOnlineList($where, '*', 12);
  327. View::assign('goods_list', $goods_list);
  328. View::assign('show_page', $goods_model->page_info->render());
  329. $goods_id = input('param.goods_id/a');
  330. if (!empty($goods_id)) {
  331. $where = array();
  332. $where[] = array('goods_id', 'in', array_keys($goods_id));
  333. $goods_list = $goods_model->getGoodsOnlineList($where);
  334. $selected_goods = array();
  335. foreach ($goods_list as $v) {
  336. $selected_goods[$v['goods_id']] = array_merge($v, array('sort' => $goods_id[$v['goods_id']]['sort']));
  337. }
  338. View::assign('goods_id', $selected_goods);
  339. }
  340. echo View::fetch($this->template_dir . 'search_goods');
  341. exit;
  342. }
  343. public function image_del()
  344. {
  345. $file_id = intval(input('param.upload_id'));
  346. $res = model('editable_page_model', 'logic')->imageDel($file_id);
  347. if (!$res['code']) {
  348. ds_json_encode(10001, $res['msg']);
  349. }
  350. ds_json_encode(10000);
  351. }
  352. /**
  353. * 图片上传
  354. */
  355. public function image_upload()
  356. {
  357. $res = model('editable_page_model', 'logic')->imageUpload(input('param.name'), input('param.config_id'));
  358. if (!$res['code']) {
  359. ds_json_encode(10001, $res['msg']);
  360. }
  361. $data = $res['data'];
  362. ds_json_encode(10000, '', $data);
  363. }
  364. public function goods_class()
  365. {
  366. $id = intval(input('param.id'));
  367. $parent_id = intval(input('param.parent_id'));
  368. $goodsclass_model = model('goodsclass');
  369. if ($id) {
  370. $data = array('id' => array(), 'list' => array());
  371. $goodsclass_info = $goodsclass_model->getGoodsclassInfoById($id);
  372. if ($goodsclass_info) {
  373. $data['id'][] = $goodsclass_info['gc_id'];
  374. $data['list'][] = $goodsclass_model->getGoodsclassListByParentId($goodsclass_info['gc_parent_id']);
  375. if ($goodsclass_info['gc_parent_id']) {
  376. $goodsclass_info = $goodsclass_model->getGoodsclassInfoById($goodsclass_info['gc_parent_id']);
  377. if ($goodsclass_info) {
  378. $data['id'][] = $goodsclass_info['gc_id'];
  379. $data['list'][] = $goodsclass_model->getGoodsclassListByParentId($goodsclass_info['gc_parent_id']);
  380. if ($goodsclass_info['gc_parent_id']) {
  381. $goodsclass_info = $goodsclass_model->getGoodsclassInfoById($goodsclass_info['gc_parent_id']);
  382. if ($goodsclass_info) {
  383. $data['id'][] = $goodsclass_info['gc_id'];
  384. $data['list'][] = $goodsclass_model->getGoodsclassListByParentId($goodsclass_info['gc_parent_id']);
  385. }
  386. }
  387. }
  388. }
  389. }
  390. $data['id'] = array_reverse($data['id']);
  391. $data['list'] = array_reverse($data['list']);
  392. } else {
  393. $data = $goodsclass_model->getGoodsclassListByParentId($parent_id);
  394. }
  395. ds_json_encode(10000, '', $data);
  396. }
  397. public function config_load()
  398. {
  399. $if_h5 = intval(input('param.if_h5'));
  400. $model_id = intval(input('param.model_id'));
  401. $config_info = input('param.config_info/a');
  402. if (!$model_id) {
  403. ds_json_encode(10001, lang('param_error'));
  404. }
  405. $var_html = array();
  406. $var_config = array();
  407. if (!empty($config_info)) {
  408. require_once PLUGINS_PATH . '/editable_page_model/' . ($if_h5 ? 'h5_' : '') . $model_id . '/config.php';
  409. $model_name = 'Model' . $model_id;
  410. $model = new $model_name();
  411. $res = $model->filterData($config_info);
  412. if ($res['code']) {
  413. $res = $model->formatData(json_encode($res['data']), $this->store_info['store_id']);
  414. if ($res['code']) {
  415. $var_html['config_info'] = $res['data'];
  416. } else {
  417. ds_json_encode(10001, $res['msg']);
  418. }
  419. } else {
  420. ds_json_encode(10001, $res['msg']);
  421. }
  422. }
  423. $html = View::fetch('../../../plugins/editable_page_model/' . ($if_h5 ? 'h5_' : '') . $model_id . '/index', $var_html);
  424. $config = View::fetch('../../../plugins/editable_page_model/' . ($if_h5 ? 'h5_' : '') . $model_id . '/config', $var_config);
  425. ds_json_encode(10000, '', array('html' => $html, 'config' => $config));
  426. }
  427. public function config_edit()
  428. {
  429. $if_h5 = intval(input('param.if_h5'));
  430. $config_list = input('param.config_list/a');
  431. $editable_page_id = intval(input('param.page_id'));
  432. $editable_page_model = model('editable_page');
  433. $editable_page_info = $editable_page_model->getOneEditablePage(array('editable_page_id' => $editable_page_id));
  434. if (!$editable_page_info) {
  435. ds_json_encode(10001, lang('param_error'));
  436. }
  437. try {
  438. $data = array();
  439. $new_data = array();
  440. $editable_page_theme_config = array();
  441. foreach ($config_list as $sort_order => $config_info) {
  442. $model_id = $config_info['model_id'];
  443. switch ($model_id) {
  444. case 'page':
  445. case 'jump':
  446. case 'button':
  447. if ($model_id == 'page') {
  448. $data['editable_page_name'] = $config_info['page_title'];
  449. }
  450. $editable_page_theme_config = array_merge($editable_page_theme_config, $config_info);
  451. break;
  452. default:
  453. require_once PLUGINS_PATH . '/editable_page_model/' . ($if_h5 ? 'h5_' : '') . $model_id . '/config.php';
  454. $model_name = 'Model' . $model_id;
  455. $model = new $model_name();
  456. $res = $model->filterData($config_info);
  457. if ($res['code']) {
  458. $new_data[] = array(
  459. 'editable_page_id' => $editable_page_id,
  460. 'editable_page_model_id' => $model_id,
  461. 'editable_page_config_sort_order' => $sort_order,
  462. 'editable_page_config_content' => json_encode($res['data'])
  463. );
  464. } else {
  465. throw new \think\Exception($res['msg'], 10006);
  466. }
  467. }
  468. }
  469. $data['editable_page_theme_config'] = json_encode($editable_page_theme_config);
  470. $data['editable_page_edit_time'] = TIMESTAMP;
  471. $editable_page_config_model = model('editable_page_config');
  472. $editable_page_config_model->delEditablePageConfig(array(array('editable_page_id', '=', $editable_page_id)));
  473. if (!empty($new_data)) {
  474. $editable_page_config_model->addEditablePageConfigAll($new_data);
  475. }
  476. $result = $editable_page_model->editEditablePage(array('editable_page_id' => $editable_page_id), $data);
  477. if (!$result) {
  478. throw new \think\Exception(lang('ds_common_op_fail'), 10006);
  479. }
  480. } catch (\Exception $e) {
  481. ds_json_encode(10001, $e->getMessage());
  482. }
  483. $this->recordSellerlog(lang('ds_edit') . ($editable_page_info['editable_page_client'] == 'h5' ? lang('editable_page_h5') : lang('editable_page_pc')) . '[' . $editable_page_info['editable_page_name'] . ']');
  484. ds_json_encode(10000, lang('ds_common_op_succ'));
  485. }
  486. /**
  487. * 栏目菜单
  488. */
  489. function getSellerItemList()
  490. {
  491. if (request()->action() == 'mobile_page_setting') {
  492. $menu_array[] = array(
  493. 'name' => 'mobile_page_setting',
  494. 'text' => lang('mobile_page_setting'),
  495. 'url' => 'javascript:void(0)',
  496. );
  497. } else {
  498. $menu_array[] = array(
  499. 'name' => 'page_list',
  500. 'text' => lang('page_list'),
  501. 'url' => 'javascript:void(0)',
  502. );
  503. }
  504. return $menu_array;
  505. }
  506. }