uni.$on () 里面的值要用箭头函数

251 阅读1分钟
	uni.$on('updataPeoInfo', function(obj) {
			console.log('监听到事件来自完善个人信息');
			console.log(obj);
			// this.perfectPersonal  = obj13929782427
			this.perfectPhone = obj.phone ;
			this.perfectYear = obj.yearNum ;
			this.perfectNickName = obj.userName; 
			this.perfectJobId= obj.professionNum;
			this.perfectArea = obj.addHengGan;
			
			console.log(self.perfectPhone)
			// this.$forceUpdate()
		});
uni.$on('updataPeoInfo', (obj) => {
			console.log('监听到事件来自完善个人信息');
			console.log(obj);
			// this.perfectPersonal  = obj13929782427
			this.perfectPhone = obj.phone ;
			this.perfectYear = obj.yearNum ;
			this.perfectNickName = obj.userName; 
			this.perfectJobId= obj.professionNum;
			this.perfectArea = obj.addHengGan;
			
			console.log(self.perfectPhone)
			// this.$forceUpdate()
		});