uniapp中data的数据如何实时变化?

 JS
return {
                latitude: "123",
                longitude: "123",
}



sd() {
                wx.getFuzzyLocation({
                    type: 'wgs84',
                    success(res) {
                        
                        let temporarySetTimeout = setTimeout(() => {
                                    this.latitude = res.latitude
                                    this.longitude = res.longitude
                                    console.log(this.latitude)
                                    console.log(this.longitude)
                                }, 1000)
                
                    },
                    fail(err) {
                        wx.showToast({
                            title:"获取定位失败,请先打开手机定位",
                            icon:"none",
                            duration:2000,
                        })
                     
                    }
                })
            },



html
        <view class="" @click="sd">
            {{latitude}}
            {{longitude}}    {{longitude}}
        </view>

控制台有输出的说明修改成功

img


但是实际点击后

img


生命周期的问题也考虑过,也不是?

问题已解决,是this指向问题 小错误不应该, 使用that即可