From 0470145fcd755d3f87bffc7a985bd3cc82c5f3f6 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 10 二月 2025 16:30:40 +0800 Subject: [PATCH] feat: init --- apps/cMiniApp/src/constants/index.ts | 1 packages/constants/index.ts | 7 packages/constants/enum.ts | 4 apps/cMiniApp/src/hooks/index.ts | 6 apps/cMiniApp/src/pages/home/index.vue | 13 - apps/cMiniApp/config/index.js | 8 apps/cMiniApp/src/stores/modules/user.ts | 42 ---- apps/cMiniApp/package.json | 2 packages/utils/index.ts | 2 pnpm-lock.yaml | 26 +- packages/constants/dic.ts | 25 -- /dev/null | 136 --------------- apps/cMiniApp/src/components/index.ts | 1 packages/constants/cooperate.ts | 21 -- apps/cMiniApp/src/constants/tabBar.ts | 2 packages/components/src/index.ts | 2 apps/cMiniApp/src/constants/router.ts | 27 -- apps/cMiniApp/src/hooks/user.ts | 84 --------- apps/cMiniApp/src/app.config.ts | 47 ---- packages/constants/user.ts | 21 -- apps/cMiniApp/src/custom-tab-bar/index.tsx | 8 apps/cMiniApp/src/pages/mine/index.vue | 52 ----- 22 files changed, 38 insertions(+), 499 deletions(-) diff --git a/apps/cMiniApp/config/index.js b/apps/cMiniApp/config/index.js index 17b77cd..bb4c8db 100644 --- a/apps/cMiniApp/config/index.js +++ b/apps/cMiniApp/config/index.js @@ -1,7 +1,7 @@ const path = require('path'); -const AutoImport = require('unplugin-auto-import/webpack'); const { CIPluginFn } = require('../ci/upload'); +import AutoImport from 'unplugin-auto-import/webpack'; import ComponentsPlugin from 'unplugin-vue-components/webpack'; import NutUIResolver from '@nutui/nutui-taro/dist/resolver'; @@ -25,12 +25,6 @@ alias: { '@': path.resolve(__dirname, '..', 'src'), '@components/assets': path.resolve(__dirname, '..', 'node_modules', '@12333/components/assets'), - '@tencentcloud/chat-uikit-engine': path.resolve( - __dirname, - '..', - 'node_modules', - '@tencentcloud/chat-uikit-engine' - ), }, sourceRoot: 'src', outputRoot: 'dist', diff --git a/apps/cMiniApp/package.json b/apps/cMiniApp/package.json index 1bd4dc5..3cfa39f 100644 --- a/apps/cMiniApp/package.json +++ b/apps/cMiniApp/package.json @@ -123,7 +123,7 @@ "taro-plugin-compiler-optimization": "^1.0.4", "thread-loader": "^4.0.2", "unplugin-auto-import": "^0.16.6", - "unplugin-vue-components": "^0.28.0", + "unplugin-vue-components": "^0.27.4", "vue-eslint-parser": "^9.3.1", "vue-loader": "^17.0.0", "webpack": "^5.78.0", diff --git a/apps/cMiniApp/src/app.config.ts b/apps/cMiniApp/src/app.config.ts index aa4c892..0a16e9a 100644 --- a/apps/cMiniApp/src/app.config.ts +++ b/apps/cMiniApp/src/app.config.ts @@ -50,41 +50,6 @@ ], }, { - root: 'subpackages/setting', - pages: [ - 'userInfo/userInfo', - 'setting/setting', - 'privacyAgreement/privacyAgreement', - 'cooperation/cooperation', - 'faq/faq', - 'toggleMatchMakingIdentity/toggleMatchMakingIdentity', - 'orderManage/orderManage', - 'resourceManage/resourceManage', - 'tradeChatRecord/tradeChatRecord', - ], - }, - { - root: 'subpackages/user', - pages: ['userHomePage/userHomePage', 'complaint/complaint'], - }, - { - root: 'subpackages/message', - pages: [ - 'systemMessage/systemMessage', - 'chatRoom/chatRoom', - 'unfamiliarUserList/unfamiliarUserList', - 'messageList/messageList', - ], - }, - { - root: 'subpackages/order', - pages: ['orderDetail/orderDetail', 'publishOrder/publishOrder'], - }, - { - root: 'subpackages/resource', - pages: ['resourceDetail/resourceDetail', 'publishResource/publishResource'], - }, - { root: 'subpackages/authentication', pages: [ 'authenticationHome/authenticationHome', @@ -98,10 +63,10 @@ pages: ['citySelect/citySelect'], }, ], - preloadRule: { - 'pages/mine/index': { - network: 'all', - packages: ['subpackages/setting', 'subpackages/message'], - }, - }, + // preloadRule: { + // 'pages/mine/index': { + // network: 'all', + // packages: ['subpackages/setting', 'subpackages/message'], + // }, + // }, }); diff --git a/apps/cMiniApp/src/components/Card/AttentionCard.vue b/apps/cMiniApp/src/components/Card/AttentionCard.vue deleted file mode 100644 index 9f23bb2..0000000 --- a/apps/cMiniApp/src/components/Card/AttentionCard.vue +++ /dev/null @@ -1,79 +0,0 @@ -<template> - <Card class="attention-card-wrapper"> - <div class="attention-card-inner"> - <InfoAvatar - :src="avatarUrl ? setOSSLink(avatarUrl) : ''" - :name="name" - :company="enterpriseName" - class="attention-card-avatar" - :size="size" - /> - <div class="attention-card-actions"> - <slot name="actions" /> - </div> - </div> - </Card> -</template> - -<script setup lang="ts"> -import Card from './Card.vue'; -import { InfoAvatar } from '@12333/components'; -import { setOSSLink } from '@12333/utils'; - -defineOptions({ - name: 'AttentionCard', -}); - -type Props = { - avatarUrl?: string; - name?: string; - enterpriseName?: string; - size?: 'normal' | 'small'; -}; - -const props = withDefaults(defineProps<Props>(), { - size: 'normal', -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.attention-card-wrapper { - border-radius: 0; - padding: 0 boleGetCssVar('size', 'body-padding-h'); - margin-bottom: 0; - - &:last-child { - .attention-card-inner { - border-bottom: none; - } - } - - .attention-card-inner { - border-bottom: 2px solid #f6f6f6; - padding: 32px 0; - display: flex; - align-items: center; - - .attention-card-avatar { - flex: 1; - min-width: 0; - } - - .attention-card-actions { - display: flex; - align-items: center; - - .card-action { - --nut-button-default-height: 48px; - border: 2px solid boleGetCssVar('text-color', 'secondary'); - font-weight: bold; - font-size: 24px; - color: boleGetCssVar('text-color', 'primary'); - padding: 0 30px; - } - } - } -} -</style> diff --git a/apps/cMiniApp/src/components/Card/MessageCard.vue b/apps/cMiniApp/src/components/Card/MessageCard.vue deleted file mode 100644 index 30eb9f0..0000000 --- a/apps/cMiniApp/src/components/Card/MessageCard.vue +++ /dev/null @@ -1,103 +0,0 @@ -<template> - <Card class="message-card-wrapper"> - <div class="message-card-inner"> - <nut-badge :value="badge" :max="99" top="6" right="10" :hidden="!badge"> - <Avatar :size="40" class="message-card-avatar" :src="avatarUrl" /> - </nut-badge> - <div class="message-card-content"> - <div class="message-card-content-top"> - <div class="message-card-title">{{ contact }}</div> - <div class="message-card-time"> - {{ dayjs(latestMessageCreationTime).format('YYYY-MM-DD') }} - </div> - </div> - <div class="message-card-content-bottom">{{ latestMessageContent }}</div> - </div> - </div> - </Card> -</template> - -<script setup lang="ts"> -import Card from './Card.vue'; -import { Avatar } from '@12333/components'; -import dayjs from 'dayjs'; -import { MessageChatTypeEnum } from '@12333/constants'; -import { MessageChatTypeAvatarMap } from '@/constants'; - -defineOptions({ - name: 'MessageCard', -}); - -type Props = { - badge?: number; - avatarUrl?: string; - latestMessageCreationTime?: string; - latestMessageContent?: string; - contact?: string; - chatType?: MessageChatTypeEnum; -}; - -const props = withDefaults(defineProps<Props>(), {}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.message-card-wrapper { - border-radius: 0; - padding: 0 boleGetCssVar('size', 'body-padding-h'); - margin-bottom: 0; - - &:last-child { - .message-card-inner { - border-bottom: none; - } - } - - .message-card-inner { - border-bottom: 2px solid #f6f6f6; - padding: 32px 0; - display: flex; - - .message-card-avatar { - margin-right: 16px; - } - - .message-card-content { - flex: 1; - min-width: 0; - - .message-card-content-top { - display: flex; - align-items: center; - margin-bottom: 8px; - - .message-card-title { - font-weight: 600; - font-size: 28px; - color: #555555; - line-height: 40px; - @include ellipsis; - flex: 1; - min-width: 0; - } - - .message-card-time { - font-weight: 400; - font-size: 22px; - color: boleGetCssVar('text-color', 'regular'); - line-height: 32px; - } - } - - .message-card-content-bottom { - font-weight: 400; - font-size: 24px; - color: boleGetCssVar('text-color', 'regular'); - line-height: 34px; - @include ellipsis; - } - } - } -} -</style> diff --git a/apps/cMiniApp/src/components/Card/OrderCard.vue b/apps/cMiniApp/src/components/Card/OrderCard.vue deleted file mode 100644 index ac94204..0000000 --- a/apps/cMiniApp/src/components/Card/OrderCard.vue +++ /dev/null @@ -1,143 +0,0 @@ -<template> - <CommonCard v-bind="rest" class="order-card-wrapper"> - <template #title-right v-if="showActionBtn"> - <slot name="title-right"> - <nut-button color="linear-gradient( 90deg, #569CFF 0%, #3A71FE 100%)">鎺ュ崟</nut-button> - </slot> - </template> - <div class="order-card-content"> - <div class="order-card-content-info"> - <div class="order-card-content-info-item">{{ _hireNumber }}浜�</div> - <div class="order-card-content-info-item-line"></div> - <div class="order-card-content-info-item">{{ ageStart ?? 0 }}-{{ ageEnd ?? 0 }}鍛ㄥ瞾</div> - <div class="order-card-content-info-item-line"></div> - <div class="order-card-content-info-item">{{ `${provinceName}${cityName}` }}</div> - </div> - <div class="order-card-supplier-refund"> - <div class="order-card-supplier-refund-tag">鍚堜綔</div> - <div class="order-card-supplier-refund-text"> - {{ supplierRefund }}锛寋{ rebateModeText }} - </div> - </div> - </div> - <template #footer> - <slot name="footer"></slot> - </template> - </CommonCard> -</template> - -<script setup lang="ts"> -import CommonCard from './CommonCard.vue'; -import { OrderUtils } from '@12333/utils'; -import { HireType } from '@12333/constants'; - -defineOptions({ - name: 'OrderCard', -}); - -type Props = { - title?: string; - src?: string; - name?: string; - jobTitle?: string; - time?: string; - hireType?: HireType; - hireNumber?: number; - hireEndNumber?: number; - ageStart?: number; - ageEnd?: number; - provinceName?: string; - cityName?: string; - integratedSalary?: string; - userId?: string; - orderSupplierRefundInfo?: API.OrderSupplierRefundInfo[]; - showActionBtn?: boolean; -}; - -const { - hireType, - hireNumber, - hireEndNumber, - orderSupplierRefundInfo, - showActionBtn = true, - ...rest -} = defineProps<Props>(); - -const _hireNumber = computed(() => OrderUtils.getHireNumber(hireType, hireNumber, hireEndNumber)); - -const supplierRefund = computed(() => { - if (orderSupplierRefundInfo) { - return OrderUtils.getSupplierRefund(orderSupplierRefundInfo); - } - return ''; -}); - -const rebateModeText = computed(() => { - if (orderSupplierRefundInfo) { - return OrderUtils.getRebateModeText(orderSupplierRefundInfo); - } - return ''; -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.order-card-wrapper { - .order-card-content { - .order-card-content-info { - font-weight: 400; - font-size: 0; - color: #9e9e9e; - line-height: 34px; - word-break: break-all; - @include ellipsis; - margin-bottom: 16px; - - .order-card-content-info-item { - font-size: 24px; - vertical-align: middle; - display: inline-block; - } - - .order-card-content-info-item-line { - vertical-align: middle; - display: inline-block; - width: 2px; - height: 20px; - background-color: #979797; - margin: 0 6px; - } - } - - .order-card-supplier-refund { - display: flex; - align-items: center; - - .order-card-supplier-refund-tag { - height: 34px; - background: #edf2ff; - border-radius: 4px; - padding: 0 8px; - margin-right: 8px; - font-weight: 400; - font-size: 20px; - color: boleGetCssVar('color', 'primary'); - line-height: 34px; - flex-shrink: 0; - } - - .order-card-supplier-refund-text { - height: 34px; - background: #f9faff; - padding: 0 8px; - font-weight: 400; - font-size: 24px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 34px; - @include ellipsis; - } - } - } -} -</style> diff --git a/apps/cMiniApp/src/components/Card/OrderManageCard.vue b/apps/cMiniApp/src/components/Card/OrderManageCard.vue deleted file mode 100644 index ae98082..0000000 --- a/apps/cMiniApp/src/components/Card/OrderManageCard.vue +++ /dev/null @@ -1,153 +0,0 @@ -<template> - <OrderCard v-bind="props"> - <template #title-right> - <div class="more-btn" @click.stop="handleMore"> - <img :src="IconMore" class="more-btn-icon" /> - </div> - </template> - <template #footer> - <div class="common-card-footer-time" style="margin-left: 0"> - 鍒涘缓浜庯細{{ dayjs(props.time).format('MM-DD HH:mm') }} - </div> - </template> - </OrderCard> -</template> - -<script setup lang="ts"> -import dayjs from 'dayjs'; -import { HireType, OrderStatus } from '@12333/constants'; -import IconMore from '@/assets/order/icon-more.png'; -import { Portal } from 'senin-mini/components'; -import { ActionSheet } from '@nutui/nutui-taro'; -import { ManageActions } from '@/subpackages/setting/constants'; - -defineOptions({ - name: 'OrderManageCard', -}); - -type Props = { - title?: string; - src?: string; - name?: string; - jobTitle?: string; - time?: string; - hireType?: HireType; - hireNumber?: number; - hireEndNumber?: number; - ageStart?: number; - ageEnd?: number; - cityName?: string; - integratedSalary?: string; - orderSupplierRefundInfo?: API.OrderSupplierRefundInfo[]; - status?: OrderStatus; -}; - -const props = withDefaults(defineProps<Props>(), {}); - -const emit = defineEmits<{ - (e: 'edit'): void; - (e: 'detail'): void; - (e: 'publish'): void; - (e: 'stop'): void; - (e: 'copy'): void; - (e: 'delete'): void; -}>(); - -const menuList = computed(() => { - let _menuList = []; - if (props.status !== OrderStatus.WaitToAudit) { - _menuList.push({ - name: '缂栬緫', - value: ManageActions.Edit, - }); - } - _menuList.push({ - name: '鏌ョ湅璇︽儏', - value: ManageActions.Detail, - }); - if (props.status === OrderStatus.OffShelf) { - _menuList.push({ - name: '閲嶆柊鍙戝竷', - value: ManageActions.Publish, - }); - } - if (props.status === OrderStatus.Passed) { - _menuList.push({ - name: '鍋滄鍙戝竷', - value: ManageActions.Stop, - }); - } - if (props.status !== OrderStatus.WaitToAudit) { - _menuList.push( - { - name: '澶嶅埗', - value: ManageActions.Copy, - }, - { - name: '鍒犻櫎', - value: ManageActions.Delete, - } - ); - } - - return _menuList; -}); - -function handleMore() { - Portal.add((key) => { - return h( - Portal.Container, - { keyNumber: key, delayOpen: true }, - { - default: ({ open, onClose }) => - // @ts-ignore - h(ActionSheet, { - visible: open.value, - 'onUpdate:visible': () => onClose(), - menuItems: menuList.value, - onChoose: (item) => { - handleEmit(item); - onClose(); - }, - }), - } - ); - }); -} - -function handleEmit(action: { name: string; value: number }) { - switch (action.value) { - case ManageActions.Edit: - emit('edit'); - break; - case ManageActions.Detail: - emit('detail'); - break; - case ManageActions.Publish: - emit('publish'); - break; - case ManageActions.Stop: - emit('stop'); - break; - case ManageActions.Copy: - emit('copy'); - break; - case ManageActions.Delete: - emit('delete'); - break; - } -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.more-btn { - padding-left: 40px; - - .more-btn-icon { - width: 32px; - height: 32px; - } -} -</style> diff --git a/apps/cMiniApp/src/components/Card/ResourceCard.vue b/apps/cMiniApp/src/components/Card/ResourceCard.vue deleted file mode 100644 index 6cfebe5..0000000 --- a/apps/cMiniApp/src/components/Card/ResourceCard.vue +++ /dev/null @@ -1,123 +0,0 @@ -<template> - <CommonCard v-bind="rest" class="resource-card-wrapper"> - <template #title-right v-if="showActionBtn"> - <slot name="title-right"> - <nut-button color="linear-gradient( 90deg, #569CFF 0%, #3A71FE 100%)">鍘诲鎺�</nut-button> - </slot> - </template> - <div class="order-card-content"> - <div class="order-card-content-info"> - <div class="order-card-content-info-item">鍙氦浠榹{ resourceCount ?? 0 }}浜�</div> - </div> - <div class="order-card-supplier-refund"> - <div class="order-card-supplier-refund-text"> - 鍙氦浠樺煄甯傦細{{ intendedDeliveryCitiesNames }} - </div> - </div> - </div> - <template #footer> - <slot name="footer"></slot> - </template> - </CommonCard> -</template> - -<script setup lang="ts"> -import CommonCard from './CommonCard.vue'; -import { useAllAreaList } from '@12333/hooks'; - -defineOptions({ - name: 'ResourceCard', -}); - -type Props = { - title?: string; - src?: string; - name?: string; - jobTitle?: string; - time?: string; - resourceCount?: number; - userId?: string; - intendedDeliveryCities?: API.CityInfo[]; - showActionBtn?: boolean; -}; - -const { - resourceCount, - intendedDeliveryCities = [], - showActionBtn = true, - ...rest -} = defineProps<Props>(); - -const { findAreaNameFromCode } = useAllAreaList(); - -const intendedDeliveryCitiesNames = computed(() => { - if (intendedDeliveryCities.length > 0) { - return intendedDeliveryCities - .map((item) => `${findAreaNameFromCode(item.provinceCode)}${item.areaName}`) - .join('銆�'); - } - return ''; -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.resource-card-wrapper { - .order-card-content { - .order-card-content-info { - font-weight: 400; - font-size: 0; - color: boleGetCssVar('text-color', 'secondary'); - line-height: 34px; - word-break: break-all; - @include ellipsis; - margin-bottom: 16px; - - .order-card-content-info-item { - font-size: 24px; - vertical-align: middle; - display: inline-block; - } - - .order-card-content-info-item-line { - vertical-align: middle; - display: inline-block; - width: 2px; - height: 20px; - background-color: #979797; - margin: 0 6px; - } - } - - .order-card-supplier-refund { - display: flex; - align-items: center; - - .order-card-supplier-refund-tag { - height: 34px; - background: #edf2ff; - border-radius: 4px; - padding: 0 8px; - margin-right: 8px; - font-weight: 400; - font-size: 20px; - color: boleGetCssVar('color', 'primary'); - line-height: 34px; - flex-shrink: 0; - } - - .order-card-supplier-refund-text { - height: 34px; - background: #f9faff; - padding: 0 8px; - font-weight: 400; - font-size: 24px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 34px; - @include ellipsis; - } - } - } -} -</style> diff --git a/apps/cMiniApp/src/components/Card/ResourceManageCard.vue b/apps/cMiniApp/src/components/Card/ResourceManageCard.vue deleted file mode 100644 index 3f9f0e7..0000000 --- a/apps/cMiniApp/src/components/Card/ResourceManageCard.vue +++ /dev/null @@ -1,147 +0,0 @@ -<template> - <ResourceCard v-bind="props"> - <template #title-right> - <div class="more-btn" @click.stop="handleMore"> - <img :src="IconMore" class="more-btn-icon" /> - </div> - </template> - <template #footer> - <div class="common-card-footer-time" style="margin-left: 0"> - 鍒涘缓浜庯細{{ dayjs(props.time).format('MM-DD HH:mm') }} - </div> - </template> - </ResourceCard> -</template> - -<script setup lang="ts"> -import dayjs from 'dayjs'; -import { ResourceStatus } from '@12333/constants'; -import IconMore from '@/assets/order/icon-more.png'; -import { Portal } from 'senin-mini/components'; -import { ActionSheet } from '@nutui/nutui-taro'; -import { ManageActions } from '@/subpackages/setting/constants'; - -defineOptions({ - name: 'ResourceManageCard', -}); - -type Props = { - title?: string; - src?: string; - name?: string; - jobTitle?: string; - time?: string; - resourceCount?: number; - intendedDeliveryCities?: API.CityInfo[]; - status?: ResourceStatus; -}; - -const props = withDefaults(defineProps<Props>(), {}); - -const emit = defineEmits<{ - (e: 'edit'): void; - (e: 'detail'): void; - (e: 'publish'): void; - (e: 'stop'): void; - (e: 'copy'): void; - (e: 'delete'): void; -}>(); - -const menuList = computed(() => { - let _menuList = []; - if (props.status !== ResourceStatus.WaitAudit) { - _menuList.push({ - name: '缂栬緫', - value: ManageActions.Edit, - }); - } - _menuList.push({ - name: '鏌ョ湅璇︽儏', - value: ManageActions.Detail, - }); - if (props.status === ResourceStatus.OffShelf) { - _menuList.push({ - name: '閲嶆柊鍙戝竷', - value: ManageActions.Publish, - }); - } - if (props.status === ResourceStatus.Running) { - _menuList.push({ - name: '鍋滄鍙戝竷', - value: ManageActions.Stop, - }); - } - if (props.status !== ResourceStatus.WaitAudit) { - _menuList.push( - { - name: '澶嶅埗', - value: ManageActions.Copy, - }, - { - name: '鍒犻櫎', - value: ManageActions.Delete, - } - ); - } - - return _menuList; -}); - -function handleMore() { - Portal.add((key) => { - return h( - Portal.Container, - { keyNumber: key, delayOpen: true }, - { - default: ({ open, onClose }) => - // @ts-ignore - h(ActionSheet, { - visible: open.value, - 'onUpdate:visible': () => onClose(), - menuItems: menuList.value, - onChoose: (item) => { - handleEmit(item); - onClose(); - }, - }), - } - ); - }); -} - -function handleEmit(action: { name: string; value: number }) { - switch (action.value) { - case ManageActions.Edit: - emit('edit'); - break; - case ManageActions.Detail: - emit('detail'); - break; - case ManageActions.Publish: - emit('publish'); - break; - case ManageActions.Stop: - emit('stop'); - break; - case ManageActions.Copy: - emit('copy'); - break; - case ManageActions.Delete: - emit('delete'); - break; - } -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.more-btn { - padding-left: 40px; - - .more-btn-icon { - width: 32px; - height: 32px; - } -} -</style> diff --git a/apps/cMiniApp/src/components/Card/SystemMessageCard.vue b/apps/cMiniApp/src/components/Card/SystemMessageCard.vue deleted file mode 100644 index 23fd939..0000000 --- a/apps/cMiniApp/src/components/Card/SystemMessageCard.vue +++ /dev/null @@ -1,116 +0,0 @@ -<template> - <!-- <MessageTimestamp - :currTime="prevTime === 0 ? 0 : dayjs(prevTime).toDate().getTime()" - :prevTime="dayjs(creationTime).toDate().getTime()" - ></MessageTimestamp> --> - <div class="bl-message-timestamp"> - {{ dayjs(creationTime).format('YYYY-MM-DD') }} - </div> - <Card class="system-message-card-wrapper-v2"> - {{ messageContent }} - <!-- <div class="system-message-card-inner"> - <Avatar :size="30" :src="IconSystemAvatar" class="system-message-card-avatar" /> - <div class="system-message-card-content"> - <div class="system-message-card-content-top"> - <div class="system-message-card-title">绯荤粺娑堟伅</div> - <div class="system-message-card-time">{{ dayjs(creationTime).format('YYYY-MM-DD') }}</div> - </div> - <div class="system-message-card-content-bottom"> - {{ messageContent }} - </div> - </div> - </div> --> - </Card> -</template> - -<script setup lang="ts"> -import Card from './Card.vue'; -import { Avatar } from '@12333/components'; -import dayjs from 'dayjs'; -import IconSystemAvatar from '@/assets/message/icon-system-avatar.png'; -import MessageTimestamp from '../message/message-timestamp.vue'; - -defineOptions({ - name: 'SystemMessageCard', -}); - -type Props = { - id?: string; - messageContent?: string; - creationTime?: string; - prevTime?: string | number; - type?: number; -}; - -const props = withDefaults(defineProps<Props>(), {}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.system-message-card-wrapper { - border-radius: 0; - padding: 0 boleGetCssVar('size', 'body-padding-h'); - margin-bottom: 0; - - &:last-child { - .system-message-card-inner { - border-bottom: none; - } - } - - .system-message-card-inner { - border-bottom: 2px solid #f6f6f6; - padding: 32px 0; - display: flex; - - .system-message-card-avatar { - margin-right: 20px; - } - - .system-message-card-content { - flex: 1; - min-width: 0; - - .system-message-card-content-top { - display: flex; - align-items: center; - margin-bottom: 8px; - - .system-message-card-title { - font-weight: 600; - font-size: 28px; - color: #555555; - line-height: 40px; - @include ellipsis; - flex: 1; - min-width: 0; - } - - .system-message-card-time { - font-weight: 400; - font-size: 22px; - color: boleGetCssVar('text-color', 'regular'); - line-height: 32px; - } - } - - .system-message-card-content-bottom { - font-weight: 400; - font-size: 24px; - color: boleGetCssVar('text-color', 'regular'); - line-height: 34px; - @include ellipsis; - } - } - } -} - -.system-message-card-wrapper-v2 { - padding: 32px boleGetCssVar('size', 'body-padding-h'); - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 44px; -} -</style> diff --git a/apps/cMiniApp/src/components/index.ts b/apps/cMiniApp/src/components/index.ts index 7335c91..88976c9 100644 --- a/apps/cMiniApp/src/components/index.ts +++ b/apps/cMiniApp/src/components/index.ts @@ -24,4 +24,3 @@ export { default as PageFooterBtn } from './PageFooter/PageFooterBtn.vue'; export { default as ChunkTitle } from './Chunk/ChunkTitle.vue'; export { default as UserHomeTopView } from './UserHome/UserHomeTopView.vue'; -export { default as MessageTimestamp } from './message/message-timestamp.vue'; diff --git a/apps/cMiniApp/src/components/message/message-timestamp.vue b/apps/cMiniApp/src/components/message/message-timestamp.vue deleted file mode 100644 index fe96c6c..0000000 --- a/apps/cMiniApp/src/components/message/message-timestamp.vue +++ /dev/null @@ -1,115 +0,0 @@ -<template> - <div class="bl-message-timestamp" v-if="timestampShowFlag"> - {{ timestampShowContent }} - </div> -</template> - -<script setup lang="ts"> -const props = defineProps({ - currTime: { - type: Number, - default: 0, - }, - prevTime: { - type: Number, - default: 0, - }, -}); -const { currTime, prevTime } = toRefs(props); -const timestampShowFlag = ref(false); -const timestampShowContent = ref(''); - -const handleItemTime = (currTime: number, prevTime: number) => { - timestampShowFlag.value = false; - if (currTime <= 0) { - return ''; - } else if (!prevTime || prevTime <= 0) { - timestampShowFlag.value = true; - return calculateTimestamp(currTime * 1000); - } else { - const minDiffToShow = 10 * 60; //10min 10*60s - const diff = currTime - prevTime; //s - if (diff >= minDiffToShow) { - timestampShowFlag.value = true; - return calculateTimestamp(currTime * 1000); - } - } - return ''; -}; - -watch( - () => [currTime.value, prevTime.value], - (newVal: any, oldVal: any) => { - if (newVal?.toString() === oldVal?.toString()) { - return; - } else { - timestampShowContent.value = handleItemTime(currTime.value, prevTime.value); - } - }, - { - immediate: true, - } -); - -// 璁$畻鏃堕棿鎴冲嚱鏁� -// calculate timestamp -function calculateTimestamp(timestamp: number): string { - const todayZero = new Date().setHours(0, 0, 0, 0); - const thisYear = new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0).getTime(); - const target = new Date(timestamp); - - const oneDay = 24 * 60 * 60 * 1000; - const oneWeek = 7 * oneDay; - const oneYear = 365 * oneDay; - - const diff = todayZero - target.getTime(); - - function formatNum(num: number): string { - return num < 10 ? '0' + num : num.toString(); - } - - if (diff <= 0) { - // today, only display hour:minute - return `${formatNum(target.getHours())}:${formatNum(target.getMinutes())}`; - } else if (diff <= oneDay) { - // yesterday, display yesterday:hour:minute - return `鏄ㄥぉ ${formatNum(target.getHours())}:${formatNum(target.getMinutes())}`; - } else if (diff <= oneWeek - oneDay) { - // Within a week, display weekday hour:minute - const weekdays = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�']; - const weekday = weekdays[target.getDay()]; - return `${weekday} ${formatNum(target.getHours())}:${formatNum(target.getMinutes())}`; - } else if (target.getTime() >= thisYear) { - // Over a week, within this year, display mouth/day hour:minute - return `${target.getMonth() + 1}/${target.getDate()} ${formatNum( - target.getHours() - )}:${formatNum(target.getMinutes())}`; - } else { - // Not within this year, display year/mouth/day hour:minute - return `${target.getFullYear()}/${target.getMonth() + 1}/${target.getDate()} ${formatNum( - target.getHours() - )}:${formatNum(target.getMinutes())}`; - } -} -</script> -<style lang="scss"> -@import '@/styles/common.scss'; - -:root, -page { - .bl-message-timestamp { - margin: 0 auto; - color: boleGetCssVar('text-color', 'regular'); - line-height: 32px; - font-size: 22px; - width: -webkit-fill-available; - overflow-wrap: anywhere; - display: flex; - justify-content: center; - align-content: center; - align-items: center; - text-align: center; - padding: 0 20px 24px; - } -} -</style> diff --git a/apps/cMiniApp/src/constants/index.ts b/apps/cMiniApp/src/constants/index.ts index f2fb569..c7f2445 100644 --- a/apps/cMiniApp/src/constants/index.ts +++ b/apps/cMiniApp/src/constants/index.ts @@ -1,5 +1,4 @@ export * from './enum'; export * from './tabBar'; export * from './router'; -export * from './message'; export * from './img'; diff --git a/apps/cMiniApp/src/constants/message.ts b/apps/cMiniApp/src/constants/message.ts deleted file mode 100644 index 7fee0ce..0000000 --- a/apps/cMiniApp/src/constants/message.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { MessageChatTypeEnum } from '@12333/constants'; -import IconSystemAvatar from '@/assets/message/icon-system-avatar.png'; -import IconStrangerAvatar from '@/assets/message/icon-stranger-avatar.png'; - -export const MessageChatTypeAvatarMap = { - [MessageChatTypeEnum.System]: IconSystemAvatar, - [MessageChatTypeEnum.UnfamiliarUser]: IconStrangerAvatar, -}; diff --git a/apps/cMiniApp/src/constants/router.ts b/apps/cMiniApp/src/constants/router.ts index bd091bc..0c2dd71 100644 --- a/apps/cMiniApp/src/constants/router.ts +++ b/apps/cMiniApp/src/constants/router.ts @@ -6,26 +6,13 @@ home = '/pages/home/index', mine = '/pages/mine/index', editRichContent = '/subpackages/editRichContent/editRichContent', - userInfo = '/subpackages/setting/userInfo/userInfo', - setting = '/subpackages/setting/setting/setting', - privacyAgreement = '/subpackages/setting/privacyAgreement/privacyAgreement', - cooperation = '/subpackages/setting/cooperation/cooperation', - // wxSetting = '/subpackages/setting/wxSetting/wxSetting', - faq = '/subpackages/setting/faq/faq', - toggleMatchMakingIdentity = '/subpackages/setting/toggleMatchMakingIdentity/toggleMatchMakingIdentity', - orderManage = '/subpackages/setting/orderManage/orderManage', - resourceManage = '/subpackages/setting/resourceManage/resourceManage', - tradeChatRecord = '/subpackages/setting/tradeChatRecord/tradeChatRecord', - userHomePage = '/subpackages/user/userHomePage/userHomePage', - complaint = '/subpackages/user/complaint/complaint', - systemMessage = '/subpackages/message/systemMessage/systemMessage', - chatRoom = '/subpackages/message/chatRoom/chatRoom', - unfamiliarUserList = '/subpackages/message/unfamiliarUserList/unfamiliarUserList', - messageList = '/subpackages/message/messageList/messageList', - orderDetail = '/subpackages/order/orderDetail/orderDetail', - publishOrder = '/subpackages/order/publishOrder/publishOrder', - resourceDetail = '/subpackages/resource/resourceDetail/resourceDetail', - publishResource = '/subpackages/resource/publishResource/publishResource', + + // userInfo = '/subpackages/setting/userInfo/userInfo', + // setting = '/subpackages/setting/setting/setting', + // privacyAgreement = '/subpackages/setting/privacyAgreement/privacyAgreement', + // cooperation = '/subpackages/setting/cooperation/cooperation', + // faq = '/subpackages/setting/faq/faq', + authenticationHome = '/subpackages/authentication/authenticationHome/authenticationHome', authenticationResult = '/subpackages/authentication/authenticationResult/authenticationResult', authenticationFaRen = '/subpackages/authentication/authenticationFaRen/authenticationFaRen', diff --git a/apps/cMiniApp/src/constants/tabBar.ts b/apps/cMiniApp/src/constants/tabBar.ts index 8cccdf8..405c9bd 100644 --- a/apps/cMiniApp/src/constants/tabBar.ts +++ b/apps/cMiniApp/src/constants/tabBar.ts @@ -1,6 +1,4 @@ export const TabBarPageRouter = { Home: '/pages/home/index', - CircleFriend: '/pages/circleFriend/circleFriend', - Message: '/pages/message/message', Mine: '/pages/mine/index', }; diff --git a/apps/cMiniApp/src/custom-tab-bar/index.tsx b/apps/cMiniApp/src/custom-tab-bar/index.tsx index 00a24dd..fd1eeda 100644 --- a/apps/cMiniApp/src/custom-tab-bar/index.tsx +++ b/apps/cMiniApp/src/custom-tab-bar/index.tsx @@ -7,9 +7,8 @@ import { storeToRefs } from 'pinia'; import { TabBarPageRouter } from '@/constants'; // import IconPublish from '@/assets/tabbar/icon-publish.png'; -import { useUser, useIsLogin, useMyMessageCount } from '@/hooks'; +import { useUser, useIsLogin } from '@/hooks'; import { Message } from '@12333/utils'; -import { MatchMakingIdentityEnumTitle } from '@12333/constants'; type TarBarItemProps = { text: string; @@ -63,8 +62,6 @@ const router = Taro.useRouter(); - const { matchMakingIdentity } = useUser(); - const isLogin = useIsLogin(); const loginTipShowed = ref(false); @@ -112,7 +109,6 @@ } return () => { - const homeTitle = MatchMakingIdentityEnumTitle[matchMakingIdentity.value]; return ( <View class="bottom-tab" @@ -121,7 +117,7 @@ }} > <TarBarItem - text={homeTitle} + text={'homeTitle'} icon="../assets/tabbar/icon-home.png" activeIcon="../assets/tabbar/icon-home-active.png" pagePath={TabBarPageRouter.Home} diff --git a/apps/cMiniApp/src/hooks/follow.ts b/apps/cMiniApp/src/hooks/follow.ts deleted file mode 100644 index 4052761..0000000 --- a/apps/cMiniApp/src/hooks/follow.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as userServices from '@12333/services/api/User'; -import { Message } from '@12333/utils'; -import { useAccessLogin } from './access'; - -type UseFollowUserOptions = { - onFollowSuccess?: () => void; - onUnFollowSuccess?: () => void; -}; - -export function useFollowUser(options: UseFollowUserOptions = {}) { - const { onFollowSuccess, onUnFollowSuccess } = options; - - const followUser = useAccessLogin(async (params: API.FollowUserInput) => { - try { - await userServices.followUser(params); - onFollowSuccess?.(); - } catch (error) {} - }); - - const unFollowUser = useAccessLogin(async (params: API.UnFollowUserInput) => { - try { - await Message.confirm({ message: '纭鍙栨秷鍏虫敞鍚�?' }); - await userServices.unFollowUser(params); - onUnFollowSuccess?.(); - } catch (error) {} - }); - - return { - followUser, - unFollowUser, - }; -} diff --git a/apps/cMiniApp/src/hooks/index.ts b/apps/cMiniApp/src/hooks/index.ts index dd2612f..04721e7 100644 --- a/apps/cMiniApp/src/hooks/index.ts +++ b/apps/cMiniApp/src/hooks/index.ts @@ -1,11 +1,5 @@ export * from './user'; -export * from './useCategory'; export * from './router'; export * from './access'; export * from './login'; -export * from './information'; export * from './authentication'; -export * from './follow'; -export * from './message'; -export * from './order'; -export * from './resource'; diff --git a/apps/cMiniApp/src/hooks/information.ts b/apps/cMiniApp/src/hooks/information.ts deleted file mode 100644 index 714e97b..0000000 --- a/apps/cMiniApp/src/hooks/information.ts +++ /dev/null @@ -1,40 +0,0 @@ -import * as informationServices from '@12333/services/api/Information'; -import { Message } from '@12333/utils'; - -type UseInformationActionsOptions = { - onDeleteSuccess?: () => void; - onAttentOrNotSuccess?: () => void; -}; - -export function useInformationActions(options: UseInformationActionsOptions = {}) { - const { onDeleteSuccess, onAttentOrNotSuccess } = options; - - async function handleDelete(id: string) { - try { - await Message.confirm(); - let res = await informationServices.deleteInformation({ - id: id, - }); - if (res) { - Message.success('鎿嶄綔鎴愬姛'); - onDeleteSuccess?.(); - } - } catch (error) {} - } - - async function handleCancelAttention(id: string) { - try { - await Message.confirm({ message: '鏄惁鍙栨秷鏀惰棌' }); - let params: API.APIattentOrNotParams = { - informationId: id, - }; - let res = await informationServices.attentOrNot(params); - if (res) { - Message.success('宸插彇娑堟敹钘�'); - onAttentOrNotSuccess?.(); - } - } catch (error) {} - } - - return { handleDelete, handleCancelAttention }; -} diff --git a/apps/cMiniApp/src/hooks/message.ts b/apps/cMiniApp/src/hooks/message.ts deleted file mode 100644 index b3eaa20..0000000 --- a/apps/cMiniApp/src/hooks/message.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MessageChatTypeEnum } from '@12333/constants'; -import { MaybeRef } from 'vue'; -import { useUser, useIsLogin } from './user'; -import { useMyMessageCount as useMyMessageCountInner } from '@12333/hooks'; - -type UseMyMessageCountOptions = { - messageChatType?: MaybeRef<MessageChatTypeEnum>; -}; - -export function useMyMessageCount(options: UseMyMessageCountOptions = {}) { - const { messageChatType } = options; - const isLogin = useIsLogin(); - - return useMyMessageCountInner({ - messageChatType, - enabled: isLogin, - isContainLikeFavoriteAddFollowMessageCount: false, - }); -} diff --git a/apps/cMiniApp/src/hooks/order.ts b/apps/cMiniApp/src/hooks/order.ts deleted file mode 100644 index 71f5685..0000000 --- a/apps/cMiniApp/src/hooks/order.ts +++ /dev/null @@ -1,73 +0,0 @@ -import Taro from '@tarojs/taro'; -import { Message } from '@12333/utils'; -import * as orderServices from '@12333/services/api/Order'; -import { OrderStatus, OrderOperateBtnStatus } from '@12333/constants'; - -type UseOrderActionsOptions = { - onStopSuccess?: () => any; - onDeleteSuccess?: () => any; -}; - -export function useOrderActions(options: UseOrderActionsOptions = {}) { - const { onStopSuccess, onDeleteSuccess } = options; - - function handleEdit(item: API.FrontOrderList) { - Taro.navigateTo({ - url: `${RouterPath.publishOrder}?id=${item.id}&orderOperateBtnStatus=${OrderOperateBtnStatus.Edit}`, - }); - } - - function handleGoDetail(item: API.FrontOrderList) { - Taro.navigateTo({ - url: `${RouterPath.orderDetail}?id=${item.id}`, - }); - } - - async function handleStop(item: API.FrontOrderList) { - try { - await Message.confirm({ - message: '纭鍋滄鍙戝竷璇ヨ鍗曞悧锛�', - }); - const res = await orderServices.setOrderStatus({ - id: item.id, - status: OrderStatus.OffShelf, - }); - if (res) { - Message.success('宸插仠姝㈠彂甯�'); - onStopSuccess?.(); - } - } catch (error) {} - } - - function handleRePublish(item: API.FrontOrderList) { - handleEdit(item); - } - - async function handleCopy(item: API.FrontOrderList) { - Taro.navigateTo({ - url: `${RouterPath.publishOrder}?id=${item.id}&orderOperateBtnStatus=${OrderOperateBtnStatus.Copy}`, - }); - } - - async function handleDelete(row: API.FrontOrderList) { - try { - await Message.confirm(); - const res = await orderServices.deleteOrder({ - id: row.id, - }); - if (res) { - onDeleteSuccess?.(); - Message.success('鎿嶄綔鎴愬姛'); - } - } catch (error) {} - } - - return { - handleEdit, - handleGoDetail, - handleStop, - handleRePublish, - handleCopy, - handleDelete, - }; -} diff --git a/apps/cMiniApp/src/hooks/resource.ts b/apps/cMiniApp/src/hooks/resource.ts deleted file mode 100644 index bc94ace..0000000 --- a/apps/cMiniApp/src/hooks/resource.ts +++ /dev/null @@ -1,73 +0,0 @@ -import * as resourceServices from '@12333/services/api/Resource'; -import Taro from '@tarojs/taro'; -import { Message } from '@12333/utils'; -import { ResourceStatus, ResourceOperateBtnStatus } from '@12333/constants'; - -type UseResourceActionsOptions = { - onStopSuccess?: () => any; - onDeleteSuccess?: () => any; -}; - -export function useResourceActions(options: UseResourceActionsOptions = {}) { - const { onStopSuccess, onDeleteSuccess } = options; - - function handleEdit(item: API.GetFrontResourceList) { - Taro.navigateTo({ - url: `${RouterPath.publishResource}?id=${item.id}&resourceOperateBtnStatus=${ResourceOperateBtnStatus.Edit}`, - }); - } - - function handleGoDetail(item: API.GetFrontResourceList) { - Taro.navigateTo({ - url: `${RouterPath.resourceDetail}?id=${item.id}`, - }); - } - - async function handleStop(item: API.GetFrontResourceList) { - try { - await Message.confirm({ - message: '纭鍋滄鍙戝竷璇ヨ祫婧愬悧锛�', - }); - const res = await resourceServices.setResourceStatus({ - id: item.id, - status: ResourceStatus.OffShelf, - }); - if (res) { - Message.success('宸插仠姝㈠彂甯�'); - onStopSuccess?.(); - } - } catch (error) {} - } - - function handleRePublish(item: API.GetFrontResourceList) { - handleEdit(item); - } - - async function handleCopy(item: API.GetFrontResourceList) { - Taro.navigateTo({ - url: `${RouterPath.publishResource}?id=${item.id}&resourceOperateBtnStatus=${ResourceOperateBtnStatus.Copy}`, - }); - } - - async function handleDelete(row: API.GetFrontResourceList) { - try { - await Message.confirm(); - const res = await resourceServices.deleteResource({ - id: row.id, - }); - if (res) { - onDeleteSuccess?.(); - Message.success('鎿嶄綔鎴愬姛'); - } - } catch (error) {} - } - - return { - handleEdit, - handleGoDetail, - handleStop, - handleRePublish, - handleCopy, - handleDelete, - }; -} diff --git a/apps/cMiniApp/src/hooks/useCategory.ts b/apps/cMiniApp/src/hooks/useCategory.ts deleted file mode 100644 index 484fa81..0000000 --- a/apps/cMiniApp/src/hooks/useCategory.ts +++ /dev/null @@ -1,204 +0,0 @@ -import * as settingServices from '@12333/services/api/Setting'; -import * as userServices from '@12333/services/api/User'; -import { useQuery, useQueryClient } from '@tanstack/vue-query'; -import { CategoryUtils } from '@12333/utils'; -import { IndustryCategoryType, TagType } from '@12333/constants'; - -export type UseTagMenuOptions = { - type: TagType; -}; - -export function useTagMenu({ type }: UseTagMenuOptions) { - const { data } = useQuery({ - queryKey: ['settingServices/getTagMenu', { type }], - queryFn: async () => { - return await settingServices.getTagMenu( - { - type: type, - }, - { showLoading: false } - ); - }, - initialData: () => [] as API.CategoryMenu[], - }); - - const tagMenuListForMenuOptions = computed(() => - data.value.map((x) => ({ - text: x.name, - value: x.id, - })) - ); - - return { - tagMenuList: data, - tagMenuListForMenuOptions, - }; -} - -export function useTags({ type }: UseTagMenuOptions) { - const { data } = useQuery({ - queryKey: ['settingServices/getTags', { type }], - queryFn: async () => { - return await settingServices.getTags( - { - type: type, - }, - { showLoading: false } - ); - }, - initialData: () => [] as API.TagDto[], - }); - - const tagList = computed(() => { - return data.value - .filter((x) => x.isVisable) - .map((x) => ({ - text: x.name, - value: x.id, - })); - }); - - return { - tagList: tagList, - }; -} - -type UseCategoryMenuOptions = { - onSuccess?: (data: API.CategoryMenu[]) => void; - type: number; -}; - -export function useCategoryMenu(options: UseCategoryMenuOptions) { - const { onSuccess, type } = options; - const { - data: categoryMenuList, - isLoading, - refetch, - } = useQuery({ - queryKey: ['logout/refresh', 'settingServices/getCategoryMenu', { catotryType: type }], - queryFn: async () => { - return await settingServices.getCategoryMenu({ catotryType: type }, { showLoading: false }); - }, - placeholderData: () => [] as API.CategoryMenu[], - onSuccess: (data) => { - onSuccess?.(data); - }, - staleTime: 1000 * 60 * 30, - }); - - const queryClient = useQueryClient(); - - async function ensureCategoryMenu() { - return await queryClient.ensureQueryData({ - queryKey: ['logout/refresh', 'settingServices/getCategoryMenu', { catotryType: type }], - }); - } - - const iHasParkCategory = computed(() => - categoryMenuList.value.find((x) => CategoryUtils.isIHasPark(x.name)) - ); - - return { - categoryMenuList, - ensureCategoryMenu, - iHasParkCategory, - isLoading, - categoryMenuRefetch: refetch, - }; -} - -export function useInformationCategoryMenu() { - const { categoryMenuList: informationCategoryList, ensureCategoryMenu } = useCategoryMenu({ - type: IndustryCategoryType.IndustryInformation, - }); - - /** - * 鏄惁鏄汉鍗氫細鎴栨嫑鑱樹細 - */ - function isZPOrRB(categoryId: string) { - const category = informationCategoryList.value.find((x) => x.id === categoryId); - return CategoryUtils.isZPOrRBByName(category?.name); - } - - /** - * 琛屼笟鏂伴椈/琛屼笟鍔ㄦ�� - */ - function isNewsOrTrends(categoryId: string) { - const category = informationCategoryList.value.find((x) => x.id === categoryId); - return CategoryUtils.isNewsOrTrendsByName(category?.name); - } - /** - * 鏄惁鏄汉鍗氫細鎴栨嫑鑱樹細 琛屼笟鏂伴椈/琛屼笟鍔ㄦ�� - */ - function isZPOrRBOrNewsOrTrends(categoryId: string) { - const category = informationCategoryList.value.find((x) => x.id === categoryId); - return CategoryUtils.isZPOrRBOrNewsOrTrendsByName(category?.name); - } - - const InformationCategoryRecommendId = 'recommend'; - - const informationCategoryListWithRecommend = computed(() => [ - { - name: '鎺ㄨ崘', - id: InformationCategoryRecommendId, - } as API.CategoryMenu, - ...informationCategoryList.value, - ]); - - return { - informationCategoryList, - informationCategoryListWithRecommend, - ensureCategoryMenu, - isZPOrRB, - isNewsOrTrends, - isZPOrRBOrNewsOrTrends, - InformationCategoryRecommendId, - }; -} - -type UseCategoryListOptions = { - onSuccess?: (data: API.CategoryMenu[]) => void; -}; - -export function useParkOrHRCategoryList(options: UseCategoryListOptions = {}) { - const { onSuccess } = options; - const { categoryMenuList: parkOrHRCategoryList, ensureCategoryMenu } = useCategoryMenu({ - type: IndustryCategoryType.IndustryServices, - onSuccess, - }); - - const orderCategory = computed(() => - parkOrHRCategoryList.value.find((x) => CategoryUtils.isIHasOrder(x.name)) - ); - - const resourceCategory = computed(() => - parkOrHRCategoryList.value.find((x) => CategoryUtils.isIHasResource(x.name)) - ); - - const iHasParkCategory = computed(() => - parkOrHRCategoryList.value.find((x) => CategoryUtils.isIHasPark(x.name)) - ); - - const isSocialSecurityAgency = computed(() => - parkOrHRCategoryList.value.find((x) => CategoryUtils.isSocialSecurityAgency(x.name)) - ); - - const hrCompanyCategory = computed(() => - parkOrHRCategoryList.value.find((x) => CategoryUtils.isHumanResource(x.name)) - ); - - const humanResourceCategory = computed(() => - parkOrHRCategoryList.value.find((x) => CategoryUtils.isHumanResourceByName(x.name)) - ); - - return { - parkOrHRCategoryList, - orderCategory, - resourceCategory, - iHasParkCategory, - isSocialSecurityAgency, - hrCompanyCategory, - humanResourceCategory, - ensureCategoryMenu, - }; -} diff --git a/apps/cMiniApp/src/hooks/user.ts b/apps/cMiniApp/src/hooks/user.ts index cb81e5e..f104353 100644 --- a/apps/cMiniApp/src/hooks/user.ts +++ b/apps/cMiniApp/src/hooks/user.ts @@ -1,11 +1,7 @@ import { useUserStore } from '@/stores/modules/user'; import Taro from '@tarojs/taro'; import { object2query, LocationUtils } from '@12333/utils'; -import { - ParkOrHRStatus, - UserCertificationFrontStatus, - MatchMakingIdentityEnum, -} from '@12333/constants'; +import { ParkOrHRStatus, UserCertificationFrontStatus } from '@12333/constants'; import * as userServices from '@12333/services/api/User'; import { useQuery } from '@tanstack/vue-query'; import { MaybeRef } from 'vue'; @@ -14,8 +10,7 @@ export function useUser() { const userStore = useUserStore(); - const { userDetail, userInfo, matchMakingIdentity, isSetMatchMakingIdentity, locationCity } = - storeToRefs(userStore); + const { userDetail, userInfo, locationCity } = storeToRefs(userStore); function updateUserInfo() { return userStore.getCurrentUserInfo(); @@ -47,8 +42,6 @@ isCompletePersonalInfo, isCompanyAudited, isCertified, - matchMakingIdentity, - isSetMatchMakingIdentity, locationCity, }; } @@ -111,77 +104,4 @@ return { goLoginFn, }; -} - -type UseUserTotalInfoOptions = { - userId: MaybeRef<string>; - enabled?: MaybeRef<boolean>; -}; - -export function useUserTotalInfo({ userId, enabled = true }: UseUserTotalInfoOptions) { - const { data, refetch } = useQuery({ - queryKey: ['userServices/getUserTotalInfo', userId], - queryFn: async () => { - return await userServices.getUserTotalInfo( - { - userId: unref(userId), - }, - { showLoading: false } - ); - }, - placeholderData: () => ({} as API.GetUserTotalInfoOutput), - enabled: computed(() => unref(enabled) && !!unref(userId)), - }); - - useRefeshDidShow({ queryKey: ['userServices/getUserTotalInfo', userId] }); - - return { - userTotalInfo: data, - refetch, - }; -} - -export function useUserSimpleInfo({ userId }: UseUserTotalInfoOptions) { - const { data, refetch } = useQuery({ - queryKey: ['userServices/getUserSimpleInfo', userId], - queryFn: async () => { - return await userServices.getUserSimpleInfo( - { - userId: unref(userId), - }, - { showLoading: false } - ); - }, - placeholderData: () => ({} as API.UserSimpleInfo), - enabled: computed(() => !!unref(userId)), - }); - - return { - userSimpleInfo: data, - }; -} - -type UseToggleMatchMakingIdentityOnLaunchOptions = { - matchMakingIdentity: MatchMakingIdentityEnum; -}; - -export function useToggleMatchMakingIdentityOnLaunch({ - matchMakingIdentity, -}: UseToggleMatchMakingIdentityOnLaunchOptions) { - const launchOptions = Taro.getEnterOptionsSync(); - console.log('launchOptions: ', launchOptions); - - const userStore = useUserStore(); - const { userDetail } = useUser(); - - onMounted(async () => { - try { - if (launchOptions.scene === 1037) { - await userStore.setMatchMakingIdentity({ - matchMakingIdentity: matchMakingIdentity, - userId: userDetail.value?.userId, - }); - } - } catch (error) {} - }); } diff --git a/apps/cMiniApp/src/pages/home/FrontOrderList.vue b/apps/cMiniApp/src/pages/home/FrontOrderList.vue deleted file mode 100644 index a7e388c..0000000 --- a/apps/cMiniApp/src/pages/home/FrontOrderList.vue +++ /dev/null @@ -1,113 +0,0 @@ -<template> - <InfiniteLoading - scrollViewClassName="common-page-infinite-scroll-list" - v-bind="infiniteLoadingProps" - > - <template #renderItem="{ item }"> - <OrderCard - :title="item.orderName" - :hireType="item.hireType" - :hireNumber="item.hireNumber" - :hireEndNumber="item.hireEndNumber" - :ageStart="item.ageStart" - :ageEnd="item.ageEnd" - :provinceName="item.provinceName" - :cityName="item.cityName" - :orderSupplierRefundInfo="item.orderSupplierRefundInfo" - :src="item.avatarUrl" - :name="item.contact" - :jobTitle="item.jobTitle" - :time="item.lastShelfTime" - :integratedSalary="item.integratedSalary" - :userId="item.userId" - @click="handleClick(item)" - > - </OrderCard> - </template> - </InfiniteLoading> - <FloatButton :icon="IconAdd" text="鎴戣渚涗汉" @click="goPublish" /> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading, useEvent } from '@12333/hooks'; -import * as orderServices from '@12333/services/api/Order'; -import { OrderInputType, IndustryCategoryType, ResourceOperateBtnStatus } from '@12333/constants'; -import { useAccessPersonalInfo, useCategoryMenu } from '@/hooks'; -import { CategoryUtils } from '@12333/utils'; -import IconAdd from '@/assets/order/icon-publish.png'; -import Taro from '@tarojs/taro'; - -const queryState = reactive({ - categoryId: '', -}); - -const { - ensureCategoryMenu, - categoryMenuList: industryServicesCategoryList, - categoryMenuRefetch, -} = useCategoryMenu({ - type: IndustryCategoryType.IndustryServices, -}); - -onMounted(async () => { - await ensureCategoryMenu(); - queryState.categoryId = industryServicesCategoryList.value.find((x) => - CategoryUtils.isIHasOrder(x.name) - ).id; -}); - -useEvent('logout/refresh', async function (data) { - try { - await categoryMenuRefetch(); - queryState.categoryId = industryServicesCategoryList.value.find((x) => - CategoryUtils.isIHasOrder(x.name) - ).id; - infiniteLoadingProps.value.refetch(); - } catch (error) {} -}); - -const { infiniteLoadingProps } = useInfiniteLoading( - ({ pageParam }) => { - let params: API.FrontOrderListInput = { - pageModel: { - rows: 20, - page: pageParam, - orderInput: [ - { property: 'isRecommend', order: OrderInputType.Desc }, - { property: 'lastShelfTime', order: OrderInputType.Desc }, - ], - }, - categoryId: queryState.categoryId, - }; - - return orderServices.getFrontOrderList(params, { - showLoading: false, - }); - }, - { - queryKey: ['logout/refresh', 'orderServices/getFrontOrderList', queryState], - enabled: computed(() => !!queryState.categoryId), - } -); - -function handleClick(item: API.FrontOrderList) { - Taro.navigateTo({ - url: `${RouterPath.orderDetail}?id=${item.id}`, - }); -} - -const goPublish = useAccessPersonalInfo(() => { - Taro.navigateTo({ - url: `${RouterPath.publishResource}?resourceOperateBtnStatus=${ResourceOperateBtnStatus.Add}`, - }); -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.order-page-list { - @include listScrollView; - @include infiniteLoadingInTabBarPage; -} -</style> diff --git a/apps/cMiniApp/src/pages/home/FrontResourceList.vue b/apps/cMiniApp/src/pages/home/FrontResourceList.vue deleted file mode 100644 index cea0375..0000000 --- a/apps/cMiniApp/src/pages/home/FrontResourceList.vue +++ /dev/null @@ -1,105 +0,0 @@ -<template> - <InfiniteLoading - scrollViewClassName="common-page-infinite-scroll-list" - v-bind="infiniteLoadingProps" - > - <template #renderItem="{ item }"> - <ResourceCard - :title="item.title" - :src="item.avatarUrl" - :name="item.contact" - :jobTitle="item.jobTitle" - :time="item.lastShelfTime" - :resourceCount="item.resourceCount" - :intendedDeliveryCities="item.intendedDeliveryCities" - :userId="item.userId" - @click="handleClick(item)" - > - </ResourceCard> - </template> - </InfiniteLoading> - <FloatButton text="鎴戞湁璁㈠崟" @click="goPublish" /> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading, useEvent } from '@12333/hooks'; -import * as resourceServices from '@12333/services/api/Resource'; -import { OrderInputType, IndustryCategoryType, OrderOperateBtnStatus } from '@12333/constants'; -import { useAccessPersonalInfo, useCategoryMenu } from '@/hooks'; -import { CategoryUtils } from '@12333/utils'; -import Taro from '@tarojs/taro'; - -const queryState = reactive({ - categoryId: '', -}); - -const { - ensureCategoryMenu, - categoryMenuList: industryServicesCategoryList, - categoryMenuRefetch, -} = useCategoryMenu({ - type: IndustryCategoryType.IndustryServices, -}); - -onMounted(async () => { - await ensureCategoryMenu(); - queryState.categoryId = industryServicesCategoryList.value.find((x) => - CategoryUtils.isIHasResource(x.name) - ).id; -}); - -useEvent('logout/refresh', async function (data) { - try { - console.log('resource'); - await categoryMenuRefetch(); - queryState.categoryId = industryServicesCategoryList.value.find((x) => - CategoryUtils.isIHasResource(x.name) - ).id; - infiniteLoadingProps.value.refetch(); - } catch (error) {} -}); - -const { infiniteLoadingProps } = useInfiniteLoading( - ({ pageParam }) => { - let params: API.GetFrontResourceListInput = { - pageModel: { - rows: 20, - page: pageParam, - orderInput: [ - { property: 'isRecommend', order: OrderInputType.Desc }, - { property: 'lastShelfTime', order: OrderInputType.Desc }, - ], - }, - }; - - return resourceServices.getFrontResourceList(params, { - showLoading: false, - }); - }, - { - queryKey: ['logout/refresh', 'resourceServices/getFrontResourceList', queryState], - enabled: computed(() => !!queryState.categoryId), - } -); - -function handleClick(item: API.GetFrontResourceList) { - Taro.navigateTo({ - url: `${RouterPath.resourceDetail}?id=${item.id}`, - }); -} - -const goPublish = useAccessPersonalInfo(() => { - Taro.navigateTo({ - url: `${RouterPath.publishOrder}?orderOperateBtnStatus=${OrderOperateBtnStatus.Add}`, - }); -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.resource-page-list { - @include listScrollView; - @include infiniteLoadingInTabBarPage; -} -</style> diff --git a/apps/cMiniApp/src/pages/home/index.vue b/apps/cMiniApp/src/pages/home/index.vue index 18dcab0..e3d38b0 100644 --- a/apps/cMiniApp/src/pages/home/index.vue +++ b/apps/cMiniApp/src/pages/home/index.vue @@ -1,31 +1,22 @@ <template> - <PageLayoutWithBg - class="index-page-wrapper" - :title="MatchMakingIdentityEnumTitle[matchMakingIdentity]" - :need-auth="false" - > + <PageLayoutWithBg class="index-page-wrapper" :title="'棣栭〉'" :need-auth="false"> <template #left> <div class="menu-btn-wrapper city-btn" @click="goCitySelect"> <div class="city-btn-text">{{ locationCity }}</div> <RectDown :size="12" /> </div> </template> - <FrontOrderList v-if="matchMakingIdentity === MatchMakingIdentityEnum.Contributors" /> - <FrontResourceList v-else-if="matchMakingIdentity === MatchMakingIdentityEnum.Employing" /> </PageLayoutWithBg> </template> <script setup lang="ts"> -import FrontOrderList from './FrontOrderList.vue'; -import FrontResourceList from './FrontResourceList.vue'; import { useUser } from '@/hooks'; -import { MatchMakingIdentityEnum, MatchMakingIdentityEnumTitle } from '@12333/constants'; import { useUserStore } from '@/stores/modules/user'; import { RectDown } from '@nutui/icons-vue-taro'; import Taro from '@tarojs/taro'; import { LocationUtils } from '@12333/utils'; -const { matchMakingIdentity, isSetMatchMakingIdentity, locationCity } = useUser(); +const { locationCity } = useUser(); const userStore = useUserStore(); diff --git a/apps/cMiniApp/src/pages/mine/index.vue b/apps/cMiniApp/src/pages/mine/index.vue index 71e469c..6c2bc79 100644 --- a/apps/cMiniApp/src/pages/mine/index.vue +++ b/apps/cMiniApp/src/pages/mine/index.vue @@ -33,33 +33,8 @@ <ContentScrollView v-if="isLogin" class="mine-content-scroll-view"> <div class="mine-id-menu-wrapper"> <img :src="IconLamp" class="mine-id-menu-icon" /> - <div class="mine-id-menu-text"> - 鎮ㄥ綋鍓嶇殑韬唤涓簕{ MatchMakingIdentityEnumText[matchMakingIdentity] }} - </div> - <div class="mine-id-menu-btn" @click="goPage(RouterPath.toggleMatchMakingIdentity)"> - 鍒囨崲韬唤 - </div> - </div> - <div class="mine-menu-list"> - <div class="mine-menu-list-item" @click="goBusinessManagement"> - <img :src="IconMenuBusiness" class="mine-menu-list-item-icon" /> - <div class="mine-menu-list-item-text">涓氬姟绠$悊</div> - </div> - <div class="mine-menu-list-item" @click="goTradeChatRecord"> - <img :src="IconMenuContact" class="mine-menu-list-item-icon" /> - <div class="mine-menu-list-item-text">鑱旂郴璁板綍</div> - </div> </div> <List class="mine-setting-list"> - <ListItem :icon="IconMessage" title="娑堟伅" @click="goMessage"> - <template #extra> - <nut-badge - :value="myMessageCount.unReadCount ?? 0" - class="mine-setting-badge" - :hidden="!myMessageCount.unReadCount" - ></nut-badge> - </template> - </ListItem> <ListItem :icon="IconSetting" title="璁剧疆" @click="goSetting"></ListItem> </List> </ContentScrollView> @@ -79,14 +54,13 @@ import IconMenuContact from '@/assets/mine/icon-menu-contact.png'; import IconSetting from '@/assets/mine/icon-setting.png'; import IconMessage from '@/assets/mine/icon-message.png'; -import { useUser, useIsLogin, useGoLogin, useMyMessageCount } from '@/hooks'; +import { useUser, useIsLogin, useGoLogin } from '@/hooks'; import Taro from '@tarojs/taro'; import { RouterPath, OssAssets } from '@/constants'; -import { MatchMakingIdentityEnumText, MatchMakingIdentityEnum } from '@12333/constants'; import { List, ListItem } from '@12333/components'; import { useSystemStore } from '@/stores/modules/system'; -const { userDetail, isCertified, matchMakingIdentity } = useUser(); +const { userDetail, isCertified } = useUser(); const isLogin = useIsLogin(); const systemStore = useSystemStore(); @@ -106,19 +80,7 @@ } function goSetting() { - goPage(RouterPath.setting); -} - -function goMessage() { - goPage(RouterPath.messageList); -} - -function goBusinessManagement() { - if (matchMakingIdentity.value === MatchMakingIdentityEnum.Employing) { - goPage(RouterPath.orderManage); - } else if (matchMakingIdentity.value === MatchMakingIdentityEnum.Contributors) { - goPage(RouterPath.resourceManage); - } + // goPage(RouterPath.setting); } Taro.showShareMenu({ @@ -128,19 +90,13 @@ Taro.useShareAppMessage((res) => { return { title: `${userDetail.value?.contacter}鍚嶇墖`, - path: `${RouterPath.userHomePage}?userId=${userDetail.value?.userId}`, + // path: `${RouterPath.userHomePage}?userId=${userDetail.value?.userId}`, imageUrl: userDetail.value?.avatarUrl, }; }); -const { myMessageCount } = useMyMessageCount(); - function goAuthentication() { goPage(RouterPath.authenticationHome); -} - -function goTradeChatRecord() { - goPage(RouterPath.tradeChatRecord); } </script> diff --git a/apps/cMiniApp/src/stores/modules/user.ts b/apps/cMiniApp/src/stores/modules/user.ts index 43f3e84..7e52ace 100644 --- a/apps/cMiniApp/src/stores/modules/user.ts +++ b/apps/cMiniApp/src/stores/modules/user.ts @@ -26,7 +26,7 @@ LocationUtils, } from '@12333/utils'; import DefaultAvatar from '@/assets/components/icon-default-avatar.png'; -import { MatchMakingIdentityEnum, WxMiniAppEnum } from '@12333/constants'; +import { WxMiniAppEnum } from '@12333/constants'; import { myClient } from '@/constants/query'; import { globalEventEmitter } from '@12333/hooks'; @@ -36,9 +36,6 @@ refreshToken?: Nullable<string>; userDetail?: Nullable<API.UserInfoV2>; firstGetUserDetail?: boolean; - matchMakingIdentity?: MatchMakingIdentityEnum; - /**鏄惁鏈夎缃繃韬唤 */ - isSetMatchMakingIdentity?: boolean; locationCity?: string; locationProvince?: string; @@ -61,18 +58,6 @@ } ); -function initMatchMakingIdentity(userDetail: API.UserInfoV2): MatchMakingIdentityEnum { - if (!userDetail) { - const cacheMatchMakingIdentity = getMatchMakingIdentity(); - return cacheMatchMakingIdentity - ? cacheMatchMakingIdentity - : MatchMakingIdentityEnum.Contributors; - } else if (!userDetail?.matchMakingIdentity) { - return MatchMakingIdentityEnum.Contributors; - } - return userDetail?.matchMakingIdentity; -} - export const useUserStore = defineStore({ id: 'app-user', state: (): UserState => { @@ -89,10 +74,6 @@ refreshToken: userInfo?.refreshToken ?? '', userDetail: userDetail, firstGetUserDetail: true, - matchMakingIdentity: initMatchMakingIdentity(userDetail), - isSetMatchMakingIdentity: userDetail - ? !!userDetail.matchMakingIdentity || !!getMatchMakingIdentity() - : !!getMatchMakingIdentity(), locationCity: storageLocation?.city ?? '鍖椾含甯�', locationProvince: storageLocation?.province ?? '鍖椾含', firstSetLocation: true, @@ -227,8 +208,6 @@ res.avatarUrl = res.avatarUrl ? setOSSLink(res.avatarUrl) : DefaultAvatar; this.setUserDetail(res); this.firstGetUserDetail = false; - this.matchMakingIdentity = initMatchMakingIdentity(res); - this.isSetMatchMakingIdentity = true; } } catch (error) {} }, @@ -303,25 +282,6 @@ return res; } else { throw new Error('鍒锋柊token澶辫触'); - } - } catch (error) { - throw new Error('error'); - } - }, - - async setMatchMakingIdentity(params: API.SetMatchMakingIdentityInput) { - try { - let res = 1; - if (this.userDetail) { - res = await userServices.setMatchMakingIdentity(params); - } - if (res) { - if (!this.userDetail) { - setMatchMakingIdentity(params.matchMakingIdentity); - } - this.matchMakingIdentity = params.matchMakingIdentity; - this.isSetMatchMakingIdentity = true; - return res; } } catch (error) { throw new Error('error'); diff --git a/apps/cMiniApp/src/subpackages/friendCircle/components/FriendMessage/FriendMessage.vue b/apps/cMiniApp/src/subpackages/friendCircle/components/FriendMessage/FriendMessage.vue deleted file mode 100644 index fe983b2..0000000 --- a/apps/cMiniApp/src/subpackages/friendCircle/components/FriendMessage/FriendMessage.vue +++ /dev/null @@ -1,50 +0,0 @@ -<template> - <InnerFriendMessage - :current-use-id="userDetail?.userId" - :useAccessPersonalInfo="useAccessPersonalInfo" - @go-user-home-page="goUserHomePage" - @click="handleClick" - v-bind="props" - ></InnerFriendMessage> -</template> - -<script setup lang="ts"> -import { useUser, useAccessPersonalInfo } from '@/hooks'; -import { FriendMessage as InnerFriendMessage } from '@12333/components'; -import { ListActionsType } from '@12333/hooks'; -import { CircleFriendRelationalTypeEnum } from '@12333/constants'; -import Taro from '@tarojs/taro'; - -defineOptions({ - name: 'FriendMessage', -}); - -type Props = { - data: API.CircleFriendDto; - groupIndex?: number; - itemIndex?: number; - listActions?: ListActionsType; -}; - -const props = withDefaults(defineProps<Props>(), {}); - -const { userDetail } = useUser(); - -const goUserHomePage = (userId: string) => { - Taro.navigateTo({ - url: `${RouterPath.userHomePage}?userId=${userId}`, - }); -}; - -function handleClick() { - if (props.data.relationalType == CircleFriendRelationalTypeEnum.Order) { - Taro.navigateTo({ - url: `${RouterPath.orderDetail}?id=${props.data.relationalId}`, - }); - } else if (props.data.relationalType == CircleFriendRelationalTypeEnum.Resource) { - Taro.navigateTo({ - url: `${RouterPath.resourceDetail}?id=${props.data.relationalId}`, - }); - } -} -</script> diff --git a/apps/cMiniApp/src/subpackages/friendCircle/components/FriendView/FriendView.vue b/apps/cMiniApp/src/subpackages/friendCircle/components/FriendView/FriendView.vue deleted file mode 100644 index 08154e7..0000000 --- a/apps/cMiniApp/src/subpackages/friendCircle/components/FriendView/FriendView.vue +++ /dev/null @@ -1,69 +0,0 @@ -<template> - <InfiniteLoading - scrollViewClassName="friend-circle-list" - v-bind="infiniteLoadingProps" - ref="infiniteLoadingRef" - noMoreText="鎴戞槸鏈夊簳绾跨殑" - > - <template #renderItem="{ item, groupIndex, itemIndex }"> - <FriendMessage - :key="item.id" - :groupIndex="groupIndex" - :itemIndex="itemIndex" - :data="item" - :listActions="listActions" - ></FriendMessage> - </template> - </InfiniteLoading> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading } from '@12333/hooks'; -import { InfiniteLoading, FloatButton } from '@/components'; -import * as circleFriendServices from '@12333/services/api/CircleFriend'; -import { OrderInputType } from '@12333/constants'; -import Taro from '@tarojs/taro'; -import FriendMessage from '../FriendMessage/FriendMessage.vue'; - -defineOptions({ - name: 'FriendView', -}); - -type Props = { - showPublishButton?: boolean; - userId?: string; -}; - -const props = withDefaults(defineProps<Props>(), { - userId: '', -}); - -const friendSwitch = true; - -const { infiniteLoadingProps, infiniteLoadingRef, listActions } = useInfiniteLoading( - ({ pageParam }) => { - let params: API.GetCircleFriendListInput = { - pageModel: { - rows: 20, - page: pageParam, - orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], - }, - userId: props.userId, - }; - - return circleFriendServices.getCircleFriendList(params, { showLoading: false }); - }, - { - queryKey: ['circleFriendServices/getCircleFriendList', { userId: props.userId }], - } -); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.friend-circle-list { - @include listScrollViewWithNoPadding; - @include infiniteLoadingInTabBarPage; -} -</style> diff --git a/apps/cMiniApp/src/subpackages/message/chatRoom/InnerPage.vue b/apps/cMiniApp/src/subpackages/message/chatRoom/InnerPage.vue deleted file mode 100644 index 53fda0e..0000000 --- a/apps/cMiniApp/src/subpackages/message/chatRoom/InnerPage.vue +++ /dev/null @@ -1,249 +0,0 @@ -<template> - <InfiniteLoading - scrollViewClassName="common-infinite-scroll-list chat-message-list" - v-bind="infiniteLoadingProps" - :listData="listData" - :showMoreText="false" - :enabledLoadingMore="false" - :refresherEnabled="false" - ref="infiniteLoadingRef" - > - <template #extra v-if="infiniteLoadingProps.hasMore"> - <div v-if="infiniteLoadingProps.isFetching" class="infiniting-tips"> - <Loading class="infiniting-tips-icon"></Loading>鏁版嵁鍔犺浇涓�... - </div> - <p v-else class="infiniting-tips" @click="getHistoryMessageList()">鏌ョ湅鏇村</p> - </template> - <template #renderItem="{ item, index }"> - <div class="chat-message-item-wrapper" :key="item.id"> - <MessageTimestamp - :currTime="dayjs(item.creationTime).toDate().getTime() / 1000" - :prevTime="getPrevTime(item)" - class="chat-message-item-timestamp" - ></MessageTimestamp> - <div :class="['chat-message-item', { self: item.sourceId === userDetail?.userId }]"> - <Avatar - :size="30" - class="chat-message-item-avatar" - :src="item.avatarUrl ? setOSSLink(item.avatarUrl) : ''" - /> - <div class="chat-message-item-content"> - {{ item.messageContent }} - </div> - </div> - </div> - </template> - </InfiniteLoading> - <div class="chat-input-wrapper"> - <nut-input v-model.trim="inputValue" class="chat-input" cursor-spacing="20" /> - <nut-button class="chat-submit-btn" shape="square" type="primary" @click="sendMessage" - >鍙戦��</nut-button - > - </div> -</template> - -<script setup lang="ts"> -import { Avatar } from '@12333/components'; -import { useUser } from '@/hooks'; -import { useInfiniteLoading, useSetMessageIsRead } from '@12333/hooks'; -import * as messageServices from '@12333/services/api/Message'; -import { OrderInputType, MessageBusinessTypeEnum } from '@12333/constants'; -import Taro from '@tarojs/taro'; -import dayjs from 'dayjs'; -import { Message, setOSSLink } from '@12333/utils'; -import { useQueryClient } from '@tanstack/vue-query'; -import { Loading } from '@nutui/icons-vue-taro'; - -defineOptions({ - name: 'InnerPage', -}); - -// type Props = {}; - -// const props = withDefaults(defineProps<Props>(), {}); - -const { userDetail } = useUser(); - -const { setAllMessageIsRead } = useSetMessageIsRead(); - -const router = Taro.useRouter(); - -const chatId = router.params?.chatId ?? ''; - -const isLoadMessage = ref(false); - -const { infiniteLoadingProps, flattenListData, infiniteLoadingRef, invalidateQueries } = - useInfiniteLoading( - ({ pageParam }) => { - let params: API.QueryMyMessageInput = { - pageModel: { - rows: 10, - page: pageParam, - orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], - }, - sourceId: chatId, - }; - - return messageServices.getMyChatMessagePage(params, { - showLoading: false, - }); - }, - { - queryKey: ['messageServices/getMyChatMessagePage'], - enabled: !!chatId, - onSuccess(data) { - setAllMessageIsRead({ - businessType: MessageBusinessTypeEnum.鑱婂ぉ娑堟伅, - sourceId: chatId, - }); - }, - } - ); - -const listData = computed(() => { - if (!infiniteLoadingProps.value.listData) return {} as any; - return { - ...infiniteLoadingProps.value.listData, - pages: [...(infiniteLoadingProps.value.listData?.pages ?? [])].reverse().map((page) => { - return { - ...page, - data: [...page.data].reverse(), - }; - }), - }; -}); - -watch(flattenListData, () => { - if (!isLoadMessage.value) { - nextTick(() => { - infiniteLoadingRef.value?.scrollToBottom?.(3000); - }); - } - isLoadMessage.value = false; -}); - -const getHistoryMessageList = () => { - isLoadMessage.value = true; - infiniteLoadingProps.value.fetchNextPage(); -}; - -const _flattenListData = computed(() => { - let list: API.UserMessageInfo[] = []; - if (listData && listData.value) { - listData.value?.pages.forEach((group) => { - group.data.forEach((item) => { - list.push(item); - }); - }); - } - return list; -}); - -function getPrevTime(item: API.UserMessageInfo) { - const index = _flattenListData.value.findIndex((_item) => _item.id === item.id); - const prevTime = index > 0 ? _flattenListData.value[index - 1].creationTime : 0; - return prevTime === 0 ? 0 : dayjs(prevTime).toDate().getTime() / 1000; -} - -const inputValue = ref(''); - -const queryClient = useQueryClient(); - -async function sendMessage() { - try { - if (!inputValue.value) { - Message.error('璇疯緭鍏ュ唴瀹�'); - } else { - let params: API.UserTextChatMessageInput = { - toId: chatId, - messageContent: inputValue.value, - }; - let res = await messageServices.sendUserMessage(params); - if (res) { - inputValue.value = ''; - await invalidateQueries(); - } - } - } catch (error) { - console.log('error: ', error); - } -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.chat-message-list { - padding-top: 24px; - - .message-more { - text-align: center; - font-size: 24px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 32px; - margin-bottom: 20px; - } -} - -.chat-message-item-wrapper { - .chat-message-item-timestamp { - padding-bottom: 48px; - } - - .chat-message-item { - display: flex; - margin-bottom: 40px; - - .chat-message-item-avatar { - margin-right: 16px; - } - - .chat-message-item-content { - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 40px; - background: #eaeaea; - border-radius: 20px 20px 20px 0px; - padding: 20px 16px; - } - - &.self { - flex-direction: row-reverse; - - .chat-message-item-avatar { - margin-right: 0; - margin-left: 16px; - } - - .chat-message-item-content { - background: boleGetCssVar('color', 'primary'); - border-radius: 20px 20px 0px 20px; - color: #fff; - } - } - } -} - -.chat-input-wrapper { - padding: 32px boleGetCssVar('size', 'body-padding-h'); - background-color: #fff; - display: flex; - - .chat-input { - border-bottom: none; - border: 2px solid #dbdbdb; - flex: 1; - min-width: 0; - padding: 18px; - border-radius: 8px; - } - - .chat-submit-btn { - border-radius: 8px; - margin-left: 16px; - height: 80px; - /* --nut-button-default-padding: 48px; */ - } -} -</style> diff --git a/apps/cMiniApp/src/subpackages/message/chatRoom/chatRoom.config.ts b/apps/cMiniApp/src/subpackages/message/chatRoom/chatRoom.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/message/chatRoom/chatRoom.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/message/chatRoom/chatRoom.vue b/apps/cMiniApp/src/subpackages/message/chatRoom/chatRoom.vue deleted file mode 100644 index 40c0f92..0000000 --- a/apps/cMiniApp/src/subpackages/message/chatRoom/chatRoom.vue +++ /dev/null @@ -1,24 +0,0 @@ -<template> - <PageLayout title="娑堟伅璇︽儏" class="chatRoom-page-wrapper"> - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; - -defineOptions({ - name: 'chatRoom', -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.chatRoom-page-wrapper { - .safe-area-bottom { - background-color: #fff; - } -} -</style> diff --git a/apps/cMiniApp/src/subpackages/message/messageList/InnerPage.vue b/apps/cMiniApp/src/subpackages/message/messageList/InnerPage.vue deleted file mode 100644 index fd00b36..0000000 --- a/apps/cMiniApp/src/subpackages/message/messageList/InnerPage.vue +++ /dev/null @@ -1,150 +0,0 @@ -<template> - <InfiniteLoading - scrollViewClassName="common-infinite-scroll-list-no-padding" - v-bind="infiniteLoadingProps" - :custom-no-data="!myBaseChatList?.length && !flattenListData?.length" - :refetch="handleRefetch" - > - <template #extra> - <MessageCard - v-for="item in myBaseChatList" - :key="item.chatId" - @click="handleClick(item)" - :avatarUrl="MessageChatTypeAvatarMap[item.chatType]" - :latestMessageCreationTime="item.latestMessage?.creationTime" - :latestMessageContent="item.latestMessage?.messageContent" - :contact="item.contact" - :chatType="item.chatType" - :badge="item.unReadCount" - ></MessageCard> - </template> - <template #renderItem="{ item }"> - <MessageCard - :key="item.chatId" - @click="handleClick(item)" - :avatarUrl="item.avatarUrl ? setOSSLink(item.avatarUrl) : ''" - :latestMessageCreationTime="item.latestMessage?.creationTime" - :latestMessageContent="item.latestMessage?.messageContent" - :contact="item.contact" - :chatType="item.chatType" - :badge="item.unReadCount" - ></MessageCard> - </template> - </InfiniteLoading> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading, useRefeshDidShow } from '@12333/hooks'; -import * as messageServices from '@12333/services/api/Message'; -import Taro from '@tarojs/taro'; -import { RouterPath, MessageChatTypeAvatarMap } from '@/constants'; -import { MessageChatTypeEnum } from '@12333/constants'; -import { useQuery } from '@tanstack/vue-query'; -import { setOSSLink } from '@12333/utils'; - -defineOptions({ - name: 'InnerPage', -}); - -useRefeshDidShow({ queryKey: ['messageCount'] }); - -const { data: myBaseChatList, refetch } = useQuery({ - queryKey: ['messageServices/getMyBaseChatList'], - queryFn: async () => { - return await messageServices.getMyBaseChatList({ showLoading: false }); - }, - placeholderData: () => [] as API.MassgeChatOutput[], -}); - -useRefeshDidShow({ queryKey: ['messageServices/getMyBaseChatList'] }); - -const { infiniteLoadingProps, flattenListData } = useInfiniteLoading( - ({ pageParam }) => { - let params: API.QueryMyMessageInput = { - pageModel: { - rows: 20, - page: pageParam, - }, - }; - - return messageServices.getMyFriendChatPage(params, { showLoading: false }); - }, - { - queryKey: ['messageServices/getMyFriendChatPage'], - } -); - -function handleRefetch(options?: any) { - refetch(options); - return infiniteLoadingProps.value.refetch(options); -} - -function handleClick(item: API.MassgeChatOutput) { - if (item.chatType === MessageChatTypeEnum.System) { - goPage(RouterPath.systemMessage); - } else if (item.chatType === MessageChatTypeEnum.UnfamiliarUser) { - goPage(RouterPath.unfamiliarUserList); - } else { - goPage(`${RouterPath.chatRoom}?chatId=${item.chatId}`); - } -} - -function goPage(routeName: string) { - Taro.navigateTo({ - url: routeName, - }); -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.message-page-top-view { - padding: 32px 0; - display: flex; - justify-content: space-evenly; - background-color: #fff; - margin-bottom: 8px; - - .message-page-top-view-item { - display: flex; - flex-direction: column; - align-items: center; - - .message-page-top-view-item-icon-wrapper { - width: 80px; - height: 80px; - display: flex; - justify-content: center; - align-items: center; - margin-bottom: 8px; - border-radius: 50%; - - &.like { - background: #ffebeb; - - .message-page-top-view-item-icon { - width: 56px; - height: 54px; - } - } - - &.attention { - background: #e3f8ff; - - .message-page-top-view-item-icon { - width: 52px; - height: 58px; - } - } - } - - .message-page-top-view-item-text { - font-weight: 400; - font-size: 24px; - color: #7c7c7c; - line-height: 34px; - } - } -} -</style> diff --git a/apps/cMiniApp/src/subpackages/message/messageList/messageList.config.ts b/apps/cMiniApp/src/subpackages/message/messageList/messageList.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/message/messageList/messageList.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/message/messageList/messageList.vue b/apps/cMiniApp/src/subpackages/message/messageList/messageList.vue deleted file mode 100644 index 80be15d..0000000 --- a/apps/cMiniApp/src/subpackages/message/messageList/messageList.vue +++ /dev/null @@ -1,14 +0,0 @@ -<template> - <PageLayout title="娑堟伅" class="message-page-wrapper" has-border> - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; - -defineOptions({ - name: 'message', -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/message/systemMessage/InnerPage.vue b/apps/cMiniApp/src/subpackages/message/systemMessage/InnerPage.vue deleted file mode 100644 index c56b98f..0000000 --- a/apps/cMiniApp/src/subpackages/message/systemMessage/InnerPage.vue +++ /dev/null @@ -1,63 +0,0 @@ -<template> - <InfiniteLoading - scrollViewClassName="common-infinite-scroll-list system-message-list" - v-bind="infiniteLoadingProps" - > - <template #renderItem="{ item, index }"> - <SystemMessageCard - :key="item.id" - :id="item.id" - :messageContent="item.messageContent" - :creationTime="item.creationTime" - :prevTime="index > 0 ? flattenListData[index - 1].creationTime : 0" - ></SystemMessageCard> - </template> - </InfiniteLoading> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading, useSetMessageIsRead } from '@12333/hooks'; -import * as messageServices from '@12333/services/api/Message'; -import { OrderInputType, MessageChatTypeEnum } from '@12333/constants'; -import Taro from '@tarojs/taro'; - -defineOptions({ - name: 'InnerPage', -}); - -// type Props = {}; - -// const props = withDefaults(defineProps<Props>(), {}); - -const { infiniteLoadingProps, flattenListData } = useInfiniteLoading( - ({ pageParam }) => { - let params: API.GetMessageInput = { - pageModel: { - rows: 20, - page: pageParam, - orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], - }, - }; - - return messageServices.getMySystemMessagePage(params, { - showLoading: false, - }); - }, - { - queryKey: ['messageServices/getMySystemMessagePage'], - onSuccess(data) { - setAllMessageIsReadByChatType(MessageChatTypeEnum.System); - }, - } -); - -const { setAllMessageIsReadByChatType } = useSetMessageIsRead(); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.system-message-list { - padding-top: 24px; -} -</style> diff --git a/apps/cMiniApp/src/subpackages/message/systemMessage/systemMessage.config.ts b/apps/cMiniApp/src/subpackages/message/systemMessage/systemMessage.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/message/systemMessage/systemMessage.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/message/systemMessage/systemMessage.vue b/apps/cMiniApp/src/subpackages/message/systemMessage/systemMessage.vue deleted file mode 100644 index dbc4d1b..0000000 --- a/apps/cMiniApp/src/subpackages/message/systemMessage/systemMessage.vue +++ /dev/null @@ -1,14 +0,0 @@ -<template> - <PageLayout title="绯荤粺娑堟伅" class="system-message-page-wrapper" has-border> - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; - -defineOptions({ - name: 'systemMessage', -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/InnerPage.vue b/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/InnerPage.vue deleted file mode 100644 index 10a1115..0000000 --- a/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/InnerPage.vue +++ /dev/null @@ -1,56 +0,0 @@ -<template> - <InfiniteLoading - scrollViewClassName="common-infinite-scroll-list-no-padding" - v-bind="infiniteLoadingProps" - > - <template #renderItem="{ item, index }"> - <MessageCard - :key="item.chatId" - @click="goChatRoom(item)" - :avatarUrl="item.avatarUrl ? setOSSLink(item.avatarUrl) : ''" - :latestMessageCreationTime="item.latestMessage?.creationTime" - :latestMessageContent="item.latestMessage?.messageContent" - :contact="item.contact" - :chatType="item.chatType" - :badge="item.unReadCount ?? 0" - ></MessageCard> - </template> - </InfiniteLoading> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading } from '@12333/hooks'; -import * as messageServices from '@12333/services/api/Message'; -import Taro from '@tarojs/taro'; -import { setOSSLink } from '@12333/utils'; - -defineOptions({ - name: 'InnerPage', -}); - -const { infiniteLoadingProps } = useInfiniteLoading( - ({ pageParam }) => { - let params: API.GetMessageInput = { - pageModel: { - rows: 20, - page: pageParam, - }, - }; - - return messageServices.getMyUnfamiliarChatPage(params, { showLoading: false }); - }, - { - queryKey: ['messageServices/getMyUnfamiliarChatPage'], - } -); - -function goPage(routeName: string) { - Taro.navigateTo({ - url: routeName, - }); -} - -function goChatRoom(item: API.MassgeChatOutput) { - goPage(`${RouterPath.chatRoom}?chatId=${item.chatId}`); -} -</script> diff --git a/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/unfamiliarUserList.config.ts b/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/unfamiliarUserList.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/unfamiliarUserList.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/unfamiliarUserList.vue b/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/unfamiliarUserList.vue deleted file mode 100644 index 3e816e7..0000000 --- a/apps/cMiniApp/src/subpackages/message/unfamiliarUserList/unfamiliarUserList.vue +++ /dev/null @@ -1,14 +0,0 @@ -<template> - <PageLayout title="闄岀敓浜烘秷鎭�" class="unfamiliarUserList-page-wrapper" has-border> - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; - -defineOptions({ - name: 'unfamiliarUserList', -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/order/orderDetail/common.scss b/apps/cMiniApp/src/subpackages/order/orderDetail/common.scss deleted file mode 100644 index c442dec..0000000 --- a/apps/cMiniApp/src/subpackages/order/orderDetail/common.scss +++ /dev/null @@ -1,93 +0,0 @@ -@import '@/styles/common.scss'; - -.detail-page-avatar-wrapper { - display: flex; - align-items: center; - - .detail-page-time { - font-weight: 400; - font-size: 24px; - color: boleGetCssVar('text-color', 'secondary'); - line-height: 34px; - margin-left: 12px; - } -} - -.detail-info-list { - margin-bottom: 16px; - .detail-info-list-item { - display: flex; - margin-bottom: 16px; - font-weight: 400; - font-size: 28px; - - line-height: 40px; - - &:last-child { - margin-bottom: 0; - } - - .detail-info-list-item-label { - color: boleGetCssVar('text-color', 'regular'); - margin-right: 8px; - } - - .detail-info-list-item-content { - color: boleGetCssVar('text-color', 'primary'); - flex: 1; - min-width: 0; - // @include ellipsis; - } - } -} - -.detail-introduction { - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 40px; - word-break: break-all; - white-space: pre-line; - font-size: 30px; - line-height: 50px; -} - -.safe-cell-title-wrapper { - display: flex; - align-items: center; - - .safe-cell-title-icon { - width: 32px; - height: 32px; - margin-right: 8px; - - .safe-cell-title { - font-weight: 600; - font-size: 28px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 40px; - } - } -} - -.safe-cell-content { - font-size: 24px; - color: boleGetCssVar('text-color', 'secondary'); - line-height: 30px; - text-align: left; - word-break: break-all; - line-height: 34px; - - .safe-cell-content-btn { - color: boleGetCssVar('color', 'primary'); - display: inline; - } -} - -.orderDetail-industryTypeName { - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'regular'); - line-height: 40px; - margin-bottom: 32px; -} diff --git a/apps/cMiniApp/src/subpackages/order/orderDetail/orderDetail.config.ts b/apps/cMiniApp/src/subpackages/order/orderDetail/orderDetail.config.ts deleted file mode 100644 index ffe1502..0000000 --- a/apps/cMiniApp/src/subpackages/order/orderDetail/orderDetail.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default definePageConfig({ - disableScroll: true, - enableShareAppMessage: true, - enableShareTimeline: true, -}); diff --git a/apps/cMiniApp/src/subpackages/order/orderDetail/orderDetail.vue b/apps/cMiniApp/src/subpackages/order/orderDetail/orderDetail.vue deleted file mode 100644 index 2788012..0000000 --- a/apps/cMiniApp/src/subpackages/order/orderDetail/orderDetail.vue +++ /dev/null @@ -1,292 +0,0 @@ -<template> - <PageLayoutWithBg title="璁㈠崟璇︽儏" class="orderDetail-page-wrapper" :need-auth="false"> - <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> - <ContentScrollView style="background-color: transparent"> - <Cell :title="detail?.orderName ?? ''" titleSize="large"> - <template #title-right> - <div class="orderDetail-supplierRefund"> - {{ detail?.integratedSalary ?? 0 }}鍏� - <div class="orderDetail-supplierRefund-unit"> - /{{ SalaryTimeTypeEnumUnitExact[detail?.salaryTimeType] }} - </div> - </div> - </template> - <div class="orderDetail-industryTypeName"> - {{ detail?.industryTypeName ?? '' }} - </div> - <div class="detail-page-avatar-wrapper"> - <CardAvatar - :src="detail?.avatarUrl" - :name="detail?.contact" - :jobTitle="detail?.jobTitle" - :isCertified="detail?.isCertified" - :userId="detail?.userId" - /> - <div class="detail-page-time"> - 鍙戝竷浜庯細{{ format(detail?.lastShelfTime, 'YYYY-MM-DD HH:mm') }} - </div> - </div> - </Cell> - <Cell title="鍩烘湰淇℃伅"> - <div class="detail-info-list"> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">闇�姹備汉鏁帮細</div> - <div class="detail-info-list-item-content">{{ _hireNumber }}浜�</div> - </div> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">骞撮緞鑼冨洿锛�</div> - <div class="detail-info-list-item-content"> - {{ detail?.ageStart ?? 0 }}-{{ detail?.ageEnd ?? 0 }}鍛ㄥ瞾 - </div> - </div> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">鎬у埆瑕佹眰锛�</div> - <div class="detail-info-list-item-content"> - {{ SexRequirementText[detail?.sexRequirement] }} - </div> - </div> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">闇�姹傚煄甯傦細</div> - <div class="detail-info-list-item-content">{{ address }}</div> - </div> - </div> - <div class="order-detail-supplier-refund"> - <div class="order-detail-supplier-refund-tag">鍚堜綔</div> - <div class="order-detail-supplier-refund-text"> - {{ supplierRefund }}锛寋{ rebateModeText }} - </div> - </div> - </Cell> - <Cell title="宸ヤ綔鍐呭"> - <div class="detail-introduction"> - {{ detail?.jobIntroduction ?? '' }} - </div> - </Cell> - <Cell title="宸ヤ綔鐜" v-if="imageList.length > 0"> - <ImageGrid - class="friend-message-content-image-grid" - :imageList="imageList" - :columnNum="4" - /> - </Cell> - <Cell> - <template #title> - <div class="safe-cell-title-wrapper"> - <img :src="IconSafe" class="safe-cell-title-icon" /> - <div class="safe-cell-title">瀹夊叏鎻愮ず</div> - </div> - </template> - <div class="safe-cell-content"> - 璇ヤ俊鎭敱鐢ㄦ埛鑷富鍙戝竷锛屽閬囪櫄鍋囦俊鎭�佽瘓楠椼�佷紶閿�绛夎繚娉曡繚瑙勮涓猴紝璇风珛鍗� - <div class="safe-cell-content-btn" @click="goComplaint">鎶曡瘔涓炬姤</div> - </div> - </Cell> - </ContentScrollView> - <PageFooter> - <PageFooterAction - :icon="IconShare" - text="鍒嗕韩" - :isFlex="false" - openType="share" - ></PageFooterAction> - - <PageFooterBtn v-if="isSelf || isCollapse" type="primary" @click="makePhoneCall">{{ - contactPhone - }}</PageFooterBtn> - <PageFooterBtn v-else type="primary" @click="handleGoAcontact">鎴戣鎺ュ崟</PageFooterBtn> - </PageFooter> - </LoadingLayout> - </PageLayoutWithBg> -</template> - -<script setup lang="ts"> -import Taro from '@tarojs/taro'; -import { useQuery } from '@tanstack/vue-query'; -import * as orderServices from '@12333/services/api/Order'; -import { OrderUtils, filterJoin, setOSSLink, format } from '@12333/utils'; -import { - HireType, - SalaryTimeTypeEnumUnitExact, - SexRequirementText, - MatchMakingIdentityEnum, -} from '@12333/constants'; -import { ImageGrid } from '@12333/components'; -import IconSafe from '@/assets/order/icon-safe.png'; -import IconShare from '@/assets/order/icon-share.png'; -import { - useUser, - useAccessLogin, - useToggleMatchMakingIdentityOnLaunch, - useAccessPersonalInfo, -} from '@/hooks'; -import { useToggle } from 'senin-mini/hooks'; - -defineOptions({ - name: 'orderDetail', -}); - -const router = Taro.useRouter(); -const orderId = router.params?.id ?? ''; - -const { userDetail } = useUser(); - -useToggleMatchMakingIdentityOnLaunch({ - matchMakingIdentity: MatchMakingIdentityEnum.Contributors, -}); - -const { - isLoading, - isError, - data: detail, - refetch, -} = useQuery({ - queryKey: ['orderServices/getOrdeForDetail', orderId], - queryFn: async () => { - return await orderServices.getOrdeForDetail( - { id: orderId }, - { - showLoading: false, - } - ); - }, - placeholderData: () => ({} as API.OrderInfoDto), - onSuccess(data) { - if (data.isExistTradeChatRecord) setTrue(); - }, -}); - -const isSelf = computed(() => userDetail.value?.userId === detail.value?.userId); - -const _hireNumber = computed(() => - OrderUtils.getHireNumber( - detail.value?.hireType, - detail.value?.hireNumber, - detail.value?.hireEndNumber - ) -); - -const supplierRefund = computed(() => { - if (detail.value?.orderSupplierRefundInfo) { - return OrderUtils.getSupplierRefund(detail.value?.orderSupplierRefundInfo); - } - return ''; -}); - -const rebateModeText = computed(() => { - if (detail.value?.orderSupplierRefundInfo) { - return OrderUtils.getRebateModeText(detail.value?.orderSupplierRefundInfo); - } - return ''; -}); - -const address = computed(() => - filterJoin([detail.value.provinceName ?? '', detail.value.cityName ?? '']) -); - -const imageList = computed(() => { - if (detail.value?.src?.length > 0) { - return detail.value?.src.map((item) => ({ fileUrl: setOSSLink(item) })); - } - - return []; -}); - -const contactPhone = computed(() => { - if (detail.value) { - return detail.value?.parkOrHRSimpleInfo?.contactPhone - ? detail.value?.parkOrHRSimpleInfo?.contactPhone - : detail.value?.contactNumber - ? detail.value?.contactNumber - : ''; - } - return ''; -}); - -Taro.showShareMenu({ - showShareItems: ['shareAppMessage', 'shareTimeline'], -}); - -Taro.useShareAppMessage((res) => { - return { - title: detail.value?.orderName ?? '', - }; -}); - -function goComplaint() { - Taro.navigateTo({ - url: `${RouterPath.complaint}?id=${orderId}`, - }); -} - -const { isCollapse, setTrue } = useToggle(); - -const handleGoAcontact = useAccessPersonalInfo(async () => { - try { - let res = await orderServices.addTradeChatRecord({ - relationalId: orderId, - applyUserId: userDetail.value?.userId, - }); - if (res) { - setTrue(); - } - } catch (error) {} -}); - -const makePhoneCall = useAccessPersonalInfo(() => { - if (contactPhone.value) { - Taro.makePhoneCall({ - phoneNumber: contactPhone.value, - }); - } -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -@import './common.scss'; - -.orderDetail-page-wrapper { - .orderDetail-supplierRefund { - font-weight: 600; - font-size: 28px; - color: boleGetCssVar('color', 'primary'); - line-height: 40px; - flex-shrink: 0; - - .orderDetail-supplierRefund-unit { - color: boleGetCssVar('text-color', 'secondary'); - display: inline; - font-size: 24px; - } - } - - .order-detail-supplier-refund { - display: flex; - align-items: center; - - .order-detail-supplier-refund-tag { - height: 40px; - background: #edf2ff; - border-radius: 4px; - padding: 0 8px; - margin-right: 16px; - font-weight: 400; - font-size: 24px; - color: boleGetCssVar('color', 'primary'); - line-height: 34px; - flex-shrink: 0; - } - - .order-detail-supplier-refund-text { - height: 40px; - background: #f9faff; - padding: 0 8px; - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 40px; - @include ellipsis; - } - } -} -</style> diff --git a/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep1.vue b/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep1.vue deleted file mode 100644 index 5ce379a..0000000 --- a/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep1.vue +++ /dev/null @@ -1,192 +0,0 @@ -<template> - <ContentScrollView :paddingH="false"> - <nut-form :model-value="form" ref="formRef" :rules="rules"> - <nut-form-item label="璁㈠崟鍚嶇О:" class="bole-form-item" prop="name" required> - <nut-input - v-model.trim="form.name" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ鍗曞悕绉�" - type="text" - :max-length="20" - /> - </nut-form-item> - <nut-form-item label="鎷涜仒浜烘暟:" class="bole-form-item" prop="hireType" required> - <nut-radio-group v-model="form.hireType" direction="horizontal"> - <BlRadio :label="Number(key)" v-for="(val, key) in HireTypeText" :key="key">{{ - val - }}</BlRadio> - </nut-radio-group> - </nut-form-item> - <nut-form-item label=" " class="bole-form-item" prop="hireNumber"> - <div class="bole-form-input-wrapper"> - <NumberInput - v-model.trim="form.hireNumber" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ユ嫑鑱樹汉鏁�" - :min="1" - /> - <template v-if="form.hireType === HireType.hireEndNumber"> - <div class="form-input-separator">鑷�</div> - <NumberInput - v-model.trim="form.hireEndNumber" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ユ嫑鑱樹汉鏁�" - :min="1" - /> - </template> - </div> - </nut-form-item> - <nut-form-item label="宸ヤ綔鍦扮偣:" class="bole-form-item" prop="areaList" required> - <ChooseInputWithAreaPicker - :columns="areaTreeList" - v-model="form.areaList" - placeholder="璇锋坊鍔犲伐浣滃湴鐐�" - ></ChooseInputWithAreaPicker> - </nut-form-item> - <nut-form-item label="骞撮緞鑼冨洿:" class="bole-form-item" prop="ageStart" required> - <div class="bole-form-input-wrapper"> - <NumberInput - v-model.trim="form.ageStart" - class="nut-input-text bole-input-text" - placeholder="璇烽�夋嫨骞撮緞鑼冨洿" - :min="1" - /> - <div class="form-input-separator">鑷�</div> - <NumberInput - v-model.trim="form.ageEnd" - class="nut-input-text bole-input-text" - placeholder="璇烽�夋嫨骞撮緞鑼冨洿" - :min="1" - /> - </div> - </nut-form-item> - <nut-form-item label="鎬у埆瑕佹眰:" class="bole-form-item" prop="sexRequirement" required> - <ChooseInputWithPicker - v-model="form.sexRequirement" - placeholder="璇烽�夋嫨鎬у埆瑕佹眰" - :value-enum="SexRequirementTextV3" - /> - </nut-form-item> - <nut-form-item label="琛屼笟绫诲瀷:" class="bole-form-item" prop="industryTypeId" required> - <ChooseInputWithPicker - v-model="form.industryTypeId" - placeholder="璇烽�夋嫨琛屼笟绫诲瀷" - :value-enum="industryCategoryList" - enum-label-key="name" - enum-value-key="id" - /> - </nut-form-item> - </nut-form> - </ContentScrollView> - <PageFooter :isOnlyAction="false"> - <PageFooterBtn type="primary" @click="handleNext">涓嬩竴姝�</PageFooterBtn> - </PageFooter> -</template> - -<script setup lang="ts"> -import { usePublishOrderContext } from './context'; -import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; -import { - Radio as BlRadio, - NumberInput, - ChooseInputWithAreaPicker, - ChooseInputWithPicker, -} from '@12333/components'; -import { HireTypeText, HireType, SexRequirementTextV3, SearchType } from '@12333/constants'; -import { useAllAreaList, useAllSearchSettingList } from '@12333/hooks'; -import { FormValidator } from '@12333/utils'; -import { FormItemRuleWithoutValidator } from '@nutui/nutui-taro/dist/types/__VUE/formitem/types'; - -defineOptions({ - name: 'PublishOrderStep1', -}); - -const { goToNext, form } = usePublishOrderContext(); - -const { allSearchSettingList: industryCategoryList } = useAllSearchSettingList({ - searchType: SearchType.IndustryCategory, - enabled: true, - status: true, -}); - -const { findAreaNameFromCode, areaTreeList } = useAllAreaList(); - -const rules = reactive<FormRules>({ - name: [{ required: true, message: '璇疯緭鍏ヨ鍗曞悕绉�' }], - hireNumber: [ - { - required: true, - message: '璇烽�夋嫨鎷涜仒浜烘暟', - validator: (value: any, ruleCfg: FormItemRuleWithoutValidator) => { - if (!form.hireNumber) { - return Promise.reject('璇疯緭鍏ユ嫑鑱樹汉鏁�'); - } - if (form.hireType === HireType.hireEndNumber) { - if (!form.hireEndNumber) { - return Promise.reject('璇疯緭鍏ユ嫑鑱樹汉鏁�'); - } - if (Number(form.hireEndNumber) <= Number(form.hireNumber)) { - return Promise.reject('鎷涜仒鏈�澶т汉鏁颁笉鑳藉皬浜庢嫑鑱樻渶灏忎汉鏁�'); - } - } - return Promise.resolve(true); - }, - }, - ], - areaList: [ - { required: true, message: '娓呮坊鍔犲伐浣滃湴鐐�', validator: FormValidator.validatorArray }, - ], - ageStart: [ - { - required: true, - message: '璇疯緭鍏ュ勾榫勮姹�', - validator: () => { - if (!form.ageStart) { - return Promise.reject('璇疯緭鍏ュ勾榫勮姹�'); - } - if (!form.ageEnd) { - return Promise.reject('璇疯緭鍏ュ勾榫勮姹�'); - } - if (Number(form.ageEnd) <= Number(form.ageStart)) { - return Promise.reject('鏈�澶у勾榫勪笉鑳藉皬浜庢渶灏忓勾榫�'); - } - return Promise.resolve(true); - }, - }, - ], - sexRequirement: [{ required: true, message: '璇烽�夋嫨鎬у埆瑕佹眰' }], - industryTypeId: [{ required: true, message: '璇烽�夋嫨琛屼笟绫诲瀷' }], -}); - -const formRef = ref<any>(null); - -function handleNext() { - if (!formRef.value) return; - formRef.value.validate().then(({ valid, errors }: any) => { - if (valid) { - goToNext(); - } - }); -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.bole-form-input-wrapper { - display: flex; - align-items: center; -} - -.form-input-separator { - margin: 0 10px; - color: boleGetCssVar('text-color', 'primary'); - flex-shrink: 0; -} - -.form-input-unit { - margin-left: 10px; - color: boleGetCssVar('text-color', 'primary'); - flex-shrink: 0; -} -</style> diff --git a/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep2.vue b/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep2.vue deleted file mode 100644 index 7c76113..0000000 --- a/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep2.vue +++ /dev/null @@ -1,176 +0,0 @@ -<template> - <ContentScrollView :paddingH="false"> - <nut-form :model-value="form" ref="formRef" :rules="rules"> - <nut-form-item - label="鍛樺伐钖祫:" - class="bole-form-item" - prop="salaryTimeType" - required - label-width="80px" - > - <nut-radio-group v-model="form.salaryTimeType" direction="horizontal"> - <BlRadio :label="Number(key)" v-for="(val, key) in SalaryTimeTypeEnumText" :key="key">{{ - val - }}</BlRadio> - </nut-radio-group> - </nut-form-item> - <nut-form-item label=" " class="bole-form-item" prop="integratedSalary" label-width="80px"> - <div class="bole-form-input-wrapper"> - <!-- <NumberInput - v-model.trim="form.integratedSalary" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ュ憳宸ヨ柂璧�" - :min="1" - /> --> - <nut-input - v-model.trim="form.integratedSalary" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ュ憳宸ヨ柂璧�" - type="text" - /> - <div class="form-input-unit">{{ SalaryTimeTypeEnumUnit[form.salaryTimeType] }}</div> - </div> - </nut-form-item> - <nut-form-item - label="缁撶畻鏂瑰紡:" - class="bole-form-item" - prop="salaryType" - required - label-width="80px" - > - <nut-radio-group v-model="form.salaryType" direction="horizontal"> - <BlRadio :label="Number(key)" v-for="(val, key) in SalaryTypeTextV3">{{ val }}</BlRadio> - </nut-radio-group> - </nut-form-item> - <nut-form-item - label="杩旇垂绫诲瀷:" - class="bole-form-item" - prop="salaryType" - required - label-width="80px" - > - <nut-radio-group v-model="form.rebateMode" direction="horizontal"> - <BlRadio :label="Number(key)" v-for="(val, key) in OrderRebateModeTextV3" :key="key">{{ - val - }}</BlRadio> - </nut-radio-group> - </nut-form-item> - <nut-form-item - label="杩旇垂閲戦:" - class="bole-form-item" - prop="cycleType" - required - label-width="80px" - > - <nut-radio-group v-model="form.cycleType" direction="horizontal"> - <BlRadio :label="Number(key)" v-for="(val, key) in CycleTypeEnumText" :key="key">{{ - val - }}</BlRadio> - </nut-radio-group> - </nut-form-item> - <nut-form-item label=" " class="bole-form-item" prop="supplierProfit" label-width="80px"> - <div class="bole-form-input-wrapper"> - <NumberInput - v-model.trim="form.supplierProfit" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ繑璐归噾棰�" - :min="1" - /> - <div class="form-input-unit">{{ CycleTypeEnumUnitText[form.cycleType] }}</div> - </div> - </nut-form-item> - <nut-form-item - label="杩旇垂鏃堕暱:" - class="bole-form-item" - prop="rebateTime" - label-width="80px" - required - v-if="form.rebateMode == OrderRebateMode.Hour" - > - <div class="bole-form-input-wrapper"> - <NumberInput - v-model.trim="form.rebateTime" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ繑璐规椂闀�" - :min="1" - /> - <div class="form-input-unit">{{ RebateCycleTypeText[form.cycleType] }}</div> - </div> - </nut-form-item> - <nut-form-item - label="鍏ヨ亴鏃堕暱:" - class="bole-form-item" - prop="rebateTime" - label-width="80px" - required - v-if="form.rebateMode == OrderRebateMode.Recruit" - > - <div class="bole-form-input-wrapper"> - <div class="form-input-separator">鍏ヨ亴婊�</div> - <NumberInput - v-model.trim="form.rebateTime" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ュぉ鏁�" - :min="1" - /> - <div class="form-input-unit">澶╀竴娆℃�ц繑</div> - </div> - </nut-form-item> - </nut-form> - </ContentScrollView> - <PageFooter :isOnlyAction="false"> - <PageFooterBtn type="primary" plain @click="goToPrevious()">涓婁竴姝�</PageFooterBtn> - <PageFooterBtn type="primary" @click="handleNext">涓嬩竴姝�</PageFooterBtn> - </PageFooter> -</template> - -<script setup lang="ts"> -import { usePublishOrderContext } from './context'; -import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; -import { Radio as BlRadio, NumberInput } from '@12333/components'; -import { - SalaryTimeTypeEnumText, - SalaryTimeTypeEnumUnit, - SalaryTypeTextV3, - OrderRebateModeTextV3, - CycleTypeEnumText, - CycleTypeEnumUnitText, - OrderRebateMode, - RebateCycleTypeText, -} from '@12333/constants'; -import { FormValidator } from '@12333/utils'; - -defineOptions({ - name: 'PublishOrderStep2', -}); - -const { goToNext, form, goToPrevious } = usePublishOrderContext(); - -const rules = computed<FormRules>(() => ({ - integratedSalary: [{ required: true, message: '璇疯緭鍏ュ憳宸ヨ柂璧�' }], - supplierProfit: [ - { required: true, message: '璇疯緭鍏ヨ繑璐归噾棰�', validator: FormValidator.validatorNumberNotNull }, - ], - rebateTime: [ - { - required: true, - message: form.rebateMode == OrderRebateMode.Recruit ? '璇疯緭鍏ュ叆鑱屾椂闀�' : '璇疯緭鍏ヨ繑璐规椂闀�', - }, - ], -})); - -const formRef = ref<any>(null); - -function handleNext() { - if (!formRef.value) return; - formRef.value.validate().then(({ valid, errors }: any) => { - if (valid) { - goToNext(); - } - }); -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -</style> diff --git a/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep3.vue b/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep3.vue deleted file mode 100644 index 09a2513..0000000 --- a/apps/cMiniApp/src/subpackages/order/publishOrder/PublishOrderStep3.vue +++ /dev/null @@ -1,172 +0,0 @@ -<template> - <ContentScrollView :paddingH="false"> - <nut-form :model-value="form" ref="formRef" :rules="rules"> - <nut-form-item - label="涓氬姟鎻忚堪:" - class="bole-form-item labelTop" - prop="jobIntroduction" - required - > - <div class="publish-del-btn-wrapper"> - <div class="publish-del-btn" @click="form.jobIntroduction = ''"> - <Del2 /> - 娓呯┖ - </div> - </div> - <nut-textarea - placeholder="璇疯緭鍏�" - placeholderClass="bole-input-text-placeholder" - autoSize - class="bole-input-textarea jobIntroduction-textarea" - v-model="form.jobIntroduction" - :max-length="200" - show-word-limit - > - </nut-textarea> - </nut-form-item> - <nut-form-item label="宸ヤ綔鐜:" class="bole-form-item labelTop" prop="src"> - <Uploader v-model:file-list="form.src" :maximum="9" class="bole-uploader"> </Uploader> - </nut-form-item> - <nut-form-item label="鍚屾鍙戦�佽嚦琛屼笟鍦�:" class="bole-form-item" prop="isSyncCircleFriend"> - <nut-checkbox v-model="form.isSyncCircleFriend"></nut-checkbox> - </nut-form-item> - </nut-form> - </ContentScrollView> - <PageFooter :isOnlyAction="false"> - <PageFooterBtn type="primary" plain @click="goToPrevious()">涓婁竴姝�</PageFooterBtn> - <PageFooterBtn type="primary" @click="handleSubmit()">鍙戝竷</PageFooterBtn> - </PageFooter> -</template> - -<script setup lang="ts"> -import { usePublishOrderContext } from './context'; -import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; -import { useParkOrHRCategoryList, useUser } from '@/hooks'; -import { OrderStatus, EditorType, HireType, CycleTypeEnumUnitText } from '@12333/constants'; -import { useAllAreaList } from '@12333/hooks'; -import * as orderServices from '@12333/services/api/Order'; -import { goBack } from '@/utils'; -import { Message, convertFormUrl2Api, isFileAllUploaded } from '@12333/utils'; -import { Del2 } from '@nutui/icons-vue-taro'; - -defineOptions({ - name: 'PublishOrderStep3', -}); - -const { orderCategory } = useParkOrHRCategoryList(); - -const { userDetail } = useUser(); -const { findAreaNameFromCode } = useAllAreaList(); - -const { goToPrevious, form, orderId, isEdit } = usePublishOrderContext(); - -const rules = reactive<FormRules>({ - jobIntroduction: [{ required: true, message: '璇疯緭鍏ヤ笟鍔℃弿杩�' }], -}); - -watch( - () => form.src, - () => { - console.log('form.src: ', form.src); - } -); - -const formRef = ref<any>(null); - -function handleSubmit() { - if (!formRef.value) return; - formRef.value.validate().then(({ valid, errors }: any) => { - if (valid) { - handleCreateOrUpdate(); - } - }); -} - -async function handleCreateOrUpdate() { - try { - if (!isFileAllUploaded(form.src)) { - Message.error('瀛樺湪鏈笂浼犲畬鎴愮殑鏂囦欢'); - return; - } - let params: API.CreateOrUpdateOrderinput = { - name: form.name, - categoryId: orderCategory?.value?.id ?? '', - userId: userDetail.value.userId ?? '', - status: OrderStatus.WaitToAudit, - hireType: form.hireType, - hireNumber: form.hireNumber, - hireEndNumber: form.hireType === HireType.hireNumber ? form.hireNumber : form.hireEndNumber, - ageStart: form.ageStart, - ageEnd: form.ageEnd, - sexRequirement: form.sexRequirement, - manNumber: form.manNumber, - womanNumber: form.womanNumber, - rebateRemark: '杩旇垂鏃堕暱', - provinceCode: form.areaList[0], - provinceName: findAreaNameFromCode(form.areaList[0]), - cityCode: form.areaList[1] || 0, - cityName: findAreaNameFromCode(form.areaList[1]), - countyCode: form.areaList[2] || 0, - countyName: findAreaNameFromCode(form.areaList[2]), - jobIntroduction: form.jobIntroduction, - externalcontactType: form.externalcontactType, - externalcontactNumber: form.externalcontactNumber, - salaryType: form.salaryType, - isSyncCircleFriend: form.isSyncCircleFriend, - src: convertFormUrl2Api(form.src), - supplierRefundList: [ - { - rebateMode: form.rebateMode, - rebateTime: form.rebateTime, - supplierProfit: form.supplierProfit, - supplierProfitUint: form.cycleType, - cycleType: form.cycleType, - sequence: 1, - }, - ], - industryTypeId: form.industryTypeId, - integratedSalary: form.integratedSalary, - salaryTimeType: form.salaryTimeType, - }; - if (isEdit.value) { - params.id = orderId; - } - let res = await orderServices.createOrUpdateOrder(params); - if (res) { - Message.success(isEdit.value ? '缂栬緫鎴愬姛' : '鍙戝竷鎴愬姛', { - onClosed() { - goBack(); - }, - }); - } - } catch (error) { - console.log('error: ', error); - } -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.publish-del-btn-wrapper { - text-align: right; - margin-bottom: 12px; - - .publish-del-btn { - font-size: 28px; - display: inline-block; - color: boleGetCssVar('text-color', 'primary'); - vertical-align: middle; - cursor: pointer; - - .nutui-iconfont { - color: boleGetCssVar('color', 'primary'); - vertical-align: middle; - } - } -} - -.jobIntroduction-textarea { - height: 600px !important; -} -</style> diff --git a/apps/cMiniApp/src/subpackages/order/publishOrder/context.ts b/apps/cMiniApp/src/subpackages/order/publishOrder/context.ts deleted file mode 100644 index f3b9e18..0000000 --- a/apps/cMiniApp/src/subpackages/order/publishOrder/context.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { InjectionKey, UnwrapNestedRefs, Ref } from 'vue'; -import { inject } from 'vue'; -import { - OrderStatus, - HireType, - SexRequirement, - SalaryTimeTypeEnum, - SalaryType, - ExternalcontactType, -} from '@12333/constants'; -import { UseStepperReturn } from 'senin-mini/hooks'; -import { OrderOperateBtnStatus } from '@12333/constants'; -import { FileItem } from '@nutui/nutui-taro/dist/types/__VUE/uploader/type'; - -type PublishOrderSteps = 'step1' | 'step2' | 'step3'; - -export interface PublishOrderContext - extends UseStepperReturn<PublishOrderSteps, PublishOrderSteps[], PublishOrderSteps> { - form: UnwrapNestedRefs<{ - name: string; - hireType: HireType; - hireNumber: number; - hireEndNumber: number; - ageStart: number; - ageEnd: number; - sexRequirement: SexRequirement; - salaryTimeType: SalaryTimeTypeEnum; - salaryType: SalaryType; - externalcontactType: ExternalcontactType; - externalcontactNumber: string; - areaList: number[]; - src: FileItem[]; - jobIntroduction: string; - supplierRefundList: API.SupplierRefundList[]; - //----------------------------- - /** 杩愯垂妯″紡 10闄愭椂杩旇垂 20涓�娆℃�ц繑璐� 30 闀挎湡杩旇垂 */ - rebateMode: number; - /** 杩愯垂鏃堕暱 0杩炵画鍚堜綔 鍏朵粬鏁板�煎氨浠h〃鏃堕暱鏈堜唤 */ - rebateTime: number; - /** 渚涘簲鍟嗗埄娑� */ - supplierProfit: number; - /** 10 涓�娆℃�у埄娑� 20 xx鍏�/姣忎汉/姣忓皬鏃� 30 xx鍏�/姣忎汉/姣忔湀 */ - supplierProfitUint: number; - /** 杩旇垂鍛ㄦ湡 10 鎸夋湀锛�20鎸夋棩锛�30鎸夋椂 */ - cycleType: number; - //----------------------------- - manNumber: number; - womanNumber: number; - industryTypeId: string; - integratedSalary: string; - provinceCode: number; - cityCode: number; - countyCode: number; - isSyncCircleFriend: boolean; - status: OrderStatus; - checkRemark: string; - }>; - orderId: string; - orderOperateBtnStatus: OrderOperateBtnStatus; - isEdit: Ref<boolean>; -} - -export const PublishOrderContextKey: InjectionKey<PublishOrderContext> = - Symbol('PublishOrderContextKey'); - -export function usePublishOrderContext() { - return inject(PublishOrderContextKey); -} diff --git a/apps/cMiniApp/src/subpackages/order/publishOrder/innerPage.vue b/apps/cMiniApp/src/subpackages/order/publishOrder/innerPage.vue deleted file mode 100644 index 50ff77e..0000000 --- a/apps/cMiniApp/src/subpackages/order/publishOrder/innerPage.vue +++ /dev/null @@ -1,67 +0,0 @@ -<template> - <LoadingLayout :loading="isLoading && isEdit" :error="isError" :loadError="refetch"> - <PublishOrderStep1 v-if="current === 'step1'"></PublishOrderStep1> - <PublishOrderStep2 v-else-if="current === 'step2'"></PublishOrderStep2> - <PublishOrderStep3 v-else-if="current === 'step3'"></PublishOrderStep3> - </LoadingLayout> -</template> - -<script setup lang="ts"> -import { usePublishOrderContext } from './context'; -import PublishOrderStep1 from './PublishOrderStep1.vue'; -import PublishOrderStep2 from './PublishOrderStep2.vue'; -import PublishOrderStep3 from './PublishOrderStep3.vue'; -import { useQuery } from '@tanstack/vue-query'; -import * as orderServices from '@12333/services/api/Order'; -import { convertApiPath2Url } from '@12333/utils'; - -defineOptions({ - name: 'InnerPage', -}); - -const { current, orderId, form, isEdit } = usePublishOrderContext(); - -const { isLoading, isError, refetch } = useQuery({ - queryKey: ['orderServices/getOrdeForDetail', orderId], - queryFn: async () => { - return await orderServices.getOrdeForDetail( - { id: orderId }, - { - showLoading: false, - } - ); - }, - initialData: () => ({} as API.OrderInfoDto), - enabled: !!orderId, - onSuccess(data) { - form.name = data.orderName; - form.hireType = data.hireType; - form.hireNumber = data.hireNumber; - form.hireEndNumber = data.hireEndNumber; - form.ageStart = data.ageStart; - form.ageEnd = data.ageEnd; - form.sexRequirement = data.sexRequirement; - form.salaryType = data.salaryType; - form.salaryTimeType = data.salaryTimeType; - form.checkRemark = data.checkRemark; - form.externalcontactType = data.externalcontactType; - form.externalcontactNumber = data.externalcontactNumber; - form.areaList = [data.provinceCode, data.cityCode, data.countyCode]; - form.src = data.src.map(convertApiPath2Url); - form.jobIntroduction = data.jobIntroduction; - form.supplierRefundList = data.orderSupplierRefundInfo; - if (data.orderSupplierRefundInfo?.length > 0) { - let item = data.orderSupplierRefundInfo[0]; - form.rebateMode = item.rebateMode; - form.rebateTime = item.rebateTime; - form.supplierProfit = item.supplierProfit; - form.supplierProfitUint = item.supplierProfitUint; - form.cycleType = item.cycleType; - } - form.manNumber = data.manNumber; - form.womanNumber = data.womanNumber; - form.integratedSalary = data.integratedSalary; - form.industryTypeId = data.industryTypeId; - }, -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/order/publishOrder/publishOrder.config.ts b/apps/cMiniApp/src/subpackages/order/publishOrder/publishOrder.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/order/publishOrder/publishOrder.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/order/publishOrder/publishOrder.vue b/apps/cMiniApp/src/subpackages/order/publishOrder/publishOrder.vue deleted file mode 100644 index 3fbbd9e..0000000 --- a/apps/cMiniApp/src/subpackages/order/publishOrder/publishOrder.vue +++ /dev/null @@ -1,100 +0,0 @@ -<template> - <PageLayout - class="publishOrder-page-wrapper" - :title="`鍙戝竷璁㈠崟(${stepperInfo.index.value + 1}/${stepperInfo.steps.value.length})`" - hasBorder - > - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './innerPage.vue'; -import { PublishOrderContextKey } from './context'; -import { - OrderStatus, - HireType, - SexRequirement, - SalaryTimeTypeEnum, - SalaryType, - ExternalcontactType, - EmptyRupplierRefund, -} from '@12333/constants'; -import { useStepper } from 'senin-mini/hooks'; -import Taro from '@tarojs/taro'; -import { - OrderOperateBtnStatus, - OrderRebateMode, - CycleTypeEnum, - SupplierProfitUint, -} from '@12333/constants'; -import { FileItem } from '@nutui/nutui-taro/dist/types/__VUE/uploader/type'; - -const router = Taro.useRouter(); -const orderId = router.params?.id ?? ''; -const orderOperateBtnStatus = router.params?.orderOperateBtnStatus ?? ''; -const isEdit = computed(() => { - return Number(orderOperateBtnStatus) === OrderOperateBtnStatus.Edit; -}); - -const DefaultJobIntroduction = `涓�銆佸伐浣滆鏄� -1.宸ヤ綔鍐呭锛� -2.宸ヤ綔鏃堕棿锛� -浜屻�佽柂璧勭鍒� -1.宸ヨ祫璁$畻 -2.宸ヨ祫鍙戞斁 -涓夈�侀瀹夸粙缁� -1.浼欓璇存槑 -2.浣忓璇存槑 -鍥涖�侀潰璇曡鏄� -1.闈㈣瘯瑕佹眰锛� -2.闈㈣瘯鏃堕棿锛� -3.闈㈣瘯鍦扮偣锛� -4.闈㈣瘯鏉愭枡锛� -5.浣撴瑕佹眰锛歚; - -const form = reactive({ - name: '', - hireType: HireType.hireNumber, - hireNumber: '' as any as number, - hireEndNumber: '' as any as number, - ageStart: '' as any as number, - ageEnd: '' as any as number, - sexRequirement: SexRequirement.unlimited, - salaryTimeType: SalaryTimeTypeEnum.Month, - salaryType: SalaryType.month, - externalcontactType: ExternalcontactType.platform, - externalcontactNumber: '', - areaList: [] as number[], - src: [] as FileItem[], - jobIntroduction: DefaultJobIntroduction, - supplierRefundList: [{ ...EmptyRupplierRefund }] as API.SupplierRefundList[], - rebateMode: OrderRebateMode.Hour, - rebateTime: '' as any as number, - supplierProfit: '' as any as number, - supplierProfitUint: SupplierProfitUint.Hour, - cycleType: CycleTypeEnum.month, - manNumber: 0, - womanNumber: 0, - id: '', - industryTypeId: '', - integratedSalary: '', - provinceCode: '' as any as number, - cityCode: '' as any as number, - countyCode: '' as any as number, - isSyncCircleFriend: true, - status: '' as any as OrderStatus, - checkRemark: '', -}); - -const stepperInfo = useStepper(['step1', 'step2', 'step3']); - -provide(PublishOrderContextKey, { - form, - orderId, - orderOperateBtnStatus: Number(orderOperateBtnStatus) as OrderOperateBtnStatus, - isEdit, - ...stepperInfo, -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/resource/publishResource/InnerPage.vue b/apps/cMiniApp/src/subpackages/resource/publishResource/InnerPage.vue deleted file mode 100644 index 5451b5b..0000000 --- a/apps/cMiniApp/src/subpackages/resource/publishResource/InnerPage.vue +++ /dev/null @@ -1,50 +0,0 @@ -<template> - <LoadingLayout :loading="isLoading && isEdit" :error="isError" :loadError="refetch"> - <PublishResourceStep1 v-if="current === 'step1'"></PublishResourceStep1> - <PublishResourceStep2 v-else-if="current === 'step2'"></PublishResourceStep2> - </LoadingLayout> -</template> - -<script setup lang="ts"> -import { usePublishResourceContext } from './context'; -import PublishResourceStep1 from './PublishResourceStep1.vue'; -import PublishResourceStep2 from './PublishResourceStep2.vue'; -import { useQuery } from '@tanstack/vue-query'; -import * as resourceServices from '@12333/services/api/Resource'; -import { EditorType } from '@12333/constants'; - -defineOptions({ - name: 'InnerPage', -}); - -const { current, resourceId, form, isEdit } = usePublishResourceContext(); - -const { isLoading, isError, refetch } = useQuery({ - queryKey: ['resourceServices/getFrontResourceInfo', resourceId], - queryFn: async () => { - return await resourceServices.getFrontResourceInfo( - { id: resourceId }, - { - showLoading: false, - } - ); - }, - enabled: !!resourceId, - onSuccess(data) { - form.categoryId = data.categoryId; - form.title = data.title; - form.resourceIntros = - data.resourceIntros?.find?.((x) => x.type === EditorType.Text)?.content ?? ''; - form.resourceCount = data.resourceCount; - form.cities = data.cities?.map((x) => x.areaCode); - form.isLimitDeliveryCity = data.intendedDeliveryCities?.length > 0; - form.intendedDeliveryCity = data.intendedDeliveryCities?.map((x) => x.areaCode); - form.cooperationFee = data.cooperationFee; - form.isSyncCircleFriend = data.isSyncCircleFriend; - form.status = data.status; - form.checkRemark = data.checkRemark; - form.industryTypeId = data.industryTypeId; - form.isOpenOnlineTrade = data.isOpenOnlineTrade; - }, -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/resource/publishResource/PublishResourceStep1.vue b/apps/cMiniApp/src/subpackages/resource/publishResource/PublishResourceStep1.vue deleted file mode 100644 index 7412b40..0000000 --- a/apps/cMiniApp/src/subpackages/resource/publishResource/PublishResourceStep1.vue +++ /dev/null @@ -1,122 +0,0 @@ -<template> - <ContentScrollView :paddingH="false"> - <nut-form :model-value="form" ref="formRef" :rules="rules"> - <nut-form-item label="璧勬簮鍚嶇О:" class="bole-form-item" prop="title" required> - <nut-input - v-model.trim="form.title" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ祫婧愬悕绉�" - type="text" - :max-length="20" - /> - </nut-form-item> - <nut-form-item label="浜や粯浜烘暟:" class="bole-form-item" prop="resourceCount" required> - <NumberInput - v-model.trim="form.resourceCount" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ュ彲浜や粯浜烘暟" - :min="1" - /> - </nut-form-item> - <nut-form-item label="鎵�鍦ㄥ煄甯�:" class="bole-form-item" prop="cities" required> - <ChooseInputWithAreaSheet - v-model="form.cities" - placeholder="璇烽�夋嫨璧勬簮鎵�鍦ㄧ殑鍩庡競" - :max="1" - /> - <!-- <ChooseInputWithAreaPicker - :columns="cityAreaTree" - v-model="form.citiesList" - placeholder="娓呮坊鍔犲伐浣滃湴鐐�" - ></ChooseInputWithAreaPicker> --> - </nut-form-item> - <nut-form-item label="鎰忓悜鍩庡競:" class="bole-form-item" prop="intendedDeliveryCity" required> - <ChooseInputWithAreaSheet - v-model="form.intendedDeliveryCity" - placeholder="璇烽�夋嫨鎰忓悜浜や粯鐨勫煄甯�" - :max="1" - /> - </nut-form-item> - <nut-form-item label="琛屼笟绫诲瀷:" class="bole-form-item" prop="industryTypeId" required> - <ChooseInputWithPicker - v-model="form.industryTypeId" - placeholder="璇烽�夋嫨琛屼笟绫诲瀷" - :value-enum="industryCategoryList" - enum-label-key="name" - enum-value-key="id" - /> - </nut-form-item> - <nut-form-item label="鍚堜綔璐圭敤:" class="bole-form-item" prop="cooperationFee" required> - <nut-input - v-model.trim="form.cooperationFee" - class="nut-input-text bole-input-text" - placeholder="璇峰~鍐欐偍鐨勬剰鍚戝悎浣滆垂鐢�" - type="text" - /> - </nut-form-item> - </nut-form> - </ContentScrollView> - <PageFooter :isOnlyAction="false"> - <PageFooterBtn type="primary" @click="handleNext">涓嬩竴姝�</PageFooterBtn> - </PageFooter> -</template> - -<script setup lang="ts"> -import { usePublishResourceContext } from './context'; -import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; -import { - ChooseInputWithPicker, - ChooseInputWithAreaSheet, - NumberInput, - ChooseInputWithAreaPicker, -} from '@12333/components'; -import { useAllSearchSettingList } from '@12333/hooks'; -import { SearchType } from '@12333/constants'; -import { FormValidator } from '@12333/utils'; - -defineOptions({ - name: 'PublishResourceStep1', -}); - -const { goToNext, form } = usePublishResourceContext(); - -const { allSearchSettingList: industryCategoryList } = useAllSearchSettingList({ - searchType: SearchType.IndustryCategory, - enabled: true, - status: true, -}); - -const rules = reactive<FormRules>({ - title: [{ required: true, message: '璇疯緭鍏ヨ祫婧愬悕绉�' }], - resourceCount: [ - { - required: true, - message: '璇疯緭鍏ュ彲浜や粯浜烘暟', - validator: FormValidator.validatorNumberNotNull, - }, - ], - industryTypeId: [{ required: true, message: '璇烽�夋嫨琛屼笟绫诲瀷' }], - cities: [ - { required: true, message: '璇烽�夋嫨璧勬簮鎵�鍦ㄧ殑鍩庡競', validator: FormValidator.validatorArray }, - ], - intendedDeliveryCity: [ - { required: true, message: '璇烽�夋嫨鎰忓悜浜や粯鐨勫煄甯�', validator: FormValidator.validatorArray }, - ], - cooperationFee: [{ required: true, message: '璇峰~鍐欐偍鐨勬剰鍚戝悎浣滆垂鐢�' }], -}); - -const formRef = ref<any>(null); - -function handleNext() { - if (!formRef.value) return; - formRef.value.validate().then(({ valid, errors }: any) => { - if (valid) { - goToNext(); - } - }); -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -</style> diff --git a/apps/cMiniApp/src/subpackages/resource/publishResource/PublishResourceStep2.vue b/apps/cMiniApp/src/subpackages/resource/publishResource/PublishResourceStep2.vue deleted file mode 100644 index c092aa5..0000000 --- a/apps/cMiniApp/src/subpackages/resource/publishResource/PublishResourceStep2.vue +++ /dev/null @@ -1,115 +0,0 @@ -<template> - <ContentScrollView :paddingH="false"> - <nut-form :model-value="form" ref="formRef" :rules="rules"> - <nut-form-item - label="璧勬簮璇存槑:" - class="bole-form-item alignTop" - prop="resourceIntros" - required - > - <nut-textarea - placeholder="璇疯緭鍏�" - placeholderClass="bole-input-text-placeholder" - autoSize - class="bole-input-textarea" - v-model="form.resourceIntros" - :max-length="200" - show-word-limit - > - </nut-textarea> - </nut-form-item> - <nut-form-item label="鍚屾鍙戦�佽嚦琛屼笟鍦�:" class="bole-form-item" prop="isSyncCircleFriend"> - <nut-checkbox v-model="form.isSyncCircleFriend"></nut-checkbox> - </nut-form-item> - </nut-form> - </ContentScrollView> - <PageFooter :isOnlyAction="false"> - <PageFooterBtn type="primary" plain @click="goToPrevious()">涓婁竴姝�</PageFooterBtn> - <PageFooterBtn type="primary" @click="handleSubmit()">鍙戝竷</PageFooterBtn> - </PageFooter> -</template> - -<script setup lang="ts"> -import { usePublishResourceContext } from './context'; -import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; -import { useParkOrHRCategoryList, useUser } from '@/hooks'; -import { ResourceStatus, EditorType } from '@12333/constants'; -import { useAllAreaList } from '@12333/hooks'; -import * as resourceServices from '@12333/services/api/Resource'; -import { goBack } from '@/utils'; -import { Message } from '@12333/utils'; - -defineOptions({ - name: 'PublishResourceStep2', -}); - -const { userDetail } = useUser(); -const { findAreaNameFromCode, findAreaItemFromCode } = useAllAreaList(); - -const { resourceCategory } = useParkOrHRCategoryList(); - -const { goToPrevious, form, resourceId, isEdit } = usePublishResourceContext(); - -const rules = reactive<FormRules>({ - resourceIntros: [{ required: true, message: '璇疯緭鍏ヨ祫婧愬悕绉�' }], -}); - -const formRef = ref<any>(null); - -function handleSubmit() { - if (!formRef.value) return; - formRef.value.validate().then(({ valid, errors }: any) => { - if (valid) { - handleCreateOrUpdateResource(); - } - }); -} - -async function handleCreateOrUpdateResource() { - try { - let params: API.CreateOrEditResourceInput = { - categoryId: resourceCategory.value.id ?? '', - title: form.title, - resourceCount: form.resourceCount, - cooperationFee: form.cooperationFee, - status: ResourceStatus.WaitAudit, - userId: userDetail.value.userId ?? '', - intendedDeliveryCity: form.isLimitDeliveryCity - ? form.intendedDeliveryCity.map((x, index) => ({ - areaCode: x, - areaName: findAreaNameFromCode(x), - sequence: index + 1, - provinceCode: findAreaItemFromCode(x).parentId, - })) - : [], - cities: form.cities.map((x, index) => ({ - areaCode: x, - areaName: findAreaNameFromCode(x), - sequence: index + 1, - provinceCode: findAreaItemFromCode(x).parentId, - })), - resourceIntros: [ - { - type: EditorType.Text, - content: form.resourceIntros, - }, - ], - resourceStyleInfo: [], - isSyncCircleFriend: form.isSyncCircleFriend, - industryTypeId: form.industryTypeId, - isOpenOnlineTrade: form.isOpenOnlineTrade, - }; - if (isEdit.value) { - params.id = resourceId; - } - let res = await resourceServices.createOrEditResource(params); - if (res) { - Message.success(isEdit.value ? '缂栬緫鎴愬姛' : '鍙戝竷鎴愬姛', { - onClosed() { - goBack(); - }, - }); - } - } catch (error) {} -} -</script> diff --git a/apps/cMiniApp/src/subpackages/resource/publishResource/context.ts b/apps/cMiniApp/src/subpackages/resource/publishResource/context.ts deleted file mode 100644 index a5b7595..0000000 --- a/apps/cMiniApp/src/subpackages/resource/publishResource/context.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { InjectionKey, UnwrapNestedRefs, Ref } from 'vue'; -import { inject } from 'vue'; -import { ResourceStatus } from '@12333/constants'; -import { UseStepperReturn } from 'senin-mini/hooks'; -import { ResourceOperateBtnStatus } from '@12333/constants'; - -type PublishResourceSteps = 'step1' | 'step2'; - -export interface PublishResourceContext - extends UseStepperReturn<PublishResourceSteps, PublishResourceSteps[], PublishResourceSteps> { - form: UnwrapNestedRefs<{ - categoryId: string; - title: string; - resourceIntros: string; - resourceCount: number; - cities: number[]; - citiesList: number[]; - intendedDeliveryCity: number[]; - intendedDeliveryCityList: number[]; - isLimitDeliveryCity: boolean; - cooperationFee: string; - isSyncCircleFriend: boolean; - status: ResourceStatus; - checkRemark: string; - industryTypeId: string; - isOpenOnlineTrade: boolean; - }>; - resourceId: string; - resourceOperateBtnStatus: ResourceOperateBtnStatus; - isEdit: Ref<boolean>; -} - -export const PublishResourceContextKey: InjectionKey<PublishResourceContext> = Symbol( - 'PublishResourceContextKey' -); - -export function usePublishResourceContext() { - return inject(PublishResourceContextKey); -} diff --git a/apps/cMiniApp/src/subpackages/resource/publishResource/publishResource.config.ts b/apps/cMiniApp/src/subpackages/resource/publishResource/publishResource.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/resource/publishResource/publishResource.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/resource/publishResource/publishResource.vue b/apps/cMiniApp/src/subpackages/resource/publishResource/publishResource.vue deleted file mode 100644 index 45f0cd4..0000000 --- a/apps/cMiniApp/src/subpackages/resource/publishResource/publishResource.vue +++ /dev/null @@ -1,54 +0,0 @@ -<template> - <PageLayout - class="publishResource-page-wrapper" - :title="`鍙戝竷璧勬簮(${stepperInfo.index.value + 1}/${stepperInfo.steps.value.length})`" - hasBorder - > - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; -import { PublishResourceContextKey } from './context'; -import { ResourceStatus } from '@12333/constants'; -import { useStepper } from 'senin-mini/hooks'; -import Taro from '@tarojs/taro'; -import { ResourceOperateBtnStatus } from '@12333/constants'; - -const router = Taro.useRouter(); -const resourceId = router.params?.id ?? ''; -const resourceOperateBtnStatus = router.params?.resourceOperateBtnStatus ?? ''; -const isEdit = computed(() => { - return Number(resourceOperateBtnStatus) === ResourceOperateBtnStatus.Edit; -}); - -const form = reactive({ - categoryId: '', - title: '', - resourceIntros: '', - resourceCount: '' as any as number, - cities: [] as number[], - citiesList: [] as number[], - intendedDeliveryCity: [] as number[], - intendedDeliveryCityList: [] as number[], - isLimitDeliveryCity: true, - cooperationFee: '', - isSyncCircleFriend: true, - status: '' as any as ResourceStatus, - checkRemark: '', - industryTypeId: '', - isOpenOnlineTrade: false, -}); - -const stepperInfo = useStepper(['step1', 'step2']); - -provide(PublishResourceContextKey, { - form, - resourceId, - resourceOperateBtnStatus: Number(resourceOperateBtnStatus) as ResourceOperateBtnStatus, - isEdit, - ...stepperInfo, -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/resource/resourceDetail/resourceDetail.config.ts b/apps/cMiniApp/src/subpackages/resource/resourceDetail/resourceDetail.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/resource/resourceDetail/resourceDetail.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/resource/resourceDetail/resourceDetail.vue b/apps/cMiniApp/src/subpackages/resource/resourceDetail/resourceDetail.vue deleted file mode 100644 index 476f4a3..0000000 --- a/apps/cMiniApp/src/subpackages/resource/resourceDetail/resourceDetail.vue +++ /dev/null @@ -1,210 +0,0 @@ -<template> - <PageLayoutWithBg title="璧勬簮璇︽儏" class="resourceDetail-page-wrapper" :need-auth="false"> - <LoadingLayout :loading="isLoading" :error="isError" :loadError="refetch"> - <ContentScrollView style="background-color: transparent"> - <Cell :title="detail?.title ?? ''" titleSize="large"> - <div class="orderDetail-industryTypeName"> - {{ detail?.industryTypeName ?? '' }} - </div> - <div class="detail-page-avatar-wrapper"> - <CardAvatar - :src="detail?.avatarUrl" - :name="detail?.contact" - :jobTitle="detail?.jobTitle" - :isCertified="detail?.isCertified" - :userId="detail?.userId" - /> - <div class="detail-page-time"> - 鍙戝竷浜庯細{{ format(detail?.lastShelfTime, 'YYYY-MM-DD HH:mm') }} - </div> - </div> - </Cell> - <Cell title="鍩烘湰淇℃伅"> - <div class="detail-info-list"> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">浜や粯浜烘暟锛�</div> - <div class="detail-info-list-item-content">{{ detail?.resourceCount ?? 0 }}浜�</div> - </div> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">璧勬簮鍩庡競锛�</div> - <div class="detail-info-list-item-content"> - {{ cities }} - </div> - </div> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">鎰忓悜鍩庡競锛�</div> - <div class="detail-info-list-item-content"> - {{ intendedDeliveryCities }} - </div> - </div> - <div class="detail-info-list-item"> - <div class="detail-info-list-item-label">鍚堜綔璐圭敤锛�</div> - <div class="detail-info-list-item-content">{{ detail?.cooperationFee ?? '' }}</div> - </div> - </div> - </Cell> - <Cell title="璧勬簮浠嬬粛"> - <div class="detail-introduction"> - {{ resourceIntros }} - </div> - </Cell> - <Cell> - <template #title> - <div class="safe-cell-title-wrapper"> - <img :src="IconSafe" class="safe-cell-title-icon" /> - <div class="safe-cell-title">瀹夊叏鎻愮ず</div> - </div> - </template> - <div class="safe-cell-content"> - 璇ヤ俊鎭敱鐢ㄦ埛鑷富鍙戝竷锛屽閬囪櫄鍋囦俊鎭�佽瘓楠椼�佷紶閿�绛夎繚娉曡繚瑙勮涓猴紝璇风珛鍗� - <div class="safe-cell-content-btn" @click="goComplaint">鎶曡瘔涓炬姤</div> - </div> - </Cell> - </ContentScrollView> - <PageFooter> - <PageFooterAction - :icon="IconShare" - text="鍒嗕韩" - :isFlex="false" - openType="share" - ></PageFooterAction> - - <PageFooterBtn v-if="isSelf || isCollapse" type="primary" @click="makePhoneCall">{{ - contactPhone - }}</PageFooterBtn> - <PageFooterBtn v-else type="primary" @click="handleGoAcontact">鍘诲鎺�</PageFooterBtn> - </PageFooter> - </LoadingLayout> - </PageLayoutWithBg> -</template> - -<script setup lang="ts"> -import Taro from '@tarojs/taro'; -import { useQuery } from '@tanstack/vue-query'; -import { useUserStore } from '@/stores/modules/user'; -import { - useUser, - useAccessLogin, - useToggleMatchMakingIdentityOnLaunch, - useAccessPersonalInfo, -} from '@/hooks'; -import { MatchMakingIdentityEnum, EditorType } from '@12333/constants'; -import * as resourceServices from '@12333/services/api/Resource'; -import IconSafe from '@/assets/order/icon-safe.png'; -import IconShare from '@/assets/order/icon-share.png'; -import { OrderUtils, filterJoin, setOSSLink, format } from '@12333/utils'; -import { useAllAreaList } from '@12333/hooks'; -import { useToggle } from 'senin-mini/hooks'; -import * as orderServices from '@12333/services/api/Order'; - -defineOptions({ - name: 'resourceDetail', -}); - -const router = Taro.useRouter(); -const resourceId = router.params?.id ?? ''; - -const { userDetail } = useUser(); - -const { findAreaNameFromCode } = useAllAreaList(); - -useToggleMatchMakingIdentityOnLaunch({ - matchMakingIdentity: MatchMakingIdentityEnum.Employing, -}); - -const { - isLoading, - data: detail, - isError, - refetch, -} = useQuery({ - queryKey: ['resourceServices/getFrontResourceInfo', resourceId], - queryFn: async () => { - return await resourceServices.getFrontResourceInfo( - { id: resourceId }, - { - showLoading: false, - } - ); - }, - placeholderData: () => ({} as API.ResourceFrontInfoDto), - onSuccess(data) { - if (data.isExistTradeChatRecord) setTrue(); - }, -}); - -const isSelf = computed(() => userDetail.value?.userId === detail.value?.userId); - -const cities = computed(() => { - return detail.value.cities - ?.map((x) => `${findAreaNameFromCode(x.provinceCode)}${x.areaName}`) - .join('銆�'); -}); - -const intendedDeliveryCities = computed(() => { - return detail.value.intendedDeliveryCities - ?.map((x) => `${findAreaNameFromCode(x.provinceCode)}${x.areaName}`) - .join('銆�'); -}); - -const resourceIntros = computed(() => { - if (detail.value?.resourceIntros?.length > 0) { - return detail.value?.resourceIntros.find((x) => x.type === EditorType.Text)?.content ?? ''; - } - return ''; -}); - -const contactPhone = computed(() => { - if (detail.value) { - return detail.value?.parkOrHRSimpleInfo?.contactPhone - ? detail.value?.parkOrHRSimpleInfo?.contactPhone - : detail.value?.contactNumber - ? detail.value?.contactNumber - : ''; - } - return ''; -}); - -Taro.showShareMenu({ - showShareItems: ['shareAppMessage', 'shareTimeline'], -}); - -Taro.useShareAppMessage((res) => { - return { - title: detail.value?.title ?? '', - }; -}); - -function goComplaint() { - Taro.navigateTo({ - url: `${RouterPath.complaint}?id=${resourceId}`, - }); -} - -const { isCollapse, setTrue } = useToggle(); - -const handleGoAcontact = useAccessPersonalInfo(async () => { - try { - let res = await orderServices.addTradeChatRecord({ - relationalId: resourceId, - applyUserId: userDetail.value?.userId, - }); - if (res) { - setTrue(); - } - } catch (error) {} -}); - -const makePhoneCall = useAccessPersonalInfo(() => { - if (contactPhone.value) { - Taro.makePhoneCall({ - phoneNumber: contactPhone.value, - }); - } -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -@import '../../order/orderDetail/common.scss'; -</style> diff --git a/apps/cMiniApp/src/subpackages/setting/constants/index.ts b/apps/cMiniApp/src/subpackages/setting/constants/index.ts deleted file mode 100644 index f593671..0000000 --- a/apps/cMiniApp/src/subpackages/setting/constants/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export enum ManageActions { - Edit = 1, - Detail, - Publish, - Stop, - Copy, - Delete, -} diff --git a/apps/cMiniApp/src/subpackages/setting/cooperation/cooperation.config.ts b/apps/cMiniApp/src/subpackages/setting/cooperation/cooperation.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/cooperation/cooperation.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/cooperation/cooperation.vue b/apps/cMiniApp/src/subpackages/setting/cooperation/cooperation.vue deleted file mode 100644 index 9e9d4ba..0000000 --- a/apps/cMiniApp/src/subpackages/setting/cooperation/cooperation.vue +++ /dev/null @@ -1,120 +0,0 @@ -<template> - <PageLayout title="骞冲彴鍚堜綔" class="cooperation-page-wrapper" hasBorder> - <ContentScrollView :paddingH="false"> - <nut-form :model-value="form" ref="formRef" :rules="rules"> - <nut-form-item label="浼佷笟鍚嶇О:" class="bole-form-item" prop="companyName" required> - <nut-input - v-model.trim="form.companyName" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヤ紒涓氬悕绉�" - type="text" - :max-length="35" - show-word-limit - /> - </nut-form-item> - <nut-form-item label="鑱旂郴浜�:" class="bole-form-item" prop="contact" required> - <nut-input - v-model.trim="form.contact" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ仈绯讳汉濮撳悕" - type="text" - :max-length="10" - show-word-limit - /> - </nut-form-item> - <nut-form-item label="鑱旂郴鐢佃瘽:" class="bole-form-item" prop="contactPhone" required> - <nut-input - v-model.trim="form.contactPhone" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ仈绯讳汉鐢佃瘽" - type="text" - /> - </nut-form-item> - <nut-form-item label="鍚堜綔澶囨敞:" class="bole-form-item alignTop" prop="remark" required> - <nut-textarea - placeholder="璇疯緭鍏ュ娉ㄥ唴瀹�" - placeholderClass="bole-input-text-placeholder" - autoSize - class="bole-input-textarea" - v-model="form.remark" - :max-length="500" - show-word-limit - > - </nut-textarea> - </nut-form-item> - </nut-form> - </ContentScrollView> - <PageFooter :isOnlyAction="false"> - <PageFooterBtn type="primary" @click="handleConfirm">鎻愪氦</PageFooterBtn> - </PageFooter> - </PageLayout> -</template> - -<script setup lang="ts"> -import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; -import * as cooperationApplyServices from '@12333/services/api/CooperationApply'; -import { CooperateTypeText, CooperateApplyTypeEnum } from '@12333/constants'; -import { FormValidator, Message } from '@12333/utils'; -import Taro from '@tarojs/taro'; -import { useUser } from '@/hooks'; - -defineOptions({ - name: 'cooperation', -}); - -const { userDetail } = useUser(); - -const form = reactive({ - companyName: userDetail.value?.customerName ?? '', - contact: userDetail.value?.contacter ?? '', - contactPhone: userDetail.value?.phoneNumber ?? '', - remark: '', -}); - -const rules = reactive<FormRules>({ - companyName: [{ required: true, message: '璇疯緭鍏ヤ紒涓氬悕绉�' }], - contact: [{ required: true, message: '璇疯緭鍏ヨ仈绯讳汉濮撳悕' }], - contactPhone: [ - { required: true, message: '璇疯緭鍏ヨ仈绯荤數璇�' }, - { message: '璇疯緭鍏ユ纭殑鑱旂郴鐢佃瘽', validator: FormValidator.validatorTelNumber }, - ], - remark: [{ required: true, message: '璇疯緭鍏ュ娉ㄥ唴瀹�' }], -}); - -const formRef = ref<any>(null); - -function handleConfirm() { - if (!formRef.value) return; - formRef.value.validate().then(({ valid, errors }: any) => { - if (valid) { - createPlatformCooperationApply(); - } - }); -} - -async function createPlatformCooperationApply() { - try { - let params: API.CreatePlatformCooperationApplyInput = { - title: CooperateTypeText.Platform, - contact: form.contact, - contactPhone: form.contactPhone, - applyDescription: form.remark, - companyName: form.companyName, - applyType: CooperateApplyTypeEnum.Platform, - }; - let res = await cooperationApplyServices.createPlatformCooperationApply(params); - if (res) { - await Message.confirm({ - message: '淇℃伅宸叉彁浜わ紝璇疯�愬績绛夊緟宸ヤ綔浜哄憳鐨勮仈绯�', - }); - Taro.navigateBack({ - delta: 1, - }); - } - } catch (error) {} -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -</style> diff --git a/apps/cMiniApp/src/subpackages/setting/faq/faq.vue b/apps/cMiniApp/src/subpackages/setting/faq/faq.vue deleted file mode 100644 index 0395907..0000000 --- a/apps/cMiniApp/src/subpackages/setting/faq/faq.vue +++ /dev/null @@ -1,11 +0,0 @@ -<template> - <web-view src="https://www.81812333.com/Help/FAQDetail/df790372-5284-d9e4-00c6-3a1608300e72" /> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; - -defineOptions({ - name: 'faq', -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/orderManage/InnerPage.vue b/apps/cMiniApp/src/subpackages/setting/orderManage/InnerPage.vue deleted file mode 100644 index 492147f..0000000 --- a/apps/cMiniApp/src/subpackages/setting/orderManage/InnerPage.vue +++ /dev/null @@ -1,138 +0,0 @@ -<template> - <ProTabs - v-model="queryState.status" - flexTitle - name="orderManage-tab" - :showPaneContent="false" - class="orderManage-tabs" - > - <ProTabPane - :title="`${OrderStatusText[OrderStatus.Passed]}(${passedCount})`" - :pane-key="OrderStatus.Passed" - ></ProTabPane> - <ProTabPane - :title="`${OrderStatusText[OrderStatus.WaitToAudit]}(${waitToAuditCount})`" - :pane-key="OrderStatus.WaitToAudit" - ></ProTabPane> - <ProTabPane - :title="`${OrderStatusText[OrderStatus.OffShelf]}(${offShelfCount})`" - :pane-key="OrderStatus.OffShelf" - ></ProTabPane> - <ProTabPane - :title="`${OrderStatusText[OrderStatus.Reject]}(${rejectCount})`" - :pane-key="OrderStatus.Reject" - ></ProTabPane> - </ProTabs> - <InfiniteLoading - :key="queryState.status" - scrollViewClassName="common-infinite-scroll-list" - v-bind="infiniteLoadingProps" - > - <template #renderItem="{ item }"> - <OrderManageCard - :title="item.orderName" - :hireType="item.hireType" - :hireNumber="item.hireNumber" - :hireEndNumber="item.hireEndNumber" - :ageStart="item.ageStart" - :ageEnd="item.ageEnd" - :provinceName="item.provinceName" - :cityName="item.cityName" - :time="item.creationTime" - :orderSupplierRefundInfo="item.orderSupplierRefundInfo" - :integratedSalary="item.integratedSalary" - :status="item.status" - @edit="handleEdit(item)" - @stop="handleStop(item)" - @delete="handleDelete(item)" - @detail="handleGoDetail(item)" - @publish="handleRePublish(item)" - @copy="handleCopy(item)" - > - </OrderManageCard> - </template> - </InfiniteLoading> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading } from '@12333/hooks'; -import * as orderServices from '@12333/services/api/Order'; -import { - OrderInputType, - IndustryCategoryType, - OrderStatusText, - OrderStatus, -} from '@12333/constants'; -import { useAccessPersonalInfo, useCategoryMenu, useOrderActions } from '@/hooks'; -import { CategoryUtils } from '@12333/utils'; -import Taro from '@tarojs/taro'; -import { ProTabs, ProTabPane } from '@12333/components'; - -const queryState = reactive({ - categoryId: '', - status: OrderStatus.Passed, -}); - -const { ensureCategoryMenu, categoryMenuList: industryServicesCategoryList } = useCategoryMenu({ - type: IndustryCategoryType.IndustryServices, -}); - -onMounted(async () => { - await ensureCategoryMenu(); - queryState.categoryId = industryServicesCategoryList.value.find((x) => - CategoryUtils.isIHasOrder(x.name) - ).id; -}); - -const objectData = ref<{ status: OrderStatus; count: number }[]>([]); - -const { infiniteLoadingProps, invalidateQueries } = useInfiniteLoading( - async ({ pageParam }) => { - let params: API.MyOrderListInput = { - pageModel: { - rows: 20, - page: pageParam, - orderInput: [{ property: 'id', order: OrderInputType.Desc }], - }, - categoryId: queryState.categoryId, - status: queryState.status, - }; - - let res = await orderServices.getMyOrderList(params, { - showLoading: false, - }); - objectData.value = res.objectData; - return res; - }, - { - queryKey: ['orderServices/getMyOrderList', queryState], - enabled: computed(() => !!queryState.categoryId), - } -); - -const passedCount = computed( - () => objectData.value?.find?.((x) => x.status === OrderStatus.Passed)?.count ?? 0 -); - -const waitToAuditCount = computed( - () => objectData.value?.find?.((x) => x.status === OrderStatus.WaitToAudit)?.count ?? 0 -); - -const offShelfCount = computed( - () => objectData.value?.find?.((x) => x.status === OrderStatus.OffShelf)?.count ?? 0 -); - -const rejectCount = computed( - () => objectData.value?.find?.((x) => x.status === OrderStatus.Reject)?.count ?? 0 -); - -const { handleEdit, handleGoDetail, handleStop, handleRePublish, handleCopy, handleDelete } = - useOrderActions({ - onStopSuccess() { - invalidateQueries(); - }, - onDeleteSuccess() { - invalidateQueries(); - }, - }); -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/orderManage/orderManage.config.ts b/apps/cMiniApp/src/subpackages/setting/orderManage/orderManage.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/orderManage/orderManage.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/orderManage/orderManage.vue b/apps/cMiniApp/src/subpackages/setting/orderManage/orderManage.vue deleted file mode 100644 index b7d5094..0000000 --- a/apps/cMiniApp/src/subpackages/setting/orderManage/orderManage.vue +++ /dev/null @@ -1,10 +0,0 @@ -<template> - <PageLayout class="orderManage-page-wrapper" title="涓氬姟绠$悊" hasBorder> - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/privacyAgreement/privacyAgreement.config.ts b/apps/cMiniApp/src/subpackages/setting/privacyAgreement/privacyAgreement.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/privacyAgreement/privacyAgreement.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/privacyAgreement/privacyAgreement.vue b/apps/cMiniApp/src/subpackages/setting/privacyAgreement/privacyAgreement.vue deleted file mode 100644 index 3ebe650..0000000 --- a/apps/cMiniApp/src/subpackages/setting/privacyAgreement/privacyAgreement.vue +++ /dev/null @@ -1,171 +0,0 @@ -<template> - <PageLayout title="闅愮鍗忚" class="userPolicy-page-wrapper"> - <scroll-view style="height: 100%" :scroll-y="true"> - <div class="userPolicy-page-scrollview-content"> - <div class="userPolicy-page-title">818浜哄姏璧勬簮浜т笟閾惧钩鍙扮敤鎴锋湇鍔¢殣绉佹斂绛�</div> - <UserPolicyCell title="1銆侀�傜敤鑼冨洿锛�"> - <div> - 1锛夊湪鐢ㄦ埛娉ㄥ唽818浜哄姏璧勬簮浜т笟閾惧钩鍙拌处鎴锋椂锛堜互涓嬬畝绉扳�滃钩鍙扳�濓級锛岀敤鎴锋牴鎹钩鍙拌姹傛彁渚涚殑鐩稿叧涓汉淇℃伅锛� - </div> - <div> - 2锛夊湪鐢ㄦ埛浣跨敤骞冲彴鏈嶅姟锛屽弬鍔犲钩鍙版椿鍔紝鎴栬闂钩鍙扮綉绔欐椂锛屽钩鍙板皢鑷姩鎺ユ敹骞惰褰曠殑鐢ㄦ埛娴忚鍣ㄤ笂鐨勬湇鍔″櫒鏁板�硷紝鍖呮嫭浣嗕笉闄愪簬IP鍦板潃绛夋暟鎹強鐢ㄦ埛瑕佹眰鍙栫敤鐨勭綉椤�/瀹㈡埛绔褰曪紱 - </div> - <div> - 3锛夊钩鍙版敹闆嗗埌鐨勭敤鎴峰湪骞冲彴杩涜浜ゆ槗鐨勬湁鍏虫暟鎹紝鍖呮嫭浣嗕笉闄愪簬鍑轰环銆佽喘涔般�佷骇鍝佺櫥褰曘�佷俊鐢ㄨ瘎浠峰強杩濊璁板綍锛� - </div> - <div>4锛夊钩鍙伴�氳繃鍚堟硶閫斿緞浠庡晢涓氫紮浼村鍙栧緱鐨勭敤鎴蜂釜浜烘暟鎹��</div> - <div> - 5锛夋垜浠敹闆嗘暟鎹槸鏍规嵁鎮ㄤ笌鎴戜滑鐨勪簰鍔ㄥ拰鎮ㄦ墍鍋氬嚭鐨勯�夋嫨锛屽寘鎷偍鐨勯殣绉佽缃互鍙婃偍浣跨敤鐨勪骇鍝佸拰鍔熻兘銆傛垜浠敹闆嗙殑鏁版嵁鍙兘鍖呮嫭SDK/API/JS浠g爜鐗堟湰銆佹祻瑙堝櫒銆佷簰鑱旂綉鏈嶅姟鎻愪緵鍟嗐�両P鍦板潃銆佸钩鍙般�佹椂闂存埑銆佸簲鐢ㄦ爣璇嗙銆佸簲鐢ㄧ▼搴忕増鏈�佸簲鐢ㄥ垎鍙戞笭閬撱�佺嫭绔嬭澶囨爣璇嗙銆乮OS骞垮憡鏍囪瘑绗︼紙IDFA)銆佸畨鍗撳箍鍛婁富鏍囪瘑绗︺�佺綉鍗★紙MAC锛夊湴鍧�銆佸浗闄呯Щ鍔ㄨ澶囪瘑鍒爜锛圛MEI锛夈�佽澶囧瀷鍙枫�佺粓绔埗閫犲巶鍟嗐�佺粓绔澶囨搷浣滅郴缁熺増鏈�佷細璇濆惎鍔�/鍋滄鏃堕棿銆佽瑷�鎵�鍦ㄥ湴銆佹椂鍖哄拰缃戠粶鐘舵�侊紙WiFi绛夛級绛夈�� - </div> - </UserPolicyCell> - <UserPolicyCell title="2銆佷俊鎭娇鐢細"> - <div>1锛夊钩鍙颁笉浼氬悜浠讳綍浜哄嚭鍞垨鍑哄�熺敤鎴风殑涓汉淇℃伅锛岄櫎闈炰簨鍏堝緱鍒扮敤鎴峰緱璁稿彲銆�</div> - <div> - 2锛夊钩鍙颁害涓嶅厑璁镐换浣曠涓夋柟浠ヤ换浣曟墜娈垫敹闆嗐�佺紪杈戙�佸嚭鍞垨鑰呮棤鍋夸紶鎾敤鎴风殑涓汉淇℃伅銆備换浣曠敤鎴峰浠庝簨涓婅堪娲诲姩锛屼竴缁忓彂鐜帮紝骞冲彴鏈夋潈绔嬪嵆缁堟涓庤鐢ㄦ埛鐨勬湇鍔″崗璁紝鏌ュ皝鍏惰处鍙枫�� - </div> - <div> - 3锛変负鏈嶅姟鐢ㄦ埛鐨勭洰鐨勶紝骞冲彴鍙兘閫氳繃浣跨敤鐢ㄦ埛鐨勪釜浜轰俊鎭紝鍚戠敤鎴锋彁渚涙湇鍔″強浜у搧鏀硅繘锛屽寘鎷絾涓嶉檺浜庡悜鐢ㄦ埛鍙戝嚭浜у搧鍜屾湇鍔′俊鎭紝鎴栬�呬笌骞冲彴鍚堜綔浼欎即鍏变韩淇℃伅浠ヤ究浠栦滑鍚戠敤鎴峰彂閫佹湁鍏冲叾浜у搧鍜屾湇鍔$殑淇℃伅锛堝悗鑰呴渶瑕佺敤鎴风殑浜嬪厛鍚屾剰锛夈�備緥濡傦紝鎴戜滑鑱樿鏉ユ彁渚涙暟鎹垎鏋愭湇鍔$殑鍏徃鍙兘闇�瑕侀噰闆嗗拰璁块棶涓汉鏁版嵁浠ヨ繘琛屾暟鎹粺璁″拰鍒嗘瀽銆傚湪杩欑鎯呭喌涓嬶紝杩欎簺鍏徃蹇呴』閬靛畧鎴戜滑鐨勬暟鎹殣绉佸拰瀹夊叏瑕佹眰銆� - </div> - <div> - 4锛夋垜浠凡鍦ㄤ笂鏂囦粙缁嶄簡澶勭悊涓汉鏁版嵁鐨勭洰鐨勩�傛垜浠鐞嗕釜浜烘暟鎹殑娉曞緥鍩虹鍖呮嫭锛氫负灞ヨ涓庢偍涔嬮棿鐨勫悎鍚岋紙渚嬪锛屼负鎮ㄦ彁渚涙偍鎵�璇锋眰鐨勬湇鍔°�佸鎮ㄨ繘琛岃瘑鍒拰璁よ瘉锛屼互渚挎偍鍙互浣跨敤缃戠珯锛夛紱涓洪伒瀹堟硶寰嬭姹傦紙渚嬪锛屼负閬靛畧閫傜敤鐨勪細璁¤鍒欙紝灞ヨ鎵ф硶閮ㄩ棬寮哄埗鎶湶鐨勮姹傦級锛涗负淇濇姢鎴戜滑鐨勬褰撳埄鐩婏紙渚嬪锛岀鐞嗘垜浠笌鎮ㄧ殑鍏崇郴锛屼负纭繚鎴戜滑鏈嶅姟鐨勫畨鍏ㄦ�э紝涓庢偍娌熼�氭垜浠殑浜у搧鍜屾湇鍔★級锛涗互鍙婂熀浜庢垜浠鎴风殑鍚屾剰锛堜緥濡傦紝鎶曟斁cookies锛屼负骞垮憡瀹d紶涔嬬洰鐨勪笌绗笁鏂瑰叡浜偍鐨勪俊鎭級銆傚湪鏌愪簺鎯呭喌涓嬶紝鎮ㄥ彲鑳介渶瑕佷负鎴戜滑鎻愪緵涓汉鏁版嵁浠ヨ繘琛屼笂杩扮殑澶勭悊锛屼互渚挎垜浠兘澶熶负鎮ㄦ彁渚涙垜浠殑鍏ㄩ儴鏈嶅姟锛屽苟鏂逛究鎮ㄤ娇鐢ㄦ垜浠綉绔欑殑鍏ㄩ儴鍔熻兘銆� - </div> - <div> - 5锛変釜浜烘暟鎹殑璺ㄥ浼犺緭銆傞拡瀵规鐩熸垚鍛樺浗鐢ㄦ埛锛屾垜浠殑涓氬姟鍙兘闇�瑕佹垜浠浆绉绘偍鐨勪釜浜烘暟鎹嚦娆ф床缁忔祹鍖轰互澶栫殑鍥藉锛堜腑鍥斤級銆傛垜浠細閲囧彇閫傚綋鐨勬帾鏂戒互纭繚鎮ㄤ釜浜烘暟鎹殑鎺ユ敹鑰呭饱琛屼繚瀵嗕箟鍔★紝骞剁‘淇濆鏍囧噯鍚堝悓鏉℃绛夋帾鏂界殑鎵ц銆傛偍鍙互閫氳繃鑱旂郴鎴戜滑鐨勫府鍔╀腑蹇冭幏寰楄繖浜涙潯娆俱�� - </div> - <div> - 6锛夐拡瀵规鐩熸垚鍛樺浗鐢ㄦ埛锛屾牴鎹�傜敤娉曞緥锛屾偍鏈夋潈鍙嶅鎴栬姹傞檺鍒跺鎮ㄤ釜浜烘暟鎹殑澶勭悊锛屽苟瑕佹眰鎮ㄦ湰浜烘暟鎹殑璁块棶銆佹牎姝c�佸垹闄ゅ拰鍙惡甯︽潈銆傚湪瀵规偍鐨勪俊鎭殑浣跨敤鏄熀浜庢偍鐨勫悓鎰忕殑鎯呭喌涓嬶紝鎮ㄦ湁鏉冨湪浠讳綍鏃跺�欐挙鍥炶鍚屾剰锛屼絾鍚屾剰鐨勬挙鍥炰笉褰卞搷鎾ゅ洖鍓嶅熀浜庡悓鎰忚繘琛岀殑鏁版嵁澶勭悊鐨勫悎娉曟�с�傛偍鍙互閫氳繃瀹㈡湇鐢佃瘽锛�16505012333鍚戞垜浠彁浜ゆ偍鐨勮姹傘�傚鏋滄偍鍙戠幇鎮ㄧ殑淇℃伅鍙戠敓鍙樺寲鎴栦笉鍑嗙‘锛岃灏嗚繖浜涘彉鍖栭�氱煡鎴戜滑浠ヤ究鎴戜滑鐨勮褰曞彲浠ヨ鏇存柊鎴栨洿姝c�傚鏋滄偍璁や负鎴戜滑瀵规偍涓汉鏁版嵁鐨勫鐞嗚繚鍙嶄簡閫傜敤娉曞緥锛屾偍鍙互鍚戠洃绠℃満鏋勬姇璇夈�傛垜浠鎮ㄤ釜浜烘暟鎹殑淇濈暀鏃堕棿瑙嗗悜鎮ㄦ彁渚涙湇鍔℃垨浜у搧鐨勯渶瑕佽�屽畾锛屾垨鏍规嵁閫傜敤娉曞緥濡傜◣娉曞拰浼氳娉曠殑瑕佹眰鎴栬鍙‘瀹氥�� - </div> - </UserPolicyCell> - <UserPolicyCell title="3銆佷俊鎭姭闇诧紝鐢ㄦ埛鐨勪釜浜轰俊鎭皢鍦ㄤ笅杩版儏鍐典笅閮ㄥ垎鎴栧叏閮ㄨ鎶湶锛�"> - <div>1锛夌粡鐢ㄦ埛鍚屾剰锛屽悜绗笁鏂规姭闇诧紱</div> - <div> - 2锛夊鐢ㄦ埛鏄鍚堣祫鏍肩殑鐭ヨ瘑浜ф潈鎶曡瘔浜哄苟宸叉彁璧锋姇璇夛紝搴旇鎶曡瘔浜鸿姹傦紝鍚戣鎶曡瘔浜烘姭闇诧紝浠ヤ究鍙屾柟澶勭悊鍙兘鐨勬潈鍒╃籂绾凤紱 - </div> - <div> - 3锛夋牴鎹硶寰嬬殑鏈夊叧瑙勫畾锛屾垨鑰呰鏀挎垨鍙告硶鏈烘瀯鐨勮姹傦紝鍚戠涓夋柟鎴栬�呰鏀裤�佸徃娉曟満鏋勬姭闇诧紱 - </div> - <div>4锛夊鏋滅敤鎴峰嚭鐜拌繚鍙嶄腑鍥芥湁鍏虫硶寰嬫垨鑰呯綉绔欐斂绛栫殑鎯呭喌锛岄渶瑕佸悜绗笁鏂规姭闇诧紱</div> - <div>5锛変负鎻愪緵鎮ㄦ墍瑕佹眰鐨勪骇鍝佸拰鏈嶅姟锛岃�屽繀椤诲拰绗笁鏂瑰垎浜敤鎴风殑涓汉淇℃伅锛�</div> - <div> - 6锛夊湪骞冲彴缃戜笂鍒涘缓鐨勬煇涓�浜ゆ槗涓紝濡備氦鏄撲换浣曚竴鏂瑰饱琛屾垨閮ㄥ垎灞ヨ浜嗕氦鏄撲箟鍔″苟鎻愬嚭淇℃伅鎶湶璇锋眰鐨勶紝骞冲彴鏈夊叏鏉冨彲浠ュ喅瀹氬悜璇ョ敤鎴锋彁渚涘叾浜ゆ槗瀵规柟鐨勮仈缁滄柟寮忕瓑蹇呰淇℃伅锛屼互淇冩垚浜ゆ槗鐨勫畬鎴愭垨绾犵悍鐨勮В鍐筹紱 - </div> - <div>7锛夊叾瀹冨钩鍙版牴鎹硶寰嬫垨鑰呯綉绔欐斂绛栬涓哄悎閫傜殑鎶湶銆�</div> - </UserPolicyCell> - <UserPolicyCell title="4銆佷俊鎭畨鍏細"> - <div>1锛夊钩鍙板強骞冲彴璐︽埛鍧囨湁瀹夊叏淇濇姢鍔熻兘锛岃濡ュ杽淇濈鐢ㄦ埛鐨勮处鎴峰強瀵嗙爜淇℃伅锛�</div> - <div> - 2锛夊湪浣跨敤骞冲彴鏈嶅姟杩涜缃戜笂浜ゆ槗鏃讹紝鐢ㄦ埛涓嶅彲閬垮厤鐨勮鍚戜氦鏄撳鏂规垨娼滃湪鐨勪氦鏄撳鏂规彁渚涜嚜宸辩殑涓汉淇℃伅锛屽鑱旂粶鏂瑰紡鎴栬�呴偖鏀垮湴鍧�銆傝鐢ㄦ埛濡ュ杽淇濇姢鑷繁鐨勪釜浜轰俊鎭紝浠呭湪蹇呰鐨勬儏褰笅鍚戜粬浜烘彁渚涳紱 - </div> - <div> - 3锛夊鏋滅敤鎴峰彂鐜拌嚜宸辩殑涓汉淇℃伅娉勫瘑锛屽挨鍏舵槸骞冲彴璐︽埛鍙婂瘑鐮佸彂鐢熸硠闇诧紝璇风敤鎴风珛鍗宠仈缁滃钩鍙板鏈嶏紝浠ヤ究骞冲彴閲囧彇鐩稿簲鎺柦銆� - 濡傜敤鎴峰濡備綍鎾ゅ洖淇℃伅鎺堟潈鏈夌枒闂紝鍙互鍦ㄥ伐浣滄棩锛堝懆涓�鍒板懆浜� 鍙� - 娉曞畾鑺傚亣鏃ヨ皟鏁寸殑宸ヤ綔鏃ワ級宸ヤ綔鏃堕棿锛�09:00 -- 18:00锛� - 鑷寸數骞冲彴瀹㈡湇鐢佃瘽锛�16505012333锛岃瀹㈡湇浜哄憳鍗忓姪澶勭悊 - </div> - </UserPolicyCell> - <UserPolicyCell title="5銆佸浣曟敞閿�/鍒犻櫎璐︽埛"> - <div> - 1锛夌敤鎴峰彲浠ュ湪宸ヤ綔鏃ワ紙鍛ㄤ竴鍒板懆浜斿強娉曞畾鑺傚亣鏃ヨ皟鏁寸殑宸ヤ綔鏃ワ級宸ヤ綔鏃堕棿锛�09:00 -- 18:00锛� - 鑷寸數骞冲彴瀹㈡湇鐢佃瘽锛�16505012333锛屽憡鐭ュ鏈嶄汉鍛樻敞鍐岃处鎴蜂俊鎭�,骞跺憡鐭ュ鏈嶄汉鍛橀渶瑕佹敞閿�/鍒犻櫎涓汉鐢ㄦ埛淇℃伅锛岃嚧鐢电浜屾棩寮�濮嬭绠楋紝涓や釜宸ヤ綔鏃ュ唴鍔炵粨骞惰嚧鐢�/鐭俊閫氱煡鐢宠浜恒�� - </div> - <div> - 2锛夌敤鎴峰彲浠ヤ换浣曟椂闂达紝璁块棶骞冲彴鍙嶉涓績缃戦〉锛寃ww.81812333.com鍦ㄧ嚎鐣欒█锛屽鏈嶅伐浣滄棩鎺ユ敹淇℃伅鍚庯紝浼氳嚧鐢电敵璇蜂汉纭淇℃伅锛屽苟鍦ㄤ袱涓伐浣滄棩鍐呭姙缁撱�� - </div> - </UserPolicyCell> - <UserPolicyCell title="6銆丄PP鎵�鏀堕泦涓汉淇℃伅鐨勭洰鐨勩�佹柟寮忓拰鑼冨洿"> - <div>1锛夈�佸钩鍙版墍鏀堕泦鐨勪俊鎭紝浠呴檺浜庣敤鎴峰湪骞冲彴缃戝紑灞曞熀纭�涓氬姟娲诲姩銆�</div> - <div>2锛夈�佷俊鎭敹闆嗙殑鏂瑰紡鍜岃寖鍥�</div> - <div>鑾峰彇鎮ㄧ浉鍐屻�佺浉鏈虹殑鏉冮檺锛岀敤浜庝紒涓氫俊鎭�佽鍗曞彂甯冦�佷釜浜哄ご鍍忕殑鍥剧墖涓婁紶銆�</div> - <div> - 鑾峰彇鏈湴瀛樺偍鏉冮檺锛屾垜浠皢璇锋眰鎮ㄧ殑瀛樺偍鏉冮檺鑾峰彇澶栫疆瀛樺偍淇℃伅锛圫D鍗℃暟鎹級浠ヤ繚瀛樻偍鍦ㄥ钩鍙板崈璇㈢殑浣跨敤杩囩▼涓殑涓氬姟鏁版嵁銆� - </div> - <div> - 鑾峰彇鎮ㄧ殑璁惧淇℃伅锛堝寘鎷琁MEI銆佽澶囧簭鍒楀彿銆丱AID銆丮EID銆丄ndroid - ID銆両MSI銆丟UID銆丮AC鍦板潃銆丼IM鍗″簭鍒楀彿锛夛紝璁惧鐗瑰緛鐮佸拰IP鍦板潃锛屽凡瀹夎APP淇℃伅鎴栬繍琛屼腑鐨勮繘绋嬩俊鎭紝鏉ヤ繚璇佹偍璐﹀彿浣跨敤鐨勫敮涓�鎬с�佸畨鍏ㄦ�с�� - </div> - <div> - 褰撴偍鎾斁瑙嗛绛夊唴瀹规椂锛屼负浜嗛�傞厤鎮ㄧ殑璁惧鐘舵�侊紝鎴戜滑浼氳皟鐢ㄨ澶囩殑閲嶅姏銆佸姞閫熷害绛変紶鎰熷櫒淇℃伅锛屼互璇嗗埆鎮ㄧ殑璁惧妯珫灞忕姸鎬併�� - </div> - <div> - 鍦ㄦ偍鍒嗕韩鎴栨帴鏀惰鍒嗕韩鐨勪俊鎭椂锛岄渶瑕佸湪鏈湴璁块棶鎮ㄧ殑鍓垏鏉匡紝璇诲彇鍏朵腑鍖呭惈鐨勫彛浠ゃ�佸垎浜爜銆侀摼鎺ョ瓑锛屼互瀹炵幇璺宠浆銆佸垎浜�佹椿鍔ㄨ仈鍔ㄧ瓑鍔熻兘鎴栨湇鍔°�� - </div> - </UserPolicyCell> - <UserPolicyCell title="7銆佽嚜鍚姩鍜屽叧鑱斿惎鍔ㄨ鏄�"> - <div> - 涓虹‘淇濇湰搴旂敤澶勪簬鍏抽棴鎴栧悗鍙拌繍琛岀姸鎬佷笅鍙甯告帴鏀跺埌瀹㈡埛绔帹閫佺殑骞挎挱娑堟伅锛屾湰搴旂敤椤讳娇鐢紙鑷惎鍔級鑳藉姏锛屽皢瀛樺湪涓�瀹氶鐜囬�氳繃绯荤粺鍙戦�佸箍鎾敜閱掓湰搴旂敤鑷惎鍔ㄦ垨鍏宠仈鍚姩琛屼负锛屾槸鍥犲疄鐜板姛鑳藉強鏈嶅姟鎵�蹇呰鐨勩�� - </div> - </UserPolicyCell> - </div> - </scroll-view> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; - -defineOptions({ - name: 'privacyAgreement', -}); - -const UserPolicyCell = defineComponent({ - name: 'UserPolicyCell', - props: { - title: { - type: String, - }, - content: { - type: String, - }, - }, - setup(props, { slots }) { - return () => { - return h('div', { class: 'userPolicy-cell-wrapper' }, [ - h('div', { class: 'userPolicy-cell-title' }, [props.title]), - h('div', { class: 'userPolicy-cell-content' }, slots.default?.()), - ]); - }; - }, -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.userPolicy-page-wrapper { - background-color: #fafafa; - - .userPolicy-page-scrollview { - // flex: 1; - height: 100%; - box-sizing: border-box; - } - - .userPolicy-page-scrollview-content { - padding: 42px; - - .userPolicy-page-title { - margin-bottom: 40px; - } - } - - .userPolicy-cell-wrapper { - margin-bottom: 32px; - - .userPolicy-cell-title { - color: #292929; - font-size: 30px; - margin-bottom: 22px; - font-weight: 500; - } - - .userPolicy-cell-content { - div { - font-size: 24px; - line-height: 40px; - text-indent: 28px; - color: #888888; - } - } - } -} -</style> diff --git a/apps/cMiniApp/src/subpackages/setting/resourceManage/InnerPage.vue b/apps/cMiniApp/src/subpackages/setting/resourceManage/InnerPage.vue deleted file mode 100644 index aa6e7cb..0000000 --- a/apps/cMiniApp/src/subpackages/setting/resourceManage/InnerPage.vue +++ /dev/null @@ -1,111 +0,0 @@ -<template> - <ProTabs - v-model="queryState.status" - flexTitle - name="resourceManage-tab" - :showPaneContent="false" - class="resourceManage-tabs" - > - <ProTabPane - :title="`${ResourceStatusText[ResourceStatus.Running]}(${runningCount})`" - :pane-key="ResourceStatus.Running" - ></ProTabPane> - <ProTabPane - :title="`${ResourceStatusText[ResourceStatus.WaitAudit]}(${waitAuditCount})`" - :pane-key="ResourceStatus.WaitAudit" - ></ProTabPane> - <ProTabPane - :title="`${ResourceStatusText[ResourceStatus.OffShelf]}(${offShelfCount})`" - :pane-key="ResourceStatus.OffShelf" - ></ProTabPane> - <ProTabPane - :title="`${ResourceStatusText[ResourceStatus.Reject]}(${rejectCount})`" - :pane-key="ResourceStatus.Reject" - ></ProTabPane> - </ProTabs> - <InfiniteLoading - :key="queryState.status" - scrollViewClassName="common-infinite-scroll-list" - v-bind="infiniteLoadingProps" - > - <template #renderItem="{ item }"> - <ResourceManageCard - :title="item.title" - :time="item.creationTime" - :resourceCount="item.resourceCount" - :intendedDeliveryCities="item.intendedDeliveryCities" - :status="item.status" - @edit="handleEdit(item)" - @stop="handleStop(item)" - @delete="handleDelete(item)" - @detail="handleGoDetail(item)" - @publish="handleRePublish(item)" - @copy="handleCopy(item)" - > - </ResourceManageCard> - </template> - </InfiniteLoading> -</template> - -<script setup lang="ts"> -import { useInfiniteLoading } from '@12333/hooks'; -import * as resourceServices from '@12333/services/api/Resource'; -import { OrderInputType, ResourceStatusText, ResourceStatus } from '@12333/constants'; -import { useResourceActions } from '@/hooks'; -import Taro from '@tarojs/taro'; -import { ProTabs, ProTabPane } from '@12333/components'; - -const queryState = reactive({ - status: ResourceStatus.Running, -}); - -const objectData = ref<{ status: ResourceStatus; count: number }[]>([]); - -const { infiniteLoadingProps, invalidateQueries } = useInfiniteLoading( - async ({ pageParam }) => { - let params: API.GetMyResourceListInput = { - pageModel: { - rows: 20, - page: pageParam, - orderInput: [{ property: 'id', order: OrderInputType.Desc }], - }, - status: queryState.status, - }; - - let res = await resourceServices.getMyResourceList(params, { - showLoading: false, - }); - objectData.value = res.objectData; - return res; - }, - { - queryKey: ['resourceServices/getMyResourceList', queryState], - } -); - -const runningCount = computed( - () => objectData.value?.find?.((x) => x.status === ResourceStatus.Running)?.count ?? 0 -); - -const waitAuditCount = computed( - () => objectData.value?.find?.((x) => x.status === ResourceStatus.WaitAudit)?.count ?? 0 -); - -const offShelfCount = computed( - () => objectData.value?.find?.((x) => x.status === ResourceStatus.OffShelf)?.count ?? 0 -); - -const rejectCount = computed( - () => objectData.value?.find?.((x) => x.status === ResourceStatus.Reject)?.count ?? 0 -); - -const { handleEdit, handleGoDetail, handleStop, handleRePublish, handleCopy, handleDelete } = - useResourceActions({ - onStopSuccess() { - invalidateQueries(); - }, - onDeleteSuccess() { - invalidateQueries(); - }, - }); -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/resourceManage/resourceManage.config.ts b/apps/cMiniApp/src/subpackages/setting/resourceManage/resourceManage.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/resourceManage/resourceManage.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/resourceManage/resourceManage.vue b/apps/cMiniApp/src/subpackages/setting/resourceManage/resourceManage.vue deleted file mode 100644 index 6a27346..0000000 --- a/apps/cMiniApp/src/subpackages/setting/resourceManage/resourceManage.vue +++ /dev/null @@ -1,10 +0,0 @@ -<template> - <PageLayout class="resourceManage-page-wrapper" title="涓氬姟绠$悊" hasBorder> - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/setting/setting.config.ts b/apps/cMiniApp/src/subpackages/setting/setting/setting.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/setting/setting.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/setting/setting.vue b/apps/cMiniApp/src/subpackages/setting/setting/setting.vue deleted file mode 100644 index ce638f0..0000000 --- a/apps/cMiniApp/src/subpackages/setting/setting/setting.vue +++ /dev/null @@ -1,74 +0,0 @@ -<template> - <PageLayout title="璁剧疆" class="setting-page-wrapper" hasBorder> - <List> - <!-- <ListItem :icon="IconAccount" title="涓汉淇℃伅" @click="goUserInfo"></ListItem> --> - <ListItem :icon="IconWarning" title="闅愮鍗忚" @click="goPrivacyAgreement"></ListItem> - <ListItem :icon="IconNote" title="淇℃伅鍙戝竷瑙勫垯" @click="goFaq"></ListItem> - <ListItem :icon="IconWx" title="寰俊鎺堟潈璁剧疆" @click="goWxSetting"></ListItem> - <ListItem :icon="IconCoo" title="骞冲彴鍚堜綔" @click="goCooperation"></ListItem> - <ListItem :icon="IconLoginout" title="閫�鍑虹櫥褰�" @click="handleLoginout"></ListItem> - </List> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import { List, ListItem } from '@12333/components'; -import IconWarning from '@/assets/setting/icon-warning.png'; -import IconCoo from '@/assets/setting/icon-coo.png'; -import IconLoginout from '@/assets/setting/icon-loginout.png'; -import IconNote from '@/assets/setting/icon-note.png'; -import IconWx from '@/assets/setting/icon-wx.png'; -import { Message } from '@12333/utils'; -import { useUserStore } from '@/stores/modules/user'; -import { useQueryClient } from '@tanstack/vue-query'; -import Taro from '@tarojs/taro'; - -defineOptions({ - name: 'setting', -}); - -const userStore = useUserStore(); -const queryClient = useQueryClient(); - -function goUserInfo() { - Taro.navigateTo({ - url: RouterPath.userInfo, - }); -} - -function goPrivacyAgreement() { - Taro.navigateTo({ - url: RouterPath.userPolicy, - }); -} - -function goCooperation() { - Taro.navigateTo({ - url: RouterPath.cooperation, - }); -} - -function goWxSetting() { - // Taro.navigateTo({ - // url: RouterPath.wxSetting, - // }); - Taro.openSetting({}); -} - -function goFaq() { - Taro.navigateTo({ - url: RouterPath.faq, - }); -} - -async function handleLoginout() { - try { - await Message.confirm({ - message: '纭畾瑕侀��鍑虹櫥褰曞悧锛�', - }); - userStore.logoutAndToHome(); - queryClient.removeQueries(); - } catch (error) {} -} -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/toggleMatchMakingIdentity/toggleMatchMakingIdentity.config.ts b/apps/cMiniApp/src/subpackages/setting/toggleMatchMakingIdentity/toggleMatchMakingIdentity.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/toggleMatchMakingIdentity/toggleMatchMakingIdentity.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/toggleMatchMakingIdentity/toggleMatchMakingIdentity.vue b/apps/cMiniApp/src/subpackages/setting/toggleMatchMakingIdentity/toggleMatchMakingIdentity.vue deleted file mode 100644 index 994a19b..0000000 --- a/apps/cMiniApp/src/subpackages/setting/toggleMatchMakingIdentity/toggleMatchMakingIdentity.vue +++ /dev/null @@ -1,100 +0,0 @@ -<template> - <PageLayout title="" class="toggleMatchMakingIdentity-page-wrapper" :need-auth="false"> - <ContentScrollView class="toggleMatchMakingIdentity-page-scroll-view"> - <img :src="OssAssets.setting.ToggleBg" class="toggleMatchMakingIdentity-page-bg" /> - <div class="toggleMatchMakingIdentity-page-title"> - 鎮ㄧ殑褰撳墠韬唤涓衡�渰{ MatchMakingIdentityEnumText[matchMakingIdentity] }}鈥� - </div> - <PageFooterBtn type="primary" class="toggleMatchMakingIdentity-page-btn" @click="handleSet" - >鍒囨崲涓衡�渰{ MatchMakingIdentityEnumText[toggledMatchMakingIdentity] }}鈥濊韩浠�</PageFooterBtn - > - <PageFooterBtn class="toggleMatchMakingIdentity-page-btn cancel" @click="goBack" - >鏆備笉鍒囨崲</PageFooterBtn - > - </ContentScrollView> - </PageLayout> -</template> - -<script setup lang="ts"> -import { MatchMakingIdentityEnumText, MatchMakingIdentityEnum } from '@12333/constants'; -import { useUser } from '@/hooks'; -import Taro from '@tarojs/taro'; -import { goBack, setMatchMakingIdentity } from '@/utils'; -import { useUserStore } from '@/stores/modules/user'; -import { Message } from '@12333/utils'; -import { OssAssets } from '@/constants'; - -defineOptions({ - name: 'toggleMatchMakingIdentity', -}); - -const { matchMakingIdentity, userDetail, isSetMatchMakingIdentity } = useUser(); -const userStore = useUserStore(); - -onMounted(() => { - if (!isSetMatchMakingIdentity.value) { - setMatchMakingIdentity(matchMakingIdentity.value); - userStore.isSetMatchMakingIdentity = true; - } -}); - -const toggledMatchMakingIdentity = computed(() => - matchMakingIdentity.value === MatchMakingIdentityEnum.Contributors - ? MatchMakingIdentityEnum.Employing - : MatchMakingIdentityEnum.Contributors -); - -async function handleSet() { - try { - let res = await userStore.setMatchMakingIdentity({ - matchMakingIdentity: toggledMatchMakingIdentity.value, - userId: userDetail.value?.userId, - }); - if (res) { - Message.success('鍒囨崲鎴愬姛', { - onClosed: () => { - goBack(); - }, - }); - } - } catch (error) {} -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.toggleMatchMakingIdentity-page-wrapper { - background-color: #fff; - - .toggleMatchMakingIdentity-page-scroll-view { - background-color: #fff; - } - - .toggleMatchMakingIdentity-page-bg { - margin: 80px auto 60px; - } - - .toggleMatchMakingIdentity-page-title { - font-weight: bold; - font-size: 36px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 50px; - text-align: center; - margin-bottom: 60px; - } - - .toggleMatchMakingIdentity-page-btn { - width: 542px; - margin: 0 auto 40px; - display: block; - font-size: 28px; - - &.cancel { - background: #f8f9fb; - font-weight: bold; - color: boleGetCssVar('text-color', 'primary'); - } - } -} -</style> diff --git a/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/InnerPage.vue b/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/InnerPage.vue deleted file mode 100644 index 0ac3aca..0000000 --- a/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/InnerPage.vue +++ /dev/null @@ -1,99 +0,0 @@ -<template> - <ProTabs - v-model="tab" - name="tradeChatRecord-tabs" - class="tradeChatRecord-tabs" - flexTitle - :showPaneContent="false" - > - <ProTabPane :title="`鎴戣仈绯荤殑(${count.myCallCount})`" :pane-key="TradeChatRecordTab.Apply"> - </ProTabPane> - <ProTabPane :title="`鑱旂郴鎴戠殑(${count.callMeCount})`" :pane-key="TradeChatRecordTab.My"> - </ProTabPane> - </ProTabs> - <InfiniteLoading - scrollViewClassName="common-infinite-scroll-list-no-padding" - v-bind="infiniteLoadingProps" - :key="tab" - > - <template #renderItem="{ item }"> - <AttentionCard - :key="tab === TradeChatRecordTab.Apply ? item.orderUserId : item.applyUserId" - :avatarUrl=" - tab === TradeChatRecordTab.Apply ? item.orderUserAvatarUrl : item.applyUserAvatarUrl - " - :name="tab === TradeChatRecordTab.Apply ? item.orderUserContact : item.applyUserContact" - :enterpriseName=" - tab === TradeChatRecordTab.Apply - ? item.orderUserEnterpriseName - : item.applyUserEnterpriseName - " - > - <template #actions> - <nut-button type="default" class="card-action" @click="goChatRoom(item)" - >鍙戠淇�</nut-button - > - </template> - </AttentionCard> - </template> - </InfiniteLoading> -</template> - -<script setup lang="ts"> -import { ProTabs, ProTabPane } from '@12333/components'; -import { useInfiniteLoading } from '@12333/hooks'; -import { OrderInputType } from '@12333/constants'; -import * as orderServices from '@12333/services/api/Order'; -import { useUser } from '@/hooks'; -import Taro from '@tarojs/taro'; - -defineOptions({ - name: 'InnerPage', -}); - -enum TradeChatRecordTab { - Apply = '1', - My = '2', -} - -const tab = ref(TradeChatRecordTab.Apply); - -const count = reactive({ callMeCount: 0, myCallCount: 0 }); - -const { userDetail } = useUser(); - -const { infiniteLoadingProps } = useInfiniteLoading( - async ({ pageParam }) => { - let params: API.QueryTradeChatRecordInput = { - pageModel: { - rows: 20, - page: pageParam, - }, - }; - if (tab.value === TradeChatRecordTab.Apply) { - params.applyUserId = userDetail.value.userId; - } else { - params.orderUserId = userDetail.value.userId; - } - let res = await orderServices.getTradeChatRecordPage(params, { showLoading: false }); - count.callMeCount = res.objectData.callMeCount; - count.myCallCount = res.objectData.myCallCount; - return res; - }, - { - queryKey: ['orderServices/getTradeChatRecordPage', tab], - } -); - -function goChatRoom(item: API.TradeChatRecordOutput) { - Taro.navigateTo({ - url: `${RouterPath.chatRoom}?chatId=${ - tab.value === TradeChatRecordTab.Apply ? item.orderUserId : item.applyUserId - }`, - }); -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -</style> diff --git a/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/tradeChatRecord.config.ts b/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/tradeChatRecord.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/tradeChatRecord.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/tradeChatRecord.vue b/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/tradeChatRecord.vue deleted file mode 100644 index 1e43736..0000000 --- a/apps/cMiniApp/src/subpackages/setting/tradeChatRecord/tradeChatRecord.vue +++ /dev/null @@ -1,10 +0,0 @@ -<template> - <PageLayout class="tradeChatRecord-page-wrapper" title="鑱旂郴璁板綍" hasBorder> - <InnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import { PageLayout } from '@/components'; -import InnerPage from './InnerPage.vue'; -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/userInfo/userInfo.config.ts b/apps/cMiniApp/src/subpackages/setting/userInfo/userInfo.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/userInfo/userInfo.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/userInfo/userInfo.vue b/apps/cMiniApp/src/subpackages/setting/userInfo/userInfo.vue deleted file mode 100644 index 101f096..0000000 --- a/apps/cMiniApp/src/subpackages/setting/userInfo/userInfo.vue +++ /dev/null @@ -1,13 +0,0 @@ -<template> - <PageLayout title="缂栬緫鍚嶇墖" class="userInfo-page-wrapper" hasBorder> - <userInfoInnerPage /> - </PageLayout> -</template> - -<script setup lang="ts"> -import userInfoInnerPage from './userInfoInnerPage.vue'; - -defineOptions({ - name: 'userInfo', -}); -</script> diff --git a/apps/cMiniApp/src/subpackages/setting/userInfo/userInfoInnerPage.vue b/apps/cMiniApp/src/subpackages/setting/userInfo/userInfoInnerPage.vue deleted file mode 100644 index 3a2edbc..0000000 --- a/apps/cMiniApp/src/subpackages/setting/userInfo/userInfoInnerPage.vue +++ /dev/null @@ -1,211 +0,0 @@ -<template> - <ContentScrollView :paddingH="false"> - <nut-form :model-value="form" ref="formRef" :rules="rules"> - <nut-form-item label="澶村儚:" class="bole-form-item" prop="avatarUrl"> - <Uploader v-model:file-list="form.avatarUrl" :maximum="1" class="bole-uploader"> </Uploader> - </nut-form-item> - <nut-form-item - label="浼佷笟鍚嶇О:" - class="bole-form-item" - prop="enterpriseName" - :required="hasEnterpriseName" - > - <nut-input - v-model.trim="form.enterpriseName" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヤ紒涓氬悕绉�" - type="text" - :max-length="35" - :disabled="isCompanyAudited || isCertified" - show-word-limit - /> - </nut-form-item> - <nut-form-item label="濮撳悕:" class="bole-form-item" prop="fullName" :required="hasFullName"> - <nut-input - v-model.trim="form.fullName" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ュ鍚�" - type="text" - :max-length="10" - show-word-limit - /> - </nut-form-item> - <nut-form-item label="鎬у埆:" class="bole-form-item" prop="gender"> - <ChooseInputWithPicker - v-model="form.gender" - placeholder="璇烽�夋嫨鎬у埆" - :value-enum="GenderText" - /> - </nut-form-item> - <nut-form-item label="鑱岀О:" class="bole-form-item" prop="positionName"> - <nut-input - v-model.trim="form.positionName" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ亴绉�" - type="text" - :max-length="15" - show-word-limit - /> - </nut-form-item> - <nut-form-item label="鎵嬫満鍙�:" class="bole-form-item" prop="phoneNumber"> - <nut-input - v-model.trim="form.phoneNumber" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ユ墜鏈哄彿" - type="text" - disabled - /> - </nut-form-item> - <nut-form-item label="閭:" class="bole-form-item" prop="email"> - <nut-input - v-model.trim="form.email" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ラ偖绠�" - type="text" - :disabled="isBindEmailAddress" - /> - </nut-form-item> - <nut-form-item label="鎵�鍦ㄥ湴鍖�:" class="bole-form-item" prop="areaList" required> - <ChooseInputWithAreaPicker - :columns="areaTreeList" - v-model="form.areaList" - placeholder="璇烽�夋嫨鎵�鍦ㄥ湴鍖�" - ></ChooseInputWithAreaPicker> - </nut-form-item> - <nut-form-item label="璇︾粏鍦板潃:" class="bole-form-item" prop="address"> - <nut-input - v-model.trim="form.address" - class="nut-input-text bole-input-text" - placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" - type="text" - :max-length="20" - show-word-limit - /> - </nut-form-item> - <nut-form-item label="寰俊浜岀淮鐮�:" class="bole-form-item" prop="wxQrcodeUrl"> - <Uploader v-model:file-list="form.wxQrcodeUrl" :maximum="1" class="bole-uploader"> - </Uploader> - </nut-form-item> - </nut-form> - </ContentScrollView> - <PageFooter :isOnlyAction="false"> - <PageFooterBtn type="primary" @click="handleConfirm">淇濆瓨</PageFooterBtn> - </PageFooter> -</template> - -<script setup lang="ts"> -import { ChooseInputWithPicker, ChooseInputWithAreaPicker } from '@12333/components'; -import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; -import { useUser, useMyCertificationAuditInfo } from '@/hooks'; -import { useAllAreaList } from '@12333/hooks'; -import { convertApi2FormUrlOnlyOne, Message, isFileAllUploaded, FormValidator } from '@12333/utils'; -import { Gender, GenderText } from '@12333/constants'; -import * as userServices from '@12333/services/api/User'; -import Taro from '@tarojs/taro'; - -defineOptions({ - name: 'userInfoInnerPage', -}); - -const { userDetail, updateUserInfo, isCompanyAudited } = useUser(); - -const { findAreaNameFromCode, areaTreeList } = useAllAreaList(); - -const { isCertified } = useMyCertificationAuditInfo(); - -const isBindEmailAddress = computed(() => { - return !!userDetail.value?.bindEmailAddress; -}); - -const form = reactive({ - userName: userDetail.value?.userName ?? '', - avatarUrl: convertApi2FormUrlOnlyOne(userDetail.value?.originalAvatarUrl), - enterpriseName: userDetail.value?.customerName ?? '', - phoneNumber: userDetail.value?.phoneNumber ?? '', - email: userDetail.value?.userInfoEmailAddress ?? '', - fullName: userDetail.value?.contacter ?? '', - gender: userDetail.value?.genderType ?? Gender.Male, - positionName: userDetail.value?.jobTitle ?? '', - areaList: [ - userDetail.value.provinceCode, - userDetail.value.cityCode, - userDetail.value.countyCode, - ].filter(Boolean), - address: userDetail.value?.addressDetail ?? '', - wxQrcodeUrl: convertApi2FormUrlOnlyOne(userDetail.value?.wxQrCodeUrl), -}); - -const hasEnterpriseName = computed(() => !!userDetail.value?.customerName); -const hasFullName = computed(() => !!userDetail.value?.contacter); - -const rules = computed(() => { - let _rules: FormRules = { - areaList: [ - { required: true, validator: FormValidator.validatorArray, message: '璇烽�夋嫨鎵�鍦ㄥ湴鍖�' }, - ], - email: [{ validator: FormValidator.validatorEmail, message: '璇疯緭鍏ユ纭殑閭' }], - }; - if (hasEnterpriseName.value) { - _rules['enterpriseName'] = [{ required: true, message: '璇疯緭鍏ヤ紒涓氬悕绉�' }]; - } - if (hasFullName.value) { - _rules['fullName'] = [{ required: true, message: '璇疯緭鍏ュ鍚�' }]; - } - - return _rules; -}); - -const formRef = ref<any>(null); - -function handleConfirm() { - if (!formRef.value) return; - formRef.value.validate().then(({ valid, errors }: any) => { - if (valid) { - if (isFileAllUploaded(form.avatarUrl)) { - handleUpdateUserInfo(); - } else { - Message.error('瀛樺湪鏈笂浼犲畬鎴愮殑鏂囦欢'); - } - } - }); -} - -async function handleUpdateUserInfo() { - try { - let params: API.UpdateUserInfoInput = { - id: userDetail.value.userId, - userInfoEmailAddress: form.email, - avatarUrl: form.avatarUrl[0]?.path ?? '', - genderType: form.gender, - jobTitle: form.positionName, - addressDetail: form.address, - wxQrCodeUrl: form.wxQrcodeUrl[0]?.path ?? '', - enterpriseName: form.enterpriseName, - contacter: form.fullName, - }; - if (form.areaList?.length > 0) { - params.provinceCode = form.areaList[0]; - params.cityCode = form.areaList[1]; - params.countyCode = form.areaList[2]; - params.provinceName = findAreaNameFromCode(form.areaList[0]); - params.cityName = findAreaNameFromCode(form.areaList[1]); - params.countyName = findAreaNameFromCode(form.areaList[2]); - } - let res = await userServices.updateUserInfo(params); - if (res) { - Message.success('鏇存柊鎴愬姛', { - onClosed: () => { - Taro.navigateBack({ - delta: 1, - }); - }, - }); - updateUserInfo(); - } - } catch (error) {} -} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -</style> diff --git a/apps/cMiniApp/src/subpackages/setting/wxSetting/wxSetting.config.ts b/apps/cMiniApp/src/subpackages/setting/wxSetting/wxSetting.config.ts deleted file mode 100644 index 305fdb1..0000000 --- a/apps/cMiniApp/src/subpackages/setting/wxSetting/wxSetting.config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default definePageConfig({ - disableScroll: true, -}); diff --git a/apps/cMiniApp/src/subpackages/setting/wxSetting/wxSetting.vue b/apps/cMiniApp/src/subpackages/setting/wxSetting/wxSetting.vue deleted file mode 100644 index 853f40b..0000000 --- a/apps/cMiniApp/src/subpackages/setting/wxSetting/wxSetting.vue +++ /dev/null @@ -1,41 +0,0 @@ -<template> - <PageLayout title="寰俊鎺堟潈璁剧疆" class="wxSetting-page-wrapper" hasBorder> - <List> - <ListItem title="鍦扮悊浣嶇疆" :showArrow="false"> - <template #extra> - <nut-switch - v-model="authSetting['scope.userLocation']" - @change="(v) => handleSetting(v, 'scope.userLocation')" - /> - </template> - </ListItem> - </List> - </PageLayout> -</template> - -<script setup lang="ts"> -import { List, ListItem } from '@12333/components'; -import Taro from '@tarojs/taro'; - -defineOptions({ - name: 'wxSetting', -}); - -const authSetting = reactive<Taro.AuthSetting>({ - 'scope.userLocation': false, -}); - -onMounted(() => { - Taro.getSetting({ - success: function (res) { - authSetting['scope.userLocation'] = res.authSetting['scope.userLocation']; - }, - }); -}); - -function handleSetting(val: boolean, key: keyof Taro.AuthSetting) {} -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; -</style> diff --git a/packages/components/src/Friend/FileWrapper/FileWrapper.vue b/packages/components/src/Friend/FileWrapper/FileWrapper.vue deleted file mode 100644 index e7c4777..0000000 --- a/packages/components/src/Friend/FileWrapper/FileWrapper.vue +++ /dev/null @@ -1,86 +0,0 @@ -<template> - <div class="publish-circle-friend-file-item-wrapper"> - <slot /> - <div v-if="status != 'success'" class="nut-uploader__preview__progress"> - <template v-if="status != 'ready'"> - <Failure v-if="status == 'error'" color="#fff" /> - <Loading v-else name="loading" color="#fff" /> - </template> - <view class="nut-uploader__preview__progress__msg">{{ message }}</view> - </div> - <div @click="emit('delete')" class="publish-circle-friend-file-item-del-wrapper"> - <Failure color="rgba(0,0,0,0.6)" class="publish-circle-friend-file-item-del" /> - </div> - </div> -</template> - -<script setup lang="ts"> -import { Failure, Loading } from '@nutui/icons-vue-taro'; - -defineOptions({ - name: 'FileWrapper', -}); - -type Props = { - status?: 'ready' | 'uploading' | 'success' | 'error'; - message?: string; -}; - -const props = withDefaults(defineProps<Props>(), { - status: 'success', -}); - -const emit = defineEmits<{ - (e: 'delete'): void; -}>(); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.publish-circle-friend-file-item-wrapper { - padding: 10px; - box-sizing: border-box; - // height: 150px; - width: 100%; - height: 100%; - position: relative; - - &.video-wrapper { - width: 300px; - height: 150px; - } - - .publish-circle-friend-file-item-del-wrapper { - padding: 20px; - position: absolute; - right: 4px; - top: 4px; - transform: translate(50%, -50%); - z-index: 100; - } - - .publish-circle-friend-file-item-del { - --nut-icon-width: 30px; - --nut-icon-height: 30px; - display: block !important; - } - - .publish-circle-friend-img-wrapper { - width: 100%; - height: 100%; - overflow: hidden; - } - - .publish-circle-friend-img { - // object-fit: cover; - width: 100%; - height: 100%; - } - - .publish-circle-friend-video { - width: 100%; - height: 100%; - } -} -</style> diff --git a/packages/components/src/Friend/FriendMessage/FriendMessage.vue b/packages/components/src/Friend/FriendMessage/FriendMessage.vue deleted file mode 100644 index fd04ad5..0000000 --- a/packages/components/src/Friend/FriendMessage/FriendMessage.vue +++ /dev/null @@ -1,446 +0,0 @@ -<template> - <div class="friend-message-wrapper"> - <InfoAvatar - class="friend-message-avatar" - :src="props.data.headPhoto ? setOSSLink(props.data.headPhoto) : ''" - :name="props.data.name" - :company="props.data.companyName" - @click.stop="goUserHomePage(props.data.userId)" - /> - <div class="friend-message-right"> - <div class="friend-message-content"> - <FriendMessageContent :data="props.data" /> - </div> - <div class="friend-message-bottom"> - <div class="friend-message-time-wrapper"> - <div class="friend-message-time">{{ timeAgo }}</div> - <img - v-if="isSelf" - class="friend-message-action-delete" - @click.stop="handleDelete" - :src="IconDelete" - /> - </div> - <div class="friend-message-actions"> - <div class="friend-message-action" @click.stop="toggleLike"> - <img - class="friend-message-action-icon" - :src="props.data.isYourSelfThumbsUp ? IconLikeActive : IconLike" - /> - <div class="friend-message-action-text">{{ props.data.thumbsUps?.length }}</div> - </div> - <div class="friend-message-action" @click.stop="handleCommentFocus()"> - <img class="friend-message-action-icon" :src="IconComment" /> - <div class="friend-message-action-text">{{ props.data.replies?.length }}</div> - </div> - </div> - </div> - <div - v-if="props.data.thumbsUps?.length > 0 || props.data.replies?.length > 0" - class="friend-message-reply-list-wrapper" - > - <div class="friend-message-reply-list-wrapper"> - <div v-if="props.data.thumbsUps?.length > 0" class="friend-message-like-bar"> - <img class="friend-message-like-icon" :src="IconLikeHeart" /> - <div class="friend-message-like-content"> - <span - v-for="(item, index) in props.data.thumbsUps" - :key="index" - class="friend-message-like-name" - @click.stop="goCheckBusinessCard(item.shortId)" - > - {{ item.name }} - {{ index == props.data.thumbsUps.length - 1 ? '' : ',' }} - </span> - </div> - </div> - <div v-if="props.data.replies?.length > 0" class="friend-message-reply-list"> - <div - v-for="reply in props.data.replies" - :key="reply.id" - class="friend-message-reply-list-item" - > - <div class="friend-message-reply-item-name-wrapper"> - <!-- <div - class="friend-message-reply-item-name" - @click="goCheckBusinessCard(reply.shortId)" - > - {{ reply.name }} - </div> --> - <FriendMessageReplyName - :name="reply.name" - :avatar-url="reply.headPhoto" - @click.stop="goCheckBusinessCard(reply.shortId)" - ></FriendMessageReplyName> - <!-- <template v-if="reply.parentId"> - <div class="friend-message-reply-item-replytext">鍥炲</div> - <div - class="friend-message-reply-item-name" - @click="goCheckBusinessCard(reply.beRepliedShortId)" - > - {{ reply.beRepliedName }} - </div> - </template> --> - <!-- <div class="friend-message-reply-item-mao">:</div> --> - </div> - <View - class="friend-message-reply-item-content" - @click.stop="handleCommentFocus(reply)" - @longpress.stop="handleDeleteReply(reply)" - > - <template v-if="reply.parentId"> - <div class="friend-message-reply-item-replytext">鍥炲</div> - <div - class="friend-message-reply-item-name" - @click.stop="goCheckBusinessCard(reply.beRepliedShortId)" - > - {{ reply.beRepliedName }} - </div> - <div class="friend-message-reply-item-mao">: </div> - </template> - {{ reply.content }} - </View> - </div> - </div> - </div> - </div> - </div> - </div> -</template> - -<script setup lang="ts"> -import { ListActionsType } from '@12333/hooks'; -import { formatTimeAgo, Message, setOSSLink } from '@12333/utils'; -import _ from 'lodash'; -import * as circleFriendServices from '@12333/services/api/CircleFriend'; -import InfoAvatar from '../../Avatar/InfoAvatar.vue'; -import FriendMessageContent from '../FriendMessageContent/FriendMessageContent.vue'; -import { Block, View } from '@tarojs/components'; -import FriendMessageReplyName from './FriendMessageReplyName.vue'; -import { computed } from 'vue'; -import IconDelete from '@/assets/friends/icon-delete.png'; -import IconComment from '@/assets/friends/icon-comment.png'; -import IconForward from '@/assets/friends/icon-forward.png'; -import IconLike from '@/assets/friends/icon-like.png'; -import IconLikeActive from '@/assets/friends/icon-like-active.png'; -import IconLikeHeart from '@/assets/friends/icon-like-heart.png'; - -defineOptions({ - name: 'FriendMessage', -}); - -type Props = { - data: API.CircleFriendDto; - groupIndex?: number; - itemIndex?: number; - listActions?: ListActionsType; - useAccessPersonalInfo: <T extends (...args: any[]) => any>(fn: T) => T; - currentUseId?: string; -}; - -const props = withDefaults(defineProps<Props>(), {}); - -const emit = defineEmits<{ - (e: 'goUserHomePage', userId: string): void; -}>(); - -const isSelf = computed(() => props.currentUseId == props.data.userId); - -const isLike = computed(() => props.data.isYourSelfThumbsUp); - -const timeAgo = computed(() => formatTimeAgo(props.data.creationTime, 'HH:mm')); - -const toggleLike = props.useAccessPersonalInfo(async () => { - try { - let res = null; - if (isLike.value) { - res = await circleFriendServices.thumbsRecallCircleFriend({ - circleFriendId: props.data.id, - }); - } else { - res = await circleFriendServices.thumbsUpCircleFriend({ - circleFriendId: props.data.id, - }); - } - if (res) { - props.listActions?.updatePageByIndex?.({ - groupIndex: props.groupIndex, - itemIndex: props.itemIndex, - }); - } - } catch (error) {} -}); - -const handleCommentFocus = props.useAccessPersonalInfo((replyItem?: API.CircleFriendReplyDto) => { - if (replyItem && replyItem.parentId) { - Message.warning('鏃犳硶缁х画璇勮'); - return; - } - Message.newPromptOneLine({ - title: '璇勮', - inputProps: { - placeholder: '鍠勮缁撳杽缂橈紝鎭惰█浼や汉蹇�', - }, - confirmText: '鍙戦��', - onConfirm: (value, done) => handleComment(value, done, replyItem), - }); -}); - -const handleComment = async (commentInputValue, done, replyItem?: API.CircleFriendReplyDto) => { - try { - const value = _.trim(commentInputValue); - if (value) { - let params: API.ReplyCircleFriendInput = { - circleFriendId: props.data.id, - content: value, - }; - if (replyItem) { - params.parentId = replyItem?.id; - } - let res = await circleFriendServices.replyCircleFriend(params); - if (res) { - props.listActions?.updatePageByIndex?.({ - groupIndex: props.groupIndex, - itemIndex: props.itemIndex, - }); - done(); - } - } else { - Message.warning('璇勮鍐呭涓嶈兘涓虹┖'); - } - } catch (error) {} -}; - -const handleDelete = async () => { - try { - await Message.confirm(); - let params = { - id: props.data.id, - }; - let res = await circleFriendServices.deteleCircleFriend(params); - if (res) { - props.listActions?.remove?.(); - } - } catch (error) {} -}; - -const goCheckBusinessCard = (shortId: number) => { - // Taro.navigateTo({ - // url: `${RouterPath.userHomePage}?id=$}`, - // }); -}; - -const goUserHomePage = (userId: string) => { - emit('goUserHomePage', userId); -}; - -const handleDeleteReply = async (replyItem: API.CircleFriendReplyDto) => { - try { - if (replyItem.userId === props.currentUseId) { - await Message.confirm(); - let params = { - id: replyItem.id, - }; - let res = await circleFriendServices.deteleCircleFriendReply(params); - if (res) { - props.listActions?.updatePageByIndex?.({ - groupIndex: props.groupIndex, - itemIndex: props.itemIndex, - }); - } - } - } catch (error) {} -}; -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.friend-message-wrapper { - padding: 32px boleGetCssVar('size', 'body-padding-h'); - @include hairline-bottom; - background-color: #fff; - - &:last-child { - &::after { - display: none; - } - } - - .friend-message-right { - padding-top: 16px; - /* padding-left: 104px; */ - - .friend-message-name { - font-size: 32px; - line-height: 1; - color: #485a7f; - margin-bottom: 8px; - } - - .friend-message-content { - font-size: 28px; - line-height: 44px; - color: boleGetCssVar('text-color', 'primary'); - word-break: break-all; - white-space: pre-line; - margin-bottom: 4px; - overflow: hidden; - } - - .friend-message-bottom { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 16px; - - .friend-message-time-wrapper { - display: flex; - align-items: center; - - .friend-message-time { - color: boleGetCssVar('text-color', 'secondary'); - line-height: 32px; - font-size: 22px; - margin-right: 10px; - } - - .friend-message-action-delete { - display: block; - width: 32px; - height: 32px; - } - } - - .friend-message-actions { - display: flex; - - .friend-message-action { - margin-right: 16px; - display: flex; - align-items: center; - - &:last-child { - margin-right: 0; - } - } - - .friend-message-action-icon { - display: block; - width: 32px; - height: 32px; - margin-right: 8px; - - &.comment { - width: 29px; - height: 26px; - } - } - - .friend-message-action-text { - font-size: 22px; - color: boleGetCssVar('text-color', 'secondary'); - line-height: 32px; - } - } - } - - .friend-message-reply-list-wrapper { - background: #f7f7f7; - border-radius: 6px; - - /* .friend-message-reply-list, - .friend-message-like-bar { - padding: 16px 28px; - } */ - - .friend-message-like-bar { - display: flex; - align-items: flex-start; - padding: 24px 28px; - - .friend-message-like-icon { - width: 29px; - height: 27px; - margin-right: 12px; - /* margin-top: 4px; */ - } - - .friend-message-like-content { - line-height: 32px; - display: flex; - flex-wrap: wrap; - - .friend-message-like-name { - font-size: 28px; - color: #485a7f; - line-height: 1; - word-break: break-all; - display: inline; - } - } - } - - .friend-message-reply-list { - /* @include hairline-top; */ - border-top: 1px solid #e8e8e8; - padding: 8px 28px; - } - - .friend-message-reply-list-item { - /* font-size: 28px; - line-height: 46px; - color: #191919; */ - padding: 24px 0; - border-bottom: 1px solid #e8e8e8; - - &:last-child { - border-bottom: none; - } - - .friend-message-reply-item-name-wrapper { - display: flex; - align-items: center; - - .friend-message-reply-item-name, - .friend-message-reply-item-replytext { - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'regular'); - line-height: 40px; - } - - .friend-message-reply-item-name { - flex: 1; - min-width: 0; - @include ellipsis; - } - - .friend-message-reply-item-replytext { - margin: 0 8px; - } - } - - .friend-message-reply-item-content { - word-break: break-all; - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 40px; - padding-left: 64px; - - .friend-message-reply-item-name, - .friend-message-reply-item-replytext, - .friend-message-reply-item-mao { - display: inline; - } - - .friend-message-reply-item-name { - color: boleGetCssVar('text-color', 'regular'); - } - } - } - } - } -} -</style> diff --git a/packages/components/src/Friend/FriendMessage/FriendMessageReplyName.vue b/packages/components/src/Friend/FriendMessage/FriendMessageReplyName.vue deleted file mode 100644 index 9c16df1..0000000 --- a/packages/components/src/Friend/FriendMessage/FriendMessageReplyName.vue +++ /dev/null @@ -1,47 +0,0 @@ -<template> - <div class="friend-message-reply-item-avatar-name"> - <Avatar - class="friend-message-reply-item-avatar" - :src="props.avatarUrl ? setOSSLink(props.avatarUrl) : ''" - :size="24" - ></Avatar> - <div class="friend-message-reply-item-name2">{{ name }}</div> - </div> -</template> - -<script setup lang="ts"> -import { Avatar } from '@12333/components'; -import { setOSSLink } from '@12333/utils'; - -defineOptions({ - name: 'FriendMessageReplyName', -}); - -type Props = { - name?: string; - avatarUrl?: string; -}; - -const props = withDefaults(defineProps<Props>(), {}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.friend-message-reply-item-avatar-name { - display: flex; - align-items: center; - - .friend-message-reply-item-avatar { - margin-right: 16px; - } - - .friend-message-reply-item-name2 { - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'regular'); - line-height: 40px; - vertical-align: middle; - } -} -</style> diff --git a/packages/components/src/Friend/FriendMessageContent/FriendMessageContent.vue b/packages/components/src/Friend/FriendMessageContent/FriendMessageContent.vue deleted file mode 100644 index ca95c72..0000000 --- a/packages/components/src/Friend/FriendMessageContent/FriendMessageContent.vue +++ /dev/null @@ -1,168 +0,0 @@ -<template> - <div v-if="props.data.content" class="friend-message-content-text-wrapper"> - <div - v-if="props.data.relationalType === CircleFriendRelationalTypeEnum.Resource" - class="relational-wrapper" - > - <img class="relational-icon" :src="IconResource" /> - <div class="relational-content">{{ content }}</div> - </div> - <div - v-else-if="props.data.relationalType === CircleFriendRelationalTypeEnum.Order" - class="relational-wrapper" - > - <img class="relational-icon" :src="IconOrder" /> - <div class="relational-content">{{ content }}</div> - </div> - <template v-else> - <div class="friend-message-content-text">{{ content }}</div> - <div v-if="showCollapse" class="friend-message-content-collapse-btn" @click.stop="toggle"> - {{ isCollapse ? '鍏ㄦ枃' : '鏀惰捣' }} - </div> - </template> - </div> - <template v-if="!props.data.relationalType"> - <ImageGrid - class="friend-message-content-image-grid" - v-if="imageList.length > 0" - :imageList="imageList" - /> - <div v-if="videoList.length > 0" class="friend-message-content-file-list"> - <div - v-for="item in videoList" - :key="item.fileUrl" - class="friend-message-content-file-list-item video" - > - <video :src="setOSSLink(item.fileUrl)" class="friend-message-content-file-video" /> - </div> - </div> - </template> -</template> - -<script setup lang="ts"> -import ImageGrid from '../../Image/ImageGrid.vue'; -import { setOSSLink } from '@12333/utils'; -import { CircleFriendFileType, CircleFriendRelationalTypeEnum } from '@12333/constants'; -import { useToggle } from 'senin-mini/hooks'; -import { computed } from 'vue'; -import IconResource from '@/assets/friends/icon-resource.png'; -import IconOrder from '@/assets/friends/icon-order.png'; - -defineOptions({ - name: 'FriendMessageContent', -}); - -type Props = { - data: API.CircleFriendDto; -}; - -const props = withDefaults(defineProps<Props>(), {}); - -const Limit = 140; - -const videoList = computed( - () => props.data.files?.filter((x) => x.type == CircleFriendFileType.Video) ?? [] -); - -const imageList = computed( - () => props.data.files?.filter((x) => x.type == CircleFriendFileType.Image) ?? [] -); - -const { isCollapse, toggle } = useToggle(true); - -const showCollapse = computed(() => props.data.content.length > Limit); - -const content = computed(() => { - if (showCollapse.value && isCollapse.value) { - return props.data.content.slice(0, Limit); - } else { - return props.data.content; - } -}); -</script> - -<style lang="scss"> -@import '@/styles/common.scss'; - -.friend-message-content-text-wrapper { - margin-bottom: 12px; - font-size: 28px; - line-height: 44px; - - .friend-message-content-text { - color: boleGetCssVar('text-color', 'primary'); - /* color: #000; */ - word-break: break-all; - white-space: pre-line; - } - - .friend-message-content-collapse-btn { - color: #5b6998; - margin-top: 6px; - font-weight: 600; - } - - .relational-wrapper { - padding: 16px 24px; - display: flex; - - .relational-icon { - width: 144px; - height: 144px; - margin-right: 16px; - } - - .relational-content { - flex: 1; - min-width: 0; - display: -webkit-box; - padding: 6px 0; - font-weight: 400; - font-size: 28px; - color: boleGetCssVar('text-color', 'primary'); - line-height: 44px; - @include multi-ellipsis(3); - } - } -} - -.friend-message-content-image-grid { - margin-bottom: 12px; -} - -.friend-message-content-file-list { - margin: -10px; - display: flex; - flex-wrap: wrap; - margin-bottom: 12px; - width: 450px; - // width: 100%; - .friend-message-content-file-list-item { - padding: 10px; - box-sizing: border-box; - height: 150px; - - &.video { - width: 300px; - } - - &.img { - width: 450px; - } - - &.img-grid { - width: 150px; - } - - .friend-message-content-file-img { - width: 100%; - height: 100%; - } - - .friend-message-content-file-video { - width: 100%; - height: 100%; - } - } -} -</style> diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts index 03e43f6..8eb0c39 100644 --- a/packages/components/src/index.ts +++ b/packages/components/src/index.ts @@ -15,7 +15,5 @@ export { default as PreviewImage } from './Image/PreviewImage.vue'; export { default as ImageGrid } from './Image/ImageGrid.vue'; export { default as AutoWidthImage } from './Image/AutoWidthImage.vue'; -export { default as FileWrapper } from './Friend/FileWrapper/FileWrapper.vue'; -export { default as FriendMessage } from './Friend/FriendMessage/FriendMessage.vue'; export { default as AreaTreeSelect } from './AreaTreeSelect/AreaTreeSelect.vue'; export { default as Elevator } from './Elevator/Elevator.vue'; diff --git a/packages/constants/cooperate.ts b/packages/constants/cooperate.ts index d22a291..426b524 100644 --- a/packages/constants/cooperate.ts +++ b/packages/constants/cooperate.ts @@ -81,24 +81,3 @@ [CooperateStatus.RefusalToCooperate]: 'danger', [CooperateStatus.OffShelf]: 'warning', }; - -export enum InsurePeopleNumberEnum { - /** - * 淇濋殰浜烘暟1-49 - */ - People1To49 = 10, - /** - * 淇濋殰浜烘暟50-99 - */ - People50To99 = 20, - /** - * 淇濋殰浜烘暟100浠ヤ笂 - */ - People100ToMore = 30, -} - -export const InsurePeopleNumberEnumText = { - [InsurePeopleNumberEnum.People1To49]: '1-49浜�', - [InsurePeopleNumberEnum.People50To99]: '50-99浜�', - [InsurePeopleNumberEnum.People100ToMore]: '100浜轰互涓�', -}; diff --git a/packages/constants/dic.ts b/packages/constants/dic.ts index 889b708..3bda434 100644 --- a/packages/constants/dic.ts +++ b/packages/constants/dic.ts @@ -80,22 +80,6 @@ [IndustryCategoryType.IndustryInformation]: '琛屼笟璧勮', }; -export enum ProductInfoCategoryType { - /** - * 浜у搧绫诲埆 - */ - ProductCategory = 0, - /** - * 璧勮绫诲埆 - */ - InformationCategory = 1, -} - -export const ProductInfoCategoryTypeText = { - [ProductInfoCategoryType.ProductCategory]: '浜у搧绫诲埆', - [ProductInfoCategoryType.InformationCategory]: '璧勮绫诲埆', -}; - export enum TagType { /** * 浜у搧鏍囩 @@ -114,15 +98,6 @@ */ QuickEvaluateTag, } - -export const ProductInfoTagTypeText = { - [TagType.ProductTag]: '浜у搧鏍囩', - [TagType.InformationTag]: '璧勮鏍囩', -}; - -export const ProductQuickEvaluateTypeText = { - [TagType.ProductTag]: '浜у搧蹇嵎璇勪环', -}; export enum UpLevel { /** diff --git a/packages/constants/enum.ts b/packages/constants/enum.ts index 1b766b5..57d13f0 100644 --- a/packages/constants/enum.ts +++ b/packages/constants/enum.ts @@ -119,7 +119,7 @@ [EnterpriseType.IndustryBody]: '琛屼笟鏈烘瀯', }; -export const TempFolderPath = 'https://parkmanagement.oss-cn-hangzhou.aliyuncs.com/12333/temp'; +export const TempFolderPath = 'https://parkmanagement.oss-cn-hangzhou.aliyuncs.com/flexJob/temp'; export enum BusinessSettingType { /** @@ -127,5 +127,3 @@ */ UserCertification = 10, } - -export const MatchMakingMiniAppId = 'wx88251c84f5cd886b'; diff --git a/packages/constants/friend.ts b/packages/constants/friend.ts deleted file mode 100644 index ebe1c49..0000000 --- a/packages/constants/friend.ts +++ /dev/null @@ -1,17 +0,0 @@ -export enum CircleFriendFileType { - Image = 1, - Video, -} - -export const CircleFriendFileTypeText = { - [CircleFriendFileType.Image]: '鍥剧墖', - [CircleFriendFileType.Video]: '瑙嗛', -}; - -export enum CircleFriendRelationalTypeEnum { - /** - * - */ - Order = 10, - Resource = 20, -} diff --git a/packages/constants/index.ts b/packages/constants/index.ts index a0eceee..6d4bb41 100644 --- a/packages/constants/index.ts +++ b/packages/constants/index.ts @@ -2,17 +2,12 @@ export * from './enum'; export * from './editor'; export * from './role'; -export * from './information'; export * from './error'; export * from './user'; -export * from './parkOrHR'; export * from './cooperate'; -export * from './message'; export * from './authentication'; -export * from './friend'; export * from './imageEnums'; export * from './img'; export * from './oss'; -export * from './order'; -export * from './resource'; export * from './authenticationV2'; +export * from './parkOrHR'; diff --git a/packages/constants/information.ts b/packages/constants/information.ts deleted file mode 100644 index d05f714..0000000 --- a/packages/constants/information.ts +++ /dev/null @@ -1,41 +0,0 @@ -export enum InformationRecommendStatusEnum { - /** - * 鎺ㄨ崘 - */ - Recommend = 10, - /** - * 鏈帹鑽� - */ - NotRecommend = 20, -} - -export enum InformationFormTypeEnum { - /** - * 鍗曚綅 - */ - Company = 0, - /** - * 鐢ㄦ埛鑷彂 - */ - Personal = 1, - /** - * 鑷彂 - */ - Spontaneous = 2, - /** - * 閲囬泦 - */ - Acquisition = 3, - /** - * 寰俊鍏紬鍙� - */ - WxCgi = 4, -} - -export const InformationFormTypeText = { - [InformationFormTypeEnum.Company]: '鍗曚綅', - [InformationFormTypeEnum.Personal]: '鐢ㄦ埛鑷彂', - [InformationFormTypeEnum.Spontaneous]: '鑷彂', - [InformationFormTypeEnum.Acquisition]: '閲囬泦', - [InformationFormTypeEnum.WxCgi]: '寰俊鍏紬鍙�', -}; diff --git a/packages/constants/message.ts b/packages/constants/message.ts deleted file mode 100644 index c90c384..0000000 --- a/packages/constants/message.ts +++ /dev/null @@ -1,171 +0,0 @@ -export enum MessageChatTypeEnum { - /** - * 绯荤粺 - */ - System = 10, - /** - * 闄岀敓鐢ㄦ埛 - */ - UnfamiliarUser = 20, - /** - * 濂藉弸鐢ㄦ埛 - */ - FriendUser = 30, -} - -export enum UserFollowStatusEnum { - /** - * 浠呮垜鍏虫敞 - */ - OnlyFollowTo = 10, - /** - * 浠呭叧娉ㄦ垜 - */ - OnlyFollowMe = 20, - /** - * 浜掔浉鍏虫敞 - */ - MutualFollow = 30, - /** - * 鏃犲叧娉ㄧ姸鎬� - */ - NoAnyFollow = 40, -} - -export enum MessageBusinessBehaviorType { - /** - * 鏌ョ湅鐢ㄦ埛璁よ瘉瀹℃牳椹冲洖璇︽儏 - */ - ViewUserCertificationAuditRejectDetail = 10, - /** - * 涓嬭浇鐢ㄦ埛璁よ瘉璐圭敤鍙戠エ - */ - DownloadUserCertificationPayInvoicing = 20, - /** - * 杩涘叆鐢ㄦ埛璁よ瘉骞村 - */ - ToUserCertificationAnnualReview = 30, - /** - * 杩涘叆鎶曚繚璇︽儏 - */ - ToInsuranceManagementDetail = 40, - /** - * 杩涘叆鎶曚繚璇︽儏 - */ - ToOfflineInsuranceManagementDetail = 41, - /** - * 杩涘叆鎴戠殑閽卞寘棣栭〉 - */ - ToMyWalletHomePage = 50, - /** - * 杩涘叆璧勮璇︽儏 - */ - ToInformationDetail = 60, - /** - * 杩涘叆琛屼笟鍦堣鎯� - */ - ToCircleFriendDetail = 70, -} - -export enum MessageBusinessTypeEnum { - /** - * 浜у搧鍏虫敞 - */ - 浜у搧鍏虫敞 = 1, - /** - * 浜у搧浠樻 - */ - 浜у搧浠樻 = 2, - /** - * 璧勮鎵撹祻 - */ - 璧勮鎵撹祻 = 3, - /** - * 浜у搧楠屾敹 - */ - 浜у搧楠屾敹 = 4, - /** - * 浜у搧璇勪环 - */ - 浜у搧璇勪环 = 5, - /** - * 浜у搧閫�娆� - */ - 浜у搧閫�娆� = 6, - /** - * 瀹炲悕璁よ瘉瀹℃牳閫氳繃鏃犻渶寮�绁� - */ - 瀹炲悕璁よ瘉瀹℃牳閫氳繃鏃犻渶寮�绁� = 7, - /** - * 瀹炲悕璁よ瘉瀹℃牳閫氳繃闇�瑕佸紑绁� - */ - 瀹炲悕璁よ瘉瀹℃牳閫氳繃闇�瑕佸紑绁� = 8, - /** - * 瀹炲悕璁よ瘉瀹℃牳涓嶉�氳繃 - */ - 瀹炲悕璁よ瘉瀹℃牳涓嶉�氳繃 = 9, - /** - * 瀹炲悕璁よ瘉鍙戠エ宸插紑鍏� - */ - 瀹炲悕璁よ瘉鍙戠エ宸插紑鍏� = 10, - /** - * 瀹炲悕璁よ瘉鍗冲皢鍒版湡 - */ - 瀹炲悕璁よ瘉鍗冲皢鍒版湡 = 11, - /** - * 鐢ㄦ埛璁よ瘉澶辨晥 - */ - 鐢ㄦ埛璁よ瘉澶辨晥 = 12, - /** - * 鎶曚繚鎴愬姛 - */ - 鎶曚繚鎴愬姛 = 13, - /** - * 鎶曚繚澶辫触 - */ - 鎶曚繚澶辫触 = 14, - /** - * 浜哄憳鎵瑰 - */ - 浜哄憳鎵瑰 = 15, - /** - * 鎵归噺閫�淇� - */ - 鎵归噺閫�淇� = 16, - /** - * 淇濋櫓鍗冲皢鍒版湡 - */ - 淇濋櫓鍗冲皢鍒版湡 = 17, - /** - * 閽卞寘寮�鎴� - */ - 閽卞寘寮�鎴� = 18, - /** - * 瀵瑰崟杞处鎴愬姛 - */ - 瀵瑰崟杞处鎴愬姛 = 19, - /** - * 瀵瑰崟杞处瀹℃牳鏈�氳繃 - */ - 瀵瑰崟杞处瀹℃牳鏈�氳繃 = 20, - /** - * 瀵瑰崟杞处澶辫触 - */ - 瀵瑰崟杞处澶辫触 = 21, - /** - * 鑱婂ぉ娑堟伅 - */ - 鑱婂ぉ娑堟伅 = 999, - /** - * 璧炴敹钘忚祫璁秷鎭� - */ - 璧炴敹钘忚祫璁秷鎭� = 1000, - /** - * 璧炶瘎璁鸿涓氬湀娑堟伅 - */ - 璧炶瘎璁鸿涓氬湀娑堟伅 = 1001, - /** - * 鐢ㄦ埛鏂板鍏虫敞 - */ - 鐢ㄦ埛鏂板鍏虫敞 = 1002, -} diff --git a/packages/constants/order.ts b/packages/constants/order.ts deleted file mode 100644 index e7d0142..0000000 --- a/packages/constants/order.ts +++ /dev/null @@ -1,326 +0,0 @@ -//鍔冲姟鎷涜仒 -//鎷涜仒浜烘暟 -export enum HireType { - hireNumber = 10, - hireEndNumber = 20, -} -export const HireTypeText = { - [HireType.hireNumber]: '鍥哄畾浜烘暟', - [HireType.hireEndNumber]: '鑼冨洿浜烘暟', -}; -//鎬у埆瑕佹眰 -export enum SexRequirement { - unlimited = 0, - male = 10, - female = 20, - setting = 30, -} -export const SexRequirementText = { - [SexRequirement.unlimited]: '涓嶉檺', - [SexRequirement.male]: '浠呴檺鐢峰+', - [SexRequirement.female]: '浠呴檺濂冲+', - [SexRequirement.setting]: '鐢峰コ璁惧畾', -}; -export const SexRequirementTextV3 = { - [SexRequirement.unlimited]: '涓嶉檺', - [SexRequirement.male]: '鐢锋��', - [SexRequirement.female]: '濂虫��', -}; -//瀛﹀巻瑕佹眰 -export enum EducationStatus { - unlimited = 0, - primary = 10, - junior = 20, - high = 30, - specialty = 40, - university = 50, - master = 60, - doctor = 70, -} -export const EducationStatusText = { - [EducationStatus.unlimited]: '涓嶉檺', - [EducationStatus.primary]: '灏忓', - [EducationStatus.junior]: '鍒濅腑', - [EducationStatus.high]: '楂樹腑', - [EducationStatus.specialty]: '涓撶', - [EducationStatus.university]: '澶у', - [EducationStatus.master]: '纭曞+', - [EducationStatus.doctor]: '鍗氬+', -}; -//宸ヤ綔鎬ц川 -export enum WorkNature { - secondShifts = 10, - onlyDay = 20, -} -export const WorkNatureText = { - [WorkNature.secondShifts]: '涓ょ彮鍊�', - [WorkNature.onlyDay]: '浠呯櫧鐝�', -}; -//宸ヨ祫鍙戞斁绫诲瀷 -export enum SalaryType { - month = 10, - week = 20, - day = 30, -} -export const SalaryTypeText = { - [SalaryType.month]: '姣忔湀鍙戞斁', - [SalaryType.week]: '姣忓懆鍙戞斁', - [SalaryType.day]: '姣忓ぉ鍙戞斁', -}; -export const SalaryTypeTextV3 = { - [SalaryType.month]: '鏈堢粨', - [SalaryType.week]: '鍛ㄧ粨', - [SalaryType.day]: '鏃ョ粨', -}; -//瀵瑰鑱旂郴鏂瑰紡 -export enum ExternalcontactType { - platform = 10, - Manual = 20, -} -export const ExternalcontactTypeText = { - [ExternalcontactType.platform]: '骞冲彴400', - [ExternalcontactType.Manual]: '鎵嬪姩杈撳叆', -}; - -/** - * 杩旇垂 - */ -export enum OrderRebateMode { - /** - * 闄愭椂杩� - */ - Hour = 10, - /** - * 涓�娆℃�ц繑 - */ - Recruit = 20, - /** - * 闀挎湡杩� - */ - Continuous = 30, -} - -export const OrderRebateModeText = { - [OrderRebateMode.Hour]: '闄愭椂杩�', - [OrderRebateMode.Recruit]: '涓�娆℃�ц繑', - [OrderRebateMode.Continuous]: '闀挎湡杩�', -}; - -export const OrderRebateModeTextV3 = { - [OrderRebateMode.Continuous]: '闀挎湡杩�', - [OrderRebateMode.Hour]: '闄愭椂杩�', - [OrderRebateMode.Recruit]: '涓�娆℃�ц繑', -}; - -/** - * 杩旇垂鏃堕暱 0杩炵画鍚堜綔 鍏朵粬鏁板�煎氨浠h〃鏃堕暱鏈堜唤 - */ -export enum OrderRebateTime { - Continuous, - One, - Two, - Tree, - Four, - Five, - Six, - Seven, - Eight, - Nine, - Ten, - Eleven, - Twelve, -} - -export const OrderRebateTimeText = { - [OrderRebateTime.Continuous]: '杩炵画鍚堜綔', - [OrderRebateTime.One]: '1涓湀', - [OrderRebateTime.Two]: '2涓湀', - [OrderRebateTime.Tree]: '3涓湀', - [OrderRebateTime.Four]: '4涓湀', - [OrderRebateTime.Five]: '5涓湀', - [OrderRebateTime.Six]: '6涓湀', - [OrderRebateTime.Seven]: '7涓湀', - [OrderRebateTime.Eight]: '8涓湀', - [OrderRebateTime.Nine]: '9涓湀', - [OrderRebateTime.Ten]: '10涓湀', - [OrderRebateTime.Eleven]: '11涓湀', - [OrderRebateTime.Twelve]: '12涓湀', -}; - -/** - * 褰搑ebateMode涓篟ecruit鏃剁殑鏃堕棿鍗曚綅 - */ -export const OrderRebateTimeTextForRebateModeRecruit = '澶�/鍚�'; - -export enum SupplierProfitUint { - /** - * 涓�娆℃�у埄娑� - */ - Disposable = 10, - /** - * xx鍏�/姣忎汉/姣忓皬鏃� - */ - Hour = 20, - /** - * xx鍏�/姣忎汉/姣忔湀 - */ - Month = 30, -} - -/** - * 鏍规嵁rebateMode鑾峰彇supplierProfitUint - */ -export const SupplierProfitUintByRebateMode = { - [OrderRebateMode.Hour]: SupplierProfitUint.Hour, - [OrderRebateMode.Recruit]: SupplierProfitUint.Disposable, - [OrderRebateMode.Continuous]: SupplierProfitUint.Month, -}; - -export const SupplierProfitUintText = { - [SupplierProfitUint.Disposable]: '鍏�', - [SupplierProfitUint.Hour]: '鍏�/浜�/灏忔椂', - [SupplierProfitUint.Month]: '鍏�/浜�/鏈�', -}; - -export enum CycleTypeEnum { - /** - * 鎸夋湀 - */ - month = 10, - /** - * 鎸夋棩 - */ - day = 20, - /** - * 鎸夋椂 - */ - hour = 30, -} -export const CycleTypeEnumText = { - [CycleTypeEnum.month]: '鎸夋湀', - [CycleTypeEnum.day]: '鎸夋棩', - [CycleTypeEnum.hour]: '鎸夋椂', -}; -export const RebateCycleTypeText = { - [CycleTypeEnum.month]: '鏈�', - [CycleTypeEnum.day]: '鏃�', - [CycleTypeEnum.hour]: '鏃�', -}; -export const CycleTypeEnumUnitText = { - [CycleTypeEnum.month]: '鍏�/浜�/鏈�', - [CycleTypeEnum.day]: '鍏�/浜�/鏃�', - [CycleTypeEnum.hour]: '鍏�/浜�/鏃�', -}; - -export const EmptyRupplierRefund = { - rebateMode: OrderRebateMode.Hour, - rebateTime: '' as any as number, - supplierProfit: 0, - supplierProfitUint: SupplierProfitUint.Hour, - sequence: 0, -}; - -export enum OrderStatus { - /** - * 宸查┏鍥� - */ - Reject = -10, - /** - * 鏈彁浜� - */ - Draft = 10, - /** - * 寰呭鏍� - */ - WaitToAudit = 20, - /** - * 杩涜涓� - */ - Passed = 30, - /** - * 涓嬫灦 - */ - OffShelf = 40, - /** - * 杩愯惀涓嬫灦 - */ - SystemOffShelf = 50, -} - -export const OrderStatusText = { - [OrderStatus.Reject]: '宸查┏鍥�', - [OrderStatus.Draft]: '鑽夌', - [OrderStatus.WaitToAudit]: '寰呭鏍�', - [OrderStatus.Passed]: '鍙戝竷涓�', - [OrderStatus.OffShelf]: '宸插仠姝�', - [OrderStatus.SystemOffShelf]: '杩愯惀涓嬫灦', -}; - -export const OrderStatusTextForFilter = { - [OrderStatus.Reject]: '宸查┏鍥�', - [OrderStatus.WaitToAudit]: '寰呭鏍�', - [OrderStatus.Passed]: '鍙戝竷涓�', - [OrderStatus.OffShelf]: '宸插仠姝�', -}; - -export const OrderStatusTextMap = new Map([ - [OrderStatus.Passed, '鍙戝竷涓�'], - [OrderStatus.WaitToAudit, '寰呭鏍�'], - [OrderStatus.OffShelf, '宸插仠姝�'], - [OrderStatus.Reject, '宸查┏鍥�'], -]); - -export const OrderStatusTextTag = { - [OrderStatus.Reject]: 'danger', - [OrderStatus.Draft]: 'warning', - [OrderStatus.WaitToAudit]: 'warning', - [OrderStatus.Passed]: 'success', - [OrderStatus.OffShelf]: 'danger', - [OrderStatus.SystemOffShelf]: 'danger', -}; - -export enum OrderOperateBtnStatus { - Add = 1, - Edit, - Copy, -} - -export enum SalaryTimeTypeEnum { - /** - * 鏈堣柂 - */ - Month = 10, - /** - * 鍛ㄨ柂 - */ - Week = 20, - /** - * 鏃ヨ柂 - */ - Day = 30, - /** - * 鏃惰柂 - */ - Hour = 40, -} - -export const SalaryTimeTypeEnumText = { - [SalaryTimeTypeEnum.Month]: '鏈堣柂', - [SalaryTimeTypeEnum.Week]: '鍛ㄨ柂', - [SalaryTimeTypeEnum.Day]: '鏃ヨ柂', - [SalaryTimeTypeEnum.Hour]: '鏃惰柂', -}; - -export const SalaryTimeTypeEnumUnit = { - [SalaryTimeTypeEnum.Month]: '鍏�/鏈�', - [SalaryTimeTypeEnum.Week]: '鍏�/鍛�', - [SalaryTimeTypeEnum.Day]: '鍏�/澶�', - [SalaryTimeTypeEnum.Hour]: '鍏�/灏忔椂', -}; - -export const SalaryTimeTypeEnumUnitExact = { - [SalaryTimeTypeEnum.Month]: '鏈�', - [SalaryTimeTypeEnum.Week]: '鍛�', - [SalaryTimeTypeEnum.Day]: '澶�', - [SalaryTimeTypeEnum.Hour]: '灏忔椂', -}; diff --git a/packages/constants/resource.ts b/packages/constants/resource.ts deleted file mode 100644 index 7fa106b..0000000 --- a/packages/constants/resource.ts +++ /dev/null @@ -1,59 +0,0 @@ -export enum ResourceStatus { - /** - * 宸查┏鍥� - */ - Reject = -10, - /** - * 鏈彁浜� - */ - Draft = 10, - /** - * 寰呭鏍� - */ - WaitAudit = 20, - /** - * 杩涜涓� - */ - Running = 30, - /** - * 宸蹭笅鏋� - */ - OffShelf = 40, - /** - * 绯荤粺涓嬫灦 - */ - SystemOffShelf = 50, -} - -export const ResourceStatusText = { - [ResourceStatus.Reject]: '宸查┏鍥�', - [ResourceStatus.Draft]: '鏈彁浜�', - [ResourceStatus.WaitAudit]: '寰呭鏍�', - [ResourceStatus.Running]: '鍙戝竷涓�', - [ResourceStatus.OffShelf]: '宸插仠姝�', - [ResourceStatus.SystemOffShelf]: '绯荤粺涓嬫灦', -}; - -export const ResourceStatusTextMap = { - [ResourceStatus.Running]: '鍙戝竷涓�', - [ResourceStatus.WaitAudit]: '寰呭鏍�', - [ResourceStatus.Reject]: '宸查┏鍥�', - [ResourceStatus.OffShelf]: '宸插仠姝�', - // [ResourceStatus.SystemOffShelf, '绯荤粺涓嬫灦'], - // [ResourceStatus.Draft, '鏈彁浜�'], -}; - -export const ResourceStatusTextTag = { - [ResourceStatus.Reject]: 'danger', - [ResourceStatus.Draft]: 'warning', - [ResourceStatus.WaitAudit]: 'warning', - [ResourceStatus.Running]: 'success', - [ResourceStatus.OffShelf]: 'danger', - [ResourceStatus.SystemOffShelf]: 'danger', -}; - -export enum ResourceOperateBtnStatus { - Add = 1, - Edit, - Copy, -} diff --git a/packages/constants/user.ts b/packages/constants/user.ts index c00f870..f1af5ad 100644 --- a/packages/constants/user.ts +++ b/packages/constants/user.ts @@ -144,24 +144,3 @@ [Gender.Male]: '鐢�', [Gender.Female]: '濂�', }; - -export enum MatchMakingIdentityEnum { - /** - * 鐢ㄤ汉鏂� - */ - Employing = 10, - /** - * 渚涗汉鏂� - */ - Contributors = 20, -} - -export const MatchMakingIdentityEnumText = { - [MatchMakingIdentityEnum.Employing]: '鐢ㄤ汉鏂�', - [MatchMakingIdentityEnum.Contributors]: '渚涗汉鏂�', -}; - -export const MatchMakingIdentityEnumTitle = { - [MatchMakingIdentityEnum.Employing]: '鎵捐祫婧�', - [MatchMakingIdentityEnum.Contributors]: '鎵捐鍗�', -}; diff --git a/packages/utils/index.ts b/packages/utils/index.ts index 21b2cd1..162eb91 100644 --- a/packages/utils/index.ts +++ b/packages/utils/index.ts @@ -1,7 +1,6 @@ export * from './categoryUtils'; export * from './area'; export * from './common'; -export * from './product'; export * from './validator'; export * from './authentication'; export * from './fetchOssImage'; @@ -13,5 +12,4 @@ export * from './sensitive'; export * from './user'; export * from './media'; -export * from './order'; export * from './location'; diff --git a/packages/utils/order/index.ts b/packages/utils/order/index.ts deleted file mode 100644 index da75e79..0000000 --- a/packages/utils/order/index.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - HireType, - SupplierProfitUintText, - OrderRebateModeText, - CycleTypeEnumUnitText, - SalaryTimeTypeEnumUnit, -} from '@12333/constants'; -import { filterJoin } from '@12333/utils'; - -export class OrderUtils { - static getHireNumber(hireType: HireType, hireNumber?: number, hireEndNumber?: number) { - if (hireNumber) { - return hireType === HireType.hireNumber ? hireNumber : `${hireNumber}~${hireEndNumber}`; - } - return 0; - } - - static getSupplierRefund(row: API.OrderSupplierRefundInfo[]) { - if (!row?.length) { - return '鏈~鍐欎緵搴斿晢鍒╂鼎'; - } - const item = row[0]; - return `${item.supplierProfit}${ - CycleTypeEnumUnitText[item.supplierProfitUint] ?? '鏈~鍐欎緵搴斿晢鍒╂鼎' - }`; - } - - static getRebateModeText(row: API.OrderSupplierRefundInfo[]) { - if (!row?.length) { - return ''; - } - const item = row[0]; - return `${OrderRebateModeText[item.rebateMode] ?? ''}`; - } - - static getIntegratedSalary<T extends { salaryTimeType?: number; integratedSalary?: string }>( - row: T - ) { - return `${row.integratedSalary ?? ''}${SalaryTimeTypeEnumUnit[row.salaryTimeType] ?? ''}`; - } - - static getAddress<T extends { provinceName?: string; cityName?: string; countyName?: string }>( - row: T - ) { - return filterJoin([row.provinceName ?? '', row.cityName ?? '', row.countyName ?? '']); - } -} diff --git a/packages/utils/product/index.ts b/packages/utils/product/index.ts deleted file mode 100644 index e6aa6bb..0000000 --- a/packages/utils/product/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import dayjs from 'dayjs'; - -export function getMainCoverUrl(covers: API.CoverInfo[]) { - if (covers.length > 0) { - const mainCover = covers.find((x) => x.isMain); - return mainCover ? mainCover.url : covers[0].url; - } - return ''; -} - -export function getMinPrice(priceVersions: API.PriceVersionInfo[]) { - const _priceVersions = priceVersions.sort((a, b) => a.price - b.price); - return _priceVersions?.[0] ?? null; -} - -export function getToHoldTime(toHoldStartTime: string, toHoldEndTime: string) { - const isSameYear = dayjs(toHoldStartTime).isSame(dayjs(toHoldEndTime), 'year'); - return `${toHoldStartTime ? dayjs(toHoldStartTime).format('YYYY.MM.DD') : ''}-${ - toHoldEndTime ? dayjs(toHoldEndTime).format(isSameYear ? 'MM.DD' : 'YYYY.MM.DD') : '' - }`; -} - -export function getToHoldTimeV2(toHoldStartTime: string, toHoldEndTime: string) { - return `${toHoldStartTime ? dayjs(toHoldStartTime).format('YYYY.MM.DD') : ''}鑷�${ - toHoldEndTime ? dayjs(toHoldEndTime).format('YYYY.MM.DD') : '' - }`; -} diff --git a/patches/@nutui__nutui-taro@4.1.5.patch b/patches/@nutui__nutui-taro@4.1.5.patch deleted file mode 100644 index ec3e028..0000000 --- a/patches/@nutui__nutui-taro@4.1.5.patch +++ /dev/null @@ -1,136 +0,0 @@ -diff --git a/dist/packages/_es/Sku.js b/dist/packages/_es/Sku.js -index 3ef5c642f29d4f2ec84ba437e4162b61048117e4..4dbaf18dc6d447cc1e9378b353bd12327d48a5bc 100644 ---- a/dist/packages/_es/Sku.js -+++ b/dist/packages/_es/Sku.js -@@ -14,7 +14,7 @@ var __spreadValues = (a, b) => { - } - return a; - }; --import { reactive, toRefs, resolveComponent, openBlock, createElementBlock, createTextVNode, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots } from "vue"; -+import { reactive, toRefs, resolveComponent, openBlock, createElementBlock, createTextVNode, createElementVNode, renderSlot, createBlock, createCommentVNode, toDisplayString, ref, watch, onMounted, Fragment, renderList, normalizeClass, createVNode, withCtx, createSlots, computed } from "vue"; - import Price from "./Price.js"; - import { c as createComponent, T as TypeOfFun } from "./component-01e0ee08.js"; - import Taro from "@tarojs/taro"; -@@ -172,16 +172,27 @@ const _sfc_main$2 = create$2({ - stepperTitle: { - type: String, - default: "璐拱鏁伴噺" -+ }, -+ outGoodsCount: { -+ type: [Number, String], - } - }, -- emits: ["click", "changeSku", "changeStepper", "clickBtnOptions", "overLimit", "reduce", "add"], -+ emits: ["click", "changeSku", "changeStepper", "clickBtnOptions", "overLimit", "reduce", "add", "update:outGoodsCount"], - components: { - [InputNumber.name]: InputNumber - }, - setup(props, { emit }) { -- const goodsCount = ref(props.stepperMin); -- onMounted(() => { -- goodsCount.value = props.stepperMin; -+ // const goodsCount = ref(props.stepperMin); -+ // onMounted(() => { -+ // goodsCount.value = props.stepperMin; -+ // }); -+ const goodsCount = computed({ -+ get() { -+ return props.outGoodsCount; -+ }, -+ set(val) { -+ emit("update:outGoodsCount", Number(val)); -+ }, - }); - const getExtraText = () => { - const { stepperExtraText } = props; -@@ -204,7 +215,7 @@ const _sfc_main$2 = create$2({ - }); - }; - const changeStepper = (value) => { -- goodsCount.value = value; -+ // goodsCount.value = value; - emit("changeStepper", value); - }; - return { -@@ -473,7 +484,8 @@ const _sfc_main = create({ - add, - reduce, - getSlots, -- translate -+ translate, -+ goodsCount - }; - } - }); -@@ -537,7 +549,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - createTextVNode(), - !_ctx.getSlots("sku-stepper") ? (openBlock(), createBlock(_component_sku_stepper, { - key: 1, -- goods: _ctx.goods, -+ outGoodsCount: _ctx.goodsCount, - "stepper-title": _ctx.stepperTitle || _ctx.translate("buyNumber"), - "stepper-max": _ctx.stepperMax, - "stepper-min": _ctx.stepperMin, -@@ -545,8 +557,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - onAdd: _ctx.add, - onReduce: _ctx.reduce, - onChangeStepper: _ctx.changeStepper, -- onOverLimit: _ctx.stepperOverLimit -- }, null, 8, ["goods", "stepper-title", "stepper-max", "stepper-min", "stepper-extra-text", "onAdd", "onReduce", "onChangeStepper", "onOverLimit"])) : createCommentVNode("", true), -+ onOverLimit: _ctx.stepperOverLimit, -+ "onUpdate:outGoodsCount":_cache[4] || (_cache[4] = ($event) => _ctx.goodsCount = $event), -+ }, null, 8, ["outGoodsCount", "stepper-title", "stepper-max", "stepper-min", "stepper-extra-text", "onAdd", "onReduce", "onChangeStepper", "onOverLimit"])) : createCommentVNode("", true), - createTextVNode(), - renderSlot(_ctx.$slots, "sku-stepper-bottom") - ]), -diff --git a/dist/packages/_es/Swiper.js b/dist/packages/_es/Swiper.js -index fce717fca8edb7c66fd4744d354985b4ca643bd6..d04e30d778ed12d9ccfa98952500b3a25b1ed079 100644 ---- a/dist/packages/_es/Swiper.js -+++ b/dist/packages/_es/Swiper.js -@@ -426,7 +426,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - renderSlot(_ctx.$slots, "default") - ], 6), - createTextVNode(), -- renderSlot(_ctx.$slots, "page"), -+ renderSlot(_ctx.$slots, "page", { activePagination: _ctx.activePagination }), - createTextVNode(), - _ctx.paginationVisible && !_ctx.$slots.page ? (openBlock(), createElementBlock("view", { - key: 0, -diff --git a/dist/packages/_es/Toast.js b/dist/packages/_es/Toast.js -index bc0cfe321ad5e8a23c509b6dc1935271b3718ed2..d7c534f6adbaa5374b7418dafbde85cdfed1056a 100644 ---- a/dist/packages/_es/Toast.js -+++ b/dist/packages/_es/Toast.js -@@ -103,6 +103,8 @@ const _sfc_main = create({ - if (val) { - show(); - } -+ },{ -+ immediate: true - } - ); - const hasIcon = computed(() => { -diff --git a/dist/packages/_es/Uploader.js b/dist/packages/_es/Uploader.js -index 5d439e9e8527b76a80960df040a0924c193fcecb..334b89cacc07b7a77ac82b577e4c733779a433d5 100644 ---- a/dist/packages/_es/Uploader.js -+++ b/dist/packages/_es/Uploader.js -@@ -542,6 +542,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { - createVNode(_component_Failure) - ]) - ], 8, _hoisted_6)) : createCommentVNode("", true), -+ renderSlot(_ctx.$slots, "extra-img",{ item: item }), - createTextVNode(), - (((_a = item == null ? void 0 : item.type) == null ? void 0 : _a.includes("image")) || ((_b = item == null ? void 0 : item.type) == null ? void 0 : _b.includes("video"))) && item.url ? (openBlock(), createElementBlock("img", { - key: 2, -diff --git a/dist/packages/_es/index.taro-afea5bcb.js b/dist/packages/_es/index.taro-afea5bcb.js -index 6d46bc87a7709a31995be11cae57d6a8dca51aa5..44ce6f9a9d8c6cf50b9a87930228a3b0269b2aaf 100644 ---- a/dist/packages/_es/index.taro-afea5bcb.js -+++ b/dist/packages/_es/index.taro-afea5bcb.js -@@ -29,7 +29,7 @@ const popupProps = { - }, - zIndex: { - type: [Number, String], -- default: 2e3 -+ default: 20022221 - }, - duration: { - type: [Number, String], \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f2436b..500eff8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -150,7 +150,7 @@ version: 0.0.9 '@nutui/nutui-taro': specifier: ^4.3.13 - version: 4.3.13(patch_hash=jq3denbtva5gwaaxiatjgbkrsm)(unplugin-vue-components@0.28.0)(vue@3.5.12) + version: 4.3.13(patch_hash=jq3denbtva5gwaaxiatjgbkrsm)(unplugin-vue-components@0.27.4)(vue@3.5.12) '@tanstack/vue-query': specifier: ^4.35.3 version: 4.35.3(@vue/composition-api@1.7.2)(vue@3.5.12) @@ -366,8 +366,8 @@ specifier: ^0.16.6 version: 0.16.6 unplugin-vue-components: - specifier: ^0.28.0 - version: 0.28.0(vue@3.5.12) + specifier: ^0.27.4 + version: 0.27.4(vue@3.5.12) vue-eslint-parser: specifier: ^9.3.1 version: 9.3.1(eslint@8.41.0) @@ -5972,7 +5972,7 @@ resolution: {integrity: sha512-10VYAtFC+o1X0anGs+y2PgF1NWMeLFz2JVMRw4BWLg6wbtVbYy9wukLxyGhZC6Yf6t39DcwaGVda8paV7K6/Ew==} dev: false - /@nutui/nutui-taro@4.3.13(patch_hash=jq3denbtva5gwaaxiatjgbkrsm)(unplugin-vue-components@0.28.0)(vue@3.5.12): + /@nutui/nutui-taro@4.3.13(patch_hash=jq3denbtva5gwaaxiatjgbkrsm)(unplugin-vue-components@0.27.4)(vue@3.5.12): resolution: {integrity: sha512-+n8vVZAu92MUX6VEf6gO73Iz3JThjksdb6aSarvciCSydlWWdlQqZwYIGMTG4zOwDfCoQ3HfLa36zVaIJLSn3g==} peerDependencies: unplugin-vue-components: '>=0.25.1' @@ -5983,7 +5983,7 @@ dependencies: '@nutui/icons-vue-taro': 0.0.9 sass: 1.79.1 - unplugin-vue-components: 0.28.0(vue@3.5.12) + unplugin-vue-components: 0.27.4(vue@3.5.12) vue: 3.5.12(typescript@5.2.2) dev: false patched: true @@ -19370,7 +19370,7 @@ vue: '*' dependencies: '@nutui/icons-vue-taro': 0.0.9 - '@nutui/nutui-taro': 4.3.13(patch_hash=jq3denbtva5gwaaxiatjgbkrsm)(unplugin-vue-components@0.28.0)(vue@3.5.12) + '@nutui/nutui-taro': 4.3.13(patch_hash=jq3denbtva5gwaaxiatjgbkrsm)(unplugin-vue-components@0.27.4)(vue@3.5.12) '@tanstack/vue-query': 4.35.3(@vue/composition-api@1.7.2)(vue@3.5.12) '@tarojs/components': 3.6.20(postcss@8.4.19)(react@19.0.0)(vue@3.5.12) '@tarojs/taro': 3.6.20(postcss@8.4.19)(vue@3.5.12) @@ -20989,8 +20989,8 @@ - webpack-sources dev: true - /unplugin-vue-components@0.28.0(vue@3.5.12): - resolution: {integrity: sha512-jiTGtJ3JsRFBjgvyilfrX7yUoGKScFgbdNw+6p6kEXU+Spf/rhxzgvdfuMcvhCcLmflB/dY3pGQshYBVGOUx7Q==} + /unplugin-vue-components@0.27.4(vue@3.5.12): + resolution: {integrity: sha512-1XVl5iXG7P1UrOMnaj2ogYa5YTq8aoh5jwDPQhemwO/OrXW+lPQKDXd1hMz15qxQPxgb/XXlbgo3HQ2rLEbmXQ==} engines: {node: '>=14'} peerDependencies: '@babel/parser': ^7.15.8 @@ -21011,11 +21011,12 @@ magic-string: 0.30.17 minimatch: 9.0.5 mlly: 1.7.4 - unplugin: 2.1.2 + unplugin: 1.14.1 vue: 3.5.12(typescript@5.2.2) transitivePeerDependencies: - rollup - supports-color + - webpack-sources /unplugin-vue2-script-setup@0.11.4(@vue/composition-api@1.7.2)(@vue/runtime-dom@3.5.12): resolution: {integrity: sha512-HOJn7PwKBq36vvtAkx2QXpmMmXk9owIX4H77d4cF5RpiPuSY/u4P3nWF6a276LHrBGtb0/UHmCbeUeGeeJ1DWg==} @@ -21057,13 +21058,6 @@ peerDependenciesMeta: webpack-sources: optional: true - dependencies: - acorn: 8.14.0 - webpack-virtual-modules: 0.6.2 - - /unplugin@2.1.2: - resolution: {integrity: sha512-Q3LU0e4zxKfRko1wMV2HmP8lB9KWislY7hxXpxd+lGx0PRInE4vhMBVEZwpdVYHvtqzhSrzuIfErsob6bQfCzw==} - engines: {node: '>=18.12.0'} dependencies: acorn: 8.14.0 webpack-virtual-modules: 0.6.2 -- Gitblit v1.9.1