Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'coordinateSystem')
时间: 2023-09-25 07:15:07 浏览: 156
在你提供的代码中,出现了一个错误:“Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'coordinateSystem')”。这个错误通常发生在你试图读取一个未定义的属性时。根据你提供的代码,这个错误可能是由于在commit之前调用resolve导致的。解决这个问题的方法是将resolve放在commit之后。这样可以确保在resolve之前没有尝试读取未定义的属性,从而避免出现这个错误。修正后的代码应该是这样的:
const queGetdata = (params, context) => {
return new Promise((resolve, reject) => {
appVue.$http.post(appVue.$apis.getdata, { gcode: 'QUERY_CUSTBILL' }, { isAutoLoading: false })
.then(resp => {
let data = resp.responseBody.paramdata;
context.commit("setCustbill", JSON.parse(JSON.stringify(data<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Uncaught (in promise)和Uncaught (in promise) TypeError: Cannot read properties of undefined (readin](https://blog.csdn.net/weixin_40476233/article/details/126107676)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [ASP.NET MVC运行出现Uncaught TypeError: Cannot set property __MVC_FormValidation of null的解决方法](https://download.csdn.net/download/weixin_38731761/13069683)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文