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

温馨提示:本文最后更新于2024-05-23 16:14:56,某些文章具有时效性,若有错误或已失效,请在下方留言或联系站长

苹果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);

图片[1]-苹果cms采集二次更新豆瓣ID、豆瓣评分,手动查询豆瓣评分以及视频数据-胖大海博客资源网

下增加如下代码

//$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: ‘

is_load=1;
            that.text("{:lang('wait_submit')}");
            $.ajax({
                type: 'post',

更改为:

is_load=1;
            that.text("{:lang('wait_submit')}");
            $.ajax({
                type: 'post',
                //dataType: "jsonp",
                //jsonp: "callback",
                timeout: 5000,
                //url: '//' + 'api' + '.' + 'mac'+ 'cms' + '.'+ 'la' + '/douban/index/id/' + id,
				url: 'https://api.suxun.site/api/doubanid?id=' + id,
                error: function(){
                    alert("{:lang('request_err')}");
                },
                complete:function(){
                    is_load=0;
                    that.text("{:lang('search_data')}");
                },
                success:function(data){
					r = eval(data); //数组 
                    if(r.code != 200){
                        alert(r.msg);
                    }

图片[2]-苹果cms采集二次更新豆瓣ID、豆瓣评分,手动查询豆瓣评分以及视频数据-胖大海博客资源网

------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

------关注微信公众号:胖大海TuT------
© 版权声明
THE END
喜欢就支持一下吧
点赞434 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容