Commit df9a4b03 by 李宏达

lhd

parent 0dea3b6d
...@@ -115,6 +115,36 @@ class PatentycCtl extends CtlBase { ...@@ -115,6 +115,36 @@ class PatentycCtl extends CtlBase {
} }
} }
async aminerpapers(pobj,obj,req){//热门文献
try{
var result = await this.service.aminerpapers(obj);
if (result){
return System.getResult2(result);
}
else{
return System.getErrResult2("返回结果为空");
}
}
catch(error){
return System.getErrResult2(error);
}
}
async aminerarticle(pobj,obj,req){//热门科技咨询
try{
var result = await this.service.aminerarticle(obj);
if (result){
return System.getResult2(result);
}
else{
return System.getErrResult2("返回结果为空");
}
}
catch(error){
return System.getErrResult2(error);
}
}
//智能组合分析-获取报告 //智能组合分析-获取报告
async ezGetReport(pobj,obj,req){ async ezGetReport(pobj,obj,req){
if (obj.uid && obj.uid != 'undefined' && obj.type && obj.type != 'undefined'){ if (obj.uid && obj.uid != 'undefined' && obj.type && obj.type != 'undefined'){
......
...@@ -59,6 +59,64 @@ class PatentycService extends ServiceBase { ...@@ -59,6 +59,64 @@ class PatentycService extends ServiceBase {
} }
}; };
async aminerpapers(obj){//热门文献
try{
var size = obj.size == null ? 3 : obj.size;
var params = {
size: size,
offset: 0
};
var data=querystring.stringify(params);
var rc = System.getObject("util.restClient");
var rtn=await rc.execGet(data,"https://lab.aminer.cn/eitools/search/arxiv/papers/");
return JSON.parse(rtn.stdout);
}
catch(e){
console.log("eeeeeeeeeeeeeeeeeeeeee",e);
return null;
}
};
// async aminerpapers(obj){//热门文献
// try{
// var size = obj.size == null ? 3 : obj.size;
// var params = {
// size: size,
// offset: 0
// };
// var data=querystring.stringify(params);
// var rc = System.getObject("util.restClient");
// var rtn=await rc.execGet(data,"https://lab.aminer.cn/eitools/search/arxiv/papers");
// return JSON.parse(rtn.stdout);
// }
// catch{
// return null;
// }
// };
async aminerarticle(obj){//热门科技咨询
try{
var num = obj.num == null ? 3 : obj.num;
var params = {
//num: num,
//offset: 0
};
console.log("dataqqqqqqq",params);
var data=querystring.stringify(params);
console.log("datahhhhhh",data);
var rc = System.getObject("util.restClient");
var rtn=await rc.execGet(data,"https://nodeapi.aminer.cn/api/article/autoreco/" + num);
return JSON.parse(rtn.stdout);
}
catch(e){
console.log("eeeeeeeeeeeeeeeeeeeeee",e);
return null;
}
};
async patentrank(obj) {//专利价值评价 async patentrank(obj) {//专利价值评价
var pubno = obj.publishnum == null ? "" : obj.publishnum; var pubno = obj.publishnum == null ? "" : obj.publishnum;
var country = ""; var country = "";
...@@ -9929,10 +9987,10 @@ module.exports = PatentycService; ...@@ -9929,10 +9987,10 @@ module.exports = PatentycService;
// // var r = task.getArrEqual(list1,list2); // // var r = task.getArrEqual(list1,list2);
// // console.log("r----"+r); // // console.log("r----"+r);
// var obj = { // var obj = {
// "uid": "667b8300-c101-11ea-98dd-3142bd90eec4", // "num": 4,
// "type": "html" // "type": "html"
// }; // };
// var d = task.ezGetReport(obj) // var d = task.aminerarticle(obj)
// //var d = task.ezReportUploadData(obj); // //var d = task.ezReportUploadData(obj);
// console.log("ffffffff---------" + JSON.stringify(d)); // console.log("ffffffff---------" + JSON.stringify(d));
......
...@@ -43,10 +43,8 @@ ...@@ -43,10 +43,8 @@
<div class="content-item-tab">{{item.name}}</div> <div class="content-item-tab">{{item.name}}</div>
</div> </div>
<div class="content-item-article"> <div class="content-item-article">
<div class="item-article-text"><span></span>美国最严技术出口管制,中国芯片大军转向欧罗</div> <div class="item-article-text" v-for="list in item.itemArr" @click="details(list)"><span></span>{{list.title}}</div>
<div class="item-article-text"><span></span>美国最严技术出口管制,中国芯片大军转向欧罗</div> <div class="item-article-more" @click="clickMore(item)">更多 >></div>
<div class="item-article-text"><span></span>美国最严技术出口管制,中国芯片大军转向欧罗</div>
<div class="item-article-more" @click="clickMore(item.url)">更多 >></div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -69,15 +69,42 @@ ...@@ -69,15 +69,42 @@
{ {
img:'background: url(/imgs/home/nav1.png) no-repeat;', img:'background: url(/imgs/home/nav1.png) no-repeat;',
name:'热门专利', name:'热门专利',
url: 'https://patent.aminer.cn/#/push/patent' url: 'https://patent.aminer.cn/#/push/patent',
itemArr:[
{
title: 'PrivNet: Safeguarding Private Attributes in Transfer Learning for Recommendation'
},{
title: 'PrivNet: Safeguarding Private Attributes in Transfer Learning for Recommendation'
},{
title: 'PrivNet: Safeguarding Private Attributes in Transfer Learning for Recommendation'
}
]
},{ },{
img:'background: url(/imgs/home/nav2.jpg) no-repeat;', img:'background: url(/imgs/home/nav2.jpg) no-repeat;',
name:'热门科技资讯', name:'热门科技资讯',
url: 'https://patent.aminer.cn/#/push/news' url: 'https://patent.aminer.cn/#/push/news',
itemArr:[
{
title: ''
},{
title: ''
},{
title: ''
}
]
},{ },{
img:'background: url(/imgs/home/nav3.jpg) no-repeat;', img:'background: url(/imgs/home/nav3.jpg) no-repeat;',
name:'热门文献', name:'热门文献',
url:'https://patent.aminer.cn/#/push/paper' url:'https://patent.aminer.cn/#/push/paper',
itemArr:[
{
title: ''
},{
title: ''
},{
title: ''
}
]
}, },
], ],
bannerTabsArr: [ bannerTabsArr: [
...@@ -174,10 +201,36 @@ ...@@ -174,10 +201,36 @@
that.BannerHeight = window.innerHeight; that.BannerHeight = window.innerHeight;
}); });
this.$root.typeHome = true; this.$root.typeHome = true;
this.aminerpapers();
this.aminerarticle();
}, },
methods:{ methods:{
clickMore(url) { details(val) {
window.open(url) var b1 = '';
if (val.url) {
b1 = val.url[0].replace("https://arxiv.org", "http://xxx.itp.ac.cn");
}else {
b1 = `https://www.aminer.cn/research_report/${val._id}?download=false`;
}
console.log(b1);
this.$root.typeHome = false;
this.$root.loadingHome = true;
var url = encodeURIComponent(b1);
this.$root.pushx({name:"/iframehtml",title:val.title,params:{url:url}});
setTimeout(()=>{
this.$root.loadingHome = false;
},1500);
},
clickMore(val) {
this.$root.typeHome = false;
this.$root.loadingHome = true;
var url = encodeURIComponent(val.url);
this.$root.pushx({name:"/iframehtml",title:val.name,params:{url:url}});
setTimeout(()=>{
this.$root.loadingHome = false;
},1500);
}, },
show2enter() { show2enter() {
this.show2 = true; this.show2 = true;
...@@ -310,6 +363,26 @@ ...@@ -310,6 +363,26 @@
console.log(name); console.log(name);
this.$root.NavIndexRoute(name); this.$root.NavIndexRoute(name);
}, },
/*热门文献*/
aminerpapers(){
var self=this;
self.$root.postReq("/web/patentycCtl/aminerpapers",{}).then(function(d){
if(d.status==0){
self.contentArr[2].itemArr = d.data.data;
console.log(d,'dddd')
}
});
},
/*热门科技*/
aminerarticle(){
var self=this;
self.$root.postReq("/web/patentycCtl/aminerarticle",{}).then(function(d){
if(d.status==0){
self.contentArr[1].itemArr = d.data.data;
console.log(d,'aaa')
}
});
},
fetchloopplay:function(){ fetchloopplay:function(){
var self=this; var self=this;
self.$root.postReq("/web/loopplayCtl/findAll",{}).then(function(d){ self.$root.postReq("/web/loopplayCtl/findAll",{}).then(function(d){
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
mounted:function(){ mounted:function(){
console.log(this.$root.currentUser, '调用方法'); console.log(this.$root.currentUser, '调用方法');
var url = this.$router.history.current.query.url; var url = this.$router.history.current.query.url;
console.log(url);
if(url){ if(url){
url = decodeURIComponent(url); url = decodeURIComponent(url);
this.url = url; this.url = url;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment