mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-03-22 16:17:21 +08:00
Merge branch 'dev' into 'master'
uniapp【修复】: 售后金额为0的问题/首页骨架屏 See merge request jianweie/coreshoppro!67
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<template v-if="props.needSkeleton">
|
<view v-if="props.needSkeleton" class="coreshop-skeleton">
|
||||||
<uv-skeletons :skeleton="props.skeleton" :loading="props.skeletonLoading">
|
<uv-skeletons :skeleton="props.skeleton" :loading="props.skeletonLoading">
|
||||||
<coreshop-page-content v-bind="props">
|
<coreshop-page-content v-bind="props">
|
||||||
<slot name="default" />
|
<slot name="default" />
|
||||||
</coreshop-page-content>
|
</coreshop-page-content>
|
||||||
</uv-skeletons>
|
</uv-skeletons>
|
||||||
</template>
|
</view>
|
||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<coreshop-page-content v-bind="props">
|
<coreshop-page-content v-bind="props">
|
||||||
@@ -13,7 +13,8 @@
|
|||||||
</coreshop-page-content>
|
</coreshop-page-content>
|
||||||
<template v-if="props.needLoadingPage">
|
<template v-if="props.needLoadingPage">
|
||||||
<uv-loading-page :loading="props.loadingPage" :loading-text="props.loadingText"
|
<uv-loading-page :loading="props.loadingPage" :loading-text="props.loadingText"
|
||||||
:font-size="props.loadingTextFontSize" :color="props.loadingColor" :loadingColor="loadingColor" :bgColor="props.loadingBgColor"></uv-loading-page>
|
:font-size="props.loadingTextFontSize" :color="props.loadingColor" :loadingColor="loadingColor"
|
||||||
|
:bgColor="props.loadingBgColor"></uv-loading-page>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,7 +31,7 @@
|
|||||||
handleCustomRouteJump : () => void | null,
|
handleCustomRouteJump : () => void | null,
|
||||||
showLoginModalDom : boolean;
|
showLoginModalDom : boolean;
|
||||||
needSkeleton : boolean;
|
needSkeleton : boolean;
|
||||||
skeleton ?: Array<any>;
|
skeleton ?: Array<{ [key : string] : any }>;
|
||||||
skeletonLoading : boolean;
|
skeletonLoading : boolean;
|
||||||
placeholder : boolean;
|
placeholder : boolean;
|
||||||
loadingPage : boolean;
|
loadingPage : boolean;
|
||||||
@@ -51,12 +52,7 @@
|
|||||||
handleCustomRouteJump: null,
|
handleCustomRouteJump: null,
|
||||||
showLoginModalDom: false,
|
showLoginModalDom: false,
|
||||||
needSkeleton: false,
|
needSkeleton: false,
|
||||||
skeleton: [{
|
skeleton: [],
|
||||||
type: 'line',
|
|
||||||
num: 3,
|
|
||||||
gap: '20rpx',
|
|
||||||
style: ['width: 200rpx;marginBottom: 50rpx;', 'height: 100rpx;', 'width: 500rpx;'],
|
|
||||||
}],
|
|
||||||
skeletonLoading: false,
|
skeletonLoading: false,
|
||||||
placeholder: true,
|
placeholder: true,
|
||||||
loadingPage: false,
|
loadingPage: false,
|
||||||
@@ -68,4 +64,7 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.coreshop-skeleton {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -15,7 +15,6 @@ export const useSystemInfo = () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
state.systemInfo = systemInfo;
|
state.systemInfo = systemInfo;
|
||||||
|
|
||||||
// #ifndef APP
|
// #ifndef APP
|
||||||
const menuButton = uni.getMenuButtonBoundingClientRect();
|
const menuButton = uni.getMenuButtonBoundingClientRect();
|
||||||
state.menuButtonHeight = menuButton.height + (menuButton.top - systemInfo.statusBarHeight) * 2;
|
state.menuButtonHeight = menuButton.height + (menuButton.top - systemInfo.statusBarHeight) * 2;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom
|
<coreshop-page :isBack="false" bgColor="rgba(0,0,0,0)" :isShowStatusBarHeight="false" showLoginModalDom needSkeleton :skeleton="skeleton"
|
||||||
needLoadingPage :loadingPage="loading">
|
:skeletonLoading="loading">
|
||||||
<view class="layout-home-page page-bg">
|
<view class="layout-home-page page-bg">
|
||||||
<image class="home-bg" :src="handleStaticResources('/static/images/home-bg.jpg')"></image>
|
<image class="home-bg" :src="handleStaticResources('/static/images/home-bg.jpg')"></image>
|
||||||
<uv-navbar :title="shopConfigStore.config?.shopName"
|
<uv-navbar :title="shopConfigStore.config?.shopName"
|
||||||
@@ -38,6 +38,7 @@
|
|||||||
import { UserToken, onHomePageShow, shareUrl } from '@/core/consts';
|
import { UserToken, onHomePageShow, shareUrl } from '@/core/consts';
|
||||||
import { useUserInfoStore, useShopConfigStore } from '@/core/store';
|
import { useUserInfoStore, useShopConfigStore } from '@/core/store';
|
||||||
import { ShareClientEnum, ShareModelEnum, ShareEnum } from '@/core/enum';
|
import { ShareClientEnum, ShareModelEnum, ShareEnum } from '@/core/enum';
|
||||||
|
import { skeleton } from './skeleton'
|
||||||
|
|
||||||
/** 获取项目配置 */
|
/** 获取项目配置 */
|
||||||
const shopConfigStore = useShopConfigStore();
|
const shopConfigStore = useShopConfigStore();
|
||||||
|
|||||||
61
CoreCms.Net.Uni-App/CoreShop/pages/home/skeleton.ts
Normal file
61
CoreCms.Net.Uni-App/CoreShop/pages/home/skeleton.ts
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
export const skeleton = [
|
||||||
|
{
|
||||||
|
type: 'flex',
|
||||||
|
num: 1,
|
||||||
|
children: [{
|
||||||
|
type: 'line',
|
||||||
|
num: 1,
|
||||||
|
style: `height:80px;background: #fff;`
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'flex',
|
||||||
|
num: 1,
|
||||||
|
children: [{
|
||||||
|
type: 'line',
|
||||||
|
num: 1,
|
||||||
|
style: 'height:300rpx;marginLeft:20rpx;marginRight: 20rpx;marginTop:20rpx'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
30, {
|
||||||
|
type: 'flex',
|
||||||
|
num: 2,
|
||||||
|
children: [{
|
||||||
|
type: 'custom',
|
||||||
|
style: 'width:98rpx;height:98rpx;marginLeft:20rpx;border-radius: 100%;'
|
||||||
|
}, {
|
||||||
|
type: 'custom',
|
||||||
|
style: 'width:98rpx;height:98rpx;marginLeft:20rpx;border-radius: 100%;'
|
||||||
|
}, {
|
||||||
|
type: 'custom',
|
||||||
|
style: 'width:98rpx;height:98rpx;marginLeft:20rpx;border-radius: 100%;'
|
||||||
|
}, {
|
||||||
|
type: 'custom',
|
||||||
|
style: 'width:98rpx;height:98rpx;marginLeft:20rpx;border-radius: 100%;'
|
||||||
|
}, {
|
||||||
|
type: 'custom',
|
||||||
|
style: 'width:98rpx;height:98rpx;marginLeft:20rpx;border-radius: 100%;'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'custom',
|
||||||
|
style: 'width:98rpx;height:98rpx;marginLeft:20rpx;border-radius: 100%;'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
30,
|
||||||
|
30, {
|
||||||
|
type: 'flex',
|
||||||
|
num: 5,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
type: 'custom',
|
||||||
|
style: 'width:160rpx;height:160rpx;marginLeft: 20rpx;marginRight: 20rpx;'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
num: 3,
|
||||||
|
gap: '30rpx',
|
||||||
|
style: ["marginRight: 20rpx;", "marginRight: 20rpx;", "marginRight: 20rpx;"]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -128,6 +128,7 @@
|
|||||||
images : Array<any>;
|
images : Array<any>;
|
||||||
reason : string;
|
reason : string;
|
||||||
refundPrice : number; /** 退款金额 */
|
refundPrice : number; /** 退款金额 */
|
||||||
|
payedAmount : number; /** 订单金额 */
|
||||||
}>({
|
}>({
|
||||||
orderId: "",
|
orderId: "",
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
@@ -139,6 +140,7 @@
|
|||||||
images: [],
|
images: [],
|
||||||
reason: "",
|
reason: "",
|
||||||
refundPrice: 0,
|
refundPrice: 0,
|
||||||
|
payedAmount: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -185,6 +187,7 @@
|
|||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
})
|
})
|
||||||
|
state.payedAmount = orderDetail.data.payedAmount;
|
||||||
state.maxRefund = (orderDetail.data.orderAmount * 10000 - orderDetail.data.refunded * 10000) / 10000;
|
state.maxRefund = (orderDetail.data.orderAmount * 10000 - orderDetail.data.refunded * 10000) / 10000;
|
||||||
state.costFreight = orderDetail.data.costFreight;
|
state.costFreight = orderDetail.data.costFreight;
|
||||||
state.refundShow = (orderDetail.data.payedAmount * 10000 - orderDetail.data.refunded * 10000) / 10000;
|
state.refundShow = (orderDetail.data.payedAmount * 10000 - orderDetail.data.refunded * 10000) / 10000;
|
||||||
@@ -292,7 +295,7 @@
|
|||||||
|
|
||||||
/** 提交 */
|
/** 提交 */
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
if (!amount(state.refundPrice)) {
|
if (state.payedAmount != 0 && !amount(state.refundPrice)) {
|
||||||
handleShowToast('请输入正确金额'); return;
|
handleShowToast('请输入正确金额'); return;
|
||||||
}
|
}
|
||||||
if (state.refundPrice > state.refundShow) {
|
if (state.refundPrice > state.refundShow) {
|
||||||
|
|||||||
@@ -223,7 +223,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="msg-box">
|
<view class="msg-box">
|
||||||
<view class="lab">{{ shopConfigStore?.config?.pointShowName }}优惠</view>
|
<view class="lab">{{ shopConfigStore?.config?.pointShowName }}优惠</view>
|
||||||
<view class="val">{{ state.orderDetail?.pointMoney }}</view>
|
<view class="val">-¥{{ state.orderDetail?.pointMoney }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="msg-box" v-if="state.orderDetail?.orderDiscountAmount > 0">
|
<view class="msg-box" v-if="state.orderDetail?.orderDiscountAmount > 0">
|
||||||
<view class="lab">订单优惠</view>
|
<view class="lab">订单优惠</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user