太阳成游戏网站

联系官方销售客服

QQ1835022299

028-61286886

应用插件 版主:官方插件技术组
站点应用时使用火车头采集内容页的描述为不知道什么原因其它分站
类型:太阳成游戏网站CMS 更新时间:2021-03-28 19:00:50 火车头 分站

站点应用时,使用火车头采集,内容页的描述description为0,不知道什么原因? 其它分站点都是正常的


插件版权:官方插件
插件名称:多站点应用
回帖
  • 官方插件技术-晓帆
    #1楼    官方插件技术-晓帆
    2021-03-07 21:58:59
    Chrome 0
    入库脚本发来看看
  • 无言
    #2楼    无言
    2021-03-07 22:01:48
    Chrome 0
    其它标题、内容、关键字都是正常的,只有描述description为空
    _module_init('news'); // news 是模块目录
    if ($_GET['action'] == 'category') {
        // 显示栏目
        foreach ($this->module['category'] as $t) {
            if ($t['child'] == 0 && $t['tid'] == 1) {
                echo '

    '.$t['name'].'<=>'.$t['id'].'

    '.PHP_EOL; } } } else { // 入库数据 $data = $_REQUEST; // 发布者id 1 $data['uid'] = 1; // 发布者账号 admin $data['author'] = 'admin'; // 主表字段 $fields[1] = $this->get_cache('table-'.SITE_ID, $this->content_model->dbprefix(SITE_ID.'_'.MOD_DIR)); $cache = $this->get_cache('table-'.SITE_ID, $this->content_model->dbprefix(SITE_ID.'_'.MOD_DIR.'_category_data')); $cache && $fields[1] = array_merge($fields[1], $cache); // 附表字段 $fields[0] = $this->get_cache('table-'.SITE_ID, $this->content_model->dbprefix(SITE_ID.'_'.MOD_DIR.'_data_0')); $cache = $this->get_cache('table-'.SITE_ID, $this->content_model->dbprefix(SITE_ID.'_'.MOD_DIR.'_category_data_0')); $cache && $fields[0] = array_merge($fields[0], $cache); // 去重复 $fields[0] = array_unique($fields[0]); $fields[1] = array_unique($fields[1]); $save = []; // 主表附表归类 foreach ($fields as $ismain => $field) { foreach ($field as $name) { isset($data[$name]) && $save[$ismain][$name] = $data[$name]; } } if (!$data['catid']) { exit('栏目为空'); } $save[1]['uid'] = $save[0]['uid'] = $data['uid']; $save[1]['catid'] = $save[0]['catid'] = $data['catid']; $save[1]['url'] = ''; $save[1]['status'] = 9; //9表示正常发布,1表示审核里面 $save[1]['hits'] = 0; $save[1]['displayorder'] = 0; $save[1]['link_id'] = 0; $save[1]['inputtime'] = $save[1]['updatetime'] = SYS_TIME + rand(0, 7200); $save[1]['inputip'] = '127.0.0.1'; // 验证标题重复 if ($this->content_model->table(SITE_ID.'_'.MOD_DIR)->where('title', $save[1]['title'])->counts()) { echo '重复';exit; } $rt = $this->content_model->save(0, $save); if ($rt['code']) { exit('成功'); } else { exit('失败'); } } exit;
    满意答案
  • 官方插件技术-晓帆
    #3楼    官方插件技术-晓帆
    2021-03-07 22:04:31
    Chrome 0
    接口没有问题,只能说明火车采集数据发过来的值就是0了;或者入库后被过滤了;这两个可能性
  • 无言
    #4楼    无言
    2021-03-07 22:06:14
    Chrome 0
    我看本地采集的数据,确实是NULL
  • 无言
    #5楼    无言
    2021-03-28 19:00:50
    iPhone手机 0
    @无言:采用了,谢谢