Commit ee745a49 authored by wangqinghua's avatar wangqinghua

api update

parent 34b94e47
......@@ -18,7 +18,7 @@ export class EvaluationPage {
picture = AppGlobal.picture;
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService,private commonSer:CommonService) {
private serveSer: ServeService, private commonSer: CommonService) {
}
ionViewDidLoad() {
......@@ -36,7 +36,7 @@ export class EvaluationPage {
this.goodsList = res.list[0].suppies;
this.goodsList.forEach(e => {
e.score = 0;
e.starList = ["icon-star","icon-star","icon-star","icon-star","icon-star"];
e.starList = ["icon-star", "icon-star", "icon-star", "icon-star", "icon-star"];
});
}
)
......@@ -48,12 +48,12 @@ export class EvaluationPage {
* @param number 商品数组序号
*/
checkStar(score, number) {
this.goodsList[number].score = score +1;
this.goodsList[number].score = score + 1;
let arr = new Array(5);
for(let i = 0;i<arr.length;i++){
if( i < score +1){
for (let i = 0; i < arr.length; i++) {
if (i < score + 1) {
arr[i] = "icon-star-fill";
}else{
} else {
arr[i] = "icon-star";
}
}
......@@ -61,17 +61,23 @@ export class EvaluationPage {
}
submit() {
const data = {
id: this.orderId,
score: this.score
};
this.navCtrl.pop();
this.commonSer.toast('已评价成功');
this.serveSer.orderScore(data).subscribe(
(res) => {
}
)
this.commonSer.alert('确定提交评价?', () => {
const arr = this.goodsList.map(e => {
const a = {
id: e.id,
score: e.score
};
return a
});
console.log(arr);
// this.serveSer.orderScore(arr).subscribe(
// (res) => {
// this.navCtrl.pop();
// this.commonSer.toast('已评价成功');
// }
// )
})
}
}
......@@ -475,6 +475,7 @@ export class DiscoverPage {
} else {
this.branchPersonList = [];
this.showBranch = false;
this.obj.branchId = null;
}
this.resourceType = item.name == "视频资料" ? 3 : 1;
......@@ -708,7 +709,7 @@ export class DiscoverPage {
const res = {
type: null,
indexChildren: '34',
name: "组织活动"
name: "组织结构"
};
this.changeChildren(res);
}
......
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