|
@@ -48,7 +48,7 @@
|
|
|
v-for="(itemP, indexP) in searchWordinfo.pronunciations"
|
|
|
:key="indexP"
|
|
|
>
|
|
|
- <label v-if="itemP.region && itemP.sound">{{
|
|
|
+ <label v-if="itemP.region || itemP.sound">{{
|
|
|
itemP.region == "uk" ? "英" : "美"
|
|
|
}}</label>
|
|
|
<span v-if="itemP.phonetic">{{ itemP.phonetic }}</span>
|
|
@@ -442,32 +442,72 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
if (list[i].symbols && list[i].symbols.length > 0) {
|
|
|
- this.searchWordinfo.pronunciations[0] = {
|
|
|
- region: "uk",
|
|
|
- phonetic: this.searchWordinfo.pronunciations[0].phonetic
|
|
|
- ? this.searchWordinfo.pronunciations[0].phonetic
|
|
|
- : list[i].symbols[0].ph_am
|
|
|
- ? "/" + list[i].symbols[0].ph_am + "/"
|
|
|
- : "",
|
|
|
- sound: this.searchWordinfo.pronunciations[0].sound
|
|
|
- ? this.searchWordinfo.pronunciations[0].sound
|
|
|
- : list[i].symbols[0].ph_am_mp3
|
|
|
- ? list[i].symbols[0].ph_am_mp3
|
|
|
- : "",
|
|
|
- };
|
|
|
- this.searchWordinfo.pronunciations[1] = {
|
|
|
- region: "us",
|
|
|
- phonetic: this.searchWordinfo.pronunciations[1].phonetic
|
|
|
- ? this.searchWordinfo.pronunciations[1].phonetic
|
|
|
- : list[i].symbols[0].ph_en
|
|
|
- ? "/" + list[i].symbols[0].ph_en + "/"
|
|
|
- : "",
|
|
|
- sound: this.searchWordinfo.pronunciations[1].sound
|
|
|
- ? this.searchWordinfo.pronunciations[1].sound
|
|
|
- : list[i].symbols[0].ph_en_mp3
|
|
|
- ? list[i].symbols[0].ph_en_mp3
|
|
|
- : "",
|
|
|
- };
|
|
|
+ if (this.searchWordinfo.pronunciations[0]) {
|
|
|
+ this.searchWordinfo.pronunciations[0] = {
|
|
|
+ region: "uk",
|
|
|
+ phonetic: this.searchWordinfo.pronunciations[0].phonetic
|
|
|
+ ? this.searchWordinfo.pronunciations[0].phonetic
|
|
|
+ : list[i].symbols[0].ph_am
|
|
|
+ ? "/" + list[i].symbols[0].ph_am + "/"
|
|
|
+ : "",
|
|
|
+ sound: this.searchWordinfo.pronunciations[0].sound
|
|
|
+ ? this.searchWordinfo.pronunciations[0].sound
|
|
|
+ : list[i].symbols[0].ph_am_mp3
|
|
|
+ ? list[i].symbols[0].ph_am_mp3
|
|
|
+ : "",
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ this.searchWordinfo.pronunciations.push({
|
|
|
+ region: "uk",
|
|
|
+ phonetic:
|
|
|
+ this.searchWordinfo.pronunciations[0] &&
|
|
|
+ this.searchWordinfo.pronunciations[0].phonetic
|
|
|
+ ? this.searchWordinfo.pronunciations[0].phonetic
|
|
|
+ : list[i].symbols[0].ph_am
|
|
|
+ ? "/" + list[i].symbols[0].ph_am + "/"
|
|
|
+ : "",
|
|
|
+ sound:
|
|
|
+ this.searchWordinfo.pronunciations[0] &&
|
|
|
+ this.searchWordinfo.pronunciations[0].sound
|
|
|
+ ? this.searchWordinfo.pronunciations[0].sound
|
|
|
+ : list[i].symbols[0].ph_am_mp3
|
|
|
+ ? list[i].symbols[0].ph_am_mp3
|
|
|
+ : "",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.searchWordinfo.pronunciations[1]) {
|
|
|
+ this.searchWordinfo.pronunciations[1] = {
|
|
|
+ region: "us",
|
|
|
+ phonetic: this.searchWordinfo.pronunciations[1].phonetic
|
|
|
+ ? this.searchWordinfo.pronunciations[1].phonetic
|
|
|
+ : list[i].symbols[0].ph_en
|
|
|
+ ? "/" + list[i].symbols[0].ph_en + "/"
|
|
|
+ : "",
|
|
|
+ sound: this.searchWordinfo.pronunciations[1].sound
|
|
|
+ ? this.searchWordinfo.pronunciations[1].sound
|
|
|
+ : list[i].symbols[0].ph_en_mp3
|
|
|
+ ? list[i].symbols[0].ph_en_mp3
|
|
|
+ : "",
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ this.searchWordinfo.pronunciations.push({
|
|
|
+ region: "us",
|
|
|
+ phonetic:
|
|
|
+ this.searchWordinfo.pronunciations[1] &&
|
|
|
+ this.searchWordinfo.pronunciations[1].phonetic
|
|
|
+ ? this.searchWordinfo.pronunciations[1].phonetic
|
|
|
+ : list[i].symbols[0].ph_en
|
|
|
+ ? "/" + list[i].symbols[0].ph_en + "/"
|
|
|
+ : "",
|
|
|
+ sound:
|
|
|
+ this.searchWordinfo.pronunciations[1] &&
|
|
|
+ this.searchWordinfo.pronunciations[1].sound
|
|
|
+ ? this.searchWordinfo.pronunciations[1].sound
|
|
|
+ : list[i].symbols[0].ph_en_mp3
|
|
|
+ ? list[i].symbols[0].ph_en_mp3
|
|
|
+ : "",
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|