本文整理汇总了TypeScript中ngx-cookie-service.CookieService类的典型用法代码示例。如果您正苦于以下问题:TypeScript CookieService类的具体用法?TypeScript CookieService怎么用?TypeScript CookieService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CookieService类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
.then(data => {
this.currSemester = data;
this.studentInfoservice.getStudentinfoforRegistration1(this.currSemester.acaYear, this.currSemester.semester,this.cookie.get('loginID'))
.then(data => {
this.currStudent = data;
console.log(this.currStudent);
$("#stuFullName").text(this.currStudent.studentName);
});
this.studentInfoservice.getStudentAvaImage(this.cookie.get('loginID'))
.then(data => {
$("#smallPhoto").attr("src", "http://oms.saigontech.edu.vn/oms_app/Saigontech_College/student/image/" + data);
});
this.ESLClassService.getESLClassRegistered(this.currStudentID
, this.currSemester.acaYear
, this.currSemester.semester)
.then(data1 => {
console.log(data1);
this.eslClassregistered = data1;
});
this.ESLClassService.getESLClassAvailable(this.currStudentID
, this.currSemester.acaYear
, this.currSemester.semester)
.then(data2 => {
console.log(data2);
this.eslClassavailable = data2;
});
});
示例2: ngOnInit
ngOnInit() {
this.studentInfoservice.getStudentinfoforRegistration(this.cookie.get('loginID'))
.then(data => {
this.currStudent = data;
// console.log(this.currStudent);
$("#stuFullName").text(this.currStudent.studentName);
});
this.studentInfoservice.getStudentAvaImage(this.cookie.get('loginID'))
.then(data => {
$("#smallPhoto").attr("src", "http://oms.saigontech.edu.vn/oms_app/Saigontech_College/student/image/" + data);
});
this.semesterService.getAcademicYear()
.then(data => {
this.academicYearInfo = data;
this.semesterService.getSemesterInformation()
.then(data1 => {
console.log(data1);
this.currSemester = data1;
this.getAllClassStatus(data1.acaYear, data1.semester, '-1');
});
});
}
示例3:
.then(data => {
//get information of current semester.
this.currSemester = data;
console.log(this.currSemester);
this.studentInfoservice.getStudentinfoforRegistration1(this.currSemester.acaYear, this.currSemester.semester, this.cookie.get('loginID'))
.then(data => {
//get information of current student.
this.currStudent = data;
console.log(this.currStudent);
$("#stuFullName").text(this.currStudent.studentName);
});
this.studentInfoservice.getStudentAvaImage(this.cookie.get('loginID'))
.then(data => {
//push image to navbar.
$("#smallPhoto").attr("src", "http://oms.saigontech.edu.vn/oms_app/Saigontech_College/student/image/" + data);
});
this.eslSEOIService.getESLSEOIQuestionList('0', data.acaYear, data.semester)
.then(data1 => {
//get question list of this ESL SEOI.
console.log(data1);
this.questions = data1;
});
this.eslSEOIService.getTeacherInfo(this.cookie.get('ESLteacherID'),this.cookie.get('ESLclassID'))
.then(data2 => {
//get teacher of this class.
this.currInformation = data2;
console.log(this.currInformation);
});
});
示例4: ngOnInit
ngOnInit() {
this.userToken = this.cookieService.get('userToken');
if (!this.userToken) {
this.userToken = uuid();
const date = new Date();
date.setTime(date.getTime() + (5000 * 24 * 60 * 60 * 1000));
this.cookieService.set('userToken', this.userToken, date);
}
}
示例5: ngOnInit
ngOnInit(){
let pciParams = this.cookieService.get('payBillJson');
this.cookieService.delete('payBillJson');
let decodedString = decodeURI(pciParams).replace(new RegExp("%3A", 'g'),":").replace(new RegExp("%2C", 'g'),",")
let paymentInfo = JSON.parse(decodedString);
paymentInfo.nickName = this.replaceAll(paymentInfo.nickName,"+"," ");
let paymentDate = this.replaceAll(paymentInfo.paymentDate,"%2F","/");
this.store.dispatch(new billingTypes.UpdateCollectivePaymentInfo({paymentAmount:paymentInfo.paymentAmount,paymentDate}))
this.store.dispatch(new billingTypes.SaveBankInfo(this.billingService.getBankInfoForStore(paymentInfo)))
this.router.navigate(['/protected/customer/billing/paybill/collective/verify.htm'])
}
示例6: navigateToEvaluation
//access the evaluation page.
navigateToEvaluation(status: string, classID: string, teacherID: string){
if (status == 'Incomplete'){
// console.log(classID+" "+teacherID);]
//push teacherid to cookie.
this.cookie.set('ESLteacherID', teacherID);
//push classid to cookie.
this.cookie.set('ESLclassID', classID);
this.router.navigateByUrl('/ESLSEOIEvaluation');
}
}
示例7: ToggleCounty
ToggleCounty(county: string) {
var selectedCounties = this.cookieService.get(this.favouriteCountiesCookieKey);
if (selectedCounties.indexOf(county) > -1) {
selectedCounties = selectedCounties.replace(county + ' ', '');
} else {
selectedCounties += county + ' ';
}
this.indicators.forEach(indicator => indicator.performers.forEach(performer => performer.favourite = selectedCounties.indexOf(performer.county) > -1));
this.cookieService.set(this.favouriteCountiesCookieKey, selectedCounties);
this.LoadData();
}
示例8: addComment
addComment(studentID: string, semester: string, acaYear: string, teacherID: string, classID: string, comment: string) {
let newCommentSEOI = {
studentID: studentID,
acaYear: acaYear,
Semester: semester,
classID: classID,
instructorID: teacherID,
comment: comment
}
$.ajax({
type: "POST",
url: this.connectionLink.getConnection() + "/insertESLSEOICommentREST",
data: newCommentSEOI,
dataType: "text",
headers: {
'Authorization': 'Bearer ' + this.cookie.get('token')
},
cache: false,
success: function (response) {
// var notification0 = new PNotify({
// title: 'Notification: ',
// text: response
// });
},
error: function (data) {
console.log(data);
}
})
}
示例9:
this.rs.getCourseReviews(this.course.code).subscribe(data => {
this.reviews = data;
if (this.cs.get('c_id'))
this.userReviewed = data
.find(review =>
review['reviewedBy'] == this.cs.get('c_id')) ? true : false;
})
示例10: deleteESLClass
deleteESLClass(studentID: string, acaYear: string, Semester: string, classCodes: string) {
let classObject = {
studentCode: studentID,
acaYear: acaYear,
Semester: Semester,
ipAddress: "123",
classCodes: classCodes,
}
$.ajax({
type: "POST",
url: this.connectionLink.getConnection()+"/deleteEslcourseREST",
data: classObject,
dataType: "text",
headers: {
'Authorization':'Bearer ' + this.cookie.get('token')
},
cache: false,
success: function(response)
{
var notification0 = new PNotify({
title: 'Notification: ',
text: response
});
},
error: function(data){
alert(data);
}
})
}