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.
119 lines
2.8 KiB
119 lines
2.8 KiB
// pages/topics/interactive/article/index.js
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
title:"市北区举行国际航运贸易金融创新中心核心区产业建设",
|
|
time:"6月7日",
|
|
userInfo:{
|
|
icon:"",
|
|
name:"用户名",
|
|
company:"青岛誉群投资有限公司",
|
|
position:"董事长"
|
|
},
|
|
detail:"9月16日晚7时,市北区委、区政府在区机关二楼会议厅举行国际航运贸易金融创新中心核心区产业招商工作方案答辩。这是市北区借鉴市委、市政府推动15个攻势作战经验,围绕创新中心核心区建设举行的首场答辩。区委书记张新竹主持答辩并讲话。",
|
|
imgArr:['http://bpic.588ku.com/element_origin_min_pic/16/10/30/528aa13209e86d5d9839890967a6b9c1.jpg',
|
|
'http://bpic.588ku.com/element_origin_min_pic/16/10/30/54fcef525fa8f6037d180f3c26f3be65.jpg',
|
|
'http://bpic.588ku.com/element_origin_min_pic/16/10/30/62e3ca3a02dddb002eff00482078d194.jpg',
|
|
'http://bpic.588ku.com/element_origin_min_pic/16/10/31/c7167fcfb4ebcd12621c05b0c852e98e.jpg'
|
|
],
|
|
|
|
comments:[
|
|
{
|
|
userIcon:"",
|
|
userName:"用户名",
|
|
detail:"评论内容",
|
|
time:"刚刚",
|
|
praiseNum:"30"
|
|
},
|
|
{
|
|
userIcon: "",
|
|
userName: "用户名",
|
|
detail: "评论内容",
|
|
time: "1小时前",
|
|
praiseNum: "30"
|
|
}
|
|
],
|
|
|
|
unStar: '/images/common/star.png',
|
|
star: '/images/common/star_light.png',
|
|
isStar:true
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad: function (options) {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom: function () {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage: function () {
|
|
|
|
},
|
|
onClickCollect() {
|
|
this.setData({
|
|
isStar: !this.data.isStar
|
|
})
|
|
// 收藏功能
|
|
},
|
|
|
|
previewImg: function (e) {
|
|
console.log(e.currentTarget.dataset.index);
|
|
var index = e.currentTarget.dataset.index;
|
|
var imgArr = this.data.imgArr;
|
|
wx.previewImage({
|
|
current: imgArr[index], //当前图片地址
|
|
urls: imgArr, //所有要预览的图片的地址集合 数组形式
|
|
success: function (res) { },
|
|
fail: function (res) { },
|
|
complete: function (res) { },
|
|
})
|
|
}
|
|
})
|