!23 2022-1-17 JiaMIn

Merge pull request !23 from Admin/sit-jiamin-v2
This commit is contained in:
Admin 2022-01-17 11:22:25 +00:00 committed by Gitee
commit 2a1b670756
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
23 changed files with 574 additions and 408 deletions

View File

@ -152,7 +152,9 @@ margin-top: 8px;
}
@media screen and (min-width: 769px){
.online{
margin-top: 30px;
}
.allmain{
.rs-dis{
@ -162,6 +164,7 @@ margin-top: 8px;
}
}
.active {
font-size: 14px;
color: #E2001A;

View File

@ -11,12 +11,15 @@ ul li ol li em strong i {
.usersearch {
margin: 0 auto;
overflow: hidden;
}
//rc-main end
}
//手机端
@media screen and (max-width: 768px) {
.usercontentshow{
position: relative;
}
@ -234,6 +237,19 @@ ul li ol li em strong i {
//pc端
@media screen and (min-width: 768px){
.usersearch {
margin: 0 auto;
overflow: hidden;
margin-top: 5rem;
}
.online{
width:100%;
&.bold{
height:0.5rem;
margin-top: 5rem;
background:#f6f6f6;
}
}
/deep/.el-dialog {
width: 920px;
height: 570px;

View File

@ -1474,6 +1474,7 @@ selectGoods(item,index){
console.log(item,index);
this.activeIndex=index;
console.log(item.title);
this.ifadroind(item,index,this.useraindex)
// this.ifAdoid(item,index);

View File

@ -29,7 +29,7 @@
<div class="rc-contair">
<div class="rc-left" ref="userleft" id="userleft" :style='usercolor'>
<div>
<i></i><span>{{item.couponTypeId=='4'?(item.discount) *10:item.couponAmount}}</span>
<i></i><span>{{item.couponTypeId=='4'?parseInt(((item.discount) *10))+ '折':item.couponAmount}}</span>
</div>
<strong>{{ item.couponName }}</strong>
</div>
@ -196,6 +196,10 @@ export default {
if(data){
console.log(data);
this.newlist=data.data;
this.newlist.forEach(element=>{
element.validFrom=element.validFrom.slice(0,10)
element.validTo=element.validTo.slice(0,10)
})
console.log(this.newlist);
}

View File

@ -1,6 +1,7 @@
<template>
<div>
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-header">
<div class="rc-main">
<div class="rc-headera">

View File

@ -7,7 +7,13 @@
<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" @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="" />
<span>{{ item.title }}</span>
</div>
@ -17,7 +23,13 @@
<div class="ts-scrollable-container">
<h2>专区:</h2>
<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 }}
</li>
</ol>
@ -26,7 +38,13 @@
<div class="ts-scrollable-container">
<h2>年龄:</h2>
<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 }}
</li>
</ol>
@ -35,7 +53,13 @@
<div class="ts-scrollable-container">
<h2>功能:</h2>
<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 }}
</li>
</ol>
@ -44,25 +68,39 @@
<div class="ts-scrollable-container">
<h2>品种:</h2>
<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 }}
</li>
</ol>
</div>
<div class="online rc-md-up"></div>
</div>
</div>
</div>
<!-- rc-main end -->
<div class="online"></div>
<div class="online bold"></div>
<!-- rc-main start -->
<div class="rc-max-width--xl">
<div class="usersearch">
<div class="rc-contair">
<ul class="ts-product-list">
<li v-for="(item,index) in rccontair" :key="index" class="rc-margin-top--md">
<div class="rc-click rc-margin-bottom--md" @click="selectproduce(item)">
<li
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">
<img :src=item.picture alt="">
<img :src="item.picture" alt="" />
</div>
</div>
<div class="rc-column">
@ -70,7 +108,15 @@
<span>{{ item.categoryName }}</span>
<i>0.001{{ item.price }}</i>
</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>
</li>
</ul>
@ -82,22 +128,32 @@
</div>
<!-- rc-main end -->
<div v-if="isadrond">
<div class="rc-mubu" v-if="isshow" @click="usershow()"></div>
<div class="rc-bottom" v-if="isshow">
<div class="rc-bottoma">
<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="" />
<span>{{ item.tagName }}</span>
</div>
</div>
<div class="rc-prefecture">
<h2>专区:</h2>
<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 }}
</li>
</ol>
@ -106,7 +162,13 @@
<div class="ts-scrollable-container rc-margin-y--md">
<h2>年龄:</h2>
<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 }}
</li>
</ol>
@ -114,7 +176,13 @@
<div class="ts-scrollable-container rc-margin-y--md">
<h2>功能:</h2>
<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 }}
</li>
</ol>
@ -123,41 +191,50 @@
<div class="ts-scrollable-container">
<h2>品种:</h2>
<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 }}
</li>
</ol>
</div>
</div>
<div class="rc-footer">
<span @click="usershow()">取消</span>
<em @click="usershow()">确定</em>
</div>
</div>
</div>
<el-dialog
:visible.sync="dialogInfo1"
hegight="700px"
v-if="!isadrond"
>
<el-dialog :visible.sync="dialogInfo1" hegight="700px" v-if="!isadrond">
<div class="rc-bottom">
<div class="rc-bottoma">
<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="" />
<span>{{ item.title }}</span>
</div>
</div>
<div class="rc-prefecture">
<h2>专区:</h2>
<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 }}
</li>
</ol>
@ -166,7 +243,13 @@
<div class="ts-scrollable-container rc-margin-y--md">
<h2>年龄:</h2>
<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 }}
</li>
</ol>
@ -174,7 +257,13 @@
<div class="ts-scrollable-container rc-margin-y--md">
<h2>功能:</h2>
<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 }}
</li>
</ol>
@ -183,7 +272,13 @@
<div class="ts-scrollable-container">
<h2>品种:</h2>
<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 }}
</li>
</ol>
@ -200,29 +295,38 @@
</template>
<script>
import Myheader from '~/components/header.vue'
import { userstype,biaomessa,biaomessage,searchchanpin } from "../../ajax/getData";
import Myheader from "~/components/header.vue";
import $ from "jquery";
import {
userstype,
biaomessa,
biaomessage,
searchchanpin,
} from "../../ajax/getData";
export default {
data() {
return {
value: "",
userstype: [],
activeIndex:0,
userserachlist:[
{}
],
activeIndex: "0",
allacindex:0,
userishwo: true,
userishwo1: true,
userishwo2: true,
userishwo3: true,
userserachlist: [{}],
activeIndex1: 0,
activeIndexa:'-1',
activeIndexa: "-1",
dialogInfo1: false,
activeIndexb:'-1',
activeIndexc:'-1',
activeIndexd:'-1',
activeIndexe:'-1',
activeIndexf:'-1',
activeIndexb: "-1",
activeIndexc: "-1",
activeIndexd: "-1",
activeIndexe: "-1",
activeIndexf: "-1",
isadrond: true,
isshow: false,
openshow: false,
direction:'btt',
direction: "btt",
searchdata: [
{
title: "猫罐头",
@ -351,7 +455,7 @@ export default {
rccontair: [
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
price: "¥123.45",
ordernum: 1,
catimage: require("../../assets/image/rc-cat.png"),
@ -359,25 +463,25 @@ export default {
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
price: "¥123.45",
ordernum: "2",
catimage: require("../../assets/image/rc-dog.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
price: "¥123.45",
ordernum: "2",
catimage: require("../../assets/image/rc-dog.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
price: "¥123.45",
ordernum: "2",
catimage: require("../../assets/image/rc-dog.png"),
},
{
title: "皇家英国短毛猫全价湿粮",
price:'¥123.45',
price: "¥123.45",
ordernum: "2",
catimage: require("../../assets/image/rc-dog.png"),
},
@ -391,8 +495,9 @@ export default {
let stype = this.$route.query.stype;
this.userst();
this.activeIndex = stype;
if(stype!==''&&stype!==undefined){
this.onmessage(stype)
if (stype !== "" && stype !== undefined) {
this.onmessage(stype);
} else {
this.usetmessage();
}
@ -403,7 +508,6 @@ export default {
let data = await searchchanpin(stype);
if (data) {
this.rccontair = data;
}
},
async userst() {
@ -415,27 +519,26 @@ export default {
if (data) {
this.userstype = data;
}
this.usercatlist=this.userstype.filter(item=>item.petType=='0')
this.usercatlist.map(element=>{
if(element.name=='品种'){
this.usercatlist = this.userstype.filter((item) => item.petType == "0");
this.usercatlist.map((element) => {
if (element.name == "品种") {
pinzhong.push(element);
this.catageb=pinzhong
this.catageb = pinzhong;
}
if(element.name=='功能'){
if (element.name == "功能") {
gonneg.push(element);
this.catagea=gonneg
this.catagea = gonneg;
}
if(element.name=='年龄'){
if (element.name == "年龄") {
age.push(element);
this.catage=age
this.catage = age;
}
if(element.name=='专区'){
if (element.name == "专区") {
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() {
@ -451,9 +554,6 @@ export default {
}
},
userbuy() {
this.$router.push({
path: "/myorder/userrecord",
@ -484,129 +584,171 @@ this.dialogInfo1=false;
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
console.log("当前是电脑打开")
if (
!(
bIsIpad ||
bIsIphoneOs ||
bIsMidp ||
bIsUc7 ||
bIsUc ||
bIsAndroid ||
bIsCE ||
bIsWM
)
) {
console.log("当前是电脑打开");
this.$nextTick(() => {
this.isadrond = false;
this.dialogInfo1 = true;
this.isadrond = false;
this.isshow = false;
})
});
} else {
console.log("当前是手机打开")
console.log("当前是手机打开");
this.$nextTick(() => {
this.isadrond = true;
this.isshow = true;
this.$refs.usercontent.style.display='none ';
this.$refs.usercontent.style.display = "none ";
this.dialogInfo1 = false;
})
});
}
},
//
onSearch() {},
selectGoods(item, index) {
selectGoods(item, index) {
this.activeIndex = index;
this.allacindex=index
console;
let petType = {
petType:this.activeIndex,
}
petType: this.allacindex,
};
for (let i = 0; i < this.userserachlist.length; i++) {
if (!this.userserachlist.includes(petType)) {
this.userserachlist.push(petType)
this.userserachlist.push(petType);
}
}
this.usersearch(this.userserachlist)
this.usersearch(this.userserachlist);
},
selectGoodsa(item, index) {
this.activeIndex1 = index;
},
userselect() {
this.$nextTick(() => {
this.ifadroind();
})
});
},
usershow() {
this.$nextTick(() => {
this.isshow = false;
// dom
this.$refs.usercontent.style.display='block ';
})
this.$refs.usercontent.style.display = "block ";
});
},
selectsearch(item, index) {
this.activeIndexa = index;
},
selectage(item, index) {
let tagUsedAge={
petType:this.activeIndex1,
tagUsedAge:item.tagName
let tagUsedAge = {};
this.activeIndexc = index;
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,
};
}
this.$refs.chosebox1[index].className = "unactive";
for (let i = 0; i < this.userserachlist.length; i++) {
if (!this.userserachlist.includes(tagUsedAge)) {
this.userserachlist.push(tagUsedAge)
this.userserachlist.push(tagUsedAge);
}
}
this.usersearch(this.userserachlist)
this.activeIndexc=index;
this.usersearch(this.userserachlist);
},
selectagc(item, index) {
let tagFunction={
petType:this.activeIndex1,
tagFunction:item.tagName
let tagFunction = {};
this.activeIndexd = index;
this.userishwo2 = !this.userishwo2;
if (this.userishwo2 == false) {
tagFunction = {
petType: this.allacindex,
tagFunction: item.tagName,
};
} else {
console.log("这是false");
tagFunction = {
petType: this.allacindex,
};
}
this.$refs.chosebox2[index].className = "unactive";
for (let i = 0; i < this.userserachlist.length; i++) {
if (!this.userserachlist.includes(tagFunction)) {
this.userserachlist.push(tagFunction)
this.userserachlist.push(tagFunction);
}
}
this.usersearch(this.userserachlist)
this.activeIndexd=index;
this.usersearch(this.userserachlist);
},
selectagd(item, index) {
let tagBreed={
petType:this.activeIndex1,
tagBreed:item.tagName
let tagBreed = {};
this.activeIndexe = index;
this.userishwo3 = !this.userishwo3;
if (this.userishwo3 == false) {
tagBreed = {
petType: this.allacindex,
tagBreed: item.tagName,
};
} else {
console.log("这是false");
tagBreed = {
petType: this.allacindex,
};
}
this.$refs.chosebox3[index].className = "unactive";
for (let i = 0; i < this.userserachlist.length; i++) {
if (!this.userserachlist.includes(tagBreed)) {
this.userserachlist.push(tagBreed)
this.userserachlist.push(tagBreed);
}
}
this.usersearch(this.userserachlist)
this.activeIndexe=index;
this.usersearch(this.userserachlist);
},
selectproduct(item, index) {
// console.log(this.userishwo=!this.userishwo)
let categoryName = {};
this.activeIndexb = index;
let categoryName={
petType:this.activeIndex1,
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,
};
}
console.log(this.$refs.chosebox);
this.$refs.chosebox[index].className = "unactive";
for (let i = 0; i < this.userserachlist.length; i++) {
if (!this.userserachlist.includes(categoryName)) {
this.userserachlist.push(categoryName)
this.userserachlist.push(categoryName);
}
}
this.usersearch(this.userserachlist)
this.usersearch(this.userserachlist);
},
//
},
};
</script>

View File

@ -104,7 +104,6 @@ export default {
//
async editaddress(user) {
user.data.id=844350
let data = await selectaddress(user.data.id);
this.list=data.data;

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB