651 lines
19 KiB
Vue
651 lines
19 KiB
Vue
|
<template>
|
|||
|
<div>
|
|||
|
<el-dialog v-model="dialogVisible" title="地址" width="40%" :before-close="handleClose">
|
|||
|
<el-form :label-position="labelPosition" label-width="130px" :model="formLabelAlign" style="max-width: 460px">
|
|||
|
<el-form-item label="联系人" prop="receiverName" :rules="[{ required: true, message: '请输入联系人' }]">
|
|||
|
<el-input v-model="formLabelAlign.receiverName" />
|
|||
|
</el-form-item>
|
|||
|
<el-form-item label="联系人手机号" prop="receiverPhone" :rules="[{ required: true, message: '请输入联系人手机号' }]">
|
|||
|
<el-input v-model="formLabelAlign.receiverPhone" />
|
|||
|
</el-form-item>
|
|||
|
<el-form-item label="省市区" prop="postArea" :rules="[{ required: true, message: '省市区' }]">
|
|||
|
<!-- <el-input v-model="formLabelAlign.region" /> -->
|
|||
|
<el-cascader v-model="formLabelAlign.postArea" :props="props" :options="options" @change="handleChange" />
|
|||
|
</el-form-item>
|
|||
|
<el-form-item label="详细地址" prop="postAddress" :rules="[{ required: true, message: '详细地址' }]">
|
|||
|
<el-input v-model="formLabelAlign.postAddress" />
|
|||
|
</el-form-item>
|
|||
|
<el-form-item label="默认地址" prop="isDefault" :rules="[{ required: true, message: '默认地址' }]">
|
|||
|
<el-switch v-model="formLabelAlign.isDefault" size="large" active-text="是" inactive-text="否" />
|
|||
|
</el-form-item>
|
|||
|
</el-form>
|
|||
|
<template #footer>
|
|||
|
<span class="dialog-footer">
|
|||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
|||
|
<el-button type="primary" @click="submit()"> 确定 </el-button>
|
|||
|
</span>
|
|||
|
</template>
|
|||
|
</el-dialog>
|
|||
|
<common current-name="addressList">
|
|||
|
<template #main>
|
|||
|
<div class="my-shoping-car-warp">
|
|||
|
<userHeader :title="'我的地址'"></userHeader>
|
|||
|
<div class="page-content-warp">
|
|||
|
<div class="fix-top">
|
|||
|
<div class="do-all" @click="toCheckAll">
|
|||
|
<!-- <div class="do-all-pos">
|
|||
|
<ischeck :value="isAll"></ischeck>
|
|||
|
<span class="all-txt">全选</span>
|
|||
|
</div> -->
|
|||
|
</div>
|
|||
|
<div>
|
|||
|
<div style="margin-right: 20px" class="batch-del" @click="add()">
|
|||
|
<el-icon><Plus color="#000000" /></el-icon> <span class="del-txt">新增</span>
|
|||
|
</div>
|
|||
|
<!-- <div class="batch-del" @click="doBatchDel">
|
|||
|
<el-icon><Delete /></el-icon> <span class="del-txt">批量删除</span>
|
|||
|
</div> -->
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="conetnt-warp">
|
|||
|
<div class="content-item-warp">
|
|||
|
<div v-for="(n, index) in data" :key="n.id" class="content-item">
|
|||
|
<div class="shop-info">
|
|||
|
<div class="shop-do" @click="toCheckShop(index)">
|
|||
|
<!-- <ischeck :value="n.ischeck"></ischeck> -->
|
|||
|
</div>
|
|||
|
<!-- <div class="shop-img">
|
|||
|
<costomImg
|
|||
|
:url="'images/ecommerce/' + 'pic.png'"
|
|||
|
:preview-list="[getAssetsFile('images/ecommerce/' + 'pic.png')?.href ?? '']"
|
|||
|
:is-view="false"
|
|||
|
></costomImg>
|
|||
|
</div> -->
|
|||
|
<span style="border: 1px solid #dddddd; border-radius: 5px; padding: 3px 5px" class="shop-name txt-ellipsis clamp2"
|
|||
|
>联系人:{{ n.receiverName }},联系人手机号:{{ n.receiverPhone }},地址:{{ n.postArea }}{{ n.postAddress }}</span
|
|||
|
>
|
|||
|
<div style="color: #25bf82; font-size: 20px" @click="showDialogVisible(n)">修改</div>
|
|||
|
<div style="color: red; font-size: 20px" @click="del(n)">删除</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<!-- <div v-if="n.cartDetails && n.cartDetails.length > 0" class="good-list">
|
|||
|
<div v-for="(g, indexg) in n.cartDetails" :key="indexg" class="good-item">
|
|||
|
<div class="good-do" @click="toCheckGood(index, indexg)">
|
|||
|
<div class="good-do-pos">
|
|||
|
<ischeck :value="g.ischeck" size="24px"></ischeck>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="good-img" @click="toCheckGood(index, indexg)">
|
|||
|
<img class="good-img" style="border-radius: 5px" :src="g.productImgUrl" alt="" />
|
|||
|
</div>
|
|||
|
<div class="good-info" @click="toCheckGood(index, indexg)">
|
|||
|
<div class="good-info-pos">
|
|||
|
<div class="txt-ellipsis clamp2">{{ g.productName || '--' }}</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="good-price-num">
|
|||
|
<div class="good-price-num-pos">
|
|||
|
<div class="price" @click="toCheckGood(index, indexg)">{{ g.price }} / {{ g.quantity }}</div>
|
|||
|
<div class="total" @click="toCheckGood(index, indexg)">{{ (g.price * g.quantity).toFixed(2) }}</div>
|
|||
|
<div class="num">
|
|||
|
<div class="right-item">
|
|||
|
<el-input-number v-model="g.quantity" :min="1" @change="numberChange(index, indexg)">
|
|||
|
<template #suffix>
|
|||
|
<span>{{ g.quantity }}</span>
|
|||
|
</template>
|
|||
|
</el-input-number>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="good-del" @click="doSingleDel(index, indexg)">
|
|||
|
<span>删除</span>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div> -->
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</template>
|
|||
|
</common>
|
|||
|
</div>
|
|||
|
</template>
|
|||
|
<script setup>
|
|||
|
import common from './components/common.vue';
|
|||
|
import { ref, reactive, computed, onMounted } from 'vue';
|
|||
|
import { isEmpty, getAssetsFile } from '@/utils';
|
|||
|
import { useRoute, useRouter } from 'vue-router';
|
|||
|
import userHeader from './components/userHeader.vue';
|
|||
|
import ischeck from './components/ischeck.vue';
|
|||
|
import costomImg from '@/components/costomImg.vue';
|
|||
|
import { useApp } from '@/hooks';
|
|||
|
import {
|
|||
|
shoppingCart,
|
|||
|
deleteChooseGoods,
|
|||
|
userPostAddressed,
|
|||
|
addToCart,
|
|||
|
delCartGood,
|
|||
|
userPostAddress,
|
|||
|
addUserPostAddress,
|
|||
|
deleteAddress,
|
|||
|
} from '../../apis/user';
|
|||
|
import json from '../../assets/address.json';
|
|||
|
const app = useApp();
|
|||
|
const route = useRoute();
|
|||
|
const router = useRouter();
|
|||
|
|
|||
|
let number = ref(1);
|
|||
|
let total = ref(99);
|
|||
|
let isAll = ref(false);
|
|||
|
let data = ref([]);
|
|||
|
let page = reactive({
|
|||
|
current: 1,
|
|||
|
size: 10,
|
|||
|
});
|
|||
|
let ids = ref([]);
|
|||
|
let dialogVisible = ref(false);
|
|||
|
|
|||
|
let formLabelAlign = reactive({
|
|||
|
receiverName: '',
|
|||
|
receiverPhone: '',
|
|||
|
postArea: '',
|
|||
|
postAddress: '',
|
|||
|
isDefault: false,
|
|||
|
});
|
|||
|
|
|||
|
const options = json;
|
|||
|
|
|||
|
const handleClose = () => {
|
|||
|
dialogVisible.value = false;
|
|||
|
};
|
|||
|
|
|||
|
const props = ref({
|
|||
|
value: 'label',
|
|||
|
});
|
|||
|
|
|||
|
const showDialogVisible = (data) => {
|
|||
|
dialogVisible.value = true;
|
|||
|
formLabelAlign = data;
|
|||
|
formLabelAlign.isDefault == '1' ? (formLabelAlign.isDefault = true) : (formLabelAlign.isDefault = false);
|
|||
|
console.log(data);
|
|||
|
};
|
|||
|
|
|||
|
const submit = (value) => {
|
|||
|
formLabelAlign.isDefault ? (formLabelAlign.isDefault = '1') : (formLabelAlign.isDefault = '0');
|
|||
|
if (typeof formLabelAlign.postArea !== 'string') {
|
|||
|
formLabelAlign.postArea = formLabelAlign.postArea.join(',');
|
|||
|
}
|
|||
|
if (formLabelAlign.id) {
|
|||
|
userPostAddressed(formLabelAlign).then((res) => {
|
|||
|
dialogVisible.value = false;
|
|||
|
getUserAddressList();
|
|||
|
});
|
|||
|
} else {
|
|||
|
addUserPostAddress(formLabelAlign).then((res) => {
|
|||
|
dialogVisible.value = false;
|
|||
|
getUserAddressList();
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
// console.log(formLabelAlign);
|
|||
|
};
|
|||
|
|
|||
|
onMounted(() => {
|
|||
|
getUserAddressList();
|
|||
|
});
|
|||
|
|
|||
|
const handleChange = (value) => {
|
|||
|
console.log(value);
|
|||
|
formLabelAlign.postArea = value;
|
|||
|
};
|
|||
|
|
|||
|
const getUserAddressList = () => {
|
|||
|
userPostAddress(page).then((res) => {
|
|||
|
console.log(res.data.records);
|
|||
|
data.value = res.data.records;
|
|||
|
addIsCheckProperty(data);
|
|||
|
});
|
|||
|
};
|
|||
|
|
|||
|
function addIsCheckProperty(data) {
|
|||
|
if (Array.isArray(data)) {
|
|||
|
data.forEach((item) => {
|
|||
|
item.ischeck = false; // 为当前层级添加属性
|
|||
|
if (item.cartDetails) {
|
|||
|
// 处理子集
|
|||
|
addIsCheckProperty(item.cartDetails);
|
|||
|
}
|
|||
|
if (item.records) {
|
|||
|
// 处理父级(如存在嵌套结构)
|
|||
|
addIsCheckProperty(item.records);
|
|||
|
}
|
|||
|
});
|
|||
|
} else if (typeof data === 'object' && data !== null) {
|
|||
|
data.ischeck = false;
|
|||
|
for (let key in data) {
|
|||
|
if (typeof data[key] === 'object') {
|
|||
|
addIsCheckProperty(data[key]); // 递归处理嵌套对象
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
const numberChange = (value, index, indexg) => {
|
|||
|
console.log(value, index, indexg);
|
|||
|
if (number.value < value) {
|
|||
|
// addToCart();
|
|||
|
}
|
|||
|
number.value = value;
|
|||
|
};
|
|||
|
|
|||
|
// let totalAmout = computed(() => {
|
|||
|
// let num = 0;
|
|||
|
// let list = [];
|
|||
|
// if (data && data.value.length > 0) {
|
|||
|
// list = data.value
|
|||
|
// .map((m) => {
|
|||
|
// return m.cartDetails;
|
|||
|
// })
|
|||
|
// .flat();
|
|||
|
// if (list && list.length > 0) {
|
|||
|
// num = list.reduce((acc, current) => {
|
|||
|
// return acc + (current.ischeck ? current.price * current.quantity : 0);
|
|||
|
// }, 0);
|
|||
|
// }
|
|||
|
// }
|
|||
|
|
|||
|
// return num;
|
|||
|
// });
|
|||
|
|
|||
|
const toSettlement = () => {
|
|||
|
router.push('/sub-operation-service/sureOrder');
|
|||
|
};
|
|||
|
|
|||
|
const toCheckAll = () => {
|
|||
|
isAll.value = !isAll.value;
|
|||
|
console.info('操作全选', isAll.value);
|
|||
|
if (data && data.value.length > 0) {
|
|||
|
data.value.forEach((m) => {
|
|||
|
m.ischeck = isAll.value;
|
|||
|
if (m.cartDetails && m.cartDetails.length > 0) {
|
|||
|
m.cartDetails = setCheck(m.cartDetails, isAll.value);
|
|||
|
m.cartDetails.forEach((res, index) => {
|
|||
|
ids.value.push(res.id);
|
|||
|
});
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
const setCheck = (data, val) => {
|
|||
|
let list = [];
|
|||
|
if (data && data.length > 0) {
|
|||
|
list = data.map((m) => {
|
|||
|
return { ...m, ischeck: val };
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
return list;
|
|||
|
};
|
|||
|
|
|||
|
const toCheckShop = (index) => {
|
|||
|
if (index > -1) {
|
|||
|
data.value[index].ischeck = !data.value[index].ischeck;
|
|||
|
if (data.value[index].cartDetails && data.value[index].cartDetails.length > 0) {
|
|||
|
data.value[index].cartDetails = setCheck(data.value[index].cartDetails, data.value[index].ischeck);
|
|||
|
}
|
|||
|
setIsAll();
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
const toCheckGood = (indexP, index) => {
|
|||
|
if (indexP > -1 && index > -1) {
|
|||
|
let list = data.value[indexP].cartDetails;
|
|||
|
list[index].ischeck = !list[index].ischeck;
|
|||
|
let len = list.length || 0;
|
|||
|
let checkNum = list.reduce((acc, current) => {
|
|||
|
return acc + (current.ischeck ? 1 : 0);
|
|||
|
}, 0);
|
|||
|
|
|||
|
if (checkNum > 0 && checkNum < len) {
|
|||
|
data.value[indexP].ischeck = false;
|
|||
|
} else if (checkNum > 0 && checkNum == len) {
|
|||
|
data.value[indexP].ischeck = true;
|
|||
|
} else {
|
|||
|
data.value[indexP].ischeck = false;
|
|||
|
}
|
|||
|
setIsAll();
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
const setIsAll = () => {
|
|||
|
let len = data.value.length || 0;
|
|||
|
let checkNum = data.value.reduce((acc, current) => {
|
|||
|
return acc + (current.ischeck ? 1 : 0);
|
|||
|
}, 0);
|
|||
|
|
|||
|
if (checkNum > 0 && checkNum < len) {
|
|||
|
isAll.value = false;
|
|||
|
} else if (checkNum > 0 && checkNum == len) {
|
|||
|
isAll.value = true;
|
|||
|
} else {
|
|||
|
isAll.value = false;
|
|||
|
}
|
|||
|
};
|
|||
|
|
|||
|
const doSingleDel = (indexP, index) => {
|
|||
|
if (indexP > -1 && index > -1) {
|
|||
|
app
|
|||
|
.$confirm(`删除后信息将不可查看,确认要删除吗?`, '确定删除', {
|
|||
|
confirmButtonText: '确定',
|
|||
|
cancelButtonText: '取消',
|
|||
|
type: 'warning',
|
|||
|
})
|
|||
|
.then(() => {
|
|||
|
deleteChooseGoods({ goodsIds: [data.value[indexP].cartDetails[index].id] });
|
|||
|
data.value[indexP].cartDetails.splice(index, 1);
|
|||
|
})
|
|||
|
.catch(() => {});
|
|||
|
}
|
|||
|
};
|
|||
|
//单个删除
|
|||
|
const del = (data) => {
|
|||
|
app
|
|||
|
.$confirm(`删除后信息将不可查看,确认要删除吗?`, '确定删除', {
|
|||
|
confirmButtonText: '确定',
|
|||
|
cancelButtonText: '取消',
|
|||
|
type: 'warning',
|
|||
|
})
|
|||
|
.then(() => {
|
|||
|
deleteAddress(data.id);
|
|||
|
getUserAddressList();
|
|||
|
})
|
|||
|
.catch(() => {});
|
|||
|
};
|
|||
|
//批量删除
|
|||
|
const doBatchDel = () => {
|
|||
|
const allUnchecked = isAllUnchecked(data.value);
|
|||
|
console.log(allUnchecked); // true 或 false
|
|||
|
if (allUnchecked) {
|
|||
|
app.$message({
|
|||
|
message: '请先选择要删除的商品',
|
|||
|
type: 'warning',
|
|||
|
});
|
|||
|
} else {
|
|||
|
app
|
|||
|
.$confirm(`删除后信息将不可查看,确认要删除吗?`, '确定删除', {
|
|||
|
confirmButtonText: '确定',
|
|||
|
cancelButtonText: '取消',
|
|||
|
type: 'warning',
|
|||
|
})
|
|||
|
.then(() => {
|
|||
|
// 删除逻辑
|
|||
|
const filteredData = removeCheckedItems(data);
|
|||
|
// console.log(filteredData);
|
|||
|
data.value = filteredData;
|
|||
|
deleteAddress(ids.value[0]);
|
|||
|
})
|
|||
|
.catch(() => {});
|
|||
|
}
|
|||
|
};
|
|||
|
const add = () => {
|
|||
|
formLabelAlign = reactive({
|
|||
|
receiverName: '',
|
|||
|
receiverPhone: '',
|
|||
|
postArea: '',
|
|||
|
postAddress: '',
|
|||
|
isDefault: false,
|
|||
|
});
|
|||
|
dialogVisible.value = true;
|
|||
|
};
|
|||
|
// 判断是否全部未选中
|
|||
|
function isAllUnchecked(data) {
|
|||
|
return data.every((item) => {
|
|||
|
// 检查当前项的 ischeck 是否为 false
|
|||
|
const currentUnchecked = item.ischeck === false;
|
|||
|
// 如果有子项 goodlist,递归检查子项
|
|||
|
const childrenUnchecked = item.cartDetails ? item.cartDetails.every((child) => child.ischeck === false) : true;
|
|||
|
return currentUnchecked && childrenUnchecked;
|
|||
|
});
|
|||
|
}
|
|||
|
//批量删除逻辑
|
|||
|
function removeCheckedItems(data) {
|
|||
|
return data.filter((item) => {
|
|||
|
// 如果父项的 ischeck 为 true,直接过滤掉(包括所有子项)
|
|||
|
if (item.ischeck === true) {
|
|||
|
return false;
|
|||
|
}
|
|||
|
|
|||
|
// 如果父项的 ischeck 为 false,但子项可能存在 ischeck 为 true 的情况
|
|||
|
if (item.cartDetails) {
|
|||
|
item.cartDetails = item.cartDetails.filter((child) => child.ischeck !== true);
|
|||
|
}
|
|||
|
|
|||
|
return true;
|
|||
|
});
|
|||
|
}
|
|||
|
</script>
|
|||
|
<style lang="scss" scoped>
|
|||
|
.my-shoping-car-warp {
|
|||
|
width: 100%;
|
|||
|
.page-content-warp {
|
|||
|
position: relative;
|
|||
|
overflow: hidden;
|
|||
|
margin: 16px 0 0 16px;
|
|||
|
width: 100%;
|
|||
|
height: calc(100vh - 135px);
|
|||
|
border-radius: 16px;
|
|||
|
background: $color-fff;
|
|||
|
.fix-top,
|
|||
|
.fix-bottom {
|
|||
|
position: absolute;
|
|||
|
left: 0;
|
|||
|
z-index: 1;
|
|||
|
padding: 16px;
|
|||
|
width: 100%;
|
|||
|
background: $color-fff;
|
|||
|
}
|
|||
|
.fix-top {
|
|||
|
top: 0;
|
|||
|
display: inline-flex;
|
|||
|
justify-content: space-between;
|
|||
|
.do-all,
|
|||
|
.batch-del {
|
|||
|
display: inline-block;
|
|||
|
vertical-align: middle;
|
|||
|
cursor: pointer;
|
|||
|
}
|
|||
|
.do-all {
|
|||
|
display: inline-flex;
|
|||
|
flex-direction: column;
|
|||
|
justify-content: center;
|
|||
|
.all-txt {
|
|||
|
display: inline-block;
|
|||
|
padding-left: 16px;
|
|||
|
font-size: 16px;
|
|||
|
vertical-align: middle;
|
|||
|
}
|
|||
|
}
|
|||
|
.batch-del {
|
|||
|
padding: 8px 16px;
|
|||
|
font-size: 16px;
|
|||
|
border: 1px solid $color-333;
|
|||
|
border-radius: 16px;
|
|||
|
.el-icon {
|
|||
|
font-size: 18px;
|
|||
|
}
|
|||
|
.del-txt,
|
|||
|
.el-icon {
|
|||
|
display: inline-block;
|
|||
|
vertical-align: middle;
|
|||
|
}
|
|||
|
.del-txt {
|
|||
|
padding-left: 16px;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
.fix-bottom {
|
|||
|
bottom: 0;
|
|||
|
display: inline-flex;
|
|||
|
justify-content: space-between;
|
|||
|
width: 100%;
|
|||
|
.bottom-total,
|
|||
|
.bottom-do {
|
|||
|
display: inline-block;
|
|||
|
vertical-align: middle;
|
|||
|
}
|
|||
|
.bottom-total {
|
|||
|
.tips,
|
|||
|
.total {
|
|||
|
display: inline-block;
|
|||
|
vertical-align: middle;
|
|||
|
}
|
|||
|
.tips {
|
|||
|
font-size: 30px;
|
|||
|
}
|
|||
|
.total {
|
|||
|
padding-left: 16px;
|
|||
|
font-size: 42px;
|
|||
|
color: $color-main;
|
|||
|
}
|
|||
|
.total::before {
|
|||
|
content: '¥';
|
|||
|
}
|
|||
|
}
|
|||
|
.bottom-do {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: center;
|
|||
|
flex-direction: column;
|
|||
|
::v-deep() {
|
|||
|
.el-button {
|
|||
|
display: inline-block !important;
|
|||
|
padding: 0 40px !important;
|
|||
|
height: 42px !important;
|
|||
|
font-size: 18px !important;
|
|||
|
line-height: 42px !important;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
.conetnt-warp {
|
|||
|
overflow-y: auto;
|
|||
|
padding: 80px 16px 96px;
|
|||
|
width: 100%;
|
|||
|
height: 100%;
|
|||
|
.content-item-warp {
|
|||
|
width: 100%;
|
|||
|
.content-item {
|
|||
|
margin-bottom: 16px;
|
|||
|
width: 100%;
|
|||
|
cursor: pointer;
|
|||
|
.shop-info {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: flex-start;
|
|||
|
width: 100%;
|
|||
|
gap: 16px;
|
|||
|
.shop-do,
|
|||
|
.shop-img,
|
|||
|
.shop-name {
|
|||
|
display: inline-block;
|
|||
|
vertical-align: middle;
|
|||
|
}
|
|||
|
.shop-img {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: center;
|
|||
|
width: 32px;
|
|||
|
height: 32px;
|
|||
|
border-radius: 4px;
|
|||
|
flex-direction: column;
|
|||
|
}
|
|||
|
.shop-do {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: center;
|
|||
|
width: 30px;
|
|||
|
flex-direction: column;
|
|||
|
}
|
|||
|
.shop-name {
|
|||
|
width: calc(100% - 200px);
|
|||
|
font-size: 18px;
|
|||
|
text-align: left;
|
|||
|
}
|
|||
|
}
|
|||
|
.good-list {
|
|||
|
width: 100%;
|
|||
|
.good-item {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: flex-start;
|
|||
|
margin: 8px 0;
|
|||
|
padding-left: 16px;
|
|||
|
width: 100%;
|
|||
|
gap: 16px;
|
|||
|
}
|
|||
|
.good-do,
|
|||
|
.good-img,
|
|||
|
.good-info,
|
|||
|
.good-price-num {
|
|||
|
display: inline-block;
|
|||
|
vertical-align: middle;
|
|||
|
}
|
|||
|
.good-do {
|
|||
|
display: inline-flex;
|
|||
|
flex-direction: column;
|
|||
|
justify-content: center;
|
|||
|
.good-do-pos {
|
|||
|
}
|
|||
|
}
|
|||
|
.good-img {
|
|||
|
width: 120px;
|
|||
|
height: 120px;
|
|||
|
}
|
|||
|
.good-info {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: center;
|
|||
|
width: 200px;
|
|||
|
flex-direction: column;
|
|||
|
.good-info-pos {
|
|||
|
font-size: 18px;
|
|||
|
color: $color-666;
|
|||
|
.txt-ellipsis {
|
|||
|
text-align: left;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
.good-price-num {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: center;
|
|||
|
width: calc(100% - 340px);
|
|||
|
flex-direction: column;
|
|||
|
.good-price-num-pos {
|
|||
|
display: inline-flex;
|
|||
|
justify-content: space-around;
|
|||
|
gap: 16px;
|
|||
|
.price,
|
|||
|
.total {
|
|||
|
font-size: 20px;
|
|||
|
}
|
|||
|
.price {
|
|||
|
font-weight: 400;
|
|||
|
}
|
|||
|
.total {
|
|||
|
font-weight: 700;
|
|||
|
color: $color-main;
|
|||
|
}
|
|||
|
.total::before {
|
|||
|
content: '¥';
|
|||
|
}
|
|||
|
.good-del {
|
|||
|
font-size: 16px;
|
|||
|
color: $color-999;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
</style>
|