首页修改

parent f679ea6a
......@@ -9,11 +9,11 @@
<text class="three-text">销量{{ item.monthSoldNum }}</text>
<text class="four-text">1.2km</text>
</view>
<view class="threeBox">
<image class="img2" :src="item.evaluationVos[0]?.avatar" mode="aspectFill" />
<text class="one-text">{{ item.evaluationVos[0]?.evaluation }}</text>
<view class="threeBox" v-if="item.evaluationVos.length === 0">
<image class="img2" :src="item.evaluationVos[0].avatar" mode="aspectFill" />
<text class="one-text">{{ item.evaluationVos[0].evaluation }}</text>
</view>
<view class="labelBox">
<view class="labelBox" v-if="item.labels">
<view v-for="(item, index) in item.labels" :key="index">{{ item }}</view>
</view>
<view class="groupPurchasePrice" v-for="(item, index) in item.simpleProds" :key="index">
......@@ -171,6 +171,9 @@ const toShop = (id) => {
margin-left: 4rpx;
font-size: 22rpx;
color: #3d3d3d;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
......
......@@ -61,7 +61,7 @@
@change="onChange"
customClass="guiyang"
height="68"
imageMode="scaleToFill"
imageMode="aspectFill"
></wd-swiper>
<!-- 附近人气美食 -->
<view class="nearby">
......@@ -632,13 +632,13 @@ page {
}
.nearby {
width: 710rpx;
height: 380rpx;
max-height: 380rpx;
border-radius: 16rpx;
background: #ffffff;
margin: 0 auto;
box-sizing: border-box;
overflow: hidden;
padding-top: 20rpx;
padding: 20rpx 0;
.nearby-top {
display: flex;
justify-content: space-between;
......
......@@ -16,3 +16,20 @@ export function timeConversion(diffInMilliseconds) {
return `${days}${hours}小时${minutes}分钟`;
}
}
export function getLocation() {
return new Promise((resolve, reject) => {
xma.getLocation({
type: 'wgs84',
isHighAccuracy: true,
success: function (res) {
// 经纬度
console.log('res.latitude, res.longitude', res.latitude, res.longitude);
resolve({ lat: res.latitude, lon: res.longitude });
},
fail: function (err) {
return err;
},
});
});
}
Markdown is supported
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