动漫设计工作室网站制作公司,w网站建设需求说明,网站策划表,wordpress网站布置视频教程一、启动问题记录
1. 报错1 解决办法: 开启微信开发者工具服务端口
2. 报错2:调用getLocation获取位置信息时报错以下内容
{errMsg: “getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json”} 解决办法: manifest.json文…一、启动问题记录
1. 报错1 解决办法: 开启微信开发者工具服务端口
2. 报错2:调用getLocation获取位置信息时报错以下内容
{errMsg: “getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json”} 解决办法: manifest.json文件配置以下内容
mp-weixin:{permission: {scope.userLocation: {desc: 你的位置信息将用于小程序接口效果展示}},requiredPrivateInfos: [getLocation]
}二、问题记录
1. uniapp引入utlis里面统一方法,script中可以正常使用,但是在template报错方法undefined
解决办法: 在script中引入utils文件并将需要使用的方法暴露出来。例如
import { method1, method2 } from /utils/utils.js;
export default {methods: {method1,method2,},
};在template中使用方法时使用this来调用方法。例如
templatedivbutton clickmethod1调用方法1/buttonbutton clickmethod2调用方法2/button/div
/template三、兼容性问题记录
1. overflow:hidden在ios不生效
解决办法: 在父级元素加上position:relative 或 position: fixed;