|
@@ -146,8 +146,8 @@
|
|
|
<div class="add" @click="addressFlag=true;addClick()">新增</div>
|
|
|
</div>
|
|
|
<div class="tops">
|
|
|
- <div class="tops-order-text " style="flex: 0 0 170px;">姓名</div>
|
|
|
- <div class="tops-order-text" style="flex: 0 0 300px;">手机号</div>
|
|
|
+ <div class="tops-order-text ">姓名</div>
|
|
|
+ <div class="tops-order-text">手机号</div>
|
|
|
<div class="tops-order-text">收货地址</div>
|
|
|
<div class="tops-order-text">操作</div>
|
|
|
</div>
|
|
@@ -158,14 +158,15 @@
|
|
|
<div class="list" v-for="item in addressList.arr">
|
|
|
|
|
|
<div class="evaluate-goods">
|
|
|
- <div class="order-info flexs overflow1" style="flex: 0 0 195px;">
|
|
|
+ <div class="order-info flexs overflow1">
|
|
|
{{ item.name }}
|
|
|
</div>
|
|
|
- <div class="order-money flexs color-s" style="flex: 0 0 310px;">{{ item.mobile }}</div>
|
|
|
- <div class="order-status flexs order-money overflow1" >{{ item.full_address }}</div>
|
|
|
+ <div class="order-money flexs color-s" >{{ item.mobile }}</div>
|
|
|
+ <div class="order-status flexs" >{{ item.full_address }}</div>
|
|
|
<div class="address-oper">
|
|
|
<div @click="update(item)">修改</div>
|
|
|
<div @click="del(item.id)">删除</div>
|
|
|
+ <div @click="updateAddress(item)">设为默认</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -279,6 +280,33 @@ const del=(id)=>{
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+const updateAddress=(item)=> {
|
|
|
+ console.log(item);
|
|
|
+ const chars = item.area.split(',');
|
|
|
+ let datas=[]
|
|
|
+ for(var key in chars){
|
|
|
+
|
|
|
+ datas.push(parseInt(chars[key]))
|
|
|
+ }
|
|
|
+ let data={
|
|
|
+ id:item.id,
|
|
|
+ name:item.name,
|
|
|
+ mobile:item.mobile,
|
|
|
+ address:item.address,
|
|
|
+ is_default:1,
|
|
|
+ city:datas[2]
|
|
|
+ }
|
|
|
+ user_address_controller(data).then((res)=>{
|
|
|
+ if(res.code==1){
|
|
|
+ ElMessage.success('默认地址修改成功')
|
|
|
+ // updateFlag.value=false
|
|
|
+ // addressLists();
|
|
|
+ }else{
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
const updateTap=()=>{
|
|
|
loginFormRef.value.validate(valid => {
|
|
|
if (!valid) {
|
|
@@ -434,10 +462,16 @@ isLogin()
|
|
|
color: #333;
|
|
|
font-size: 16px;
|
|
|
line-height: 50px;
|
|
|
- .tops-order-text{
|
|
|
- flex: 1;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
+ .tops-order-text{
|
|
|
+ flex: 1;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .tops-order-text:nth-child(1) {
|
|
|
+ flex: 0 0 170px;
|
|
|
+ }
|
|
|
+ .tops-order-text:nth-child(2) {
|
|
|
+ flex: 0 0 200px;
|
|
|
+ }
|
|
|
}
|
|
|
.collect-tops{
|
|
|
.add{
|
|
@@ -465,9 +499,13 @@ isLogin()
|
|
|
}
|
|
|
}
|
|
|
.address-oper{
|
|
|
+ // width: 100%;
|
|
|
+ // text-align: center;
|
|
|
color: #4171B3;
|
|
|
font-size: 16px;
|
|
|
display: flex;
|
|
|
+ margin: 0 auto;
|
|
|
+ // justify-content: center;
|
|
|
div{
|
|
|
margin-right: 10px;
|
|
|
cursor: pointer;
|
|
@@ -511,13 +549,15 @@ isLogin()
|
|
|
// height: 66px;
|
|
|
background: #FFFFFF;
|
|
|
border-bottom: 1px solid #D7DBE0;
|
|
|
- padding: 0 60px 0 0;
|
|
|
+ // padding: 0 60px 0 0;
|
|
|
+ // margin: 20px 20px 0 20px;
|
|
|
line-height: 66px;
|
|
|
.evaluate-goods{
|
|
|
display: flex;
|
|
|
color: #333;
|
|
|
font-size: 16px;
|
|
|
- justify-content: space-between;
|
|
|
+ margin: 20px 20px 0 20px;
|
|
|
+ // justify-content: space-between;
|
|
|
.color-s{
|
|
|
color: #333330;
|
|
|
font-size: 16px;
|
|
@@ -530,18 +570,26 @@ isLogin()
|
|
|
line-height: 140px;
|
|
|
}
|
|
|
.order-status{
|
|
|
- text-align: left!important;
|
|
|
- width:400px!important;
|
|
|
- font-size: 14px;
|
|
|
- line-height: normal;
|
|
|
- margin-top: 23px;
|
|
|
+ text-align: center;
|
|
|
+ // width:400px!important;
|
|
|
+ max-width: 400px;
|
|
|
+ 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;
|
|
|
+ line-height: normal;
|
|
|
+ margin-top: 23px;
|
|
|
//margin-right: 100px;
|
|
|
}
|
|
|
.order-money{
|
|
|
//width: 200px;
|
|
|
- //flex: 0 0 200px;
|
|
|
+ flex: 0 0 200px;
|
|
|
// width: 300px;
|
|
|
- // text-align: center;
|
|
|
+ text-align: center;
|
|
|
|
|
|
.order-button{
|
|
|
width: 100px;
|
|
@@ -556,8 +604,8 @@ isLogin()
|
|
|
}
|
|
|
}
|
|
|
.order-info{
|
|
|
- flex: 1;
|
|
|
- text-align: center;
|
|
|
+ flex: 0 0 170px;
|
|
|
+ text-align: center;
|
|
|
.order-img{
|
|
|
img{
|
|
|
width: 100px;
|