1.uni-app进行条件编译的两种方法?小程序端和H5的代表值是什么?
通过#ifdef、#idndef 的方式
H5:H5
MP-WEIXIN: 微信小程序
2.uni-app的配置文件,入口文件,主组件,页面管理部分
page.json 配置文件
main.js 入口文件
App.vue 主组件
pages 页面管理部分
3.uni-app上传文件时用到的API是什么?格式是什么
uni.uploadFile({
url:'要上传的地址',
fileType:'image',
filePath:'图片路径',
name:'文件对应的Key',
success:function(res){
console.log(res)
},
})
4.uni-app获取地理位置的API是什么?
//获取当前定位
getLocation(){
//方式一通过uni-app获取经纬度
query.getLocation().then(res=>{
console.log(res)
// console.log('当前位置的经度:' + res.lon