diff --git a/models/user.js b/models/user.js
index b57a634..98db164 100644
--- a/models/user.js
+++ b/models/user.js
@@ -205,9 +205,10 @@ class UserModel extends HTTP {
url:UserConst.user_saveWhistleComment_url,
method: Method.POST,
data: {
- id:data.id,
- score:data.score,
- comment:data.comment
+ // id:data.id,
+ // score:data.score,
+ // comment:data.comment,
+ list:data.list
},
success: success
}
diff --git a/pages/topics/talents/index.js b/pages/topics/talents/index.js
index 39fcc57..9e59e30 100644
--- a/pages/topics/talents/index.js
+++ b/pages/topics/talents/index.js
@@ -170,9 +170,7 @@ Component({
return
}
topicModel.addTalents(this.data.messageDetail, this.data.files,this.data.streetID,res=>{
- const id = res.result;
- console.log("得到id值");
- console.log(id);
+ const id = res.result;
if(res.code === 200){
this.setData({
messageDetail: '',
@@ -186,16 +184,9 @@ Component({
confirmText:'查看进度',
success (res) {
if (res.confirm) {
- console.log('用户点击查看进度')
- console.log(res)
- // 查看进度怎么填呀??
// wx.navigateTo({
// url: `/pages/article/index?id=${id}`,
// })
- //不用wx.navigateTo,改用wx.redirectTo(url: 'test?id=1'})
- //浩然会给我一个接口返回id值
- console.log('talent的id')
- console.log(id);
wx.redirectTo({
// url: '../../user/myWhistle/whistleDetail/index?id=${id}',
url: '/pages/user/myWhistle/whistleDetail/index?id='+id,
diff --git a/pages/user/myWhistle/evaluate/index.js b/pages/user/myWhistle/evaluate/index.js
index ebc55c0..426773e 100644
--- a/pages/user/myWhistle/evaluate/index.js
+++ b/pages/user/myWhistle/evaluate/index.js
@@ -9,7 +9,8 @@ Page({
data: {
evaluate:'',
comment:'',
- score:''
+ score:'',
+ list:[]
},
/**
@@ -17,8 +18,11 @@ Page({
*/
onLoad: function (options) {
this.setData({
- id:options.id
+ id:options.id,
+ list:JSON.parse(options.list)
})
+
+ // console.log(this.data.list)
},
/**
@@ -70,32 +74,54 @@ Page({
},
rate:function(e){
+
var score = e.detail;
+ var id = e.currentTarget.id;
+ var list = this.data.list;
+ list[id]['score'] = score;
+
this.setData({
- score:score
+ list:list
})
+ // this.setData({
+ // score:score
+ // })
},
opinion:function(e){
+ var id = e.currentTarget.id;
+ var list = this.data.list;
+ list[id]['comment'] = e.detail.value;
this.setData({
- comment: e.detail.value
+ // comment: e.detail.value
+ list:list
})
},
submit:function(){
- var score = this.data.score;
- if(score == ''){
- wx.showToast({
- title: '请为本次处理评分',
- icon: 'none',
- duration: 1500
- });
- return;
+ // var score = this.data.score;
+ // if(score == ''){
+ // wx.showToast({
+ // title: '请为本次处理评分',
+ // icon: 'none',
+ // duration: 1500
+ // });
+ // return;
+ // }
+
+ for(var i in this.data.list){
+ if(!this.data.list[i]['score']){
+ wx.showToast({
+ title: '请为本次处理评分',
+ icon: 'none',
+ duration: 1500
+ });
+ return;
+ }
}
-
var param = {};
- param.id = this.data.id;
- param.score = this.data.score;
- param.comment = this.data.comment;
-
+ // param.id = this.data.id;
+ // param.score = this.data.score;
+ // param.comment = this.data.comment;
+ param.list = JSON.stringify(this.data.list);
userModel.whistleComment(param,res=>{
if(res.code == 200){
wx.showModal({
diff --git a/pages/user/myWhistle/evaluate/index.wxml b/pages/user/myWhistle/evaluate/index.wxml
index 1b4aa03..72b47bc 100644
--- a/pages/user/myWhistle/evaluate/index.wxml
+++ b/pages/user/myWhistle/evaluate/index.wxml
@@ -1,25 +1,28 @@
-请对本次的处理进行评价
-
+
-
-
-
+ 请对{{item.departName}}的处理进行评价
-{{whistle.getEvaluate(score)}}
+
+
+
+
+ {{whistle.getEvaluate(item.score)}}
-
-
-
+
+
+
+
diff --git a/pages/user/myWhistle/evaluate/index.wxss b/pages/user/myWhistle/evaluate/index.wxss
index cdd10ee..8bb00ce 100644
--- a/pages/user/myWhistle/evaluate/index.wxss
+++ b/pages/user/myWhistle/evaluate/index.wxss
@@ -39,8 +39,10 @@ textarea{
display: flex;
width:100%;
justify-content: center;
- position: fixed;
- bottom: 40rpx;
+ /* position: fixed; */
+ /* bottom: 40rpx; */
+ margin-bottom: 40rpx;
+ background-color: white;
}
.btn1{
diff --git a/pages/user/myWhistle/index.wxss b/pages/user/myWhistle/index.wxss
index 14c98e3..32b7315 100644
--- a/pages/user/myWhistle/index.wxss
+++ b/pages/user/myWhistle/index.wxss
@@ -8,7 +8,7 @@ page{
width:100%;
height: 130px;
background-color: white;
- margin-top:15rpx;
+ margin-top:3px;
display: flex;
flex-direction: column;
align-items: center;
diff --git a/pages/user/myWhistle/whistleDetail/index.js b/pages/user/myWhistle/whistleDetail/index.js
index ae610d8..1b7e045 100644
--- a/pages/user/myWhistle/whistleDetail/index.js
+++ b/pages/user/myWhistle/whistleDetail/index.js
@@ -8,7 +8,9 @@ Page({
*/
data: {
detail:{},
- img:[]
+ img:[],
+ commentList:[],
+ score:false
},
/**
@@ -20,8 +22,15 @@ Page({
var img = res.result.picList.split(";");
this.setData({
detail:res.result,
- img:img
- })
+ img:img,
+ commentList:res.result.commentList
+ });
+
+ if(res.result.commentList[0]['score']){
+ this.setData({
+ score:true
+ })
+ }
});
},
/**
@@ -84,9 +93,9 @@ Page({
if (!th.data.detail.id) {
return;
}
-
+ // console.log(JSON.stringify(th.data.commentList))
wx.navigateTo({
- url: '../evaluate/index?id=' + th.data.detail.id
+ url: '../evaluate/index?id=' + th.data.detail.id + '&list=' + JSON.stringify(th.data.commentList)
})
}
diff --git a/pages/user/myWhistle/whistleDetail/index.wxml b/pages/user/myWhistle/whistleDetail/index.wxml
index 59a2dac..b246aa7 100644
--- a/pages/user/myWhistle/whistleDetail/index.wxml
+++ b/pages/user/myWhistle/whistleDetail/index.wxml
@@ -46,7 +46,7 @@
{{item.handleType}}{{item.handleDate}}
{{item.handleSuggestions}}
- 处理部门{{item.handleDepartName}}
+ 处理部门:{{item.handleDepartName}}
@@ -64,20 +64,23 @@
-
+
评价反馈
-
+
\ No newline at end of file
diff --git a/pages/user/myWhistle/whistleDetail/index.wxss b/pages/user/myWhistle/whistleDetail/index.wxss
index 379f4c1..f97319e 100644
--- a/pages/user/myWhistle/whistleDetail/index.wxss
+++ b/pages/user/myWhistle/whistleDetail/index.wxss
@@ -143,6 +143,7 @@ text{
display: flex;
flex-direction: column;
justify-content: center;
+ margin-bottom: 10px;
}
.com-top{