bookingUser改为shopUser

This commit is contained in:
gxwebsoft
2024-05-07 17:31:38 +08:00
parent bf652139aa
commit 31d6517314
26 changed files with 1567 additions and 1786 deletions

View File

@@ -30,30 +30,39 @@
</template>
<!-- 导航菜单 -->
<template v-if="form.showMenuCard">
<div class="menu-card ele-cell">
<template
v-for="(item, index) in navigation1"
<!-- 单排 -->
<div class="order-card ele-cell">
<div
v-for="(item, index) in navigation"
:key="index"
class="ele-cell-content ele-text-center btn-center"
@click="openMpMenuEdit(item)"
>
<a-image :src="item.icon" :width="30" :preview="false" />
<span>{{ item.title }}</span>
</div>
</div>
<!-- 双排 -->
<div class="menu-card ele-cell">
<template v-for="(item, index) in navigation1" :key="index">
<div
v-if="index < 4"
class="ele-cell-content ele-text-center btn-center"
@click="openMpMenuEdit(item)"
>
<a-image :src="item.icon" :width="30" :preview="false" />
<a-avatar :src="item.icon" :width="30" :preview="false" />
<span>{{ item.title }}</span>
</div>
</template>
<template
v-for="(item, index) in navigation2"
:key="index"
>
</div>
<div class="menu-card ele-cell">
<template v-for="(item, index) in navigation2" :key="index">
<div
v-if="index < 4"
class="ele-cell-content ele-text-center btn-center"
@click="openMpMenuEdit(item)"
>
<a-image :src="item.icon" :width="30" :preview="false" />
<a-avatar :src="item.icon" :width="30" :preview="false" />
<span>{{ item.title }}</span>
</div>
</template>
@@ -194,6 +203,8 @@
const adImageList = ref<any[]>();
// 首页导航图标
const scrollList = ref<any>();
// 单排
const navigation = ref<MpMenu[]>();
// 第一排
const navigation1 = ref<any[]>();
// 第二排
@@ -245,8 +256,9 @@
listMpMenu({}).then((list) => {
server.value = list.filter((d) => d.type == 0);
order.value = list.filter((d) => d.type == 1);
navigation1.value = list.filter((d) => d.type == 2 && d.rows == 0);
navigation2.value = list.filter((d) => d.type == 2 && d.rows == 1);
navigation.value = list.filter((d) => d.type == 2 && d.rows == 0);
navigation1.value = list.filter((d) => d.type == 2 && d.rows == 1);
navigation2.value = list.filter((d) => d.type == 2 && d.rows == 2);
});
listAd({ adType: '幻灯片' }).then((res) => {
@@ -458,9 +470,8 @@
}
.menu-card {
width: 340px;
width: 330px;
margin: 6px auto;
background: #ffffff;
border-radius: 5px;
border-color: slategrey;
.btn-center {
@@ -518,4 +529,22 @@
justify-content: center;
}
}
.order-card {
width: 330px;
height: 80px;
margin: 0 auto;
background: #ffffff;
border-radius: 5px;
border-color: slategrey;
//position: absolute;
//top: 230px;
//left: 24px;
.btn-center {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
</style>

View File

@@ -9,104 +9,73 @@
</div>
</div>
</div>
<div class="tabs-card">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="全部订单">
</a-tab-pane>
<a-tab-pane key="2" tab="未支付" force-render>
</a-tab-pane>
<a-tab-pane key="3" tab="已支付">
</a-tab-pane>
<a-tab-pane key="4" tab="已完成">
</a-tab-pane>
<a-tab-pane key="5" tab="押金">
</a-tab-pane>
</a-tabs>
<div class="order-list">
<span class="ele-text-placeholder">订单列表</span>
</div>
</div>
<template v-if="form.showMenuCard">
<template v-if="form.showOrderCard">
<div class="phone-body" style="overflow-y: auto; overflow-x: hidden">
<!-- 幻灯片轮播 -->
<template v-if="form.showCarousel">
<a-carousel arrows autoplay :dots="true">
<template v-if="adImageList">
<template v-for="(img, index) in adImageList" :key="index">
<div class="ad-item">
<a-image
:preview="false"
:src="img.url"
width="100%"
height="200px"
/>
</div>
</template>
<div class="tabs-card">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="全部订单" />
<a-tab-pane key="2" tab="未支付" force-render />
<a-tab-pane key="3" tab="已支付" />
<a-tab-pane key="4" tab="已完成" />
<a-tab-pane key="5" tab="押金" />
</a-tabs>
</div>
<!-- 订单列表 -->
<template v-for="(item, index) in orderList" :key="index">
<a-card
size="small"
class="order-item"
:title="item.merchantName"
:body-style="{ padding: '8px' }"
>
<template #title>
{{ item.name }}
</template>
</a-carousel>
</template>
<!-- 导航菜单 -->
<template v-if="form.showMenuCard">
<div class="menu-card ele-cell">
<div
v-for="(item, index) in scrollList"
:key="index"
class="ele-cell-content ele-text-center btn-center"
@click="openMpMenuEdit(item)"
<template #extra
><span class="ele-text-success">已支付</span></template
>
<a-image :src="item.icon" :width="30" :preview="false" />
<span>{{ item.title }}</span>
</div>
</div>
<MpMenuEdit
v-model:visible="showMpMenuEdit"
:data="current"
@done="reload"
/>
</template>
<!-- 商户列表 -->
<template v-if="form.showShopCard">
<div class="merchant-card-title">场地预定</div>
<div
class="merchant-card ele-cell"
v-for="(item, index) in shopList"
:key="index"
>
<a-image :src="item.image" :width="96" :preview="false" />
<div class="merchant-info ele-cell-content">
<div class="merchant-name">{{ item.merchantName }}</div>
<div class="merchant-desc ele-cell-desc">
{{ item.comments }}
<template #actions>
<div class="ele-cell card-actions">
<div class="card-actions-item" @click="actionsClick">
<a-button class="mini-btn" size="mini">申请开票</a-button>
</div>
</div>
</template>
<div class="order-body ele-cell ele-cell-align-top">
<!-- <uv-avatar :src="item.merchantAvatar" shape="square" size="90"></uv-avatar> -->
<div class="ele-cell-content">
<block
v-for="(sub, subIndex) in item.orderInfoList"
:key="subIndex"
>
<div class="ele-cell">
<div class="ele-text-secondary">时间</div>
<div class="ele-text-heading">{{ sub.dateTime }}</div>
</div>
<div class="ele-cell">
<div class="ele-text-secondary">场地</div>
<div class="ele-text-heading">{{ sub.fieldName }}</div>
</div>
<div class="ele-cell">
<div class="ele-text-secondary">金额</div>
<div class="ele-text-heading">{{ sub.price }}</div>
</div>
<div style="padding-bottom: 8px"></div>
</block>
<div class="ele-cell">
<div class="ele-text-placeholder" style="flex: 1;"
>共2件</div
>
<div class="ele-cell" style="font-weight: bold">
<div class="ele-text-heading"
>实付</div
>
<div class="ele-text-heading">{{ item.payPrice }}</div>
</div>
</div>
</div>
</div>
<!-- <div class="">-->
<!-- <a-button>我要去</a-button>-->
<!-- </div>-->
</div>
</template>
<!-- 培训课程 -->
<template v-if="form.showTtrainCard">
<div class="merchant-card-title">培训课程</div>
<div
class="merchant-card ele-cell"
v-for="(item, index) in shopList"
:key="index"
@click="openMpMenuEdit(item)"
>
<a-image :src="item.image" :width="96" :preview="false" />
<div class="merchant-info ele-cell-content">
<div class="merchant-name">{{ item.merchantName }}</div>
<div class="merchant-desc ele-cell-desc">
{{ item.comments }}
</div>
</div>
</div>
</a-card>
</template>
</div>
</template>
@@ -170,6 +139,8 @@
const { query } = unref(currentRoute);
import MpMenuEdit from '@/views/cms/mp-weixin/menu/components/mpMenuEdit.vue';
import { listOrder, pageOrder } from '@/api/shop/order';
import { Order } from '@/api/shop/order/model';
const prpos = withDefaults(
defineProps<{
@@ -206,6 +177,8 @@
const server = ref<any[]>();
// 商户列表
const shopList = ref<Merchant[]>();
// 订单列表
const orderList = ref<Order[]>();
const config = ref({
selector: '#content', //容器可使用css选择器
@@ -239,32 +212,38 @@
const activeKey = ref('1');
const reload = () => {
listWebsiteField({}).then((list) => {
list.map((d) => {
const key = String(d.name);
param.value[key] = d.value;
});
});
// listWebsiteField({}).then((list) => {
// list.map((d) => {
// const key = String(d.name);
// param.value[key] = d.value;
// });
// });
listMpMenu({}).then((list) => {
server.value = list.filter((d) => d.type == 0);
order.value = list.filter((d) => d.type == 1);
scrollList.value = list.filter((d) => d.type == 2);
});
// listMpMenu({}).then((list) => {
// server.value = list.filter((d) => d.type == 0);
// order.value = list.filter((d) => d.type == 1);
// scrollList.value = list.filter((d) => d.type == 2);
// });
//
// listAd({ adType: '幻灯片' }).then((res) => {
// const carouselImages = res[0].images;
// if (carouselImages) {
// adImageList.value = JSON.parse(carouselImages);
// }
// });
listAd({ adType: '幻灯片' }).then((res) => {
const carouselImages = res[0].images;
if (carouselImages) {
adImageList.value = JSON.parse(carouselImages);
}
});
// listMerchant({}).then((list) => {
// shopList.value = list;
// });
listMerchant({}).then((list) => {
shopList.value = list;
pageOrder({ userId: 13448 }).then((res) => {
orderList.value = res?.list;
});
emit('done');
};
const actionsClick = () => {};
reload();
watch(
@@ -523,12 +502,32 @@
}
}
.tabs-card{
padding: 0 10px;
.order-list{
background-color: #ffffff;
padding: 10px;
min-height: 200px;
.tabs-card {
padding: 0 8px;
//.order-item {
// background-color: #ffffff;
// padding: 10px;
// min-height: 200px;
//}
}
.order-item {
margin-bottom: 10px;
.order-title {
padding: 20rpx 0;
border-bottom: 1px #eee solid;
.merchant-name {
padding-left: 12rpx;
}
}
.order-body {
}
.card-actions {
display: flex;
justify-content: flex-end;
padding-right: 16px;
}
}
</style>

View File

@@ -117,11 +117,7 @@
// 模拟器的字段
const form = ref<any>({
pageName: '场馆预定订单',
showOrderCard: false,
showCarousel: false,
showMenuCard: false,
showShopCard: false,
showTtrainCard: false
showOrderCard: true
});
// 菜单列表
const list = ref<any[]>();

View File

@@ -68,7 +68,7 @@
<div
class="title ele-cell-content"
:style="{ color: item.color || '#333333' }"
>{{ item.title }}</div
>{{ item.title }}</div
>
<RightOutlined class="ele-text-secondary" />
</div>
@@ -80,8 +80,6 @@
/>
</template>
<template v-if="form.showMenuCard">
<div class="phone-body" style="overflow-y: auto; overflow-x: hidden">
<!-- 幻灯片轮播 -->
@@ -200,12 +198,13 @@
</template>
<script lang="ts" setup>
import {
ProfileOutlined,
ShopOutlined,
HomeOutlined,
UserOutlined, RightOutlined
} from "@ant-design/icons-vue";
import {
ProfileOutlined,
ShopOutlined,
HomeOutlined,
UserOutlined,
RightOutlined
} from '@ant-design/icons-vue';
import { ref, unref, watch } from 'vue';
import { MpWeixinParam, WebsiteField } from '@/api/cms/website/field/model';
import { listWebsiteField } from '@/api/system/website/field';
@@ -220,7 +219,7 @@ import {
const { query } = unref(currentRoute);
import MpMenuEdit from '@/views/cms/mp-weixin/menu/components/mpMenuEdit.vue';
import UserCardEdit from "@/views/cms/field/components/website-field-edit.vue";
import UserCardEdit from '@/views/cms/field/components/website-field-edit.vue';
const prpos = withDefaults(
defineProps<{
@@ -328,222 +327,222 @@ import {
</script>
<style lang="less" scoped>
.phone-layout {
position: fixed;
right: 16px;
width: 390px;
height: 844px;
background: url('@/assets/img/app-ui.png');
background-repeat: no-repeat;
background-position: top;
background-size: 100%;
//position: relative;
padding: 0 16px;
.phone-header-black {
height: 99px;
border-radius: 20px 20px 0 0;
.phone-layout {
position: fixed;
right: 16px;
width: 390px;
height: 844px;
background: url('@/assets/img/app-ui.png');
background-repeat: no-repeat;
background-position: top;
background-size: 100%;
.title {
//position: relative;
padding: 0 16px;
.phone-header-black {
height: 99px;
font-size: 16px;
display: flex;
justify-content: center;
align-items: end;
padding-bottom: 13px;
.title-bar {
width: 100%;
border-radius: 20px 20px 0 0;
background-size: 100%;
.title {
height: 99px;
font-size: 16px;
display: flex;
justify-content: space-between;
.back {
display: block;
width: 50px;
margin-left: 3px;
background-color: #ffffff;
justify-content: center;
align-items: end;
padding-bottom: 13px;
.title-bar {
width: 100%;
display: flex;
justify-content: space-between;
.back {
display: block;
width: 50px;
margin-left: 3px;
background-color: #ffffff;
}
.share {
display: block;
width: 50px;
cursor: pointer;
}
}
.share {
display: block;
width: 50px;
cursor: pointer;
}
}
.phone-body-bg {
padding: 0 16px;
height: 680px;
border-radius: 0 0 44px 44px;
overflow: hidden;
}
.phone-body {
width: 356px;
margin-left: 17px;
height: 630px;
padding: 0;
position: absolute;
top: 98px;
left: 0;
z-index: 999;
.comments {
padding: 20px;
word-break: break-all;
}
.form-data {
padding: 10px 20px;
.submit-btn {
padding: 30px 0;
}
}
}
.goods {
.price {
font-size: 18px;
}
.ele-cell-title {
font-weight: 600;
font-size: 16px;
}
.goods-attr {
}
}
.goods-divider {
height: 6px;
}
.buy-bar {
position: fixed;
width: 356px;
bottom: 70px;
//top: 881px;
background-color: #ffffff;
border-radius: 0 0 44px 44px;
border-top: 1px solid var(--grey-8);
.ele-cell-content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.shop-btn,
.kefu-btn,
.star-btn {
display: flex;
flex-direction: column;
font-size: 13px;
padding: 0 9px;
cursor: pointer;
white-space: nowrap;
}
.icon {
font-size: 19px;
}
.buy-btn {
display: flex;
.add-cart {
border-radius: 100px 0 0 100px;
border: none;
background-color: var(--orange-5);
color: #ffffff;
height: 40px;
width: 95px;
}
.buy-now {
border-radius: 0 100px 100px 0;
border: none;
background-color: var(--red-6);
color: #ffffff;
height: 40px;
width: 95px;
}
}
}
}
.phone-body-bg {
padding: 0 16px;
height: 680px;
border-radius: 0 0 44px 44px;
:deep(.slick-slide) {
overflow: hidden;
}
.phone-body {
width: 356px;
margin-left: 17px;
height: 630px;
padding: 0;
position: absolute;
top: 98px;
left: 0;
z-index: 999;
.comments {
padding: 20px;
word-break: break-all;
}
.form-data {
padding: 10px 20px;
.submit-btn {
padding: 30px 0;
}
}
:deep(.slick-arrow.custom-slick-arrow) {
font-size: 38px;
}
.goods {
.price {
font-size: 18px;
}
.ele-cell-title {
font-weight: 600;
font-size: 16px;
}
.goods-attr {
}
:deep(.slick-arrow.custom-slick-arrow) {
color: #fff;
background-color: rgba(31, 45, 61, 0.11);
transition: ease all 0.3s;
opacity: 0.3;
z-index: 1;
}
.goods-divider {
height: 6px;
:deep(.slick-arrow.custom-slick-arrow:before) {
display: none;
}
.buy-bar {
position: fixed;
width: 356px;
bottom: 70px;
//top: 881px;
background-color: #ffffff;
border-radius: 0 0 44px 44px;
border-top: 1px solid var(--grey-8);
.ele-cell-content {
:deep(.slick-arrow.custom-slick-arrow:hover) {
color: #fff;
opacity: 0.5;
}
:deep(.slick-slide h3) {
color: #fff;
}
.user-card {
height: 170px;
margin: 0 1px;
background-color: var(--grey-10);
background-repeat: no-repeat;
background-size: cover;
display: flex;
.user-avatar {
margin-left: 16px;
display: flex;
flex-direction: column;
flex-direction: row;
justify-content: center;
align-items: center;
.user-info {
margin-left: 10px;
.nickname {
color: var(--grey-3);
font-size: 18px;
font-weight: 500;
}
.phone {
color: var(--grey-5);
}
}
}
.shop-btn,
.kefu-btn,
.star-btn {
}
.order-card {
width: 340px;
height: 80px;
margin: 0 1px;
background: #ffffff;
border-radius: 5px;
border-color: slategrey;
position: absolute;
top: 230px;
left: 24px;
.btn-center {
display: flex;
flex-direction: column;
font-size: 13px;
padding: 0 9px;
align-items: center;
justify-content: center;
cursor: pointer;
white-space: nowrap;
}
.icon {
font-size: 19px;
}
.tools-card {
width: 340px;
margin: 0 1px;
padding: 6px 16px;
background: #ffffff;
border-radius: 5px;
border-color: slategrey;
position: absolute;
top: 324px;
left: 24px;
.ele-cell {
padding: 4px 0;
border-bottom: 1px solid var(--grey-9);
cursor: pointer;
}
.buy-btn {
.btn-center {
display: flex;
.add-cart {
border-radius: 100px 0 0 100px;
border: none;
background-color: var(--orange-5);
color: #ffffff;
height: 40px;
width: 95px;
}
.buy-now {
border-radius: 0 100px 100px 0;
border: none;
background-color: var(--red-6);
color: #ffffff;
height: 40px;
width: 95px;
}
align-items: center;
justify-content: center;
}
}
}
:deep(.slick-slide) {
overflow: hidden;
}
:deep(.slick-arrow.custom-slick-arrow) {
font-size: 38px;
}
:deep(.slick-arrow.custom-slick-arrow) {
color: #fff;
background-color: rgba(31, 45, 61, 0.11);
transition: ease all 0.3s;
opacity: 0.3;
z-index: 1;
}
:deep(.slick-arrow.custom-slick-arrow:before) {
display: none;
}
:deep(.slick-arrow.custom-slick-arrow:hover) {
color: #fff;
opacity: 0.5;
}
:deep(.slick-slide h3) {
color: #fff;
}
.user-card {
height: 170px;
margin: 0 1px;
background-color: var(--grey-10);
background-repeat: no-repeat;
background-size: cover;
display: flex;
.user-avatar {
margin-left: 16px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
.user-info {
margin-left: 10px;
.nickname {
color: var(--grey-3);
font-size: 18px;
font-weight: 500;
}
.phone {
color: var(--grey-5);
}
}
}
}
.order-card {
width: 340px;
height: 80px;
margin: 0 1px;
background: #ffffff;
border-radius: 5px;
border-color: slategrey;
position: absolute;
top: 230px;
left: 24px;
.btn-center {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
.tools-card {
width: 340px;
margin: 0 1px;
padding: 6px 16px;
background: #ffffff;
border-radius: 5px;
border-color: slategrey;
position: absolute;
top: 324px;
left: 24px;
.ele-cell {
padding: 4px 0;
border-bottom: 1px solid var(--grey-9);
cursor: pointer;
}
.btn-center {
display: flex;
align-items: center;
justify-content: center;
}
}
</style>