购物车地址管理

This commit is contained in:
summation
2022-01-22 00:14:01 +08:00
parent 90756f56b9
commit 1c3d930a35
5 changed files with 818 additions and 383 deletions

View File

@@ -184,6 +184,8 @@ ul li ol li em strong i {
.rc-image {
border: 1px solid #d8d8d8;
margin-right: 20px;
width: 96px;
height: 96px;
img {
width: 96px;
@@ -375,21 +377,38 @@ ul li ol li em strong i {
.diallog_width {
width: 100%;
max-width: 440px;
max-width: 920px;
margin: 0 auto;
.el-dialog {
width: 100%;
}
}
.el-dialog__header{
.el-dialog__header {
color: #e1001a;
}
//手机端
@media screen and (max-width: 768px) {
.settlement {
padding-top: 0;
.popnewaddr{
position: absolute;
bottom: -14px;
left: 0;
width: 100%;
.btn{
display: block;
background: #e2001a;
line-height: 48px;
text-align: center;
color: white;
font-size: 16px;
border-radius: 30px;
}
}
.diallog_width {
width: 100%;
}
.inline {
@@ -401,72 +420,101 @@ ul li ol li em strong i {
}
.pop_list {
p{ padding: 0; margin: 0; line-height: 180%;}
p {
padding: 0;
margin: 0;
line-height: 180%;
}
.mypersonal {
border-bottom: 1px solid #d8d8d8;
padding: 15px 0;
}
input,.el-icon-edit{
input,
.el-icon-edit {
margin-top: 20px;
}
}
.rc-main {
.address-list {
display: contents;
.settlement {
.rc-main {
padding-top: 0;
.mypersonal {
width: 100%;
height: auto;
display: none;
border: none;
padding: 0;
.rc-usermain {
&.active {
display: block;
h3,
p {
padding: 0;
margin: 0;
}
.rc-usercenter h3 {
margin-top: 0;
}
}
}
.rc-main {
width: 100%;
.address-list {
display: contents;
.mypersonal {
width: 100%;
height: auto;
display: none;
border: none;
padding: 0;
.arrow_ph {
&.active {
display: block;
border: none;
.arrow_ph {
display: block;
}
.edit {
display: none;
}
}
.edit {
display: none;
&.add {
// display: block;
}
}
}
&.add {
// display: block;
.rc-usermain {
.rc-right {
display: table
}
}
}
.rc-usermain {
.rc-right {
display: table
.rc-merchandise {
padding: 15px 0 120px;
ul {
float: none;
width: 100%;
}
}
}
.rc-merchandise {
padding: 15px 0 120px;
ul {
float: none;
width: 100%;
}
}
.rc-foot {
.rc-foo {
display: flex;
justify-content: space-around;
flex-direction: row;
align-items: self-end;
position: fixed;
bottom: 0;
background: #fff;
width: 100%;
padding: 10px;
.rc-foot {
.rc-foo {
display: flex;
justify-content: space-around;
flex-direction: row;
align-items: self-end;
position: fixed;
left: 0;
bottom: 0;
background: #fff;
width: 100%;
padding: 10px;
}
}
}
}

View File

@@ -1,8 +1,9 @@
<template>
<div class="settlement">
<Myheader></Myheader>
<div class="rc-main">
<tabs></tabs>
</div>
<div class="rc_contline"></div>
<div class="rc-main">
<div class="address-list">
@@ -110,17 +111,16 @@
width="'100%"
title="选择收货地址"
>
<div class="tc dl_cont">
<div class="tc dl_cont" style="padding-bottom: 50px;position: relative;">
<div class="pop_list">
<el-row
class="mypersonal"
v-for="(item, index) in useraddress"
:key="index"
:class="item.isDefault ? 'active' : ''"
@click="selectAddress(item)"
>
<el-col :span="4"
><input type="checkbox" v-model="item.checked"
><input type="checkbox" v-model="item.checked" @click="selectPopAddress(item)"
/></el-col>
<el-col :span="16" class="tl">
<div >
@@ -130,9 +130,12 @@
<p> {{ item.address }}</p>
</el-col>
<el-col :span="4">
<i class="el-icon-edit"></i>
<i @click="editAddress(item)" class="el-icon-edit"></i>
</el-col>
</el-row>
<div class="popnewaddr">
<span class="btn" @click="addAddress">新增收货地址</span>
</div>
</div>
</div>
</el-dialog>
@@ -143,7 +146,7 @@
import Myheader from "~/components/header.vue";
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
import tabs from "@/components/tabs.vue";
import myAddress from "../address/address.vue";
import myAddress from "~/components/address.vue";
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
export default {
@@ -215,8 +218,12 @@ export default {
tel: item.recipientPhone,
detailAddress: item.detailAddress,
id: item.id,
city: item.cityName,
districtId: item.districtName,
cityId: item.cityId,
districtId: item.districtId,
provinceId:item.provinceId,
provinceName: item.provinceName,
cityName: item.cityName,
districtName: item.districtName,
saveType: "edit",
};
this.dialogAdd = true;
@@ -229,7 +236,20 @@ export default {
this.useraddress.forEach((item) => {
if (item.id == cur.id) {
item.isDefault = true;
item.checked=true
} else {
item.checked=false
item.isDefault = false;
}
});
},
selectPopAddress(cur) {
this.useraddress.forEach((item) => {
if (item.id == cur.id) {
item.isDefault = true;
item.checked=true
} else {
item.checked=false
item.isDefault = false;
}
});