!63 2022-1-20 Jiamin

Merge pull request !63 from Admin/sit-jiamin-v2
This commit is contained in:
Admin 2022-01-21 02:50:58 +00:00 committed by Gitee
commit 69aa6e9a60
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
11 changed files with 1145 additions and 551 deletions

View File

@ -517,6 +517,7 @@ export const goodsmessage = (productCode) => {
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码 //地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
export const editaddress = (memberId, detailAddress,recipient,tel,provinceId,cityId,districtId) => { export const editaddress = (memberId, detailAddress,recipient,tel,provinceId,cityId,districtId) => {
var data = { var data = {
memberId:844350, memberId:844350,
provinceId:25, provinceId:25,
@ -528,7 +529,7 @@ export const goodsmessage = (productCode) => {
zipCode:'214423', zipCode:'214423',
default:false, default:false,
} }
return fetch('memberAddress?type=add', data, 'POST' ) return fetch('memberAddress?type=add', memberId, 'POST' )
} }
//删除 //删除
@ -541,21 +542,13 @@ export const goodsmessage = (productCode) => {
} }
//地址的编辑 //地址的编辑
export const editupdate = (mobile, pet,address) => { export const editupdate = (userid,) => {
var data = { // var data = {
// memberId:userid,
memberId:'3242', // id:id,
id:'620111', // isDefault:isDefault,
provinceId:'', // }
cityId:'', return fetch('memberAddress?type=update', userid, 'POST' )
districtId:'',
detailAddress:'江西省萍乡市',
recipient:'刘佳敏',
recipientPhone:'13407998521',
zipCode:'',
isDefault:'',
}
return fetch('memberAddress?type=update', data, 'POST' )
} }
//修改密码 //修改密码

View File

@ -2,16 +2,6 @@
@media screen and (max-width:768px){ @media screen and (max-width:768px){
.usercontend{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
.rc-useaddress{
textarea{
display: none;
}
}
.rc-button{ .rc-button{
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -46,6 +36,17 @@
margin-left: 40px; margin-left: 40px;
} }
} }
.usercontend{
align-items: center;
justify-content: center;
flex-direction: column;
min-height: 70vh;
.rc-useaddress{
textarea{
display: none;
}
}
.rc-max-width--xl{ .rc-max-width--xl{
h2{ h2{
display: none; display: none;
@ -55,7 +56,7 @@
} }
.rc-max-width--xl{ .rc-max-width--xl{
margin-top: 16px; padding: 24px 20px 0 20px;
input{ input{
width: 258px; width: 258px;
height: 34px; height: 34px;
@ -100,6 +101,40 @@
@media screen and (min-width: 769px) @media screen and (min-width: 769px)
{ {
.rc-button{
display: flex;
justify-content: center;
font-size: 14px;
width: 100%;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
padding:0 20px 0 20px;
span
{
width: 160px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #E2001A;
}
em{
font-style: normal;
width: 164px;
height: 48px;
background: #E2001A;
cursor: pointer;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
margin-left: 40px;
}
}
.usercontend{ .usercontend{
display: flex; display: flex;
align-items: center; align-items: center;
@ -197,12 +232,11 @@
// .rc-phone{ // .rc-phone{
// } // }
// .rc-address{ .rc-address{
position: relative;
// } }
// .rc-useaddress{
// }

View File

@ -1,3 +1,6 @@
@media screen and (max-width:768px){ @media screen and (max-width:768px){
.rc-button{ .rc-button{
display: flex; display: flex;
@ -7,8 +10,6 @@
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1); box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px; height: 80px;
align-items: center; align-items: center;
position: absolute;
bottom: 0;
padding:0 20px 0 20px; padding:0 20px 0 20px;
span span
{ {
@ -35,8 +36,27 @@
margin-left: 40px; margin-left: 40px;
} }
} }
.usercontend{
align-items: center;
justify-content: center;
flex-direction: column;
min-height: 70vh;
.rc-useaddress{
textarea{
display: none;
}
}
.rc-max-width--xl{ .rc-max-width--xl{
margin-top: 16px; h2{
display: none;
}
}
}
.rc-max-width--xl{
padding: 24px 20px 0 20px;
input{ input{
width: 258px; width: 258px;
height: 34px; height: 34px;
@ -61,8 +81,6 @@
span{ span{
text-align: left; text-align: left;
} }
} }
// .rc-phone{ // .rc-phone{
@ -83,7 +101,146 @@
@media screen and (min-width: 769px) @media screen and (min-width: 769px)
{ {
.rc-button{
display: flex;
justify-content: center;
font-size: 14px;
width: 100%;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
padding:0 20px 0 20px;
span
{
width: 160px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #E2001A;
}
em{
font-style: normal;
width: 164px;
height: 48px;
background: #E2001A;
cursor: pointer;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
margin-left: 40px;
}
}
.usercontend{
display: flex;
align-items: center;
justify-content: center;
position: relative;
flex-direction: column;
.rc-button{
display: flex;
justify-content: center;
font-size: 14px;
width: 100%;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
padding:0 20px 0 20px;
span
{
width: 160px;
height: 48px;
border: 2px solid #E2001A;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #E2001A;
}
em{
font-style: normal;
width: 164px;
height: 48px;
background: #E2001A;
cursor: pointer;
border-radius: 30px;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
margin-left: 40px;
}
}
h2{
font-size: 26px;
color: #333333;
text-align: center;
font-weight: bold;
}
.rc-useaddress{
display: flex;
align-items: center;
textarea{
width: 680px;
height: 118px;
background: #FFFFFF;
border: 1px solid #808285;
opacity: 1;
border-radius: 0px;
padding-top: 12px;
padding-left: 16px;
}
.userinput{
display: none;
}
}
}
.rc-max-width--xl{
margin-top: 16px;
input{
width: 680px;
height: 45px;
border: 1px solid #808285;
color: #999999;
font-size: 16px;
margin-left: 2px;
padding-left: 16px;
}
span{
font-size: 16px;
font-weight: bold;
width: 10%;
text-align: center;
color: #333333;
margin-top: 2px;
}
.rc-people{
width: 100%;
display: flex;
align-items: center;
}
// .rc-phone{
// }
.rc-address{
position: relative;
}
}
} }

View File

@ -1,11 +1,238 @@
.rc-margin-bottom--lg{
margin: 0;
}
@media screen and (max-width:768px){ @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: 0px 20px 24px 20px;
min-height: 60vh;
.rc-cat{
margin-top: 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;
}
}
} }
@media screen and (min-width: 769px)
}
@media screen and (min-width: 768px)
{ {
.rc-max-width--xl{
margin-bottom: 80px;
}
.rc-button{
display: none;
}
.usercontend {
display:inline-block;
}
.usercontend{
margin-top: 40px;
}
.online{
display: none;
}
.rc-button{
display: none;
}
.useredit{
width: 640px;
height: 166px;
background: #FFFFFF;
border: 1px solid #D7D7D7;
border-radius: 3px;
display: flex;
align-items: center;
justify-content: center;
display:inline-block;
margin-left: 35px;
img{
width: 31px;
height: 31px;
}
span{
color: #333333;
font-size: 18px;
}
.alledit{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
}
.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;
cursor: pointer;
}
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 {
display: none;
}
.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;
} }

View File

@ -0,0 +1,366 @@
@media screen and (max-width:768px){
.active {
font-size: 14px;
color: #e2001a;
cursor: pointer;
}
.unactive {
font-size: 14px;
color: #444444;
cursor: pointer;
}
.usercontshow{
padding: 0 1.5rem;
.online{
margin: 0;
&.bold{
height: 0.5rem;
}
}
.rc-usermaina{
width: 100%;
height: 100%;
}
.rc-headera {
display: flex;
justify-content: space-between;
height: 64px;
align-items: center;
}
.rc-userheader{
display: none;
}
.rc-center {
width: 100%;
height: 245px;
margin-top: 8px;
.rc-usermain {
.pc-bottom{
display: none;
}
display: flex;
.rc-image {
border: 1px solid #D8D8D8;
margin-top: 17px;
;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottomm{
display: none;
}
display: flex;
flex-direction: column;
width: 100%;
margin-left: 16px;
justify-content: center;
em
{
font-style: normal;
display: block;
font-size: 16px;
margin-top: 18px;
font-weight: bold;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 14px;
span{
display: block;
margin-top: 16px;
}
}
.rc-userbottom {
display: flex;
justify-content: space-between;
margin-top: 8px;
span{
color: #666666;
font-size: 14px;
}
i{
font-style: normal;
color: #E1001A;
font-size: 18px;
font-weight: bold;
}
}
}
.rc-bottom {
display: flex;
align-items: center;
justify-content: center;
margin-top: 24px;
span {
display: block;
width: 130px;
display: flex;
align-items: center;
line-height: 40px;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
font-weight: bold;
}
span:last-child{
margin-left: 15px;
}
}
}
.rc-title {
height: 52px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 14px;
color: #999999;
margin-left: 8px;
}
em{
font-style: normal;
font-size: 14px;
color: #333333;
}
i{
font-style: normal;
font-size: 14px;
color: #333333;
}
.rc-usertitle strong{
display: none;
}
}
}
}
@media screen and (min-width: 769px)
{
.active {
font-size: 18px;
color: #e2001a;
cursor: pointer;
// margin-left: 40px;
}
.unactive {
font-size: 18px;
color: #444444;
cursor: pointer;
// margin-left: 80px;
}
.usercontshow{
.rc-headera {
display: flex;
height: 64px;
align-items: center;
border: 1px solid #D7D7D7;
border-radius: 3px 3px 0px 0px;
font-size: 18px;
span:first-child{
margin-left: 40px;
}
span{
margin-left: 80px;
}
}
.rc-userheader{
width: 100%;
height: 64px;
background: #F6F6F6;
border: 1px solid #D7D7D7;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 18px;
span:first-child{
margin-left: 173px;
}
span:last-child{
margin-right: 87px;
}
}
.rc-center {
width: 100%;
height: 220px;
border: 1px solid #D7D7D7;
.rc-usermain {
display: flex;
justify-content: space-between;
align-items: center;
height: 164px;
.rc-usercenter{
width: 25%;
em{
font-size: 18px;
}
}
.rc-image {
border: 1px solid #D8D8D8;
margin-left: 40px;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottom{
display: none;
}
display: flex;
width: 100%;
margin-left: 16px;
em
{
font-style: normal;
font-weight: bold;
font-size: 16px;
margin-top: 18px;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 16px;
span{
display: block;
margin-top: 6px;
}
}
.rc-userbottomm {
display: flex;
justify-content: space-between;
align-items: center;
width: 58%;
font-size: 20px;
color: #E1001A;
font-weight: bold;
i{
font-style: normal;
}
}
.pc-bottom {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-right: 40px;
span {
display: block;
width: 130px;
cursor: pointer;
display: flex;
align-items: center;
line-height: 40px;
font-weight: bold;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
}
span:last-child{
margin-top: 15px;
}
}
}
.rc-bottom {
display: none;
}
}
.rc-title {
height: 55px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 16px;
color: #999999;
margin-left: 8px;
}
strong{
font-style: normal;
font-size: 16px;
color: #444444;
}
em{
font-style: normal;
font-size: 16px;
color: #333333;
}
i{
font-style: normal;
font-size: 16px;
margin-left: 40px;
color: #333333;
}
.rc-usertitle{
margin-right: 73px;
display: flex;
align-items: center;
em{
display: block;
margin-left: 8px;
}
}
}
}
}

View File

@ -457,6 +457,17 @@ export default {
} }
.ts-area-picker-desktop{ .ts-area-picker-desktop{
display:none; display:none;
}
.ts-area-picker-value-displayer{
width: 258px;
height: 34px;
border: none;
border-bottom: 1px
solid #808285;
color: #999999;
font-size: 16px;
margin-left: 2px;
padding-left: 0;
} }
} }
@media screen and (min-width:769px) @media screen and (min-width:769px)

View File

@ -2,8 +2,8 @@
<div> <div>
<Myheader></Myheader> <Myheader></Myheader>
<div class="rc-top"></div> <div class="rc-top"></div>
<div class="rc-header"> <div class="online bold"></div>
<div class="rc-main"> <div class="usercontshow rc-max-width--xl">
<div class="rc-headera"> <div class="rc-headera">
<span <span
v-for="(item, index) in discountlist" v-for="(item, index) in discountlist"
@ -15,6 +15,7 @@
</span> </span>
</div> </div>
<div class="online bold"></div>
<div class="rc-userheader"> <div class="rc-userheader">
<span v-for="(item, index) in message" :key="index"> <span v-for="(item, index) in message" :key="index">
{{item.title}} {{item.title}}
@ -22,7 +23,7 @@
</div> </div>
<div class="rc-center" v-for="(item, index) in goldmedal" :key="index"> <div class="rc-center" v-for="(item, index) in goldmedal" :key="index">
<div class="rc-usermaina" v-for="(userlist,index) in item.orderDetailList" :key="index" > <div class="rc-usermaina" >
<div class="rc-title"> <div class="rc-title">
<div> <div>
<i>订单编号:</i><span>{{ item.orderNumber }}</span> <i>订单编号:</i><span>{{ item.orderNumber }}</span>
@ -41,15 +42,13 @@
<div class="rc-usercenter"> <div class="rc-usercenter">
<em>{{ item.usereat }}</em> <em>{{ item.usereat }}</em>
<div class="rc-userright"> <div class="rc-userright">
<span>规格:{{ userlist.num }}</span> <span>规格:{{ item.num }}</span>
</div> </div>
</div> </div>
<div class="rc-userbottom"> <div class="rc-userbottom">
<span>数量:{{ userlist.pcs}}</span> <span>数量:{{ item.pcs}}</span>
<i>{{ userlist.ecPrice }}</i> <i>{{ item.ecPrice }}</i>
</div> </div>
<div class="rc-userbottomm"> <div class="rc-userbottomm">
<i>{{ item.userprice }}</i> <i>{{ item.userprice }}</i>
<span>{{item.orderstype}}</span> <span>{{item.orderstype}}</span>
@ -62,10 +61,9 @@
<span @click="userfind()">查看订单</span> <span @click="userfind()">查看订单</span>
</div> </div>
</div> </div>
<!-- <div class="rc-bottom"> <div class="rc-bottom">
<span @click="userpay(item,index)">{{item.status=='0'?'取消订单':item.status=='1'?'确认收货':item.status=='2'?'再次购买':item.status=='3'?'再次购买':'异常订单'}}</span> <span @click="userpay(item,index)">{{item.status=='0'?'取消订单':item.status=='1'?'确认收货':item.status=='2'?'再次购买':item.status=='3'?'再次购买':'异常订单'}}</span>
<span @click="userfind(item)">{{item.status=='0'?'立即支付':item.status=='1'?'查看订单':item.status=='2'?'查看订单':item.status=='3'?'查看订单':'异常订单'}}</span> <span @click="userfind(item)">{{item.status=='0'?'立即支付':item.status=='1'?'查看订单':item.status=='2'?'查看订单':item.status=='3'?'查看订单':'异常订单'}}</span>
</div> -->
</div> </div>
</div> </div>
</div> </div>
@ -300,360 +298,6 @@ async canceldanhao(orderNumber){
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url("../../assets/css/global.less");
// @import url("../../assets/css/orderquantity.less");
@media screen and(min-width: 320px) and(max-width:768px) {
.active {
font-size: 14px;
color: #e2001a;
cursor: pointer;
}
.unactive {
font-size: 14px;
color: #444444;
cursor: pointer;
}
.rc-header {
width: 100%;
.rc-main {
width: 92%;
margin: 0 auto;
.rc-usermaina{
width: 100%;
height: 100%;
}
.rc-headera {
display: flex;
justify-content: space-between;
height: 64px;
align-items: center;
}
.rc-userheader{
display: none;
}
.rc-center {
width: 100%;
height: 245px;
margin-top: 8px;
.rc-usermain {
.pc-bottom{
display: none;
}
display: flex;
.rc-image {
border: 1px solid #D8D8D8;
margin-top: 17px;
;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottomm{
display: none;
}
display: flex;
flex-direction: column;
width: 100%;
margin-left: 16px;
justify-content: center;
em
{
font-style: normal;
display: block;
font-size: 16px;
margin-top: 18px;
font-weight: bold;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 14px;
span{
display: block;
margin-top: 16px;
}
}
.rc-userbottom {
display: flex;
justify-content: space-between;
margin-top: 8px;
span{
color: #666666;
font-size: 14px;
}
i{
font-style: normal;
color: #E1001A;
font-size: 18px;
font-weight: bold;
}
}
}
.rc-bottom {
display: flex;
align-items: center;
justify-content: center;
margin-top: 24px;
span {
display: block;
width: 130px;
display: flex;
align-items: center;
line-height: 40px;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
font-weight: bold;
}
span:last-child{
margin-left: 15px;
}
}
}
.rc-title {
height: 52px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 14px;
color: #999999;
margin-left: 8px;
}
em{
font-style: normal;
font-size: 14px;
color: #333333;
}
i{
font-style: normal;
font-size: 14px;
color: #333333;
}
.rc-usertitle strong{
display: none;
}
}
}
}
}
// /* 768px1920 *pc/
@media screen and (min-width: 768px) and (max-width: 1920px) {
.active {
font-size: 18px;
color: #e2001a;
cursor: pointer;
// margin-left: 40px;
}
.unactive {
font-size: 18px;
color: #444444;
cursor: pointer;
// margin-left: 80px;
}
.rc-header {
.rc-main {
width: 92%;
margin: 0 auto;
.rc-headera {
display: flex;
height: 64px;
align-items: center;
border: 1px solid #D7D7D7;
border-radius: 3px 3px 0px 0px;
font-size: 18px;
span:first-child{
margin-left: 40px;
}
span{
margin-left: 80px;
}
}
.rc-userheader{
width: 100%;
height: 64px;
background: #F6F6F6;
border: 1px solid #D7D7D7;
display: flex;
align-items: center;
justify-content: space-between;
font-size: 18px;
span:first-child{
margin-left: 173px;
}
span:last-child{
margin-right: 87px;
}
}
.rc-center {
width: 100%;
height: 220px;
border: 1px solid #D7D7D7;
.rc-usermain {
display: flex;
justify-content: space-between;
align-items: center;
height: 164px;
.rc-usercenter{
width: 25%;
em{
font-size: 18px;
}
}
.rc-image {
border: 1px solid #D8D8D8;
margin-left: 40px;
img {
width: 96px;
height: 96px;
display: block;
}
}
.rc-right {
.rc-userbottom{
display: none;
}
display: flex;
width: 100%;
margin-left: 16px;
em
{
font-style: normal;
font-weight: bold;
font-size: 16px;
margin-top: 18px;
color: #E1001A;
}
}
.rc-userright {
display: flex;
flex-direction: column;
color: #666666;
font-size: 16px;
span{
display: block;
margin-top: 6px;
}
}
.rc-userbottomm {
display: flex;
justify-content: space-between;
align-items: center;
width: 58%;
font-size: 20px;
color: #E1001A;
font-weight: bold;
i{
font-style: normal;
}
}
.pc-bottom {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-right: 40px;
span {
display: block;
width: 130px;
cursor: pointer;
display: flex;
align-items: center;
line-height: 40px;
font-weight: bold;
text-align: center;
color: #e2001a;
height: 40px;
border: 2px solid #e2001a;
justify-content: center;
border-radius: 30px;
}
span:last-child{
margin-top: 15px;
}
}
}
.rc-bottom {
display: none;
}
}
.rc-title {
height: 55px;
display: flex;
align-items: center;
border-bottom: 1px solid #d8d8d8;
justify-content: space-between;
span{
font-size: 16px;
color: #999999;
margin-left: 8px;
}
strong{
font-style: normal;
font-size: 16px;
color: #444444;
}
em{
font-style: normal;
font-size: 16px;
color: #333333;
}
i{
font-style: normal;
font-size: 16px;
margin-left: 40px;
color: #333333;
}
.rc-usertitle{
margin-right: 73px;
display: flex;
align-items: center;
em{
display: block;
margin-left: 8px;
}
}
}
}
}
}
</style> </style>

View File

@ -7,32 +7,30 @@
<h2>新增收货地址</h2> <h2>新增收货地址</h2>
<div class="rc-max-width--xl rc-people"> <div class="rc-max-width--xl rc-people">
<span>收货人:</span> <span>收货人:</span>
<input type="text" placeholder="请输入收货人姓名"> <input type="text" placeholder="请输入收货人姓名" v-model="userpeople">
</div> </div>
<div class="rc-max-width--xl rc-phone"> <div class="rc-max-width--xl rc-phone">
<span>手机号码:</span> <span>手机号码:</span>
<input type="text" placeholder="请输入11位手机号码"> <input type="text" placeholder="请输入11位手机号码" v-model="tel" :error-message="usertel">
</div> </div>
<div class="rc-max-width--xl rc-address"> <div class="rc-max-width--xl rc-address">
<span>所在地区:</span> <span>所在地区:</span>
<input type="text" placeholder="请选择所在地区"> <!-- <input type="text" placeholder="请选择所在地区"> -->
<addressInput></addressInput> <addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1"></addressInput>
</div> </div>
<div class="rc-max-width--xl rc-useaddress"> <div class="rc-max-width--xl rc-useaddress">
<span>详细地址:</span> <span>详细地址:</span>
<input type="text" placeholder="小区、门牌号等" class="userinput"> <input type="text" placeholder="小区、门牌号等" class="userinput" v-model="alladdress">
<textarea rows="10" cols="30" placeholder="请输入详细地址"> <textarea rows="10" cols="30" placeholder="请输入详细地址">
</textarea> </textarea>
</div> </div>
<addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1"></addressInput> </div>
</div> </div>
<div class="rc-button"> <div class="rc-button">
<span @click="openclose()">取消</span> <span @click="openclose()">取消</span>
<em @click="openclose()">确认</em> <em @click="register()">确认</em>
</div>
</div> </div>
<!-- <div class="rc-button"> <!-- <div class="rc-button">
<div class="rc-footbutton" @click="onAdd()"> <div class="rc-footbutton" @click="onAdd()">
@ -52,14 +50,19 @@
import Myheader from '~/components/header.vue' import Myheader from '~/components/header.vue'
import addressInput from '~/components/addressInput.vue' import addressInput from '~/components/addressInput.vue'
import MyFooter from '~/components/rc-footer.vue' import MyFooter from '~/components/rc-footer.vue'
import {editaddress} from "../../ajax/getData";
export default { export default {
data() { data() {
return { return {
chosenAddressId: "1", chosenAddressId: "1",
usermessage:null,
checked: true, checked: true,
tel: "",
alladdress:'',
userid: null, userid: null,
usermessage:null, usermessage:null,
dialogInfo1:false, dialogInfo1:false,
userpeople:'',
list: [ list: [
{ {
id: 1, id: 1,
@ -86,40 +89,68 @@ export default {
methods: { methods: {
onGetMenu(values){ onGetMenu(values){
console.log(values,+'111111'); console.log(values,+'111111');
let user=values[2].id;
user=user.split('-');
this.provinceId=user[0];
this.cityId=user[1];
this.districtId=user[2];
}, },
handleClose1(){ handleClose1(){
this.dialogInfo1 = false this.dialogInfo1 = false
}, },
onEdit(item, index) {
// let userid = item.id; register(){
console.log(item); console.log(this.tel)
this.$router.push({ if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
path: "/useraddress/editaddress", this.$message({
query: { type: 'warning',
id: item, message: '手机号码输入有误'
},
}); });
}, return
onAdd(item, index) { }else if(this.alladdress===''){
// let userid = item.id; this.$message({
// console.log(item); type: 'warning',
this.$router.push({ message: '请输入详细地址'
path: "/useraddress/addaddress",
// query: {
// id: userid,
// },
}); });
return
}
else if(this.userpeople===''){
this.$message({
type: 'warning',
message: '请输入姓名'
});
return
}
else{
this.editaddress();
}
}, },
//
async editaddress(item) {
// this.userid
let useradd={
memberId:this.userid,
detailAddress:this.alladdress,
recipient:this.userpeople,
recipientPhone:this.tel,
provinceId:this.provinceId,
cityId:this.cityId,
districtId:this.districtId
// }
// async userdelete(item) { let data = await editaddress(useradd);
// console.log(item.memberId); if(data){
// let data = await editdelete(this.userid, item.id); console.log(data);
// this.editaddress(this.usermessage); this.$message({
// console.log(data); type: 'warning',
// }, message: '地址添加成功'
});
}
},
// //
// async editaddress(user) { // async editaddress(user) {
@ -135,8 +166,23 @@ export default {
MyFooter, MyFooter,
addressInput addressInput
}, },
computed:{
usertel() {
if (this.tel === "") {
return "";
} else if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel)) {
return "手机号格式错误";
} else {
return "";
}
},
},
mounted() { mounted() {
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage);
this.userid = this.usermessage.data.id;
// //
// this.usermessage = JSON.parse(localStorage.getItem("userInfo")); // this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage); // this.editaddress(this.usermessage);

View File

@ -2,23 +2,23 @@
<div> <div>
<Myheader></Myheader> <Myheader></Myheader>
<div class="rc-top"></div> <div class="rc-top"></div>
<div class="usercontend">
<div class="rc-max-width--xl rc-main"> <div class="rc-max-width--xl">
<div class="rc-max-width--xl rc-people"> <div class="rc-max-width--xl rc-people">
<span>收货人:</span> <span>收货人:</span>
<input type="text" placeholder="李某某"> <input type="text" placeholder="" v-model="recipient">
</div> </div>
<div class="rc-max-width--xl rc-phone"> <div class="rc-max-width--xl rc-phone">
<span>手机号码:</span> <span>手机号码:</span>
<input type="text" placeholder="15279944631"> <input type="text" placeholder="" v-model="recipientPhone">
</div> </div>
<div class="rc-max-width--xl rc-address"> <div class="rc-max-width--xl rc-address">
<span>所在地区:</span> <span>所在地区:</span>
<input type="text" placeholder="请选择所在地区"> <addressInput @getmenu="onGetMenu" @closeDialog = "handleClose1" :dialogInfo1="dialogInfo1" :defaultValues="defaultValues"></addressInput>
</div> </div>
<div class="rc-max-width--xl rc-useaddress"> <div class="rc-max-width--xl rc-useaddress">
<span>详细地址:</span> <span>详细地址:</span>
<input type="text" placeholder="天河客运站"> <input type="text" placeholder="" v-model="detailAddress" >
</div> </div>
</div> </div>
@ -27,12 +27,14 @@
<span>新增收货地址</span> <span>新增收货地址</span>
</div> </div>
</div> --> </div> -->
</div>
<div class="rc-button"> <div class="rc-button">
<span @click="openclose()">取消</span> <span @click="openclose()">取消</span>
<em @click="openclose()">确认</em> <em @click="register()">确认</em>
</div> </div>
<!-- <MyFooter></MyFooter> --> <MyFooter></MyFooter>
</div> </div>
</template> </template>
@ -40,13 +42,22 @@
import Myheader from '~/components/header.vue' import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue' import MyFooter from '~/components/rc-footer.vue'
import { editupdate} from "../../ajax/getData";
import addressInput from '~/components/addressInput.vue'
export default { export default {
data() { data() {
return { return {
chosenAddressId: "1", chosenAddressId: "1",
checked: true, checked: true,
userid: null, userid: null,
dialogInfo1:false,
usermessage:null, usermessage:null,
useradrname:[],
detailAddress:'',
recipientPhone:'',
recipient:'',
addressid:'',
defaultValues:[],
list: [ list: [
{ {
id: 1, id: 1,
@ -71,27 +82,64 @@ export default {
}; };
}, },
methods: { methods: {
onEdit(item, index) { onGetMenu(values){
// let userid = item.id; console.log(values,+'111111');
console.log(item);
this.$router.push({
path: "/useraddress/editaddress",
query: {
id: item,
}, },
handleClose1(){
this.dialogInfo1 = false
},
register(){
console.log(this.tel)
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.recipientPhone) || this.recipientPhone === "") {
this.$message({
type: 'warning',
message: '手机号码输入有误'
}); });
}, return
onAdd(item, index) { }else if(this.alladdress===''){
// let userid = item.id; this.$message({
// console.log(item); type: 'warning',
this.$router.push({ message: '请输入详细地址'
path: "/useraddress/addaddress",
// query: {
// id: userid,
// },
}); });
return
}
else if(this.userpeople===''){
this.$message({
type: 'warning',
message: '请输入姓名'
});
return
}
else{
this.editaddress();
}
}, },
//
async editaddress(item) {
let useradd={
memberId:this.userid,
id:this.id,
provinceId:'',//id,
cityId:'',//id,
districtId:'',//id,
detailAddress:this.detailAddress, //
recipient:this.recipient, //
recipientPhone:this.recipientPhone, //
}
let data = await editupdate(useradd);
if(data){
this.$message({
type: 'warning',
message: '地址修改成功'
});
}
},
// //
@ -114,13 +162,37 @@ export default {
components: { components: {
Myheader, Myheader,
MyFooter, MyFooter,
addressInput
}, },
created(){
let provinceName=this.$route.query.provinceName;
let districtName=this.$route.query.districtName;
let cityName=this.$route.query.cityName
let provinceId=this.$route.query.provinceId;
let districtNameid=this.$route.query.districtId;
let cityId=this.$route.query.cityId;
this.defaultValues=[
{
id:provinceId,
name:provinceName
},
{
id:cityId,
name:cityName
},
{
id:districtNameid,
name:districtName
}
];
},
mounted() { mounted() {
// this.userid = JSON.parse(localStorage.getItem("userInfo")).data.id;
// this.usermessage = JSON.parse(localStorage.getItem("userInfo")); this.recipient=this.$route.query.recipient
// this.editaddress(this.usermessage); this.recipientPhone=this.$route.query.recipientPhone
// this.userid = this.usermessage.data.id; this.detailAddress=this.$route.query.detailAddress
this.id=this.$route.query.id;
}, },
}; };
</script> </script>

View File

@ -6,15 +6,15 @@
<div class="rc-center"> <div class="rc-center">
<div class=" rc-title"> <div class=" rc-title">
<em> <em>
{{ item.name }} {{ item.recipient }}
</em> </em>
<span> <span>
{{ item.tel }} {{ item.recipientPhone }}
</span> </span>
</div> </div>
<div class="rc-address"> <div class="rc-address">
<span> <span>
{{ item.address }} {{item.provinceName}}{{ item.districtName }}{{item.detailAddress}}
</span> </span>
</div> </div>
<div class="rc-footer"> <div class="rc-footer">
@ -32,12 +32,30 @@
</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">
<div class="usercontshow alledit" @click="onAdd()">
<img src="../../static/images/adddress.png" alt="">
<span>添加收货地址</span>
</div>
</div>
</div> </div>
<div class="rc-button"> <div class="rc-button">
<div class="rc-footbutton" @click="onAdd()"> <div class="rc-footbutton" @click="onAdd()">
<span>新增收货地址</span> <span>新增收货地址</span>
</div> </div>
</div> </div>
<MyFooter></MyFooter>
</div> </div>
</template> </template>
@ -45,50 +63,55 @@
import Myheader from '~/components/header.vue' import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue' import MyFooter from '~/components/rc-footer.vue'
import { selectaddress,editupdate,editdelete} from "../../ajax/getData";
export default { export default {
data() { data() {
return { return {
chosenAddressId: "1", chosenAddressId: "1",
checked: true, checked: true,
userid: null, userid: null,
userlist:[],
usermessage:null, usermessage:null,
list: [ list: [
{
id: 1,
name: "张三",
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: { methods: {
changeadddress(item,index){ changeadddress(item,index){
console.log(item) console.log(item,index);
console.log(item.isDefault)
if(item.isDefault==false){
item.isDefault=true
}else{
item.isDefault=false;
}
this.editupdate(this.userid,item.id,item.isDefault)
setTimeout(() => {
this.editaddress();
}, 200);
//
}, },
onEdit(item, index) { onEdit(item, index) {
// let userid = item.id; // let userid = item.id;
console.log(item); console.log(item);
// debugger
this.$router.push({ this.$router.push({
path: "/useraddress/editaddress", path: "/useraddress/editaddress",
query: { query: {
id: item, recipient: item.recipient,
recipientPhone:item.recipientPhone,
detailAddress:item.detailAddress,
id:item.id,
provinceName:item.provinceName,
districtName:item.cityName,
cityName:item.districtName,
provinceId:item.provinceId,
districtId:item.districtId,
cityId:item.cityId,
}, },
}); });
}, },
@ -103,24 +126,43 @@ export default {
}); });
}, },
//
async editupdate(userid,addressid,isDefault) {
let useradd={
memberId:userid,
id:addressid,
isDefault:isDefault,
}
let data = await editupdate(useradd);
if(data){
this.$message({
type: 'warning',
message: '更改成功'
});
}
// if(data){
// this.editaddress();
// }
},
// //
// async userdelete(item) { async userdelete(item) {
// console.log(item.memberId); console.log(item.memberId);
// let data = await editdelete(this.userid, item.id); let data = await editdelete(this.userid, item.id);
// this.editaddress(this.usermessage); this.editaddress();
// console.log(data); console.log(data);
// }, },
// //
// async editaddress(user) { async editaddress(user) {
// user.data.id=844350 // user.data.id=844350;
// let data = await selectaddress(user.data.id); let data = await selectaddress(this.userid);
// this.list=data.data; console.log(data);
this.list=data.data;
// console.log(this.list); // console.log(this.list);
// console.log(data); console.log(data);
// }, },
}, },
components: { components: {
Myheader, Myheader,
@ -128,9 +170,11 @@ export default {
mounted() { mounted() {
// //
// this.usermessage = JSON.parse(localStorage.getItem("userInfo")); this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage); this.userid = this.usermessage.data.id;
// this.userid = this.usermessage.data.id; console.log(this.userid);
this.editaddress(this.userid);
}, },
}; };
</script> </script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB