!45 revert -Jiamin

Merge pull request !45 from Admin/revert-merge-44-sit-Carl
This commit is contained in:
Admin 2022-01-20 02:45:19 +00:00 committed by Gitee
commit 704232e442
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
13 changed files with 470 additions and 820 deletions

View File

@ -1,212 +0,0 @@
@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{
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;
}
}
.rc-max-width--xl{
h2{
display: none;
}
}
}
.rc-max-width--xl{
margin-top: 16px;
input{
width: 258px;
height: 34px;
border: none;
border-bottom: 1px solid #808285;
color: #999999;
font-size: 16px;
margin-left: 2px;
}
span{
font-size: 16px;
font-weight: bold;
width: 22%;
text-align: center;
color: #333333;
margin-top: 2px;
}
.rc-people{
width: 100%;
display: flex;
align-items: center;
span{
text-align: left;
}
}
// .rc-phone{
// }
// .rc-address{
// }
// .rc-useaddress{
// }
}
}
@media screen and (min-width: 769px)
{
.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{
// }
// .rc-useaddress{
// }
}
}

View File

@ -1,89 +0,0 @@
@media screen and (max-width:768px){
.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;
position: absolute;
bottom: 0;
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;
}
}
.rc-max-width--xl{
margin-top: 16px;
input{
width: 258px;
height: 34px;
border: none;
border-bottom: 1px solid #808285;
color: #999999;
font-size: 16px;
margin-left: 2px;
}
span{
font-size: 16px;
font-weight: bold;
width: 22%;
text-align: center;
color: #333333;
margin-top: 2px;
}
.rc-people{
width: 100%;
display: flex;
align-items: center;
span{
text-align: left;
}
}
// .rc-phone{
// }
// .rc-address{
// }
// .rc-useaddress{
// }
}
}
@media screen and (min-width: 769px)
{
}

View File

