Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
yyq
5 years ago
Commit
0de961e2c3facbc52f8ce9a8963dc62fec521fce
2 parents
2134a708
40fffc10
Merge branch 'develop' of git.yoho.cn:fe/xianyu-ufo-app-web into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
17 deletions
apps/pages/list/components/productList.vue
apps/pages/list/filtrate.vue
apps/pages/list/list.vue
apps/pages/order/buyer-confirm.vue
apps/pages/order/components/confirm/buyer-product.vue
apps/pages/list/components/productList.vue
View file @
0de961e
...
...
@@ -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;
}
...
...
apps/pages/list/filtrate.vue
View file @
0de961e
...
...
@@ -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'"
...
...
apps/pages/list/list.vue
View file @
0de961e
...
...
@@ -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: '价格'}});
...
...
apps/pages/order/buyer-confirm.vue
View file @
0de961e
...
...
@@ -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;
...
...
apps/pages/order/components/confirm/buyer-product.vue
View file @
0de961e
<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;
...
...
Please
register
or
login
to post a comment