Commit 7423f638 authored by usgeek's avatar usgeek
Browse files

个人模块功能完善:about页面添加,简单的腾讯地图调用以及拨打电话功能

parent 6b3a05dc
......@@ -31,7 +31,8 @@
"pages/shopping/checkout/checkout",
"pages/shopping/address/address",
"pages/shopping/addressAdd/addressAdd",
"pages/goods/goods"
"pages/goods/goods",
"pages/about/index"
],
"window": {
"backgroundTextStyle": "dark",
......
// index.js
var app = getApp()
var util = require("../../utils/util.js");
var api = require("../../config/api.js");
Page({
/**
* 页面的初始数据
*/
data: {
load_statue: true,
shopInfo: {
name: 'litemall',
address: 'https://github.com/linlinjava/litemall',
latitude: 22.60,
longitude: 116.87,
linkPhone: '0755-xxxx-xxxx',
qqNumber: '738696120'
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
showLocation: function (e) {
var that = this
wx.openLocation({
latitude: that.data.shopInfo.latitude,
longitude: that.data.shopInfo.longitude,
name: that.data.shopInfo.name,
address: that.data.shopInfo.address,
})
},
callPhone: function (e) {
var that = this
wx.makePhoneCall({
phoneNumber: that.data.shopInfo.linkPhone,
})
},
reLoad: function (e) {
this.loadShopInfo();
}
})
\ No newline at end of file
{}
\ No newline at end of file
<view class="container">
<view class="about-item">
<view class="item-left">
<label>项目名称: </label>
<text>{{shopInfo.name}}</text>
</view>
</view>
<view class="about-item">
<view class="item-left">
<label>项目地址: </label>
<text>{{shopInfo.address}}</text>
</view>
<view class="item-right" bindtap="showLocation">
<image src="/static/images/ico-addr.png" class="right-icon"></image>
</view>
</view>
<view class="about-item">
<view class="item-left">
<label>电话号码: </label>
<text>{{shopInfo.linkPhone}}</text>
</view>
<view class="item-right" bindtap="callPhone">
<image src="/static/images/telephone.png" class="right-icon"></image>
</view>
</view>
<view class="about-item">
<view class="item-left">
<label>litemall交流群: </label>
<text>{{shopInfo.qqNumber}}</text>
</view>
<view class="item-right">
<image src="/static/images/mobile.png" class="right-icon"></image>
</view>
</view>
</view>
\ No newline at end of file
/* index.wxss */
page{
height: 100%;
background-color: #F2f2f2;
}
.page-view{
height: 100%;
}
.banner-image{
width: 100%;
height: 350rpx;
background: #ee1;
margin-bottom: 30rpx;
border-bottom: solid #f2f2f2 0.5dp;
}
.about-item{
background: white;
border-top: solid #f2f2f2 0.5rpx;
border-bottom: solid #f2f2f2 0.5rpx;
width: 100%;
height: 100rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.item-left{
font-size: 32rpx;
margin-left: 15rpx;
margin-top: auto;
margin-bottom: auto;
}
.item-right{
margin-right: 15rpx;
margin-top: auto;
margin-bottom: auto;
}
.right-icon{
width: 40rpx;
height: 40rpx;
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment