Authored by yyq

Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop

... ... @@ -34,6 +34,7 @@ export default {
data: function() {
return {
yasFirstId: 0,
itemHeight: 0
};
},
methods: {
... ... @@ -59,14 +60,23 @@ export default {
});
},
yasShowEvent: function(height) {
if (!this.itemHeight) {
let item = document.querySelector('.product-list-item');
this.itemHeight = item && item.offsetHeight || 0;
}
if (!this.itemHeight) {
return;
}
// 获取列表单个元素高度
let index = 0;
if (Number(height) > 0) {
// 获取第一个曝光元素
let item = document.querySelector('.product-list-item');
let itemHeight = item.offsetHeight;
let row = parseInt((height - 12) / itemHeight) + 1;
let row = parseInt((height - 12) / this.itemHeight) + 1;
index = row * 2 - 2;
}
... ...
... ... @@ -11,7 +11,7 @@
:class="filterParams.brand.includes(item.itemId) && 'item-img-selected'"
v-for="(item,i) in filter.itemList" :style="i===0 && 'margin-left:1rem'"
@click="select({filterId:filter.filterId, itemId:item.itemId, row})">
<ImgSize class="item-img" :src="item.itemUrl" :width="140" :height="70"/>
<img class="item-img" :src="(item.itemUrl || '').replace('http://', '//').replace('{width}', 140).replace('{height}', 70)" />
<div class="item-img-text">{{item.itemName}}</div>
</div>
<div class="item-text item-size" v-if="filter.filterId === 'size'" :style="i===0 && 'margin-left:1rem'"
... ...
... ... @@ -219,6 +219,10 @@ export default {
size: filterParams.size.join(','), // 尺码id
};
for (let i in params) {
!params[i] && delete params[i];
}
this.selectedType = flag;
if (flag === 1) {
this.setYasParam({tab: {index: 2, name: '价格'}});
... ...
... ... @@ -2,7 +2,7 @@
<LayoutApp :show-back="true" title="确认订单" :back-action="backAction">
<div class="body">
<AddressInfo :data="address" class="order-item" :show-tip="false"></AddressInfo>
<ProductInfo :data="productDetail" class="product-info order-item"></ProductInfo>
<ProductInfo :data="productDetail" class="order-item"></ProductInfo>
<Coupon class="order-item" v-if="couponList.length > 0" :data="orderDetail.recommendedCouponInfo"
@click="onCouponClick"></Coupon>
<Promotion class="order-item" v-if="promotionList.length > 0" :data="orderDetail.promotionTips"
... ... @@ -335,10 +335,6 @@ export default {
border-top: 1px solid #eee;
}
.product-info {
display: flex;
}
.tip {
font-size: 24px;
color: #999;
... ...
<template>
<div class="product-wrapper">
<div class="good-image">
<ImageFormat :src="data.goodImg" :width="180" :height="180"></ImageFormat>
</div>
<div class="product-price">
<div class="red">¥{{data.goodPrice}}</div>
<div class="product-name">{{data.productName}}</div>
<div class="price">{{data.colorName}},{{data.sizeName}}</div>
<div class="product-info">
<div class="product-wrapper">
<div class="good-image">
<ImageFormat :src="data.goodImg" :width="180" :height="180"></ImageFormat>
</div>
<div class="product-price">
<div class="red">¥{{data.goodPrice}}</div>
<div class="product-name">{{data.productName}}</div>
<div class="price">{{data.colorName}},{{data.sizeName}}</div>
</div>
</div>
<div v-if="!getLogin" class="no-login-tip">完成“有货”登录授权后将显示商品优惠及运费信息,请先完成登录查看最终支付金额</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
name: 'OrderProductInfo',
props: {
... ... @@ -21,12 +26,20 @@ export default {
return {};
}
}
},
computed: {
...mapGetters(['getLogin'])
}
};
</script>
<style lang="scss" scoped>
.product-info {
display: flex;
flex-direction: column;
}
.good-image {
width: 180px;
height: 180px;
... ... @@ -65,6 +78,10 @@ export default {
line-height: 36px;
}
.no-login-tip {
color: #d0021b;
}
.red {
color: #d0021b;
font-size: 28px;
... ...