|
@@ -15,7 +15,8 @@ Page({
|
|
|
triggered:false,
|
|
|
load:false,
|
|
|
hasMore:true,
|
|
|
- id:null
|
|
|
+ id:null,
|
|
|
+ productName:''
|
|
|
},
|
|
|
|
|
|
/**
|
|
@@ -24,7 +25,8 @@ Page({
|
|
|
onLoad(options) {
|
|
|
var id = options.id
|
|
|
this.setData({
|
|
|
- id:id
|
|
|
+ id:id,
|
|
|
+ productName:productName
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -79,16 +81,25 @@ Page({
|
|
|
wx.showLoading({
|
|
|
title: '加载中',
|
|
|
})
|
|
|
- api.selectMonitoring(params).then(res=>{
|
|
|
+ api.selectMonitoringRecord(params).then(res=>{
|
|
|
if(res.code == 200){
|
|
|
var data = this.data.tableData
|
|
|
+ var data2 = []
|
|
|
+ res.data.data.forEach(item => {
|
|
|
+ var num = item.num
|
|
|
+ var obj = {
|
|
|
+ text: item.createTime,
|
|
|
+ desc: `您监控的${{productName}}有${{num}}件新专利。`,
|
|
|
+ }
|
|
|
+ data2.push(obj)
|
|
|
+ });
|
|
|
if(type){
|
|
|
var startIndex = (this.data.queryParams.current-1)*this.data.queryParams.size
|
|
|
var endIndex = data.length
|
|
|
var len = endIndex - startIndex
|
|
|
- data.splice(startIndex,len,...res.data.data)
|
|
|
+ data.splice(startIndex,len,...data2)
|
|
|
}else{
|
|
|
- data = data.concat(res.data.data)
|
|
|
+ data = data.concat(data2)
|
|
|
}
|
|
|
this.setData(
|
|
|
{
|