苹果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: ‘
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);
}
感谢您的来访,获取更多精彩文章请收藏本站。
© 版权声明
THE END
暂无评论内容