Skip to content
response.html 3.29 KiB
Newer Older
wangqinghua's avatar
wangqinghua committed
<ion-header>

    <ion-navbar>
        <ion-title>你问我答</ion-title>
    </ion-navbar>

</ion-header>


<ion-content>
    <div class="learn-item">
        <div class="item-container">
            <div class="item-title">
                <p>
                    <span *ngIf="item?.type == 1">(判断)</span>
                    <span *ngIf="item?.type == 2">(单选)</span>
                    <span *ngIf="item?.type == 3">(多选)</span>
wangqinghua's avatar
wangqinghua committed
                    <span *ngIf="item?.type == 3">(问答)</span>
wangqinghua's avatar
wangqinghua committed
                    {{item?.stem}}
                </p>
            </div>
            <div class="item-content">
                <div class="padding-20-20">
                    <!--判断题-->
                    <ng-container *ngIf="item?.type == 1">
                        <p>
                            <label>
                                <input [(ngModel)]="answer" [name]="item?.id" value="A" type="radio">
                                <span class=" selectIndex">A</span>&nbsp;&nbsp;

                            </label>
                        </p>
                        <p>
                            <label>
                                <input [(ngModel)]="answer" [name]="item?.id" value="B" type="radio">
                                <span class=" selectIndex">B</span>&nbsp;&nbsp;

                            </label>
                        </p>
                    </ng-container>
                    <!--单选题-->
                    <ng-container *ngIf="item?.type == 2">
                        <ng-container *ngFor=" let option1 of item?.options;">
                            <p>
                                <label>
                                    <input [(ngModel)]="answer" type="radio" [value]="option1.option"
                                           [name]="item?.id">
                                    <span class="selectIndex">{{option1.option}}</span>&nbsp;&nbsp;
                                    {{option1.comment}}
                                </label>
                            </p>
                        </ng-container>
                    </ng-container>
                    <!--多选题-->
                    <ng-container *ngIf="item?.type == 3">
                        <ng-container *ngFor=" let option2 of item.options;let i2 = index;">
                            <p>
                                <label>
                                    <input type="checkbox" (change)="mutiSelect(i2,option2.option)"
                                           [value]="option2.option" [name]="item?.id">
                                    <span class="input-duox selectIndex">{{option2.option}}</span>&nbsp;&nbsp;
                                    {{option2.comment}}
                                </label>
                            </p>
                        </ng-container>
                    </ng-container>
wangqinghua's avatar
wangqinghua committed
                    <!--问答-->
                    <ng-container *ngIf="item?.type == 4">
                        <textarea [(ngModel)]="answer" class="content-textarea"></textarea>
                    </ng-container>
wangqinghua's avatar
wangqinghua committed
                </div>
            </div>
        </div>
    </div>

wangqinghua's avatar
wangqinghua committed
    <button class="submit-btn submit" tappable (click)="submit()">确认</button>
wangqinghua's avatar
wangqinghua committed
</ion-content>