Commit f144d97b authored by liujiangnan's avatar liujiangnan

feat: 录音报告展示

parent 1c7443f4
......@@ -2768,7 +2768,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "d3qpY17eFOmro7pe19O6tJ"
"_id": "daab02IGVKlIIOCMR7v0pl"
},
{
"__type__": "cc.Label",
......@@ -2801,7 +2801,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "7bIQMe+V1IeanSB+P8Z4RG"
"_id": "92LXAMIqJLN4rQGszvOqsA"
},
{
"__type__": "cc.PrivateNode",
......@@ -2864,7 +2864,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "33yrS3IqREHY4MrCIj2cUJ"
"_id": "03wlcXe5dLv6djIgGzsFi3"
},
{
"__type__": "cc.Label",
......@@ -2897,7 +2897,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "62whxrRv9JirB/rxqG6aE2"
"_id": "4dNtAQSWpK1ZmwKfagakTW"
},
{
"__type__": "cc.PrivateNode",
......@@ -2960,7 +2960,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "aetzkTdM1ETKN3jWbvts5Y"
"_id": "14ECpF3yNMzJmp6tFTXsUm"
},
{
"__type__": "cc.Label",
......@@ -2993,7 +2993,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "2aZYWTvH9AHKZF93DpAv/s"
"_id": "a9R+rYFxtCV7uPS5qvrAz6"
},
{
"__type__": "cc.PrivateNode",
......@@ -3056,7 +3056,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "06ee2vFJxAo55VzqdScopS"
"_id": "b9ZQgF0L9InpsQYBH2K7hR"
},
{
"__type__": "cc.Label",
......@@ -3089,7 +3089,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "79fEI6id1CO7AXr3lkyyIP"
"_id": "c1efGPpWNJubi1X6K5IWoZ"
},
{
"__type__": "cc.PrivateNode",
......@@ -3152,7 +3152,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "deQGjZo/1PCbrkYwmk1e9V"
"_id": "82Dpcwe5JMjZXQVoQdNK1B"
},
{
"__type__": "cc.Label",
......@@ -3185,7 +3185,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "caOr3AvjlLkL+LYbUMR77E"
"_id": "6apOU//jJB/LkJFeSgjlmF"
},
{
"__type__": "cc.RichText",
......@@ -6366,7 +6366,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "f8fK7JSohIm6vRmT0ZZGmv"
"_id": "caSCr6nHhHL4TrZkzlsas4"
},
{
"__type__": "cc.Label",
......@@ -6399,7 +6399,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "44Nl89vxZPKoV/tU2Ofoi5"
"_id": "021qCaSqxEpZsH4NmAFavW"
},
{
"__type__": "cc.PrivateNode",
......@@ -6462,7 +6462,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "5dxGrTMXNGm7IZnnWwCuB/"
"_id": "e4y31NZWxL0rRXGIrv7Btj"
},
{
"__type__": "cc.Label",
......@@ -6495,7 +6495,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "2dRprrgrhEQov/mDj9bu6I"
"_id": "dcMb8w/ZhHFo5ZJ29LrGmv"
},
{
"__type__": "cc.PrivateNode",
......@@ -6558,7 +6558,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "cfFxWF8z9HH41qk1P5HtKU"
"_id": "81D8XJVfFCZ4KDnTKkPpuN"
},
{
"__type__": "cc.Label",
......@@ -6591,7 +6591,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "38JIaq3D5JyZuCjscbBTwt"
"_id": "3eKOnXpetKMpmd+hJH6D9k"
},
{
"__type__": "cc.RichText",
......@@ -7070,7 +7070,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "cf//70fuJDda2rbphLCmRR"
"_id": "b7mhuprXNIOKUAKPpGrjo7"
},
{
"__type__": "cc.Label",
......@@ -7103,7 +7103,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "b1z8G8Dk9AJY6UaTCrNbmc"
"_id": "72qOKWSiNA67nGof+OLWum"
},
{
"__type__": "cc.PrivateNode",
......@@ -7166,7 +7166,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "7a5qYaJytNNKcvZJP6o6zx"
"_id": "91pt3+x1ZBIYvp1q76uDlh"
},
{
"__type__": "cc.Label",
......@@ -7199,7 +7199,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "28O1zXx3dMaLf9cDquT3mV"
"_id": "51X1CYOdpPvqdljrV6y7L2"
},
{
"__type__": "cc.PrivateNode",
......@@ -7262,7 +7262,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "c9u9BudJ9K37ZtEovxBLbw"
"_id": "385CxOOwpOTIHWLTq1m9Uo"
},
{
"__type__": "cc.Label",
......@@ -7295,7 +7295,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "fbw9FPdJdPxLAP7a33VtUX"
"_id": "09XRlIg1dIv52MfpglX9Xx"
},
{
"__type__": "cc.RichText",
......@@ -7585,7 +7585,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "0aYspX5QNCXKN3YDhX3eVB"
"_id": "8d3DAuuvtOZait+q6mZbqs"
},
{
"__type__": "cc.Label",
......@@ -7618,7 +7618,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a1eoABdAtHOqjjNkz1cpgg"
"_id": "5czbmIwhdKwKf2USs/BG8p"
},
{
"__type__": "cc.PrivateNode",
......@@ -7681,7 +7681,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "e1PcLoEYBJ4oVVM3+uE2xJ"
"_id": "44w3jynwBIH68KO7NuJWHw"
},
{
"__type__": "cc.Label",
......@@ -7714,7 +7714,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "3bQ+4lObhE7LvK6N45Cr39"
"_id": "1cTxF1GZBLFYYdnS/PkcGz"
},
{
"__type__": "cc.PrivateNode",
......@@ -7777,7 +7777,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "75zs7eB1xNw4hQxXFc0UCm"
"_id": "6b17OXIPZMjIgAQ52kQPS9"
},
{
"__type__": "cc.Label",
......@@ -7810,7 +7810,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "7b+zA70uFIzJJRfETJk6BL"
"_id": "a3PZGlmWpFPZLowiUfT0D5"
},
{
"__type__": "cc.RichText",
......@@ -9235,7 +9235,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "b8uE7PQBpIhIRqSqVCo5En"
"_id": "e2YSLOfthOFoag8qJy3vUB"
},
{
"__type__": "cc.Label",
......@@ -9268,7 +9268,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "cbWkrLe8NHFaqPEiI+nTna"
"_id": "65Kg8AKChL463BmIn+d7kr"
},
{
"__type__": "cc.PrivateNode",
......@@ -9331,7 +9331,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "54iYkC83RH2aKqmob/IsI/"
"_id": "6eb6O8ZyJLc5k3JLWZnEJY"
},
{
"__type__": "cc.Label",
......@@ -9364,7 +9364,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "29M3FQjAVE6Yfuq2suTpes"
"_id": "a9Ayk9yeVMqrzujf77nFkW"
},
{
"__type__": "cc.PrivateNode",
......@@ -9427,7 +9427,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "adHigF1PRM44uKmHKC6Vxk"
"_id": "2f6FHoXBJFUqGToy4I7rjj"
},
{
"__type__": "cc.Label",
......@@ -9460,7 +9460,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "d4fF3a7RZEIZfsmWnM92b4"
"_id": "a71P+COelFM5or9SLObUuI"
},
{
"__type__": "cc.PrivateNode",
......@@ -9523,7 +9523,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "5b+I4E9NFCCKjgev5ZbMqB"
"_id": "a8KeoPtsBPPp3hVFRkmy1c"
},
{
"__type__": "cc.Label",
......@@ -9556,7 +9556,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "79FgQVhB5KirR2KkOeYZns"
"_id": "59hoOrSdBHsa5KAsOow78p"
},
{
"__type__": "cc.PrivateNode",
......@@ -9619,7 +9619,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "574LKhSN1J/6GlsI03B5Zn"
"_id": "ceHpKY2bhOroLsB/3GFHa/"
},
{
"__type__": "cc.Label",
......@@ -9652,7 +9652,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "716fbomaJMAaH+O0SGPJjP"
"_id": "55e6LcdZNE8oxtyyRTLP0u"
},
{
"__type__": "cc.PrivateNode",
......@@ -9715,7 +9715,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "13twVYcQdN14Pe0y9NSeZw"
"_id": "6d2UrHvdBOFJwwCIHz6GcW"
},
{
"__type__": "cc.Label",
......@@ -9748,7 +9748,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "07DhGz++xCFoFHLkklAjd4"
"_id": "c5X6PitkZOWrlbkl1PJ660"
},
{
"__type__": "cc.PrivateNode",
......@@ -9811,7 +9811,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "6brn+SIZZA3LhXluPKABf+"
"_id": "821Jw4JqVPfo9hdFd2uHve"
},
{
"__type__": "cc.Label",
......@@ -9844,7 +9844,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "0aYHZhHV1PDpw+WFuxxypr"
"_id": "d6wRg4LiVASb0CNaB+I0GD"
},
{
"__type__": "cc.RichText",
......@@ -12590,7 +12590,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "f2Q1fTndlLGb7z4fSYTpdF"
"_id": "01JQu585FCArSKqZwo59oz"
},
{
"__type__": "cc.Label",
......@@ -12623,7 +12623,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "b4Np2LPEhGMKp9CL1f/3sl"
"_id": "32RbLDdjxC25Di+91sWu8D"
},
{
"__type__": "cc.PrivateNode",
......@@ -12686,7 +12686,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "fe09a8kyxHJoAlFzZl6nhH"
"_id": "701YQaAohIEY63g4KXG9hU"
},
{
"__type__": "cc.Label",
......@@ -12719,7 +12719,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "9d6yTAPA5G9oysCXucaZ1s"
"_id": "68Tl3BtXRJ0p0tHPQrcy+j"
},
{
"__type__": "cc.PrivateNode",
......@@ -12782,7 +12782,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "68hEVNM/ZBs4Ur7NOojjFJ"
"_id": "14eU27aclJpr/9gnP6mFlr"
},
{
"__type__": "cc.Label",
......@@ -12815,7 +12815,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "06v8+CqtxIPJVQjE8VZ/GU"
"_id": "dbNOiytB1GFrnl/GBsyBaG"
},
{
"__type__": "cc.RichText",
......@@ -29588,7 +29588,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 900,
"height": 1007
"height": 937
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -31395,7 +31395,7 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 800,
"height": 110
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -31407,7 +31407,7 @@
"ctor": "Float64Array",
"array": [
0,
-432.19999999999993,
-397.19999999999993,
0,
0,
0,
......@@ -31449,7 +31449,7 @@
"__id__": 681
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 684
......@@ -31505,7 +31505,7 @@
},
{
"__type__": "cc.Node",
"_name": "item",
"_name": "item1",
"_objFlags": 0,
"_parent": {
"__id__": 668
......@@ -31664,7 +31664,7 @@
},
{
"__type__": "cc.Node",
"_name": "item",
"_name": "item2",
"_objFlags": 0,
"_parent": {
"__id__": 668
......@@ -32039,7 +32039,7 @@
},
{
"__type__": "cc.Node",
"_name": "item",
"_name": "item3",
"_objFlags": 0,
"_parent": {
"__id__": 668
......@@ -32268,7 +32268,7 @@
"_layoutSize": {
"__type__": "cc.Size",
"width": 800,
"height": 110
"height": 40
},
"_resize": 1,
"_N$layoutType": 2,
......@@ -32327,7 +32327,7 @@
"ctor": "Float64Array",
"array": [
0,
-508.19999999999993,
-438.19999999999993,
0,
0,
0,
......@@ -32421,7 +32421,7 @@
"ctor": "Float64Array",
"array": [
-353.357,
-548.0999999999999,
-478.0999999999999,
0,
0,
0,
......@@ -32519,7 +32519,7 @@
"ctor": "Float64Array",
"array": [
0,
-786.9999999999999,
-716.9999999999999,
0,
0,
0,
......@@ -34004,7 +34004,7 @@
"_layoutSize": {
"__type__": "cc.Size",
"width": 900,
"height": 1007
"height": 937
},
"_resize": 1,
"_N$layoutType": 2,
......
......@@ -41,7 +41,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initData() {
const middleLayer = cc.find('middleLayer');
if (!middleLayer) {
cc.sys.localStorage.setItem('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiJmYWYxMzkxZi1iYzk4LTQ1ZjUtYmNjOC1mYjIxZmIyYTY3MmMiLCJpYXQiOjE2NTQ2Njk5OTgsImV4cCI6MTY1NzI2MTk5OH0.4UtU-6XFVgPjvSvlwHLZ74WW6Gqk_n7X5zJvtVEyq_c');
cc.sys.localStorage.setItem('token', 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NCwicGhvbmUiOiIxNTUwMDAwMDAwMSIsInNpZ24iOiI3MjhlYzkwZC1kZmIyLTQxMzktOWMyMS0yNGQwZjg4NDYwMmUiLCJpYXQiOjE2NTU3MDY4MjUsImV4cCI6MTY1ODI5ODgyNX0.Rkhjn9MJxXAOoHnjBzjdCcLBtE-87ps5790SIdYQrZE');
}
this.token = cc.sys.localStorage.getItem("token");
}
......
import { asyncDelay, asyncCallNetworkApiGet, getSpriteFrimeByUrl } from "./util";
import { asyncDelay, asyncCallNetworkApiGet, getSpriteFrimeByUrl, playAudioByUrl } from "./util";
const { ccclass, property } = cc._decorator;
const levels = {
......@@ -197,6 +197,14 @@ export default class NewClass extends cc.Component {
sentenceItem.parent = node;
sentenceRow.removeAllChildren();
sentenceItem.parent = sentenceRow;
// 录音
const tips = cc.find("tips_bg", contentNode);
const row = cc.find("row", tips);
row.parent = node;
tips.removeAllChildren();
row.parent = tips;
}
async onShowLearnDetail(evt: cc.Event) {
......@@ -219,11 +227,13 @@ export default class NewClass extends cc.Component {
recordcount,
kn_letters,
kn_words,
kn_sentences
kn_sentences,
OP05,
OP_06_3
} = JSON.parse(res).data;
cc.find("Canvas/reportdetail/view/content/userdetail_scollpage/learnshow/itembg/recordbg/recordcount").getComponent(cc.Label).string = learntimes;
cc.find("Canvas/reportdetail/view/content/userdetail_scollpage/learnshow/itembg/learnbg/learntime").getComponent(cc.Label).string = recordcount;
cc.find("Canvas/reportdetail/view/content/userdetail_scollpage/learnshow/itembg/recordbg/recordcount").getComponent(cc.Label).string = recordcount;
cc.find("Canvas/reportdetail/view/content/userdetail_scollpage/learnshow/itembg/learnbg/learntime").getComponent(cc.Label).string = learntimes;
const resultNode = cc.find("Canvas/reportdetail/view/content/userdetail_scollpage/learnresult/itembg");
......@@ -298,6 +308,25 @@ export default class NewClass extends cc.Component {
cc.find("split_line", resultNode).active = false;
}
if (OP05) {
const rowData = JSON.parse(OP05).result;
const tips = cc.find("tips_bg", resultNode);
const row = cc.find("row", tips);
for (let i = 0; i < rowData.length; i++) {
const {word, score, audio_url} = rowData[i];
const itemClone = cc.instantiate(row);
itemClone.parent = tips;
itemClone.active = true;
cc.find("item1/word", itemClone).getComponent(cc.Label).string = word;
cc.find("item3/goodjob", itemClone).active = (score >= 80);
cc.find("item2/play_icon", itemClone).attr({audio_url});
}
} else {
cc.find(`Canvas/reportdetail/view/content/userdetail_scollpage/learnresult/itembg/tips_bg/row`).active = false;
}
// 设置页面高度
this.scheduleOnce(() => {
const learnresult = cc.find(`Canvas/reportdetail/view/content/userdetail_scollpage/learnresult`);
......@@ -322,7 +351,10 @@ export default class NewClass extends cc.Component {
const animationState = playNode.getComponent(cc.Animation).getAnimationState("play1");
animationState.wrapMode = cc.WrapMode.Loop;
animationState.play();
playAudioByUrl(node.audio_url, () => {
animationState.stop();
playNode.active = false;
})
}
......
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