|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div v-cloak ref="container">
|
|
<div v-cloak ref="container">
|
|
|
<div class="indexs" v-if="status === 200">
|
|
<div class="indexs" v-if="status === 200">
|
|
|
- <div
|
|
|
|
|
|
|
+ <!-- <div
|
|
|
class="follow acea-row row-between-wrapper"
|
|
class="follow acea-row row-between-wrapper"
|
|
|
v-if="followHid && isWeixin"
|
|
v-if="followHid && isWeixin"
|
|
|
>
|
|
>
|
|
@@ -14,7 +14,7 @@
|
|
|
<div class="followCode" v-if="followCode">
|
|
<div class="followCode" v-if="followCode">
|
|
|
<div class="pictrue"><img :src="followUrl" /></div>
|
|
<div class="pictrue"><img :src="followUrl" /></div>
|
|
|
<div class="mask" @click="closeFollowCode"></div>
|
|
<div class="mask" @click="closeFollowCode"></div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
<div class="header acea-row row-center-wrapper" ref="header">
|
|
<div class="header acea-row row-center-wrapper" ref="header">
|
|
|
<div class="logo"><img :src="logoUrl" v-if="logoUrl" /></div>
|
|
<div class="logo"><img :src="logoUrl" v-if="logoUrl" /></div>
|
|
|
<router-link :to="'/search'" class="search acea-row row-middle">
|
|
<router-link :to="'/search'" class="search acea-row row-middle">
|
|
@@ -30,7 +30,7 @@
|
|
|
v-model="tapActive"
|
|
v-model="tapActive"
|
|
|
class="tabs"
|
|
class="tabs"
|
|
|
sticky
|
|
sticky
|
|
|
- @click="categoryTap"
|
|
|
|
|
|
|
+ @click="productTap"
|
|
|
>
|
|
>
|
|
|
<Tab>
|
|
<Tab>
|
|
|
<div slot="title" ref="title">精选</div>
|
|
<div slot="title" ref="title">精选</div>
|
|
@@ -61,6 +61,23 @@
|
|
|
<div class="pictrue"><img v-lazy="item.pic" alt="img" /></div>
|
|
<div class="pictrue"><img v-lazy="item.pic" alt="img" /></div>
|
|
|
<div>{{ item.name }}</div>
|
|
<div>{{ item.name }}</div>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
|
|
+
|
|
|
|
|
+ <router-link v-if="isVip"
|
|
|
|
|
+ to="/goods_list?id=53"
|
|
|
|
|
+ class="item"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="pictrue"><img v-lazy="'http://datong.crmeb.net/public/uploads/attach/2019/03/29/5c9ddccecb7f3.png'" alt="img" /></div>
|
|
|
|
|
+ <div>会员专区</div>
|
|
|
|
|
+ </router-link>
|
|
|
|
|
+ <router-link v-else
|
|
|
|
|
+ to="/user/integral"
|
|
|
|
|
+ class="item"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="pictrue"><img v-lazy="'http://datong.crmeb.net/public/uploads/attach/2019/03/29/5c9ddccecb7f3.png'" alt="img" /></div>
|
|
|
|
|
+ <div>积分中心</div>
|
|
|
|
|
+ </router-link>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="scroll-coupon" v-if="getCouponList.length">
|
|
<div class="scroll-coupon" v-if="getCouponList.length">
|
|
|
<swiper :options="swiperScroll">
|
|
<swiper :options="swiperScroll">
|
|
@@ -291,7 +308,7 @@
|
|
|
v-for="(item, index) in info.firstList"
|
|
v-for="(item, index) in info.firstList"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
>
|
|
>
|
|
|
- <div class="item">
|
|
|
|
|
|
|
+ <div class="item" @click="goDetails(item)">
|
|
|
<img :src="item.image" />
|
|
<img :src="item.image" />
|
|
|
<span
|
|
<span
|
|
|
class="pictrue_log_big pictrue_log_class"
|
|
class="pictrue_log_big pictrue_log_class"
|
|
@@ -319,7 +336,7 @@
|
|
|
<div v-if="index === avtiveIndex">
|
|
<div v-if="index === avtiveIndex">
|
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
|
<div class="money font-color-red">
|
|
<div class="money font-color-red">
|
|
|
- ¥<span class="num">{{ item.price }}</span>
|
|
|
|
|
|
|
+ ¥<span class="num">{{ isVip ? item.vip_price : item.price }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -386,12 +403,7 @@
|
|
|
<div class="text">
|
|
<div class="text">
|
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
|
<div class="acea-row row-between-wrapper">
|
|
<div class="acea-row row-between-wrapper">
|
|
|
- <div>
|
|
|
|
|
- <div class="money font-color-red">
|
|
|
|
|
- ¥<span class="num">{{ item.price }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="ot-money">¥{{ item.ot_price }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <GoodItem :item = item :isVip = isVip></GoodItem>
|
|
|
<div class="cart acea-row row-center-wrapper">
|
|
<div class="cart acea-row row-center-wrapper">
|
|
|
<span class="iconfont icon-mzshopping"></span>
|
|
<span class="iconfont icon-mzshopping"></span>
|
|
|
</div>
|
|
</div>
|
|
@@ -434,15 +446,12 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="text">
|
|
<div class="text">
|
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
|
- <div class="money font-color-red">
|
|
|
|
|
- ¥<span class="num">{{ item.price }}</span
|
|
|
|
|
- ><span class="ot-money">¥{{ item.ot_price }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <GoodItem :item = item :isVip = isVip></GoodItem>
|
|
|
</div>
|
|
</div>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="promotion" v-if="benefit.length">
|
|
|
|
|
|
|
+ <!-- <div class="promotion" v-if="benefit.length">
|
|
|
<div class="publicTitle acea-row row-center-wrapper">
|
|
<div class="publicTitle acea-row row-center-wrapper">
|
|
|
<img src="@assets/images/promotionTitle.png" />
|
|
<img src="@assets/images/promotionTitle.png" />
|
|
|
<router-link :to="'/promotion'" class="more"
|
|
<router-link :to="'/promotion'" class="more"
|
|
@@ -477,15 +486,7 @@
|
|
|
<div class="text">
|
|
<div class="text">
|
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
|
<div class="acea-row row-between-wrapper">
|
|
<div class="acea-row row-between-wrapper">
|
|
|
- <div>
|
|
|
|
|
- <div
|
|
|
|
|
- class="money font-color-red acea-row row-between-wrapper"
|
|
|
|
|
- >
|
|
|
|
|
- ¥<span class="num">{{ item.price }}</span
|
|
|
|
|
- ><span class="label bg-color-red">疯抢</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="ot-money">¥{{ item.ot_price }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <GoodItem :item = item :isVip = isVip></GoodItem>
|
|
|
<div class="cart acea-row row-center-wrapper">
|
|
<div class="cart acea-row row-center-wrapper">
|
|
|
<span class="iconfont icon-mzshopping"></span>
|
|
<span class="iconfont icon-mzshopping"></span>
|
|
|
</div>
|
|
</div>
|
|
@@ -493,7 +494,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
<div class="recommend" v-if="hostProduct.length">
|
|
<div class="recommend" v-if="hostProduct.length">
|
|
|
<div class="title">
|
|
<div class="title">
|
|
|
<img src="@assets/images/becommendTitle.png" />
|
|
<img src="@assets/images/becommendTitle.png" />
|
|
@@ -526,12 +527,7 @@
|
|
|
<div class="text">
|
|
<div class="text">
|
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
<div class="name line1">{{ item.store_name }}</div>
|
|
|
<div class="acea-row row-between-wrapper">
|
|
<div class="acea-row row-between-wrapper">
|
|
|
- <div>
|
|
|
|
|
- <div class="money font-color-red">
|
|
|
|
|
- ¥<span class="num">{{ item.price }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="ot-money">¥{{ item.ot_price }}</div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <GoodItem :item = item :isVip = isVip></GoodItem>
|
|
|
<div class="cart acea-row row-center-wrapper">
|
|
<div class="cart acea-row row-center-wrapper">
|
|
|
<span class="iconfont icon-mzshopping"></span>
|
|
<span class="iconfont icon-mzshopping"></span>
|
|
|
</div>
|
|
</div>
|
|
@@ -544,16 +540,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
</Tab>
|
|
</Tab>
|
|
|
<Tab
|
|
<Tab
|
|
|
- v-for="(item, index) in categoryOne"
|
|
|
|
|
|
|
+ v-for="(item, index) in categorySub"
|
|
|
:title="item.cate_name"
|
|
:title="item.cate_name"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
>
|
|
>
|
|
|
<div class="wrapper">
|
|
<div class="wrapper">
|
|
|
- <div
|
|
|
|
|
- class="scroll-classify acea-row row-middle"
|
|
|
|
|
- v-if="item.children.length"
|
|
|
|
|
- >
|
|
|
|
|
- <swiper :options="classifyScroll">
|
|
|
|
|
|
|
+ <div class="scroll-classify acea-row row-middle" v-if="item.length">
|
|
|
|
|
+ <!--<swiper :options="classifyScroll">
|
|
|
<swiper-slide
|
|
<swiper-slide
|
|
|
v-for="(itemn, indexn) in item.children"
|
|
v-for="(itemn, indexn) in item.children"
|
|
|
:key="indexn"
|
|
:key="indexn"
|
|
@@ -569,7 +562,7 @@
|
|
|
<div class="name line1">{{ itemn.cate_name }}</div>
|
|
<div class="name line1">{{ itemn.cate_name }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</swiper-slide>
|
|
</swiper-slide>
|
|
|
- </swiper>
|
|
|
|
|
|
|
+ </swiper> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="classifyList acea-row row-between-wrapper">
|
|
<div class="classifyList acea-row row-between-wrapper">
|
|
|
<div
|
|
<div
|
|
@@ -604,17 +597,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="text">
|
|
<div class="text">
|
|
|
<div class="name line1">{{ productItem.store_name }}</div>
|
|
<div class="name line1">{{ productItem.store_name }}</div>
|
|
|
- <div class="money font-color-red">
|
|
|
|
|
- ¥<span class="num">{{ productItem.price }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <GoodItem :item = productItem :isVip = isVip></GoodItem>
|
|
|
<div class="acea-row row-between-wrapper">
|
|
<div class="acea-row row-between-wrapper">
|
|
|
- <div
|
|
|
|
|
- class="vipMoney"
|
|
|
|
|
- v-if="productItem.vip_price && productItem.vip_price > 0"
|
|
|
|
|
- >
|
|
|
|
|
- ¥{{ productItem.vip_price
|
|
|
|
|
- }}<img src="@assets/images/vip.png" />
|
|
|
|
|
- </div>
|
|
|
|
|
<div class="sales">已售{{ productItem.sales }}件</div>
|
|
<div class="sales">已售{{ productItem.sales }}件</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -631,7 +615,7 @@
|
|
|
<img src="@assets/images/noGood.png" class="image" />
|
|
<img src="@assets/images/noGood.png" class="image" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <Recommend
|
|
|
|
|
|
|
+ <Recommend isVip = isVip
|
|
|
v-if="productList.length === 0 && where.page > 1"
|
|
v-if="productList.length === 0 && where.page > 1"
|
|
|
></Recommend>
|
|
></Recommend>
|
|
|
</div>
|
|
</div>
|
|
@@ -665,6 +649,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+import { getUserInfo } from "@api/user";
|
|
|
import { swiper, swiperSlide } from "vue-awesome-swiper";
|
|
import { swiper, swiperSlide } from "vue-awesome-swiper";
|
|
|
import "@assets/css/swiper.min.css";
|
|
import "@assets/css/swiper.min.css";
|
|
|
import { Tab, Tabs } from "vant";
|
|
import { Tab, Tabs } from "vant";
|
|
@@ -682,7 +667,8 @@ import debounce from "lodash.debounce";
|
|
|
import { goShopDetail } from "@libs/order";
|
|
import { goShopDetail } from "@libs/order";
|
|
|
import JPush from "@libs/jpush";
|
|
import JPush from "@libs/jpush";
|
|
|
import WeChat from "@libs/pay";
|
|
import WeChat from "@libs/pay";
|
|
|
-import { getQueryVariable } from '../../utils';
|
|
|
|
|
|
|
+import GoodItem from "@components/GoodItem"
|
|
|
|
|
+import { getQueryVariable } from "../../utils";
|
|
|
const HAS_COUPON_WINDOW = "has_coupon_window";
|
|
const HAS_COUPON_WINDOW = "has_coupon_window";
|
|
|
const LONGITUDE = "user_longitude";
|
|
const LONGITUDE = "user_longitude";
|
|
|
const LATITUDE = "user_latitude";
|
|
const LATITUDE = "user_latitude";
|
|
@@ -696,12 +682,14 @@ export default {
|
|
|
Tabs,
|
|
Tabs,
|
|
|
CouponWindow,
|
|
CouponWindow,
|
|
|
Loading,
|
|
Loading,
|
|
|
- Recommend
|
|
|
|
|
|
|
+ Recommend,
|
|
|
|
|
+ GoodItem
|
|
|
},
|
|
},
|
|
|
props: {},
|
|
props: {},
|
|
|
data: function() {
|
|
data: function() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
return {
|
|
return {
|
|
|
|
|
+ isVip: false,
|
|
|
isWeixin: isWeixin(),
|
|
isWeixin: isWeixin(),
|
|
|
followUrl: "",
|
|
followUrl: "",
|
|
|
subscribe: false,
|
|
subscribe: false,
|
|
@@ -739,6 +727,7 @@ export default {
|
|
|
couponList: [],
|
|
couponList: [],
|
|
|
showCoupon: false,
|
|
showCoupon: false,
|
|
|
categoryOne: [],
|
|
categoryOne: [],
|
|
|
|
|
+ categorySub: [],
|
|
|
categoryActive: 0,
|
|
categoryActive: 0,
|
|
|
where: {
|
|
where: {
|
|
|
page: 1,
|
|
page: 1,
|
|
@@ -844,7 +833,11 @@ export default {
|
|
|
return this.$refs.mySwiper.swiper;
|
|
return this.$refs.mySwiper.swiper;
|
|
|
},
|
|
},
|
|
|
newSwiper() {
|
|
newSwiper() {
|
|
|
- return this.$refs.newSwiper.swiper;
|
|
|
|
|
|
|
+ if (this.$refs.newSwiper != undefined) {
|
|
|
|
|
+ return this.$refs.newSwiper.swiper;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
recommendSwiper() {
|
|
recommendSwiper() {
|
|
|
return this.$refs.recommendSwiper.swiper;
|
|
return this.$refs.recommendSwiper.swiper;
|
|
@@ -855,39 +848,43 @@ export default {
|
|
|
if (to === 0) {
|
|
if (to === 0) {
|
|
|
this.tapActive = 0;
|
|
this.tapActive = 0;
|
|
|
this.swiper.autoplay.start();
|
|
this.swiper.autoplay.start();
|
|
|
- this.newSwiper.autoplay.start();
|
|
|
|
|
|
|
+ if(this.mySwiper != null) this.newSwiper.autoplay.start();
|
|
|
this.recommendSwiper.autoplay.start();
|
|
this.recommendSwiper.autoplay.start();
|
|
|
} else {
|
|
} else {
|
|
|
this.swiper.autoplay.stop();
|
|
this.swiper.autoplay.stop();
|
|
|
- this.newSwiper.autoplay.stop();
|
|
|
|
|
|
|
+ if(this.mySwiper != null) this.newSwiper.autoplay.stop();
|
|
|
this.recommendSwiper.autoplay.stop();
|
|
this.recommendSwiper.autoplay.stop();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
$route(n) {
|
|
$route(n) {
|
|
|
if (n.name === "Index") {
|
|
if (n.name === "Index") {
|
|
|
- this.getCoupon();
|
|
|
|
|
|
|
+ // this.getCoupon();
|
|
|
|
|
+ this.updateVIP();
|
|
|
|
|
+ this.getHomeData();
|
|
|
|
|
+ this.hostProducts();
|
|
|
this.swiper.autoplay.start();
|
|
this.swiper.autoplay.start();
|
|
|
- this.newSwiper.autoplay.start();
|
|
|
|
|
|
|
+ if(this.mySwiper != null) this.newSwiper.autoplay.start();
|
|
|
this.recommendSwiper.autoplay.start();
|
|
this.recommendSwiper.autoplay.start();
|
|
|
} else {
|
|
} else {
|
|
|
this.swiper.autoplay.stop();
|
|
this.swiper.autoplay.stop();
|
|
|
- this.newSwiper.autoplay.stop();
|
|
|
|
|
|
|
+ if(this.mySwiper != null) this.newSwiper.autoplay.stop();
|
|
|
this.recommendSwiper.autoplay.stop();
|
|
this.recommendSwiper.autoplay.stop();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted: function() {
|
|
mounted: function() {
|
|
|
var that = this;
|
|
var that = this;
|
|
|
- var processUri = function (params) {
|
|
|
|
|
- that.$router.push({path: params.uri});
|
|
|
|
|
|
|
+ var processUri = function(params) {
|
|
|
|
|
+ that.$router.push({ path: params.uri });
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
JPush.init(processUri);
|
|
JPush.init(processUri);
|
|
|
WeChat.init();
|
|
WeChat.init();
|
|
|
|
|
|
|
|
- this.getFollow();
|
|
|
|
|
|
|
+ this.updateVIP();
|
|
|
|
|
+ // this.getFollow();
|
|
|
this.getHomeData();
|
|
this.getHomeData();
|
|
|
- this.getCoupon();
|
|
|
|
|
|
|
+ // this.getCoupon();
|
|
|
this.getSeckillTime();
|
|
this.getSeckillTime();
|
|
|
this.hostProducts();
|
|
this.hostProducts();
|
|
|
this.getCategoryData();
|
|
this.getCategoryData();
|
|
@@ -896,14 +893,26 @@ export default {
|
|
|
});
|
|
});
|
|
|
cookie.get("expires");
|
|
cookie.get("expires");
|
|
|
|
|
|
|
|
- console.log(window.location.href);
|
|
|
|
|
- var uri = getQueryVariable('uri')
|
|
|
|
|
- if(uri != "") {
|
|
|
|
|
|
|
+ var uri = getQueryVariable("uri");
|
|
|
|
|
+ if (uri != "") {
|
|
|
console.log("get uri: ", uri);
|
|
console.log("get uri: ", uri);
|
|
|
- this.$router.push({path: uri});
|
|
|
|
|
|
|
+ this.$router.push({ path: uri });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ updateVIP () {
|
|
|
|
|
+ var userinfo = this.$store.state.app.userInfo;
|
|
|
|
|
+ if (this.$store.state.app.token) {
|
|
|
|
|
+ getUserInfo().then(res => {
|
|
|
|
|
+ userinfo = res.data;
|
|
|
|
|
+ this.isVip = userinfo.vip_level > 0;
|
|
|
|
|
+ console.log('Current VIP:', userinfo.vip_level);
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.isVip = false;
|
|
|
|
|
+ console.log('Current is not Login');
|
|
|
|
|
+ },
|
|
|
closeFollow() {
|
|
closeFollow() {
|
|
|
this.followHid = false;
|
|
this.followHid = false;
|
|
|
},
|
|
},
|
|
@@ -970,8 +979,8 @@ export default {
|
|
|
this.showCoupon =
|
|
this.showCoupon =
|
|
|
!cookie.has(HAS_COUPON_WINDOW) &&
|
|
!cookie.has(HAS_COUPON_WINDOW) &&
|
|
|
res.data.couponList.some(coupon => coupon.is_use);
|
|
res.data.couponList.some(coupon => coupon.is_use);
|
|
|
- if (!cookie.get(LATITUDE) && !cookie.get(LONGITUDE))
|
|
|
|
|
- this.getWXLocation();
|
|
|
|
|
|
|
+ // if (!cookie.get(LATITUDE) && !cookie.get(LONGITUDE))
|
|
|
|
|
+ // this.getWXLocation();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
getWXLocation() {
|
|
getWXLocation() {
|
|
@@ -1073,6 +1082,7 @@ export default {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
getCategory().then(res => {
|
|
getCategory().then(res => {
|
|
|
that.$set(that, "categoryOne", res.data);
|
|
that.$set(that, "categoryOne", res.data);
|
|
|
|
|
+ that.$set(that, "categorySub", res.data[0].children.slice(0, 3));
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
get_product_list: debounce(function() {
|
|
get_product_list: debounce(function() {
|
|
@@ -1095,9 +1105,9 @@ export default {
|
|
|
that.where.page = 1;
|
|
that.where.page = 1;
|
|
|
that.loadends = false;
|
|
that.loadends = false;
|
|
|
that.loadings = false;
|
|
that.loadings = false;
|
|
|
- that.where.cid = that.categoryOne[that.tapActive - 1].id;
|
|
|
|
|
- that.where.sid = that.categoryOne[that.tapActive - 1].children.length
|
|
|
|
|
- ? that.categoryOne[that.tapActive - 1].children[0].id
|
|
|
|
|
|
|
+ that.where.cid = that.categorySub[that.tapActive - 1].id;
|
|
|
|
|
+ that.where.sid = that.categorySub[that.tapActive - 1].children.length
|
|
|
|
|
+ ? that.categorySub[that.tapActive - 1].children[0].id
|
|
|
: -1;
|
|
: -1;
|
|
|
that.categoryActive = 0;
|
|
that.categoryActive = 0;
|
|
|
that.get_product_list();
|
|
that.get_product_list();
|
|
@@ -1107,13 +1117,16 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
productTap: function(index) {
|
|
productTap: function(index) {
|
|
|
|
|
+ if (index === 0) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
let that = this;
|
|
let that = this;
|
|
|
that.categoryActive = index;
|
|
that.categoryActive = index;
|
|
|
that.$set(that, "productList", []);
|
|
that.$set(that, "productList", []);
|
|
|
that.where.page = 1;
|
|
that.where.page = 1;
|
|
|
that.loadends = false;
|
|
that.loadends = false;
|
|
|
that.loadings = false;
|
|
that.loadings = false;
|
|
|
- that.where.sid = that.categoryOne[that.tapActive - 1].children[index].id;
|
|
|
|
|
|
|
+ that.where.sid = that.categorySub[index - 1].id;
|
|
|
that.get_product_list();
|
|
that.get_product_list();
|
|
|
this.$scroll(this.$refs.container, () => {
|
|
this.$scroll(this.$refs.container, () => {
|
|
|
!this.loadings && this.get_product_list();
|
|
!this.loadings && this.get_product_list();
|