|
...
|
...
|
@@ -12,16 +12,22 @@ Page({ |
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
* act=seller&sid=80
|
|
|
|
*/
|
|
|
|
onLoad: function (options) {
|
|
|
|
App.Customer.GetSellerComments({
|
|
|
|
scene:2
|
|
|
|
}).then(res=>{
|
|
|
|
this.setData({
|
|
|
|
posts:res.data,
|
|
|
|
loading:1,
|
|
|
|
})
|
|
|
|
this.options=options
|
|
|
|
this.setData({
|
|
|
|
title:options.act=='seller'?'所有评价':'我的评价'
|
|
|
|
})
|
|
|
|
if(options.act=='seller'){
|
|
|
|
App.Customer.GetCountCommentLabel({sid:options.sid}).then(res=>{
|
|
|
|
this.setData({
|
|
|
|
commentLabel:[{name:'全部'}].concat(res.data),
|
|
|
|
commentLabelActive:'全部',
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -65,11 +71,32 @@ Page({ |
|
|
|
onReachBottom: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage: function () {
|
|
|
|
|
|
|
|
}
|
|
|
|
commentLabelActive:'',
|
|
|
|
getList(){
|
|
|
|
let params={//我的
|
|
|
|
scene:2
|
|
|
|
}
|
|
|
|
if(this.options.act=='seller'){
|
|
|
|
params={
|
|
|
|
sid:this.options.sid,
|
|
|
|
scene:1,
|
|
|
|
status:1,
|
|
|
|
}
|
|
|
|
if(this.commentLabelActive!='全部'){
|
|
|
|
params.label=this.commentLabelActive
|
|
|
|
}
|
|
|
|
}
|
|
|
|
App.Customer.GetSellerComments(params).then(res=>{
|
|
|
|
this.setData({
|
|
|
|
posts:res.data,
|
|
|
|
loading:1,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
commentLabelTap(e){
|
|
|
|
console.log(e)
|
|
|
|
this.commentLabelActive=util.attr(e,'val')
|
|
|
|
this.setData({commentLabelActive:this.commentLabelActive})
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|