market message
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
<p>
|
||||
market-messages works!
|
||||
</p>
|
||||
|
||||
<div style="padding: 13px; width: 100%;" class="msg-list">
|
||||
<ion-list>
|
||||
<ion-item *ngFor="let item of messageResult;" lines="none">
|
||||
<ion-grid class="msg-grid">
|
||||
<ion-row><ion-col class="mdate">{{item.msg_date}}</ion-col> </ion-row>
|
||||
<ion-row><ion-col class="mmsg">{{item.msg}}</ion-col></ion-row>
|
||||
<!-- <ion-row><ion-col>FF</ion-col> </ion-row>-->
|
||||
</ion-grid>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
.msg-list {
|
||||
margin-top: 10px;
|
||||
|
||||
.msg-grid{
|
||||
background-color: aliceblue;
|
||||
border-radius: 5px;
|
||||
margin:0px 20px 10px 0px;
|
||||
.mdate{
|
||||
font-weight: bolder;
|
||||
color: darkorchid;
|
||||
font-size: 12px;
|
||||
}
|
||||
.mmsg{
|
||||
color: black;
|
||||
font-size: 12px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.head_text {
|
||||
font-size: 18px;
|
||||
font-family: 'semi-bold';
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mentor {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
|
||||
.men_image {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-family: 'semi-bold';
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: grey;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
color: grey;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {Router} from "@angular/router";
|
||||
|
||||
@Component({
|
||||
selector: 'app-market-messages',
|
||||
@@ -6,9 +9,67 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./market-messages.component.scss'],
|
||||
})
|
||||
export class MarketMessagesComponent implements OnInit {
|
||||
@Input('jobData') jobData:any;
|
||||
offer_code:string='';
|
||||
|
||||
constructor() { }
|
||||
constructor( public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private router: Router) {
|
||||
|
||||
ngOnInit() {}
|
||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||
console.log("XXXXX 1", this.router.getCurrentNavigation().extras);
|
||||
// console.log("XXXXX 2", this.router.getCurrentNavigation().extras.state);
|
||||
//console.log("XXXXX 3", this.router.getCurrentNavigation().extras.state.ID);
|
||||
if (this.jobData==undefined){
|
||||
return;
|
||||
}
|
||||
this.offer_code = this.jobData.offer_code;
|
||||
|
||||
addEventListener('app-market-messages-refresh', () => {
|
||||
this.marketMessageList();
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.marketMessageList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
reqData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
page:number,
|
||||
offer_code:string,
|
||||
limit: number
|
||||
};
|
||||
|
||||
messageTotalResult:any;
|
||||
messageResult:any;
|
||||
async marketMessageList(){
|
||||
|
||||
this.reqData = {
|
||||
action:13025,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session,
|
||||
page: 0,
|
||||
offer_code: this.offer_code,
|
||||
limit: 20
|
||||
};
|
||||
|
||||
|
||||
this.wrenchService.marketMessages(this.reqData).subscribe(
|
||||
messageTotalResult => {
|
||||
this.messageTotalResult = messageTotalResult;
|
||||
console.log("messageTotalResult RETURN->", this.messageTotalResult);
|
||||
this.messageResult = this.messageTotalResult.result_list;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,6 @@
|
||||
<div *ngIf="tabs =='about'" class="about">
|
||||
<div style="padding: 13px; width: 100%;">
|
||||
<ion-label class="head_text">{{jobData.offer_code}}</ion-label>
|
||||
|
||||
<!-- <div class="mentor" (click)="onMentor()">-->
|
||||
<div class="mentor">
|
||||
<div class="left">
|
||||
<div class="bg_image men_image" [style.backgroundImage]="'url('+session_image_server+'/'+curr_session+'/job/'+jobData.job_uid+')'"></div>
|
||||
@@ -149,6 +147,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<app-market-messages></app-market-messages>
|
||||
<app-market-messages [jobData]="jobData"></app-market-messages>
|
||||
</ion-content>
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ export class MarketdetailPage implements OnInit {
|
||||
tabs = 'lesson';
|
||||
session_image_server:string='';
|
||||
curr_session:string='';
|
||||
offer_code:string='';
|
||||
|
||||
jobData: any;
|
||||
constructor(
|
||||
@@ -28,12 +29,13 @@ export class MarketdetailPage implements OnInit {
|
||||
) {
|
||||
|
||||
this.jobData = this.router.getCurrentNavigation().extras.state;
|
||||
// console.log("XXXXX 1", this.router.getCurrentNavigation().extras);
|
||||
console.log("XXXXX 1", this.router.getCurrentNavigation().extras);
|
||||
// console.log("XXXXX 2", this.router.getCurrentNavigation().extras.state);
|
||||
//console.log("XXXXX 3", this.router.getCurrentNavigation().extras.state.ID);
|
||||
if (this.jobData==undefined){
|
||||
this.onBack();
|
||||
}
|
||||
this.offer_code = this.jobData.offer_code;
|
||||
}
|
||||
|
||||
interestStatus: boolean= false;
|
||||
@@ -122,6 +124,7 @@ export class MarketdetailPage implements OnInit {
|
||||
this.yourmessage='';
|
||||
setTimeout(()=>{
|
||||
this.interest_msg_status='';
|
||||
dispatchEvent(new Event("app-market-messages-refresh"));
|
||||
},3000);
|
||||
this.waitingInterestService.getInterestList();
|
||||
}
|
||||
|
||||
@@ -155,6 +155,10 @@ export class WrenchService {
|
||||
return this.getPostData("assigntask", reqData);
|
||||
}
|
||||
|
||||
marketMessages(reqData){
|
||||
return this.getPostData("message", reqData);
|
||||
}
|
||||
|
||||
getFamilySampleTasks(reqData) {
|
||||
return this.getPostData("familysampletasks", reqData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user