!69 2022-1-21 Jiamin

Merge pull request !69 from Admin/sit-jiamin-v2
This commit is contained in:
Admin 2022-01-21 08:46:44 +00:00 committed by Gitee
commit d68d933d79
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 176 additions and 72 deletions

View File

@ -3,6 +3,9 @@
margin: 0;
}
@media screen and (max-width:768px){
.userdit{
display: none;
}
.online{
width:100%;
background:#d7d7d7;
@ -114,8 +117,13 @@ color: #FFFFFF;
@media screen and (min-width: 768px)
{
.rc-max-width--xl{
margin-bottom: 80px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between
}
.rc-button{
@ -123,75 +131,25 @@ display: none;
}
.usercontend {
display:inline-block;
width: 48%;
margin-top: 40px;
padding: 24px 20px;
}
.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;
box-sizing: border-box;
padding: 20px 20px;
}
.rc-title {
display: flex;
@ -292,5 +250,39 @@ img{
}
.userdit{
width: 45%;
height: 164px;
display: inline-block;
height: 164px;
border: 1px solid #D7D7D7;
border-radius: 3px;
margin-top: 65px;
box-sizing: border-box;
border: 1px solid #D7D7D7;
border-radius: 3px;
position: relative;
height: 164px;
box-sizing: border-box;
margin-left: 20px;
}
.alledit{
display: flex;
align-items: center;
justify-content: center;
position: relative;
height: 100%;
img{
width: 31px;
height: 31px;
}
span{
color: #333333;
font-size: 18px;
}
}
}

View File

@ -64,6 +64,10 @@ export default {
defaultValues = this.defaultValues;
this.onConfirm(defaultValues);
}
else{
this.defaultValues = defaultValues;
}
//Initilizing end
},
pickValue(pickId,pickName){
@ -233,6 +237,16 @@ export default {
popAddress() {
this.show=true;
let _self=this;
if(this.defaultValues && this.defaultValues.length>0)
{
this.defaultValues.forEach(function(ele,index){
let tmpPointer=parseInt(_self.inArray(ele,_self.columns[index].values));
if(tmpPointer)
{
_self.columns[index].defaultIndex = tmpPointer;
}
});
}
//mobile
//const picker = this.selectComponent('.ts-area-picker-mobile-component');

View File

@ -63,6 +63,9 @@ export default {
usermessage:null,
dialogInfo1:false,
userpeople:'',
provinceId:'',
cityId:'',
districtId:'',
list: [
{
id: 1,
@ -121,11 +124,40 @@ export default {
});
return
}
else if(this.provinceId===''){
this.$message({
type: 'warning',
message: '请选择省区'
});
return
}
else if(this.cityId===''){
this.$message({
type: 'warning',
message: '请选择市区'
});
return
}
else if(this.districtId===''){
this.$message({
type: 'warning',
message: '请选择详细的区域'
});
return
}
else{
this.editaddress();
}
},
openclose(){
this.$router.push({
path: "/useraddress/openaddress",
// query: {
// id: userid,
// },
});
},
//
@ -144,10 +176,20 @@ export default {
let data = await editaddress(useradd);
if(data){
console.log(data);
this.$message({
if(data){
this.$message({
type: 'warning',
message: '地址添加成功'
});
this.$router.push({
path: "/useraddress/openaddress",
// query: {
// id: userid,
// },
});
}
}
},

View File

@ -57,6 +57,9 @@ export default {
recipientPhone:'',
recipient:'',
addressid:'',
provinceId:'',
cityId:'',
districtId:'',
defaultValues:[],
list: [
{
@ -83,7 +86,35 @@ export default {
},
methods: {
onGetMenu(values){
let user;
console.log(values,+'111111');
console.log(typeof(values[2]));
const objToStr = JSON.stringify(values[2]);
console.log(objToStr);
console.log(typeof(objToStr));
if(objToStr.includes('-')){
console.log("===包含符号")
let user=values[2].id;
user=user.split('-');
this.provinceId=user[0];
this.cityId=user[1];
this.districtId=user[2];
}else{
this.provinceId=values[0].id;
this.cityId=values[1].id;
this.districtId=values[2].id;
console.log("---不包含符号");
}
// let user=values[2].id;
// user=user.split('-');
console.log(this.provinceId,this.cityId,this.districtId);
},
openclose(){
this.$router.push({
path: "/useraddress/openaddress",
});
},
handleClose1(){
this.dialogInfo1 = false
@ -111,20 +142,41 @@ export default {
});
return
}
else if(this.provinceId===''){
this.$message({
type: 'warning',
message: '请填写省区'
});
return
}
else if(this.userpeople===''){
this.$message({
type: 'warning',
message: '请填写市区'
});
return
}
else if(this.userpeople===''){
this.$message({
type: '请填写街道',
message: '请输入姓名'
});
return
}
else{
this.editaddress();
this.edupdate();
}
},
//
async editaddress(item) {
async edupdate(item) {
let useradd={
memberId:this.userid,
id:this.id,
provinceId:'',//id,
cityId:'',//id,
districtId:'',//id,
provinceId:this.provinceId,//id,
cityId:this.cityId,//id,
districtId:this.districtId,//id,
detailAddress:this.detailAddress, //
recipient:this.recipient, //
recipientPhone:this.recipientPhone, //
@ -135,6 +187,10 @@ export default {
type: 'warning',
message: '地址修改成功'
});
this.$router.push({
path: "/useraddress/openaddress",
});
}
},
@ -168,20 +224,20 @@ export default {
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.provinceId=this.$route.query.provinceId;
this.districtId=this.$route.query.districtId;
this.cityId=this.$route.query.cityId;
this.defaultValues=[
{
id:provinceId,
id:this.provinceId,
name:provinceName
},
{
id:cityId,
id:this.cityId,
name:cityName
},
{
id:districtNameid,
id:this.districtId,
name:districtName
}
];

View File

@ -46,8 +46,8 @@
</div>
<div class="usercontshow useredit">
<div class="usercontshow alledit" @click="onAdd()">
<div class="userdit" ref="marinaddress">
<div class="alledit" @click="onAdd()">
<img src="../../static/images/adddress.png" alt="">
<span>添加收货地址</span>
</div>