优化占位图显示
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
</view>
|
||||
<!-- </u-list-item>-->
|
||||
<!-- </u-list>-->
|
||||
|
||||
<u-empty v-if='groupbuyList.length === 0' text='暂无团购活动' marginTop='100' />
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -112,6 +114,7 @@ const loadMore = () => {
|
||||
|
||||
.scroll-view {
|
||||
background: #FFFFFF;
|
||||
height: 100vh;
|
||||
|
||||
.item {
|
||||
padding: 20rpx 30rpx 40rpx 30rpx;
|
||||
|
@@ -6,7 +6,7 @@
|
||||
1.长按识别下方二维码,添加【店铺福利群】
|
||||
</text>
|
||||
<view class='divider' style='margin-top: 28rpx' />
|
||||
<image :src=' companyConfigInfo.groupqrcode' show-menu-by-longpress />
|
||||
<image :src=' companyConfigInfo.groupqrcode||defaultImage' show-menu-by-longpress />
|
||||
<text class='step-title'>
|
||||
2.识别【店铺福利群】发您的二维码,即可入群
|
||||
</text>
|
||||
@@ -16,6 +16,7 @@
|
||||
<script lang='ts' setup>
|
||||
|
||||
import { useUserStore } from '@/store';
|
||||
import { defaultImage } from '@/utils/assets';
|
||||
|
||||
const userStore = useUserStore();
|
||||
const { companyConfigInfo } = storeToRefs(userStore);
|
||||
|
@@ -23,10 +23,14 @@
|
||||
<image class='goods-image' :src='item.images||defaultImage' />
|
||||
<text class='goods-name'>{{ item.goodsName || '未知' }}</text>
|
||||
<text class='goods-price'>¥{{ (item.price * ((userInfo.levelEntity?.discount || 100) / 100)).toFixed(2) }}
|
||||
<text v-if='userInfo.levelEntity?.discount>0' style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item.price }}</text></text>
|
||||
<text v-if='userInfo.levelEntity?.discount>0'
|
||||
style='text-decoration: line-through;color: #999999;font-size: 25rpx'>¥{{ item.price }}
|
||||
</text>
|
||||
</text>
|
||||
<image class='add-image' :src='assetsUrl("ic_add_goods.png")' @click.stop='addShoppingCart(item)' />
|
||||
</view>
|
||||
</grid-view>
|
||||
<u-empty v-if='goodsList.length === 0' text='暂无商品数据' />
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
@@ -82,7 +86,11 @@ onLoad(() => {
|
||||
|
||||
const fetchCategoryList = async () => {
|
||||
if(companyConfigInfo.value.mallopen == 1) {
|
||||
categoryList.value = await getCategoryList();
|
||||
const list = await getCategoryList();
|
||||
list.unshift({ typeName: '上新精选', typeId: '0' });
|
||||
list.unshift({ typeName: '热销商品', typeId: '0' });
|
||||
list.unshift({ typeName: '全部分类', typeId: '0' });
|
||||
categoryList.value = list;
|
||||
await changeCategory(0);
|
||||
}
|
||||
};
|
||||
@@ -180,7 +188,7 @@ const addShoppingCart = (goodsBean: GoodsBean) => {
|
||||
.category-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 210rpx;
|
||||
width: 280rpx;
|
||||
height: 100vh;
|
||||
|
||||
.category-item {
|
||||
|
@@ -44,6 +44,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<u-empty v-else text='暂无数据' margin-top='100' />
|
||||
|
||||
<view class='bottom-view c-flex-row'>
|
||||
<view class='c-flex-row' @click.stop='handleAllCheck'>
|
||||
|
@@ -5,6 +5,7 @@
|
||||
@on-checked='onChecked(item)'
|
||||
@on-edit='args => goPath(`create?bean=${encodeURIComponent(JSON.stringify(args))}`)'
|
||||
@on-delete='args => {handleDelete(args)}' />
|
||||
<u-empty v-if='addressList.length === 0' text='暂无数据' margin-top='100' />
|
||||
</scroll-view>
|
||||
|
||||
<view class='bottom-button-view'>
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<tabbar :titles='["全部","未使用","已使用"]' :indicator-color='"#D95554"' @change='tabChange' />
|
||||
<scroll-view :scroll-y='true' class='content' @loadmore='onLoadMore'>
|
||||
<coupon-item v-for='item in coupons' :item='item' />
|
||||
</scroll-view>
|
||||
<u-list>
|
||||
<coupon-item v-for='item in coupons' :item='item' :key='item.id' />
|
||||
<u-empty v-if='coupons.length === 0' text='暂无优惠券' marginTop='100' />
|
||||
</u-list>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
|
@@ -8,6 +8,7 @@
|
||||
<scroll-view style='margin: 10rpx 20rpx'>
|
||||
<u-list @scrolltolower='loadMore'>
|
||||
<integral-item v-for='(item,index) in tradeList' :key='index' :item='item' />
|
||||
<u-empty v-if='tradeList.length === 0' text='暂无数据' margin-top='100' />
|
||||
</u-list>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
@@ -4,7 +4,8 @@
|
||||
<u-list-item v-for='(item,index) in orderList' :key='index'>
|
||||
<order-item :item='item' @addShoppingCart='addShoppingCart' @pay='payment' />
|
||||
</u-list-item>
|
||||
<u-loadmore status='loading' />
|
||||
<u-loadmore v-if='orderList.length>0' :status='loadingStatus' />
|
||||
<u-empty v-if='orderList.length === 0' text='暂无数据' margin-top='100' />
|
||||
</u-list>
|
||||
<sku-dialog ref='skuDialogRef' :exists='temporaryStockBean' />
|
||||
|
||||
@@ -28,6 +29,7 @@ const temporaryStockBean = ref<StockBean>();
|
||||
const orderList = ref<OrderBean[]>([]);
|
||||
const currentPageNum = ref(1);
|
||||
const payStatus = ref(0);
|
||||
const loadingStatus = ref('loading');
|
||||
|
||||
let currentInterval = 0;
|
||||
|
||||
@@ -46,6 +48,7 @@ const tabChange = (index: number) => {
|
||||
};
|
||||
|
||||
const fetchData = async (refresh: boolean = true) => {
|
||||
loadingStatus.value = 'loading';
|
||||
if(!refresh) {
|
||||
currentPageNum.value += 1;
|
||||
}
|
||||
@@ -59,6 +62,7 @@ const fetchData = async (refresh: boolean = true) => {
|
||||
} else {
|
||||
orderList.value = orderList.value.concat(list);
|
||||
}
|
||||
loadingStatus.value = 'no';
|
||||
handleCountdown(orderList.value.filter(item => item.payStatus == 1));
|
||||
};
|
||||
|
||||
|
@@ -4,7 +4,8 @@
|
||||
<!-- <view class='item c-flex-column' v-for='(item,index) in 3' :key='index'>-->
|
||||
<view class='c-flex-row'>
|
||||
<text class='primary-text-color' style='flex: 1'>{{ item.name }}</text>
|
||||
<text class='accent-text-color'>-{{ item.transactionPrice || 0 }}</text>
|
||||
<text class='accent-text-color'>{{item.type===1?'-':'+'}}{{
|
||||
item.transactionPrice || 0 }}</text>
|
||||
</view>
|
||||
<view class='c-flex-row'>
|
||||
<text class='secondary-text-color' style='flex: 1'>{{ item.createTime }}</text>
|
||||
|
@@ -2,25 +2,25 @@
|
||||
<tabbar :titles='["全部","充值","消费"]' @change='changeTab' :item-active-color='"#D95554"'
|
||||
:indicator-color='"#D95554"' />
|
||||
<view class='content'>
|
||||
<view class='c-flex-row'>
|
||||
<text>选择日期</text>
|
||||
<picker mode='date' @change='changeDate'>
|
||||
<view class='current-date c-flex-row'>
|
||||
<text>{{ tradeDate }}</text>
|
||||
<image :src='assetsUrl("ic_triangle_down.png")' />
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- <view class='c-flex-row'>-->
|
||||
<!-- <text>选择日期</text>-->
|
||||
<!-- <picker mode='date' @change='changeDate'>-->
|
||||
<!-- <view class='current-date c-flex-row'>-->
|
||||
<!-- <text>{{ tradeDate }}</text>-->
|
||||
<!-- <image :src='assetsUrl("ic_triangle_down.png")' />-->
|
||||
<!-- </view>-->
|
||||
<!-- </picker>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<u-list @scrolltolower='loadMore'>
|
||||
<trade-item v-for='(item,index) in tradeList' :key='index' :item='item' />
|
||||
<u-loadmore status='loading' />
|
||||
<u-loadmore v-if='tradeList.length>0' :status='loadingStatus' />
|
||||
<u-empty v-if='tradeList.length === 0' text='暂无数据' margin-top='100' />
|
||||
</u-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang='ts' setup>
|
||||
import { assetsUrl } from '@/utils/assets';
|
||||
import TradeItem from './components/trade-item.vue';
|
||||
import { getTradeList } from '@/api/user';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -29,6 +29,7 @@ const tradeList = ref([]);
|
||||
const tradeType = ref('');
|
||||
const tradeDate = ref();
|
||||
const currentPageNum = ref(1);
|
||||
const loadingStatus = ref('loading');
|
||||
|
||||
onLoad((e) => {
|
||||
tradeDate.value = dayjs(Date.now()).format('YYYY-MM-DD');
|
||||
@@ -57,6 +58,7 @@ const changeTab = (index: number) => {
|
||||
|
||||
const fetchData = async (refresh: boolean = true) => {
|
||||
currentPageNum.value = refresh ? 1 : currentPageNum.value + 1;
|
||||
loadingStatus.value = 'loading';
|
||||
const { list } = await getTradeList({
|
||||
// startDate: tradeDate.value,
|
||||
// endDate: dayjs(tradeDate.value).add(1, 'day').format('YYYY-MM-DD'),
|
||||
@@ -69,6 +71,7 @@ const fetchData = async (refresh: boolean = true) => {
|
||||
} else {
|
||||
tradeList.value = tradeList.value.concat(list);
|
||||
}
|
||||
loadingStatus.value = 'no';
|
||||
};
|
||||
|
||||
const loadMore = () => {
|
||||
|
@@ -33,7 +33,7 @@ const useShoppingCartStore = defineStore('shoppingCart', {
|
||||
},
|
||||
|
||||
getSameGoodsIndex: (state) => (goodsId: string, colorId: string, sizeId: string) => {
|
||||
return state.shoppingCartList?.findIndex(res => res.id === goodsId && res.checkedStock.colorId === colorId && res.checkedStock.sizeId === sizeId) || -1;
|
||||
return state.shoppingCartList?.findIndex(res => res.id === goodsId && res.checkedStock.colorId === colorId && res.checkedStock.sizeId === sizeId);
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user