Browse Source

街巷美食地图导航

master
chenkainan 3 years ago
parent
commit
c325bc7abc
  1. 2
      app.js
  2. 8
      pages/info/foodInfo/index.js
  3. 5
      pages/info/foodInfo/index.wxml
  4. 5
      pages/info/foodInfo/index.wxss

2
app.js

@ -22,7 +22,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest45?true:false;
data.isTest = data.isTest46?true:false;
this.globalData.configJson = data
})

8
pages/info/foodInfo/index.js

@ -53,7 +53,13 @@ Page({
}
},500)
},
gotolocation: function () {
let info = this.data.info;
wx.openLocation({
latitude: Number(info.lat),
longitude: Number(info.lon)
})
},
/**
* 生命周期函数--监听页面显示
*/

5
pages/info/foodInfo/index.wxml

@ -10,7 +10,10 @@
</swiper>
<view class="top-box" wx:if="{{info}}">
<view class="title">{{info.title}}</view>
<view class="info-address">{{info.address}}</view>
<view class="info-address" bindtap="gotolocation">
{{info.address}}
<view class="iconfont icon-daohang">
</view></view>
</view>
<view class="content">
<rich-text nodes="{{tool.formateRichText(info.content)}}"></rich-text>

5
pages/info/foodInfo/index.wxss

@ -26,6 +26,11 @@ page {
color: #666;
font-size: 27rpx;
margin-top: 20rpx;
display: flex;
justify-content: space-between;
}
.info-address .iconfont{
color: #0B898E;
}
.content {
font-size: 30rpx;

Loading…
Cancel
Save