Commit 17e67fba authored by wangqinghua's avatar wangqinghua

update

parent 3b08947e
...@@ -23,7 +23,7 @@ export class IssuePage { ...@@ -23,7 +23,7 @@ export class IssuePage {
quesDescList = []; quesDescList = [];
constructor(public navCtrl: NavController, public navParams: NavParams, private tabSer: TabsService, constructor(public navCtrl: NavController, public navParams: NavParams, private tabSer: TabsService,
public appService: AppService, public toastCtrl: ToastController,private commonSer:CommonService) { public appService: AppService, public toastCtrl: ToastController, private commonSer: CommonService) {
} }
ionViewDidLoad() { ionViewDidLoad() {
...@@ -64,6 +64,7 @@ export class IssuePage { ...@@ -64,6 +64,7 @@ export class IssuePage {
return false; return false;
} }
if (this.qType == 1) { if (this.qType == 1) {
this.quesDescList = [];
const option1 = { const option1 = {
comment: '是', comment: '是',
option: '1' option: '1'
...@@ -91,19 +92,19 @@ export class IssuePage { ...@@ -91,19 +92,19 @@ export class IssuePage {
}); });
const data = { const data = {
stem: this.title, stem: this.title,
type: this.qType, type: this.qType,
correntAnswer: current, correntAnswer: current,
options: arr options: arr
}; };
this.tabSer.saveMineQuestion(data).subscribe( this.tabSer.saveMineQuestion(data).subscribe(
(res) => { (res) => {
if(res.errcode == '1000'){ if (res.errcode == '1000') {
let index = this.navCtrl.length() - 1; let index = this.navCtrl.length() - 1;
this.navCtrl.remove(1, index); this.navCtrl.remove(1, index);
this.commonSer.toast('提问成功'); this.commonSer.toast('提问成功');
}else{ } else {
this.commonSer.toast(res.errMsg); this.commonSer.toast(res.errmsg);
} }
} }
) )
......
<ion-header> <ion-header>
<ion-navbar> <ion-navbar>
<ion-title>发布<span *ngIf="type == 'image'">图文</span><span *ngIf="type == 'video'">视频</span> </ion-title> <ion-title>发布<span *ngIf="type == 'image'">文章</span><span *ngIf="type == 'video'">文章</span> </ion-title>
<ion-buttons end> <ion-buttons end>
<button ion-button icon-only (click)="handle()" class="toolbar-icon"> <button ion-button icon-only (click)="handle()" class="toolbar-icon">
<ion-icon name="list"></ion-icon> 发布
<!-- 发布--> <!-- 发布-->
</button> </button>
</ion-buttons> </ion-buttons>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<ion-title>发布<span *ngIf="type == 'image'">图片</span><span *ngIf="type == 'video'">视频</span> </ion-title> <ion-title>发布<span *ngIf="type == 'image'">图片</span><span *ngIf="type == 'video'">视频</span> </ion-title>
<ion-buttons end> <ion-buttons end>
<button ion-button icon-only (click)="handle()" class="toolbar-icon"> <button ion-button icon-only (click)="handle()" class="toolbar-icon">
<ion-icon name="list"></ion-icon> 发布
<!-- 发布--> <!-- 发布-->
</button> </button>
</ion-buttons> </ion-buttons>
......
...@@ -10,11 +10,15 @@ ...@@ -10,11 +10,15 @@
<div class="content-box"> <div class="content-box">
<div class="info-item content-box-group"> <div class="info-item content-box-group">
<label class="info-span">出生日期</label> <label class="info-span">出生日期</label>
<!-- <ion-label class="content-label info">{{userinfo.birthDay}}</ion-label>-->
<ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD" pickerFormat="YYYY MM DD" <ion-datetime cancelText="取消" doneText="确认" displayFormat="YYYY-MM-DD" pickerFormat="YYYY MM DD"
[(ngModel)]="userinfo.birthDay"></ion-datetime> [(ngModel)]="userinfo.birthDay"></ion-datetime>
</div> </div>
<div class="info-item content-box-group"> <div class="info-item content-box-group">
<label class="info-span">职务</label>
<ion-input class="info-input" type="text" maxlength="20"
[(ngModel)]="userinfo.job"></ion-input>
</div>
<div class="info-item content-box-group">
<label class="info-span">房间号</label> <label class="info-span">房间号</label>
<ion-input class="info-input" type="text" maxlength="20" <ion-input class="info-input" type="text" maxlength="20"
[(ngModel)]="userinfo.abbreviation"></ion-input> [(ngModel)]="userinfo.abbreviation"></ion-input>
......
...@@ -54,7 +54,9 @@ export class EditPersonInfoPage { ...@@ -54,7 +54,9 @@ export class EditPersonInfoPage {
this.user = value; this.user = value;
this.gender = this.user.userDetail.user.gender; this.gender = this.user.userDetail.user.gender;
this.userinfo = this.user.userDetail.user; this.userinfo = this.user.userDetail.user;
this.userinfo.job = null; if(!this.userinfo.job){
this.userinfo.job = null;
}
console.log(this.userinfo); console.log(this.userinfo);
this.userinfo.userId = this.user.id; this.userinfo.userId = this.user.id;
this.getOrgName(this.user.id,result=>{ this.getOrgName(this.user.id,result=>{
......
...@@ -56,8 +56,7 @@ ...@@ -56,8 +56,7 @@
<div class="info-item"> <div class="info-item">
<span class="info-span">出生日期</span> <span class="info-span">出生日期</span>
<div class="info-item-content"> <div class="info-item-content">
<span class="info">{{user?.userDetail?.user.telephone}}</span> <span class="info">{{user?.userDetail?.user.birthDay}}</span>
<img src="./assets/imgs/edit.png" class="edit" (click)="edit()">
</div> </div>
</div> </div>
</ion-item> </ion-item>
...@@ -65,8 +64,7 @@ ...@@ -65,8 +64,7 @@
<div class="info-item"> <div class="info-item">
<span class="info-span">职务</span> <span class="info-span">职务</span>
<div class="info-item-content"> <div class="info-item-content">
<span class="info">{{user?.userDetail?.user.telephone}}</span> <span class="info">{{user?.userDetail?.user.job}}</span>
<img src="./assets/imgs/edit.png" class="edit" (click)="edit()">
</div> </div>
</div> </div>
</ion-item> </ion-item>
...@@ -75,7 +73,6 @@ ...@@ -75,7 +73,6 @@
<span class="info-span">房间号</span> <span class="info-span">房间号</span>
<div class="info-item-content"> <div class="info-item-content">
<span class="info">{{user?.userDetail?.user.abbreviation}}</span> <span class="info">{{user?.userDetail?.user.abbreviation}}</span>
<img src="./assets/imgs/edit.png" class="edit" (click)="edit()">
</div> </div>
</div> </div>
</ion-item> </ion-item>
...@@ -84,7 +81,6 @@ ...@@ -84,7 +81,6 @@
<span class="info-span">座机</span> <span class="info-span">座机</span>
<div class="info-item-content"> <div class="info-item-content">
<span class="info">{{user?.userDetail?.user.telephone}}</span> <span class="info">{{user?.userDetail?.user.telephone}}</span>
<img src="./assets/imgs/edit.png" class="edit" (click)="edit()">
</div> </div>
</div> </div>
</ion-item> </ion-item>
...@@ -94,13 +90,11 @@ ...@@ -94,13 +90,11 @@
<span class="info-span">邮箱</span> <span class="info-span">邮箱</span>
<div class="info-item-content"> <div class="info-item-content">
<span class="info">{{user?.userDetail?.user.email}}</span> <span class="info">{{user?.userDetail?.user.email}}</span>
<img src="./assets/imgs/edit.png" class="edit" (click)="edit()">
</div> </div>
</div> </div>
</ion-item> </ion-item>
</ion-list> </ion-list>
<button class="submit-btn submit" (click)="edit()">修改个人信息</button> <button style="margin-bottom: 0" class="submit-btn submit" (click)="edit()">修改个人信息</button>
<!--<button ion-button block class="save" (click)="modifyPwd()">修改密码</button>-->
<button class="submit-btn submit" (click)="modifyPwd()">修改密码</button> <button class="submit-btn submit" (click)="modifyPwd()">修改密码</button>
</ion-content> </ion-content>
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
<div class="content" (click)="stop($event)"> <div class="content" (click)="stop($event)">
<div class="image" (click)="goToPublish('image')"> <div class="image" (click)="goToPublish('image')">
<ion-icon class="icon iconfont icon-shipin-tianchong"></ion-icon> <ion-icon class="icon iconfont icon-shipin-tianchong"></ion-icon>
<span>图文</span></div> <span>文章</span></div>
<!-- <div class="video" (click)="goToPublish('video')">--> <!-- <div class="video" (click)="goToPublish('video')">-->
<!-- <ion-icon class="icon-tupian iconfont"></ion-icon>--> <!-- <ion-icon class="icon-tupian iconfont"></ion-icon>-->
<!-- <span>发视频</span></div>--> <!-- <span>发视频</span></div>-->
......
...@@ -246,10 +246,6 @@ export class DiscoverPage { ...@@ -246,10 +246,6 @@ export class DiscoverPage {
}); });
} }
ionViewDidEnter() {
this.getQuestion();
}
ionViewDidLoad() { ionViewDidLoad() {
this.storage.get('userLoginInfo').then((value) => { this.storage.get('userLoginInfo').then((value) => {
this.userId = value.userid; this.userId = value.userid;
......
...@@ -67,7 +67,7 @@ export class MinePage { ...@@ -67,7 +67,7 @@ export class MinePage {
this.mineInfo = res.data; this.mineInfo = res.data;
this.picture = res.data.picUrl; this.picture = res.data.picUrl;
} }
) );
this.getRole(); this.getRole();
} }
......
...@@ -11,6 +11,7 @@ import {NoticePage} from "./notice/notice"; ...@@ -11,6 +11,7 @@ import {NoticePage} from "./notice/notice";
import {BackButtonService} from "../../provide/backButton.service"; import {BackButtonService} from "../../provide/backButton.service";
import {ServePage} from "./serve/serve"; import {ServePage} from "./serve/serve";
import {DiscoverPage} from "./discover/discover"; import {DiscoverPage} from "./discover/discover";
import {TabsService} from "./tabs.service";
@Component({ @Component({
templateUrl: 'tabs.html' templateUrl: 'tabs.html'
...@@ -28,6 +29,22 @@ export class TabsPage { ...@@ -28,6 +29,22 @@ export class TabsPage {
tabsIndex; tabsIndex;
role: any; role: any;
serve = {
root: ServePage,
tabTitle: '服务',
tabIconOn: 'custom-serve-on',
tabIconOff: 'custom-serve-off',
index: 2
};
mine = {
root: MinePage,
tabTitle: '我的',
tabIconOn: 'custom-mine-on',
tabIconOff: 'custom-mine-off',
index: 3
}
constructor( constructor(
public navCtrl: NavController, public navCtrl: NavController,
public navParams: NavParams, public navParams: NavParams,
...@@ -35,7 +52,7 @@ export class TabsPage { ...@@ -35,7 +52,7 @@ export class TabsPage {
public storage: Storage, public storage: Storage,
public event: Events, public event: Events,
public render: Renderer, public render: Renderer,
public elementRef: ElementRef, public tabSer: TabsService,
public appService: AppService, public appService: AppService,
private backButtonService: BackButtonService, private backButtonService: BackButtonService,
public platform: Platform, public platform: Platform,
...@@ -52,21 +69,18 @@ export class TabsPage { ...@@ -52,21 +69,18 @@ export class TabsPage {
tabIconOn: 'custom-discover-on', tabIconOn: 'custom-discover-on',
tabIconOff: 'custom-discover-off', tabIconOff: 'custom-discover-off',
index: 1 index: 1
}, },];
{
root: ServePage, this.tabSer.getUserIntegral().subscribe(
tabTitle: '服务', (res) => {
tabIconOn: 'custom-serve-on', const mineInfo = res.data;
tabIconOff: 'custom-serve-off', if(mineInfo.orgName != "退休人员"){
index: 2 this.tabRoots.push(this.serve,this.mine);
}, }else{
{ this.tabRoots.push(this.mine);
root: MinePage, }
tabTitle: '我的', }
tabIconOn: 'custom-mine-on', );
tabIconOff: 'custom-mine-off',
index: 3
}];
this.platform.ready().then(() => { this.platform.ready().then(() => {
this.backButtonService.registerBackButtonAction(this.myTabs); this.backButtonService.registerBackButtonAction(this.myTabs);
......
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