Commit 9ba7cd91 by 高淑倩

share

parent cfc4800b
......@@ -6,11 +6,15 @@ Component({
* 组件的属性列表
*/
properties: {
currentHasUserInfo: {
type: Boolean,
type: false
},
imageData: {
type: Array,
value: [],
},
type:{
type: {
type: Number,
value: [],
}
......@@ -28,16 +32,16 @@ Component({
* 组件的方法列表
*/
methods: {
onTapLike(e){
onTapLike(e) {
const { memberId } = wx.getStorageSync('_baseUserInfo')
let params = {
let params = {
contentId: e.currentTarget.dataset.id,
type: e.currentTarget.dataset.type,
userId: memberId
}
this.triggerEvent('updataLike', params)
},
onTapShare(e){
onTapShare(e) {
console.log(e)
let params = {
url: e.currentTarget.dataset.url,
......@@ -47,16 +51,16 @@ Component({
id: e.currentTarget.dataset.id
}
wxService.nextTick(() => {
this.triggerEvent('_onTapShare',params)
this.triggerEvent('_onTapShare', params)
})
},
//详情
gotoDetail(e){
gotoDetail(e) {
// type 1:内容 2:我的发布
if(this.data.type == 1){
if (this.data.type == 1) {
wxService.router(`/pages/wantToBuyDetail/wantToBuyDetail?id=${e.currentTarget.dataset.id}`)
} else if (this.data.type == 2){
} else if (this.data.type == 2) {
wxService.router(`/subPackage/page/pages/myReleaseDetail/myReleaseDetail?id=${e.currentTarget.dataset.id}`)
}
}
......
......@@ -18,6 +18,8 @@
image-data="{{contentList}}"
bind:updataLike="gotoLike"
bind:_onTapShare="_onTapShare"
bind:getAuth="_getUserInfo"
currentHasUserInfo="{{currentHasUserInfo}}"
/>
</view>
<view class="empty" wx:if="{{!contentList || contentList.length < 1}}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment