收藏
回答

安卓不触发某一页面点击事件和分享

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 个回答

  • 是小白啊
    是小白啊
    2019-04-12

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

    2019-04-12
    有用
    回复
  • Helm.V
    Helm.V
    2019-04-12

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


    2019-04-12
    有用
    回复
登录 后发表内容