1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\home\controller;
- use think\facade\View;
- use think\facade\Lang;
- class Link extends BaseMall
- {
- public function initialize()
- {
- parent::initialize();
- Lang::load(base_path() . 'home/lang/' . config('lang.default_lang') . '/link.lang.php');
- }
- public function index()
- {
-
- $uid = input('uid');
- cookie('uid', $uid);
-
- $link_model = model('link');
- $link_list = $link_model->getLinkList();
-
- if (is_array($link_list)) {
- foreach ($link_list as $k => $v) {
- if (!empty($v['link_pic'])) {
- $link_list[$k]['link_pic'] = ds_get_pic(DIR_ADMIN . '/link', $v['link_pic']);
- }
- }
- }
- View::assign('link_list', $link_list);
- View::assign('link', 'index');
- return View::fetch($this->template_dir . 'link');
- }
- }
|