十种语言这一部分不行
<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>