- wx.createInnerAudioContext(Object objec法解析合成的音频文件?
这个垃圾组件无法播放微软tts合成的语音文件换作老版本的audio组件可以正常播放。 wx.createInnerAudioContext(Object objec)这个组件在电脑上测试是没问题的。但是在安卓手机上就不发声,真机调试的时候爆出两个错误 其中一个是 errCode:62, err:load or init native decode so fail
2022-01-27 - 自定义tabbar样式乱跳怎么办?
自定义tabbar后如何判断点击的是哪个菜单,并将tabbar的样式做相应改变 现在遇到的问题是在js中定义的变量,才点击菜单后会刷新页面,这个值就会清空,导致在wxml页面的判断语句出错。具体代买如下 wxml页面 <cover-view class="tab-bar"> <cover-view class="tab-bar-border"></cover-view> <cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab"> <cover-view style="font-size:30px;color: {{selected === index ? selectedColor : color}}">{{index}}{{selected}}</cover-view> </cover-view> </cover-view> ijs代码如下 Component({ data: { selected: 0, color: "#7A7E83", selectedColor: "#3cc51f", list: [{ pagePath: "/index/index", text: "组件" }, { pagePath: "/index/index1", text: "组件" },{ pagePath: "/index/index2", text: "接口" }] }, attached() { }, methods: { switchTab(e) { const data = e.currentTarget.dataset const url = data.path wx.switchTab({url}) this.setData({ selected: data.index }) console.log(data.index) console.log(this.data.selected) } } })
2021-08-25