style:更改文件名称
This commit is contained in:
parent
6bb8f049b6
commit
60c76fbd1c
|
@ -14,7 +14,7 @@ exchange.html 兑换页面
|
|||
|
||||
优惠券新增5个文件
|
||||
1、couponCollection.html 优惠券商品页面
|
||||
2、exchange.html 优惠券商品详情页面
|
||||
2、details.html 优惠券商品详情页面
|
||||
3、myCoupon.html 我的券页面
|
||||
4、myOrder.html 我的订单页
|
||||
5、searchPage.html 商品页搜索组件
|
||||
|
|
|
@ -409,7 +409,7 @@
|
|||
localStorage.setItem('goodsInfo', JSON.stringify(goodsArr[0]));
|
||||
localStorage.setItem('key', goodsArr[0].key);
|
||||
localStorage.setItem('token', goodsArr[0].token);
|
||||
window.location.replace(goodsArr[0].type == 1 ? "./exchange.html" : "../index.html?id=" + localStorage.getItem('linkId'));
|
||||
window.location.replace(goodsArr[0].type == 1 ? "./details.html" : "../index.html?id=" + localStorage.getItem('linkId'));
|
||||
return false;
|
||||
} else if (goodsArr && goodsArr.length >= 1) {
|
||||
self.goodsNum = true;
|
||||
|
@ -444,7 +444,7 @@
|
|||
self.goodsShow = res.data.length > 1;
|
||||
if (res.data && res.data.length == 1) {//单个商品直接进入详情页面
|
||||
localStorage.setItem('goodsInfo', JSON.stringify(res.data[0]));
|
||||
window.location.replace(res.data[0].type == 1 ? "./exchange.html" : "./reduce.html");
|
||||
window.location.replace("./details.html");
|
||||
return false;
|
||||
} else if (res.data && res.data.length >= 1) {
|
||||
self.goodsNum = true;
|
||||
|
@ -503,7 +503,7 @@
|
|||
}
|
||||
localStorage.setItem('goodsInfo', JSON.stringify(row));
|
||||
//type :1 兑换码 2:立减金
|
||||
window.location.replace("./exchange.html");
|
||||
window.location.replace("./details.html");
|
||||
} else {
|
||||
this.popTitle = '温馨提示'
|
||||
this.popText = product_status(gstatus, row)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</script>
|
||||
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/js/swiper.min.js"></script>
|
||||
<link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/exchange.css">
|
||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/details.css">
|
||||
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api2_0.js"></script>
|
||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/payPop.css">
|
||||
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/payPop.js"></script>
|
|
@ -15,43 +15,50 @@
|
|||
<div id="searchPage">
|
||||
<div class="search">
|
||||
<div class="search-ipt">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/search.png" alt="" class="search-icon">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/search.png" alt=""
|
||||
class="search-icon">
|
||||
<input type="text" class="ipt" v-model="wordSearch" placeholder="请输入关键字搜索" maxlength="12" ref="ipt">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/cance.png" alt="" class="close-icon" @click="clearFn">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/cance.png" alt=""
|
||||
class="close-icon" @click="clearFn">
|
||||
</div>
|
||||
<span class="cancel" @click="history.go(-1)">取消</span>
|
||||
</div>
|
||||
<h4>搜索结果</h4>
|
||||
<ul class="search-result" v-if="searchResult.length>0">
|
||||
<li v-for="(item,index) in searchResult" :class="item.stock&&item.stock<0||item.available!=1&&item.available!=2?'changegray':''" @click="exchangeBtn(item)">
|
||||
<img :src="item.type==1?item.entity.show_url:(item.entity.channel==1?'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/zfbreduce.png':'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/wxreduce.png')" alt="" class="good-pic">
|
||||
<li v-for="(item,index) in searchResult"
|
||||
:class="item.stock&&item.stock<0||item.available!=1&&item.available!=2?'changegray':''"
|
||||
@click="exchangeBtn(item)">
|
||||
<img :src="item.type==1?item.entity.show_url:(item.entity.channel==1?'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/zfbreduce.png':'https://lsxdemall.oss-cn-beijing.aliyuncs.com/commonproductlogo/wxreduce.png')"
|
||||
alt="" class="good-pic">
|
||||
<span>{{item.type==1?item.entity.product_name:item.entity.batch_goods_name}}</span>
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/next.png" alt="" class="next-icon">
|
||||
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/next.png" alt=""
|
||||
class="next-icon">
|
||||
</li>
|
||||
</ul>
|
||||
<img src="http://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/saleNull.png" alt="" class="empty-record" v-else>
|
||||
<img src="http://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/saleNull.png" alt=""
|
||||
class="empty-record" v-else>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
let goodsCollection=[];
|
||||
let goodsCollection = [];
|
||||
new Vue({
|
||||
el: '#searchPage',
|
||||
data () {
|
||||
return {
|
||||
wordSearch:'',
|
||||
searchResult:[]
|
||||
wordSearch: '',
|
||||
searchResult: []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
goodsCollection=JSON.parse(localStorage.getItem('goodsCollection'));
|
||||
this.searchResult=goodsCollection;
|
||||
goodsCollection = JSON.parse(localStorage.getItem('goodsCollection'));
|
||||
this.searchResult = goodsCollection;
|
||||
},
|
||||
mounted () {
|
||||
this.$refs.ipt.focus()
|
||||
},
|
||||
methods: {
|
||||
clearFn(){
|
||||
this.wordSearch='';
|
||||
clearFn () {
|
||||
this.wordSearch = '';
|
||||
},
|
||||
exchangeBtn (row) {
|
||||
let gstatus = row.available;
|
||||
|
@ -63,22 +70,22 @@
|
|||
}
|
||||
localStorage.setItem('goodsInfo', JSON.stringify(row));
|
||||
//type :1 兑换码 2:立减金
|
||||
window.location.replace("./exchange.html");
|
||||
window.location.replace("./details.html");
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
wordSearch(val){
|
||||
let filterGoods=[];
|
||||
goodsCollection.forEach(item=>{
|
||||
if(item.type==1){ //1兑换码 2立减金
|
||||
if(item.entity.product_name.includes(val)) filterGoods.push(item);
|
||||
wordSearch (val) {
|
||||
let filterGoods = [];
|
||||
goodsCollection.forEach(item => {
|
||||
if (item.type == 1) { //1兑换码 2立减金
|
||||
if (item.entity.product_name.includes(val)) filterGoods.push(item);
|
||||
}
|
||||
if(item.type==2){ //1兑换码 2立减金
|
||||
if(item.entity.batch_goods_name.includes(val)) filterGoods.push(item);
|
||||
if (item.type == 2) { //1兑换码 2立减金
|
||||
if (item.entity.batch_goods_name.includes(val)) filterGoods.push(item);
|
||||
}
|
||||
});
|
||||
this.searchResult=filterGoods;
|
||||
this.searchResult = filterGoods;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue