JiamengController.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. <?php
  2. namespace app\admin\controller;
  3. use cmf\controller\AdminBaseController;
  4. use think\Db;
  5. use tree\Tree;
  6. use app\admin\model\CategoryModel;
  7. class JiamengController extends AdminBaseController{
  8. public function index(){
  9. set_time_limit(0);
  10. $param = $this->request->param();
  11. //分类信息
  12. $cate_tree=$this->getAccessTreeData();
  13. $this->assign('cate_tree',json_encode($cate_tree));
  14. isset($param['cate_id']) or $param['cate_id']=0;
  15. $title = isset($param['title'])?trim($param['title']):'';
  16. $this->assign('title',$title);
  17. $this->assign('cate_id',$param['cate_id']);
  18. $lists = array();
  19. $map = array();
  20. if($param['cate_id']){
  21. //分类信息
  22. $cateinfo = Db::name('category')->where('id',$param['cate_id'])->find();
  23. if($cateinfo['parent_id']>0){
  24. $map['catid'] = $param['cate_id'];
  25. }else{
  26. $soncate = Db::name('category')->where('parent_id',$param['cate_id'])->select();
  27. $sonarr = array();
  28. foreach($soncate as $k=>$v){
  29. $sonarr[] = $v['id'];
  30. }
  31. $map['catid'] = $sonarr;
  32. }
  33. }
  34. $query = array(
  35. 'cate_id' => $param['cate_id'],
  36. 'title' => $title
  37. );
  38. if($title!=''){
  39. $lists = Db::name('Jiameng')->where($map)->where('title','like','%'.$title.'%')->order('list_order asc,create_time desc')->paginate(20,false,['query'=>$query]);
  40. }else{
  41. $lists = Db::name('Jiameng')->where($map)->order('list_order asc,create_time desc')->paginate(20,false,['query'=>$query]);
  42. }
  43. $this->assign('lists',$lists);
  44. $cates = Db::name('category')->select();
  45. $catelist = array();
  46. foreach($cates as $k=>$v){
  47. $catelist[$v['id']] = $v['catname'];
  48. }
  49. $this->assign('catelist',$catelist);
  50. $this->assign('page','');
  51. return $this->fetch();
  52. }
  53. /**
  54. * 获取树的信息
  55. */
  56. public function getAccessTreeData(){
  57. $rs_array=[];
  58. $list=Db::name('category')->order(["list_order" => "ASC"])->select()->toArray();
  59. if(!empty($list)){
  60. foreach($list as $k=>$v){
  61. $rs_array[$v['id']]=$v;
  62. $parents=$this->getDeepParent($v);
  63. foreach($parents as $pv){
  64. $rs_array[$pv['id']]=$pv;
  65. }
  66. }
  67. }else{
  68. $rs_array=$list;
  69. }
  70. if(!empty($rs_array)){
  71. foreach($rs_array as $k=>$v){
  72. $rs_array[$k]['name']=$v['catname'];
  73. $rs_array[$k]['iconSkin']='dept';
  74. }
  75. }
  76. return array_values($rs_array);
  77. }
  78. /**
  79. * 父节点数据
  80. */
  81. public function getDeepParent($data){
  82. $temp_array=[];
  83. $parent_data_info=Db::name('category')->where('id',$data['parent_id'])->find();
  84. if(empty($parent_data_info)){
  85. return $temp_array;
  86. }
  87. if(!empty($parent_data_info)){
  88. $temp_array[$parent_data_info['id']]=$parent_data_info;
  89. $rs_array=$this->getDeepParent($parent_data_info);
  90. }
  91. return array_merge($temp_array,$rs_array);
  92. }
  93. /**
  94. * 添加加盟信息
  95. */
  96. public function add(){
  97. $touziarr = config('params.touziLevels');
  98. $this->assign('touziarr',$touziarr);
  99. $area_list = config('params.areaList');
  100. $this->assign('area_list',$area_list);
  101. $cates = Db::name('category')->where('parent_id',0)->order('list_order')->select();
  102. foreach($cates as $k=>$v){
  103. $son = Db::name('category')->where('parent_id',$v['id'])->order('list_order')->select();
  104. $v['son'] = $son;
  105. $cates[$k] = $v;
  106. }
  107. $this->assign('cates',$cates);
  108. return $this->fetch();
  109. }
  110. public function addPost(){
  111. $param = $this->request->param();
  112. isset($param['thumb'])&&$param['thumb']!='' or $this->error('请上传标题图片');
  113. isset($param['logo'])&&$param['logo']!='' or $this->error('请上传logo图片');
  114. isset($param['title'])&&$param['title']!='' or $this->error('请填写品牌名称');
  115. $param['create_time'] = time();
  116. $catinfo = Db::name('category')->where('id',$param['catid'])->find();
  117. $param['pcatid'] = $catinfo['parent_id'];
  118. $data = array(
  119. 'content' => isset($param['content'])?$param['content']:'',
  120. 'youshi' => isset($param['youshi'])?$param['youshi']:'',
  121. 'tiaojian' => isset($param['tiaojian'])?$param['tiaojian']:'',
  122. 'liucheng' => isset($param['liucheng'])?$param['liucheng']:''
  123. );
  124. unset($param['content']);
  125. unset($param['youshi']);
  126. unset($param['tiaojian']);
  127. unset($param['liucheng']);
  128. $res = Db::name('Jiameng')->insertGetId($param);
  129. $data['id'] = $res;
  130. Db::name('Jiameng_data')->insert($data);
  131. if($res){
  132. $this->success('添加成功');
  133. }else{
  134. $this->error('添加失败');
  135. }
  136. }
  137. public function show(){
  138. $param = $this->request->param();
  139. isset($param['id']) or $this->error('非法访问');
  140. $info = Db::name('jiameng')->alias('a')->field('a.*,b.catname')->join('jm_category b','a.catid=b.id')->where('a.id',$param['id'])->find();
  141. $content = Db::name('jiameng_data')->where('id',$param['id'])->find();
  142. $info['content'] = $content['content'];
  143. $info['youshi'] = $content['youshi'];
  144. $info['tiaojian'] = $content['tiaojian'];
  145. $info['liucheng'] = $content['liucheng'];
  146. $this->assign('info',$info);
  147. return $this->fetch();
  148. }
  149. /**
  150. * 添加标签页面
  151. */
  152. public function cateAdd(){
  153. $param = $this->request->param();
  154. //上级分类
  155. isset($param['parent_id']) or $param['parent_id'] = 0;
  156. $shangji = array();
  157. if($param['parent_id']>0){
  158. $shangji = Db::name('category')->where('id',$param['parent_id'])->find();
  159. }
  160. $this->assign('shangji',$shangji);
  161. return $this->fetch();
  162. }
  163. public function listOrder(){
  164. $CateModel = new CategoryModel();
  165. parent::listOrders($CateModel);
  166. $this->success("排序更新成功!");
  167. }
  168. /**
  169. * 添加标签
  170. */
  171. public function cateAddPost(){
  172. $param = $this->request->param();
  173. isset($param['catname'])&&trim($param['catname'])!='' or $this->error('请填写分类名称');
  174. isset($param['parent_id']) or $param['parent_id'] = 0;
  175. $data = array(
  176. 'catname' => $param['catname'],
  177. 'enname' => $param['enname'],
  178. 'seo_title' => $param['seo_title'],
  179. 'seo_keywords' => $param['seo_keywords'],
  180. 'seo_desc' => $param['seo_desc'],
  181. 'parent_id' => $param['parent_id'],
  182. 'list_order' => $param['list_order'],
  183. 'status' => $param['status'],
  184. 'create_time' => time()
  185. );
  186. $res = Db::name('category')->insert($data);
  187. if($res){
  188. $this->success('添加成功');
  189. }else{
  190. $this->error('添加失败');
  191. }
  192. }
  193. /**
  194. * 标签列表
  195. */
  196. public function cateList(){
  197. $result = Db::name('Category')->order(["list_order" => "ASC"])->select()->toArray();
  198. $tree = new Tree();
  199. $tree->icon = ['&nbsp;&nbsp;&nbsp;│ ', '&nbsp;&nbsp;&nbsp;├─', '&nbsp;&nbsp;&nbsp;└─ '];
  200. $tree->nbsp = '&nbsp;&nbsp;&nbsp;';
  201. $newJiamengs = [];
  202. foreach ($result as $m) {
  203. $newJiamengs[$m['id']] = $m;
  204. }
  205. foreach ($result as $key => $value) {
  206. $result[$key]['parent_id_node'] = ($value['parent_id']) ? ' class="child-of-node-' . $value['parent_id'] . '"' : '';
  207. $result[$key]['style'] = empty($value['parent_id']) ? '' : 'display:none;';
  208. $result[$key]['str_manage'] = '<a class="btn btn-xs btn-primary" href="' . url("Jiameng/cateAdd", ["parent_id" => $value['id'], "Jiameng_id" => $this->request->param("Jiameng_id")]) . '">' . lang('ADD_SUB_MENU') . '</a>
  209. <a class="btn btn-xs btn-primary" href="' . url("Jiameng/cateEdit", ["id" => $value['id'], "Jiameng_id" => $this->request->param("Jiameng_id")]) . '">' . lang('EDIT') . '</a>
  210. <a class="btn btn-xs btn-danger js-ajax-delete" href="' . url("Jiameng/cateDelete", ["id" => $value['id'], "Jiameng_id" => $this->request->param("Jiameng_id")]) . '">' . lang('DELETE') . '</a> ';
  211. $result[$key]['status'] = $value['status'] ? '<span class="label label-success">' . lang('DISPLAY') . '</span>' : '<span class="label label-warning">' . lang('HIDDEN') . '</span>';
  212. }
  213. $tree->init($result);
  214. $str = "<tr id='node-\$id' \$parent_id_node style='\$style'>
  215. <td style='padding-left:20px;'><input name='list_orders[\$id]' type='text' size='3' value='\$list_order' class='input input-order'></td>
  216. <td>\$id</td>
  217. <td>\$spacer\$catname</td>
  218. <td>\$status</td>
  219. <td width='300px'>\$str_manage</td>
  220. </tr>";
  221. $category = $tree->getTree(0, $str);
  222. $this->assign("category", $category);
  223. return $this->fetch();
  224. return $this->fetch();
  225. }
  226. public function cateDelete(){
  227. $param = $this->request->param();
  228. isset($param['id']) or $this->error('没有id');
  229. $res = Db::name('category')->where('id',$param['id'])->delete();
  230. if($res){
  231. $this->success('删除分类成功');
  232. }else{
  233. $this->error('删除分类失败');
  234. }
  235. }
  236. /**
  237. * 分类编辑
  238. */
  239. public function cateEdit(){
  240. $param = $this->request->param();
  241. isset($param['id']) or $this->error('没有id');
  242. $res = Db::name('category')->where('id',$param['id'])->find();
  243. $this->assign('info',$res);
  244. return $this->fetch();
  245. }
  246. public function cateEditPost(){
  247. $param = $this->request->param();
  248. isset($param['catname'])&&trim($param['catname'])!='' or $this->error('请填写分类名称');
  249. isset($param['parent_id']) or $param['parent_id'] = 0;
  250. $data = array(
  251. 'id' => $param['id'],
  252. 'catname' => $param['catname'],
  253. 'enname' => $param['enname'],
  254. 'seo_title' => $param['seo_title'],
  255. 'seo_keywords' => $param['seo_keywords'],
  256. 'seo_desc' => $param['seo_desc'],
  257. 'parent_id' => $param['parent_id'],
  258. 'list_order' => $param['list_order'],
  259. 'status' => $param['status'],
  260. 'update_time' => time()
  261. );
  262. $res = Db::name('category')->update($data);
  263. if($res){
  264. $this->success('编辑成功');
  265. }else{
  266. $this->error('编辑失败');
  267. }
  268. }
  269. /**
  270. * 编辑
  271. */
  272. public function edit(){
  273. $param = $this->request->param();
  274. isset($param['id']) or $this->error('非法访问');
  275. $touziarr = array(
  276. '1万元以下',
  277. '1~5万元',
  278. '5~10万元',
  279. '10~20万元',
  280. '20~50万元',
  281. '50~100万元',
  282. '100万元以上',
  283. '200万元以上',
  284. '300万元以上'
  285. );
  286. $this->assign('touziarr',$touziarr);
  287. $area_list = array('不限','北京','天津','上海','广州','重庆','浙江','江苏','广东','山东','山西','福建','安徽','河北','河南','湖北','湖南','吉林','江西','辽宁','四川','云南','陕西','广西','海南','贵州','黑龙江','内蒙古','宁夏','甘肃','西藏','青海','新疆');
  288. $this->assign('area_list',$area_list);
  289. $cates = Db::name('category')->where('parent_id',0)->order('list_order')->select();
  290. foreach($cates as $k=>$v){
  291. $son = Db::name('category')->where('parent_id',$v['id'])->order('list_order')->select();
  292. $v['son'] = $son;
  293. $cates[$k] = $v;
  294. }
  295. $this->assign('cates',$cates);
  296. $info = Db::name('jiameng')->where('id',$param['id'])->find();
  297. $content = Db::name('jiameng_data')->where('id',$param['id'])->find();
  298. $info['content'] = $content['content'];
  299. $info['youshi'] = $content['youshi'];
  300. $info['tiaojian'] = $content['tiaojian'];
  301. $info['liucheng'] = $content['liucheng'];
  302. $this->assign('info',$info);
  303. return $this->fetch();
  304. }
  305. /**
  306. * 处理编辑
  307. */
  308. public function editPost(){
  309. $param = $this->request->param();
  310. isset($param['thumb']) or $this->error('请上传标题图片');
  311. isset($param['title']) or $this->error('请填写品牌标题');
  312. $catinfo = Db::name('category')->where('id',$param['catid'])->find();
  313. $param['pcatid'] = $catinfo['parent_id'];
  314. $param['update_time'] = time();
  315. $data = array(
  316. 'content' => isset($param['content'])?$param['content']:'',
  317. 'youshi' => isset($param['youshi'])?$param['youshi']:'',
  318. 'tiaojian' => isset($param['tiaojian'])?$param['tiaojian']:'',
  319. 'liucheng' => isset($param['liucheng'])?$param['liucheng']:''
  320. );
  321. unset($param['content']);
  322. unset($param['youshi']);
  323. unset($param['tiaojian']);
  324. unset($param['liucheng']);
  325. $res = Db::name('Jiameng')->update($param);
  326. Db::name('Jiameng_data')->where('id',$param['id'])->update($data);
  327. if($res){
  328. $this->success('编辑成功');
  329. }else{
  330. $this->error('编辑失败');
  331. }
  332. }
  333. /**
  334. * 删除
  335. */
  336. public function delete(){
  337. $param = $this->request->param();
  338. isset($param['id']) or $this->error('需要id');
  339. $res = Db::name('Jiameng')->where('id',$param['id'])->delete();
  340. if($res){
  341. $this->success('删除成功');
  342. }else{
  343. $this->error('删除失败');
  344. }
  345. }
  346. /**
  347. * 编辑标签
  348. */
  349. public function editTag(){
  350. $param = $this->request->param();
  351. isset($param['id']) or $this->error('需要id');
  352. $info = Db::name('category')->where('id',$param['id'])->find();
  353. $this->assign('info',$info);
  354. return $this->fetch();
  355. }
  356. /**
  357. * 处理编辑标签
  358. */
  359. public function editTagPost(){
  360. $param = $this->request->param();
  361. isset($param['id']) or $this->error('需要id');
  362. $param['edittime'] = time();
  363. $res = Db::name('category')->update($param);
  364. if($res){
  365. $this->success('编辑成功');
  366. }else{
  367. $this->error('编辑失败');
  368. }
  369. }
  370. public function chongfu(){
  371. $param = $this->request->param();
  372. $title = isset($param['title'])?trim($param['title']):'';
  373. if($title==''){
  374. echo 0;
  375. }
  376. $res = Db::name('jiameng')->where('title',$title)->count();
  377. if($res>0){
  378. echo 1;
  379. }else{
  380. echo 0;
  381. }
  382. }
  383. public function seo(){
  384. $param = $this->request->param();
  385. $page = isset($param['page'])?$param['page']:1;
  386. $msg = $param['msg'];
  387. if(count($msg)==0){
  388. $this->error('请选择要提交的信息');
  389. }
  390. $str = implode(",",$msg);
  391. if(isset($param['pc'])){
  392. $this->baidu($str,$page);
  393. }
  394. if(isset($param['mobile'])){
  395. $this->shouji($str,$page);
  396. }
  397. if(isset($param['xiongzhang'])){
  398. $this->bear($str,$page);
  399. }
  400. $this->success('提交成功');
  401. }
  402. // 百度链接自动提交
  403. public function baidu($ids,$page){
  404. $where = [];
  405. $where[] = ['id','in', $ids];
  406. $artRes = Db::name('jiameng')->where($where)->select()->toArray();
  407. // print_r($artRes);die;
  408. $urls = array();
  409. $dataRes = array();
  410. $local = $_SERVER['SERVER_NAME'];
  411. foreach ($artRes as $k => &$v) {
  412. $v['arcurl'] = 'http://'.$local.'/b'.$v['id']."/";
  413. $urls[] = $v['arcurl'];
  414. }
  415. $site_info = cmf_get_option('site_info');
  416. // print_r($site_info);die;
  417. if($site_info['site_tj_pc'] == ''){
  418. $this->error("请设置百度提交参数!",'');
  419. }
  420. $site_baidu = $site_info['site_tj_pc'];
  421. $site_baidu = explode('&amp;', $site_baidu);
  422. $site_baidu = implode('&', $site_baidu);
  423. $site_baidu = str_replace(PHP_EOL, '', $site_baidu);
  424. // dump($dataRes);die;
  425. if(count($urls)>0 && trim($site_baidu)!=''){
  426. $api = $site_baidu;
  427. $ch = curl_init();
  428. $options = array(
  429. CURLOPT_URL => $api,
  430. CURLOPT_POST => true,
  431. CURLOPT_RETURNTRANSFER => true,
  432. CURLOPT_POSTFIELDS => implode("\n", $urls),
  433. CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
  434. );
  435. curl_setopt_array($ch, $options);
  436. $curlresult = curl_exec($ch);
  437. $cuarray = json_decode($curlresult,true);
  438. // dump($cuarray);die;
  439. if($cuarray['success']>0){
  440. $this->success("共提交".$cuarray['success']."条。今日自动提交剩余".$cuarray['remain'].'条','jiameng/index?page='.$page);
  441. }else{
  442. $this->error("今天提交已经到上线,明天再来吧!",'jiameng/index?page='.$page);
  443. }
  444. }else{
  445. $this->success("没有新百度Pc连接提交",'jiameng/index?page='.$page);
  446. }
  447. }
  448. // 百度手机链接自动提交
  449. public function shouji($ids,$page){
  450. $where = [];
  451. $where[] = ['id','in', $ids];
  452. $artRes = Db::name('jiameng')->where($where)->select()->toArray();
  453. $urls = array();
  454. $dataRes = array();
  455. $local = $_SERVER['SERVER_NAME'];
  456. $host = explode('.', $local);
  457. if(count($host)==3){
  458. $host = $host[1].'.'.$host[2];
  459. }else{
  460. $host = $host[1].'.'.$host[2].'.'.$host[3];
  461. }
  462. $local = 'm.'.$host;
  463. foreach ($artRes as $k => &$v) {
  464. $v['arcurl'] = 'http://'.$local.'/b'.$v['id']."/";
  465. $urls[] = $v['arcurl'];
  466. }
  467. $site_info = cmf_get_option('site_info');
  468. if($site_info['site_tj_mobile'] == ''){
  469. $this->error("请设置百度提交参数!",'jiameng/index?page='.$page);
  470. }
  471. $site_shouji = $site_info['site_tj_mobile'];
  472. $site_shouji = explode('&amp;', $site_shouji);
  473. $site_shouji = implode('&', $site_shouji);
  474. $site_shouji = str_replace(PHP_EOL, '', $site_shouji);
  475. // print_r($urls);exit;
  476. if(count($urls)>0 && trim($site_shouji)!=''){
  477. $api = $site_shouji;
  478. $ch = curl_init();
  479. $options = array(
  480. CURLOPT_URL => $api,
  481. CURLOPT_POST => true,
  482. CURLOPT_RETURNTRANSFER => true,
  483. CURLOPT_POSTFIELDS => implode("\n", $urls),
  484. CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
  485. );
  486. curl_setopt_array($ch, $options);
  487. $curlresult = curl_exec($ch);
  488. $cuarray = json_decode($curlresult,true);
  489. // dump($cuarray);die;
  490. if($cuarray['success']>0){
  491. //如果提交过并且成功的将其状态标记为1
  492. // foreach ($dataRes as $k => $v) {
  493. // Db::name('brand_post')->where('id',$k)->update(['shouji' => '1']);
  494. // }
  495. $this->success("<br/>共提交".$cuarray['success']."条。今日自动提交剩余".$cuarray['remain'].'条<br/>','jiameng/index?page='.$page);
  496. }else{
  497. $this->error("今天提交已经到上线,明天再来吧!",'jiameng/index?page='.$page);
  498. }
  499. }else{
  500. $this->success("没有新手机百度连接提交",'jiameng/index?page='.$page);
  501. }
  502. }
  503. // 百度链接自动提交
  504. public function bear($ids,$page){
  505. $where = [];
  506. $where[] = ['id','in', $ids];
  507. $artRes = Db::name('jiameng')->where($where)->select()->toArray();
  508. //dump($artRes);die;
  509. $urls = array();
  510. $dataRes = array();
  511. $local = $_SERVER['SERVER_NAME'];
  512. foreach ($artRes as $k => &$v) {
  513. $v['arcurl'] = 'http://'.$local.'/b'.$v['id']."/";
  514. $urls[] = $v['arcurl'];
  515. }
  516. // dump($urls);exit;
  517. $site_info = cmf_get_option('site_info');
  518. //dump($site_info);die;
  519. if($site_info['site_tj_xiongzhang'] == ''){
  520. $this->error("请设置熊掌号提交参数!",'jiameng/index?page='.$page);
  521. }
  522. $site_xiongzhang = $site_info['site_tj_xiongzhang'];
  523. $site_xiongzhang = explode('&amp;', $site_xiongzhang);
  524. $site_xiongzhang = implode('&', $site_xiongzhang);
  525. $site_xiongzhang = str_replace(PHP_EOL, '', $site_xiongzhang);
  526. // dump($dataRes);die;
  527. if(count($urls)>0 && trim($site_xiongzhang)!=''){
  528. $api = trim($site_xiongzhang);
  529. $ch = curl_init();
  530. $options = array(
  531. CURLOPT_URL => $api,
  532. CURLOPT_POST => true,
  533. CURLOPT_RETURNTRANSFER => true,
  534. CURLOPT_POSTFIELDS => implode("\n", $urls),
  535. CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
  536. );
  537. curl_setopt_array($ch, $options);
  538. $curlresult = curl_exec($ch);
  539. $cuarray = json_decode($curlresult,true);
  540. // dump($cuarray);die;
  541. if($cuarray['success']>0){
  542. //如果提交过并且成功的将其状态标记为1
  543. foreach ($dataRes as $k => $v) {
  544. Db::name('brand_post')->where('id',$k)->update(['xiongzhang' => '1']);
  545. }
  546. $this->success("<br/>共提交".$cuarray['success']."条。今日自动提交剩余".$cuarray['remain'].'条<br/>','jiameng/index?page='.$page);
  547. }else{
  548. $this->error("今天提交已经到上线,明天再来吧!",'jiameng/index?page='.$page);
  549. }
  550. }else{
  551. $this->success("没有新熊掌天级连接提交",'jiameng/index?page='.$page);
  552. }
  553. }
  554. //2020-05-06 显示类目分类。
  555. public function showcategory(){
  556. $cates = Db::name('category')->select();
  557. $catelist = array();
  558. foreach($cates as $k=>$v){
  559. $catelist[$v['id']] = $v['catname'];
  560. }
  561. $this->assign('catelist',$catelist);
  562. $this->assign('page','');
  563. return $this->fetch();
  564. }
  565. }
  566. ?>