Commit 4fc8a50e authored by Xuguangxing's avatar Xuguangxing

feat: 对接填写地址页面

parent bd0bc289
<template> <template>
<div class="avator-group"> <div class="avator-group">
<div v-for="(item, index) in avators" :key="index" class="avator-item" :style="widthStyle"> <div v-for="(item, index) in avators" :key="index" class="avator-item" :style="widthStyle">
<cr-image width="44px" :src="item" /> <cr-image :class="{ avator: index == 0 }" width="44px" :src="item" />
<div v-if="index == 0" class="is-leader"> <div v-if="index == 0" class="is-leader">
<cr-image width="48px" src="@/assets/images/leader.png" /> <cr-image width="48px" src="@/assets/images/leader.png" />
</div> </div>
...@@ -68,6 +68,12 @@ export default { ...@@ -68,6 +68,12 @@ export default {
width: 20%; width: 20%;
height: 44px; height: 44px;
margin-top: @padding-lg; margin-top: @padding-lg;
.avator {
border: 2px solid #ffd93d;
// border: px solid rgba(255, 212, 0, 0.24);
border-radius: 50%;
box-sizing: border-box;
}
.is-new { .is-new {
position: absolute; position: absolute;
top: 0; top: 0;
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
</div> </div>
</div> </div>
<div class="goods-area-button"> <div class="goods-area-button">
<button class="goods-bottom-buy" @click="toOrder">立即购买</button> <button class="goods-bottom-buy" @click="toOrder">确认</button>
</div> </div>
</div> </div>
<div v-if="currentPopupType === 'area'" class="goods-area"> <div v-if="currentPopupType === 'area'" class="goods-area">
...@@ -158,9 +158,9 @@ ...@@ -158,9 +158,9 @@
</div> </div>
</div> </div>
<span v-else class="goods-area-none">暂未添加地址哦~</span> <span v-else class="goods-area-none">暂未添加地址哦~</span>
<!-- <div class="goods-area-button" @click="addAddress"> --> <div class="goods-area-button" @click="addAddress">
<!-- <button class="goods-bottom-buy btn-absolute">添加新地址</button> --> <button class="goods-bottom-buy btn-absolute">添加新地址</button>
<!-- </div> --> </div>
</div> </div>
</cr-popup> </cr-popup>
<bottom-nav type="shoppingCar" :disabled="false" @buy="goVccOrDetail" /> <bottom-nav type="shoppingCar" :disabled="false" @buy="goVccOrDetail" />
...@@ -283,7 +283,15 @@ export default { ...@@ -283,7 +283,15 @@ export default {
if (res.stock === 0) { if (res.stock === 0) {
this.detailInfo.limitCount = 1; this.detailInfo.limitCount = 1;
this.detailInfo.activityLimitCount = 0; this.detailInfo.activityLimitCount = 0;
this.$toast('库存不足!'); this.$dialog({
message: '哎呀,活动太火爆,该商品已经卖光,换一个商品试试吧!',
title: '',
showCancelButton: false,
confirmButtonText: '查看其他商品',
onConfirm: () => {
this.$router.push({ name: 'groupBuyList' });
}
});
} }
this.selectedAddress = res.receiverInfo || {}; this.selectedAddress = res.receiverInfo || {};
this.specList = res.skuAtts || []; this.specList = res.skuAtts || [];
...@@ -312,19 +320,18 @@ export default { ...@@ -312,19 +320,18 @@ export default {
if (addressInfo) { if (addressInfo) {
this.addressList = (addressInfo && addressInfo.addrReceiverList) || []; this.addressList = (addressInfo && addressInfo.addrReceiverList) || [];
this.show = true; this.show = true;
} else {
this.addAddress();
}
},
addAddress() {
if (!this.hasLogin) {
this.$router.push({ name: 'login' });
return;
} }
// else { this.show = false;
// this.addAddress(); this.$router.push({ name: 'addressManage' });
// }
}, },
// addAddress() {
// if (!this.hasLogin) {
// this.$router.push({ name: 'login' });
// return;
// }
// this.show = false;
// this.$router.push({ name: 'addressManage' });
// },
toOrder() { toOrder() {
if (!this.hasLogin) { if (!this.hasLogin) {
this.$router.push({ name: 'login' }); this.$router.push({ name: 'login' });
...@@ -335,6 +342,7 @@ export default { ...@@ -335,6 +342,7 @@ export default {
return; return;
} }
this.show = false; this.show = false;
console.log(this.selectedAddress);
const order = { const order = {
addrReceiverId: this.selectedAddress.addrReceiverId || '', addrReceiverId: this.selectedAddress.addrReceiverId || '',
selectedSkuList: [ selectedSkuList: [
...@@ -350,8 +358,9 @@ export default { ...@@ -350,8 +358,9 @@ export default {
defaultUseActivityCoupon: true, defaultUseActivityCoupon: true,
couponActivityUseIdList: [] couponActivityUseIdList: []
}; };
window.localStorage.setItem('orderData', order); window.localStorage.setItem('orderData', JSON.stringify(order));
window.localStorage.removeItem('addressList'); window.localStorage.removeItem('addressList');
this.$router.push({ name: 'createOrder' });
}, },
changeAddress(address) { changeAddress(address) {
// 选取规格需要清空,init会重新赋值 // 选取规格需要清空,init会重新赋值
...@@ -430,12 +439,6 @@ export default { ...@@ -430,12 +439,6 @@ export default {
case 'area': case 'area':
this.areaPopup(); this.areaPopup();
break; break;
case 'coupon':
this.show = true;
break;
case 'service':
this.show = true;
break;
default: default:
break; break;
} }
......
...@@ -45,24 +45,15 @@ ...@@ -45,24 +45,15 @@
.goods { .goods {
&-red-bg{ // 用于小图详情页 &-red-bg{ // 用于小图详情页
width: 100%; position: fixed;
height: 270px; left: -5%;
overflow: hidden;
position: absolute;
left: 0;
top: 0; top: 0;
z-index: -1; z-index: -1;
&::after{ content: '';
position: absolute; width: 110%;
left: -5%; height: 270px;
top: 0; border-radius: 0 0 10% 10%; //左上角,右上角,右下角,左下角
z-index: -1; background: linear-gradient(269deg, #FF5D00 12%, #FF1900 86%);
content: '';
width: 110%;
height: 270px;
border-radius: 0 0 10% 10%; //左上角,右上角,右下角,左下角
background-image: linear-gradient(269deg, #FF5D00 12%, #FF1900 86%);
}
} }
&-group-buy-head-content{ &-group-buy-head-content{
height: 64px; height: 64px;
...@@ -87,19 +78,10 @@ ...@@ -87,19 +78,10 @@
box-sizing: border-box; box-sizing: border-box;
font-size: 16px; font-size: 16px;
padding: 0 @padding-sd 60px; padding: 0 @padding-sd 60px;
&-lose {
&-container {
background: #fff;
padding: 45px 15px;
text-align: center;
img {
width: 150px;
}
}
}
} }
// 头像组、团购规则等 // 头像组、团购规则等
&-product-info{ &-product-info{
position: relative;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
align-items: center; align-items: center;
...@@ -110,6 +92,20 @@ ...@@ -110,6 +92,20 @@
margin-bottom: @padding-sm; margin-bottom: @padding-sm;
padding: @padding-sm @padding-xs; padding: @padding-sm @padding-xs;
box-sizing: border-box; box-sizing: border-box;
&-tag{
position: absolute;
z-index: 2;
top: 0;
left: 0;
font-size: @font-size-12;
color: @white;
width: 45px;
height: 18px;
line-height: 18px;
text-align: center;
background-color: linear-gradient(269deg, #ff5d00 12%, #ff1900 86%);
border-radius: 6px 0 6px 0;
}
&-img{ &-img{
width: 108px; width: 108px;
height: 108px; height: 108px;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
</div> </div>
<div class="goods-product-info"> <div class="goods-product-info">
<div class="goods-product-info-img"> <div class="goods-product-info-img">
<span class="goods-product-info-tag">3人团</span>
<cr-image width="108px" :src="imgList[0]" /> <cr-image width="108px" :src="imgList[0]" />
</div> </div>
<div class="goods-product-info-desc"> <div class="goods-product-info-desc">
......
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