@ -405,15 +405,12 @@ img, picture {
}
.ts-scrollable{
li{
width: 6rem;
overflow: hidden;
// width: 4.125rem;
padding: 0 0.62rem;
height: 1.625rem;
margin-left: .5rem;
font-size:.75rem;
text-overflow:ellipsis;
white-space:nowrap;
line-height: 1.625rem;
line-height: 1.375rem;
}
&::-webkit-scrollbar{
display:none;
@ -425,7 +422,6 @@ img, picture {
/* pc端 */
@media screen and (min-width: 769px)
{
/deep/.van-tabs__wrap
{
max-width: 768px;

View File

@ -26,7 +26,10 @@ span{
}
}
}
.rc-max-width--xl{
.rc-usermain{
width: 92%;
margin: 0 auto;
ul{
height: 70px;
display: block;

View File

@ -9,18 +9,10 @@ ul li ol li em strong i {
//rc-main start
margin-top:.23rem;
.usersearch {
.ts-scrollable-container{
h2{
font-weight: bold;
color: #333333;
}
}
margin: 0 auto;
overflow: hidden;
}
//rc-main end
}
@ -32,53 +24,6 @@ ul li ol li em strong i {
.usercontentshow{
position: relative;
.rc-productcat {
display: flex;
align-items: center;
flex-wrap: nowrap;
ol{
display: flex;
align-items: center;
flex-flow: row;
.ts-standard-btn{
width: 7.87rem;
height: 2.25rem;
background: #FFFFFF;
border-radius: 6.25rem;
background: none;
display: flex;
align-items: center;
justify-content: center;
margin-left: 1rem;
color: #999999;
img {
height: 1rem;
}
span {
margin-left: 0.18rem;
}
}
}
.userrccat{
width: 32%;
height: 34px;
background: #ffffff;
border-radius: 100px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 0;
font-size: 14px;
span {
margin-left: 3px;
}
img {
width: 24px;
height: 16px;
}
border: 2px solid #E2001A;
}
}
.userrccat{
width: 32%;
height: 34px;
@ -148,7 +93,48 @@ ul li ol li em strong i {
height: 617px;
background: white;
z-index: 999;
.rc-productcat {
display: flex;
align-items: center;
flex-wrap: nowrap;
.rc-cat {
width: 32%;
height: 34px;
background: #ffffff;
border-radius: 100px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 0;
font-size: 14px;
span {
margin-left: 3px;
}
img {
width: 24px;
height: 16px;
}
}
.userrccat{
width: 32%;
height: 34px;
background: #ffffff;
border-radius: 100px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 0;
font-size: 14px;
span {
margin-left: 3px;
}
img {
width: 24px;
height: 16px;
}
border: 2px solid #E2001A;
}
}
}
@ -233,7 +219,6 @@ ul li ol li em strong i {
justify-content: center;
font-size: .14rem;
margin-right:.2rem;
margin-left: 16px;
span {
margin-left: 3px;
}
@ -318,7 +303,6 @@ ul li ol li em strong i {
//pc端
@media screen and (min-width: 768px){
.userrccat{
width: 327px;
height: 48px;
@ -344,7 +328,6 @@ ul li ol li em strong i {
}
.online{
width:100%;
margin-top: 17px;
&.bold{
height:0.5rem;
margin-top: 5rem;
@ -396,12 +379,6 @@ ul li ol li em strong i {
.rc-bottom{
.rc-productcat {
ol{
display: flex;
align-items: center;
flex-flow: row;
}
display: flex;
align-items: center;
flex-wrap: nowrap;
@ -508,7 +485,7 @@ border-radius: 30px;
margin-left: 16px;
}
span {
margin-left: 4px;
margin-left: 0px;
}
img {
width: 24px;
@ -565,38 +542,18 @@ border-radius: 30px;
}
*/
.ts-scrollable-container{
overflow-y: hidden;
overflow-x: clip;
width: 100%;
margin-top: 18px;
h2{
display: flex;
align-items: center;
width: 4%;
}
.ts-scrollable{
overflow-y: hidden;
overflow-x: clip;
width: 100%;
ol{
display: flex;
align-items: center;
}
.ts-standard-btn{
width: 237px;
height: 48px;
background: #FFFFFF;
border-radius: 30px;
background: none;
display: flex;
align-items: center;
justify-content: center;
margin-left: 40px;
img {
width: 24px;
height: 24px;
}
span {
margin-left: 8px;
}
}
}
}

View File

@ -14,6 +14,15 @@ ul li ol li em strong i {
position: relative;
margin-top: 5.25rem;
.usersearch {
width: 100%;
margin: 0 auto;
overflow: hidden;
margin-top: 20px;
.rc-padding--md{
padding: 0;
}
}
.active{
border: 2px solid #E2001A;
color: #E2001A;
@ -29,22 +38,6 @@ ul li ol li em strong i {
}
//手机端
@media screen and (max-width: 768px) {
.usersearch {
width: 100%;
margin: 0 auto;
overflow: hidden;
margin-top: 20px;
.ts-scrollable-container{
h2{
font-weight: bold;
color: #333333;
}
}
.rc-padding--md{
padding: 0;
}
}
.rc-button
{
display: flex;
@ -54,9 +47,6 @@ ul li ol li em strong i {
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
height: 80px;
align-items: center;
position: absolute;
bottom: 0;
padding:0 20px 0 20px;
span
{
width: 160px;
@ -139,9 +129,8 @@ strong{
color: #333333;
margin-top: 1.5rem;
h2{
font-size: 16px;
font-size: 18px;
font-weight: bold;
color: #333333;
}
span {
font-size: 14px;
@ -179,9 +168,6 @@ strong{
// 我想搜
.usercontentshow{
position: relative;
.rc-column{
padding-bottom: 0;
}
.rc-productcat {
display: flex;
align-items: center;
@ -203,15 +189,13 @@ justify-content: center;
margin-left: 1rem;
color: #999999;
img {
width: 1.5rem;
height: 1rem;
}
span {
margin-left: 0.18rem;
}
}
li:first-child{
margin-left: 0;
}
}
//筛选
.userselect{
@ -236,7 +220,7 @@ margin-left: 0.18rem;
}
.ts-scrollable-container{
margin-top: 1rem;
margin-top: 0.93rem;
}
}
@ -252,7 +236,6 @@ margin-left: 0.18rem;
}
h2{
margin-left: 0;
font-weight: bold;
}
}
@ -292,10 +275,22 @@ border-radius: 100px;
.rc-bottom{
position: fixed;
background: white;
height: 617px;
bottom: 0;
left: 0;
z-index: 9;
ol li{
background: none;
width: 7.87rem;
height: 2.25rem;
background: #FFFFFF;
border-radius: 6.25rem;
background: none;
display: flex;
align-items: center;
justify-content: center;
margin-left: 1rem;
}
}
.rc-bottoma{
@ -381,25 +376,7 @@ border-radius: 100px;
}
//pc端
@media screen and (min-width: 768px){
.usersearch {
width: 100%;
margin: 0 auto;
overflow: hidden;
margin-top: 40px;
.ts-scrollable-container{
h2{
font-weight: bold;
color: #333333;
}
}
.rc-padding--md{
padding: 0;
}
}
.online{
margin-top: 47px;
}
/deep/.el-dialog__header {
padding: 0;
margin: 0;
@ -415,7 +392,6 @@ border-radius: 100px;
display: flex;
align-items: center;
width: 6%;
color: #333333;
}
.ts-scrollable{
// overflow-y: hidden;
@ -525,10 +501,9 @@ margin-left: 8px;
color: #333333;
margin-top: 12px;
h2 {
font-size: 26px;
font-weight: bold;
font-size: 18px;
color: #333333;
margin: 0;
margin-left: 12px;
}
span {
font-size: 14px;
@ -622,16 +597,13 @@ border-radius: 30px;
/deep/.van-search__content--square{
background: white;
}
/deep/.van-search{
padding-left: 0;
}
.van-search__content--square{
display: flex;
align-items: center;
justify-content: center;
background: white;
border: 1px solid #D7D7D7;
height: 50px;
height: 80px;
width: 1200px;
border-radius: 200px;
}
@ -676,11 +648,9 @@ border-radius: 30px;
}
.rc-product {
h2 {
font-size: 26px;
font-weight: bold;
font-size: 18px;
color: #333333;
margin: 0;
margin-left: 12px;
}
}
.rc-productcat {

View File

@ -2,7 +2,7 @@
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-max-width--xl rc-main ">
<div class="rc-usermain ">
<ul>
<li v-for="(item,index) in userrecord" :key="index">
{{item.title}}
@ -20,13 +20,13 @@
</div>
<!-- <div class="rc-button">
<div class="rc-button">
<div class="rc-order">
<span>积分兑换</span>
</div>
</div> -->
</div>
</div>
</template>
@ -115,7 +115,6 @@ export default {
<style lang="less" scoped>
@import url("../../assets/css/integral.less");
@import url("@/assets/css/global.less");
</style>

View File

@ -342,7 +342,9 @@ obligation(item,index){
}else{
if(item.title=='收货地址'){
this.$router.push({ name: "useraddress-openaddress",})
this.$router.push({
path: `/useraddress/openaddress/`
})
console.log('这是地址的跳转');
}
@ -355,7 +357,7 @@ this.$router.push({ name: "useraddress-openaddress",})
this.$router.push({
path: `/personal/discount/`
})
console.log('这是地址的跳转');
}

View File

@ -11,19 +11,17 @@
<div class="usercontentshow" ref="usercontent">
<div class="rc-product ts-scrollable-container">
<div class="rc-productcat ts-scrollable">
<ol>
<li
<div
class="rc-cat"
v-for="(item, index) in userproduct"
:key="index"
ref="userclicks"
@click="selectGoods(item, index)"
:class="activeIndex == index ? 'active' : 'unactive'"
class="ts-standard-btn"
ref="userstandard"
>
<img :src="item.catimage" alt="" />
<span>{{ item.title }}</span>
</li>
</ol>
</div>
</div>
</div>
<div class="online rc-md-up"></div>
@ -299,13 +297,11 @@
<em>确认</em>
</div>
</el-dialog>
<MyFooter></MyFooter>
</div>
</template>
<script>
import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import {
userstype,
biaome,
@ -318,7 +314,7 @@ export default {
value: "",
isLoading: true,
userstype: [],
activeIndex: "-1",
activeIndex: "0",
allacindex: 0,
userishwo: true,
userishwo1: true,
@ -508,20 +504,16 @@ export default {
},
components: {
Myheader,
MyFooter
},
mounted() {
let stype = this.$route.query.stype;
this.$nextTick(() => {
this.$refs.userstandard[0].style.margin = 0 + "px";
});
this.userst();
// this.activeIndex = stype;
// if (stype !== "" && stype !== undefined) {
// this.onmessage(stype);
// } else {
// this.usetmessage();
// }
this.activeIndex = stype;
if (stype !== "" && stype !== undefined) {
this.onmessage(stype);
} else {
this.usetmessage();
}
},
methods: {
async usersearch(stype, usertype) {
@ -751,9 +743,6 @@ export default {
this.activeIndexa = index;
},
selectage(item, index) {
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
let tagUsedAge = {};
this.activeIndexc = index;
this.userishwo1 = !this.userishwo1;
@ -777,9 +766,6 @@ export default {
},
selectagc(item, index) {
// let tagFunction = {};
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
this.activeIndexd = index;
this.userishwo2 = !this.userishwo2;
if (item.checked == false) {
@ -810,9 +796,6 @@ export default {
this.usersearch(this.userserachlist, this.activeIndex1);
},
selectagd(item, index) {
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
let tagBreed = {};
this.activeIndexe = index;
this.userishwo3 = !this.userishwo3;
@ -835,9 +818,6 @@ export default {
this.usersearch(this.userserachlist, this.activeIndex1);
},
selectproduct(item, index) {
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
this.activeIndexb = index;
// console.log(this.userishwo=!this.userishwo)
if (item.checked == false) {

View File

@ -1,137 +1,85 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="usercontend">
<div class="rc-max-width--xl">
<h2>新增收货地址</h2>
<div class="rc-max-width--xl rc-people">
<span>收货人:</span>
<input type="text" placeholder="请输入收货人姓名">
<van-address-edit
:area-list="areaList"
show-postal
show-delete
show-set-default
show-search-result
:search-result="searchResult"
:area-columns-placeholder="['请选择', '请选择', '请选择']"
@save="onSave"
@delete="onDelete"
@change-detail="onChangeDetail"
/>
<addressInput></addressInput>
</div>
<div class="rc-max-width--xl rc-phone">
<span>手机号码:</span>
<input type="text" placeholder="请输入11位手机号码">
</div>
<div class="rc-max-width--xl rc-address">
<span>所在地区:</span>
<input type="text" placeholder="请选择所在地区">
</div>
<div class="rc-max-width--xl rc-useaddress">
<span>详细地址:</span>
<input type="text" placeholder="小区、门牌号等" class="userinput">
<textarea rows="10" cols="30" placeholder="请输入详细地址">
</textarea>
</div>
</div>
<div class="rc-button">
<span @click="openclose()">取消</span>
<em @click="openclose()">确认</em>
</div>
</div>
<!-- <div class="rc-button">
<div class="rc-footbutton" @click="onAdd()">
<span>新增收货地址</span>
</div>
</div> -->
<MyFooter></MyFooter>
</div>
</template>
<script>
import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue'
import { editaddress } from "../../ajax/getData";
import { Toast } from 'vant';
import { areaList } from '@vant/area-data';
import addressInput from '~/components/addressInput.vue' //
export default {
data(){
return{
chosenAddressId: "1",
checked: true,
areaList,
searchResult: [],
userid:null,
usermessage:null,
list: [
{
id: 1,
name: "张三",
tel: "13000000000",
address: "浙江省杭州市西湖区文三路 138 号",
isDefault: true,
},
{
id: 2,
name: "李四",
tel: "1310000000",
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
{
id: 3,
name: "李四",
tel: "1310000000",
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
],
};
addressdetail:'',
}
},
methods:{
onEdit(item, index) {
// let userid = item.id;
console.log(item);
this.$router.push({
path: "/useraddress/editaddress",
query: {
id: item,
},
async onSave(content) {
// Toast('save');
console.log(content);
let recipient=content.name;
let tel=content.tel;
let provinceId=Number(content.areaCode.substring(0,2)+'0000')//id
let cityId=Number(content.areaCode.substring(0,4)+'00') //id
let districtId=Number(content.areaCode);//
console.log(provinceId,cityId,districtId);
console.log(content.areaCode.substring(0,2)+'0000');//
console.log(content.areaCode.substring(0,4)+'00'); //id
console.log(content.areaCode) //
//id / id/id/
let data = await editaddress(this.userid,this.addressdetail,recipient,tel,provinceId,cityId,districtId);
if(data){
this.$message({
type: 'warning',
message: '地址保存成功'
});
}
console.log(data);
},
onAdd(item, index) {
// let userid = item.id;
// console.log(item);
this.$router.push({
path: "/useraddress/addaddress",
// query: {
// id: userid,
// },
});
onDelete() {
Toast('delete');
},
onChangeDetail(val){
this.addressdetail=val;
}
//
// async userdelete(item) {
// console.log(item.memberId);
// let data = await editdelete(this.userid, item.id);
// this.editaddress(this.usermessage);
// console.log(data);
// },
},
mounted(){
let user= JSON.parse(localStorage.getItem("userInfo"));
// this.userid=user.data.id;
this.userid=3242
//
// async editaddress(user) {
// user.data.id=844350
// let data = await selectaddress(user.data.id);
// this.list=data.data;
// console.log(this.list);
// console.log(data);
// },
},
components:{
Myheader,
MyFooter
addressInput
},
mounted() {
//
// this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage);
// this.userid = this.usermessage.data.id;
},
};
}
</script>
<style lang="less" scoped >
@import url("../../assets/css/global.less");
@import url("../../assets/css/addaddress.less");
<style>
</style>

View File

@ -1,131 +1,99 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<van-address-edit
:area-list="areaList"
show-postal
show-set-default
show-search-result
:search-result="searchResult"
:address-info="AddressInfo"
:area-columns-placeholder="['请选择', '请选择', '请选择']"
@save="onSave"
@change-detail="onChangeDetail"
>
<!-- <div class="main">
<span>我的</span>
<div class="rc-max-width--xl rc-main">
<div class="rc-max-width--xl rc-people">
<span>收货人:</span>
<input type="text" placeholder="李某某">
</div>
<div class="rc-max-width--xl rc-phone">
<span>手机号码:</span>
<input type="text" placeholder="15279944631">
</div>
<div class="rc-max-width--xl rc-address">
<span>所在地区:</span>
<input type="text" placeholder="请选择所在地区">
</div>
<div class="rc-max-width--xl rc-useaddress">
<span>详细地址:</span>
<input type="text" placeholder="天河客运站">
</div>
</div>
<!-- <div class="rc-button">
<div class="rc-footbutton" @click="onAdd()">
<span>新增收货地址</span>
</div>
</div> -->
<div class="rc-button">
<span @click="openclose()">取消</span>
<em @click="openclose()">确认</em>
</div>
<!-- <MyFooter></MyFooter> -->
</div>
</van-address-edit>
</template>
<script>
import Myheader from '~/components/header.vue'
import MyFooter from '~/components/rc-footer.vue'
import { Toast } from 'vant';
import { areaList } from '@vant/area-data';
import { editupdate } from "../../ajax/getData";
export default {
data(){
return{
chosenAddressId: "1",
checked: true,
userid: null,
usermessage:null,
list: [
{
id: 1,
name: "张三",
tel: "13000000000",
address: "浙江省杭州市西湖区文三路 138 号",
isDefault: true,
areaList,
searchResult: [],
AddressInfo:{//
name:'',//
tel:'',//
province:'',//
city:'',//
country:'',//
address:'',
areaCode:'',//codeID
addressDetail:'',//
isDefault:false,//
},
{
id: 2,
name: "李四",
tel: "1310000000",
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
{
id: 3,
name: "李四",
tel: "1310000000",
address: "浙江省杭州市拱墅区莫干山路 50 号",
},
],
};
}
},
methods:{
onEdit(item, index) {
// let userid = item.id;
console.log(item);
this.$router.push({
path: "/useraddress/editaddress",
query: {
id: item,
valf(){
setTimeout(()=>{
let s=this.$route.query.id;
console.log(s);
this.AddressInfo.name= s.recipient,
this.AddressInfo.tel=s.recipientPhone,
this.AddressInfo.province=s.name
this.AddressInfo.city=s.name
this.AddressInfo.addressDetail=s.detailAddress
this.AddressInfo.isDefault=s.isDefault,
this.AddressInfo.country='江西省'
this.AddressInfo.address='江西省'
},100)
},
});
async onSave(content) {
let data = await editupdate(this.tel);
console.log(data);
console.log(content);
// Toast('save');
console.log(content.areaCode.substring(0,2)+'0000');//
console.log(content.areaCode.substring(0,4)+'00'); //id
console.log(content.areaCode) //
},
onAdd(item, index) {
// let userid = item.id;
// console.log(item);
this.$router.push({
path: "/useraddress/addaddress",
// query: {
// id: userid,
// },
});
onDelete() {
Toast('delete');
},
onChangeDetail(val){
//
// async userdelete(item) {
// console.log(item.memberId);
// let data = await editdelete(this.userid, item.id);
// this.editaddress(this.usermessage);
// console.log(data);
// },
//
// async editaddress(user) {
// user.data.id=844350
// let data = await selectaddress(user.data.id);
// this.list=data.data;
// console.log(this.list);
// console.log(data);
// },
console.log(this.searchResult);
console.log(val);
}
},
mounted(){
this.valf();
this.searchResult = [
{
name: '黄龙万科中心',
address: '杭州市西湖区',
},
];
},
components:{
Myheader,
MyFooter,
},
mounted() {
//
// this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
// this.editaddress(this.usermessage);
// this.userid = this.usermessage.data.id;
},
};
}
</script>
<style lang="less" scoped >
@import url("../../assets/css/global.less");
@import url("../../assets/css/editaddress.less");
<style>
</style>

View File

@ -1,29 +1,27 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="usercontend">
<div class="rc-max-width--xl rc-main">
<div class="rc-cat" v-for="(item, index) in list" :key="index">
<div class="usermain">
<div class="rc-main" v-for="(item, index) in list" :key="index">
<div class="rc-center">
<div class=" rc-title">
<div class="rc-header">
<em>
{{ item.name }}
{{ item.recipient }}
</em>
<span>
{{ item.tel }}
{{ item.recipientPhone }}
</span>
</div>
<div class="rc-address">
<span>
{{ item.address }}
{{ item.detailAddress }}
</span>
</div>
<div class="rc-footer">
<div class="rc-foot">
<img src="../../assets/image/userselect.png" alt="">
<span>设置为默认收货地址</span>
<!-- <van-switch v-model="checked" /> -->
</div>
<div class="rc-right">
<span @click="onEdit(item, index)">编辑</span>
@ -34,13 +32,6 @@
</div>
</div>
<div class="usercontend useradd">
<img src="../../assets/image/userselect.png" alt="">
<span>添加收货地址</span>
</div>
</div>
<div class="rc-button">
<div class="rc-footbutton" @click="onAdd()">
@ -51,8 +42,11 @@
</template>
<script>
import { areaList } from '@vant/area-data';
import Myheader from '~/components/header.vue'
import { areaList } from "@vant/area-data";
import { selectaddress } from "../../ajax/getData";
import { editdelete } from "../../ajax/getData";
import Myheader from "~/components/header.vue";
import { Toast } from "vant";
export default {
data() {
return {
@ -85,8 +79,13 @@ export default {
};
},
methods: {
onAdd() {
Toast("新增地址");
this.$router.push({ path: "/useraddress/addaddress" });
},
onEdit(item, index) {
// let userid = item.id;
let userid = item.id;
console.log(item);
this.$router.push({
path: "/useraddress/editaddress",
@ -95,50 +94,201 @@ export default {
},
});
},
onAdd(item, index) {
// let userid = item.id;
// console.log(item);
this.$router.push({
path: "/useraddress/addaddress",
// query: {
// id: userid,
// },
});
},
//
// async userdelete(item) {
// console.log(item.memberId);
// let data = await editdelete(this.userid, item.id);
// this.editaddress(this.usermessage);
// console.log(data);
// },
async userdelete(item) {
console.log(item.memberId);
let data = await editdelete(this.userid, item.id);
this.editaddress(this.usermessage);
console.log(data);
},
//
// async editaddress(user) {
// user.data.id=844350
// let data = await selectaddress(user.data.id);
// this.list=data.data;
// console.log(this.list);
// console.log(data);
// },
async editaddress(user) {
user.data.id=844350
let data = await selectaddress(user.data.id);
this.list=data.data;
console.log(this.list);
console.log(data);
},
},
components: {
Myheader
Myheader,
},
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.editaddress(this.usermessage);
this.userid = this.usermessage.data.id;
},
};
</script>
<style lang="less" scoped >
@import url("../../assets/css/global.less");
@import url("../../assets/css/openaddress.less");
.rc-main {
width: 93%;
margin: 0 auto;
margin-top: 8px;
}
//
@media screen and(min-width: 320px) and(max-width:768px) {
.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;
.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: 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;
padding-bottom: 20px;
margin-top: 8px;
.rc-right {
span {
border-bottom: 1px solid #666666;
}
span:first-child {
margin-right: 16px;
}
}
}
}
//pc
@media screen and (min-width: 768px) and (max-width: 1920px) {
.usermain{
width: 90%;
margin: 0 auto;
}
.rc-main{
width: 45%;
height: 164px;
margin-top: 60px;
background: #FFFFFF;
border: 1px solid #D7D7D7;
opacity: 1;
border-radius: 3px;
margin-left: 40px;
float: left;
.rc-center{
margin-top: 24px;
margin-left: 24px;
}
}
.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: 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;
padding-bottom: 20px;
margin-top: 8px;
.rc-right {
span {
border-bottom: 1px solid #666666;
}
span:first-child {
margin-right: 16px;
}
}
}
}
</style>

View File

@ -34,7 +34,7 @@
v-for="(item, index) in searchdata"
:key="index"
@click="selectsearch(item, index)"
:class="activeIndexa == index"
:class="activeIndexa == index ? 'active' : 'unactive'"
>
{{ item.title }}
</li>
@ -218,9 +218,6 @@
{{ item.tagName }}
</li>
</ol>
</div>
</div>
</div>
<div class="rc-button">
<span @click="openclose()">取消</span>
@ -228,6 +225,8 @@
</div>
</div>
</div>
</div>
</div>
<el-dialog :visible.sync="dialogInfo1" hegight="700px" v-if="!isadrond">
<div class="usersearch">
<div class="usercontentshow" ref="usercontent">
@ -313,13 +312,11 @@
</el-dialog>
</div>
<!-- rc-main end -->
<MyFooter></MyFooter>
</div>
</template>
<script>
import Myheader from "~/components/header.vue";
import MyFooter from '~/components/rc-footer.vue'
import { biaome, userstype, searchchanpin } from "../../ajax/getData";
export default {
data() {
@ -523,7 +520,6 @@ export default {
},
components: {
Myheader,
MyFooter
},
mounted() {
this.usetmessage();
@ -599,13 +595,9 @@ export default {
if (element.name == "品种") {
pinzhong.push(element);
this.catageb = pinzhong;
this.catageb=this.catageb.sort((n1,n2)=>{
return n1.sort-n2.sort;
})
this.catageb.forEach((element) => {
element.checked = false;
});
// console.log(this.catageb);
}
if (element.name == "功能") {
gonneg.push(element);
@ -613,7 +605,6 @@ export default {
this.catagea.forEach((element) => {
element.checked = false;
});
console.log(this.catagea);
}
if (element.name == "年龄") {
age.push(element);
@ -840,9 +831,6 @@ export default {
this.usetmessage(item.title);
},
selectage(item, index) {
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
// debugger;
// this.userishwo1 = !this.userishwo1;
let tagUsedAge = {};
@ -875,9 +863,6 @@ export default {
this.activeIndexc = index;
},
selectagc(item, index) {
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
// let tagFunction = {
// petType: this.activeIndex1,
// tagFunction: item.tagName,
@ -901,9 +886,6 @@ export default {
this.activeIndexd = index;
},
selectagd(item, index) {
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
let tagBreed = {};
if (item.checked == false) {
item.checked = true;
@ -934,10 +916,6 @@ export default {
},
selectproduct(item, index) {
this.activeIndexb = index;
console.log(this.activeIndex);
if(this.activeIndex=='-1'){
this.activeIndex=0;
}
if (item.checked == false) {
item.checked = true;
this.$refs.chosebox[index].className = "active";