摘要: 选择框架原因 项目开始的时候,考虑到后续可能有做h5的需求,所以决定选择使用框架来做小程序。 调研发现目前小程序框架主要有 腾讯自家的wepy DCloud公司的uni-app 美团的mpvue 京东的taro wepy: 腾讯团队开源的一款类vue语法规范的小程序框架,借鉴了Vue的语法风格和功能 阅读全文
posted @ 2020-08-18 18:10 ฅ˙-˙ฅ 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 小程序项目中有时候需要根据“手机信息”和“分享胶囊按钮”的信息,来设置页面元素; 比如,自定义导航栏,要根据手机的状态栏和胶囊按钮height、top来设置自定义导航栏; 获取方法如下: 在app.vue中获取存入store中 <script> export default { methods: { 阅读全文
posted @ 2020-08-18 17:26 ฅ˙-˙ฅ 阅读(1473) 评论(0) 推荐(0) 编辑
摘要: 方法一:通过controls实现 使用controls在地图上显示一个btn图标,点击时调用接口回到当前位置: <template> <view> <map id="around-food-map" style="width: 100vw; height: 100vh;" :latitude="la 阅读全文
posted @ 2020-08-18 16:17 ฅ˙-˙ฅ 阅读(2633) 评论(0) 推荐(0) 编辑
摘要: uni-app使用map组件定位到当前位置并进行标注 manifest.json添加如下内容: 需要定位的页面 <template> <view> <map style="width: 100vw; height: 100vh;" :latitude="latitude" :longitude="l 阅读全文
posted @ 2020-08-18 15:54 ฅ˙-˙ฅ 阅读(4036) 评论(0) 推荐(1) 编辑