Newer
Older
import {Component, ElementRef, Renderer2, ViewChild} from '@angular/core';
import {IonicPage, NavController, NavParams, ViewController} from 'ionic-angular';
import {ServeService} from "../../serve.service";
import {CommonService} from "../../../../provide/common.service";
@Component({
selector: 'page-evaluation',
templateUrl: 'evaluation.html',
})
export class EvaluationPage {
constructor(public navCtrl: NavController, public navParams: NavParams,
private serveSer: ServeService, private commonSer: CommonService) {
ionViewDidLoad() {
this.orderId = this.navParams.get('id');
this.getDetail();
e.starList = ["icon-star", "icon-star", "icon-star", "icon-star", "icon-star"];
/**
*
* @param score 分数 从0开始
* @param number 商品数组序号
*/
checkStar(score, number) {
arr[i] = "icon-star";
}
}
this.goodsList[number].starList = arr;
this.commonSer.alert('确定提交评价?', () => {
const arr = this.goodsList.map(e => {
const a = {
id: e.id,
this.serveSer.orderScore(arr).subscribe(
(res) => {
if(res){
this.navCtrl.pop();
this.commonSer.toast('已评价成功');
}
}
)