Commit 29feead2 authored by yu's avatar yu

1

parent be749228
......@@ -93,13 +93,13 @@
"_active": true,
"_components": [
{
"__id__": 160
"__id__": 167
},
{
"__id__": 161
"__id__": 168
},
{
"__id__": 162
"__id__": 169
}
],
"_prefab": null,
......@@ -6129,7 +6129,10 @@
"__id__": 134
},
{
"__id__": 147
"__id__": 141
},
{
"__id__": 154
}
],
"_active": true,
......@@ -6464,7 +6467,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 260,
"height": 50.4
"height": 90
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -6476,7 +6479,7 @@
"ctor": "Float64Array",
"array": [
0,
-26.94,
-25.94,
0,
0,
0,
......@@ -6515,10 +6518,10 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "Label",
"_N$string": "Label",
"_fontSize": 40,
"_lineHeight": 40,
"_string": "Labeldg",
"_N$string": "Labeldg",
"_fontSize": 86,
"_lineHeight": 90,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "e03c0bb7-d7c6-4b87-b6ea-3c5a36b33305"
......@@ -6537,7 +6540,7 @@
},
{
"__type__": "cc.Node",
"_name": "card2_img",
"_name": "card1_img",
"_objFlags": 0,
"_parent": {
"__id__": 126
......@@ -6551,15 +6554,365 @@
},
{
"__id__": 139
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 408,
"height": 290
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "018vFWQ15B75FEeJcCn1sv"
},
{
"__id__": 141
"__type__": "cc.Node",
"_name": "bg_bar_font",
"_objFlags": 0,
"_parent": {
"__id__": 134
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 143
"__id__": 136
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 408,
"height": 290
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "1dya2MTcNOC5q+CdbREfpM"
},
{
"__id__": 145
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ef68c786-f2d4-4766-9ca2-2aa31d1968fa"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "92gIZlEPRNGIRYZxLjsD2L"
},
{
"__type__": "cc.Node",
"_name": "bg_bar_img",
"_objFlags": 0,
"_parent": {
"__id__": 134
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 138
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 408,
"height": 290
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
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": "55AfdjN2FKW581tOKYnh/e"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "ef68c786-f2d4-4766-9ca2-2aa31d1968fa"
},
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "34luRtTuxOm5afflyeSWfq"
},
{
"__type__": "cc.Node",
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 134
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 140
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 190,
"height": 140
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
13.48,
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": "00ad8Zs0pNQrGcmDHsfqTF"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "c9T1UHauFOuYdFW3h5KwcP"
},
{
"__type__": "cc.Node",
"_name": "card2_img",
"_objFlags": 0,
"_parent": {
"__id__": 126
},
"_children": [
{
"__id__": 142
},
{
"__id__": 144
},
{
"__id__": 146
},
{
"__id__": 148
},
{
"__id__": 150
},
{
"__id__": 152
}
],
"_active": true,
......@@ -6617,13 +6970,13 @@
"_name": "ice_img",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 141
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 136
"__id__": 143
}
],
"_prefab": null,
......@@ -6679,7 +7032,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 135
"__id__": 142
},
"_enabled": true,
"_materials": [
......@@ -6711,13 +7064,13 @@
"_name": "ice_melt",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 141
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 138
"__id__": 145
}
],
"_prefab": null,
......@@ -6773,7 +7126,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 137
"__id__": 144
},
"_enabled": true,
"_materials": [
......@@ -6805,13 +7158,13 @@
"_name": "bg_mask_img",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 141
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 140
"__id__": 147
}
],
"_prefab": null,
......@@ -6867,7 +7220,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 139
"__id__": 146
},
"_enabled": true,
"_materials": [
......@@ -6899,13 +7252,13 @@
"_name": "img",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 141
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 142
"__id__": 149
}
],
"_prefab": null,
......@@ -6961,7 +7314,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 141
"__id__": 148
},
"_enabled": true,
"_materials": [
......@@ -6993,13 +7346,13 @@
"_name": "img_dian",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 141
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 144
"__id__": 151
}
],
"_prefab": null,
......@@ -7055,7 +7408,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 143
"__id__": 150
},
"_enabled": true,
"_materials": [
......@@ -7087,13 +7440,13 @@
"_name": "img_pro",
"_objFlags": 0,
"_parent": {
"__id__": 134
"__id__": 141
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 146
"__id__": 153
}
],
"_prefab": null,
......@@ -7149,7 +7502,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 145
"__id__": 152
},
"_enabled": true,
"_materials": [
......@@ -7185,22 +7538,22 @@
},
"_children": [
{
"__id__": 148
"__id__": 155
},
{
"__id__": 150
"__id__": 157
},
{
"__id__": 152
"__id__": 159
},
{
"__id__": 154
"__id__": 161
},
{
"__id__": 156
"__id__": 163
},
{
"__id__": 158
"__id__": 165
}
],
"_active": true,
......@@ -7258,13 +7611,13 @@
"_name": "ice_img",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 154
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 149
"__id__": 156
}
],
"_prefab": null,
......@@ -7320,7 +7673,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 148
"__id__": 155
},
"_enabled": true,
"_materials": [
......@@ -7352,13 +7705,13 @@
"_name": "ice_melt",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 154
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 151
"__id__": 158
}
],
"_prefab": null,
......@@ -7414,7 +7767,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 150
"__id__": 157
},
"_enabled": true,
"_materials": [
......@@ -7446,13 +7799,13 @@
"_name": "bg_mask_img",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 154
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 153
"__id__": 160
}
],
"_prefab": null,
......@@ -7508,7 +7861,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 152
"__id__": 159
},
"_enabled": true,
"_materials": [
......@@ -7540,13 +7893,13 @@
"_name": "desc",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 154
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 155
"__id__": 162
}
],
"_prefab": null,
......@@ -7560,8 +7913,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 280,
"height": 46
"width": 250,
"height": 84
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -7573,7 +7926,7 @@
"ctor": "Float64Array",
"array": [
0,
0,
8.962,
0,
0,
0,
......@@ -7602,7 +7955,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 154
"__id__": 161
},
"_enabled": true,
"_materials": [
......@@ -7614,8 +7967,8 @@
"_dstBlendFactor": 771,
"_string": "apple",
"_N$string": "apple",
"_fontSize": 46,
"_lineHeight": 46,
"_fontSize": 84,
"_lineHeight": 84,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "e03c0bb7-d7c6-4b87-b6ea-3c5a36b33305"
......@@ -7628,7 +7981,7 @@
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 3,
"_N$overflow": 2,
"_N$cacheMode": 2,
"_id": "58ngAq8xBEZYHZlI+QUlAa"
},
......@@ -7637,13 +7990,13 @@
"_name": "img_dian",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 154
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 157
"__id__": 164
}
],
"_prefab": null,
......@@ -7699,7 +8052,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 156
"__id__": 163
},
"_enabled": true,
"_materials": [
......@@ -7731,13 +8084,13 @@
"_name": "img_pro",
"_objFlags": 0,
"_parent": {
"__id__": 147
"__id__": 154
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 159
"__id__": 166
}
],
"_prefab": null,
......@@ -7793,7 +8146,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 158
"__id__": 165
},
"_enabled": true,
"_materials": [
......@@ -7887,11 +8240,14 @@
"card_box": {
"__id__": 127
},
"card_img": {
"card_boximg": {
"__id__": 134
},
"card_img": {
"__id__": 141
},
"card_txt": {
"__id__": 147
"__id__": 154
},
"_id": "7fJHAoT35KO4DJYl4zmtZE"
}
......
......@@ -83,6 +83,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
@property(cc.Node)
card_box: cc.Node = null;
@property(cc.Node)
card_boximg: cc.Node = null;
@property(cc.Node)
card_img: cc.Node = null;
@property(cc.Node)
card_txt: cc.Node = null;
......@@ -163,11 +165,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
let ques = Game.getIns().getList();
ques.forEach((q) => {
if(q.type == "img"){
let itemBox = cc.instantiate(this.card_boximg);
itemBox.parent = this.layout_box;
pg.view.setNetImg( cc.find("img", itemBox), q.image, { w: 190, h: 140 });
itemBox.data = q;
this.wordItams.push(itemBox);
}else{
let itemBox = cc.instantiate(this.card_box);
itemBox.parent = this.layout_box;
cc.find("desc", itemBox).getComponent(cc.Label).string = q.text;
itemBox.data = q;
this.wordItams.push(itemBox);
}
});
let qe = Game.getIns().getCardInfo();
qe.forEach((op) => {
......
......@@ -50,12 +50,16 @@ export class Item {
public pointsArr;
public text: string;
public isClick: boolean;
public type;
public image;
constructor(data, page) {
this.audio = data.audio;
this.text = data.text;
this.bgItem = data.bgItem;
this.hotZoneItemArr = data.hotZoneItemArr;
this.page = page;
this.type = data.type;
this.image = data.image || "";
this.optionList = data.options.map((o, idx) => {
return new Option(o, this.page);
......@@ -147,7 +151,7 @@ export default class Game {
public dispelCount;
public aniEnter;
public startAudio: string;
public time:number;
public time: number;
// public questionText: string;
public init(data) {
// this.question = { text: data.questionText, audio: data.questionTextAudio };
......
......@@ -22,11 +22,12 @@ export const defaultData = {
"right": false
}
],
"type": "",
"type": "img",
"text": "fruit",
"questionAudio": "",
"contentMain": "",
"contentArr": []
"contentArr": [],
"image": "http://staging-teach.cdn.ireadabc.com/a190861baa166812cc6c35faef0cfdcf.png"
}, {
"options": [{
"type": "txt",
......@@ -44,7 +45,7 @@ export const defaultData = {
"right": false
}
],
"type": "",
"type": "txt",
"text": "animal",
"questionAudio": "",
"contentMain": "",
......@@ -66,7 +67,7 @@ export const defaultData = {
"right": false
}
],
"type": "",
"type": "txt",
"text": "vegetable",
"questionAudio": "",
"contentMain": "",
......@@ -78,5 +79,8 @@ export const defaultData = {
"audioName": "",
"time": 60,
"title": "sn04-分类",
"opleng": 6
"opleng": 6,
"word_count": "0",
"sentence_count": "0",
"zi_count": "0"
}
{
"ver": "2.3.5",
"uuid": "5221020d-32e1-4d9e-a581-c1ce24770c86",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 408,
"height": 290,
"platformSettings": {},
"subMetas": {
"bg_bar_img": {
"ver": "1.0.4",
"uuid": "ef68c786-f2d4-4766-9ca2-2aa31d1968fa",
"rawTextureUuid": "5221020d-32e1-4d9e-a581-c1ce24770c86",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 408,
"height": 290,
"rawWidth": 408,
"rawHeight": 290,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -95,7 +95,22 @@
<div class="border-solid" style="min-width: 1000px;">
<div class="word-type-title">
分类{{i+1}}
<div class=" option-text">
<div style="margin-top: 20px;">
<div class="word-type-option-title">
选项类型:
</div>
<div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="question.type" (ngModelChange)="ngChange()">
<label nz-radio nzValue="img">
<span [style]="{color:question.type=='img' ? '#169BD5':'#000'}">图片</span>
</label>
<label nz-radio nzValue="txt">
<span [style]="{color:question.type=='txt' ? '#169BD5':'#000'}">文字</span>
</label>
</nz-radio-group>
</div>
</div>
<div *ngIf="question.type=='txt'" class=" option-text">
<div class="word-input-title">
<span style="color:red;margin-left:-15px">* </span>
<span>分类文本: </span>
......@@ -103,7 +118,18 @@
<input type="text" class="input-place-red" nz-input [(ngModel)]="question.text" placeholder=""
(blur)="save()">
</div>
<div class="option-img">
<div *ngIf="question.type=='img'">
<div class="word-input-title">
图片:
</div>
<div style="width: 300px;">
<app-upload-image-with-preview [picUrl]="question.image"
(imageUploaded)="onImageUploadSuccess($event, 'image', question)">
</app-upload-image-with-preview>
</div>
</div>
</div>
<div class="word-type-option-title" style="margin-top:20px;">
选项内容:
</div>
......@@ -129,7 +155,7 @@
选项类型:
</div>
<div style="margin-top: 5px;">
<nz-radio-group [(ngModel)]="option.type" (ngModelChange)="ngChange(i,j)">
<nz-radio-group [(ngModel)]="option.type" (ngModelChange)="ngChange()">
<label nz-radio nzValue="img">
<span [style]="{color:option.type=='img' ? '#169BD5':'#000'}">图片</span>
</label>
......
......@@ -27,7 +27,7 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
// tipSwitch: 1,//提示功能开关
// startAudio: "",
// audioName: "",
title: "sn04-分类",
title: "分类",
time: 60,
opleng: 0,
word_count: '0',
......@@ -102,20 +102,20 @@ export class FormComponent extends ComponentBase implements OnInit, OnChanges, O
addquestion() {
this.item.questions.push({
options: [],
type: "",
type: "txt",
text: "",
questionAudio: "",
// wordAudio: "",
// wordAudioName: "",
// audioName: "",
// questImg: "",
image: "",
contentMain: "",
contentArr: [],
});
this.updateOpleng();
this.save();
}
ngChange(i, j) {
ngChange() {
this.updateOpleng();
this.save();
}
......
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