html页面
<loading hidden="{{loadingHide}}">
{{loadingText}}
</loading>
<view class="banner">
<image src="/image/lx.jpg" mode="aspectFill"></image>
</view>
<view class="IndexList">
<view>
<image src="/image/tel.png" class="telIco" mode="widthFix"></image>
<text bindtap="teltoUs">电话:122345566778(点击拨号)</text>
</view>
<view>
<image src="/image/weixin.png" class="weixinIco" mode="widthFix"></image>
<text>微信:泉州大白网络科技</text>
</view>
<view>
<image src="/image/email.png" class="eIco" mode="widthFix"></image>
<text>邮件:laosan974859@163.com</text>
</view>
<view>
<image src="/image/map.png" class="mapIco" mode="widthFix"></image>
<text bindtap="click">内蒙古呼和浩特</text>
</view>
</view>
<view class="goods-box">
<button class="goods-operation" open-type="contact">在线客服</button>
</view>
<view class="footer">
@2017泉州大白网络科技版权所有
</view>
css页面
.banner image{
width: 100%;
height: 400rpx;
}
.IndexList{
width: 100%;
display: block;
margin-top: 40rpx;
}
.IndexList view{
border-bottom: 1px solid #f5f5f5;
width: 84%;
display: block;
margin: 0 8%;
color: #333;
height: 100rpx;
line-height: 100rpx;
}
.IndexList image.telIco{
width: 3%;
height: 30rpx;
margin-right: 15rpx;
}
.IndexList image.weixinIco{
width: 4%;
height: 30rpx;
margin-right: 15rpx;
}
.IndexList image.eIco{
width: 4%;
height: 30rpx;
margin-right: 15rpx;
}
.IndexList image.mapIco{
width: 3%;
height: 30rpx;
margin-right: 15rpx;
}
.goods-box .goods-operation{
position: relative;
width: 92%;
height: 100rpx;
padding: 0 50rpx;
margin: 0 auto 60rpx;
box-sizing: border-box;
border-radius: 10rpx;
background: #1aad19;
line-height: 100rpx;
color: #fff;
font-size: 28rpx;
}
.footer{
line-height: 34px;
text-align: center;
color: #8c8c8c;
}
js代码
data: {
loadingHide:true,
loadingText:"加载中"
},
teltoUs:function(){
wx.makePhoneCall({
phoneNumber: '12334556677788',
})
},
click:function(){
wx.openLocation({
latitude: 40.281150,
longitude: 111.197160,
scale:18,
name:"传媒工作室",
address:"内蒙古呼和浩特市"
})
},
onLoad: function (options) {
var that=this;
that.setData({loadingHide:false});
setTimeout(function(){
that.setData({loadingHide:true});
},1000)
},
效果展示
页面
点击电话后
点击位置后