Commit ad8bbe65 authored by beisir's avatar beisir

feat:列表页头像轮播修改

parents 8818c350 b603184d
{ {
"name": "vcc-spider-center-ui", "name": "group-buy-ui",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
......
<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;
......
<template> <template>
<div> <div class="goods-bottom-container">
<div v-if="showGroupDesc" class="group-desc">
<cr-image width="14px" src="@/assets/images/groupIcon.png" />
<span class="red-text">[正在拼团]</span>
<span class="normal-text">拼团成功即可退款0元拿,拼团失败立即退款</span>
</div>
<div v-if="type === 'shoppingCar'" class="goods-bottom"> <div v-if="type === 'shoppingCar'" class="goods-bottom">
<div class="goods-bottom-icon" @click="goHome"> <div class="goods-bottom-icon" @click="goHome">
<span class="iconfont icon-home" /> <span class="iconfont icon-home" />
...@@ -30,6 +35,10 @@ ...@@ -30,6 +35,10 @@
export default { export default {
name: 'BottomNav', name: 'BottomNav',
props: { props: {
showGroupDesc: {
type: Boolean,
default: true
},
type: { type: {
type: String, type: String,
default: 'shopCar' // shoppingCar 购物车;settlement 结算;submitOrder 确认订单 default: 'shopCar' // shoppingCar 购物车;settlement 结算;submitOrder 确认订单
...@@ -66,10 +75,29 @@ export default { ...@@ -66,10 +75,29 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.goods-bottom { .goods-bottom-container {
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%;
.group-desc {
display: flex;
align-items: center;
width: 100%;
height: 30px;
background: @white;
padding: 0 @padding-xs;
.text-12();
.red-text {
margin: 0 @padding-unit;
color: @red;
}
.normal-text {
color: @black;
}
}
}
.goods-bottom {
display: flex; display: flex;
justify-content: space-evenly; justify-content: space-evenly;
align-items: center; align-items: center;
...@@ -77,7 +105,7 @@ export default { ...@@ -77,7 +105,7 @@ export default {
height: 30px; height: 30px;
padding: 10px 0; padding: 10px 0;
background: @white; background: @white;
border-top: 2px solid #f7f7f7; border-top: 1px solid #f7f7f7;
&-radio { &-radio {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -285,6 +285,9 @@ const ua = window.navigator.userAgent.toLowerCase(); ...@@ -285,6 +285,9 @@ const ua = window.navigator.userAgent.toLowerCase();
// 判断微信环境 // 判断微信环境
export const isWechat = ua.match(/MicroMessenger/i) == "micromessenger"; export const isWechat = ua.match(/MicroMessenger/i) == "micromessenger";
// 判断小程序
export const isWxMp = ua.match(/miniProgram/i) == 'miniprogram';
// 判断羊小咩(信用钱包)环境 // 判断羊小咩(信用钱包)环境
export const isApp= ua.match(/xyqb/i) == "xyqb"; export const isApp= ua.match(/xyqb/i) == "xyqb";
......
...@@ -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">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<span>¥{{ calcFeeInfo.totalFreightFee || '0.00' }}</span> <span>¥{{ calcFeeInfo.totalFreightFee || '0.00' }}</span>
</div> </div>
</div> </div>
<div class="coupon"> <div v-if="showCoupon" class="coupon">
<div <div
v-for="(item, idx) in couponActivityInfoList" v-for="(item, idx) in couponActivityInfoList"
:key="idx" :key="idx"
...@@ -55,6 +55,11 @@ import { DISCOUNT, FREIGHT, CASH, REDUCTION, HAS_DISCOUNT, TITLE_LIST } from '@/ ...@@ -55,6 +55,11 @@ import { DISCOUNT, FREIGHT, CASH, REDUCTION, HAS_DISCOUNT, TITLE_LIST } from '@/
export default { export default {
name: 'CouponInfo', name: 'CouponInfo',
props: { props: {
showCoupon: {
// 团购订单隐藏优惠信息
type: Boolean,
default: false
},
couponActivityInfoList: { couponActivityInfoList: {
type: Array, type: Array,
default: () => [] default: () => []
...@@ -90,7 +95,12 @@ export default { ...@@ -90,7 +95,12 @@ export default {
.mg-bottom-20 { .mg-bottom-20 {
margin-bottom: @padding-lg; margin-bottom: @padding-lg;
} }
.goods, .goods {
background: @white;
padding: 0 @padding-xs;
border-radius: @border-radius-md;
margin-bottom: @padding-sm;
}
.coupon { .coupon {
background: @white; background: @white;
padding: @padding-sm @padding-xs; padding: @padding-sm @padding-xs;
...@@ -102,6 +112,8 @@ export default { ...@@ -102,6 +112,8 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
line-height: 36px;
height: 36px;
span { span {
.text-13(); .text-13();
&:first-child { &:first-child {
......
...@@ -135,6 +135,7 @@ export default { ...@@ -135,6 +135,7 @@ export default {
}, },
// 选择完地址后触发更新 // 选择完地址后触发更新
handleAddressChange(e) { handleAddressChange(e) {
console.log(e);
if (e.noAddr) { if (e.noAddr) {
this.$set(this.orderData, 'addrReceiverId', ''); this.$set(this.orderData, 'addrReceiverId', '');
this.getConfirmOrderInfo(); this.getConfirmOrderInfo();
...@@ -232,6 +233,88 @@ export default { ...@@ -232,6 +233,88 @@ export default {
// 获取确认订单信息 // 获取确认订单信息
async getConfirmOrderInfo() { async getConfirmOrderInfo() {
const [data] = await order.confirmOrder(this.orderData); const [data] = await order.confirmOrder(this.orderData);
// const data = {
// addrReceiverInfo: {
// addrReceiverId: 682,
// receiverName: 'ndjnn',
// addrFullName: '北京,石景山区,八角街道,nsnn',
// receiverPhoneNo: '18511117191'
// },
// invalidSkuList: [
// {
// skuName: '[自营]Apple AirPods Pro 主动降噪无线蓝牙耳机 适用iPhone/iPad/Apple Watch',
// tagList: [],
// skuImg:
// 'http://img30.360buyimg.com/sku/jfs/t1/59411/33/15646/64951/5dd50baaE81702116/413160a74742f504.jpg',
// marketPrice: '1760.66',
// skuSource: 1,
// invalidStatus: 0,
// salePrice: '1599',
// count: 1,
// canAdd: true,
// invalidStatusDesc: '该地址暂无库存',
// skuId: 3732897275393,
// jumpUrl: 'xyqb://homepage/goodsdetail?skuNo=3732897275393'
// }
// ],
// shopSkuList: [
// {
// freightFee: '12.00运费',
// shopInfo: {
// shopId: 12,
// shopName: '店铺名称',
// shopImg: 'https://'
// },
// skuList: [
// {
// marketPrice: '35.60',
// invalidStatus: 0,
// salePrice: '34.4',
// count: 1,
// canAdd: true,
// invalidStatusDesc: '宝贝已失效,不能购买',
// jumpUrl: 'xyqb://homepage/goodsdetail?skuNo=7331961',
// skuName:
// '[别下单-开普勒]美加净 MAXAM 细嫩柔白隔离防晒乳100mlSPF30 PA+++ (面部身体户外鲜果防晒霜男女)',
// tagList: [],
// skuImg:
// 'http://img11.360buyimg.com/n1/jfs/t21367/129/509809607/84163/17b4ed2e/5b0f8bdfNba3c4b43.jpg',
// skuSource: 2,
// skuAttr: '【防晒】细嫩柔白100ml',
// skuId: 7331961,
// goodsTypeImage: 'https://kdspstatic.q-gp.com/kdsp/goods/icon/best-selected3x.png'
// }
// ]
// }
// ],
// calcFeeInfo: {
// couponFee: '0.00',
// totalFreightFee: '10.00',
// totalPayFee: '10.00',
// couponFreightFee: '0.00',
// totalSkuFee: '10.00'
// },
// hasNext: false,
// couponActivityInfoList: [
// {
// hasCouponActivity: 1,
// couponActivityType: 4
// },
// {
// hasCouponActivity: 1,
// couponActivityType: 3
// },
// {
// hasCouponActivity: 1,
// couponActivityType: 2
// },
// {
// hasCouponActivity: 1,
// couponActivityType: 1
// }
// ]
// };
if (data) { if (data) {
const { const {
addrReceiverInfo, addrReceiverInfo,
...@@ -263,7 +346,12 @@ export default { ...@@ -263,7 +346,12 @@ export default {
async handleBuy() { async handleBuy() {
if (!this.orderInfo.addrReceiverInfo?.addrReceiverId) { if (!this.orderInfo.addrReceiverInfo?.addrReceiverId) {
this.$dialog({ this.$dialog({
message: '请选择地址信息' message: '你还没有选择收货地址哦!',
showCancelButton: false,
confirmButtonText: '去添加',
onConfirm: () => {
this.handleToAddress();
}
}); });
return; return;
} }
......
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