This commit is contained in:
YunaiV
2024-10-13 21:46:38 +08:00
84 changed files with 8493 additions and 3067 deletions

View File

@@ -129,7 +129,7 @@ const emit = defineEmits<{
(e: 'change', v: CouponTemplateApi.CouponTemplateVO[]): void
}>()
const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('选择优惠') // 弹窗的标题
const dialogTitle = ref('选择优惠') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中1修改时的数据加载2提交的按钮禁用
const loading = ref(true) // 列表的加载中
const total = ref(0) // 列表的总页数

View File

@@ -115,7 +115,7 @@
<el-radio-group v-model="formData.takeType">
<el-radio :key="1" :value="1">直接领取</el-radio>
<el-radio :key="2" :value="2">指定发放</el-radio>
<el-radio :key="2" :value="3">新人</el-radio>
<el-radio :key="2" :value="3">新人</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formData.takeType === 1" label="发放数量" prop="totalCount">

View File

@@ -190,7 +190,7 @@ const submitForm = async () => {
const products = cloneDeep(spuAndSkuListRef.value.getSkuConfigs('productConfig'))
products.forEach((item: DiscountActivityApi.DiscountProductVO) => {
item.discountPercent = convertToInteger(item.discountPercent)
item.discountPrice = convertToInteger(yuanToFen(item.discountPrice))
item.discountPrice = convertToInteger(item.discountPrice)
})
const data = cloneDeep(formRef.value.formModel) as DiscountActivityApi.DiscountActivityVO
data.products = products

View File

@@ -70,17 +70,6 @@ const crudSchemas = reactive<CrudSchema[]>([
width: 120
}
},
{
label: '优惠类型',
field: 'discountType',
dictType: DICT_TYPE.PROMOTION_DISCOUNT_TYPE,
dictClass: 'number',
isSearch: true,
form: {
component: 'Radio',
value: 1
}
},
{
label: '活动商品',
field: 'spuId',

View File

@@ -22,13 +22,15 @@
<div class="ml-10px w-100%">
<div class="flex justify-between items-center w-100%">
<span class="username">{{ item.userNickname }}</span>
<span class="color-[var(--left-menu-text-color)]" style="font-size: 13px;">
<span class="color-[var(--left-menu-text-color)]" style="font-size: 13px">
{{ formatPast(item.lastMessageTime, 'YYYY-MM-DD') }}
</span>
</div>
<!-- 最后聊天内容 -->
<div
v-dompurify-html="getConversationDisplayText(item.lastMessageContentType, item.lastMessageContent)"
v-dompurify-html="
getConversationDisplayText(item.lastMessageContentType, item.lastMessageContent)
"
class="last-message flex items-center color-[var(--left-menu-text-color)]"
>
</div>
@@ -205,7 +207,7 @@ watch(showRightMenu, (val) => {
.active {
border-left: 5px #3271ff solid;
background-color: var(--left-menu-bg-active-color);
background-color: var(--login-bg-color);
}
.pinned {
@@ -215,7 +217,7 @@ watch(showRightMenu, (val) => {
.right-menu-ul {
position: absolute;
background-color: var(--app-content-bg-color);
padding: 10px;
padding: 5px;
margin: 0;
list-style-type: none; /* 移除默认的项目符号 */
border-radius: 12px;

View File

@@ -1,8 +1,13 @@
<template>
<div v-if="isObject(getMessageContent)" @click="openDetail(getMessageContent.id)" style="cursor: pointer;">
<div v-if="isObject(getMessageContent)">
<div :key="getMessageContent.id" class="order-list-card-box mt-14px">
<div class="order-card-header flex items-center justify-between p-x-5px">
<div class="order-no">订单号{{ getMessageContent.no }}</div>
<div class="order-no">
订单号
<span style="cursor: pointer" @click="openDetail(getMessageContent.id)">
{{ getMessageContent.no }}
</span>
</div>
<div :class="formatOrderColor(getMessageContent)" class="order-state font-16">
{{ formatOrderStatus(getMessageContent) }}
</div>
@@ -113,8 +118,15 @@ function formatOrderStatus(order: any) {
height: 28px;
.order-no {
font-size: 10px;
font-size: 12px;
font-weight: 500;
span {
&:hover {
text-decoration: underline;
color: var(--left-menu-bg-active-color);
}
}
}
}

View File

@@ -25,7 +25,7 @@
import { KeFuConversationList, KeFuMessageList, MemberBrowsingHistory } from './components'
import { WebSocketMessageTypeConstants } from './components/tools/constants'
import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation'
import { getAccessToken } from '@/utils/auth'
import { getRefreshToken } from '@/utils/auth'
import { useWebSocket } from '@vueuse/core'
defineOptions({ name: 'KeFu' })
@@ -34,7 +34,9 @@ const message = useMessage() // 消息弹窗
// ======================= WebSocket start =======================
const server = ref(
(import.meta.env.VITE_BASE_URL + '/infra/ws').replace('http', 'ws') + '?token=' + getAccessToken()
(import.meta.env.VITE_BASE_URL + '/infra/ws').replace('http', 'ws') +
'?token=' +
getRefreshToken() // 使用 getRefreshToken() 方法,而不使用 getAccessToken() 方法的原因WebSocket 无法方便的刷新访问令牌
) // WebSocket 服务地址
/** 发起 WebSocket 连接 */

View File

@@ -1,5 +1,5 @@
<template>
<el-button class="ml-10px" type="text" @click="selectCoupon">添加优惠</el-button>
<el-button class="ml-10px" type="text" @click="selectCoupon">添加优惠</el-button>
<div
v-for="(item, index) in list"
@@ -57,7 +57,7 @@ const emits = defineEmits<{
const rewardRule = useVModel(props, 'modelValue', emits) // 赠送规则
const list = ref<GiveCouponVO[]>([]) // 选择的优惠券列表
/** 选择赠送的优惠类型拓展 */
/** 选择赠送的优惠类型拓展 */
interface GiveCouponVO extends CouponTemplateApi.CouponTemplateVO {
giveCount?: number
}