Sellersetting.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646
  1. <?php
  2. namespace app\home\controller;
  3. use think\facade\View;
  4. use think\Image;
  5. use think\facade\Lang;
  6. use think\facade\Db;
  7. /**
  8. *
  9. *
  10. * ----------------------------------------------------------------------------
  11. *
  12. * 控制器
  13. */
  14. class Sellersetting extends BaseSeller
  15. {
  16. const MAX_MB_SLIDERS = 5;
  17. public function initialize()
  18. {
  19. parent::initialize();
  20. Lang::load(base_path() . 'home/lang/' . config('lang.default_lang') . '/sellersetting.lang.php');
  21. }
  22. /*
  23. * 店铺设置
  24. */
  25. public function setting()
  26. {
  27. /**
  28. * 实例化模型
  29. */
  30. $store_model = model('store');
  31. $store_id = session('store_id'); //当前店铺ID
  32. /**
  33. * 获取店铺信息
  34. */
  35. $store_info = $store_model->getStoreInfoByID($store_id);
  36. $if_miniprocode = $this->getMiniProCode(1);
  37. View::assign('miniprogram_code', $if_miniprocode ? (UPLOAD_SITE_URL . DIRECTORY_SEPARATOR . ATTACH_STORE . DIRECTORY_SEPARATOR . session('store_id') . '/miniprogram_code.png') : '');
  38. /**
  39. * 保存店铺设置
  40. */
  41. if (request()->isPost()) {
  42. /**
  43. * 更新入库
  44. */
  45. $param = array(
  46. 'store_vrcode_prefix' => preg_match('/^[a-zA-Z0-9]{1,3}$/', input('post.store_vrcode_prefix')) ? input('post.store_vrcode_prefix') : null,
  47. 'store_qq' => input('post.store_qq'),
  48. 'store_ww' => input('post.store_ww'),
  49. 'store_phone' => input('post.store_phone'),
  50. 'store_mainbusiness' => input('post.store_mainbusiness'),
  51. 'store_keywords' => input('post.seo_keywords'),
  52. 'store_description' => input('post.seo_description')
  53. );
  54. if (!empty(input('post.store_name'))) {
  55. $store = $store_model->getStoreInfo(array('store_name' => input('param.store_name')));
  56. //店铺名存在,则提示错误
  57. if (!empty($store) && ($store_id != $store['store_id'])) {
  58. $this->error(lang('please_change_another_name'));
  59. }
  60. $param['store_name'] = input('post.store_name');
  61. }
  62. //店铺名称修改处理
  63. if (input('param.store_name') != $store_info['store_name'] && !empty(input('post.store_name'))) {
  64. $where = array();
  65. $where[] = array('store_id', '=', $store_id);
  66. $update = array();
  67. $update['store_name'] = input('param.store_name');
  68. Db::name('goodscommon')->where($where)->update($update);
  69. Db::name('goods')->where($where)->update($update);
  70. }
  71. $this->getMiniProCode(1);
  72. $store_model->editStore($param, array('store_id' => $store_id));
  73. $this->success(lang('ds_common_save_succ'), (string) url('Sellersetting/setting'));
  74. }
  75. /**
  76. * 实例化店铺等级模型
  77. */
  78. // 从基类中读取店铺等级信息
  79. $store_grade = $this->store_grade;
  80. /**
  81. * 输出店铺信息
  82. */
  83. /* 设置卖家当前菜单 */
  84. $this->setSellerCurMenu('seller_setting');
  85. /* 设置卖家当前栏目 */
  86. $this->setSellerCurItem('store_setting');
  87. View::assign('store_info', $store_info);
  88. View::assign('store_grade', $store_grade);
  89. /**
  90. * 页面输出
  91. */
  92. return View::fetch($this->template_dir . 'setting');
  93. }
  94. public function getMiniProCode($force = 0)
  95. {
  96. if ($force || !file_exists(BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_STORE . DIRECTORY_SEPARATOR . session('store_id') . '/miniprogram_code.png')) {
  97. $wechat_model = model('wechat');
  98. $wechat_model->getOneWxconfig();
  99. $a = $wechat_model->getMiniProCode(session('store_id'), 'pages/home/storedetail/Storedetail');
  100. if (@imagecreatefromstring($a) == false) {
  101. $a = json_decode($a);
  102. //View::assign('errmsg',$a->errmsg);
  103. } else {
  104. if (is_dir(BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_STORE . DIRECTORY_SEPARATOR . session('store_id')) || (!is_dir(BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_STORE . DIRECTORY_SEPARATOR . session('store_id')) && mkdir(BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_STORE . DIRECTORY_SEPARATOR . session('store_id'), 0755, true))) {
  105. file_put_contents(BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_STORE . DIRECTORY_SEPARATOR . session('store_id') . '/miniprogram_code.png', $a);
  106. return true;
  107. } else {
  108. //View::assign('errmsg','没有权限生成目录');
  109. }
  110. }
  111. } else {
  112. return true;
  113. }
  114. return false;
  115. }
  116. public function store_image_upload()
  117. {
  118. $store_id = session('store_id');
  119. $upload_file = BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_STORE . DIRECTORY_SEPARATOR . $store_id;
  120. $file_name = session('store_id') . '_' . date('YmdHis') . rand(10000, 99999) . '.png';
  121. $store_image_name = input('param.id');
  122. if (!in_array($store_image_name, array('store_logo', 'store_banner', 'store_avatar'))) {
  123. exit;
  124. }
  125. if (!empty($_FILES[$store_image_name]['name'])) {
  126. $res = ds_upload_pic(ATTACH_STORE . DIRECTORY_SEPARATOR . $store_id, $store_image_name, $file_name);
  127. if ($res['code']) {
  128. $file_name = $res['data']['file_name'];
  129. if (file_exists($upload_file . DIRECTORY_SEPARATOR . $file_name)) {
  130. /* 处理图片 */
  131. $image = Image::open($upload_file . DIRECTORY_SEPARATOR . $file_name);
  132. switch ($store_image_name) {
  133. case 'store_logo':
  134. $image->thumb(200, 60, \think\Image::THUMB_CENTER)->save($upload_file . DIRECTORY_SEPARATOR . $file_name);
  135. break;
  136. case 'store_banner':
  137. $image->thumb(1920, 150, \think\Image::THUMB_CENTER)->save($upload_file . DIRECTORY_SEPARATOR . $file_name);
  138. break;
  139. case 'store_avatar':
  140. $image->thumb(100, 100, \think\Image::THUMB_CENTER)->save($upload_file . DIRECTORY_SEPARATOR . $file_name);
  141. break;
  142. default:
  143. break;
  144. }
  145. }
  146. } else {
  147. json_encode(array('error' => $res['msg']));
  148. exit;
  149. }
  150. }
  151. $store_model = model('store');
  152. //删除原图
  153. $store_info = $store_model->getStoreInfoByID($store_id);
  154. @unlink($upload_file . DIRECTORY_SEPARATOR . $store_info[$store_image_name]);
  155. $result = $store_model->editStore(array($store_image_name => $file_name), array('store_id' => $store_id));
  156. if ($result) {
  157. $data = array();
  158. $data['file_name'] = $file_name;
  159. $data['file_path'] = ds_get_pic(ATTACH_STORE . '/' . $store_id, $file_name);
  160. /**
  161. * 整理为json格式
  162. */
  163. $output = json_encode($data);
  164. echo $output;
  165. exit;
  166. }
  167. }
  168. /**
  169. * 店铺幻灯片
  170. */
  171. public function store_slide()
  172. {
  173. /**
  174. * 模型实例化
  175. */
  176. $store_model = model('store');
  177. $upload_model = model('upload');
  178. /**
  179. * 保存店铺信息
  180. */
  181. if (request()->isPost()) {
  182. // 更新店铺信息
  183. $update = array();
  184. $update['store_slide'] = implode(',', input('post.image_path/a'));
  185. $update['store_slide_url'] = implode(',', input('post.image_url/a'));
  186. $store_model->editStore($update, array('store_id' => session('store_id')));
  187. // 删除upload表中数据
  188. $upload_model->delUpload(array('upload_type' => 3, 'item_id' => session('store_id')));
  189. ds_json_encode(10000, lang('ds_common_save_succ'));
  190. } else {
  191. // 删除upload中的无用数据
  192. $upload_info = $upload_model->getUploadList(array('upload_type' => 3, 'item_id' => session('store_id')), 'file_name');
  193. if (is_array($upload_info) && !empty($upload_info)) {
  194. foreach ($upload_info as $val) {
  195. @unlink(BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_SLIDE . DIRECTORY_SEPARATOR . $val['file_name']);
  196. }
  197. }
  198. $upload_model->delUpload(array('upload_type' => 3, 'item_id' => session('store_id')));
  199. $store_info = $store_model->getStoreInfoByID(session('store_id'));
  200. if ($store_info['store_slide'] != '' && $store_info['store_slide'] != ',,,,') {
  201. View::assign('store_slide', explode(',', $store_info['store_slide']));
  202. View::assign('store_slide_url', explode(',', $store_info['store_slide_url']));
  203. }
  204. $this->setSellerCurMenu('seller_setting');
  205. /* 设置卖家当前栏目 */
  206. $this->setSellerCurItem('store_slide');
  207. return View::fetch($this->template_dir . 'slide');
  208. }
  209. }
  210. /**
  211. * 店铺幻灯片ajax上传
  212. */
  213. public function silde_image_upload()
  214. {
  215. $file_id = intval(input('param.file_id'));
  216. $id = input('param.id');
  217. if ($file_id < 0 || empty($id)) {
  218. return;
  219. }
  220. $file_name = session('store_id') . '_' . $file_id . '.png';
  221. $res = ds_upload_pic(ATTACH_SLIDE, $id, $file_name);
  222. if ($res['code']) {
  223. $file_name = $res['data']['file_name'];
  224. $img_path = $file_name;
  225. $output['file_id'] = $file_id;
  226. $output['id'] = $id;
  227. $output['file_name'] = $img_path;
  228. $output['file_url'] = ds_get_pic(ATTACH_SLIDE, $img_path);
  229. echo json_encode($output);
  230. exit;
  231. } else {
  232. json_encode(array('error' => $res['msg']));
  233. exit;
  234. }
  235. }
  236. /**
  237. * ajax删除幻灯片图片
  238. */
  239. public function dorp_img()
  240. {
  241. $file_id = intval(input('param.file_id'));
  242. $img_src = input('param.img_src');
  243. if ($file_id < 0 || empty($img_src)) {
  244. return;
  245. }
  246. $ext = strrchr($img_src, '.');
  247. $file_name = session('store_id') . '_' . $file_id . $ext;
  248. @unlink(BASE_UPLOAD_PATH . DIRECTORY_SEPARATOR . ATTACH_SLIDE . DIRECTORY_SEPARATOR . $file_name);
  249. echo json_encode(array('succeed' => lang('ds_common_save_succ')));
  250. die;
  251. }
  252. /**
  253. * 卖家店铺主题设置
  254. *
  255. * @param string
  256. * @param string
  257. * @return
  258. */
  259. public function theme()
  260. {
  261. /**
  262. * 店铺信息
  263. */
  264. $store_class = model('store');
  265. $store_info = $store_class->getStoreInfoByID(session('store_id'));
  266. /**
  267. * 主题配置信息
  268. */
  269. $style_data = array();
  270. $style_configurl = PUBLIC_PATH . '/static/home/default/store/styles/' . "styleconfig.php";
  271. if (file_exists($style_configurl)) {
  272. include_once($style_configurl);
  273. }
  274. /**
  275. * 当前店铺主题
  276. */
  277. $curr_store_theme = !empty($store_info['store_theme']) ? $store_info['store_theme'] : 'default';
  278. /**
  279. * 当前店铺预览图片
  280. */
  281. $curr_image = BASE_SITE_ROOT . '/static/home/default/store/styles/' . $curr_store_theme . '/images/preview.jpg';
  282. $curr_theme = array(
  283. 'curr_name' => $curr_store_theme,
  284. 'curr_truename' => $style_data[$curr_store_theme]['truename'],
  285. 'curr_image' => $curr_image
  286. );
  287. // 自营店全部可用
  288. if (check_platform_store()) {
  289. $themes = array_keys($style_data);
  290. } else {
  291. /**
  292. * 店铺等级
  293. */
  294. $grade_class = model('storegrade');
  295. $grade = $grade_class->getOneStoregrade($store_info['grade_id']);
  296. /**
  297. * 可用主题
  298. */
  299. $themes = explode('|', $grade['storegrade_template']);
  300. }
  301. $theme_list = array();
  302. /**
  303. * 可用主题预览图片
  304. */
  305. foreach ($style_data as $key => $val) {
  306. if (in_array($key, $themes)) {
  307. $theme_list[$key] = array(
  308. 'name' => $key, 'truename' => $val['truename'],
  309. 'image' => BASE_SITE_ROOT . '/static/home/default/store/styles/' . $key . '/images/preview.jpg'
  310. );
  311. }
  312. }
  313. /**
  314. * 页面输出
  315. */
  316. $this->setSellerCurMenu('seller_setting');
  317. $this->setSellerCurItem('store_theme');
  318. View::assign('store_info', $store_info);
  319. View::assign('curr_theme', $curr_theme);
  320. View::assign('theme_list', $theme_list);
  321. return View::fetch($this->template_dir . 'theme');
  322. }
  323. /**
  324. * 卖家店铺主题设置
  325. *
  326. * @param string
  327. * @param string
  328. * @return
  329. */
  330. public function set_theme()
  331. {
  332. //读取语言包
  333. $style = input('param.style_name');
  334. $style = isset($style) ? trim($style) : null;
  335. if (!empty($style) && file_exists(PUBLIC_PATH . '/static/home/default/store/styles/theme/' . $style . '/images/preview.jpg')) {
  336. $store_class = model('store');
  337. $rs = $store_class->editStore(array('store_theme' => $style), array('store_id' => session('store_id')));
  338. ds_json_encode(10000, lang('store_theme_congfig_success'));
  339. } else {
  340. ds_json_encode(10001, lang('store_theme_congfig_fail'));
  341. }
  342. }
  343. protected function getStoreMbSliders()
  344. {
  345. $store_info = model('store')->getStoreInfoByID(session('store_id'));
  346. $mbSliders = @unserialize($store_info['mb_sliders']);
  347. if (!$mbSliders) {
  348. $mbSliders = array_fill(1, self::MAX_MB_SLIDERS, array(
  349. 'img' => '', 'type' => 1, 'link' => '',
  350. ));
  351. }
  352. return $mbSliders;
  353. }
  354. protected function setStoreMbSliders(array $mbSliders)
  355. {
  356. return model('store')->editStore(array(
  357. 'mb_sliders' => serialize($mbSliders),
  358. ), array(
  359. 'store_id' => session('store_id'),
  360. ));
  361. }
  362. public function store_mb_sliders()
  363. {
  364. //上传文件名称
  365. $fileName = input('param.id');
  366. //文件ID
  367. $file_id = intval(input('param.file_id'));
  368. if (!preg_match('/^file_(\d+)$/', $fileName, $fileIndex) || empty($_FILES[$fileName]['name'])) {
  369. echo json_encode(array('error' => lang('param_error')));
  370. exit;
  371. }
  372. $fileIndex = (int) $fileIndex[1];
  373. if ($fileIndex < 1 || $fileIndex > self::MAX_MB_SLIDERS) {
  374. echo json_encode(array('error' => lang('param_error')));
  375. exit;
  376. }
  377. $mbSliders = $this->getStoreMbSliders();
  378. $file_name = session('store_id') . '_' . $file_id . '.png';
  379. $res = ds_upload_pic(ATTACH_STORE . DIRECTORY_SEPARATOR . 'mobileslide', $fileName, $file_name);
  380. if ($res['code']) {
  381. $file_name = $res['data']['file_name'];
  382. $newImg = $file_name;
  383. $oldImg = $mbSliders[$fileIndex]['img'];
  384. $mbSliders[$fileIndex]['img'] = $newImg;
  385. //即时更新
  386. $this->setStoreMbSliders($mbSliders);
  387. if ($oldImg && file_exists($oldImg)) {
  388. unlink($oldImg);
  389. }
  390. echo json_encode(array(
  391. 'uploadedUrl' => ds_get_pic(ATTACH_STORE . DIRECTORY_SEPARATOR . 'mobileslide', $newImg),
  392. ));
  393. exit;
  394. } else {
  395. echo json_encode(array('error' => $res['msg']));
  396. exit;
  397. }
  398. }
  399. public function store_mb_sliders_drop()
  400. {
  401. try {
  402. $id = (int) $_REQUEST['id'];
  403. if ($id < 1 || $id > self::MAX_MB_SLIDERS) {
  404. throw new \think\Exception(lang('param_error'), 10006);
  405. }
  406. $mbSliders = $this->getStoreMbSliders();
  407. $mbSliders[$id]['img'] = '';
  408. if (!$this->setStoreMbSliders($mbSliders)) {
  409. throw new \think\Exception(lang('update_failed'), 10006);
  410. }
  411. echo json_encode(array(
  412. 'success' => true,
  413. ));
  414. } catch (\Exception $ex) {
  415. echo json_encode(array(
  416. 'success' => false, 'error' => $ex->getMessage(),
  417. ));
  418. }
  419. }
  420. public function store_mobile()
  421. {
  422. View::assign('max_mb_sliders', self::MAX_MB_SLIDERS);
  423. $store_info = model('store')->getStoreInfoByID(session('store_id'));
  424. // 页头背景图
  425. $mb_title_img = $store_info['mb_title_img'] ? ds_get_pic(ATTACH_STORE, $store_info['mb_title_img']) : '';
  426. // 轮播
  427. $mbSliders = $this->getStoreMbSliders();
  428. if (request()->isPost()) {
  429. $update_array = array();
  430. if ($mb_title_img_del = !empty(input('post.mb_title_img_del'))) {
  431. $update_array['mb_title_img'] = '';
  432. }
  433. if (!empty($_FILES['mb_title_img']['name'])) {
  434. $file_name = session('store_id') . '_' . date('YmdHis') . rand(10000, 99999) . '.png';
  435. $res = ds_upload_pic(ATTACH_STORE, 'mb_title_img');
  436. if ($res['code']) {
  437. $file_name = $res['data']['file_name'];
  438. $mb_title_img_del = true;
  439. $update_array['mb_title_img'] = $file_name;
  440. } else {
  441. $this->error($res['msg']);
  442. }
  443. }
  444. if ($mb_title_img_del && $mb_title_img && file_exists($mb_title_img)) {
  445. unlink($mb_title_img);
  446. }
  447. // mb_sliders
  448. $skuToValid = array();
  449. $mb_sliders_links_array = input('post.mb_sliders_links/a'); #获取数组
  450. $mb_sliders_type_array = input('post.mb_sliders_type/a'); #获取数组
  451. $mb_sliders_sort_array = input('post.mb_sliders_sort/a'); #获取数组
  452. foreach ($mb_sliders_links_array as $k => $v) {
  453. if ($k < 1 || $k > self::MAX_MB_SLIDERS) {
  454. $this->error(lang('param_error'));
  455. }
  456. $type = intval($mb_sliders_type_array[$k]);
  457. switch ($type) {
  458. case 1:
  459. // 链接URL
  460. $v = (string) $v;
  461. if (!preg_match('#^https?://#', $v)) {
  462. $v = '';
  463. }
  464. break;
  465. case 2:
  466. // 商品ID
  467. $v = (int) $v;
  468. if ($v < 1) {
  469. $v = '';
  470. } else {
  471. $skuToValid[$k] = $v;
  472. }
  473. break;
  474. default:
  475. $type = 1;
  476. $v = '';
  477. break;
  478. }
  479. $mbSliders[$k]['type'] = $type;
  480. $mbSliders[$k]['link'] = $v;
  481. }
  482. if ($skuToValid) {
  483. $condition = array();
  484. $condition[] = array('goods_id', 'in', $skuToValid);
  485. $condition[] = array('store_id', '=', session('store_id'));
  486. $validSkus = model('goods')->getGoodsList($condition);
  487. if (!empty($validSkus)) {
  488. $validSkus = ds_change_arraykey($validSkus, 'goods_id');
  489. }
  490. foreach ($skuToValid as $k => $v) {
  491. if (!isset($validSkus[$v])) {
  492. $mbSliders[$k]['link'] = '';
  493. }
  494. }
  495. }
  496. // sort
  497. for ($i = 0; $i < self::MAX_MB_SLIDERS; $i++) {
  498. $sortedMbSliders[$i + 1] = @$mbSliders[$mb_sliders_sort_array[$i]];
  499. }
  500. $update_array['mb_sliders'] = serialize($sortedMbSliders);
  501. model('store')->editStore($update_array, array(
  502. 'store_id' => session('store_id'),
  503. ));
  504. $this->success(lang('save_success'), (string) url('Sellersetting/store_mobile'));
  505. }
  506. $mbSliderUrls = array();
  507. foreach ($mbSliders as $v) {
  508. if ($v['img']) {
  509. $mbSliderUrls[] = ds_get_pic(ATTACH_STORE . DIRECTORY_SEPARATOR . 'mobileslide', $v['img']);
  510. }
  511. }
  512. View::assign('mb_title_img', $mb_title_img);
  513. View::assign('mbSliders', $mbSliders);
  514. View::assign('mbSliderUrls', $mbSliderUrls);
  515. $this->setSellerCurMenu('seller_setting');
  516. $this->setSellerCurItem('store_mobile');
  517. return View::fetch($this->template_dir . 'store_mobile');
  518. }
  519. public function map()
  520. {
  521. $this->setSellerCurMenu('seller_setting');
  522. $this->setSellerCurItem('store_map');
  523. /**
  524. * 实例化模型
  525. */
  526. $store_model = model('store');
  527. $store_id = session('store_id'); //当前店铺ID
  528. /**
  529. * 获取店铺信息
  530. */
  531. $store_info = $store_model->getStoreInfoByID($store_id);
  532. /**
  533. * 保存店铺设置
  534. */
  535. if (request()->isPost()) {
  536. model('store')->editStore(array(
  537. 'store_address' => input('post.company_address_detail'),
  538. 'region_id' => input('post.district_id') ? input('post.district_id') : (input('post.city_id') ? input('post.city_id') : (input('post.province_id') ? input('post.province_id') : 0)),
  539. 'area_info' => input('post.company_address'),
  540. 'store_longitude' => input('post.longitude'),
  541. 'store_latitude' => input('post.latitude')
  542. ), array(
  543. 'store_id' => session('store_id'),
  544. ));
  545. ds_json_encode(10000, lang('save_success'));
  546. }
  547. View::assign('store_info', $store_info);
  548. View::assign('baidu_ak', config('ds_config.baidu_ak'));
  549. return View::fetch($this->template_dir . 'map');
  550. }
  551. /**
  552. * 用户中心右边,小导航
  553. *
  554. * @param string $menu_type 导航类型
  555. * @param string $name 当前导航的name
  556. * @return
  557. */
  558. protected function getSellerItemList()
  559. {
  560. $menu_array = array(
  561. 1 => array(
  562. 'name' => 'store_setting', 'text' => lang('ds_member_path_store_config'),
  563. 'url' => (string) url('Sellersetting/setting')
  564. ),
  565. 2 => array(
  566. 'name' => 'store_map', 'text' => lang('ds_member_path_store_map'),
  567. 'url' => (string) url('Sellersetting/map')
  568. ),
  569. 4 => array(
  570. 'name' => 'store_slide', 'text' => lang('ds_member_path_store_slide'),
  571. 'url' => (string) url('Sellersetting/store_slide')
  572. ), 5 => array(
  573. 'name' => 'store_theme', 'text' => lang('store_theme'), 'url' => (string) url('Sellersetting/theme')
  574. ),
  575. 7 => array(
  576. 'name' => 'store_mobile', 'text' => lang('mobile_phone_store_settings'), 'url' => (string) url('Sellersetting/store_mobile'),
  577. ),
  578. );
  579. return $menu_array;
  580. }
  581. }