市北人才赋能平台 --小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

58 lines
1.0 KiB

// pages/resource/list/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
list:{
type:Array,
value:[],
},
tp:{
type:String,
value:'1'
}
},
/**
* 组件的初始数据
*/
data: {
titlePic:"/images/temp_1.jpg"
},
/**
* 组件的方法列表
*/
methods: {
detail:function(e){
if (!e.currentTarget.dataset.id){
return;
}
if(this.properties.tp == '1'){
if(e.currentTarget.dataset.url){
wx.navigateTo({
url: '/pages/resource/navigate/index?url=' + encodeURIComponent(e.currentTarget.dataset.url)
})
return;
}else{
wx.navigateTo({
url: '/pages/resource/detail/index?id=' + e.currentTarget.dataset.id
})
return;
}
}else if(this.properties.tp == '2'){
wx.navigateTo({
url: '/pages/topics/rent/detail/index?id=' + e.currentTarget.dataset.id
})
return;
}
}
}
})