Sellersetting.php 24 KB

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