首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >小程序Cannot read property 'arv' of undefined错误 ?

小程序Cannot read property 'arv' of undefined错误 ?

提问于 2018-03-20 00:34:48
回答 2关注 0查看 567

locationBtnClick: function () {

         var pagess=this;

        if (this.data.longitudeValue.length == 0 || this.data.latitudeValue.length == 0) {

            this.setData({

                longitudeTx: '没值',

                latitudeTx: '没值'

            })

        }

        else {

            this.setData({

                longitudeTx: this.data.longitudeValue,

                latitudeTx: this.data.latitudeValue,

                scales: 16

            })

                wx.request({

        url: '.......', data: { },

        header: { 'Content-Type': 'application/json' },

        success: function(ops) {

          console.log(ops.data)

    pagess.setData({

        arv: ops.data

    })

console.log(this.data.arv)

wx.showModal({

title: '提示',

content: this.data.arv,

success: function(res) {

  if (res.confirm) {

   console.log('用户点击确定')

  }

}

})

        }

    })

            console.log("点击了按钮"+this.data.latitudeValue)

        }

    },

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档