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

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.

原文地址:https://www.cnblogs.com/hbhb/p/14889065.html