add
This commit is contained in:
@ -59,7 +59,7 @@ export default {
|
||||
this.toSearch(search);
|
||||
},
|
||||
toSearch(s) {
|
||||
this.$yrouter.push({ path: "/pages/shop/GoodsList/main", query: { s } });
|
||||
this.$yrouter.push({ path: "/pages/shop/GoodsList/index", query: { s } });
|
||||
},
|
||||
getData() {
|
||||
getSearchKeyword().then(res => {
|
||||
|
@ -32,7 +32,7 @@
|
||||
class="item acea-row row-column row-middle"
|
||||
v-for="(child, categoryIndex) in item.children"
|
||||
:key="categoryIndex"
|
||||
@click="$yrouter.push({path: '/pages/shop/GoodsList/index',query: { id: child.id, title: child.cateName }})"
|
||||
@click="goGoodsList(child)"
|
||||
>
|
||||
<div class="picture">
|
||||
<img :src="child.pic" />
|
||||
@ -75,6 +75,12 @@ export default {
|
||||
this.loadCategoryData();
|
||||
},
|
||||
methods: {
|
||||
goGoodsList(child) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsList/index",
|
||||
query: { id: child.id, title: child.cateName }
|
||||
});
|
||||
},
|
||||
activeCateId(n) {
|
||||
let index = 0;
|
||||
n = parseInt(n);
|
||||
@ -101,7 +107,7 @@ export default {
|
||||
var val = trim(this.search);
|
||||
if (val) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsList/main",
|
||||
path: "/pages/shop/GoodsList/index",
|
||||
query: { s: val }
|
||||
});
|
||||
setTimeout(() => (this.search = ""), 500);
|
||||
@ -115,11 +121,10 @@ export default {
|
||||
// document.removeEventListener("scroll", this.onScroll, false);
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style >
|
||||
.productSort{
|
||||
height:100%
|
||||
}
|
||||
.productSort {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,10 +2,10 @@
|
||||
<div ref="container">
|
||||
<div class="collectionGoods" v-if="collectProductList.length > 0">
|
||||
<div
|
||||
@click="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:item.pid} })"
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(item, collectProductListIndex) in collectProductList"
|
||||
:key="collectProductListIndex"
|
||||
@click="goGoodsCon(item)"
|
||||
>
|
||||
<div class="pictrue">
|
||||
<img :src="item.image" />
|
||||
@ -60,6 +60,12 @@ export default {
|
||||
!this.loading && this.get_user_collect_product();
|
||||
},
|
||||
methods: {
|
||||
goGoodsCon(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: item.pid }
|
||||
});
|
||||
},
|
||||
get_user_collect_product: function() {
|
||||
let that = this;
|
||||
if (that.loading) return; //阻止下次请求(false可以进行请求);
|
||||
|
@ -68,10 +68,7 @@
|
||||
<div class="userEvaluation" v-if="replyCount">
|
||||
<div class="title acea-row row-between-wrapper">
|
||||
<div>用户评价({{ replyCount }})</div>
|
||||
<div
|
||||
@click="$yrouter.push({ path: '/pages/shop/EvaluateList/index',query:{id}})"
|
||||
class="praise"
|
||||
>
|
||||
<div @click="goEvaluateList(id)" class="praise">
|
||||
<span class="font-color-red">{{ replyChance }}%</span>好评率
|
||||
<span class="iconfont icon-jiantou"></span>
|
||||
</div>
|
||||
@ -109,7 +106,7 @@
|
||||
</div>
|
||||
<div style="height:100rpx;"></div>
|
||||
<div class="footer acea-row row-between-wrapper">
|
||||
<!--<div class="item" @click="$yrouter.push({ path: '/pages/user/CustomerList/index' })">-->
|
||||
<!--<div class="item" @click="goCustomerList()">-->
|
||||
<!--<div class="iconfont icon-kefu"></div>-->
|
||||
<!--<div>客服</div>-->
|
||||
<!--</div>-->
|
||||
@ -118,7 +115,7 @@
|
||||
<div>收藏</div>
|
||||
</div>
|
||||
<div
|
||||
@click="$yrouter.push('/pages/shop/ShoppingCart/index')"
|
||||
@click="goShoppingCart()"
|
||||
class="item animated"
|
||||
:class="animated === true ? 'bounceIn' : ''"
|
||||
>
|
||||
@ -166,177 +163,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
.geoPage {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
z-index: 10000;
|
||||
}
|
||||
.product-con .store-info {
|
||||
margin-top: 0.2rem;
|
||||
background-color: #fff;
|
||||
}
|
||||
.product-con .store-info .title {
|
||||
padding: 0 0.3rem;
|
||||
font-size: 0.28rem;
|
||||
color: #282828;
|
||||
height: 0.8rem;
|
||||
line-height: 0.8rem;
|
||||
border-bottom: 0.01rem solid #f5f5f5;
|
||||
}
|
||||
.product-con .store-info .info {
|
||||
padding: 0 0.3rem;
|
||||
height: 1.26rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt {
|
||||
width: 6.15rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .pictrue {
|
||||
width: 0.76rem;
|
||||
height: 0.76rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .pictrue img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0.06rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text {
|
||||
width: 5.22rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .name {
|
||||
font-size: 0.3rem;
|
||||
color: #282828;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .address {
|
||||
font-size: 0.24rem;
|
||||
color: #666;
|
||||
margin-top: 0.03rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .address .iconfont {
|
||||
color: #707070;
|
||||
font-size: 0.18rem;
|
||||
margin-left: 0.1rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .address .addressTxt {
|
||||
width: 4.8rem;
|
||||
}
|
||||
.product-con .store-info .info .iconfont {
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
.product-con .superior {
|
||||
background-color: #fff;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.product-con .superior .title {
|
||||
height: 0.98rem;
|
||||
}
|
||||
.product-con .superior .title img {
|
||||
width: 0.3rem;
|
||||
height: 0.3rem;
|
||||
}
|
||||
.product-con .superior .title .titleTxt {
|
||||
margin: 0 0.2rem;
|
||||
font-size: 0.3rem;
|
||||
background-image: linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||
background-image: -webkit-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||
background-image: -moz-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
.product-con .superior .slider-banner {
|
||||
width: 6.9rem;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list {
|
||||
width: 100%;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item {
|
||||
width: 2.15rem;
|
||||
margin: 0 0.22rem 0.3rem 0;
|
||||
font-size: 0.26rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item .pictrue {
|
||||
width: 100%;
|
||||
height: 2.15rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item .pictrue img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0.06rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item .name {
|
||||
color: #282828;
|
||||
margin-top: 0.12rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .swiper-pagination-bullet {
|
||||
background-color: #999;
|
||||
}
|
||||
.product-con .superior .slider-banner .swiper-pagination-bullet-active {
|
||||
background-color: #e93323;
|
||||
}
|
||||
|
||||
.mask {
|
||||
-webkit-filter: blur(2px);
|
||||
-moz-filter: blur(2px);
|
||||
-ms-filter: blur(2px);
|
||||
filter: blur(2px);
|
||||
}
|
||||
.footer .icon-shoucang1 {
|
||||
color: #73cbb6;
|
||||
}
|
||||
.product-con .product-intro .conter div {
|
||||
width: 100% !important;
|
||||
}
|
||||
.generate-posters {
|
||||
width: 100%;
|
||||
height: 1.7rem;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
-moz-transform: translate3d(0, 100%, 0);
|
||||
-o-transform: translate3d(0, 100%, 0);
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
}
|
||||
.generate-posters.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.generate-posters .item {
|
||||
flex: 50%;
|
||||
-webkit-flex: 50%;
|
||||
-ms-flex: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
.generate-posters .item .iconfont {
|
||||
font-size: 0.8rem;
|
||||
color: #5eae72;
|
||||
}
|
||||
.generate-posters .item .iconfont.icon-haibao {
|
||||
color: #5391f1;
|
||||
}
|
||||
.noscroll {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
|
||||
@ -441,6 +268,18 @@ export default {
|
||||
this.productCon();
|
||||
},
|
||||
methods: {
|
||||
goShoppingCart() {
|
||||
this.$yrouter.switchTab("/pages/shop/ShoppingCart/index");
|
||||
},
|
||||
goCustomerList() {
|
||||
this.$yrouter.push({ path: "/pages/user/CustomerList/index" });
|
||||
},
|
||||
goEvaluateList(id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/EvaluateList/index",
|
||||
query: { id }
|
||||
});
|
||||
},
|
||||
showChang: function() {
|
||||
if (isWeixin()) {
|
||||
let config = {
|
||||
@ -520,7 +359,7 @@ export default {
|
||||
that.getCartCount();
|
||||
})
|
||||
.catch(res => {
|
||||
wx.showToast({
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
@ -744,7 +583,7 @@ export default {
|
||||
that.attr.cartAttr = false;
|
||||
if (news) {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/main",
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: { id: res.data.cartId }
|
||||
});
|
||||
} else {
|
||||
@ -758,7 +597,7 @@ export default {
|
||||
})
|
||||
.catch(error => {
|
||||
that.isOpen = false;
|
||||
wx.showToast({
|
||||
uni.showToast({
|
||||
title: error.response.data.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
@ -799,3 +638,176 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.geoPage {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
z-index: 10000;
|
||||
}
|
||||
.product-con .store-info {
|
||||
margin-top: 0.2rem;
|
||||
background-color: #fff;
|
||||
}
|
||||
.product-con .store-info .title {
|
||||
padding: 0 0.3rem;
|
||||
font-size: 0.28rem;
|
||||
color: #282828;
|
||||
height: 0.8rem;
|
||||
line-height: 0.8rem;
|
||||
border-bottom: 0.01rem solid #f5f5f5;
|
||||
}
|
||||
.product-con .store-info .info {
|
||||
padding: 0 0.3rem;
|
||||
height: 1.26rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt {
|
||||
width: 6.15rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .pictrue {
|
||||
width: 0.76rem;
|
||||
height: 0.76rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .pictrue img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0.06rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text {
|
||||
width: 5.22rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .name {
|
||||
font-size: 0.3rem;
|
||||
color: #282828;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .address {
|
||||
font-size: 0.24rem;
|
||||
color: #666;
|
||||
margin-top: 0.03rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .address .iconfont {
|
||||
color: #707070;
|
||||
font-size: 0.18rem;
|
||||
margin-left: 0.1rem;
|
||||
}
|
||||
.product-con .store-info .info .picTxt .text .address .addressTxt {
|
||||
width: 4.8rem;
|
||||
}
|
||||
.product-con .store-info .info .iconfont {
|
||||
font-size: 0.4rem;
|
||||
}
|
||||
.product-con .superior {
|
||||
background-color: #fff;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.product-con .superior .title {
|
||||
height: 0.98rem;
|
||||
}
|
||||
.product-con .superior .title img {
|
||||
width: 0.3rem;
|
||||
height: 0.3rem;
|
||||
}
|
||||
.product-con .superior .title .titleTxt {
|
||||
margin: 0 0.2rem;
|
||||
font-size: 0.3rem;
|
||||
background-image: linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||
background-image: -webkit-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||
background-image: -moz-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
.product-con .superior .slider-banner {
|
||||
width: 6.9rem;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list {
|
||||
width: 100%;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item {
|
||||
width: 2.15rem;
|
||||
margin: 0 0.22rem 0.3rem 0;
|
||||
font-size: 0.26rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item:nth-of-type(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item .pictrue {
|
||||
width: 100%;
|
||||
height: 2.15rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item .pictrue img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0.06rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .list .item .name {
|
||||
color: #282828;
|
||||
margin-top: 0.12rem;
|
||||
}
|
||||
.product-con .superior .slider-banner .swiper-pagination-bullet {
|
||||
background-color: #999;
|
||||
}
|
||||
.product-con .superior .slider-banner .swiper-pagination-bullet-active {
|
||||
background-color: #e93323;
|
||||
}
|
||||
|
||||
.mask {
|
||||
-webkit-filter: blur(2px);
|
||||
-moz-filter: blur(2px);
|
||||
-ms-filter: blur(2px);
|
||||
filter: blur(2px);
|
||||
}
|
||||
.footer .icon-shoucang1 {
|
||||
color: #73cbb6;
|
||||
}
|
||||
.product-con .product-intro .conter div {
|
||||
width: 100% !important;
|
||||
}
|
||||
.generate-posters {
|
||||
width: 100%;
|
||||
height: 1.7rem;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
-moz-transform: translate3d(0, 100%, 0);
|
||||
-o-transform: translate3d(0, 100%, 0);
|
||||
transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||
}
|
||||
.generate-posters.on {
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
}
|
||||
.generate-posters .item {
|
||||
flex: 50%;
|
||||
-webkit-flex: 50%;
|
||||
-ms-flex: 50%;
|
||||
text-align: center;
|
||||
}
|
||||
.generate-posters .item .iconfont {
|
||||
font-size: 0.8rem;
|
||||
color: #5eae72;
|
||||
}
|
||||
.generate-posters .item .iconfont.icon-haibao {
|
||||
color: #5391f1;
|
||||
}
|
||||
.noscroll {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
@ -187,13 +187,13 @@ export default {
|
||||
comment: expect
|
||||
})
|
||||
.then(() => {
|
||||
wx.showToast({
|
||||
uni.showToast({
|
||||
title: "评价成功",
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/main",
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: { id: this.orderCon.orderId }
|
||||
});
|
||||
})
|
||||
|
@ -40,7 +40,7 @@
|
||||
ref="container"
|
||||
>
|
||||
<div
|
||||
@click="$yrouter.push({path: '/pages/shop/GoodsCon/index',query:{id:item.id}})"
|
||||
@click="goGoodsCon(item)"
|
||||
class="item"
|
||||
:class="Switch === true ? '' : 'on'"
|
||||
v-for="(item, productListIndex) in productList"
|
||||
@ -168,6 +168,12 @@ export default {
|
||||
this.nows = fals;
|
||||
},
|
||||
methods: {
|
||||
goGoodsCon(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: item.id }
|
||||
});
|
||||
},
|
||||
updateTitle() {
|
||||
// document.title = this.title || this.$yroute.meta.title;
|
||||
},
|
||||
@ -210,7 +216,7 @@ export default {
|
||||
let that = this;
|
||||
switch (index) {
|
||||
case 0:
|
||||
return that.$yrouter.push({ path: "/pages/shop/GoodsClass/main" });
|
||||
return that.$yrouter.push({ path: "/pages/shop/GoodsClass/index" });
|
||||
case 1:
|
||||
if (that.price === 0) that.price = 1;
|
||||
else if (that.price === 1) that.price = 2;
|
||||
|
@ -39,10 +39,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div
|
||||
class="pictrue"
|
||||
@click="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:item.productId }})"
|
||||
>
|
||||
<div class="pictrue" @click="goGoodsCon(item)">
|
||||
<img :src="item.productInfo.attrInfo.image" v-if="item.productInfo.attrInfo" />
|
||||
<img :src="item.productInfo.image" v-else />
|
||||
</div>
|
||||
@ -101,7 +98,7 @@
|
||||
<div class="goodsList" :hidden="goodsHidden">
|
||||
<div v-for="(item, cartListinvalidIndex) in cartList.invalid" :key="cartListinvalidIndex">
|
||||
<div
|
||||
@click="$yrouter.push({ path: '/pages/shop/GoodsCon/index',query:{id:item.productId }})"
|
||||
@click="goGoodsCon(item)"
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-if="item.productInfo"
|
||||
>
|
||||
@ -134,7 +131,7 @@
|
||||
</div>
|
||||
<div style="height:2.1rem"></div>
|
||||
<div
|
||||
:class="['footer acea-row row-between-wrapper',isIpx?'iphonex-footer':'']"
|
||||
:class="['footer acea-row row-between-wrapper']"
|
||||
v-if="cartList.valid.length > 0"
|
||||
>
|
||||
<div>
|
||||
@ -240,6 +237,12 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
goGoodsCon(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/GoodsCon/index",
|
||||
query: { id: item.productId }
|
||||
});
|
||||
},
|
||||
getCartList: function() {
|
||||
let that = this;
|
||||
getCartList().then(res => {
|
||||
@ -341,7 +344,7 @@ export default {
|
||||
}
|
||||
console.log(id);
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/main",
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: { id: id.join(",") }
|
||||
});
|
||||
},
|
||||
@ -394,7 +397,7 @@ export default {
|
||||
this.getCartList();
|
||||
})
|
||||
.catch(error => {
|
||||
wx.showToast({
|
||||
uni.showToast({
|
||||
title: error.response.data.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
|
@ -1,10 +1,7 @@
|
||||
<template>
|
||||
<div class="newsList" ref="container">
|
||||
<div class="list" v-for="(item, articleListIndex) in articleList" :key="articleListIndex">
|
||||
<div
|
||||
@click="$yrouter.push({ path: '/pages/shop/news/NewsDetail/index',query:{id:item.id }})"
|
||||
class="item acea-row row-between-wrapper"
|
||||
>
|
||||
<div @click="goNewsDetail(item)" class="item acea-row row-between-wrapper">
|
||||
<div class="text acea-row row-column-between">
|
||||
<div class="name line2">{{ item.title }}</div>
|
||||
<div>{{ item.addTime }}</div>
|
||||
@ -26,7 +23,6 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getArticleList } from "@/api/public";
|
||||
|
||||
export default {
|
||||
@ -73,6 +69,12 @@ export default {
|
||||
!this.loading && this.getArticleLists();
|
||||
},
|
||||
methods: {
|
||||
goNewsDetail(item) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/shop/news/NewsDetail/index",
|
||||
query: { id: item.id }
|
||||
});
|
||||
},
|
||||
getArticleLists: function() {
|
||||
let that = this;
|
||||
if (that.loading) return; //阻止下次请求(false可以进行请求);
|
||||
|
Reference in New Issue
Block a user