安卓不触发某一页面点击事件和分享
发布于 6 年前 作者 juanwei 11481 次浏览 来自 问答

js:

//退出按钮事件

  exitRoom: function () {

    console.log(‘点击图片’)

    this.gamerExitRoom()

    wx.navigateBack({

      delta: 1

    })

  },

 

//用户分享

onShareAppMessage: function(res) {

let that = this

    console.log(that.data.roomId)

return {

title: ‘快来和我PK!’,

path: ‘/pages/auth/auth?roomId=’ + that.data.roomId,

imageUrl: imagePath + ‘doubleShare.png’

}

},

<view class=‘buttonContainer’>

<button wx:if="{{isOwner&&!isReady}}" open-type=‘share’ plain=‘true’>

<image src=’{{isReady?readyBtnUrl:inviteBtnUrl}}’ mode=‘widthFix’ mode=‘widthFix’ style=‘width:100%;’></image>

</button>

<button wx:if="{{isOwner&&isReady}}" plain=‘true’ bindtap=‘startGame’>

<image src=’{{isReady?readyBtnUrl:inviteBtnUrl}}’ mode=‘widthFix’ mode=‘widthFix’ style=‘width:100%;’></image>

</button>

<image src=’{{exitBtnUrl}}’ bindtap=‘exitRoom’ mode=‘widthFix’ style=‘width:100%;margin-top:10%;’></image>

</view>

.buttonContainer {

width: 80%;

height: 30%;

display: flex;

flex-flow:  column nowrap;

justify-content:  flex-start;

align-items: center;

}

.buttonContainer button{

width: 100%;

height: auto;

padding: 0;

border: none;

  font-size: 0;

}

IOS都可以触发 安卓在预览可触发 体验版和真机调试无法触发分享和点击

2 回复

麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

有没有大佬帮帮忙啊 一天了还没解决 想zs

回到顶部