根据浏览器的历史纪录判断能否返回
This commit is contained in:
parent
292decf636
commit
15f85fca7b
|
@ -62,7 +62,7 @@
|
|||
<div id="rotation" v-if="layout=='2'">
|
||||
<!-- 顶部banner -->
|
||||
<div class="topBanner">
|
||||
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow"
|
||||
<img class="backpresty" @click="backgoodsFn" v-if="backAble"
|
||||
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||
<img :src="topImg" alt="">
|
||||
</div>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<!-- 列表 -->
|
||||
<div id="list" v-if="layout=='1'">
|
||||
<div class="topBanner">
|
||||
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow"
|
||||
<img class="backpresty" @click="backgoodsFn" v-if="backAble"
|
||||
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||
<img :src="topImg" alt="">
|
||||
</div>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<!-- 矩阵 -->
|
||||
<div id="matrix" v-if="layout=='3'">
|
||||
<div class="topBanner">
|
||||
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow"
|
||||
<img class="backpresty" @click="backgoodsFn" v-if="backAble"
|
||||
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||
<img :src="topImg" alt="">
|
||||
|
||||
|
@ -221,6 +221,7 @@
|
|||
popboxtype: '兑换',
|
||||
topImg: '',
|
||||
goodsShow: true,
|
||||
backAble:true,
|
||||
goodsNum: false,
|
||||
exchangeCommity: {}, //兑换选择的商品
|
||||
bgcolor: '',
|
||||
|
@ -330,6 +331,7 @@
|
|||
|
||||
self.swiperDataList = goodsArr;
|
||||
self.goodsShow = goodsArr.length > 1;
|
||||
self.backAble=goodsArr.length > 1&&window.history.length>0;
|
||||
sessionStorage.setItem('goodsCount', goodsArr.length);
|
||||
if (goodsArr && goodsArr.length == 1&&goodsArr[0].available==1) {
|
||||
sessionStorage.setItem('goodsInfo', JSON.stringify(goodsArr[0]));
|
||||
|
@ -367,6 +369,7 @@
|
|||
self.swiperDataList = res.data;
|
||||
sessionStorage.setItem('goodsCount',res.data.length);
|
||||
self.goodsShow = res.data.length > 1;
|
||||
self.backAble=res.data.length > 1&&window.history.length>0;
|
||||
if (res.data && res.data.length == 1&&res.data[0].available==1) {
|
||||
sessionStorage.setItem('goodsInfo', JSON.stringify(res.data[0]));
|
||||
window.location.href = "./exchange.html";
|
||||
|
|
Loading…
Reference in New Issue