收藏
回答

showModel点击确定弹窗不消失怎么办?

现状:wx.showModel点击不了确定 弹窗消失不了

  observers: {
    'show'function (show{
      if (show) {
        wordList.filter(e => {
          if (this.data.content == e.content) {
            this.setData({
              pron: e.pron,
              definition: e.definition
            })
            myaudio= wx.createInnerAudioContext({
              useWebAudioImplementtrue
            });
            myaudio.src = 'https://dict.youdao.com/dictvoice?audio='+e.content+'&type=2'
            console.log("read")
            myaudio.play();
          }else{
                      this.setData({
                        showfalse
            })
            wx.showModal({
              title'提示',
              content'对不起,查询不到该词信息',
              showCancelfalse,
              successfunction (res{
                if (res.confirm) {
                  console.log('用户点击确定')
                }
              }
            })
          }
          
        })
        
      }
      
    },
  },
最后一次编辑于  2022-03-04
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容