|
@@ -26,7 +26,7 @@ Page({
|
|
patentList:[],
|
|
patentList:[],
|
|
buttons:[
|
|
buttons:[
|
|
{
|
|
{
|
|
- label: '人工服务',
|
|
|
|
|
|
+ label: '付费解读',
|
|
method:'check',
|
|
method:'check',
|
|
icon:'/static/image/工单.png'
|
|
icon:'/static/image/工单.png'
|
|
},
|
|
},
|
|
@@ -42,17 +42,21 @@ Page({
|
|
}
|
|
}
|
|
],
|
|
],
|
|
concernType:{
|
|
concernType:{
|
|
- '0':'myIconicon-test',//黑
|
|
|
|
|
|
+ '0':'myIcongroup43 ',//黑
|
|
'1':'myIconanquanbangzhu',//白
|
|
'1':'myIconanquanbangzhu',//白
|
|
- '2':'myIcongroup43'//灰
|
|
|
|
|
|
+ '2':'myIconicon-test',//灰
|
|
|
|
+ '-1':'myIconguanzhu-yiguanzhu'//已关注
|
|
},
|
|
},
|
|
showDialog:false,
|
|
showDialog:false,
|
|
|
|
+ showDialog2:false,
|
|
followType:null,
|
|
followType:null,
|
|
isAdd:false,
|
|
isAdd:false,
|
|
triggered:false,
|
|
triggered:false,
|
|
load:false,
|
|
load:false,
|
|
hasMore:true,
|
|
hasMore:true,
|
|
clickType:null,//1是关注,2是监控
|
|
clickType:null,//1是关注,2是监控
|
|
|
|
+ changeFollow:false,
|
|
|
|
+ dataRangeRecord:[]
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -69,12 +73,19 @@ Page({
|
|
)
|
|
)
|
|
console.log(this.data.product)
|
|
console.log(this.data.product)
|
|
this.init()
|
|
this.init()
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
*/
|
|
onReady() {
|
|
onReady() {
|
|
|
|
+ this.setData(
|
|
|
|
+ {
|
|
|
|
+ patentNoList:[],
|
|
|
|
+ patentList:[],
|
|
|
|
+ }
|
|
|
|
+ )
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -87,6 +98,21 @@ Page({
|
|
/**
|
|
/**
|
|
* 页面功能
|
|
* 页面功能
|
|
*/
|
|
*/
|
|
|
|
+ //获取检索专利的范围
|
|
|
|
+ getDataRangeRecord(){
|
|
|
|
+ if(this.data.dataRangeRecord && this.data.dataRangeRecord.length>0){
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ api.getDataRangeRecord().then(res=>{
|
|
|
|
+ if(res.code == 200){
|
|
|
|
+ this.setData(
|
|
|
|
+ {
|
|
|
|
+ dataRangeRecord:res.data.data
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//初始化加载
|
|
//初始化加载
|
|
init(){
|
|
init(){
|
|
var params = {
|
|
var params = {
|
|
@@ -98,8 +124,6 @@ Page({
|
|
queryParams:params,
|
|
queryParams:params,
|
|
total:0,
|
|
total:0,
|
|
tableData:[],
|
|
tableData:[],
|
|
- patentNoList:[],
|
|
|
|
- patentList:[],
|
|
|
|
hasMore:true
|
|
hasMore:true
|
|
}
|
|
}
|
|
)
|
|
)
|
|
@@ -114,7 +138,39 @@ Page({
|
|
})
|
|
})
|
|
this.init()
|
|
this.init()
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+ toURL(){
|
|
|
|
+ console.log(2)
|
|
|
|
+ // if(this.data.searchType == 1 && this.data.product.id){
|
|
|
|
+ // wx.navigateTo({
|
|
|
|
+ // url: '/pages/productDetail/productDetail?productId='+this.data.product.id,
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ if(this.data.product.amazonLink){
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: '/pages/webView/webView?src='+this.data.product.amazonLink,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ openDialog2(){
|
|
|
|
+ this.getDataRangeRecord()
|
|
|
|
+ this.setData(
|
|
|
|
+ {
|
|
|
|
+ showDialog2:true
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ },
|
|
|
|
+ closeDialog2(){
|
|
|
|
+ this.setData(
|
|
|
|
+ {
|
|
|
|
+ showDialog2:false
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
//查看图片
|
|
//查看图片
|
|
previewImage(e) {
|
|
previewImage(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
@@ -171,7 +227,8 @@ Page({
|
|
["product."+field]:value,
|
|
["product."+field]:value,
|
|
["product.filePath"]:filePath,
|
|
["product.filePath"]:filePath,
|
|
ifAddSearchRecord:true,
|
|
ifAddSearchRecord:true,
|
|
- concernType:null
|
|
|
|
|
|
+ concernType:null,
|
|
|
|
+ searchType:0
|
|
}
|
|
}
|
|
)
|
|
)
|
|
this.init()
|
|
this.init()
|
|
@@ -321,6 +378,11 @@ Page({
|
|
|
|
|
|
//关注产品
|
|
//关注产品
|
|
open(clickType=1){
|
|
open(clickType=1){
|
|
|
|
+
|
|
|
|
+ if(this.data.searchType == 0 && !this.data.product.id){
|
|
|
|
+ this.toImproveInformation('关注')
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
this.setData(
|
|
this.setData(
|
|
{
|
|
{
|
|
showDialog:true,
|
|
showDialog:true,
|
|
@@ -333,9 +395,12 @@ Page({
|
|
this.setData(
|
|
this.setData(
|
|
{
|
|
{
|
|
showDialog:false,
|
|
showDialog:false,
|
|
- followType:null,
|
|
|
|
|
|
+ followType:null
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
+ wx.nextTick(() => {
|
|
|
|
+ this.setData({ changeFollow: false }) // 在当前同步流程结束后,下一个时间片执行
|
|
|
|
+ })
|
|
},
|
|
},
|
|
//关注类型
|
|
//关注类型
|
|
attention(e){
|
|
attention(e){
|
|
@@ -348,39 +413,27 @@ Page({
|
|
},
|
|
},
|
|
//是否收藏
|
|
//是否收藏
|
|
changeIsAdd(e){
|
|
changeIsAdd(e){
|
|
-
|
|
|
|
this.setData(
|
|
this.setData(
|
|
{
|
|
{
|
|
isAdd:e.detail
|
|
isAdd:e.detail
|
|
}
|
|
}
|
|
)
|
|
)
|
|
- console.log(e)
|
|
|
|
},
|
|
},
|
|
//确认关注
|
|
//确认关注
|
|
- confirm(){
|
|
|
|
- console.log(this.data.followType)
|
|
|
|
- if(this.data.followType != 0 && !this.data.followType){
|
|
|
|
- api.notify(
|
|
|
|
- {
|
|
|
|
- type:'warning',
|
|
|
|
- message:'请选择关注类型',
|
|
|
|
- top:wx.getStorageSync('height')
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
|
|
+ confirm(e){
|
|
|
|
+ var {type,isAdd} = e.detail
|
|
|
|
+ this.setData(
|
|
|
|
+ {
|
|
|
|
+ isAdd:isAdd
|
|
|
|
+ }
|
|
|
|
+ )
|
|
var that = this
|
|
var that = this
|
|
- if(this.data.searchType == 0){
|
|
|
|
- console.log(1)
|
|
|
|
- this.toImproveInformation('关注')
|
|
|
|
- return false
|
|
|
|
- }
|
|
|
|
var params = {
|
|
var params = {
|
|
productId:this.data.product.id,
|
|
productId:this.data.product.id,
|
|
- concernType:this.data.followType
|
|
|
|
|
|
+ concernType:type==-1?null:type
|
|
}
|
|
}
|
|
if(this.data.clickType == 2){
|
|
if(this.data.clickType == 2){
|
|
- this.addMonitoring(params,this.data.followType)
|
|
|
|
|
|
+ this.addMonitoring(params,type)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
wx.showLoading({
|
|
wx.showLoading({
|
|
@@ -396,7 +449,7 @@ Page({
|
|
}
|
|
}
|
|
api.notify(obj)
|
|
api.notify(obj)
|
|
that.setData({
|
|
that.setData({
|
|
- ['product.concernType'] : that.data.followType,
|
|
|
|
|
|
+ ['product.concernType'] : type,
|
|
})
|
|
})
|
|
that.closeDialog()
|
|
that.closeDialog()
|
|
this.collectPatent()
|
|
this.collectPatent()
|
|
@@ -412,7 +465,7 @@ Page({
|
|
// 通过eventChannel向被打开页面传送数据
|
|
// 通过eventChannel向被打开页面传送数据
|
|
var data = {
|
|
var data = {
|
|
...that.data.product,
|
|
...that.data.product,
|
|
- concernType:that.data.followType,
|
|
|
|
|
|
+ // concernType:that.data.followType,
|
|
method:method
|
|
method:method
|
|
}
|
|
}
|
|
res.eventChannel.emit('acceptDataFromOpenerPage', data)
|
|
res.eventChannel.emit('acceptDataFromOpenerPage', data)
|
|
@@ -440,14 +493,26 @@ collectPatent(){
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+//打开弹窗
|
|
|
|
+cancel(){
|
|
|
|
+ this.setData(
|
|
|
|
+ {
|
|
|
|
+ changeFollow:true,
|
|
|
|
+ showDialog:true,
|
|
|
|
+ clickType:1
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+},
|
|
//取消关注
|
|
//取消关注
|
|
cancelFollow(e){
|
|
cancelFollow(e){
|
|
if(!this.data.product.id){
|
|
if(!this.data.product.id){
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
|
|
+ // this.closeDialog()
|
|
wx.showModal({
|
|
wx.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
- content: '确认取消关注?',
|
|
|
|
|
|
+ content: '取消关注后会取消该产品的监控,确认取消关注?',
|
|
complete: (res) => {
|
|
complete: (res) => {
|
|
if (res.cancel) {}
|
|
if (res.cancel) {}
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
@@ -455,6 +520,7 @@ collectPatent(){
|
|
var params = {
|
|
var params = {
|
|
productId:product.id
|
|
productId:product.id
|
|
}
|
|
}
|
|
|
|
+ this.closeDialog()
|
|
wx.showLoading({
|
|
wx.showLoading({
|
|
title: '取消中',
|
|
title: '取消中',
|
|
})
|
|
})
|
|
@@ -469,13 +535,14 @@ collectPatent(){
|
|
}
|
|
}
|
|
api.notify(obj)
|
|
api.notify(obj)
|
|
this.setData({
|
|
this.setData({
|
|
- ['product.concernType'] : null
|
|
|
|
|
|
+ ['product.concernType'] : null,
|
|
|
|
+ ["product.ifMonitor"]:false
|
|
})
|
|
})
|
|
- if(this.data.searchType == 0){
|
|
|
|
- this.setData({
|
|
|
|
- ['product.id'] : null
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // if(this.data.searchType == 0){
|
|
|
|
+ // this.setData({
|
|
|
|
+ // ['product.id'] : null
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -484,7 +551,7 @@ collectPatent(){
|
|
},
|
|
},
|
|
//监控
|
|
//监控
|
|
control(e){
|
|
control(e){
|
|
- if(this.data.searchType == 0 ){
|
|
|
|
|
|
+ if(this.data.searchType == 0 && !this.data.product.id){
|
|
this.toImproveInformation('监控')
|
|
this.toImproveInformation('监控')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -502,7 +569,7 @@ collectPatent(){
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- retrun
|
|
|
|
|
|
+ return false;
|
|
}
|
|
}
|
|
this.open(2)
|
|
this.open(2)
|
|
},
|
|
},
|
|
@@ -522,7 +589,6 @@ addMonitoring(product,type){
|
|
api.notify(obj)
|
|
api.notify(obj)
|
|
this.setData(
|
|
this.setData(
|
|
{
|
|
{
|
|
- showDialog:false,
|
|
|
|
['product.ifMonitor'] : true,
|
|
['product.ifMonitor'] : true,
|
|
}
|
|
}
|
|
)
|
|
)
|
|
@@ -531,6 +597,7 @@ addMonitoring(product,type){
|
|
['product.concernType'] : type,
|
|
['product.concernType'] : type,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ this.closeDialog()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -564,6 +631,7 @@ addMonitoring(product,type){
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
cancelControl(){
|
|
cancelControl(){
|
|
var product = this.data.product
|
|
var product = this.data.product
|
|
var params = {
|
|
var params = {
|
|
@@ -640,8 +708,29 @@ export(){
|
|
},
|
|
},
|
|
//我要查风险
|
|
//我要查风险
|
|
check(){
|
|
check(){
|
|
|
|
+ if(!this.data.patentNoList || this.data.patentNoList.length == 0){
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '请先选择专利',
|
|
|
|
+ icon:'none'
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ var that = this
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
url: '/pages/form/riskAssessment/riskAssessment',
|
|
url: '/pages/form/riskAssessment/riskAssessment',
|
|
|
|
+ events: {
|
|
|
|
+ // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
|
|
|
|
+ acceptDataFromOpenedPage: function(data) {
|
|
|
|
+ console.log(data)
|
|
|
|
+ },
|
|
|
|
+ someEvent: function(data) {
|
|
|
|
+ console.log(data)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ success: function(res) {
|
|
|
|
+ // 通过eventChannel向被打开页面传送数据
|
|
|
|
+ res.eventChannel.emit('acceptDataFromOpenerPage', { patentNoList:that.data.patentNoList })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
makePhoneCall(){
|
|
makePhoneCall(){
|