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.
1.2 Illustrator多文檔的幾種排列方式
2.
5.16--java數據類型轉換及雜記
3.
性能指標
4.
(1.2)工廠模式之工廠方法模式
5.
Java記錄 -42- Java Collection
6.
Java記錄 -42- Java Collection
7.
github使用
8.
Android學習筆記(五十):聲明、請求和檢查許可
9.
20180626
10.
服務擴容可能引入的負面問題及解決方法
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<