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