Commit 04606941 authored by 潘永坪's avatar 潘永坪

投诉建议重开发

parent 2821763c
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
//---跳转建议投诉 //---跳转建议投诉
goSuggest(){ goSuggest(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/my/suggestComplaint/list/list' url:'/pages/my/suggestComplaint/list/list?showMyData=true'
}) })
}, },
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
{{item.commentText}} {{item.commentText}}
</view> </view>
</view> </view>
<view class="more" @click="initList()" v-if="suggestList.length>0&&showMore">查看更多</view>
<view class="empty" v-if="suggestList.length==0"> <view class="empty" v-if="suggestList.length==0">
<image src="@/static/img/common/empty.png"></image> <image src="@/static/img/common/empty.png"></image>
<view>暂无建议记录</view> <view>暂无建议记录</view>
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
{{item.commentText}} {{item.commentText}}
</view> </view>
</view> </view>
<view class="more" @click="initList()" v-if="complaintList.length>0&&showMore">查看更多</view>
<view class="empty" v-if="complaintList.length==0"> <view class="empty" v-if="complaintList.length==0">
<image src="@/static/img/common/empty.png"></image> <image src="@/static/img/common/empty.png"></image>
<view>暂无投诉记录</view> <view>暂无投诉记录</view>
...@@ -55,16 +57,24 @@ export default{ ...@@ -55,16 +57,24 @@ export default{
return{ return{
active:0,//导航下标 active:0,//导航下标
tabList:['建议','投诉'],//导航列表 tabList:['建议','投诉'],//导航列表
merchantId:'',//商户Id
openid:uni.getStorageSync('openid')||'',//openid openid:uni.getStorageSync('openid')||'',//openid
suggestList:[],//建议列表
complaintList:[],//投诉列表 complaintList:[],//投诉列表
suggestList:[],//建议列表
merchantId:'',//商户Id
showMyData:false,//是否显示私有数据,默认显示公共数据,从个人中心跳转到当前页面时只显示自己的投诉建议
pageIndex:1,//第几页
showMore:false,//是否显示查看更多
} }
}, },
onLoad(option) { onLoad(option) {
this.merchantId=option.merchantId||'' this.merchantId=option.merchantId||''
if(option.showMyData){
this.showMyData=true
}
}, },
onShow() { onShow() {
this.complaintList=[]
this.suggestList=[]
this.initList() this.initList()
}, },
methods:{ methods:{
...@@ -72,43 +82,48 @@ export default{ ...@@ -72,43 +82,48 @@ export default{
tabChange(index){ tabChange(index){
this.active=index this.active=index
}, },
//---跳转建议提交页面
goSuggestCommit(){
uni.navigateTo({
url:'/pages/my/suggestComplaint/suggestCommit/suggestCommit?merchantId='+this.merchantId
})
},
//---跳转投诉提交页面 //---跳转投诉提交页面
goComplaintCommit(){ goComplaintCommit(){
uni.navigateTo({ uni.navigateTo({
url:'/pages/my/suggestComplaint/complaintCommit/complaintCommit?merchantId='+this.merchantId url:'/pages/my/suggestComplaint/complaintCommit/complaintCommit?merchantId='+this.merchantId
}) })
}, },
//---跳转建议详情页面
goSuggestDetail(batchId){
uni.navigateTo({
url:'/pages/my/suggestComplaint/suggestDetail/suggestDetail?merchantId='+this.merchantId+'&batchId='+batchId
})
},
//---跳转投诉详情页面 //---跳转投诉详情页面
goComplaintDetail(batchId){ goComplaintDetail(batchId){
uni.navigateTo({ uni.navigateTo({
url:'/pages/my/suggestComplaint/complaintDetail/complaintDetail?merchantId='+this.merchantId+'&batchId='+batchId url:'/pages/my/suggestComplaint/complaintDetail/complaintDetail?merchantId='+this.merchantId+'&batchId='+batchId
}) })
}, },
//---跳转建议提交页面
goSuggestCommit(){
uni.navigateTo({
url:'/pages/my/suggestComplaint/suggestCommit/suggestCommit?merchantId='+this.merchantId
})
},
//---跳转建议详情页面
goSuggestDetail(batchId){
uni.navigateTo({
url:'/pages/my/suggestComplaint/suggestDetail/suggestDetail?merchantId='+this.merchantId+'&batchId='+batchId
})
},
//---列表加载 //---列表加载
initList(){ initList(){
let data={ let data={
merchantId:this.merchantId,//商户Id merchantId:this.merchantId,//商户Id
openid:this.openid,//openid pageIndex:this.pageIndex,
pageIndex: 1, pageSize:5
pageSize:9999 }
if(this.showMyData){
//显示私有数据
data.openid=this.openid
}else{
//显示公共数据
data.publicStatus=1
} }
this.complaintList=[]
this.suggestList=[]
this.$request('comment/userComment/loadPage',data).then((res)=>{ this.$request('comment/userComment/loadPage',data).then((res)=>{
if(res.code=='00'){ if(res.code=='00'){
let list=res.data.userCommentPageResVo.list||[] let list=res.data.userCommentPageResVo.list||[]
let total=res.data.userCommentPageResVo.pageTotal
list.forEach(item=>{ list.forEach(item=>{
if(item.submitType==0){ if(item.submitType==0){
//投诉 //投诉
...@@ -119,6 +134,13 @@ export default{ ...@@ -119,6 +134,13 @@ export default{
this.suggestList.push(item) this.suggestList.push(item)
} }
}) })
let length=this.complaintList.length+this.suggestList.length
if(length<total){
this.pageIndex++
this.showMore=true
}else{
this.showMore=false
}
}else{ }else{
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
...@@ -143,6 +165,7 @@ export default{ ...@@ -143,6 +165,7 @@ export default{
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
color: #999; color: #999;
z-index: 1;
>view{ >view{
padding: 20rpx 60rpx; padding: 20rpx 60rpx;
font-size: 32rpx; font-size: 32rpx;
...@@ -159,7 +182,7 @@ export default{ ...@@ -159,7 +182,7 @@ export default{
margin-top: 6rpx; margin-top: 6rpx;
} }
.middle{ .middle{
padding: 100rpx 20rpx 160rpx 20rpx; padding: 100rpx 20rpx 220rpx 20rpx;
} }
.middle-list{ .middle-list{
background: #ffffff; background: #ffffff;
...@@ -178,14 +201,9 @@ export default{ ...@@ -178,14 +201,9 @@ export default{
margin-top: 24rpx; margin-top: 24rpx;
line-height: 36rpx; line-height: 36rpx;
} }
.bottom{ .more{
position: fixed; text-align: center;
bottom: 0; margin: 30rpx;
left: 0;
width: 100%;
background: #ffffff;
padding: 20rpx 40rpx 60rpx 40rpx;
border-top: 1px solid #EDEDED;
} }
.empty{ .empty{
padding-top: 200rpx; padding-top: 200rpx;
...@@ -196,4 +214,13 @@ export default{ ...@@ -196,4 +214,13 @@ export default{
height: 400rpx; height: 400rpx;
} }
} }
.bottom{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #ffffff;
padding: 20rpx 40rpx 60rpx 40rpx;
border-top: 1px solid #EDEDED;
}
</style> </style>
\ No newline at end of file
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