!55 2022-1-20 Jiamin

Merge pull request !55 from Admin/sit-jiamin-v2
This commit is contained in:
Admin 2022-01-20 06:46:22 +00:00 committed by Gitee
commit 1a4a87acfe
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 328 additions and 14 deletions

View File

@ -1,11 +1,310 @@
@media screen and (max-width:768px){
.rc-margin-bottom--lg{
margin: 0;
}
@media screen and (max-width:768px){
.online{
width:100%;
background:#d7d7d7;
margin-top:1.5rem;
height:.06rem;
&.bold{
height:8px;
background:#f6f6f6;
}
}
.useredit{
display: none;
}
.rc-button{
display: flex;
align-items: center;
justify-content: center;
width: 375px;
height: 80px;
background: #FFFFFF;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
opacity: 1;
border-radius: 0px;
}
.rc-footbutton {
width: 164px;
height: 48px;
border: 2px solid #E2001A;
opacity: 1;
border-radius: 30px;
background: #E2001A;
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
color: #FFFFFF;
}
.rc-max-width--xl{
padding: 24px 20px 24px 20px;
.rc-title {
display: flex;
align-items: center;
color: #333333;
font-size: 14px;
em {
font-style: normal;
font-size: 14px;
}
span {
display: block;
margin-left: 8px;
}
}
.rc-center{
padding-top: 24px;
}
}
.rc-address {
margin-top: 8px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 14px;
color: #333333;
}
.rc-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
display: flex;
align-items: center;
.rc-right {
span {
border-bottom: 1px solid #666666;
}
span:first-child {
margin-right: 16px;
}
}
img{
width: 43px;
}
.rc-foot{
display: flex;
align-items: center;
color: #333333;
font-size: 14px;
span{
margin-left: 8px;
}
}
}
}
@media screen and (min-width: 769px)
{
.usercontend {
display:inline-block;
}
.usercontshow{
.rc-button{
display: none;
}
}
.usercontend{
margin-top: 40px;
}
.online{
display: none;
}
.rc-button{
display: none;
}
.useredit{
width: 680px;
height: 164px;
background: #FFFFFF;
border: 1px solid #D7D7D7;
opacity: 1;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
img{
width: 31px;
height: 31px;
}
span{
color: #333333;
font-size: 18px;
}
}
.usercontend{
.useradd{
width: 680px;
height: 164px;
background: #FFFFFF;
border-radius: 3px;
img{
width: 31px;
height: 31px;
display: block;
}
}
}
.rc-max-width--xl{
.rc-center{
margin-top: 24px;
margin-left: 24px;
}
.rc-cat{
width: 640px;
border: 1px solid #D7D7D7;
border-radius: 3px;
position: relative;
margin-left: 40px;
height: 164px;
}
.rc-title {
display: flex;
align-items: center;
color: #333333;
font-size: 20px;
em {
font-style: normal;
}
span {
display: block;
margin-left: 32px;
font-size: 20px;
}
}
.rc-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
display: flex;
align-items: center;
.rc-right {
position: absolute;
right: 24px;
top: 24px;
span {
border-bottom: 1px solid #666666;
}
span:first-child {
margin-right: 16px;
}
}
img{
width: 43px;
}
.rc-foot{
display: flex;
align-items: center;
color: #333333;
font-size: 16px;
margin-top: 16px;
span{
margin-left: 8px;
}
}
}
}
.rc-max-width--xl{
.rc-button {
height: 80px;
background: #ffffff;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
opacity: 1;
display: flex;
align-items: center;
justify-content: center;
display: block;
.rc-footbutton {
width: 164px;
height: 48px;
border: 2px solid #e2001a;
opacity: 1;
border-radius: 30px;
display: flex;
align-items: center;
background: #e2001a;
span {
display: block;
text-align: center;
color: white;
font-size: 16px;
width: 100%;
}
}
}
.rc-header {
display: flex;
align-items: center;
color: #333333;
em {
font-style: normal;
font-size: 14px;
}
span {
display: block;
margin-left: 8px;
}
}
.rc-address {
margin-top: 16px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 20px;
color: #333333;
}
.rc-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 20px;
margin-top: 8px;
.rc-right {
span {
border-bottom: 1px solid #666666;
}
span:first-child {
margin-right: 16px;
}
}
}
}
}

View File

@ -1,8 +1,12 @@
<template>
<div>
<Myheader></Myheader>
<div class="usermain">
<div class="rc-main" v-for="(item, index) in list" :key="index">
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="online bold"></div>
<div class="usercontshow rc-max-width--xl">
<div class="usercontend" v-for="(item, index) in list" :key="index">
<div class="usercontshow usermain" >
<div class="rc-cat" >
<div class="rc-center">
<div class=" rc-title">
<em>
@ -19,7 +23,7 @@
</div>
<div class="rc-footer">
<div class="rc-foot">
<img :src="item.isDefault?require('../../assets/image/userred.png'):require('../../assets/image/userselect.png')" @click="changeadddress(item,index)"/>
<img :src="item.isDefault?require('../../assets/image/userred.png'):require('../../assets/image/userselect.png')" @click="changeadddress(item,index)"/>
<span>设置为默认收货地址</span>
</div>
@ -29,20 +33,36 @@
</div>
</div>
</div>
</div>
</div>
<div class="online bold rc-md-down"></div>
<!-- <div class="usercontend useradd">
<img src="../../assets/image/userselect.png" alt="">
<span>添加收货地址</span>
</div> -->
</div>
<div class="usercontshow useredit">
<img src="../../assets/image/userselect.png" alt="">
<span>添加收货地址</span>
</div>
<div class="rc-button">
<div class="rc-footbutton" @click="onAdd()">
<span>新增收货地址</span>
</div>
</div>
</div>
<MyFooter></MyFooter>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue'
export default {
@ -59,29 +79,23 @@ export default {
tel: "13000000000",
address: "浙江省杭州市西湖区文三路 138 号",
isDefault: true,
},
{
id: 2,
name: "李四",
tel: "1310000000",
isDefault: false,
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
{
id: 3,
name: "李四",
tel: "1310000000",
isDefault: false,
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
],
};
},
methods: {
changeadddress(item,index){
console.log(item)
},
onEdit(item, index) {
// let userid = item.id;
console.log(item);
@ -123,7 +137,8 @@ export default {
// },
},
components: {
Myheader,
Myheader,
MyFooter
},
mounted() {