mirror of
https://gitee.com/yudaocode/yudao-mall-uniapp.git
synced 2025-12-30 01:32:26 +00:00
!165 feat(tree-shaking): 按需引入让代码更轻、更清晰、更可维护。
Merge pull request !165 from 爱宇阳/master
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import { formatOrderColor } from '@/sheep/hooks/useGoods';
|
import { formatOrderColor } from '@/sheep/hooks/useGoods';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
import CombinationApi from '@/sheep/api/promotion/combination';
|
import CombinationApi from '@/sheep/api/promotion/combination';
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import RewardActivityApi from '@/sheep/api/promotion/rewardActivity';
|
import RewardActivityApi from '@/sheep/api/promotion/rewardActivity';
|
||||||
import SpuApi from '@/sheep/api/product/spu';
|
import SpuApi from '@/sheep/api/product/spu';
|
||||||
import { appendSettlementProduct } from '@/sheep/hooks/useGoods';
|
import { appendSettlementProduct } from '@/sheep/hooks/useGoods';
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
}
|
}
|
||||||
appendSettlementProduct(data.list, res.data);
|
appendSettlementProduct(data.list, res.data);
|
||||||
});
|
});
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
mountMasonry();
|
mountMasonry();
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, watch } from 'vue';
|
import { reactive, watch } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import GoodsItem from './goods.vue';
|
import GoodsItem from './goods.vue';
|
||||||
import OrderItem from './order.vue';
|
import OrderItem from './order.vue';
|
||||||
import OrderApi from '@/sheep/api/trade/order';
|
import OrderApi from '@/sheep/api/trade/order';
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
page,
|
page,
|
||||||
list_rows,
|
list_rows,
|
||||||
});
|
});
|
||||||
let orderList = _.concat(state.pagination.data, res.data.list);
|
let orderList = concat(state.pagination.data, res.data.list);
|
||||||
state.pagination = {
|
state.pagination = {
|
||||||
...res.data,
|
...res.data,
|
||||||
data: orderList,
|
data: orderList,
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
||||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import { resetPagination, getWeekTimes, getMonthTimes } from '@/sheep/helper/utils';
|
import { resetPagination, getWeekTimes, getMonthTimes } from '@/sheep/helper/utils';
|
||||||
|
|
||||||
const tabMaps = ['周排行', '月排行'];
|
const tabMaps = ['周排行', '月排行'];
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
if (state.pagination.pageNo === 1) {
|
if (state.pagination.pageNo === 1) {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
||||||
import { fen2yuan } from '../../../sheep/hooks/useGoods';
|
import { fen2yuan } from '../../../sheep/hooks/useGoods';
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
import $share from '@/sheep/platform/share';
|
import $share from '@/sheep/platform/share';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import { showShareModal } from '@/sheep/hooks/useModal';
|
import { showShareModal } from '@/sheep/hooks/useModal';
|
||||||
import SpuApi from '@/sheep/api/product/spu';
|
import SpuApi from '@/sheep/api/product/spu';
|
||||||
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
// 在所有请求完成后合并列表和更新状态
|
// 在所有请求完成后合并列表和更新状态
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onPageScroll, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onPageScroll, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
||||||
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
if (state.currentTab === 0) {
|
if (state.currentTab === 0) {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
||||||
import { resetPagination, getWeekTimes, getMonthTimes } from '@/sheep/helper/utils';
|
import { resetPagination, getWeekTimes, getMonthTimes } from '@/sheep/helper/utils';
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,7 +257,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { computed, reactive, ref } from 'vue';
|
import { computed, reactive, ref } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { isNil, concat } from 'lodash-es';
|
||||||
import { onPageScroll } from '@dcloudio/uni-app';
|
import { onPageScroll } from '@dcloudio/uni-app';
|
||||||
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
||||||
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function filterUserNum(num) {
|
function filterUserNum(num) {
|
||||||
if (_.isNil(num)) {
|
if (isNil(num)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return `下级团队${num}人`;
|
return `下级团队${num}人`;
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
import BrokerageApi from '@/sheep/api/trade/brokerage';
|
||||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import CouponApi from '@/sheep/api/promotion/coupon';
|
import CouponApi from '@/sheep/api/promotion/coupon';
|
||||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||||
import SpuApi from '@/sheep/api/product/spu';
|
import SpuApi from '@/sheep/api/product/spu';
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
import CouponApi from '@/sheep/api/promotion/coupon';
|
import CouponApi from '@/sheep/api/promotion/coupon';
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
import CommentApi from '@/sheep/api/product/comment';
|
import CommentApi from '@/sheep/api/product/comment';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import commentItem from '../components/detail/comment-item.vue';
|
import commentItem from '../components/detail/comment-item.vue';
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 合并列表
|
// 合并列表
|
||||||
state.pagination.list = _.concat(state.pagination.list, res.data.list);
|
state.pagination.list = concat(state.pagination.list, res.data.list);
|
||||||
state.pagination.total = res.data.total;
|
state.pagination.total = res.data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
import SpuApi from '@/sheep/api/product/spu';
|
import SpuApi from '@/sheep/api/product/spu';
|
||||||
import OrderApi from '@/sheep/api/trade/order';
|
import OrderApi from '@/sheep/api/trade/order';
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
}
|
}
|
||||||
appendSettlementProduct(data.list, res.data);
|
appendSettlementProduct(data.list, res.data);
|
||||||
});
|
});
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
mountMasonry();
|
mountMasonry();
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
import SpuApi from '@/sheep/api/product/spu';
|
import SpuApi from '@/sheep/api/product/spu';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { computed, reactive } from 'vue';
|
import { computed, reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import { handleTree } from '@/sheep/helper/utils';
|
import { handleTree } from '@/sheep/helper/utils';
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 合并列表
|
// 合并列表
|
||||||
state.pagination.list = _.concat(state.pagination.list, res.data.list);
|
state.pagination.list = concat(state.pagination.list, res.data.list);
|
||||||
state.pagination.total = res.data.total;
|
state.pagination.total = res.data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import {
|
import {
|
||||||
formatAfterSaleStatus,
|
formatAfterSaleStatus,
|
||||||
formatAfterSaleStatusDescription,
|
formatAfterSaleStatusDescription,
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
data.list.forEach((order) => handleAfterSaleButtons(order));
|
data.list.forEach((order) => handleAfterSaleButtons(order));
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,8 +128,7 @@
|
|||||||
handleOrderButtons,
|
handleOrderButtons,
|
||||||
} from '@/sheep/hooks/useGoods';
|
} from '@/sheep/hooks/useGoods';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import _ from 'lodash-es';
|
import { concat, isEmpty } from 'lodash-es';
|
||||||
import { isEmpty } from 'lodash-es';
|
|
||||||
import OrderApi from '@/sheep/api/trade/order';
|
import OrderApi from '@/sheep/api/trade/order';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
|
|
||||||
@@ -331,7 +330,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
data.list.forEach((order) => handleOrderButtons(order));
|
data.list.forEach((order) => handleOrderButtons(order));
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import PayWalletApi from '@/sheep/api/pay/wallet';
|
import PayWalletApi from '@/sheep/api/pay/wallet';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
import { fen2yuan } from '../../sheep/hooks/useGoods';
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
import { ref, reactive, unref } from 'vue';
|
import { ref, reactive, unref } from 'vue';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import _ from 'lodash-es';
|
import { isEmpty } from 'lodash-es';
|
||||||
import { mobile } from '@/sheep/validate/form';
|
import { mobile } from '@/sheep/validate/form';
|
||||||
import AreaApi from '@/sheep/api/system/area';
|
import AreaApi from '@/sheep/api/system/area';
|
||||||
import AddressApi from '@/sheep/api/member/address';
|
import AddressApi from '@/sheep/api/member/address';
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
|
|
||||||
// 获得地区数据
|
// 获得地区数据
|
||||||
const getAreaData = () => {
|
const getAreaData = () => {
|
||||||
if (_.isEmpty(uni.getStorageSync('areaData'))) {
|
if (isEmpty(uni.getStorageSync('areaData'))) {
|
||||||
AreaApi.getAreaTree().then((res) => {
|
AreaApi.getAreaTree().then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
uni.setStorageSync('areaData', res.data);
|
uni.setStorageSync('areaData', res.data);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import FavoriteApi from '@/sheep/api/product/favorite';
|
import FavoriteApi from '@/sheep/api/product/favorite';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import SpuHistoryApi from '@/sheep/api/product/history';
|
import SpuHistoryApi from '@/sheep/api/product/history';
|
||||||
import { cloneDeep } from '@/sheep/helper/utils';
|
import { cloneDeep } from '@/sheep/helper/utils';
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import PayWalletApi from '@/sheep/api/pay/wallet';
|
import PayWalletApi from '@/sheep/api/pay/wallet';
|
||||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { computed, reactive } from 'vue';
|
import { computed, reactive } from 'vue';
|
||||||
import _ from 'lodash-es';
|
import { concat } from 'lodash-es';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import PointApi from '@/sheep/api/member/point';
|
import PointApi from '@/sheep/api/member/point';
|
||||||
import { resetPagination } from '@/sheep/helper/utils';
|
import { resetPagination } from '@/sheep/helper/utils';
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.pagination.list = _.concat(state.pagination.list, data.list);
|
state.pagination.list = concat(state.pagination.list, data.list);
|
||||||
state.pagination.total = data.total;
|
state.pagination.total = data.total;
|
||||||
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
state.loadStatus = state.pagination.list.length < state.pagination.total ? 'more' : 'noMore';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,15 +19,19 @@ export default {
|
|||||||
* @param {String} url -图片地址
|
* @param {String} url -图片地址
|
||||||
*/
|
*/
|
||||||
checkMPUrl(url) {
|
checkMPUrl(url) {
|
||||||
|
if (!url || typeof url !== 'string') {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
if (
|
if (
|
||||||
url.substring(0, 4) === 'http' &&
|
url.startsWith('http://') &&
|
||||||
url.substring(0, 5) !== 'https' &&
|
!url.startsWith('https://') &&
|
||||||
url.substring(0, 12) !== 'http://store' &&
|
!url.startsWith('http://store') &&
|
||||||
url.substring(0, 10) !== 'http://tmp' &&
|
!url.startsWith('http://tmp') &&
|
||||||
url.substring(0, 10) !== 'http://usr'
|
!url.startsWith('http://usr')
|
||||||
) {
|
) {
|
||||||
url = 'https' + url.substring(4, url.length);
|
url = url.replace('http://', 'https://');
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
return url;
|
return url;
|
||||||
|
|||||||
Reference in New Issue
Block a user