mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
Merged 0 version
This commit is contained in:
parent
115d1510d8
commit
abd4ea6a6b
@ -205,8 +205,8 @@ img, picture {
|
||||
color: #666666;
|
||||
}
|
||||
.tuntop{
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
width: 1.25rem;
|
||||
height: auto;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.1);
|
||||
opacity: 1;
|
||||
|
270
rc-busness/assets/css/login.less
Normal file
270
rc-busness/assets/css/login.less
Normal file
@ -0,0 +1,270 @@
|
||||
// 手机端
|
||||
@media screen and(min-width: 320px) and(max-width:768px) {
|
||||
.van-field-one{
|
||||
width: 335px;
|
||||
background: #F6F6F6;
|
||||
border-radius: 4px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.van-field-two{
|
||||
margin: 0 auto;
|
||||
width: 335px;
|
||||
height: 48px;
|
||||
background: #F6F6F6;
|
||||
margin: 0 auto;
|
||||
border-radius: 4px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
.usecheck{
|
||||
display: flex;
|
||||
text-align: left;
|
||||
width: 335px;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
margin-top: 18px;
|
||||
|
||||
}
|
||||
.container {
|
||||
font-size: 0.1rem;
|
||||
.van-field__body {
|
||||
border-bottom: 1px solid red;
|
||||
}
|
||||
.content {
|
||||
margin-top: 24px;
|
||||
}
|
||||
.userfoget {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
border-bottom: 1px solid #333333;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.rc-header {
|
||||
text-align: center;
|
||||
}
|
||||
.rc-header span:first-of-type {
|
||||
margin-right: 60px;
|
||||
}
|
||||
.rc-header span:last-child {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.active {
|
||||
font-size: 18px;
|
||||
color: #666666;
|
||||
}
|
||||
.unactive {
|
||||
font-size: 18px;
|
||||
color: #999999;
|
||||
}
|
||||
.rc-use {
|
||||
width: 155px;
|
||||
height: 48px;
|
||||
opacity: 1;
|
||||
border-radius: 30px;
|
||||
outline: none;
|
||||
border: none;
|
||||
border: 2px solid #e1001a;
|
||||
color: #e1001a;
|
||||
font-size: 14px;
|
||||
}
|
||||
.rc-user {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.userbutton {
|
||||
width: 335px;
|
||||
height: 48px;
|
||||
background: #e2001a;
|
||||
opacity: 1;
|
||||
border-radius: 30px;
|
||||
outline: none;
|
||||
border: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
van-button {
|
||||
width: 335px;
|
||||
height: 48px;
|
||||
background: #e2001a;
|
||||
opacity: 1;
|
||||
border-radius: 30px;
|
||||
}
|
||||
input {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
button {
|
||||
outline: none;
|
||||
border: none;
|
||||
list-style: none;
|
||||
background: none;
|
||||
}
|
||||
.rc-center {
|
||||
font-size: 30px;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
.rc-center input {
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
}
|
||||
.userlogin {
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.rc-button {
|
||||
font-size: 14px;
|
||||
width:335px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
color: #333333;
|
||||
}
|
||||
.rc-button span {
|
||||
border-bottom: 1px solid #333333;
|
||||
}
|
||||
.rc-button span {
|
||||
margin-left: 20px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
.rc-button span:last-child {
|
||||
margin-right: 20px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
// /* 最小768px最大1920 *pc端/
|
||||
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
||||
.usecheck{
|
||||
display: flex;
|
||||
text-align: left;
|
||||
width: 395px;
|
||||
margin: 0 auto;
|
||||
align-items: center;
|
||||
margin-top: 18px;
|
||||
|
||||
}
|
||||
/deep/
|
||||
.van-field-one{
|
||||
width: 395px;
|
||||
height: 48px;
|
||||
background: #F6F6F6;
|
||||
border-radius: 4px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.van-field-two{
|
||||
margin: 0 auto;
|
||||
width: 395px;
|
||||
height: 48px;
|
||||
background: #F6F6F6;
|
||||
margin: 0 auto;
|
||||
border-radius: 4px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
.container {
|
||||
.content {
|
||||
margin-top: 24px;
|
||||
}
|
||||
.userfoget {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
border-bottom: 1px solid #333333;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.rc-header {
|
||||
text-align: center;
|
||||
}
|
||||
.rc-header span:first-of-type {
|
||||
margin-right: 60px;
|
||||
}
|
||||
.rc-header span:last-child {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.active {
|
||||
font-size: 0.1rem;
|
||||
color: #666666;
|
||||
}
|
||||
.unactive {
|
||||
font-size: 0.1rem;
|
||||
color: #999999;
|
||||
}
|
||||
.rc-use {
|
||||
width: 1.55rem;
|
||||
height: 0.48rem;
|
||||
opacity: 1;
|
||||
border-radius: 0.15rem;
|
||||
border: 2px solid #e1001a;
|
||||
color: #e1001a;
|
||||
font-size: 0.14rem;
|
||||
background: white;
|
||||
|
||||
}
|
||||
.rc-user {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 40px;
|
||||
}
|
||||
.userbutton {
|
||||
width: 3.8rem;
|
||||
height: 0.48rem;
|
||||
background: #e2001a;
|
||||
border-radius: 0.15rem;
|
||||
outline: none;
|
||||
border: none;
|
||||
margin: 0 auto;
|
||||
}
|
||||
van-button {
|
||||
width: 335px;
|
||||
height: 48px;
|
||||
background: #e2001a;
|
||||
opacity: 1;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
input {
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
button {
|
||||
outline: none;
|
||||
border: none;
|
||||
list-style: none;
|
||||
background: none;
|
||||
}
|
||||
.rc-center {
|
||||
font-size: 30px;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
}
|
||||
.rc-center input {
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
}
|
||||
.userlogin {
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.rc-button {
|
||||
font-size: 14px;
|
||||
width:395px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 0 auto;
|
||||
color: #333333;
|
||||
}
|
||||
.rc-button span {
|
||||
border-bottom: 1px solid #333333;
|
||||
}
|
||||
.rc-button span {
|
||||
margin-left: 20px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
.rc-button span:last-child {
|
||||
margin-right: 20px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
@ -177,7 +177,7 @@
|
||||
<a href="/">
|
||||
<span class="rc-screen-reader-text">Royal Canin Logo</span>
|
||||
<object id="main-logo" data="/images/logo--crown.svg?v=8-11-2" type="image/svg+xml" class="rc-modal__logo" data-js-import-interactive-svg>
|
||||
<img src="#profiles/custom/royal_canin_profile/themes/royal_canin/images/1x1.gif" style="background-image: url(#profiles/custom/royal_canin_profile/themes/royal_canin/images/logo--crown.png?v=8-11-2)" width="150" height="100" alt="Royal Canin logo" />
|
||||
<img src="/images/1x1.gif" style="background-image: url(/images/logo--crown.png?v=8-11-2)" width="150" height="100" alt="Royal Canin logo" />
|
||||
</object>
|
||||
</a>
|
||||
</header>
|
||||
|
@ -630,7 +630,7 @@
|
||||
import unlogin from "~/components/unlogin.vue";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import '@vant/touch-emulator';
|
||||
import { userquery,postCourseId,biaomessage,userque } from "../ajax/getData";
|
||||
import { userquery,postCourseId,biaomessage,userque,searchchanpin } from "../ajax/getData";
|
||||
const settings = require("@/config");
|
||||
export default {
|
||||
middleware: 'metaTitle',
|
||||
@ -640,10 +640,12 @@
|
||||
return{
|
||||
processinformation:[],
|
||||
catshi:[],
|
||||
userstype:'',
|
||||
userunlogin:false,
|
||||
searchBar:true,
|
||||
usermessage:[],
|
||||
catgan:[],
|
||||
userserachlist:[{}],
|
||||
doggan:[],
|
||||
dogtype:[
|
||||
{
|
||||
@ -656,14 +658,7 @@
|
||||
{
|
||||
title: "老年犬",
|
||||
},
|
||||
// {
|
||||
// title: "品种猫",
|
||||
|
||||
// },
|
||||
// {
|
||||
// title: "亚健康",
|
||||
|
||||
// },
|
||||
|
||||
],
|
||||
dogshi:[],
|
||||
catlist:[],
|
||||
@ -970,14 +965,22 @@ activeInde3:0,
|
||||
},
|
||||
methods:{
|
||||
userdog(item,index){
|
||||
this.dogmessage(index)
|
||||
this.userstype=1;
|
||||
let petType={
|
||||
petType:1,
|
||||
name:index,
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(petType)){
|
||||
this.userserachlist.push(petType)
|
||||
}
|
||||
}
|
||||
this.dogmessage(this.userserachlist)
|
||||
},
|
||||
|
||||
|
||||
userlook(order){
|
||||
console.log(order);
|
||||
if(order==0){
|
||||
console.log(this.catlist);
|
||||
this.catshi=this.catlist;
|
||||
}
|
||||
if(order==1){
|
||||
@ -1003,7 +1006,7 @@ activeInde3:0,
|
||||
{
|
||||
let fixedCatbarSeperator = document.getElementById("fixed-catbar-seperator");
|
||||
let scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
|
||||
if((scrolltop-fixedCatbarSeperator.offsetTop)>=0)
|
||||
if((scrolltop-fixedCatbarSeperator.offsetTop)>0)
|
||||
{
|
||||
this.gotop = true
|
||||
this.searchBar=false
|
||||
@ -1025,37 +1028,44 @@ activeInde3:0,
|
||||
}, 10);
|
||||
},
|
||||
async courseId(item) {
|
||||
console.log(item);
|
||||
console.log(this.usermessage);
|
||||
let data = await postCourseId(this.productCode,1,this.usermessage.data.id,this.usermessage.data.mobile,item.picFile,item.name,item.basePrice,item.specifications);
|
||||
if(data){
|
||||
this.productlist=data;
|
||||
}
|
||||
console.log(data);
|
||||
},
|
||||
//请求猫
|
||||
async catmessage() {
|
||||
let data = await biaomessage(0);
|
||||
|
||||
async catmessage(stype) {
|
||||
let data=[];
|
||||
if(stype==undefined||stype==null){
|
||||
data = await biaomessage(0);
|
||||
}else{
|
||||
data = await biaomessage(this.userserachlist);
|
||||
}
|
||||
if(data){
|
||||
console.log(data);
|
||||
this.catlist=data;
|
||||
let userlist=[];
|
||||
userlist=data.slice(0,6);
|
||||
console.log(userlist);
|
||||
this.catshi=userlist;
|
||||
this.catgan=userlist;
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//请求犬
|
||||
async dogmessage(name) {
|
||||
let data = await biaomessage(1,name);
|
||||
async dogmessage(stype) {
|
||||
let data=[];
|
||||
if(stype==undefined||stype==null){
|
||||
|
||||
data = await biaomessage(1);
|
||||
}else{
|
||||
data = await biaomessage(this.userserachlist);
|
||||
}
|
||||
if(data){
|
||||
let userlist=[];
|
||||
userlist=data.slice(0,6);
|
||||
this.doglist=data;
|
||||
this.doglist=data;
|
||||
this.doggan=userlist;
|
||||
this.dogshi=userlist;
|
||||
}
|
||||
@ -1079,7 +1089,6 @@ activeInde3:0,
|
||||
|
||||
//请求处方量信息数据
|
||||
async userchufang() {
|
||||
console.log("-----");
|
||||
let list=[];
|
||||
let data = await userque();
|
||||
if(data){
|
||||
@ -1089,27 +1098,38 @@ activeInde3:0,
|
||||
|
||||
}
|
||||
|
||||
console.log(data);
|
||||
},
|
||||
|
||||
//点击请求处方量标签信息数据
|
||||
async userquery(item) {
|
||||
console.log("-----");
|
||||
let data = await userquery(item);
|
||||
if(data){
|
||||
this.processinformation=data;
|
||||
console.log(this.processinformation);
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
console.log(data);
|
||||
},
|
||||
},
|
||||
//处方用粮筛选
|
||||
userclick(item,index){
|
||||
this.userquery(index)
|
||||
},
|
||||
//全价猫湿粮筛选
|
||||
catclick(item,index){
|
||||
this.userstype=0;
|
||||
let petType={
|
||||
petType:0,
|
||||
name:index,
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(petType)){
|
||||
this.userserachlist.push(petType)
|
||||
}
|
||||
}
|
||||
this.catmessage(this.userserachlist)
|
||||
},
|
||||
|
||||
|
||||
|
||||
lianxi(item,index){
|
||||
console.log(item,index);
|
||||
if(item.title=='在线客服'){
|
||||
var option = {
|
||||
customer: {id: '', name: '', email: '', mobile: '', memberId: '999999'}
|
||||
@ -1117,7 +1137,6 @@ activeInde3:0,
|
||||
dis_livchat(option);
|
||||
}
|
||||
if(item.title=='购物车'){
|
||||
console.log('---12314');
|
||||
this.$router.push({
|
||||
path: "/myorder/userrecord",
|
||||
|
||||
@ -1133,7 +1152,6 @@ activeInde3:0,
|
||||
},
|
||||
userbuy(item){
|
||||
let user= localStorage.getItem("userInfo");
|
||||
console.log(item);
|
||||
this.courseId(item)
|
||||
this.$router.push({
|
||||
path: "/myorder/userrecord",
|
||||
@ -1144,12 +1162,10 @@ activeInde3:0,
|
||||
selectGoods(item,index){
|
||||
let jump = document.querySelectorAll('.selectionswitch')
|
||||
let total = jump[index].offsetTop
|
||||
console.log(total);
|
||||
$('html body').animate({scrollTop: total}, 500);
|
||||
this.activeIndex=index;
|
||||
this.catfood=true;
|
||||
this.catproduct=false;
|
||||
console.log(item)
|
||||
if(item.title=="猫湿粮"){
|
||||
this.catproduct=false;
|
||||
this.catfood=true;
|
||||
@ -1161,7 +1177,6 @@ selectGoods(item,index){
|
||||
|
||||
},
|
||||
selectGo(item,index){
|
||||
console.log(index);
|
||||
this.activeInde2=index;
|
||||
},
|
||||
selectGoo(item,index){
|
||||
|
@ -69,7 +69,7 @@
|
||||
<div class="rc-usermain">
|
||||
<h2>服务工具</h2>
|
||||
<div class="rc-buymain">
|
||||
<div class="rc-buy" v-for="(item, index) in personallist" :key="index" @click="openaddress(index)">
|
||||
<div class="rc-buy" v-for="(item, index) in personallist" :key="index" @click="openaddress(item,index)">
|
||||
<div class="rc-cord">
|
||||
<img :src="item.buyimage" alt="" />
|
||||
<em>{{ item.title }}</em>
|
||||
@ -186,38 +186,42 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
userinter(){
|
||||
console.log(this.userid);
|
||||
if(this.userid!==null||this.userid!==undefined){
|
||||
this.$router.push({
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: "/personal/integral/",
|
||||
query: {
|
||||
stype: 1,
|
||||
},
|
||||
});
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
}
|
||||
},
|
||||
findall(){
|
||||
console.log('PPP');
|
||||
console.log(this.userid.length);
|
||||
if(this.userid!==null||this.userid!==undefined){
|
||||
this.$router.push({
|
||||
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress/",
|
||||
query: {
|
||||
stype: 0,
|
||||
},
|
||||
});
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
@ -225,9 +229,17 @@ userinter(){
|
||||
obligation(item,index){
|
||||
console.log(index);
|
||||
console.log(item);
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
|
||||
if(this.userid!==null||this.userid!==undefined){
|
||||
if(item.title=='待付款'){
|
||||
}else{
|
||||
if(item.title=='待付款'){
|
||||
this.$router.push({
|
||||
path: "/personal/useraddress",
|
||||
query: {
|
||||
@ -253,13 +265,6 @@ obligation(item,index){
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
@ -299,12 +304,21 @@ obligation(item,index){
|
||||
this.dialogInfo1=false;
|
||||
}
|
||||
},
|
||||
openaddress(index){
|
||||
console.log(index);
|
||||
if(this.userid!==null||this.userid!==undefined){
|
||||
if(index==2){
|
||||
openaddress(item,index){
|
||||
console.log(item,index);
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
console.log('---=');
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
|
||||
}else{
|
||||
if(index==2){
|
||||
this.$router.push({
|
||||
path: `/useraddress/openaddress/`
|
||||
path: `/personal/useraddress/`
|
||||
})
|
||||
console.log('这是地址的跳转');
|
||||
|
||||
@ -322,13 +336,6 @@ this.$router.push({
|
||||
|
||||
|
||||
}
|
||||
}else{
|
||||
console.log('---=');
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '您还未登录'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -214,7 +214,7 @@ export default {
|
||||
productCode:'',//商品code
|
||||
productlist:[],
|
||||
userbuy:true,
|
||||
sales_num:1,
|
||||
sales_num:1,
|
||||
usernewlist: [
|
||||
{
|
||||
price: "30",
|
||||
@ -538,9 +538,18 @@ usertanchu(item,orderm){
|
||||
|
||||
},
|
||||
userget(){
|
||||
this.userdraw(this.usermessage.data.mobile);
|
||||
|
||||
|
||||
let user= localStorage.getItem("userInfo");
|
||||
if(user==undefined||user==null||user==''){
|
||||
this.dialogInfo2=true;
|
||||
return
|
||||
}else{
|
||||
this.userdraw(this.usermessage.data.mobile);
|
||||
this.alldrawlist(this.usermessage.data.id);
|
||||
this.dialogInfo1=true;
|
||||
}
|
||||
|
||||
},
|
||||
selectsearch(item, index) {
|
||||
|
||||
@ -554,6 +563,7 @@ usertanchu(item,orderm){
|
||||
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<h2>专区:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -28,7 +28,7 @@
|
||||
<h2>年龄:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -37,7 +37,7 @@
|
||||
<h2>功能:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -46,7 +46,7 @@
|
||||
<h2>品种:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -91,7 +91,7 @@
|
||||
<div class="rc-productcat ts-scrollable">
|
||||
<div class="rc-cat" v-for="(item, index) in userproduct" :key="index" @click="selectGoodsa(item, index)" :class="activeIndex1 == index ? 'active' : 'unactive'" >
|
||||
<img :src="item.catimage" alt="" />
|
||||
<span>{{ item.title }}</span>
|
||||
<span>{{ item.tagName }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -99,7 +99,7 @@
|
||||
<h2>专区:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -108,7 +108,7 @@
|
||||
<h2>年龄:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -116,7 +116,7 @@
|
||||
<h2>功能:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -125,7 +125,7 @@
|
||||
<h2>品种:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -159,7 +159,7 @@
|
||||
<h2>专区:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -168,7 +168,7 @@
|
||||
<h2>年龄:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -176,7 +176,7 @@
|
||||
<h2>功能:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -185,7 +185,7 @@
|
||||
<h2>品种:</h2>
|
||||
<ol>
|
||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
||||
{{ item.title }}
|
||||
{{ item.tagName }}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
@ -202,12 +202,16 @@
|
||||
|
||||
<script>
|
||||
import Myheader from '~/components/header.vue'
|
||||
import { userstype,biaomessa,biaomessage } from "../../ajax/getData";
|
||||
import { userstype,biaomessa,biaomessage,searchchanpin } from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: "",
|
||||
userstype:[],
|
||||
activeIndex:0,
|
||||
userserachlist:[
|
||||
{}
|
||||
],
|
||||
activeIndex1:0,
|
||||
activeIndexa:'-1',
|
||||
dialogInfo1:false,
|
||||
@ -385,32 +389,67 @@ export default {
|
||||
Myheader,
|
||||
},
|
||||
mounted(){
|
||||
|
||||
let stype=this.$route.query.stype;
|
||||
this.userst();
|
||||
this.activeIndex=stype;
|
||||
console.log(stype);
|
||||
if(stype!==''&&stype!==undefined){
|
||||
this.onmessage(stype)
|
||||
}else{
|
||||
this.usetmessage();
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
async usersearch(stype){
|
||||
let data=await searchchanpin(stype);
|
||||
if(data){
|
||||
this.rccontair=data;
|
||||
|
||||
}
|
||||
},
|
||||
async userst() {
|
||||
let pinzhong=[];
|
||||
let zhuanqu=[];
|
||||
let age=[];
|
||||
let gonneg=[];
|
||||
let data = await userstype();
|
||||
if(data){
|
||||
this.userstype=data;
|
||||
}
|
||||
this.usercatlist=this.userstype.filter(item=>item.petType=='0')
|
||||
this.usercatlist.map(element=>{
|
||||
if(element.name=='品种'){
|
||||
pinzhong.push(element);
|
||||
this.catageb=pinzhong
|
||||
}
|
||||
if(element.name=='功能'){
|
||||
gonneg.push(element);
|
||||
this.catagea=gonneg
|
||||
}
|
||||
if(element.name=='年龄'){
|
||||
age.push(element);
|
||||
this.catage=age
|
||||
}
|
||||
if(element.name=='专区'){
|
||||
zhuanqu.push(element);
|
||||
this.prefecture=gonneg
|
||||
}
|
||||
})
|
||||
this.userdoglisgt=this.userstype.filter(item=>item.petType=='1')
|
||||
|
||||
},
|
||||
|
||||
async usetmessage() {
|
||||
let data = await biaomessa();
|
||||
if(data){
|
||||
this.rccontair=data;
|
||||
}
|
||||
console.log( this.rccontair);
|
||||
},
|
||||
async onmessage(stype) {
|
||||
let data = await biaomessage(stype);
|
||||
if(data){
|
||||
this.rccontair=data;
|
||||
}
|
||||
console.log( this.rccontair);
|
||||
},
|
||||
|
||||
|
||||
@ -476,19 +515,25 @@ this.dialogInfo1=false;
|
||||
onSearch() {},
|
||||
selectGoods(item, index) {
|
||||
|
||||
this.activeIndex=index;
|
||||
console.log('----');
|
||||
this.activeIndex=index;
|
||||
let petType={
|
||||
petType:this.activeIndex,
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(petType)){
|
||||
this.userserachlist.push(petType)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
},
|
||||
selectGoodsa(item, index) {
|
||||
|
||||
this.activeIndex1=index;
|
||||
console.log('----');
|
||||
},
|
||||
userselect(){
|
||||
this.$nextTick(() => {
|
||||
|
||||
this.ifadroind();
|
||||
console.log( this.$refs.usercontent)
|
||||
|
||||
})
|
||||
},
|
||||
@ -505,23 +550,60 @@ this.dialogInfo1=false;
|
||||
this.activeIndexa=index;
|
||||
},
|
||||
selectage(item, index) {
|
||||
let tagUsedAge={
|
||||
petType:this.activeIndex1,
|
||||
tagUsedAge:item.tagName
|
||||
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(tagUsedAge)){
|
||||
this.userserachlist.push(tagUsedAge)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
this.activeIndexc=index;
|
||||
},
|
||||
selectagc(item, index) {
|
||||
let tagFunction={
|
||||
petType:this.activeIndex1,
|
||||
tagFunction:item.tagName
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(tagFunction)){
|
||||
this.userserachlist.push(tagFunction)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
this.activeIndexd=index;
|
||||
},
|
||||
selectagd(item, index) {
|
||||
let tagBreed={
|
||||
petType:this.activeIndex1,
|
||||
tagBreed:item.tagName
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(tagBreed)){
|
||||
this.userserachlist.push(tagBreed)
|
||||
}
|
||||
}
|
||||
this.usersearch(this.userserachlist)
|
||||
this.activeIndexe=index;
|
||||
},
|
||||
selectproduct(item, index){
|
||||
this.activeIndexb=index;
|
||||
let categoryName={
|
||||
petType:this.activeIndex1,
|
||||
categoryName:item.tagName,
|
||||
}
|
||||
for(let i =0;i<this.userserachlist.length;i++){
|
||||
if(!this.userserachlist.includes(categoryName)){
|
||||
this.userserachlist.push(categoryName)
|
||||
}
|
||||
}
|
||||
|
||||
this.usersearch(this.userserachlist)
|
||||
},
|
||||
selectage(item, index) {
|
||||
this.activeIndexc=index;
|
||||
},
|
||||
selectage(item, index) {
|
||||
this.activeIndexc=index;
|
||||
},
|
||||
|
||||
//弹框的显示隐藏
|
||||
},
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top">
|
||||
|
||||
<div class="rc-max-width--xl rc-main">
|
||||
<div class="rc-main">
|
||||
<div class="usersearch">
|
||||
<div class="form-search">
|
||||
<van-search
|
||||
@ -33,7 +33,6 @@
|
||||
<div class="usercontentshow" ref="usercontent">
|
||||
<div class="rc-product">
|
||||
<h2>我想搜</h2>
|
||||
<div class="ts-scrollable-container">
|
||||
<div class="rc-productcat ts-scrollable">
|
||||
<div class="rc-cat" v-for="(item, index) in userproduct" :key="index" @click="selectGoods(item, index)" :class="activeIndex == index ? 'active' : 'unactive'" >
|
||||
<img :src="item.catimage" alt="" />
|
||||
@ -44,10 +43,9 @@
|
||||
<span @click="usershow()">筛选</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ts-scrollable-container">
|
||||
<div class="rc-age">
|
||||
<h2>专区:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
||||
@ -56,7 +54,7 @@
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="ts-scrollable-container">
|
||||
<div class="rc-age">
|
||||
<h2>年龄:</h2>
|
||||
<ol class="ts-scrollable">
|
||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
||||
@ -446,29 +444,6 @@ this.userst();
|
||||
})
|
||||
|
||||
this.userdoglisgt=this.userstype.filter(item=>item.petType=='1')
|
||||
// console.log(this.userdoglisgt)
|
||||
|
||||
// console.log(this.usercatlist,this.userdoglisgt);
|
||||
// if(this.userstype[i].name=='品种'){
|
||||
// pinzhong.push(this.userstype[i]);
|
||||
//
|
||||
// }
|
||||
// else if(this.userstype[i].name=='专区'){
|
||||
// zhuanqu.push(this.userstype[i]);
|
||||
// this.prefecture=zhuanqu
|
||||
// }
|
||||
// else if(this.userstype[i].name=='年龄'){
|
||||
// age.push(this.userstype[i]);
|
||||
// this.catage=age;
|
||||
// }
|
||||
// else if(this.userstype[i].name=='功能'){
|
||||
// gonneg.push(this.userstype[i]);
|
||||
// this.catagea=gonneg;
|
||||
// }
|
||||
|
||||
|
||||
console.log(pinzhong,zhuanqu,age,gonneg);
|
||||
console.log(this.userstype);
|
||||
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user