mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 18:26:38 +08:00
更改产品列表
This commit is contained in:
parent
566a8d6cfc
commit
f321d8c45c
@ -1,13 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<div class="rc-max-width--xl rc-main">
|
<div class="rc-max-width--xl rc-main">
|
||||||
<div class="usersearch">
|
<div class="usersearch">
|
||||||
<div class="usercontentshow" ref="usercontent">
|
<div class="usercontentshow" ref="usercontent">
|
||||||
<div class="rc-product ts-scrollable-container">
|
<div class="rc-product ts-scrollable-container">
|
||||||
<div class="rc-productcat ts-scrollable">
|
<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'" >
|
<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="" />
|
<img :src="item.catimage" alt="" />
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ item.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -17,7 +23,13 @@
|
|||||||
<div class="ts-scrollable-container">
|
<div class="ts-scrollable-container">
|
||||||
<h2>专区:</h2>
|
<h2>专区:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
<li
|
||||||
|
v-for="(item, index) in prefecture"
|
||||||
|
:key="index"
|
||||||
|
@click="selectproduct(item, index)"
|
||||||
|
:class="activeIndexb == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -26,7 +38,13 @@
|
|||||||
<div class="ts-scrollable-container">
|
<div class="ts-scrollable-container">
|
||||||
<h2>年龄:</h2>
|
<h2>年龄:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catage"
|
||||||
|
:key="index"
|
||||||
|
@click="selectage(item, index)"
|
||||||
|
:class="activeIndexc == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox1"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -35,7 +53,13 @@
|
|||||||
<div class="ts-scrollable-container">
|
<div class="ts-scrollable-container">
|
||||||
<h2>功能:</h2>
|
<h2>功能:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catagea"
|
||||||
|
:key="index"
|
||||||
|
@click="selectagc(item, index)"
|
||||||
|
:class="activeIndexd == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox2"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -44,7 +68,13 @@
|
|||||||
<div class="ts-scrollable-container">
|
<div class="ts-scrollable-container">
|
||||||
<h2>品种:</h2>
|
<h2>品种:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catageb"
|
||||||
|
:key="index"
|
||||||
|
@click="selectagd(item, index)"
|
||||||
|
:class="activeIndexe == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox3"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -54,24 +84,39 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- rc-main end -->
|
<!-- rc-main end -->
|
||||||
<div class="online bold" style="margin-top:127px"></div>
|
<div class="online bold"></div>
|
||||||
<!-- rc-main start -->
|
<!-- rc-main start -->
|
||||||
<div class="rc-max-width--xl">
|
<div class="rc-max-width--xl">
|
||||||
<div class="usersearch">
|
<div class="usersearch">
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<ul class="ts-product-list">
|
<ul class="ts-product-list">
|
||||||
<li v-for="(item,index) in rccontair" :key="index" class="rc-margin-top--md">
|
<li
|
||||||
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item)">
|
v-for="(item, index) in rccontair"
|
||||||
|
:key="index"
|
||||||
|
class="rc-margin-top--md"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="rc-click rc-margin-bottom--md"
|
||||||
|
@click="selectproduce(item)"
|
||||||
|
>
|
||||||
<div class="rc-rccontair">
|
<div class="rc-rccontair">
|
||||||
<img :src=item.picture alt="">
|
<img :src="item.picture" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-column">
|
<div class="rc-column">
|
||||||
<div class="rc-click" @click="selectproduce(item)">
|
<div class="rc-click" @click="selectproduce(item)">
|
||||||
<span>{{item.categoryName}}</span>
|
<span>{{ item.categoryName }}</span>
|
||||||
<i>0.001{{item.price}}</i>
|
<i>0.001{{ item.price }}</i>
|
||||||
</div>
|
</div>
|
||||||
<strong class="ts-standard-btn ts-standard-btn--two rc-margin-y--md center" @click="userbuy()">立即购买</strong>
|
<strong
|
||||||
|
class="
|
||||||
|
ts-standard-btn ts-standard-btn--two
|
||||||
|
rc-margin-y--md
|
||||||
|
center
|
||||||
|
"
|
||||||
|
@click="userbuy()"
|
||||||
|
>立即购买</strong
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -83,22 +128,32 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- rc-main end -->
|
<!-- rc-main end -->
|
||||||
|
|
||||||
|
|
||||||
<div v-if="isadrond">
|
<div v-if="isadrond">
|
||||||
<div class="rc-mubu" v-if="isshow" @click="usershow()"></div>
|
<div class="rc-mubu" v-if="isshow" @click="usershow()"></div>
|
||||||
<div class="rc-bottom" v-if="isshow">
|
<div class="rc-bottom" v-if="isshow">
|
||||||
<div class="rc-bottoma" >
|
<div class="rc-bottoma">
|
||||||
<div class="rc-productcat ts-scrollable">
|
<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'" >
|
<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="" />
|
<img :src="item.catimage" alt="" />
|
||||||
<span>{{ item.tagName }}</span>
|
<span>{{ item.tagName }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-prefecture">
|
<div class="rc-prefecture">
|
||||||
<h2>专区:</h2>
|
<h2>专区:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
<li
|
||||||
|
v-for="(item, index) in prefecture"
|
||||||
|
:key="index"
|
||||||
|
@click="selectproduct(item, index)"
|
||||||
|
:class="activeIndexb == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -107,7 +162,13 @@
|
|||||||
<div class="ts-scrollable-container rc-margin-y--md">
|
<div class="ts-scrollable-container rc-margin-y--md">
|
||||||
<h2>年龄:</h2>
|
<h2>年龄:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catage"
|
||||||
|
:key="index"
|
||||||
|
@click="selectage(item, index)"
|
||||||
|
:class="activeIndexc == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox1"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -115,7 +176,13 @@
|
|||||||
<div class="ts-scrollable-container rc-margin-y--md">
|
<div class="ts-scrollable-container rc-margin-y--md">
|
||||||
<h2>功能:</h2>
|
<h2>功能:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catagea"
|
||||||
|
:key="index"
|
||||||
|
@click="selectagc(item, index)"
|
||||||
|
:class="activeIndexd == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox2"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -124,41 +191,50 @@
|
|||||||
<div class="ts-scrollable-container">
|
<div class="ts-scrollable-container">
|
||||||
<h2>品种:</h2>
|
<h2>品种:</h2>
|
||||||
<ol class="ts-scrollable">
|
<ol class="ts-scrollable">
|
||||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catageb"
|
||||||
|
:key="index"
|
||||||
|
@click="selectagd(item, index)"
|
||||||
|
:class="activeIndexe == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox3"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-footer">
|
<div class="rc-footer">
|
||||||
|
|
||||||
<span @click="usershow()">取消</span>
|
<span @click="usershow()">取消</span>
|
||||||
<em @click="usershow()">确定</em>
|
<em @click="usershow()">确定</em>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog :visible.sync="dialogInfo1" hegight="700px" v-if="!isadrond">
|
||||||
:visible.sync="dialogInfo1"
|
|
||||||
hegight="700px"
|
|
||||||
|
|
||||||
v-if="!isadrond"
|
|
||||||
>
|
|
||||||
|
|
||||||
<div class="rc-bottom">
|
<div class="rc-bottom">
|
||||||
<div class="rc-bottoma" >
|
<div class="rc-bottoma">
|
||||||
<div class="rc-productcat ts-scrollable">
|
<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'" >
|
<div
|
||||||
|
class="rc-cat"
|
||||||
|
v-for="(item, index) in userproduct"
|
||||||
|
:key="index"
|
||||||
|
@click="selectGoodsa(item, index)"
|
||||||
|
:class="activeIndex1 == index ? 'active' : 'unactive'"
|
||||||
|
>
|
||||||
<img :src="item.name" alt="" />
|
<img :src="item.name" alt="" />
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ item.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-prefecture">
|
<div class="rc-prefecture">
|
||||||
<h2>专区:</h2>
|
<h2>专区:</h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="(item, index) in prefecture" :key="index" @click="selectproduct(item, index)" :class="activeIndexb == index ? 'active' : 'unactive'" >
|
<li
|
||||||
|
v-for="(item, index) in prefecture"
|
||||||
|
:key="index"
|
||||||
|
@click="selectproduct(item, index)"
|
||||||
|
:class="activeIndexb == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -167,7 +243,13 @@
|
|||||||
<div class="ts-scrollable-container rc-margin-y--md">
|
<div class="ts-scrollable-container rc-margin-y--md">
|
||||||
<h2>年龄:</h2>
|
<h2>年龄:</h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="(item, index) in catage" :key="index" @click="selectage(item, index)" :class="activeIndexc == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catage"
|
||||||
|
:key="index"
|
||||||
|
@click="selectage(item, index)"
|
||||||
|
:class="activeIndexc == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox1"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -175,7 +257,13 @@
|
|||||||
<div class="ts-scrollable-container rc-margin-y--md">
|
<div class="ts-scrollable-container rc-margin-y--md">
|
||||||
<h2>功能:</h2>
|
<h2>功能:</h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="(item, index) in catagea" :key="index" @click="selectagc(item, index)" :class="activeIndexd == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catagea"
|
||||||
|
:key="index"
|
||||||
|
@click="selectagc(item, index)"
|
||||||
|
:class="activeIndexd == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox2"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -184,7 +272,13 @@
|
|||||||
<div class="ts-scrollable-container">
|
<div class="ts-scrollable-container">
|
||||||
<h2>品种:</h2>
|
<h2>品种:</h2>
|
||||||
<ol>
|
<ol>
|
||||||
<li v-for="(item, index) in catageb" :key="index" @click="selectagd(item, index)" :class="activeIndexe == index ? 'active' : 'unactive'">
|
<li
|
||||||
|
v-for="(item, index) in catageb"
|
||||||
|
:key="index"
|
||||||
|
@click="selectagd(item, index)"
|
||||||
|
:class="activeIndexe == index ? 'active' : 'unactive'"
|
||||||
|
ref="chosebox3"
|
||||||
|
>
|
||||||
{{ item.tagName }}
|
{{ item.tagName }}
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
@ -201,29 +295,38 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from '~/components/header.vue'
|
import Myheader from "~/components/header.vue";
|
||||||
import { userstype,biaomessa,biaomessage,searchchanpin } from "../../ajax/getData";
|
import $ from "jquery";
|
||||||
|
import {
|
||||||
|
userstype,
|
||||||
|
biaomessa,
|
||||||
|
biaomessage,
|
||||||
|
searchchanpin,
|
||||||
|
} from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: "",
|
value: "",
|
||||||
userstype:[],
|
userstype: [],
|
||||||
activeIndex:0,
|
activeIndex: "0",
|
||||||
userserachlist:[
|
allacindex:0,
|
||||||
{}
|
userishwo: true,
|
||||||
],
|
userishwo1: true,
|
||||||
activeIndex1:0,
|
userishwo2: true,
|
||||||
activeIndexa:'-1',
|
userishwo3: true,
|
||||||
dialogInfo1:false,
|
userserachlist: [{}],
|
||||||
activeIndexb:'-1',
|
activeIndex1: 0,
|
||||||
activeIndexc:'-1',
|
activeIndexa: "-1",
|
||||||
activeIndexd:'-1',
|
dialogInfo1: false,
|
||||||
activeIndexe:'-1',
|
activeIndexb: "-1",
|
||||||
activeIndexf:'-1',
|
activeIndexc: "-1",
|
||||||
isadrond:true,
|
activeIndexd: "-1",
|
||||||
isshow:false,
|
activeIndexe: "-1",
|
||||||
openshow:false,
|
activeIndexf: "-1",
|
||||||
direction:'btt',
|
isadrond: true,
|
||||||
|
isshow: false,
|
||||||
|
openshow: false,
|
||||||
|
direction: "btt",
|
||||||
searchdata: [
|
searchdata: [
|
||||||
{
|
{
|
||||||
title: "猫罐头",
|
title: "猫罐头",
|
||||||
@ -352,7 +455,7 @@ export default {
|
|||||||
rccontair: [
|
rccontair: [
|
||||||
{
|
{
|
||||||
title: "皇家英国短毛猫全价湿粮",
|
title: "皇家英国短毛猫全价湿粮",
|
||||||
price:'¥123.45',
|
price: "¥123.45",
|
||||||
ordernum: 1,
|
ordernum: 1,
|
||||||
|
|
||||||
catimage: require("../../assets/image/rc-cat.png"),
|
catimage: require("../../assets/image/rc-cat.png"),
|
||||||
@ -360,25 +463,25 @@ export default {
|
|||||||
|
|
||||||
{
|
{
|
||||||
title: "皇家英国短毛猫全价湿粮",
|
title: "皇家英国短毛猫全价湿粮",
|
||||||
price:'¥123.45',
|
price: "¥123.45",
|
||||||
ordernum: "2",
|
ordernum: "2",
|
||||||
catimage: require("../../assets/image/rc-dog.png"),
|
catimage: require("../../assets/image/rc-dog.png"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "皇家英国短毛猫全价湿粮",
|
title: "皇家英国短毛猫全价湿粮",
|
||||||
price:'¥123.45',
|
price: "¥123.45",
|
||||||
ordernum: "2",
|
ordernum: "2",
|
||||||
catimage: require("../../assets/image/rc-dog.png"),
|
catimage: require("../../assets/image/rc-dog.png"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "皇家英国短毛猫全价湿粮",
|
title: "皇家英国短毛猫全价湿粮",
|
||||||
price:'¥123.45',
|
price: "¥123.45",
|
||||||
ordernum: "2",
|
ordernum: "2",
|
||||||
catimage: require("../../assets/image/rc-dog.png"),
|
catimage: require("../../assets/image/rc-dog.png"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "皇家英国短毛猫全价湿粮",
|
title: "皇家英国短毛猫全价湿粮",
|
||||||
price:'¥123.45',
|
price: "¥123.45",
|
||||||
ordernum: "2",
|
ordernum: "2",
|
||||||
catimage: require("../../assets/image/rc-dog.png"),
|
catimage: require("../../assets/image/rc-dog.png"),
|
||||||
},
|
},
|
||||||
@ -388,74 +491,70 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {
|
||||||
let stype=this.$route.query.stype;
|
let stype = this.$route.query.stype;
|
||||||
this.userst();
|
this.userst();
|
||||||
this.activeIndex=stype;
|
this.activeIndex = stype;
|
||||||
if(stype!==''&&stype!==undefined){
|
if (stype !== "" && stype !== undefined) {
|
||||||
this.onmessage(stype)
|
this.onmessage(stype);
|
||||||
}else{
|
|
||||||
|
} else {
|
||||||
this.usetmessage();
|
this.usetmessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async usersearch(stype){
|
async usersearch(stype) {
|
||||||
let data=await searchchanpin(stype);
|
let data = await searchchanpin(stype);
|
||||||
if(data){
|
if (data) {
|
||||||
this.rccontair=data;
|
this.rccontair = data;
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async userst() {
|
async userst() {
|
||||||
let pinzhong=[];
|
let pinzhong = [];
|
||||||
let zhuanqu=[];
|
let zhuanqu = [];
|
||||||
let age=[];
|
let age = [];
|
||||||
let gonneg=[];
|
let gonneg = [];
|
||||||
let data = await userstype();
|
let data = await userstype();
|
||||||
if(data){
|
if (data) {
|
||||||
this.userstype=data;
|
this.userstype = data;
|
||||||
}
|
}
|
||||||
this.usercatlist=this.userstype.filter(item=>item.petType=='0')
|
this.usercatlist = this.userstype.filter((item) => item.petType == "0");
|
||||||
this.usercatlist.map(element=>{
|
this.usercatlist.map((element) => {
|
||||||
if(element.name=='品种'){
|
if (element.name == "品种") {
|
||||||
pinzhong.push(element);
|
pinzhong.push(element);
|
||||||
this.catageb=pinzhong
|
this.catageb = pinzhong;
|
||||||
}
|
}
|
||||||
if(element.name=='功能'){
|
if (element.name == "功能") {
|
||||||
gonneg.push(element);
|
gonneg.push(element);
|
||||||
this.catagea=gonneg
|
this.catagea = gonneg;
|
||||||
}
|
}
|
||||||
if(element.name=='年龄'){
|
if (element.name == "年龄") {
|
||||||
age.push(element);
|
age.push(element);
|
||||||
this.catage=age
|
this.catage = age;
|
||||||
}
|
}
|
||||||
if(element.name=='专区'){
|
if (element.name == "专区") {
|
||||||
zhuanqu.push(element);
|
zhuanqu.push(element);
|
||||||
this.prefecture=gonneg
|
this.prefecture = gonneg;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.userdoglisgt=this.userstype.filter(item=>item.petType=='1')
|
this.userdoglisgt = this.userstype.filter((item) => item.petType == "1");
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
async usetmessage() {
|
async usetmessage() {
|
||||||
let data = await biaomessa();
|
let data = await biaomessa();
|
||||||
if(data){
|
if (data) {
|
||||||
this.rccontair=data;
|
this.rccontair = data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async onmessage(stype) {
|
async onmessage(stype) {
|
||||||
let data = await biaomessage(stype);
|
let data = await biaomessage(stype);
|
||||||
if(data){
|
if (data) {
|
||||||
this.rccontair=data;
|
this.rccontair = data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
userbuy() {
|
||||||
|
|
||||||
|
|
||||||
userbuy(){
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/myorder/userrecord",
|
path: "/myorder/userrecord",
|
||||||
query: {
|
query: {
|
||||||
@ -463,10 +562,10 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
openclose(){
|
openclose() {
|
||||||
this.dialogInfo1=false;
|
this.dialogInfo1 = false;
|
||||||
},
|
},
|
||||||
selectproduce(){
|
selectproduce() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/productdetails/producted",
|
path: "/productdetails/producted",
|
||||||
query: {
|
query: {
|
||||||
@ -474,7 +573,7 @@ this.dialogInfo1=false;
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
ifadroind(){
|
ifadroind() {
|
||||||
var sUserAgent = navigator.userAgent.toLowerCase();
|
var sUserAgent = navigator.userAgent.toLowerCase();
|
||||||
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
|
var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
|
||||||
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
|
||||||
@ -485,133 +584,175 @@ this.dialogInfo1=false;
|
|||||||
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
||||||
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
||||||
|
|
||||||
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
if (
|
||||||
console.log("当前是电脑打开")
|
!(
|
||||||
|
bIsIpad ||
|
||||||
|
bIsIphoneOs ||
|
||||||
|
bIsMidp ||
|
||||||
|
bIsUc7 ||
|
||||||
|
bIsUc ||
|
||||||
|
bIsAndroid ||
|
||||||
|
bIsCE ||
|
||||||
|
bIsWM
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
console.log("当前是电脑打开");
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
this.isadrond = false;
|
||||||
this.isadrond=false;
|
this.dialogInfo1 = true;
|
||||||
this.dialogInfo1=true;
|
this.isadrond = false;
|
||||||
this.isadrond=false;
|
this.isshow = false;
|
||||||
this.isshow=false;
|
});
|
||||||
|
} else {
|
||||||
})
|
console.log("当前是手机打开");
|
||||||
|
|
||||||
|
|
||||||
}else{
|
|
||||||
console.log("当前是手机打开")
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
this.isadrond = true;
|
||||||
this.isadrond=true;
|
this.isshow = true;
|
||||||
this.isshow=true;
|
this.$refs.usercontent.style.display = "none ";
|
||||||
this.$refs.usercontent.style.display='none ';
|
this.dialogInfo1 = false;
|
||||||
this.dialogInfo1=false;
|
});
|
||||||
|
}
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
//搜索
|
|
||||||
onSearch() {},
|
|
||||||
selectGoods(item, index) {
|
|
||||||
|
|
||||||
this.activeIndex=index;
|
selectGoods(item, index) {
|
||||||
let petType={
|
this.activeIndex = index;
|
||||||
petType:this.activeIndex,
|
this.allacindex=index
|
||||||
}
|
console;
|
||||||
for(let i =0;i<this.userserachlist.length;i++){
|
let petType = {
|
||||||
if(!this.userserachlist.includes(petType)){
|
petType: this.allacindex,
|
||||||
this.userserachlist.push(petType)
|
};
|
||||||
|
for (let i = 0; i < this.userserachlist.length; i++) {
|
||||||
|
if (!this.userserachlist.includes(petType)) {
|
||||||
|
this.userserachlist.push(petType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.usersearch(this.userserachlist)
|
this.usersearch(this.userserachlist);
|
||||||
},
|
},
|
||||||
selectGoodsa(item, index) {
|
selectGoodsa(item, index) {
|
||||||
|
this.activeIndex1 = index;
|
||||||
this.activeIndex1=index;
|
|
||||||
},
|
},
|
||||||
userselect(){
|
userselect() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
||||||
this.ifadroind();
|
this.ifadroind();
|
||||||
|
});
|
||||||
})
|
|
||||||
},
|
},
|
||||||
usershow(){
|
usershow() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.isshow=false;
|
this.isshow = false;
|
||||||
// dom元素更新后执行,因此这里能正确打印更改之后的值
|
// dom元素更新后执行,因此这里能正确打印更改之后的值
|
||||||
this.$refs.usercontent.style.display='block ';
|
this.$refs.usercontent.style.display = "block ";
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
selectsearch(item, index) {
|
selectsearch(item, index) {
|
||||||
|
this.activeIndexa = index;
|
||||||
this.activeIndexa=index;
|
|
||||||
},
|
},
|
||||||
selectage(item, index) {
|
selectage(item, index) {
|
||||||
let tagUsedAge={
|
let tagUsedAge = {};
|
||||||
petType:this.activeIndex1,
|
this.activeIndexc = index;
|
||||||
tagUsedAge:item.tagName
|
this.userishwo1 = !this.userishwo1;
|
||||||
|
console.log(this.userishwo1);
|
||||||
|
if (this.userishwo1 == false) {
|
||||||
|
tagUsedAge = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
tagUsedAge: item.tagName,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("这是false");
|
||||||
|
tagUsedAge = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
for(let i =0;i<this.userserachlist.length;i++){
|
this.$refs.chosebox1[index].className = "unactive";
|
||||||
if(!this.userserachlist.includes(tagUsedAge)){
|
for (let i = 0; i < this.userserachlist.length; i++) {
|
||||||
this.userserachlist.push(tagUsedAge)
|
if (!this.userserachlist.includes(tagUsedAge)) {
|
||||||
|
this.userserachlist.push(tagUsedAge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.usersearch(this.userserachlist)
|
this.usersearch(this.userserachlist);
|
||||||
this.activeIndexc=index;
|
|
||||||
},
|
},
|
||||||
selectagc(item, index) {
|
selectagc(item, index) {
|
||||||
let tagFunction={
|
let tagFunction = {};
|
||||||
petType:this.activeIndex1,
|
this.activeIndexd = index;
|
||||||
tagFunction:item.tagName
|
this.userishwo2 = !this.userishwo2;
|
||||||
|
if (this.userishwo2 == false) {
|
||||||
|
tagFunction = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
tagFunction: item.tagName,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("这是false");
|
||||||
|
tagFunction = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
for(let i =0;i<this.userserachlist.length;i++){
|
this.$refs.chosebox2[index].className = "unactive";
|
||||||
if(!this.userserachlist.includes(tagFunction)){
|
|
||||||
this.userserachlist.push(tagFunction)
|
for (let i = 0; i < this.userserachlist.length; i++) {
|
||||||
|
if (!this.userserachlist.includes(tagFunction)) {
|
||||||
|
this.userserachlist.push(tagFunction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.usersearch(this.userserachlist)
|
this.usersearch(this.userserachlist);
|
||||||
this.activeIndexd=index;
|
|
||||||
},
|
},
|
||||||
selectagd(item, index) {
|
selectagd(item, index) {
|
||||||
let tagBreed={
|
let tagBreed = {};
|
||||||
petType:this.activeIndex1,
|
this.activeIndexe = index;
|
||||||
tagBreed:item.tagName
|
this.userishwo3 = !this.userishwo3;
|
||||||
|
if (this.userishwo3 == false) {
|
||||||
|
tagBreed = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
tagBreed: item.tagName,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("这是false");
|
||||||
|
tagBreed = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
for(let i =0;i<this.userserachlist.length;i++){
|
this.$refs.chosebox3[index].className = "unactive";
|
||||||
if(!this.userserachlist.includes(tagBreed)){
|
for (let i = 0; i < this.userserachlist.length; i++) {
|
||||||
this.userserachlist.push(tagBreed)
|
if (!this.userserachlist.includes(tagBreed)) {
|
||||||
|
this.userserachlist.push(tagBreed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.usersearch(this.userserachlist)
|
this.usersearch(this.userserachlist);
|
||||||
this.activeIndexe=index;
|
|
||||||
},
|
},
|
||||||
selectproduct(item, index){
|
selectproduct(item, index) {
|
||||||
this.activeIndexb=index;
|
// console.log(this.userishwo=!this.userishwo)
|
||||||
let categoryName={
|
let categoryName = {};
|
||||||
petType:this.activeIndex1,
|
this.activeIndexb = index;
|
||||||
categoryName:item.tagName,
|
console.log(this.activeIndex);
|
||||||
|
this.userishwo = !this.userishwo;
|
||||||
|
console.log(this.userishwo);
|
||||||
|
if (this.userishwo == false) {
|
||||||
|
console.log("====");
|
||||||
|
categoryName = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
categoryName: item.tagName,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
categoryName = {
|
||||||
|
petType: this.allacindex,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
for(let i =0;i<this.userserachlist.length;i++){
|
console.log(this.$refs.chosebox);
|
||||||
if(!this.userserachlist.includes(categoryName)){
|
this.$refs.chosebox[index].className = "unactive";
|
||||||
this.userserachlist.push(categoryName)
|
for (let i = 0; i < this.userserachlist.length; i++) {
|
||||||
|
if (!this.userserachlist.includes(categoryName)) {
|
||||||
|
this.userserachlist.push(categoryName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.usersearch(this.userserachlist)
|
this.usersearch(this.userserachlist);
|
||||||
},
|
},
|
||||||
|
|
||||||
//弹框的显示隐藏
|
//弹框的显示隐藏
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped >
|
<style lang="less" scoped >
|
||||||
@import url("../../assets/css/global.less");
|
@import url("../../assets/css/global.less");
|
||||||
@import url("../../assets/css/product-list.less");
|
@import url("../../assets/css/product-list.less");
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user