mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-18 17:05:54 +08:00
一些bug修改
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.discount}}</span>折</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span>折</span>
|
||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(item.scopeType, item.storeName)}}</p>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="coupon.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{coupon.price | unitPrice}}</span></span>
|
||||
<span v-if="coupon.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{coupon.discount}}</span>折</span>
|
||||
<span v-if="coupon.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{coupon.couponDiscount}}</span>折</span>
|
||||
<span class="describe">满{{coupon.consumeThreshold}}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(coupon.scopeType, coupon.storeName)}}</p>
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
<Rate disabled :value="Number(item.descriptionScore)" allow-half class="remarks-star"></Rate>
|
||||
</p>
|
||||
<p class="remarks-content">{{item.content}}</p>
|
||||
<div class="comment-img" v-if="item.image">
|
||||
<div v-for="(img, imgIndex) in item.image.split(',')"
|
||||
<div class="comment-img" v-if="item.images">
|
||||
<div v-for="(img, imgIndex) in item.images.split(',')"
|
||||
@click="previewImg(img, item)"
|
||||
:class="{borderColor:img === item.previewImg}"
|
||||
:key="imgIndex">
|
||||
|
||||
@@ -53,16 +53,19 @@
|
||||
</li>
|
||||
<li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
|
||||
<li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
|
||||
<li v-if="$route.name !== 'Cart'" style="position:relative;" @mouseenter="getCartList">
|
||||
<li v-if="$route.name !== 'Cart'" style="position:relative;" >
|
||||
<i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
|
||||
<Dropdown placement="bottom-start">
|
||||
<router-link to="cart" target="_blank">
|
||||
<Icon
|
||||
size="18"
|
||||
class="cart-icon"
|
||||
type="ios-cart-outline"
|
||||
></Icon>
|
||||
购物车
|
||||
<router-link to="cart" target="_blank" >
|
||||
<span @mouseenter="getCartList">
|
||||
<Icon
|
||||
size="18"
|
||||
class="cart-icon"
|
||||
type="ios-cart-outline"
|
||||
></Icon>
|
||||
购物车
|
||||
</span>
|
||||
|
||||
</router-link>
|
||||
|
||||
<DropdownMenu slot="list">
|
||||
@@ -115,7 +118,7 @@
|
||||
|
||||
<script>
|
||||
import storage from '@/plugins/storage.js';
|
||||
import {cartGoodsAll, cartCount} from '@/api/cart.js'
|
||||
import {cartGoodsAll} from '@/api/cart.js'
|
||||
export default {
|
||||
name: 'M-Header',
|
||||
created () {
|
||||
@@ -211,12 +214,11 @@ export default {
|
||||
},
|
||||
getCartList () { // 获取购物车列表
|
||||
if (this.userInfo.username) {
|
||||
cartCount().then(res => {
|
||||
this.$store.commit('SET_CARTNUM', res.result)
|
||||
this.Cookies.setItem('cartNum', res.result)
|
||||
})
|
||||
|
||||
cartGoodsAll().then(res => {
|
||||
this.shoppingCart = res.result.skuList
|
||||
this.$store.commit('SET_CARTNUM', this.shoppingCart.length)
|
||||
this.Cookies.setItem('cartNum', this.shoppingCart.length)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<template v-else>
|
||||
<div style="font-size:14px">全部结果</div>
|
||||
<Icon type="ios-arrow-forward" />
|
||||
<div>{{params.keyword}}</div>
|
||||
<div style="font-weight:bold;" class="mr_10">“{{params.keyword}}”</div>
|
||||
</template>
|
||||
<!-- 所选分类 -->
|
||||
<a
|
||||
@@ -41,8 +41,7 @@
|
||||
:key="index"
|
||||
:title="item.name"
|
||||
>
|
||||
<span>{{ item.type }}:</span><span>{{ item.name }}</span
|
||||
><Icon type="md-close" />
|
||||
<span>{{ item.type }}:</span><span>{{ item.name }}</span><Icon type="md-close" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -190,23 +189,21 @@ export default {
|
||||
selectedItem: {
|
||||
// 监听已选条件,来调用列表接口
|
||||
handler (val) {
|
||||
console.log(val);
|
||||
let classification = [];
|
||||
if (val.length) {
|
||||
val.forEach((item) => {
|
||||
if (item.type === '品牌') {
|
||||
this.params.brandId = this.brandIds.join('@');
|
||||
} else {
|
||||
const nameArr = item.name.split('、');
|
||||
nameArr.forEach((name) => {
|
||||
classification.push(item.type + '_' + name);
|
||||
});
|
||||
}
|
||||
});
|
||||
this.params.prop = classification.join('@');
|
||||
} else {
|
||||
this.params.prop = ''
|
||||
this.params.brandId = ''
|
||||
}
|
||||
this.params.brandId = ''
|
||||
this.params.prop = ''
|
||||
val.forEach((item) => {
|
||||
if (item.type === '品牌') {
|
||||
this.params.brandId = this.brandIds.join('@');
|
||||
} else {
|
||||
const nameArr = item.name.split('、');
|
||||
nameArr.forEach((name) => {
|
||||
classification.push(item.type + '_' + name);
|
||||
});
|
||||
}
|
||||
});
|
||||
this.params.prop = classification.join('@');
|
||||
this.getFilterList(this.params);
|
||||
this.$emit('getParams', this.params);
|
||||
},
|
||||
@@ -251,7 +248,7 @@ export default {
|
||||
this.$set(this.tabBar, 'second', second)
|
||||
}
|
||||
},
|
||||
cateClick (item, index) {
|
||||
cateClick (item, index) { // 点选分类
|
||||
switch (index) {
|
||||
case 1:
|
||||
this.$router.push({
|
||||
@@ -299,7 +296,6 @@ export default {
|
||||
|
||||
brands.forEach((val) => {
|
||||
if (val.name === item) this.brandIds.push(val.value);
|
||||
console.log(this.brandIds);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<div v-if="couponAvailable === index">
|
||||
<div class="coupon-item" v-for="(item, index) in shop.couponList" :key="index">
|
||||
<span v-if="item.couponType === 'PRICE'">¥{{ item.price }}</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'">{{ item.discount }}折</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'">{{ item.couponDiscount }}折</span>
|
||||
<span>满{{item.consumeThreshold}}元可用</span>
|
||||
<Button class="coupon-btn" size="small" type="primary" @click="receiveShopCoupon(item)" :disabled="item.disabled">{{ item.disabled ? "已领取" : "领取" }}</Button>
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.discount}}</span>折</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span>折</span>
|
||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(item.scopeType, item.storeName)}}</p>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<div class="c-left">
|
||||
<div>
|
||||
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.discount}}</span>折</span>
|
||||
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span>折</span>
|
||||
<span class="describe">满{{item.consumeThreshold}}元可用</span>
|
||||
</div>
|
||||
<p>使用范围:{{useScope(item.scopeType)}}</p>
|
||||
|
||||
Reference in New Issue
Block a user