My Computer · 2024/04/17 0

苹果cms采集二次更新豆瓣ID、豆瓣评分,手动查询豆瓣评分以及视频数据

application/admin/view/system/configcollect.html 第155行左右增加如下代码

<input type="checkbox" lay-skin="primary" name="collect[vod][uprule][]" value="tv" title="豆瓣ID" {if condition="strpos($config['collect']['vod']['uprule'],'tv') !==false"}checked {/if}>
<input type="checkbox" lay-skin="primary" name="collect[vod][uprule][]" value="av" title="豆瓣评分" {if condition="strpos($config['collect']['vod']['uprule'],'av') !==false"}checked {/if}>

application/common/model/Collect.php中在538行 $v['vod_score'] = round($v['vod_score_all'] / $v['vod_score_num'], 1);下增加如下代码

//$v['vod_score'] = round($v['vod_score_all'] / $v['vod_score_num'], 1);
                    // 模板score评分排序无效,所以将douban_score值赋给score
                    $v['vod_score'] = $v['vod_douban_score'];

application/common/model/Collect.php中在第886行左右增加如下代码

                        if (strpos(',' . $config['uprule'], 'tv')!==false && !empty($v['vod_douban_id']) && $v['vod_douban_id']!=$info['vod_douban_id']) {
                            $update['vod_douban_id'] = $v['vod_douban_id'];
                        }
                       if (strpos(',' . $config['uprule'], 'av')!==false && !empty($v['vod_douban_score']) && $v['vod_douban_score']!=$info['vod_douban_id'] && $v['vod_douban_score'] != 0) {
                            $update['vod_douban_score'] = $v['vod_douban_score'];
                        }

苹果cms v10 豆瓣评分信息采集api接口源码

打开/application/admin/view/vod/info.html 搜索url: '

timeout: 5000,
url: '//' + 'api' + '.' + 'mac'+ 'cms' + '.'+ 'la' + '/douban/index/id/' + id,

替换为:

timeout: 10000,
url: 'https://你的域名/api/douban.php?id=' + id,