Sellersetting.php 24 KB

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