|
|
|
@ -73,13 +73,40 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="order-tag lf-flex-wrap"> |
|
|
|
<view class="order-children" |
|
|
|
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=1')"> |
|
|
|
<view> |
|
|
|
<view class="function-tag" v-if="centerInfo.newCount != 0 && $isRight(centerInfo)">{{centerInfo.newCount}}</view> |
|
|
|
<view class="lf-iconfont lf-font-50 icon-daifukuan"></view> |
|
|
|
</view> |
|
|
|
<view class="lf-color-black lf-font-28 lf-m-t-20">待付款</view> |
|
|
|
</view> |
|
|
|
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=2')"> |
|
|
|
<view> |
|
|
|
<view class="function-tag" v-if="centerInfo.paidCount != 0 && $isRight(centerInfo)">{{centerInfo.paidCount}}</view> |
|
|
|
<view class="lf-iconfont lf-font-50 icon-31daifahuo"></view> |
|
|
|
</view> |
|
|
|
<view class="lf-color-black lf-font-28 lf-m-t-20">待发货</view> |
|
|
|
</view> |
|
|
|
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=3')"> |
|
|
|
<view> |
|
|
|
<view class="function-tag" v-if="centerInfo.deliveredCount != 0 && $isRight(centerInfo)">{{centerInfo.deliveredCount}}</view> |
|
|
|
<view class="lf-iconfont lf-font-50 icon-daishouhuo"></view> |
|
|
|
</view> |
|
|
|
<view class="lf-color-black lf-font-28 lf-m-t-20">待收货</view> |
|
|
|
</view> |
|
|
|
<view class="order-children" @click="$url('/pages/order/index/onlineorder?current=4')"> |
|
|
|
<view> |
|
|
|
<view class="function-tag" v-if="centerInfo.receiveCount != 0 && $isRight(centerInfo)">{{centerInfo.receiveCount}}</view> |
|
|
|
<view class="lf-iconfont lf-font-50 icon-tihuo"></view> |
|
|
|
</view> |
|
|
|
<view class="lf-color-black lf-font-28 lf-m-t-20">待提货</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="order-children" |
|
|
|
v-for="(item, index) in order_tablist" :key="index" |
|
|
|
@click="$url(item.path)"> |
|
|
|
<!-- <view class="function-tag"></view> --> |
|
|
|
<view class="lf-iconfont lf-font-50" :class="item.icon"></view> |
|
|
|
<view class="lf-color-black lf-font-28 lf-m-t-20">{{ item.name }}</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -103,6 +130,17 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 悬浮购物车入口 --> |
|
|
|
<view class="fixed-right"> |
|
|
|
<view class="fixed-cart" hover-class="lf-opacity" @click="$url('/pages/store/cart/cart')"> |
|
|
|
<text class="lf-iconfont icon-gouwulan icon-text"></text> |
|
|
|
<text class="tips">购物车</text> |
|
|
|
<block v-if="$isRight(car_num)"> |
|
|
|
<view class="angle-mark" v-if="car_num<99">{{car_num || 0}}</view> |
|
|
|
<view class="angle-mark" v-else>99+</view> |
|
|
|
</block> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<lf-tabbar></lf-tabbar> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
@ -168,7 +206,8 @@ |
|
|
|
token: '', // 用户token |
|
|
|
code: '', |
|
|
|
centerInfo: {}, |
|
|
|
show_count: 0 |
|
|
|
show_count: 0, |
|
|
|
car_num: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(){ |
|
|
|
@ -191,6 +230,7 @@ |
|
|
|
} |
|
|
|
this.getMeInfo(); |
|
|
|
this.getUcenter(); |
|
|
|
this.getcarNum(); |
|
|
|
}, |
|
|
|
onShow(){ |
|
|
|
this.show_count++; |
|
|
|
@ -210,6 +250,37 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getcarNum() { |
|
|
|
this.$http |
|
|
|
.get({ |
|
|
|
api: 'api/shopping/cart/count', |
|
|
|
header: { |
|
|
|
Authorization: this.$cookieStorage.get('user_token') |
|
|
|
}, |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
if (res.data.code == 200) { |
|
|
|
if(res.data.data == null) { |
|
|
|
this.car_num = 0; |
|
|
|
}else { |
|
|
|
this.car_num = res.data.data; |
|
|
|
} |
|
|
|
} else { |
|
|
|
wx.showModal({ |
|
|
|
content: '请下拉页面刷新重试', |
|
|
|
showCancel: false |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
wx.stopPullDownRefresh(); |
|
|
|
wx.hideLoading(); |
|
|
|
wx.showModal({ |
|
|
|
content: '请求失败', |
|
|
|
showCancel: false |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 获取页面信息 |
|
|
|
getMeInfo(){ |
|
|
|
this.$http.get({ |
|
|
|
@ -321,8 +392,69 @@ |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.fixed-right{ |
|
|
|
position: fixed; |
|
|
|
right: 32rpx; |
|
|
|
bottom: 400rpx; |
|
|
|
width: max-content; |
|
|
|
height: max-content; |
|
|
|
z-index: 9; |
|
|
|
.fixed-cart{ |
|
|
|
width: 110rpx; |
|
|
|
height: 110rpx; |
|
|
|
border-radius: 50%; |
|
|
|
background-color: #FFFFFF; |
|
|
|
border: 1rpx solid #DEDEDE; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
flex-direction: column; |
|
|
|
color: #333333; |
|
|
|
position: relative; |
|
|
|
margin-top: 30rpx; |
|
|
|
.icon-text{ |
|
|
|
font-size: 50rpx; |
|
|
|
line-height: 1; |
|
|
|
} |
|
|
|
.tips{ |
|
|
|
font-size: 20rpx; |
|
|
|
color: #333333; |
|
|
|
} |
|
|
|
.angle-mark{ |
|
|
|
position: absolute; |
|
|
|
right: 4rpx; |
|
|
|
top: 4rpx; |
|
|
|
width: 40rpx; |
|
|
|
height: 40rpx; |
|
|
|
background-color: #15716E; |
|
|
|
border-radius: 50%; |
|
|
|
font-size: 20rpx; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
color: #FFFFFF; |
|
|
|
} |
|
|
|
} |
|
|
|
.fixed-live{ |
|
|
|
background: #15716E; |
|
|
|
border-radius: 100rpx 5rpx 100rpx 100rpx; |
|
|
|
border: none; |
|
|
|
color: #FFFFFF; |
|
|
|
// animation: bounceIn 1s .2s ease both; |
|
|
|
backface-visibility:visible; |
|
|
|
transform-origin:center center; |
|
|
|
animation: demo 2s 0s infinite ease normal none ; |
|
|
|
// &>text:nth-child(1){ |
|
|
|
// animation: fadeInRightBig 1s .1s ease both; |
|
|
|
// } |
|
|
|
.tips{ |
|
|
|
color: #FFFFFF; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.order-children { |
|
|
|
width: 134rpx; |
|
|
|
position: relative; |
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
@ -355,11 +487,18 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
.function-tag { |
|
|
|
width: 50rpx; |
|
|
|
height: 50rpx; |
|
|
|
background: #D8D8D8; |
|
|
|
border: 1rpx solid #979797; |
|
|
|
color: white; |
|
|
|
font-size: 24rpx; |
|
|
|
position: absolute; |
|
|
|
right: 18rpx; |
|
|
|
width: 39rpx; |
|
|
|
height: 40rpx; |
|
|
|
background: red; |
|
|
|
top: -12rpx; |
|
|
|
border-radius: 50%; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
} |
|
|
|
.order-tag { |
|
|
|
padding: 50rpx 0; |
|
|
|
|