Commit ee745a49 authored by wangqinghua's avatar wangqinghua

api update

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