app.vue中獲取手機系統 platform
getSystemInfo() {
wx.getSystemInfo({
success: e => {
console.log(e.platform)
globalData.commit('setPlatform', e.platform)
}
})
},
複製程式碼
使用wx.showActionSheet時,如果是 android
,在itemList後push 取消
按鍵:
if (this.$store.state.platform === 'android') {
itemList.push('取消')
}
複製程式碼