很奇怪console.log有数据,微信小程序也是正常工作的,但是抖音的无效
134 浏览2023年11月28日作者:kmchannel

uniaap编译的小程序,抖音工具版本如下:

Version: 4.1.6
OS: win32
DeviceId: 9b0ebab5-0654-41f5-b0fe-e9e43c58d1cf
BuildId: 11229430
Electron: 25.9.1
Chrome: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0

首先在得到后端数据以后:

if (res.data.status == 'success') {
	this.$emit('refreshLoginStatus') 
}

刷新父组件:

refreshLoginStatus() {
				this.isLogin = true // 这句话必须要,子组件弹出登录后,刷新父组件isLogin的状态
				this.avatar = this.cos + uni.getStorageSync('access_member_info').user_base.avatar
				this.nickName = uni.getStorageSync('access_member_info').user_base.name
				this.userPhone = uni.getStorageSync('access_member_info').user_base.phone
				this.userId = uni.getStorageSync('access_member_info').user_base.id
				this.getMyImages('收藏')
				this.getMyinfo()
				this.getMyCash()
				console.log('token', uni.getStorageSync('access_member_info').access_token)
				console.log('this.userId', this.userId)
				console.log('this.userPhone', this.userPhone)
				console.log('this.nickName', this.nickName)
			},

console.log都是有结果的,数据也双向绑定了,微信小程序是正常的,但是抖音小程序只有console.log输出,其他的都无效,这是为什么

最后一次编辑于 2023 年 11 月 28 日
3 条评论

相关问答

专题推荐

热门文章

热门问答