小程序开发遇到的问题汇总


1.

MiniProgramError
U.createEvent is not a function
TypeError: U.createEvent is not a function

 

 遇到的场景是我想调wx.openLocation  调用的参数latitude,longitude,是由云数据库获取的  上图是真机debug报错提示 没找到原因

后通过开发工具调试发现出现新的报错 如下

{errMsg: "openLocation:fail parameter error: parameter.longitude should be Number instead of String;"}

原来要用number类型 用parseFloat将latitude,longitude改为number类型后恢复正常

 

 

2.

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM