0000
This commit is contained in:
21
pages/goodsDetails/shopAdd/shopAdd.js
Normal file
21
pages/goodsDetails/shopAdd/shopAdd.js
Normal file
@@ -0,0 +1,21 @@
|
||||
Component({
|
||||
properties: {
|
||||
merchantList: Array
|
||||
},
|
||||
data: {},
|
||||
methods: {
|
||||
call: function(t) {
|
||||
var e = t.currentTarget.dataset.tel;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: e
|
||||
});
|
||||
},
|
||||
toMap: function(t) {
|
||||
var e = t.currentTarget.dataset, a = e.latitude, n = e.longitude;
|
||||
wx.openLocation({
|
||||
latitude: a,
|
||||
longitude: n
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
4
pages/goodsDetails/shopAdd/shopAdd.json
Normal file
4
pages/goodsDetails/shopAdd/shopAdd.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
24
pages/goodsDetails/shopAdd/shopAdd.wxml
Normal file
24
pages/goodsDetails/shopAdd/shopAdd.wxml
Normal file
@@ -0,0 +1,24 @@
|
||||
<view>
|
||||
<view :key="index" class="info-wrap" id="info-shop" wx:for="{{merchantList}}">
|
||||
<view class="info-shopinfo">
|
||||
<view>
|
||||
<view class="business-box">
|
||||
<view class="business-info">
|
||||
<view class="title" href="#/info/shop?id=41">{{item.name}}</view>
|
||||
<view class="business-info-time-range">营业时间:{{item.customerservice}}</view>
|
||||
<view class="shopinfo-item">
|
||||
<view>商家电话:{{item.tel}}</view>
|
||||
<view bindtap="call" class="btn" data-tel="{{item.tel}}" mycolor="">
|
||||
<image class="phone" src="/img/phone.png"></image>拨打</view>
|
||||
</view>
|
||||
<view class="shopinfo-item">
|
||||
<view class="shop-address">{{item.address}}</view>
|
||||
<view bindtap="toMap" class="btn" data-latitude="{{item.lat*1}}" data-longitude="{{item.lng*1}}" mycolor="">
|
||||
<image class="location" src="/img/location.png"></image>导航</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
73
pages/goodsDetails/shopAdd/shopAdd.wxss
Normal file
73
pages/goodsDetails/shopAdd/shopAdd.wxss
Normal file
@@ -0,0 +1,73 @@
|
||||
.info-wrap {
|
||||
border-top: 2.667vw solid #f8f8f8;
|
||||
padding: 0 4vw 5.333vw;
|
||||
}
|
||||
|
||||
.business-info {
|
||||
font-size: 4.267vw;
|
||||
}
|
||||
|
||||
.business-info .title {
|
||||
color: #2a2a2a;
|
||||
display: inline-block;
|
||||
font-size: 4.8vw;
|
||||
font-weight: 500;
|
||||
padding: 4.267vw 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item,.business-info-time-range {
|
||||
color: #787878;
|
||||
font-size: 3.733vw;
|
||||
margin-top: 2.133vw;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item {
|
||||
-ms-flex-line-pack: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-content: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item .btn {
|
||||
-ms-flex-negative: 0;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border: 1px solid #eb5252;
|
||||
border-radius: 2.667vw;
|
||||
color: #eb5252;
|
||||
display: inline-flex;
|
||||
flex-shrink: 0;
|
||||
font-size: 3.2vw;
|
||||
height: 5.333vw;
|
||||
justify-content: center;
|
||||
line-height: 5.333vw;
|
||||
text-align: center;
|
||||
width: 13.6vw;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item .shop-address {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 68.133vw;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.location,.phone {
|
||||
height: 24rpx;
|
||||
margin-right: 6rpx;
|
||||
width: 24rpx;
|
||||
}
|
||||
|
||||
.location {
|
||||
height: 26rpx;
|
||||
width: 26rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user