mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-17 08:03:49 +08:00
更改
This commit is contained in:
@@ -11,17 +11,19 @@
|
||||
<div class="usercontentshow" ref="usercontent">
|
||||
<div class="rc-product ts-scrollable-container">
|
||||
<div class="rc-productcat ts-scrollable">
|
||||
<div
|
||||
class="rc-cat"
|
||||
v-for="(item, index) in userproduct"
|
||||
:key="index"
|
||||
ref="userclicks"
|
||||
@click="selectGoods(item, index)"
|
||||
:class="activeIndex == index ? 'active' : 'unactive'"
|
||||
>
|
||||
<img :src="item.catimage" alt="" />
|
||||
<span>{{ item.title }}</span>
|
||||
</div>
|
||||
<ol>
|
||||
<li
|
||||
v-for="(item, index) in userproduct"
|
||||
:key="index"
|
||||
@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 class="online rc-md-up"></div>
|
||||
@@ -297,11 +299,13 @@
|
||||
<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,
|
||||
@@ -314,7 +318,7 @@ export default {
|
||||
value: "",
|
||||
isLoading: true,
|
||||
userstype: [],
|
||||
activeIndex: "0",
|
||||
activeIndex: "-1",
|
||||
allacindex: 0,
|
||||
userishwo: true,
|
||||
userishwo1: true,
|
||||
@@ -504,16 +508,20 @@ 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) {
|
||||
@@ -743,6 +751,9 @@ export default {
|
||||
this.activeIndexa = index;
|
||||
},
|
||||
selectage(item, index) {
|
||||
if(this.activeIndex=='-1'){
|
||||
this.activeIndex=0;
|
||||
}
|
||||
let tagUsedAge = {};
|
||||
this.activeIndexc = index;
|
||||
this.userishwo1 = !this.userishwo1;
|
||||
@@ -766,6 +777,9 @@ 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) {
|
||||
@@ -796,6 +810,9 @@ 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;
|
||||
@@ -818,6 +835,9 @@ 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) {
|
||||
|
||||
@@ -8,24 +8,24 @@
|
||||
<div class="usercontshow usermain" >
|
||||
<div class="rc-cat" >
|
||||
<div class="rc-center">
|
||||
<div class="rc-header">
|
||||
<div class=" rc-title">
|
||||
<em>
|
||||
{{ item.recipient }}
|
||||
{{ item.name }}
|
||||
</em>
|
||||
<span>
|
||||
{{ item.recipientPhone }}
|
||||
{{ item.tel }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="rc-address">
|
||||
<span>
|
||||
{{ item.detailAddress }}
|
||||
{{ item.address }}
|
||||
</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>
|
||||
@@ -97,14 +97,9 @@ export default {
|
||||
areaList,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onAdd() {
|
||||
Toast("新增地址");
|
||||
|
||||
this.$router.push({ path: "/useraddress/addaddress" });
|
||||
},
|
||||
methods: {
|
||||
onEdit(item, index) {
|
||||
let userid = item.id;
|
||||
// let userid = item.id;
|
||||
console.log(item);
|
||||
this.$router.push({
|
||||
path: "/useraddress/editaddress",
|
||||
@@ -113,22 +108,35 @@ export default {
|
||||
},
|
||||
});
|
||||
},
|
||||
//删除地址
|
||||
async userdelete(item) {
|
||||
console.log(item.memberId);
|
||||
let data = await editdelete(this.userid, item.id);
|
||||
this.editaddress(this.usermessage);
|
||||
console.log(data);
|
||||
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 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,
|
||||
@@ -137,178 +145,14 @@ export default {
|
||||
|
||||
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 >
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@import url("../../assets/css/global.less");
|
||||
@import url("../../assets/css/openaddress.less");
|
||||
</style>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
v-for="(item, index) in searchdata"
|
||||
:key="index"
|
||||
@click="selectsearch(item, index)"
|
||||
:class="activeIndexa == index ? 'active' : 'unactive'"
|
||||
:class="activeIndexa == index"
|
||||
>
|
||||
{{ item.title }}
|
||||
</li>
|
||||
@@ -219,12 +219,13 @@
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="rc-button">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-button">
|
||||
<span @click="openclose()">取消</span>
|
||||
<em @click="openclose()">确认</em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogInfo1" hegight="700px" v-if="!isadrond">
|
||||
@@ -312,11 +313,13 @@
|
||||
</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() {
|
||||
@@ -520,6 +523,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
Myheader,
|
||||
MyFooter
|
||||
},
|
||||
mounted() {
|
||||
this.usetmessage();
|
||||
@@ -595,9 +599,13 @@ 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);
|
||||
@@ -605,6 +613,7 @@ export default {
|
||||
this.catagea.forEach((element) => {
|
||||
element.checked = false;
|
||||
});
|
||||
console.log(this.catagea);
|
||||
}
|
||||
if (element.name == "年龄") {
|
||||
age.push(element);
|
||||
@@ -831,6 +840,9 @@ export default {
|
||||
this.usetmessage(item.title);
|
||||
},
|
||||
selectage(item, index) {
|
||||
if(this.activeIndex=='-1'){
|
||||
this.activeIndex=0;
|
||||
}
|
||||
// debugger;
|
||||
// this.userishwo1 = !this.userishwo1;
|
||||
let tagUsedAge = {};
|
||||
@@ -863,6 +875,9 @@ export default {
|
||||
this.activeIndexc = index;
|
||||
},
|
||||
selectagc(item, index) {
|
||||
if(this.activeIndex=='-1'){
|
||||
this.activeIndex=0;
|
||||
}
|
||||
// let tagFunction = {
|
||||
// petType: this.activeIndex1,
|
||||
// tagFunction: item.tagName,
|
||||
@@ -886,6 +901,9 @@ export default {
|
||||
this.activeIndexd = index;
|
||||
},
|
||||
selectagd(item, index) {
|
||||
if(this.activeIndex=='-1'){
|
||||
this.activeIndex=0;
|
||||
}
|
||||
let tagBreed = {};
|
||||
if (item.checked == false) {
|
||||
item.checked = true;
|
||||
@@ -916,6 +934,10 @@ 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";
|
||||
|
||||
Reference in New Issue
Block a user