十種語言這一部分不行
<template>
?<view class="content">
??<image src="../../static/g1.gif" mode="widthFix"></image>
??<text class="title">臭豬,我想撩你</text>
??<view class="operate">
???<button type="primary" class="btn" @tap="agree">可以</button>
???<button type="warn" class="btn" @tap="disagree">不可以</button>
?</view>
?<view class="message" v-for="one in love" :key="one">{{one}}</view>
?</view>
</template><script>
?export default {
??data() {
???return {
????love:[]
???}?
??},??
??onLoad() {
??},
??onShow() {
???let msg={
????2000: "I like you(英語)",
????4000: "харесвам те.(保加利亞語)",
????6000: " ? ? ???.(韓語)",
????8000: "EU gosto de você.(葡萄牙語)",
????10000: "sa meeldid mulle.(愛沙尼亞語",
????12000: " ich mag dich.(德語)",
????14000: " ik vind je leuk.(荷蘭語)",
????16000: "さんが好きです(日語)",
????18000: "юань я люблю тебя(俄語)",
????20000: "μου αρ?σει?(希臘語)"
???}
???let ref=this;
???for(let Key in msg){
????setTimeout(function(){
?????ref.love.push(mag[Key])?
????},key)
?????
???}
??},
??methods: {
???agree:function(){
????uni.showToast({
?????icon:"none",
?????title:"臭豬,叫聲好聽的來聽聽",
?????duration:4000
????})
???},
???disagree:function(){
????uni.showModal({
?????title:"臭豬,再給你一次機會",
?????content:"拒絕我可能會出現不好的情況",
?????cancelText:"不愿意",
?????confirmText:"愿意",
?????success:function(res){
??????if(res.confirm){
???????uni.showToast({
????????icon:"none",
????????title:"我就知道你不敢不同意",
????????duration:4000
???????})
??????}
??????else{
???????uni.showToast({
????????icon:"none",
????????title:"你失去本寶寶",
????????duration:4000
????????
???????})
??????}
?????}
????})
???}
??}?
?}???
</script><style>
?@import url("index.less");
</style>