Commit bc618756 authored by yu's avatar yu

6.20调整

parent e34eeed3
{"ver":"1.1.2","uuid":"4e7ab4f4-4d24-404d-84db-f43ee5136c53","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}} {
\ No newline at end of file "ver": "1.1.2",
"uuid": "4e7ab4f4-4d24-404d-84db-f43ee5136c53",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
...@@ -118,18 +118,21 @@ ...@@ -118,18 +118,21 @@
}, },
{ {
"__id__": 126 "__id__": 126
},
{
"__id__": 130
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 130 "__id__": 134
}, },
{ {
"__id__": 131 "__id__": 135
}, },
{ {
"__id__": 132 "__id__": 136
} }
], ],
"_prefab": null, "_prefab": null,
...@@ -3624,7 +3627,7 @@ ...@@ -3624,7 +3627,7 @@
"_N$paddingRight": 0, "_N$paddingRight": 0,
"_N$paddingTop": 0, "_N$paddingTop": 0,
"_N$paddingBottom": 0, "_N$paddingBottom": 0,
"_N$spacingX": 50, "_N$spacingX": 0,
"_N$spacingY": 15, "_N$spacingY": 15,
"_N$verticalDirection": 1, "_N$verticalDirection": 1,
"_N$horizontalDirection": 0, "_N$horizontalDirection": 0,
...@@ -3802,8 +3805,8 @@ ...@@ -3802,8 +3805,8 @@
"_enabled": true, "_enabled": true,
"horizontal": true, "horizontal": true,
"vertical": true, "vertical": true,
"inertia": true, "inertia": false,
"brake": 0.4, "brake": 1,
"elastic": true, "elastic": true,
"bounceDuration": 0.1, "bounceDuration": 0.1,
"scrollEvents": [], "scrollEvents": [],
...@@ -3814,10 +3817,10 @@ ...@@ -3814,10 +3817,10 @@
"content": { "content": {
"__id__": 74 "__id__": 74
}, },
"scrollThreshold": 0.5, "scrollThreshold": 0.9,
"autoPageTurningThreshold": 500, "autoPageTurningThreshold": 300,
"pageTurningEventTiming": 0.8, "pageTurningEventTiming": 0.1,
"pageTurningSpeed": 0.3, "pageTurningSpeed": 0.1,
"pageEvents": [], "pageEvents": [],
"_N$sizeMode": 0, "_N$sizeMode": 0,
"_N$direction": 0, "_N$direction": 0,
...@@ -6220,6 +6223,234 @@ ...@@ -6220,6 +6223,234 @@
"_N$target": null, "_N$target": null,
"_id": "15HkoamNxAXYUbyeq1Sc83" "_id": "15HkoamNxAXYUbyeq1Sc83"
}, },
{
"__type__": "cc.Node",
"_name": "btn_last",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 131
}
],
"_active": true,
"_components": [
{
"__id__": 133
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 140,
"height": 60
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-27.636,
-320,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "4ezmuiPOFHYIrRJjLMgQqi"
},
{
"__type__": "cc.Node",
"_name": "btn_arrow",
"_objFlags": 0,
"_parent": {
"__id__": 130
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 132
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 79,
"height": 54
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-0.623,
-0.894,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "7dvJsICDFCk6EzbgKE/hoQ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 131
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "35afc627-cf82-476e-a954-bb4d6e254b18"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "fbfVEwA/NBKLB93oUH5SPf"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 130
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "c0fJJ8YktCzqXcyZvtRYij"
},
{ {
"__type__": "cc.Canvas", "__type__": "cc.Canvas",
"_name": "", "_name": "",
...@@ -6287,6 +6518,9 @@ ...@@ -6287,6 +6518,9 @@
"btn_arrow": { "btn_arrow": {
"__id__": 126 "__id__": 126
}, },
"btn_last": {
"__id__": 130
},
"_id": "eaTVUpqahPfZeO9+sUI7RP" "_id": "eaTVUpqahPfZeO9+sUI7RP"
} }
] ]
\ No newline at end of file
...@@ -31,6 +31,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -31,6 +31,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.Node) @property(cc.Node)
btn_arrow: cc.Node = null; btn_arrow: cc.Node = null;
@property(cc.Node)
btn_last: cc.Node = null;
// 录音中 // 录音中
_recording = false; _recording = false;
// 录音音频 // 录音音频
...@@ -198,7 +201,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -198,7 +201,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
} }
pag.getComponent(cc.PageView).enabled = false;
// 录音界面 // 录音界面
let mask = cc.find('Canvas/mask'); let mask = cc.find('Canvas/mask');
mask.active = false; mask.active = false;
...@@ -364,7 +367,9 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -364,7 +367,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.resetRecord(); this.resetRecord();
}); });
this.btn_arrow.on(cc.Node.EventType.TOUCH_END, this.onArrow, this); this.btn_arrow.on(cc.Node.EventType.TOUCH_END, this.onArrow, this);
this.btn_last.on(cc.Node.EventType.TOUCH_END, this.onLast, this);
this.setPagBg(); this.setPagBg();
this.refreshArrow();
} }
private roundIdx; private roundIdx;
private setPagBg() { private setPagBg() {
...@@ -387,31 +392,40 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -387,31 +392,40 @@ export default class SceneComponent extends MyCocosSceneComponent {
}); });
} }
private refreshArrow() {
this.btn_last.active = this.roundIdx > 0;
this.btn_arrow.active = this.roundIdx < this.data.questions.length - 1;
}
private arrowTouch = false; private arrowTouch = false;
private onArrow() { private onArrow() {
if (this.arrowTouch) return; if (this.arrowTouch) return;
this.arrowTouch = true; this.arrowTouch = true;
this.roundIdx++; this.roundIdx++;
let pag = cc.find("PageView", this.node); let pag = cc.find("PageView", this.node);
pag.getComponent(cc.PageView).enabled = true;
pag.getComponent(cc.PageView).scrollToPage(this.roundIdx, 0.1);
this.setPagBg();
this.refreshArrow();
}
private onLast() {
if (this.arrowTouch) return;
this.arrowTouch = true;
this.roundIdx--;
let pag = cc.find("PageView", this.node);
let len = pag.getComponent(cc.PageView).getPages().length; let len = pag.getComponent(cc.PageView).getPages().length;
if (len <= 1) return; if (len <= 1) return;
pag.getComponent(cc.PageView).scrollToPage(1, 0.5); pag.getComponent(cc.PageView).enabled = true;
setTimeout(() => { pag.getComponent(cc.PageView).scrollToPage(this.roundIdx, 0.1);
this.setPagBg(); this.setPagBg();
this.arrowTouch = false; this.refreshArrow();
pag.getComponent(cc.PageView).removePageAtIndex(0);
}, 600);
} }
private pageTurning() { private pageTurning() {
if (this.arrowTouch) return;
this.roundIdx++;
let pag = cc.find("PageView", this.node); let pag = cc.find("PageView", this.node);
let idx = pag.getComponent(cc.PageView).getCurrentPageIndex(); pag.getComponent(cc.PageView).scrollToPage(this.roundIdx, 0.1);
if (idx != 0) { setTimeout(() => {
pag.getComponent(cc.PageView).removePageAtIndex(0); pag.getComponent(cc.PageView).enabled = false;
} this.arrowTouch = false;
this.setPagBg(); }, 200);
this.log("31232")
} }
/** /**
* 重置文字 * 重置文字
......
{
"ver": "2.3.5",
"uuid": "1961dc02-5b8a-49af-9e52-e93d86d4dfd3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 79,
"height": 54,
"platformSettings": {},
"subMetas": {
"btn_last": {
"ver": "1.0.4",
"uuid": "35afc627-cf82-476e-a954-bb4d6e254b18",
"rawTextureUuid": "1961dc02-5b8a-49af-9e52-e93d86d4dfd3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 79,
"height": 54,
"rawWidth": 79,
"rawHeight": 54,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</style> </style>
<div class="model-content"> <div class="model-content">
<div nz-row> <div nz-row style="margin: 20px;width: 1000px;">
<div nz-col [nzSpan]="18" [nzOffset]="1"> <div nz-col [nzSpan]="18" [nzOffset]="1">
<nz-card nzTitle="标题信息"> <nz-card nzTitle="标题信息">
<nz-form-item> <nz-form-item>
...@@ -91,32 +91,34 @@ ...@@ -91,32 +91,34 @@
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4">题目音频</nz-form-label> <nz-form-label [nzSpan]="4">题目音频</nz-form-label>
<nz-form-control [nzSpan]="12"> <nz-form-control [nzSpan]="20">
<app-audio-recorder [audioUrl]="item.questionTextAudio" [_audioName]="item.questionTextAudioName" <app-audio-recorder [audioUrl]="item.questionTextAudio" [_audioName]="item.questionTextAudioName"
(audioUploaded)="onAudioUploadSuccess($event, item, 'questionTextAudio')" (audioName)="onAudioName($event, item, 'questionTextAudioName')"></app-audio-recorder> (audioUploaded)="onAudioUploadSuccess($event, item, 'questionTextAudio')"
(audioName)="onAudioName($event, item, 'questionTextAudioName')"></app-audio-recorder>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</nz-card> </nz-card>
</div> </div>
</div> </div>
<br/> <br />
<!--页面区域--> <!--页面区域-->
<div nz-row> <div nz-row style="margin: 20px;width: 1000px;">
<div nz-col [nzSpan]="18" [nzOffset]="1"> <div nz-col [nzSpan]="18" [nzOffset]="1">
<div *ngFor="let page of item.questions; let j=index" style="margin-bottom: 5mm;" nz-col [nzXs]='24' <div *ngFor="let page of item.questions; let j=index" style="margin-bottom: 5mm;" nz-col [nzXs]='24' [nzSm]='24'
[nzSm]='24' [nzMd]='24' [nzLg]='24'> [nzMd]='24' [nzLg]='24'>
<nz-card nzTitle="第{{j+1}}页" [nzHoverable]="true" [nzExtra]="actionCard"> <nz-card nzTitle="第{{j+1}}页" [nzHoverable]="true" [nzExtra]="actionCard">
<!--题目区域--> <!--题目区域-->
<div nz-row> <div style="width: 800px;" nz-row>
<div nz-col [nzSpan]="18" [nzOffset]="1"> <div nz-col [nzSpan]="18" [nzOffset]="1">
<nz-card nzTitle="故事图片及完整音频"> <nz-card nzTitle="故事图片及完整音频">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4">完整音频</nz-form-label> <nz-form-label [nzSpan]="4">完整音频</nz-form-label>
<nz-form-control [nzSpan]="12"> <nz-form-control [nzSpan]="20">
<app-audio-recorder [audioUrl]="page.audio" [_audioName]="page.audioName" <app-audio-recorder [audioUrl]="page.audio" [_audioName]="page.audioName"
(audioUploaded)="onAudioUploadSuccess($event, page, 'audio')" (audioName)="onAudioName($event, page, 'audioName')"></app-audio-recorder> (audioUploaded)="onAudioUploadSuccess($event, page, 'audio')"
(audioName)="onAudioName($event, page, 'audioName')"></app-audio-recorder>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
...@@ -129,18 +131,20 @@ ...@@ -129,18 +131,20 @@
</nz-card> </nz-card>
</div> </div>
</div> </div>
<br/> <br />
<!--题目区域--> <!--题目区域-->
<div nz-row> <div nz-row style="width: 800px;">
<div nz-col [nzSpan]="18" [nzOffset]="1"> <div nz-col [nzSpan]="18" [nzOffset]="1">
<h4 nz-typography>文本内容:</h4> <h4 nz-typography>文本内容:</h4>
<div *ngFor="let data of page.options; let i=index" style="margin-bottom: 5mm;" nz-col [nzXs]='24' [nzSm]='24' [nzMd]='24' [nzLg]='24'> <div *ngFor="let data of page.options; let i=index" style="margin-bottom: 5mm;" nz-col [nzXs]='24'
[nzSm]='24' [nzMd]='24' [nzLg]='24'>
<nz-card nzTitle="文本{{i+1}}" [nzHoverable]="true" [nzExtra]="actionCard"> <nz-card nzTitle="文本{{i+1}}" [nzHoverable]="true" [nzExtra]="actionCard">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4">音频</nz-form-label> <nz-form-label [nzSpan]="4">音频</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="20">
<app-audio-recorder [audioUrl]="data.audio" [_audioName]="data.audioName" <app-audio-recorder [audioUrl]="data.audio" [_audioName]="data.audioName"
(audioUploaded)="onAudioUploadSuccess($event, data, 'audio')" (audioName)="onAudioName($event, data, 'audioName')"></app-audio-recorder> (audioUploaded)="onAudioUploadSuccess($event, data, 'audio')"
(audioName)="onAudioName($event, data, 'audioName')"></app-audio-recorder>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
...@@ -148,13 +152,15 @@ ...@@ -148,13 +152,15 @@
<font style="color: red;">*</font>文本 <font style="color: red;">*</font>文本
</nz-form-label> </nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<textarea nz-input rows="4" [(ngModel)]="data.text" (blur)="save()" placeholder="输入文本内容"></textarea> <textarea nz-input rows="4" [(ngModel)]="data.text" (blur)="save()"
placeholder="输入文本内容"></textarea>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="4">录音时间(s)</nz-form-label> <nz-form-label [nzSpan]="4">录音时间(s)</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<input nz-input type="text" [(ngModel)]="data.duration" (blur)="save()" placeholder="录音超过时间自动提交成绩"> <input nz-input type="text" [(ngModel)]="data.duration" (blur)="save()"
placeholder="录音超过时间自动提交成绩">
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</nz-card> </nz-card>
...@@ -169,7 +175,7 @@ ...@@ -169,7 +175,7 @@
</div> </div>
</div> </div>
</div> </div>
<br/> <br />
<div nz-row> <div nz-row>
<div nz-col [nzSpan]="18" [nzOffset]="1"> <div nz-col [nzSpan]="18" [nzOffset]="1">
<button nz-button nzType="primary" nzSize="large" (click)="addoption(j)"> <button nz-button nzType="primary" nzSize="large" (click)="addoption(j)">
...@@ -177,7 +183,7 @@ ...@@ -177,7 +183,7 @@
</button> </button>
</div> </div>
</div> </div>
<br/> <br />
</nz-card> </nz-card>
<ng-template #actionCard> <ng-template #actionCard>
<button nz-button nzType="danger" (click)="removequestion(j)"> <button nz-button nzType="danger" (click)="removequestion(j)">
......
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