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.
55 lines
1.3 KiB
55 lines
1.3 KiB
5 years ago
|
Component({
|
||
|
properties: {
|
||
|
type: Number,
|
||
|
list: Array
|
||
|
},
|
||
|
data: {
|
||
|
list: [],
|
||
|
nomore: false
|
||
|
},
|
||
|
attached: function () {},
|
||
|
ready: function () {},
|
||
|
pageLifetimes: {
|
||
|
show: function () {},
|
||
|
},
|
||
|
methods: {
|
||
|
toNoticeDetail (e) {
|
||
|
const id = e.currentTarget.dataset.id
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/heart/pages/noticeNewDetail/noticeNewDetail?id=${id}&type=${this.data.type}`
|
||
|
})
|
||
|
},
|
||
|
toModify (e) {
|
||
|
const id = e.currentTarget.dataset.id
|
||
|
console.log(id)
|
||
|
if (this.data.type == 2) {
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/heart/pages/dropByPublish/dropByPublish?id=${id}`
|
||
|
})
|
||
|
} else {
|
||
|
wx.navigateTo({
|
||
|
url: `/subpages/heart/pages/groupBuyPublish/groupBuyPublish?id=${id}`
|
||
|
})
|
||
|
}
|
||
|
},
|
||
|
toDelete (e) {
|
||
|
let that = this
|
||
|
const id = e.currentTarget.dataset.id
|
||
|
wx.showModal({
|
||
|
title: "确认删除该条发布内容?",
|
||
|
showCancel: true,
|
||
|
cancelText: "否",
|
||
|
confirmText: "是",
|
||
|
// confirmColor: "#000000",
|
||
|
success: (res) => {
|
||
|
if (res.confirm) {
|
||
|
console.log("确认删除")
|
||
|
that.triggerEvent("delete",{id})
|
||
|
} else if (res.cancel) {
|
||
|
console.log("取消删除")
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
})
|