|
|
@ -18,7 +18,8 @@ |
|
|
|
<view class="btn"> |
|
|
|
<image src="/static/image/tourGuide/a.png" |
|
|
|
mode=""></image> |
|
|
|
<text class=""> |
|
|
|
<text class="" |
|
|
|
@click="textToSpeech"> |
|
|
|
语音讲解 |
|
|
|
</text> |
|
|
|
</view> |
|
|
@ -60,10 +61,14 @@ |
|
|
|
|
|
|
|
<view class="controls"> |
|
|
|
<view class="f"> |
|
|
|
<image src="/static/image/tourGuide/f.png" mode=""></image> |
|
|
|
<image |
|
|
|
|
|
|
|
src="/static/image/tourGuide/f.png" mode=""></image> |
|
|
|
</view> |
|
|
|
<view class="f"> |
|
|
|
<image src="/static/image/tourGuide/a.png" mode=""></image> |
|
|
|
<image |
|
|
|
@click="textToSpeech" |
|
|
|
src="/static/image/tourGuide/a.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -73,14 +78,40 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
// var plugin = requirePlugin("WechatSI") |
|
|
|
|
|
|
|
// "plugins" : { |
|
|
|
// "WechatSI" : { |
|
|
|
// "version" : "0.3.1", |
|
|
|
// "provider" : "wx069ba97219f66d99" |
|
|
|
// } |
|
|
|
// } |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
show : true, |
|
|
|
context : uni.createInnerAudioContext(), |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
textToSpeech(){ |
|
|
|
console.log('textToSpeech'); |
|
|
|
|
|
|
|
let self = this |
|
|
|
|
|
|
|
plugin.textToSpeech({ |
|
|
|
lang: "zh_CN", |
|
|
|
tts: true, |
|
|
|
content: "景德镇市陶阳里御窑景区位于景德镇的城市中心地带,北起瓷都大桥、昌江大道,南至昌江大桥、西至沿江西路,东至莲社路、胜利路。 自宋以来,景德镇先民“沿河建窑,因窑成市”,渐呈“码头—民窑—老街—里弄—御窑”聚落的历史空间和瓷业肌理,形成了世界建筑史上绝无仅有的老城格局,成就了中国“东方瓷国”的盛誉,陶瓷成为了中国走向世界,世界认识中国的文化符号。这里是景德镇历史上制瓷业的中心、原点和高峰,是“一带一路”海上陶瓷之路的零公里起点,是研究皇家御窑制瓷历史文化和景德镇陶瓷技艺,讲好景德镇故事,传播中国声音的“窗口”和“名片”。", |
|
|
|
success: function(res) { |
|
|
|
self.context.src = res.filename; |
|
|
|
self.context.play() |
|
|
|
}, |
|
|
|
fail: function(res) { |
|
|
|
console.log("fail tts", res) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|