|
|
|
@ -95,14 +95,9 @@ Page({ |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.data.fixed) { |
|
|
|
this.setData({ |
|
|
|
tabIndex: parseInt(detail.index), |
|
|
|
toView: 'sticky' |
|
|
|
}) |
|
|
|
this.setData({ tabIndex: parseInt(detail.index), toView: 'sticky' }) |
|
|
|
} else { |
|
|
|
this.setData({ |
|
|
|
tabIndex: parseInt(detail.index) |
|
|
|
}) |
|
|
|
this.setData({ tabIndex: parseInt(detail.index) }) |
|
|
|
} |
|
|
|
if (this.data.tabIndex == 1 && !this.data.momentList.length) { |
|
|
|
this.fetchMomentList() |
|
|
|
@ -118,15 +113,11 @@ Page({ |
|
|
|
if (this.data.cateIndex == e.currentTarget.dataset.index) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.setData({ |
|
|
|
cateIndex: e.currentTarget.dataset.index |
|
|
|
}) |
|
|
|
this.setData({ cateIndex: e.currentTarget.dataset.index }) |
|
|
|
}, |
|
|
|
saleGood: function (e) { |
|
|
|
if (!app.globalData.userInfo) { |
|
|
|
wx.navigateTo({ |
|
|
|
url: '/pages/login/index' |
|
|
|
}) |
|
|
|
wx.navigateTo({ url: '/pages/login/index' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if(!this.data.factoryDetail.isOperations){ |
|
|
|
@ -210,30 +201,24 @@ Page({ |
|
|
|
event.remove('EventMessage', this) |
|
|
|
}, |
|
|
|
onAttentionChange: function (e) { |
|
|
|
var model = { |
|
|
|
follow: null, |
|
|
|
paperMillId: this.data.id |
|
|
|
if(!app.globalData.userInfo){ |
|
|
|
wx.navigateTo({ url: '/pages/login/index' }) |
|
|
|
return |
|
|
|
} |
|
|
|
var model = { follow: null, paperMillId: this.data.id } |
|
|
|
if (e.currentTarget.dataset.cid == false) { |
|
|
|
//关注
|
|
|
|
this.setData({ |
|
|
|
hasFollowed: true, |
|
|
|
}) |
|
|
|
this.setData({ hasFollowed: true, }) |
|
|
|
model.follow = true |
|
|
|
this.userPushFollowMillFct(model) |
|
|
|
setTimeout(() => event.emit('EventMessage', { what: 1101, desc: 'factoryDetails' }), 1000) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
if (e.currentTarget.dataset.cid == true) { |
|
|
|
//取消关注
|
|
|
|
this.setData({ |
|
|
|
hasFollowed: false, |
|
|
|
}) |
|
|
|
this.setData({ hasFollowed: false }) |
|
|
|
model.follow = false |
|
|
|
this.userPushFollowMillFct(model) |
|
|
|
setTimeout(() => event.emit('EventMessage', { what: 1101, desc: 'factoryDetails' }), 1000) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
userPushFollowMillFct: function (model) { |
|
|
|
|