JavaShuo
欄目
標籤
thirdScriptError Cannot read property setData of undefined at api request success
時間 2021-01-12
標籤
小程序
简体版
原文
原文鏈接
在微信小程序裏面用this.setData({})設置data中的變量出現的問題,我出現問題的是一個request的請求,要把請求到的數據放到data中,這裏看起來很正常,語法也沒有錯誤,但是注意這裏用的並不是箭頭函數,所以函數內部的this指向的並不是函數外部環境的this,而是函數自身,所以沒有辦法將想要的數據存到data中而報錯 正確的做法: 在request函數外面手動將一個變量設置爲
>>阅读原文<<
相關文章
1.
thirdScriptError Cannot read property '12' of undefined;at pages/me/me onReady function;at api reque
2.
微信小程序 網絡請求報錯 Cannot read property 'setData' of undefined;at api request success callback function
3.
appServiceSDKScriptError:Cannot read property 'mode' of undefined;at api onAppEnterBackground callba
4.
TypeError: Cannot read property '$router' of undefined at eval
5.
TypeError: Cannot read property '$$' of undefined at HTMLElement._attached.wx.getPlatform._touchstar
6.
TypeError: Cannot read property 'indexOf' of undefined at VueComponent.resetField
7.
Cannot read property 'field' of undefined (at _8 (jquery.numberbox.js:33))
8.
Cannot read property 'globalData' of undefined;at App onLaunch function
9.
Cannot read property '$el' of undefined at VueComponent
10.
Cannot read property 'thisCompilation' of undefined
更多相關文章...
•
ASP Request 對象
-
ASP 教程
•
ASP Read 方法
-
ASP 教程
•
☆基於Java Instrument的Agent實現
•
Java 8 Stream 教程
相關標籤/搜索
setdata
success
thirdscripterror
property
undefined
read
read%
request
c#property
core'&&cannot
Spring教程
MySQL教程
Hibernate教程
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
ubantu 增加搜狗輸入法
2.
用實例講DynamicResource與StaticResource的區別
3.
firewall防火牆
4.
頁面開發之res://ieframe.dll/http_404.htm#問題處理
5.
[實踐通才]-Unity性能優化之Drawcalls入門
6.
中文文本錯誤糾正
7.
小A大B聊MFC:神奇的靜態文本控件--初識DC
8.
手扎20190521——bolg示例
9.
mud怎麼存東西到包_將MUD升級到Unity 5
10.
GMTC分享——當插件化遇到 Android P
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
1.
thirdScriptError Cannot read property '12' of undefined;at pages/me/me onReady function;at api reque
2.
微信小程序 網絡請求報錯 Cannot read property 'setData' of undefined;at api request success callback function
3.
appServiceSDKScriptError:Cannot read property 'mode' of undefined;at api onAppEnterBackground callba
4.
TypeError: Cannot read property '$router' of undefined at eval
5.
TypeError: Cannot read property '$$' of undefined at HTMLElement._attached.wx.getPlatform._touchstar
6.
TypeError: Cannot read property 'indexOf' of undefined at VueComponent.resetField
7.
Cannot read property 'field' of undefined (at _8 (jquery.numberbox.js:33))
8.
Cannot read property 'globalData' of undefined;at App onLaunch function
9.
Cannot read property '$el' of undefined at VueComponent
10.
Cannot read property 'thisCompilation' of undefined
>>更多相關文章<<