Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
646e2340ff |
@ -1,66 +0,0 @@
|
||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
||||
|
||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
||||
|
||||
name: filesystem-drone # 定义流水线名称
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
- name: build-copy-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 101.43.112.107 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
command_timeout: 20m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- ssh root@47.118.40.3 "sh -c 'cd /build_project/allLikeMall/yudao-admin-vue3 && git pull origin master && /usr/bin/pnpm install && /usr/bin/pnpm run build:prod && zip -r dist-prod.zip dist-prod'"
|
||||
- scp root@47.118.40.3:/build_project/allLikeMall/yudao-admin-vue3/dist-prod.zip /build_package/
|
||||
- scp /build_package/dist-prod.zip root@1.14.205.126:/build_package/
|
||||
- name: build-java-and-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 1.14.205.126 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- echo "build-java......"
|
||||
- cd /root/allLikeMall
|
||||
- git fetch origin
|
||||
- git reset --hard origin/master
|
||||
- git clean -fd
|
||||
- /root/apache-maven-3.9.4/bin/mvn package -Dmaven.test.skip=true
|
||||
- cd yudao-server
|
||||
- chmod +x all.sh
|
||||
- ./all.sh
|
||||
- echo "build-vue......"
|
||||
- cd /build_package
|
||||
- rm -rf dist-prod
|
||||
- unzip dist-prod.zip
|
||||
- rm -rf /root/nginx/html/mall
|
||||
- mv dist-prod /root/nginx/html/mall
|
||||
|
@ -1,27 +0,0 @@
|
||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
||||
name: filesystem-drone # 定义流水线名称
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
- name: build-java
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
settings:
|
||||
host: 1.14.205.126 # 远程连接地址
|
||||
username: root # 远程连接账号
|
||||
password:
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
port: 22 # 远程连接端口
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
script:
|
||||
- echo "build-java......"
|
||||
- cd /root/allLikeMall
|
||||
- git fetch origin
|
||||
- git reset --hard origin/master
|
||||
- git clean -fd
|
||||
- /root/apache-maven-3.9.4/bin/mvn package -Dmaven.test.skip=true
|
||||
- cd yudao-server
|
||||
- chmod +x all.sh
|
||||
- ./all.sh
|
@ -1,57 +0,0 @@
|
||||
kind: pipeline # 定义对象类型,还有secret和signature两种类型
|
||||
|
||||
type: docker # 定义流水线类型,还有kubernetes、exec、ssh等类型
|
||||
|
||||
name: filesystem-drone # 定义流水线名称
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
- name: build-copy-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 101.43.112.107 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
command_timeout: 20m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- ssh root@47.118.40.3 "sh -c 'cd /build_project/allLikeMall/yudao-admin-vue3 && git pull origin master && /usr/bin/pnpm install && /usr/bin/pnpm run build:prod && zip -r dist-prod.zip dist-prod'"
|
||||
- scp root@47.118.40.3:/build_project/allLikeMall/yudao-admin-vue3/dist-prod.zip /build_package/
|
||||
- scp /build_package/dist-prod.zip root@1.14.205.126:/build_package/
|
||||
- name: build-vue
|
||||
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 1.14.205.126 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
password:
|
||||
|
||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- echo "build-vue......"
|
||||
- cd /build_package
|
||||
- rm -rf dist-prod
|
||||
- unzip dist-prod.zip
|
||||
- rm -rf /root/nginx/html/mall
|
||||
- mv dist-prod /root/nginx/html/mall
|
||||
|
@ -24,7 +24,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 10m # 远程执行命令超时时间
|
||||
command_timeout: 5m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- cd /root/allLikeMall
|
||||
@ -60,7 +60,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 30m # 远程执行命令超时时间
|
||||
command_timeout: 5m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
# - ls
|
@ -4,13 +4,12 @@ NODE_ENV=development
|
||||
VITE_DEV=true
|
||||
|
||||
# 请求路径
|
||||
#VITE_BASE_URL='https://zysc.fjptzykj.com'
|
||||
VITE_BASE_URL='http://192.168.1.12:6127'
|
||||
VITE_BASE_URL='http://localhost:6127'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='https://zysc.fjptzykj.com/admin-api/infra/file/upload'
|
||||
VITE_UPLOAD_URL='http://localhost:6127/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
|
@ -136,7 +136,7 @@
|
||||
<div class="app-loading">
|
||||
<div class="app-loading-wrap">
|
||||
<div class="app-loading-title">
|
||||
<!-- <img src="/logo.gif" class="app-loading-logo" alt="Logo" />-->
|
||||
<img src="/logo.gif" class="app-loading-logo" alt="Logo" />
|
||||
<div class="app-loading-title">%VITE_APP_TITLE%</div>
|
||||
</div>
|
||||
<div class="app-loading-item">
|
||||
|
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡档案 VO
|
||||
export interface CardBaseVO {
|
||||
id: number // 档案编号
|
||||
cardNum: string // 卡号
|
||||
scret: string // 卡密
|
||||
parentId: number // 上级id
|
||||
subId: number // 下级id
|
||||
}
|
||||
|
||||
// 会员卡档案 API
|
||||
export const CardBaseApi = {
|
||||
// 查询会员卡档案分页
|
||||
getCardBasePage: async (params: any) => {
|
||||
return await request.get({ url: `/mall/card-base/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡档案详情
|
||||
getCardBase: async (id: number) => {
|
||||
return await request.get({ url: `/mall/card-base/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡档案
|
||||
createCardBase: async (data: CardBaseVO) => {
|
||||
return await request.post({ url: `/mall/card-base/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡档案
|
||||
updateCardBase: async (data: CardBaseVO) => {
|
||||
return await request.put({ url: `/mall/card-base/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡档案
|
||||
deleteCardBase: async (id: number) => {
|
||||
return await request.delete({ url: `/mall/card-base/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡档案 Excel
|
||||
exportCardBase: async (params) => {
|
||||
return await request.download({ url: `/mall/card-base/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 发卡记录 VO
|
||||
export interface CardLogVO {
|
||||
id: number // 编号
|
||||
nickName: string // 会员昵称
|
||||
phone: string // 手机号
|
||||
countNumber: number // 数量
|
||||
cardSection: number // 区间
|
||||
}
|
||||
|
||||
// 发卡记录 API
|
||||
export const CardLogApi = {
|
||||
// 查询发卡记录分页
|
||||
getCardLogPage: async (params: any) => {
|
||||
return await request.get({ url: `/send/card-log/page`, params })
|
||||
},
|
||||
|
||||
// 查询发卡记录详情
|
||||
getCardLog: async (id: number) => {
|
||||
return await request.get({ url: `/send/card-log/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增发卡记录
|
||||
createCardLog: async (data: CardLogVO) => {
|
||||
return await request.post({ url: `/send/card-log/create`, data })
|
||||
},
|
||||
|
||||
// 修改发卡记录
|
||||
updateCardLog: async (data: CardLogVO) => {
|
||||
return await request.put({ url: `/send/card-log/update`, data })
|
||||
},
|
||||
|
||||
// 删除发卡记录
|
||||
deleteCardLog: async (id: number) => {
|
||||
return await request.delete({ url: `/send/card-log/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出发卡记录 Excel
|
||||
exportCardLog: async (params) => {
|
||||
return await request.download({ url: `/send/card-log/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡 VO
|
||||
export interface CardVO {
|
||||
id: number // 会员卡编号
|
||||
parentId: number // 上级用户id
|
||||
subId: number // 下级用户id
|
||||
cardNumber: string // 会员卡号
|
||||
isActivate: number // 是否已激活(0:未激活 , 1:已激活)
|
||||
activateTime: number // 激活时间
|
||||
}
|
||||
|
||||
// 会员卡 API
|
||||
export const CardApi = {
|
||||
// 查询会员卡分页
|
||||
getCardPage: async (params: any) => {
|
||||
return await request.get({ url: `/club/card/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡详情
|
||||
getCard: async (id: number) => {
|
||||
return await request.get({ url: `/club/card/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡
|
||||
createCard: async (data: CardVO) => {
|
||||
return await request.post({ url: `/club/card/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡
|
||||
updateCard: async (data: CardVO) => {
|
||||
return await request.put({ url: `/club/card/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡
|
||||
deleteCard: async (id: number) => {
|
||||
return await request.delete({ url: `/club/card/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡 Excel
|
||||
exportCard: async (params) => {
|
||||
return await request.download({ url: `/club/card/export-excel`, params })
|
||||
},
|
||||
}
|
@ -12,27 +12,12 @@ export const FollowUpRecordApi = {
|
||||
return await request.post({ url: `/intelligentForm/saveDynamicData`, data })
|
||||
},
|
||||
|
||||
//修改智能表单
|
||||
updateDynamicData: async (data) => {
|
||||
return await request.post({ url: `/intelligentForm/updateDynamicData`, data })
|
||||
},
|
||||
|
||||
//删除智能表单
|
||||
deleteDynamicDataById: async (id) => {
|
||||
return await request.get({ url: `/intelligentForm/deleteDynamicDataById?id=` + id, })
|
||||
},
|
||||
|
||||
// 查询文章管理列表
|
||||
collectDataList: async (id) => {
|
||||
return await request.get({ url: `/intelligentForm/collectDataList?id=` + id, })
|
||||
//查询对应表单的采集数据列表
|
||||
collectDataList: async(query) => {
|
||||
return await request.get({
|
||||
url: '/intelligentForm/collectDataList',
|
||||
method: 'get',
|
||||
params: {id:query}
|
||||
})
|
||||
}
|
||||
|
||||
// //查询对应表单的采集数据列表
|
||||
// collectDataList: async(query) => {
|
||||
// return await request.get({
|
||||
// url: '/intelligentForm/collectDataList',
|
||||
// method: 'get',
|
||||
// params: {id:query}
|
||||
// })
|
||||
// }
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ export interface FilePageReqVO extends PageParam {
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
|
||||
// 文件预签名地址 Response VO
|
||||
export interface FilePresignedUrlRespVO {
|
||||
// 文件配置编号
|
||||
@ -44,9 +43,3 @@ export const createFile = (data: any) => {
|
||||
export const updateFile = (data: any) => {
|
||||
return request.upload({ url: '/infra/file/upload', data })
|
||||
}
|
||||
|
||||
export const updatePicType = (id: number , picType: number) => {
|
||||
return request.get({ url: '/infra/file/updatePicType?id=' + id + `&picType=` + picType })
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 权益通知 VO
|
||||
export interface InterestVO {
|
||||
id: number // 权益编号
|
||||
title: string // 权益标题
|
||||
goodsName: string // 商品名称
|
||||
desc: string // 权益描述
|
||||
isUsed: string // 权益次数
|
||||
equity: string // 权益内容
|
||||
notice: string // 须知内容
|
||||
}
|
||||
|
||||
// 权益通知 API
|
||||
export const InterestApi = {
|
||||
// 查询权益通知分页
|
||||
getInterestPage: async (params: any) => {
|
||||
return await request.get({ url: `/notice/interest/page`, params })
|
||||
},
|
||||
|
||||
// 查询权益通知详情
|
||||
getInterest: async (id: number) => {
|
||||
return await request.get({ url: `/notice/interest/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增权益通知
|
||||
createInterest: async (data: InterestVO) => {
|
||||
return await request.post({ url: `/notice/interest/create`, data })
|
||||
},
|
||||
|
||||
// 修改权益通知
|
||||
updateInterest: async (data: InterestVO) => {
|
||||
return await request.put({ url: `/notice/interest/update`, data })
|
||||
},
|
||||
|
||||
// 删除权益通知
|
||||
deleteInterest: async (id: number) => {
|
||||
return await request.delete({ url: `/notice/interest/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出权益通知 Excel
|
||||
exportInterest: async (params) => {
|
||||
return await request.download({ url: `/notice/interest/export-excel`, params })
|
||||
},
|
||||
}
|
@ -109,13 +109,3 @@ export const exportSpu = async (params) => {
|
||||
export const getSpuSimpleList = async () => {
|
||||
return request.get({ url: '/product/spu/list-all-simple' })
|
||||
}
|
||||
|
||||
// 获得拼团商品 SPU 列表
|
||||
export const getSpuAdminSpuList = async () => {
|
||||
return request.get({ url: '/promotion/combination-activity/adminSpuList' })
|
||||
}
|
||||
|
||||
// 获得秒杀商品 SPU 列表
|
||||
export const getSpuMiaoShaAdminSpuList = async () => {
|
||||
return request.get({ url: '/promotion/seckill-activity/adminSpuList' })
|
||||
}
|
||||
|
@ -1,50 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 开屏广告 VO
|
||||
export interface AdvertisingVO {
|
||||
id: number // id
|
||||
status: number // 广告状态
|
||||
time: number // 广告时间(秒)
|
||||
property: string // 广告属性
|
||||
picData: []
|
||||
stat: boolean,
|
||||
}
|
||||
|
||||
// 开屏广告 API
|
||||
export const AdvertisingApi = {
|
||||
// 查询开屏广告分页
|
||||
getAdvertisingPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/advertising/page`, params })
|
||||
},
|
||||
|
||||
// 查询开屏广告详情
|
||||
getAdvertising: async () => {
|
||||
return await request.get({ url: `/promotion/advertising/getAdvertising`})
|
||||
},
|
||||
|
||||
// 新增开屏广告
|
||||
createAdvertising: async (data: AdvertisingVO) => {
|
||||
return await request.post({ url: `/promotion/advertising/create`, data })
|
||||
},
|
||||
|
||||
// 修改开屏广告
|
||||
updateAdvertising: async (data: AdvertisingVO) => {
|
||||
return await request.put({ url: `/promotion/advertising/update`, data })
|
||||
},
|
||||
|
||||
// 删除开屏广告
|
||||
deleteAdvertising: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/advertising/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出开屏广告 Excel
|
||||
exportAdvertising: async (params) => {
|
||||
return await request.download({ url: `/promotion/advertising/export-excel`, params })
|
||||
},
|
||||
|
||||
// 新增修稿开屏广告
|
||||
saveAdvertising: async (data: AdvertisingVO) => {
|
||||
return await request.post({ url: `/promotion/advertising/saveAdvertising`, data })
|
||||
},
|
||||
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 自动回复 VO
|
||||
export interface AutoResponseVO {
|
||||
id: number // id
|
||||
keyword: string // 关键字
|
||||
type: number // 回复类型,文字消息/0,图片消息/1
|
||||
content: string // 回复内容
|
||||
status: number // 是否开启,开启/1,关闭/0
|
||||
}
|
||||
|
||||
// 自动回复 API
|
||||
export const AutoResponseApi = {
|
||||
// 查询自动回复分页
|
||||
getAutoResponsePage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/auto-response/page`, params })
|
||||
},
|
||||
|
||||
// 查询自动回复详情
|
||||
getAutoResponse: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/auto-response/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增自动回复
|
||||
createAutoResponse: async (data: AutoResponseVO) => {
|
||||
return await request.post({ url: `/promotion/auto-response/create`, data })
|
||||
},
|
||||
|
||||
// 修改自动回复
|
||||
updateAutoResponse: async (data: AutoResponseVO) => {
|
||||
return await request.put({ url: `/promotion/auto-response/update`, data })
|
||||
},
|
||||
|
||||
// 删除自动回复
|
||||
deleteAutoResponse: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/auto-response/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出自动回复 Excel
|
||||
exportAutoResponse: async (params) => {
|
||||
return await request.download({ url: `/promotion/auto-response/export-excel`, params })
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 客服配置 VO
|
||||
export interface ConfigurationVO {
|
||||
id: number // id
|
||||
type: number // 客服类型
|
||||
feedback: string // 客服反馈
|
||||
phone: string // 客服电话
|
||||
link: string // 客服链接
|
||||
enterpriseID: string // 企业ID
|
||||
}
|
||||
|
||||
// 客服配置 API
|
||||
export const ConfigurationApi = {
|
||||
// 查询客服配置分页
|
||||
getConfigurationPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/ke-fu-configuration/page`, params })
|
||||
},
|
||||
|
||||
// 查询客服配置详情
|
||||
getConfiguration: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/ke-fu-configuration/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增客服配置
|
||||
createConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.post({ url: `/promotion/ke-fu-configuration/create`, data })
|
||||
},
|
||||
|
||||
// 修改客服配置
|
||||
updateConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.put({ url: `/promotion/ke-fu-configuration/update`, data })
|
||||
},
|
||||
|
||||
// 删除客服配置
|
||||
deleteConfiguration: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/ke-fu-configuration/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客服配置 Excel
|
||||
exportConfiguration: async (params) => {
|
||||
return await request.download({ url: `/promotion/ke-fu-configuration/export-excel`, params })
|
||||
}
|
||||
}
|
@ -56,32 +56,3 @@ export const getDiyTemplateProperty = async (id: number) => {
|
||||
export const updateDiyTemplateProperty = async (data: DiyTemplateVO) => {
|
||||
return await request.put({ url: `/promotion/diy-template/update-property`, data })
|
||||
}
|
||||
|
||||
|
||||
// 设置商品分类接口
|
||||
export const setDiyProjuctClass = async (id) => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/diy-template-goods?id=` + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获取商品分类接口
|
||||
export const getDiyProjuctClass = async () => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/getGoods`
|
||||
})
|
||||
}
|
||||
|
||||
// 设置主题风格
|
||||
export const setDiyZtClass = async (id) => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/diy-template-theme?id=` + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获取主题风格
|
||||
export const getDiyZtClass = async () => {
|
||||
return await request.get({
|
||||
url: `/system/dict-data/getTheme`
|
||||
})
|
||||
}
|
@ -25,8 +25,8 @@ export const saveDynamicData = async (data: ArticleVO) => {
|
||||
}
|
||||
|
||||
// 查询文章管理列表
|
||||
export const collectDataList = async (id: any) => {
|
||||
return await request.get({ url: `/intelligentForm/collectDataList?id=` + id, })
|
||||
export const collectDataList = async (query: any) => {
|
||||
return await request.get({ url: `/intelligentForm/collectDataList`, query })
|
||||
}
|
||||
|
||||
// // 修改文章管理
|
||||
|
@ -1,5 +1,4 @@
|
||||
import request from '@/config/axios'
|
||||
import { number } from 'vue-types'
|
||||
|
||||
export interface KeFuConversationRespVO {
|
||||
id: number // 编号
|
||||
@ -22,10 +21,6 @@ export const KeFuConversationApi = {
|
||||
getConversationList: async () => {
|
||||
return await request.get({ url: '/promotion/kefu-conversation/list' })
|
||||
},
|
||||
// 获得客服会话列表
|
||||
getConversationListByKefuId: async (kefuId: number , name: string) => {
|
||||
return await request.get({ url: '/promotion/kefu-conversation/list?kefuId=' + kefuId + `&name=` + name })
|
||||
},
|
||||
// 客服会话置顶
|
||||
updateConversationPinned: async (data: any) => {
|
||||
return await request.put({
|
||||
@ -35,10 +30,6 @@ export const KeFuConversationApi = {
|
||||
},
|
||||
// 删除客服会话
|
||||
deleteConversation: async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/kefu-conversation/delete?id=' + id })
|
||||
},
|
||||
// 转接会话给其它客服
|
||||
transferConversion: async (id: number, kefuId: number) => {
|
||||
return await request.get({ url: `/promotion/kefu-conversation/transfer/${id}/${kefuId}`})
|
||||
return await request.get({ url: '/promotion/kefu-conversation/delete?id' + id })
|
||||
}
|
||||
}
|
||||
|
@ -32,10 +32,5 @@ export const KeFuMessageApi = {
|
||||
// 获得消息分页数据
|
||||
getKeFuMessagePage: async (params: any) => {
|
||||
return await request.get({ url: '/promotion/kefu-message/page', params })
|
||||
},
|
||||
|
||||
// 获得消息分页数据
|
||||
getBySenderIdStat: async (senderId: number) => {
|
||||
return await request.get({ url: '/promotion/kefu-message/getBySenderIdStat?senderId=' + senderId })
|
||||
}
|
||||
}
|
||||
|
@ -1,51 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 用户留言 VO
|
||||
export interface LeaveWordVO {
|
||||
id: number // id
|
||||
name: string // 昵称
|
||||
phone: string // 电话
|
||||
content: string // 内容
|
||||
response: string //回复内容
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 用户留言 API
|
||||
export const LeaveWordApi = {
|
||||
// 查询用户留言分页
|
||||
getLeaveWordPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/leave-word/page`, params })
|
||||
},
|
||||
|
||||
// 查询用户留言详情
|
||||
getLeaveWord: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/leave-word/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增用户留言
|
||||
createLeaveWord: async (data: LeaveWordVO) => {
|
||||
return await request.post({ url: `/promotion/leave-word/create`, data })
|
||||
},
|
||||
|
||||
// 修改用户留言
|
||||
updateLeaveWord: async (data: LeaveWordVO) => {
|
||||
return await request.put({ url: `/promotion/leave-word/update`, data })
|
||||
},
|
||||
|
||||
// 删除用户留言
|
||||
deleteLeaveWord: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/leave-word/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出用户留言 Excel
|
||||
exportLeaveWord: async (params) => {
|
||||
return await request.download({ url: `/promotion/leave-word/export-excel`, params })
|
||||
},
|
||||
|
||||
// 添加回复内容
|
||||
addResponse: async (id: number, content: string) => {
|
||||
return await request.get({ url: `/promotion/leave-word/addResponse?id=` + id +`&&response=` + content })
|
||||
},
|
||||
|
||||
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 付费会员权益 VO
|
||||
export interface PaidMemberBenefitVO {
|
||||
id: number // 编号
|
||||
benName: string // 权益名称
|
||||
showName: string // 展示名称
|
||||
iconUrl: string // 图标地址
|
||||
intro: string // 描述
|
||||
status: boolean // 状态:(默认)0隐藏 1显示
|
||||
sort: number // 排序
|
||||
}
|
||||
|
||||
// 付费会员权益 API
|
||||
export const PaidMemberBenefitApi = {
|
||||
// 查询付费会员权益分页
|
||||
getPaidMemberBenefitPage: async (params: any) => {
|
||||
return await request.get({ url: `/paidmemberbenefit/paid-member-benefit/page`, params })
|
||||
},
|
||||
|
||||
// 查询付费会员权益详情
|
||||
getPaidMemberBenefit: async (id: number) => {
|
||||
return await request.get({ url: `/paidmemberbenefit/paid-member-benefit/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增付费会员权益
|
||||
createPaidMemberBenefit: async (data: PaidMemberBenefitVO) => {
|
||||
return await request.post({ url: `/paidmemberbenefit/paid-member-benefit/create`, data })
|
||||
},
|
||||
|
||||
// 修改付费会员权益
|
||||
updatePaidMemberBenefit: async (data: PaidMemberBenefitVO) => {
|
||||
return await request.put({ url: `/paidmemberbenefit/paid-member-benefit/update`, data })
|
||||
},
|
||||
// 修改会员权益状态
|
||||
updatePaidMemberBenefitStatus: async (data: any) => {
|
||||
return await request.put({ url: `/paidmemberbenefit/paid-member-benefit/updateStatus`, data})
|
||||
},
|
||||
|
||||
// 删除付费会员权益
|
||||
deletePaidMemberBenefit: async (id: number) => {
|
||||
return await request.delete({ url: `/paidmemberbenefit/paid-member-benefit/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出付费会员权益 Excel
|
||||
exportPaidMemberBenefit: async (params) => {
|
||||
return await request.download({ url: `/paidmemberbenefit/paid-member-benefit/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
import { Sku, Spu } from '@/api/mall/product/spu' // 积分商城活动 VO
|
||||
|
||||
// 积分商城活动 VO
|
||||
export interface PointActivityVO {
|
||||
id: number // 积分商城活动编号
|
||||
spuId: number // 积分商城活动商品
|
||||
status: number // 活动状态
|
||||
stock: number // 积分商城活动库存
|
||||
totalStock: number // 积分商城活动总库存
|
||||
remark?: string // 备注
|
||||
sort: number // 排序
|
||||
createTime: string // 创建时间
|
||||
products: PointProductVO[] // 积分商城商品
|
||||
|
||||
// ========== 商品字段 ==========
|
||||
spuName: string // 商品名称
|
||||
picUrl: string // 商品主图
|
||||
marketPrice: number // 商品市场价,单位:分
|
||||
|
||||
//======================= 显示所需兑换积分最少的 sku 信息 =======================
|
||||
point: number // 兑换积分
|
||||
price: number // 兑换金额,单位:分
|
||||
}
|
||||
|
||||
// 秒杀活动所需属性
|
||||
export interface PointProductVO {
|
||||
id?: number // 积分商城商品编号
|
||||
activityId?: number // 积分商城活动 id
|
||||
spuId?: number // 商品 SPU 编号
|
||||
skuId: number // 商品 SKU 编号
|
||||
count: number // 可兑换数量
|
||||
point: number // 兑换积分
|
||||
price: number // 兑换金额,单位:分
|
||||
stock: number // 积分商城商品库存
|
||||
activityStatus?: number // 积分商城商品状态
|
||||
}
|
||||
|
||||
// 扩展 Sku 配置
|
||||
export type SkuExtension = Sku & {
|
||||
productConfig: PointProductVO
|
||||
}
|
||||
|
||||
export interface SpuExtension extends Spu {
|
||||
skus: SkuExtension[] // 重写类型
|
||||
}
|
||||
|
||||
export interface SpuExtension0 extends Spu {
|
||||
pointStock: number // 积分商城活动库存
|
||||
pointTotalStock: number // 积分商城活动总库存
|
||||
point: number // 兑换积分
|
||||
pointPrice: number // 兑换金额,单位:分
|
||||
}
|
||||
|
||||
// 积分商城活动 API
|
||||
export const PointActivityApi = {
|
||||
// 查询积分商城活动分页
|
||||
getPointActivityPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/point-activity/page`, params })
|
||||
},
|
||||
|
||||
// 查询积分商城活动详情
|
||||
getPointActivity: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/point-activity/get?id=` + id })
|
||||
},
|
||||
|
||||
// 查询积分商城活动列表,基于活动编号数组
|
||||
getPointActivityListByIds: async (ids: number[]) => {
|
||||
return request.get({ url: `/promotion/point-activity/list-by-ids?ids=${ids}` })
|
||||
},
|
||||
|
||||
// 新增积分商城活动
|
||||
createPointActivity: async (data: PointActivityVO) => {
|
||||
return await request.post({ url: `/promotion/point-activity/create`, data })
|
||||
},
|
||||
|
||||
// 修改积分商城活动
|
||||
updatePointActivity: async (data: PointActivityVO) => {
|
||||
return await request.put({ url: `/promotion/point-activity/update`, data })
|
||||
},
|
||||
|
||||
// 删除积分商城活动
|
||||
deletePointActivity: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/point-activity/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 关闭秒杀活动
|
||||
closePointActivity: async (id: number) => {
|
||||
return await request.put({ url: '/promotion/point-activity/close?id=' + id })
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 兑换记录 VO
|
||||
export interface PointOrderVO {
|
||||
id: number // id
|
||||
orderNumber: string // 订单号
|
||||
userId: number // 用户id
|
||||
productId: number // 商品id
|
||||
integral: number // 兑换积分
|
||||
orderStatus: number // 订单状态
|
||||
orderTime: Date // 下单时间
|
||||
userName: string
|
||||
productName: string
|
||||
imageUrl: string
|
||||
|
||||
}
|
||||
|
||||
// 兑换记录 API
|
||||
export const PointOrderApi = {
|
||||
// 查询兑换记录分页
|
||||
getPointOrderPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/point-order/page`, params })
|
||||
},
|
||||
|
||||
// 查询兑换记录详情
|
||||
getPointOrder: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/point-order/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增兑换记录
|
||||
createPointOrder: async (data: PointOrderVO) => {
|
||||
return await request.post({ url: `/promotion/point-order/create`, data })
|
||||
},
|
||||
|
||||
// 修改兑换记录
|
||||
updatePointOrder: async (data: PointOrderVO) => {
|
||||
return await request.put({ url: `/promotion/point-order/update`, data })
|
||||
},
|
||||
|
||||
// 删除兑换记录
|
||||
deletePointOrder: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/point-order/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出兑换记录 Excel
|
||||
exportPointOrder: async (params) => {
|
||||
return await request.download({ url: `/promotion/point-order/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 客服人员 VO
|
||||
export interface SupportStaffVO {
|
||||
id: number // ID
|
||||
name: string // 客服名称
|
||||
pic: string //头像
|
||||
phone: string // 手机号码
|
||||
account: string // 登录账号
|
||||
password: string // 登录密码
|
||||
status: number // 客服状态
|
||||
orderManage: number // 手机订单管理
|
||||
orderInform: number // 订单通知
|
||||
}
|
||||
|
||||
// 客服人员 API
|
||||
export const SupportStaffApi = {
|
||||
// 查询客服人员分页
|
||||
getSupportStaffPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/support-staff/page`, params })
|
||||
},
|
||||
|
||||
// 查询客服人员详情
|
||||
getSupportStaff: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/support-staff/get?id=` + id })
|
||||
},
|
||||
|
||||
|
||||
// 新增客服人员
|
||||
createSupportStaff: async (data: SupportStaffVO) => {
|
||||
return await request.post({ url: `/promotion/support-staff/create`, data })
|
||||
},
|
||||
|
||||
// 修改客服人员
|
||||
updateSupportStaff: async (data: SupportStaffVO) => {
|
||||
return await request.put({ url: `/promotion/support-staff/update`, data })
|
||||
},
|
||||
|
||||
// 删除客服人员
|
||||
deleteSupportStaff: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/support-staff/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客服人员 Excel
|
||||
exportSupportStaff: async (params) => {
|
||||
return await request.download({ url: `/promotion/support-staff/export-excel`, params })
|
||||
},
|
||||
|
||||
|
||||
// 修改客服人员
|
||||
updateLineStatus: async (id: string,lineStatus: number) => {
|
||||
return await request.get({ url: `/promotion/support-staff/updateLineStatus?id=` + id + `&lineStatus=` + lineStatus })
|
||||
},
|
||||
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 客服话术 VO
|
||||
export interface VerbalTrickVO {
|
||||
id: number // id
|
||||
type: number // 分类
|
||||
title: string // 标题
|
||||
details: string // 详情
|
||||
}
|
||||
|
||||
// 客服话术 API
|
||||
export const VerbalTrickApi = {
|
||||
// 查询客服话术分页
|
||||
getVerbalTrickPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/verbal-trick/page`, params })
|
||||
},
|
||||
|
||||
// 查询客服话术详情
|
||||
getVerbalTrick: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/verbal-trick/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增客服话术
|
||||
createVerbalTrick: async (data: VerbalTrickVO) => {
|
||||
return await request.post({ url: `/promotion/verbal-trick/create`, data })
|
||||
},
|
||||
|
||||
// 修改客服话术
|
||||
updateVerbalTrick: async (data: VerbalTrickVO) => {
|
||||
return await request.put({ url: `/promotion/verbal-trick/update`, data })
|
||||
},
|
||||
|
||||
// 删除客服话术
|
||||
deleteVerbalTrick: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/verbal-trick/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出客服话术 Excel
|
||||
exportVerbalTrick: async (params) => {
|
||||
return await request.download({ url: `/promotion/verbal-trick/export-excel`, params })
|
||||
},
|
||||
|
||||
// 查询客服话术
|
||||
getVerbalTrickList: async (id: string) => {
|
||||
return await request.get({ url: `/promotion/verbal-trick/getVerbalTrickList?id=` +id })
|
||||
}
|
||||
}
|
@ -121,10 +121,3 @@ export const getMemberRegisterCountList = (
|
||||
params: { times: [formatDate(beginTime), formatDate(endTime)] }
|
||||
})
|
||||
}
|
||||
|
||||
// 获取自定义页面数据
|
||||
export const getDiyPage = () => {
|
||||
return request.get({
|
||||
url: '/promotion/diy-page/getDiyPage'
|
||||
})
|
||||
}
|
||||
|
@ -1,21 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员协议 VO
|
||||
export interface PaidMemberAgreeVO {
|
||||
id: number // 编号
|
||||
content: string // 内容
|
||||
}
|
||||
|
||||
// 会员协议 API
|
||||
export const PaidMemberAgreeApi = {
|
||||
// 查询会员协议
|
||||
getPaidMemberAgree: async () => {
|
||||
return await request.get({ url: `/member/paid-member-agree/get`})
|
||||
},
|
||||
|
||||
|
||||
// 保存会员协议
|
||||
savePaidMemberAgree: async (data: PaidMemberAgreeVO) => {
|
||||
return await request.put({ url: `/member/paid-member-agree/save`, data })
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 付费会员配置 VO
|
||||
export interface PaidMemberConfigVO {
|
||||
id: number // 编号
|
||||
openPaidMember: boolean // 开启付费会员
|
||||
paidMemberPrice: boolean // 商品付费会员价
|
||||
}
|
||||
|
||||
// 付费会员配置 API
|
||||
export const PaidMemberConfigApi = {
|
||||
// 查询付费会员配置详情
|
||||
getPaidMemberConfig: async () => {
|
||||
return await request.get({ url: `/member/paid-member-config/get` })
|
||||
},
|
||||
|
||||
// 保存付费会员配置
|
||||
savePaidMemberConfig: async (data: PaidMemberConfigVO) => {
|
||||
return await request.put({ url: `/member/paid-member-config/save`, data })
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 付费会员 VO
|
||||
export interface PaidMemberUserVO {
|
||||
id: number // 编号
|
||||
mobile: string // 手机号
|
||||
password: string // 密码
|
||||
status: number // 状态
|
||||
registerIp: string // 注册 IP
|
||||
registerTerminal: number // 注册终端
|
||||
loginIp: string // 最后登录IP
|
||||
loginDate: Date // 最后登录时间
|
||||
nickname: string // 用户昵称
|
||||
avatar: string // 头像
|
||||
name: string // 真实名字
|
||||
sex: number // 性别
|
||||
birthday: Date // 出生日期
|
||||
areaId: number // 所在地
|
||||
mark: string // 用户备注
|
||||
point: number // 积分
|
||||
tagIds: string // 用户标签编号列表,以逗号分隔
|
||||
levelId: number // 等级编号
|
||||
experience: number // 经验
|
||||
groupId: number // 用户分组编号
|
||||
|
||||
paid: Boolean //是否支付,0:未支付,1:已支付
|
||||
|
||||
payTime: Date //支付时间
|
||||
|
||||
cardExpirationTime: Date; //到期时间
|
||||
|
||||
price:number //支付金额,单位为分
|
||||
|
||||
deadlineDay:string //期限天数
|
||||
|
||||
payType: string //支付方式
|
||||
|
||||
|
||||
payChannel: string//支付渠道
|
||||
|
||||
orderNo: string //订单号
|
||||
|
||||
payOrderId: number //支付订单编号
|
||||
|
||||
payMemberType: string//会员类型
|
||||
}
|
||||
|
||||
// 付费会员 API
|
||||
export const PaidMemberUserApi = {
|
||||
// 查询付费会员分页
|
||||
getPaidMemberUserPage: async (params: any) => {
|
||||
return await request.get({ url: `/member/paid-member-user/page`, params })
|
||||
},
|
||||
|
||||
// 查询付费会员详情
|
||||
getPaidMemberUser: async (id: number) => {
|
||||
return await request.get({ url: `/member/paid-member-user/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增付费会员
|
||||
createPaidMemberUser: async (data: PaidMemberUserVO) => {
|
||||
return await request.post({ url: `/member/paid-member-user/create`, data })
|
||||
},
|
||||
|
||||
// 修改付费会员
|
||||
updatePaidMemberUser: async (data: PaidMemberUserVO) => {
|
||||
return await request.put({ url: `/member/paid-member-user/update`, data })
|
||||
},
|
||||
|
||||
// 删除付费会员
|
||||
deletePaidMemberUser: async (id: number) => {
|
||||
return await request.delete({ url: `/member/paid-member-user/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出付费会员 Excel
|
||||
exportPaidMemberUser: async (params) => {
|
||||
return await request.download({ url: `/member/paid-member-user/export-excel`, params })
|
||||
},
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡类型 VO
|
||||
export interface cardVO {
|
||||
id: number // id
|
||||
name: string // 会员名
|
||||
vid: string // 有效期
|
||||
originalPrice: number // 原价
|
||||
specialPrice: number // 优惠价
|
||||
sort: string // 排序
|
||||
status: number// 是否禁用
|
||||
}
|
||||
|
||||
// 会员卡类型 API
|
||||
export const cardApi = {
|
||||
// 查询会员卡类型分页
|
||||
getcardPage: async (params: any) => {
|
||||
return await request.get({ url: `/paid/member/card/type/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡类型详情
|
||||
getcard: async (id: number) => {
|
||||
return await request.get({ url: `/paid/member/card/type/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡类型
|
||||
createcard: async (data: cardVO) => {
|
||||
return await request.post({ url: `/paid/member/card/type/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡类型
|
||||
updatecard: async (data: cardVO) => {
|
||||
return await request.put({ url: `/paid/member/card/type/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡类型
|
||||
deletecard: async (id: number) => {
|
||||
return await request.delete({ url: `/paid/member/card/type/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡类型 Excel
|
||||
exportcard: async (params) => {
|
||||
return await request.download({ url: `/paid/member/card/type/export-excel`, params })
|
||||
},
|
||||
|
||||
// 获取会员卡类型下拉列表
|
||||
getcardlist: async () => {
|
||||
return await request.get({ url: `/paid/member/card/type/get-list`})
|
||||
},
|
||||
}
|
@ -20,7 +20,6 @@ export interface UserVO {
|
||||
point: number | undefined | null
|
||||
totalPoint: number | undefined | null
|
||||
experience: number | null | undefined
|
||||
groupName: string
|
||||
}
|
||||
|
||||
// 查询会员用户列表
|
||||
@ -52,8 +51,3 @@ export const updateUserPoint = async (data: any) => {
|
||||
export const updateUserBalance = async (data: any) => {
|
||||
return await request.put({ url: `/member/user/update-balance`, data })
|
||||
}
|
||||
|
||||
// 客服查询用户详情
|
||||
export const getUserInfo = async (id: number) => {
|
||||
return await request.get({ url: `/member/user/getUserInfo?id=` + id })
|
||||
}
|
||||
|
@ -27,5 +27,5 @@ export const getWalletPage = async (params) => {
|
||||
|
||||
// 修改会员钱包余额
|
||||
export const updateWalletBalance = async (data: any) => {
|
||||
return await request.put({ url: `/pay/wallet/update-balance`, data })
|
||||
return await request.post({ url: `/pay/wallet/update`, data })
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 钱包充值 VO
|
||||
export interface WalletRechargeVO {
|
||||
id: number // id
|
||||
walletId: number // 钱包编号
|
||||
totalPrice: number // 充值实际到账
|
||||
payPrice: number // 实际支付金额
|
||||
bonusPrice: number // 钱包赠送金额
|
||||
packageId: number // 充值套餐编号
|
||||
payStatus: boolean // 是否支付
|
||||
payOrderId: number // 支付订单编号
|
||||
payChannelCode: string // 支付成功的支付渠道
|
||||
payTime: Date // 订单支付时间
|
||||
payRefundId: number // 支付退款单编号
|
||||
refundTotalPrice: number // 退款金额(包含赠送金额)
|
||||
refundPayPrice: number // 退款支付金额
|
||||
refundBonusPrice: number // 退款钱包赠送金额
|
||||
refundTime: Date // 退款时间
|
||||
refundStatus: number // 退款状态
|
||||
name : string
|
||||
avatar: string
|
||||
}
|
||||
|
||||
// 钱包充值 API
|
||||
export const WalletRechargeApi = {
|
||||
// 查询钱包充值分页
|
||||
getWalletRechargePage: async (params: any) => {
|
||||
return await request.get({ url: `/pay/wallet-recharge/page`, params })
|
||||
},
|
||||
|
||||
// 查询钱包充值详情
|
||||
getWalletRecharge: async (id: number) => {
|
||||
return await request.get({ url: `/pay/wallet-recharge/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增钱包充值
|
||||
createWalletRecharge: async (data: WalletRechargeVO) => {
|
||||
return await request.post({ url: `/pay/wallet-recharge/create`, data })
|
||||
},
|
||||
|
||||
// 修改钱包充值
|
||||
updateWalletRecharge: async (data: WalletRechargeVO) => {
|
||||
return await request.put({ url: `/pay/wallet-recharge/update`, data })
|
||||
},
|
||||
|
||||
// 删除钱包充值
|
||||
deleteWalletRecharge: async (id: number) => {
|
||||
return await request.delete({ url: `/pay/wallet-recharge/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出钱包充值 Excel
|
||||
exportWalletRecharge: async (params) => {
|
||||
return await request.download({ url: `/pay/wallet-recharge/export-excel`, params })
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 预约配置 VO
|
||||
export interface ConfigurationVO {
|
||||
id: number // id
|
||||
projectdayId: number
|
||||
serviceTime: string
|
||||
technicianId: number // 套餐id
|
||||
technicianName: string
|
||||
timeQuantum: string // 时间段
|
||||
availableNumber: number // 可预约数
|
||||
residueNumber: number // 剩余预约数
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 预约配置 API
|
||||
export const ConfigurationApi = {
|
||||
// 查询预约配置分页
|
||||
getConfigurationPage: async (params: any) => {
|
||||
return await request.get({ url: `/subscribe/configuration/page`, params })
|
||||
},
|
||||
|
||||
// 查询预约配置详情
|
||||
getConfiguration: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/configuration/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增预约配置
|
||||
createConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.post({ url: `/subscribe/configuration/create`, data })
|
||||
},
|
||||
|
||||
// 修改预约配置
|
||||
updateConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.put({ url: `/subscribe/configuration/update`, data })
|
||||
},
|
||||
|
||||
// 删除预约配置
|
||||
deleteConfiguration: async (id: number) => {
|
||||
return await request.delete({ url: `/subscribe/configuration/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出预约配置 Excel
|
||||
exportConfiguration: async (params) => {
|
||||
return await request.download({ url: `/subscribe/configuration/export-excel`, params })
|
||||
},
|
||||
|
||||
// addUpdConfiguration: async (projectdayId: number,technicianId: number,serviceTimes: string) => {
|
||||
// return await request.post({ url: `/subscribe/configuration/addUpdConfiguration?projectdayId=`+projectdayId+`&technicianId=`+technicianId+`&serviceTimes=`+serviceTimes })
|
||||
// },
|
||||
|
||||
|
||||
addUpdConfiguration: async (data: ConfigurationVO) => {
|
||||
return await request.post({ url: `/subscribe/configuration/addUpdConfiguration`, data })
|
||||
},
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 预约项目 VO
|
||||
export interface ProjectVO {
|
||||
id: number // ID
|
||||
brandId: number // 所属门店
|
||||
yuyueNum: number //可预约数量
|
||||
name: string // 项目名称
|
||||
pictrue: string // 项目图片
|
||||
content: string // 项目简介
|
||||
status: number // 状态
|
||||
timeInterval: string // 可预约日期
|
||||
brandName: string
|
||||
}
|
||||
|
||||
// 预约项目 API
|
||||
export const ProjectApi = {
|
||||
// 查询预约项目分页
|
||||
getProjectPage: async (params: any) => {
|
||||
return await request.get({ url: `/subscribe/project/page`, params })
|
||||
},
|
||||
|
||||
// 查询预约项目详情
|
||||
getProject: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/project/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增预约项目
|
||||
createProject: async (data: ProjectVO) => {
|
||||
return await request.post({ url: `/subscribe/project/create`, data })
|
||||
},
|
||||
|
||||
// 修改预约项目
|
||||
updateProject: async (data: ProjectVO) => {
|
||||
return await request.put({ url: `/subscribe/project/update`, data })
|
||||
},
|
||||
|
||||
// 删除预约项目
|
||||
deleteProject: async (id: number) => {
|
||||
return await request.delete({ url: `/subscribe/project/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出预约项目 Excel
|
||||
exportProject: async (params) => {
|
||||
return await request.download({ url: `/subscribe/project/export-excel`, params })
|
||||
},
|
||||
|
||||
getProjectName: async () => {
|
||||
return await request.get({ url: `/subscribe/project/getProjectName` })
|
||||
},
|
||||
|
||||
getProjectDay: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/project/getProjectDay?id=` + id })
|
||||
},
|
||||
|
||||
getConfiguration: async (id: number) => {
|
||||
return await request.get({ url: `/subscribe/configuration/getConfiguration?id=` + id })
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -5,21 +5,13 @@ export interface LitemallReservationVO {
|
||||
id: number // id
|
||||
userId: number // 用户id
|
||||
nickname: string
|
||||
// type: number // 预约类型
|
||||
type: number // 预约类型
|
||||
brandId: string // 门店id
|
||||
technicianId: string // 人员id
|
||||
|
||||
name: string
|
||||
phone: string
|
||||
brandName: string
|
||||
porjectName: string
|
||||
technicianId: string // 人员id
|
||||
technicianName: string
|
||||
days: string
|
||||
timeQuantum: string
|
||||
|
||||
|
||||
// reAddTime: Date // 预约时间
|
||||
// hsstr: string // 预约时间段
|
||||
reAddTime: Date // 预约时间
|
||||
hsstr: string // 预约时间段
|
||||
reStatus: number // 预约状态
|
||||
status: number // 审核状态
|
||||
remark: string // 备注
|
||||
@ -55,10 +47,5 @@ export const LitemallReservationApi = {
|
||||
// 导出预约订单 Excel
|
||||
exportLitemallReservation: async (params) => {
|
||||
return await request.download({ url: `/subscribe/litemall-reservation/export-excel`, params })
|
||||
},
|
||||
|
||||
// 删除预约订单
|
||||
checkLitemallReservation: async (id: number,check: number) => {
|
||||
return await request.get({ url: `/subscribe/litemall-reservation/check?id=` + id + `&check=` + check })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,17 @@ import request from '@/config/axios'
|
||||
|
||||
// 人员管理 VO
|
||||
export interface LitemallTechnicianVO {
|
||||
id: number // idd
|
||||
name: string
|
||||
projectId: number // 项目id
|
||||
brandName: string //项目名称
|
||||
id: number // id
|
||||
techSn: string // 人员编号
|
||||
type: number // 人员类型
|
||||
technicianName: string // 人员名称
|
||||
brandId: number // 门店id
|
||||
brandName: string
|
||||
sex: number // 性别
|
||||
photo: string // 照片
|
||||
serviceTime: string // 服务时间段
|
||||
serviceScope: string // 服务范围
|
||||
phone: string // 手机号
|
||||
ym: number // 约满标记
|
||||
status: number // 状态
|
||||
content: string // 介绍
|
||||
|
@ -47,33 +47,3 @@ export const deleteDictData = (id: number) => {
|
||||
export const exportDictData = (params) => {
|
||||
return request.download({ url: '/system/dict-data/export', params })
|
||||
}
|
||||
|
||||
// 图片素材管理分类
|
||||
export const getTypeList = () => {
|
||||
return request.get({ url: '/system/dict-data/getTypeList' })
|
||||
}
|
||||
|
||||
// 客服话术分类
|
||||
export const getHuaShuTypeList = () => {
|
||||
return request.get({ url: '/system/dict-data/getHuaShuTypeList' })
|
||||
}
|
||||
|
||||
// 新增字典数据,客服话术分类
|
||||
export const createType = (data: DictDataVO) => {
|
||||
return request.post({ url: '/system/dict-data/createType', data })
|
||||
}
|
||||
|
||||
// 新增字典数据,素材管理图片分类
|
||||
export const createPicType = (data: DictDataVO) => {
|
||||
return request.post({ url: '/system/dict-data/createPicType', data })
|
||||
}
|
||||
|
||||
// 新增字典数据,素材管理图片分类
|
||||
export const updateMenu = (id : number, name : string) => {
|
||||
return request.get({ url: '/system/dict-data/updateMenu?id='+ id + `&name=` + name })
|
||||
}
|
||||
|
||||
// 删除字典数据
|
||||
export const deleteMenu = (id: number | undefined) => {
|
||||
return request.delete({ url: '/system/dict-data/deleteMenu?id=' + id })
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡划拨 VO
|
||||
export interface TransferVO {
|
||||
id: number // 编号
|
||||
cardNumber: string // 会员卡号
|
||||
assignorId: number // 合伙人
|
||||
transfereeId: number // 会员
|
||||
assignorPhone: string // 合伙人电话
|
||||
transfereePhone: string // 会员电话
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 会员卡划拨 API
|
||||
export const TransferApi = {
|
||||
// 查询会员卡划拨分页
|
||||
getTransferPage: async (params: any) => {
|
||||
return await request.get({ url: `/card/transfer/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡划拨详情
|
||||
getTransfer: async (id: number) => {
|
||||
return await request.get({ url: `/card/transfer/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡划拨
|
||||
createTransfer: async (data: TransferVO) => {
|
||||
return await request.post({ url: `/card/transfer/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡划拨
|
||||
updateTransfer: async (data: TransferVO) => {
|
||||
return await request.put({ url: `/card/transfer/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡划拨
|
||||
deleteTransfer: async (id: number) => {
|
||||
return await request.delete({ url: `/card/transfer/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡划拨 Excel
|
||||
exportTransfer: async (params) => {
|
||||
return await request.download({ url: `/card/transfer/export-excel`, params })
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 会员卡划拨记录 VO
|
||||
export interface TransferLogVO {
|
||||
id: number // 划拨id
|
||||
cardNumber: string // 会员卡号
|
||||
assignorId: number // 发起人
|
||||
transfereeId: number // 划拨人
|
||||
assignorPhone: string // 发起人手机
|
||||
transfereePhone: string // 划拨人手机
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// 会员卡划拨记录 API
|
||||
export const TransferLogApi = {
|
||||
// 查询会员卡划拨记录分页
|
||||
getTransferLogPage: async (params: any) => {
|
||||
return await request.get({ url: `/card/transfer-log/page`, params })
|
||||
},
|
||||
|
||||
// 查询会员卡划拨记录详情
|
||||
getTransferLog: async (id: number) => {
|
||||
return await request.get({ url: `/card/transfer-log/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增会员卡划拨记录
|
||||
createTransferLog: async (data: TransferLogVO) => {
|
||||
return await request.post({ url: `/card/transfer-log/create`, data })
|
||||
},
|
||||
|
||||
// 修改会员卡划拨记录
|
||||
updateTransferLog: async (data: TransferLogVO) => {
|
||||
return await request.put({ url: `/card/transfer-log/update`, data })
|
||||
},
|
||||
|
||||
// 删除会员卡划拨记录
|
||||
deleteTransferLog: async (id: number) => {
|
||||
return await request.delete({ url: `/card/transfer-log/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出会员卡划拨记录 Excel
|
||||
exportTransferLog: async (params) => {
|
||||
return await request.download({ url: `/card/transfer-log/export-excel`, params })
|
||||
},
|
||||
}
|
Before Width: | Height: | Size: 640 B |
Before Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 514 B |
Before Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 759 B |
Before Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 821 B |
Before Width: | Height: | Size: 814 B |
Before Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 573 B |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 36 KiB |
@ -1,220 +1,207 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" title="选择链接" width="65%">
|
||||
<div class="h-500px flex gap-8px">
|
||||
<!-- 左侧分组列表 -->
|
||||
<el-scrollbar wrap-class="h-full" ref="groupScrollbar" view-class="flex flex-col">
|
||||
<template v-for="(group, groupIndex) in APP_LINK_GROUP_LIST">
|
||||
<el-button v-if="groupIndex<7" :key="groupIndex" :class="[
|
||||
<Dialog v-model="dialogVisible" title="选择链接" width="65%">
|
||||
<div class="h-500px flex gap-8px">
|
||||
<!-- 左侧分组列表 -->
|
||||
<el-scrollbar wrap-class="h-full" ref="groupScrollbar" view-class="flex flex-col">
|
||||
<el-button
|
||||
v-for="(group, groupIndex) in APP_LINK_GROUP_LIST"
|
||||
:key="groupIndex"
|
||||
:class="[
|
||||
'm-r-16px m-l-0px! justify-start! w-90px',
|
||||
{ active: activeGroup === group.name }
|
||||
]" ref="groupBtnRefs" :text="activeGroup !== group.name"
|
||||
:type="activeGroup === group.name ? 'primary' : 'default'" @click="handleGroupSelected(group.name)">
|
||||
{{ group.name }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-scrollbar>
|
||||
<!-- 右侧链接列表 -->
|
||||
<el-scrollbar class="h-full flex-1" @scroll="handleScroll" ref="linkScrollbar">
|
||||
<div v-for="(group, groupIndex) in APP_LINK_GROUP_LIST" :key="groupIndex">
|
||||
<template v-if="activeGroup == group.name && groupIndex<7">
|
||||
<!-- 分组标题 -->
|
||||
<div class="font-bold" ref="groupTitleRefs">{{ group.name }}</div>
|
||||
<!-- 链接列表 -->
|
||||
<el-tooltip v-for="(appLink, appLinkIndex) in group.links" :key="appLinkIndex"
|
||||
:content="appLink.path" placement="bottom" :show-after="300">
|
||||
|
||||
<el-button class="m-b-8px m-r-8px m-l-0px!"
|
||||
:type="appLink.path == activeAppLink.path ? 'primary' : 'default'"
|
||||
@click="handleAppLinkSelected(appLink)">
|
||||
{{ appLink.name }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<!-- 底部对话框操作按钮 -->
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
<Dialog v-model="detailSelectDialog.visible" title="" width="50%">
|
||||
<el-form class="min-h-200px">
|
||||
<el-form-item label="选择分类" v-if="detailSelectDialog.type === APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST">
|
||||
<ProductCategorySelect v-model="detailSelectDialog.id" :parent-id="0"
|
||||
@update:model-value="handleProductCategorySelected" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Dialog>
|
||||
]"
|
||||
ref="groupBtnRefs"
|
||||
:text="activeGroup !== group.name"
|
||||
:type="activeGroup === group.name ? 'primary' : 'default'"
|
||||
@click="handleGroupSelected(group.name)"
|
||||
>
|
||||
{{ group.name }}
|
||||
</el-button>
|
||||
</el-scrollbar>
|
||||
<!-- 右侧链接列表 -->
|
||||
<el-scrollbar class="h-full flex-1" @scroll="handleScroll" ref="linkScrollbar">
|
||||
<div v-for="(group, groupIndex) in APP_LINK_GROUP_LIST" :key="groupIndex">
|
||||
<!-- 分组标题 -->
|
||||
<div class="font-bold" ref="groupTitleRefs">{{ group.name }}</div>
|
||||
<!-- 链接列表 -->
|
||||
<el-tooltip
|
||||
v-for="(appLink, appLinkIndex) in group.links"
|
||||
:key="appLinkIndex"
|
||||
:content="appLink.path"
|
||||
placement="bottom"
|
||||
:show-after="300"
|
||||
>
|
||||
<el-button
|
||||
class="m-b-8px m-r-8px m-l-0px!"
|
||||
:type="isSameLink(appLink.path, activeAppLink.path) ? 'primary' : 'default'"
|
||||
@click="handleAppLinkSelected(appLink)"
|
||||
>
|
||||
{{ appLink.name }}
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<!-- 底部对话框操作按钮 -->
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
<Dialog v-model="detailSelectDialog.visible" title="" width="50%">
|
||||
<el-form class="min-h-200px">
|
||||
<el-form-item
|
||||
label="选择分类"
|
||||
v-if="detailSelectDialog.type === APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST"
|
||||
>
|
||||
<ProductCategorySelect
|
||||
v-model="detailSelectDialog.id"
|
||||
:parent-id="0"
|
||||
@update:model-value="handleProductCategorySelected"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { APP_LINK_GROUP_LIST, APP_LINK_TYPE_ENUM, AppLink } from './data'
|
||||
import * as MemberStatisticsApi from '@/api/mall/statistics/member'
|
||||
import { ButtonInstance, ScrollbarInstance } from 'element-plus'
|
||||
import { split } from 'lodash-es'
|
||||
import ProductCategorySelect from '@/views/mall/product/category/components/ProductCategorySelect.vue'
|
||||
import { getUrlNumberValue } from '@/utils'
|
||||
// 假设你要追加的数据是一个新的对象
|
||||
const userComparison = ref([])
|
||||
/** 查询会员用户数量对照卡片数据 */
|
||||
const GetDiyPage = async () => {
|
||||
userComparison.value = await MemberStatisticsApi.getDiyPage()
|
||||
const arry = userComparison.value.map(link => {
|
||||
return {
|
||||
name: link.name,
|
||||
path: `/pages/index/page?id=${link.id}`
|
||||
};
|
||||
});
|
||||
userComparison.value = {
|
||||
name: '自定义页面',
|
||||
links:arry
|
||||
}
|
||||
APP_LINK_GROUP_LIST.push(userComparison.value);
|
||||
// userComparison.value = APP_LINK_GROUP_LIST
|
||||
// userComparison.value = APP_LINK_GROUP_LIST.push({qq:1})
|
||||
console.log(APP_LINK_GROUP_LIST, 'userComparison.value')
|
||||
}
|
||||
GetDiyPage()
|
||||
// APP 链接选择弹框
|
||||
defineOptions({ name: 'AppLinkSelectDialog' })
|
||||
// 选中的分组,默认选中第一个
|
||||
const activeGroup = ref(APP_LINK_GROUP_LIST[0].name)
|
||||
// 选中的 APP 链接
|
||||
const activeAppLink = ref({} as AppLink)
|
||||
import { APP_LINK_GROUP_LIST, APP_LINK_TYPE_ENUM, AppLink } from './data'
|
||||
import { ButtonInstance, ScrollbarInstance } from 'element-plus'
|
||||
import { split } from 'lodash-es'
|
||||
import ProductCategorySelect from '@/views/mall/product/category/components/ProductCategorySelect.vue'
|
||||
import { getUrlNumberValue } from '@/utils'
|
||||
|
||||
/** 打开弹窗 */
|
||||
const dialogVisible = ref(false)
|
||||
const open = (link : string) => {
|
||||
activeAppLink.value.path = link
|
||||
dialogVisible.value = true
|
||||
// APP 链接选择弹框
|
||||
defineOptions({ name: 'AppLinkSelectDialog' })
|
||||
// 选中的分组,默认选中第一个
|
||||
const activeGroup = ref(APP_LINK_GROUP_LIST[0].name)
|
||||
// 选中的 APP 链接
|
||||
const activeAppLink = ref({} as AppLink)
|
||||
|
||||
// 滚动到当前的链接
|
||||
const group = APP_LINK_GROUP_LIST.find((group) =>
|
||||
group.links.some((linkItem) => {
|
||||
const sameLink = isSameLink(linkItem.path, link)
|
||||
if (sameLink) {
|
||||
activeAppLink.value = { ...linkItem, path: link }
|
||||
}
|
||||
return sameLink
|
||||
})
|
||||
)
|
||||
if (group) {
|
||||
// 使用 nextTick 的原因:可能 Dom 还没生成,导致滚动失败
|
||||
nextTick(() => handleGroupSelected(group.name))
|
||||
}
|
||||
}
|
||||
defineExpose({ open })
|
||||
/** 打开弹窗 */
|
||||
const dialogVisible = ref(false)
|
||||
const open = (link: string) => {
|
||||
activeAppLink.value.path = link
|
||||
dialogVisible.value = true
|
||||
|
||||
// 处理 APP 链接选中
|
||||
const handleAppLinkSelected = (appLink : AppLink) => {
|
||||
if(!appLink.path.includes('/pages/index/page')){
|
||||
if (!isSameLink(appLink.path, activeAppLink.value.path)) {
|
||||
activeAppLink.value = appLink
|
||||
// console.log(activeAppLink.value,activeAppLink.value.path,"activeAppLink.value")
|
||||
}
|
||||
}else{
|
||||
activeAppLink.value.path = appLink.path
|
||||
console.log(activeAppLink.value.path,"activeAppLink.value.path")
|
||||
}
|
||||
switch (appLink.type) {
|
||||
case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST:
|
||||
detailSelectDialog.value.visible = true
|
||||
detailSelectDialog.value.type = appLink.type
|
||||
// 返显
|
||||
detailSelectDialog.value.id =
|
||||
getUrlNumberValue('id', 'http://127.0.0.1' + activeAppLink.value.path) || undefined
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
// 滚动到当前的链接
|
||||
const group = APP_LINK_GROUP_LIST.find((group) =>
|
||||
group.links.some((linkItem) => {
|
||||
const sameLink = isSameLink(linkItem.path, link)
|
||||
if (sameLink) {
|
||||
activeAppLink.value = { ...linkItem, path: link }
|
||||
}
|
||||
return sameLink
|
||||
})
|
||||
)
|
||||
if (group) {
|
||||
// 使用 nextTick 的原因:可能 Dom 还没生成,导致滚动失败
|
||||
nextTick(() => handleGroupSelected(group.name))
|
||||
}
|
||||
}
|
||||
defineExpose({ open })
|
||||
|
||||
// 处理绑定值更新
|
||||
const emit = defineEmits<{
|
||||
change : [link: string]
|
||||
appLinkChange : [appLink: AppLink]
|
||||
}>()
|
||||
const handleSubmit = () => {
|
||||
dialogVisible.value = false
|
||||
emit('change', activeAppLink.value.path)
|
||||
emit('appLinkChange', activeAppLink.value)
|
||||
}
|
||||
// 处理 APP 链接选中
|
||||
const handleAppLinkSelected = (appLink: AppLink) => {
|
||||
if (!isSameLink(appLink.path, activeAppLink.value.path)) {
|
||||
activeAppLink.value = appLink
|
||||
}
|
||||
switch (appLink.type) {
|
||||
case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST:
|
||||
detailSelectDialog.value.visible = true
|
||||
detailSelectDialog.value.type = appLink.type
|
||||
// 返显
|
||||
detailSelectDialog.value.id =
|
||||
getUrlNumberValue('id', 'http://127.0.0.1' + activeAppLink.value.path) || undefined
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// 分组标题引用列表
|
||||
const groupTitleRefs = ref<HTMLInputElement[]>([])
|
||||
/**
|
||||
* 处理右侧链接列表滚动
|
||||
* @param scrollTop 滚动条的位置
|
||||
*/
|
||||
const handleScroll = ({ scrollTop } : { scrollTop : number }) => {
|
||||
const titleEl = groupTitleRefs.value.find((titleEl : HTMLInputElement) => {
|
||||
// 获取标题的位置信息
|
||||
const { offsetHeight, offsetTop } = titleEl
|
||||
// 判断标题是否在可视范围内
|
||||
return scrollTop >= offsetTop && scrollTop < offsetTop + offsetHeight
|
||||
})
|
||||
// 只需处理一次
|
||||
if (titleEl && activeGroup.value !== titleEl.textContent) {
|
||||
activeGroup.value = titleEl.textContent || ''
|
||||
// 同步左侧的滚动条位置
|
||||
scrollToGroupBtn(activeGroup.value)
|
||||
}
|
||||
}
|
||||
// 处理绑定值更新
|
||||
const emit = defineEmits<{
|
||||
change: [link: string]
|
||||
appLinkChange: [appLink: AppLink]
|
||||
}>()
|
||||
const handleSubmit = () => {
|
||||
dialogVisible.value = false
|
||||
emit('change', activeAppLink.value.path)
|
||||
emit('appLinkChange', activeAppLink.value)
|
||||
}
|
||||
|
||||
// 右侧滚动条
|
||||
const linkScrollbar = ref<ScrollbarInstance>()
|
||||
// 处理分组选中
|
||||
const handleGroupSelected = (group : string) => {
|
||||
activeGroup.value = group
|
||||
// const titleRef = groupTitleRefs.value.find((item: HTMLInputElement) => item.textContent === group)
|
||||
// if (titleRef) {
|
||||
// // 滚动分组标题
|
||||
// linkScrollbar.value?.setScrollTop(titleRef.offsetTop)
|
||||
// }
|
||||
}
|
||||
// 分组标题引用列表
|
||||
const groupTitleRefs = ref<HTMLInputElement[]>([])
|
||||
/**
|
||||
* 处理右侧链接列表滚动
|
||||
* @param scrollTop 滚动条的位置
|
||||
*/
|
||||
const handleScroll = ({ scrollTop }: { scrollTop: number }) => {
|
||||
const titleEl = groupTitleRefs.value.find((titleEl: HTMLInputElement) => {
|
||||
// 获取标题的位置信息
|
||||
const { offsetHeight, offsetTop } = titleEl
|
||||
// 判断标题是否在可视范围内
|
||||
return scrollTop >= offsetTop && scrollTop < offsetTop + offsetHeight
|
||||
})
|
||||
// 只需处理一次
|
||||
if (titleEl && activeGroup.value !== titleEl.textContent) {
|
||||
activeGroup.value = titleEl.textContent || ''
|
||||
// 同步左侧的滚动条位置
|
||||
scrollToGroupBtn(activeGroup.value)
|
||||
}
|
||||
}
|
||||
|
||||
// 分组滚动条
|
||||
const groupScrollbar = ref<ScrollbarInstance>()
|
||||
// 分组引用列表
|
||||
const groupBtnRefs = ref<ButtonInstance[]>([])
|
||||
// 自动滚动分组按钮,确保分组按钮保持在可视区域内
|
||||
const scrollToGroupBtn = (group : string) => {
|
||||
const groupBtn = groupBtnRefs.value
|
||||
.map((btn : ButtonInstance) => btn['ref'])
|
||||
.find((ref : Node) => ref.textContent === group)
|
||||
if (groupBtn) {
|
||||
groupScrollbar.value?.setScrollTop(groupBtn.offsetTop)
|
||||
}
|
||||
}
|
||||
// 右侧滚动条
|
||||
const linkScrollbar = ref<ScrollbarInstance>()
|
||||
// 处理分组选中
|
||||
const handleGroupSelected = (group: string) => {
|
||||
activeGroup.value = group
|
||||
const titleRef = groupTitleRefs.value.find((item: HTMLInputElement) => item.textContent === group)
|
||||
if (titleRef) {
|
||||
// 滚动分组标题
|
||||
linkScrollbar.value?.setScrollTop(titleRef.offsetTop)
|
||||
}
|
||||
}
|
||||
|
||||
// 是否为相同的链接(不比较参数,只比较链接)
|
||||
const isSameLink = (link1 : string, link2 : string) => {
|
||||
return split(link1, '?', 1)[0] === split(link2, '?', 1)[0]
|
||||
}
|
||||
// 分组滚动条
|
||||
const groupScrollbar = ref<ScrollbarInstance>()
|
||||
// 分组引用列表
|
||||
const groupBtnRefs = ref<ButtonInstance[]>([])
|
||||
// 自动滚动分组按钮,确保分组按钮保持在可视区域内
|
||||
const scrollToGroupBtn = (group: string) => {
|
||||
const groupBtn = groupBtnRefs.value
|
||||
.map((btn: ButtonInstance) => btn['ref'])
|
||||
.find((ref: Node) => ref.textContent === group)
|
||||
if (groupBtn) {
|
||||
groupScrollbar.value?.setScrollTop(groupBtn.offsetTop)
|
||||
}
|
||||
}
|
||||
|
||||
// 详情选择对话框
|
||||
const detailSelectDialog = ref<{
|
||||
visible : boolean
|
||||
id ?: number
|
||||
type ?: APP_LINK_TYPE_ENUM
|
||||
}>({
|
||||
visible: false,
|
||||
id: undefined,
|
||||
type: undefined
|
||||
})
|
||||
// 处理详情选择
|
||||
const handleProductCategorySelected = (id : number) => {
|
||||
const url = new URL(activeAppLink.value.path, 'http://127.0.0.1')
|
||||
// 修改 id 参数
|
||||
url.searchParams.set('id', `${id}`)
|
||||
// 排除域名
|
||||
activeAppLink.value.path = `${url.pathname}${url.search}`
|
||||
// 关闭对话框
|
||||
detailSelectDialog.value.visible = false
|
||||
// 重置 id
|
||||
detailSelectDialog.value.id = undefined
|
||||
}
|
||||
// 是否为相同的链接(不比较参数,只比较链接)
|
||||
const isSameLink = (link1: string, link2: string) => {
|
||||
return split(link1, '?', 1)[0] === split(link2, '?', 1)[0]
|
||||
}
|
||||
|
||||
// 详情选择对话框
|
||||
const detailSelectDialog = ref<{
|
||||
visible: boolean
|
||||
id?: number
|
||||
type?: APP_LINK_TYPE_ENUM
|
||||
}>({
|
||||
visible: false,
|
||||
id: undefined,
|
||||
type: undefined
|
||||
})
|
||||
// 处理详情选择
|
||||
const handleProductCategorySelected = (id: number) => {
|
||||
const url = new URL(activeAppLink.value.path, 'http://127.0.0.1')
|
||||
// 修改 id 参数
|
||||
url.searchParams.set('id', `${id}`)
|
||||
// 排除域名
|
||||
activeAppLink.value.path = `${url.pathname}${url.search}`
|
||||
// 关闭对话框
|
||||
detailSelectDialog.value.visible = false
|
||||
// 重置 id
|
||||
detailSelectDialog.value.id = undefined
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
@ -65,11 +65,11 @@ export const APP_LINK_GROUP_LIST = [
|
||||
name: '商品搜索',
|
||||
path: '/pages/index/search'
|
||||
},
|
||||
// {
|
||||
// name: '自定义页面',
|
||||
// path: '/pages/index/page',
|
||||
// type: APP_LINK_TYPE_ENUM.DIY_PAGE_DETAIL
|
||||
// },
|
||||
{
|
||||
name: '自定义页面',
|
||||
path: '/pages/index/page',
|
||||
type: APP_LINK_TYPE_ENUM.DIY_PAGE_DETAIL
|
||||
},
|
||||
{
|
||||
name: '客服',
|
||||
path: '/pages/chat/index'
|
||||
@ -78,25 +78,13 @@ export const APP_LINK_GROUP_LIST = [
|
||||
name: '系统设置',
|
||||
path: '/pages/public/setting'
|
||||
},
|
||||
// {
|
||||
// name: '常见问题',
|
||||
// path: '/pages/public/faq'
|
||||
// },
|
||||
{
|
||||
name: '常见问题',
|
||||
path: '/pages/public/faq'
|
||||
},
|
||||
{
|
||||
name: '积分商城',
|
||||
path: '/pages/index/page?id=3'
|
||||
},
|
||||
{
|
||||
name:'我的积分',
|
||||
path:'/pages/user/wallet/score'
|
||||
},
|
||||
{
|
||||
name:'兑换记录',
|
||||
path:'/pages/activity/point/exchange_list'
|
||||
},
|
||||
{
|
||||
name:'积分商品列表',
|
||||
path:'/pages/activity/point/exchange_listall?id=3'
|
||||
path: '/pages/public/faq'
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -123,11 +111,11 @@ export const APP_LINK_GROUP_LIST = [
|
||||
path: '/pages/goods/seckill',
|
||||
type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
|
||||
},
|
||||
// {
|
||||
// name: '促销列表',
|
||||
// path: '/pages/goods/sales',
|
||||
// type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
|
||||
// },
|
||||
{
|
||||
name: '促销列表',
|
||||
path: '/pages/goods/sales',
|
||||
type: APP_LINK_TYPE_ENUM.PRODUCT_DETAIL_SECKILL
|
||||
},
|
||||
{
|
||||
name: '门店管理',
|
||||
path: '/pages/user/goods_details_store/index',
|
||||
@ -207,12 +195,11 @@ export const APP_LINK_GROUP_LIST = [
|
||||
{
|
||||
name: '充值记录',
|
||||
path: '/pages/pay/recharge-log'
|
||||
},
|
||||
{
|
||||
name: '核销记录',
|
||||
path: '/pages/pay/recharge-log'
|
||||
}
|
||||
// ,
|
||||
// {
|
||||
// name: '核销记录',
|
||||
// path: '/pages/pay/recharge-log'
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -261,45 +248,7 @@ export const APP_LINK_GROUP_LIST = [
|
||||
{
|
||||
name: '会员中心',
|
||||
path: '/pages/user/user_vip/index'
|
||||
},
|
||||
{
|
||||
name:'付费会员',
|
||||
path:'/pages/user/user_vip/list'
|
||||
},
|
||||
{
|
||||
name:'预约中心',
|
||||
path:'/pages/subscribe/subscribe'
|
||||
},
|
||||
{
|
||||
name:'预约记录',
|
||||
path:'pages/reservation_record/reservation_record'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
// ,
|
||||
// {
|
||||
// name: '自定义页面',
|
||||
// links: [
|
||||
// {
|
||||
// name: '促销页面',
|
||||
// path: 'ss'
|
||||
// },
|
||||
// {
|
||||
// name: '关于我们',
|
||||
// path: '/pages/pay/recharge-lo'
|
||||
// },
|
||||
// {
|
||||
// name: '产品与服务',
|
||||
// path: '/pages/pay/recharge-l'
|
||||
// },
|
||||
// {
|
||||
// name: '自定义页面',
|
||||
// path: '/pages/pay/recharge-'
|
||||
// },
|
||||
// {
|
||||
// name: '个人中心',
|
||||
// path: '/pages/pay/recharge'
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
] as AppLinkGroup[]
|
||||
|
@ -23,11 +23,8 @@
|
||||
<div>
|
||||
<div class="drag-placement">组件放置区域</div>
|
||||
<div class="component">
|
||||
<!-- <Icon :icon="element.icon" :size="32" /> -->
|
||||
<div>
|
||||
<img :src="element.icon" />
|
||||
</div>
|
||||
<span class="text-12px">{{ element.name }}</span>
|
||||
<Icon :icon="element.icon" :size="32" />
|
||||
<span class="mt-4px text-12px">{{ element.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -131,8 +128,8 @@ const handleCloneComponent = (component: DiyComponent<any>) => {
|
||||
width: 86px;
|
||||
height: 86px;
|
||||
cursor: move;
|
||||
// border-right: 1px solid var(--el-border-color-lighter);
|
||||
// border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
border-right: 1px solid var(--el-border-color-lighter);
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@ -145,9 +142,8 @@ const handleCloneComponent = (component: DiyComponent<any>) => {
|
||||
|
||||
.component.active,
|
||||
.component:hover {
|
||||
// color: var(--el-color-white);
|
||||
// background: var(--el-color-primary);
|
||||
background: #f6f6f6;
|
||||
color: var(--el-color-white);
|
||||
background: var(--el-color-primary);
|
||||
|
||||
.el-icon {
|
||||
color: var(--el-color-white);
|
||||
|
@ -26,13 +26,12 @@ export interface CarouselItemProperty {
|
||||
// 跳转链接
|
||||
url: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-09.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'Carousel',
|
||||
name: '轮播图',
|
||||
// icon: 'system-uicons:carousel',
|
||||
icon: logo,
|
||||
icon: 'system-uicons:carousel',
|
||||
property: {
|
||||
type: 'default',
|
||||
indicator: 'dot',
|
||||
|
@ -67,8 +67,7 @@ export const CouponValidTerm = defineComponent({
|
||||
coupon.validEndTime,
|
||||
'YYYY-MM-DD'
|
||||
)}`
|
||||
// : `领取后第 ${coupon.fixedStartTerm} - ${coupon.fixedEndTerm} 天内可用`
|
||||
: `领取后 ${coupon.fixedEndTerm} 天内可用`
|
||||
: `领取后第 ${coupon.fixedStartTerm} - ${coupon.fixedEndTerm} 天内可用`
|
||||
return () => <div>{text}</div>
|
||||
}
|
||||
})
|
||||
|
@ -22,13 +22,12 @@ export interface CouponCardProperty {
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-19.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'CouponCard',
|
||||
name: '优惠券',
|
||||
// icon: 'ep:ticket',
|
||||
icon: logo,
|
||||
icon: 'ep:ticket',
|
||||
property: {
|
||||
columns: 1,
|
||||
bgImg: '',
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-scrollbar class="z-1 min-h-30px" wrap-class="w-full" ref="containerRef">
|
||||
<div
|
||||
class="new-class flex-row text-12px"
|
||||
class="flex flex-row text-12px"
|
||||
:style="{
|
||||
gap: `${property.space}px`,
|
||||
width: scrollbarWidth
|
||||
@ -13,19 +13,20 @@
|
||||
background: property.bgImg
|
||||
? `url(${property.bgImg}) 100% center / 100% 100% no-repeat`
|
||||
: '#fff',
|
||||
width: `150px`,
|
||||
padding: `10px 10px`,
|
||||
width: `${couponWidth}px`,
|
||||
color: property.textColor
|
||||
}"
|
||||
v-for="(coupon, index) in couponList"
|
||||
:key="index"
|
||||
style="padding-left: 0px;padding-right: 4px;"
|
||||
>
|
||||
<!-- 布局1:1列-->
|
||||
<!-- <div v-if="property.columns === 1" class="m-l-16px flex flex-row justify-between p-8px">
|
||||
<div v-if="property.columns === 1" class="m-l-16px flex flex-row justify-between p-8px">
|
||||
<div class="flex flex-col justify-evenly gap-4px">
|
||||
<!-- 优惠值 -->
|
||||
<CouponDiscount :coupon="coupon" />
|
||||
<!-- 优惠描述 -->
|
||||
<CouponDiscountDesc :coupon="coupon" />
|
||||
<!-- 有效期 -->
|
||||
<CouponValidTerm :coupon="coupon" />
|
||||
</div>
|
||||
<div class="flex flex-col justify-evenly">
|
||||
@ -39,21 +40,20 @@
|
||||
立即领取
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 布局2:2列-->
|
||||
<!-- v-else-if="property.columns === 2"s -->
|
||||
<div
|
||||
class="flex flex-row justify-between"
|
||||
style=""
|
||||
v-else-if="property.columns === 2"
|
||||
class="m-l-16px flex flex-row justify-between p-8px"
|
||||
>
|
||||
<div class="flex flex-col justify-evenly gap-4px" style="flex:1;">
|
||||
<div class="flex flex-col justify-evenly gap-4px">
|
||||
<!-- 优惠值 -->
|
||||
<CouponDiscount :coupon="coupon" style="text-align:center;" />
|
||||
<div style="text-align:center;">{{ coupon.name }}</div>
|
||||
<CouponDiscount :coupon="coupon" />
|
||||
<div>{{ coupon.name }}</div>
|
||||
</div>
|
||||
<div class="flex flex-col" style="writing-mode: vertical-rl;">
|
||||
<div class="flex flex-col">
|
||||
<div
|
||||
class="h-full w-20px rounded-20px text-center"
|
||||
class="h-full w-20px rounded-20px p-x-2px p-y-8px text-center"
|
||||
:style="{
|
||||
color: property.button.color,
|
||||
background: property.button.bgColor
|
||||
@ -64,7 +64,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 布局3:3列-->
|
||||
<!-- <div v-else class="flex flex-col items-center justify-around gap-4px p-4px">
|
||||
<div v-else class="flex flex-col items-center justify-around gap-4px p-4px">
|
||||
<!-- 优惠值 -->
|
||||
<CouponDiscount :coupon="coupon" />
|
||||
<div>{{ coupon.name }}</div>
|
||||
<div
|
||||
@ -76,7 +77,7 @@
|
||||
>
|
||||
立即领取
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
@ -138,14 +139,4 @@ onMounted(() => {
|
||||
phoneWidth.value = containerRef.value?.wrapRef?.offsetWidth || 375
|
||||
})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.new-class{
|
||||
margin-left: 10px;
|
||||
overflow-x:scroll;
|
||||
white-space: nowrap;
|
||||
.box-content{
|
||||
margin-right:10px;
|
||||
display:inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -23,7 +23,7 @@
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card header="优惠券样式" class="property-group" shadow="never">
|
||||
<!-- <el-form-item label="列数" prop="type">
|
||||
<el-form-item label="列数" prop="type">
|
||||
<el-radio-group v-model="formData.columns">
|
||||
<el-tooltip class="item" content="一列" placement="bottom">
|
||||
<el-radio-button :label="1">
|
||||
@ -41,7 +41,7 @@
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="背景图片" prop="bgImg">
|
||||
<UploadImg v-model="formData.bgImg" height="80px" width="100%" class="min-w-160px" />
|
||||
</el-form-item>
|
||||
@ -85,7 +85,7 @@ defineOptions({ name: 'CouponCardProperty' })
|
||||
const props = defineProps<{ modelValue: CouponCardProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
formData.value.columns = '3';
|
||||
|
||||
// 优惠券列表
|
||||
const couponList = ref<CouponTemplateApi.CouponTemplateVO[]>([])
|
||||
const couponSelectDialog = ref()
|
||||
|
@ -13,13 +13,12 @@ export interface DividerProperty {
|
||||
// 类型
|
||||
borderType: 'solid' | 'dashed' | 'dotted' | 'none'
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-12.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'Divider',
|
||||
name: '分割线',
|
||||
// icon: 'tdesign:component-divider-vertical',
|
||||
icon: logo,
|
||||
icon: 'tdesign:component-divider-vertical',
|
||||
property: {
|
||||
height: 30,
|
||||
lineWidth: 1,
|
||||
|
@ -21,13 +21,12 @@ export interface FloatingActionButtonItemProperty {
|
||||
// 文字颜色
|
||||
textColor: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-07.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'FloatingActionButton',
|
||||
name: '悬浮按钮',
|
||||
// icon: 'tabler:float-right',
|
||||
icon: logo,
|
||||
icon: 'tabler:float-right',
|
||||
position: 'fixed',
|
||||
property: {
|
||||
direction: 'vertical',
|
||||
|
@ -25,13 +25,12 @@ export interface HotZoneItemProperty {
|
||||
// 左
|
||||
left: number
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-14.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'HotZone',
|
||||
name: '热区',
|
||||
// icon: 'tabler:hand-click',
|
||||
icon: logo,
|
||||
icon: 'tabler:hand-click',
|
||||
property: {
|
||||
imgUrl: '',
|
||||
list: [] as HotZoneItemProperty[],
|
||||
|
@ -9,13 +9,12 @@ export interface ImageBarProperty {
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-08.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'ImageBar',
|
||||
name: '图片展示',
|
||||
// icon: 'ep:picture',
|
||||
icon: logo,
|
||||
icon: 'ep:picture',
|
||||
property: {
|
||||
imgUrl: '',
|
||||
url: '',
|
||||
|
@ -29,13 +29,12 @@ export interface MagicCubeItemProperty {
|
||||
// 左
|
||||
left: number
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-13.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MagicCube',
|
||||
name: '广告魔方',
|
||||
// icon: 'bi:columns',
|
||||
icon: logo,
|
||||
icon: 'bi:columns',
|
||||
property: {
|
||||
borderRadiusTop: 0,
|
||||
borderRadiusBottom: 0,
|
||||
|
@ -49,13 +49,12 @@ export const EMPTY_MENU_GRID_ITEM_PROPERTY = {
|
||||
bgColor: '#FF6000'
|
||||
}
|
||||
} as MenuGridItemProperty
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-04.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuGrid',
|
||||
name: '宫格导航',
|
||||
// icon: 'bi:grid-3x3-gap',
|
||||
icon: logo,
|
||||
icon: 'bi:grid-3x3-gap',
|
||||
property: {
|
||||
column: 3,
|
||||
list: [cloneDeep(EMPTY_MENU_GRID_ITEM_PROPERTY)],
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div
|
||||
v-for="(item, index) in property.list"
|
||||
:key="index"
|
||||
class="relative flex flex-col items-center"
|
||||
class="relative flex flex-col items-center p-b-14px p-t-20px"
|
||||
:style="{ width: `${100 * (1 / property.column)}%` }"
|
||||
>
|
||||
<!-- 右上角角标 -->
|
||||
@ -14,11 +14,11 @@
|
||||
>
|
||||
{{ item.badge.text }}
|
||||
</span>
|
||||
<el-image v-if="item.iconUrl" class="h-40px w-40px" :src="item.iconUrl" />
|
||||
<el-image v-if="item.iconUrl" class="h-28px w-28px" :src="item.iconUrl" />
|
||||
<span class="m-t-8px h-16px text-12px leading-16px" :style="{ color: item.titleColor }">
|
||||
{{ item.title }}
|
||||
</span>
|
||||
<span v-if="item.subtitle" class="m-t-6px h-12px text-10px leading-12px" :style="{ color: item.subtitleColor }">
|
||||
<span class="m-t-6px h-12px text-10px leading-12px" :style="{ color: item.subtitleColor }">
|
||||
{{ item.subtitle }}
|
||||
</span>
|
||||
</div>
|
||||
@ -32,9 +32,4 @@ defineOptions({ name: 'MenuGrid' })
|
||||
defineProps<{ property: MenuGridProperty }>()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.items-center{
|
||||
margin:5px 0;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -6,7 +6,6 @@
|
||||
<el-radio-group v-model="formData.column">
|
||||
<el-radio :label="3">3个</el-radio>
|
||||
<el-radio :label="4">4个</el-radio>
|
||||
<el-radio :label="5">5个</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
|
||||
/** 宫格导航属性 */
|
||||
export interface MenuGridProperty {
|
||||
// 列数
|
||||
column: number
|
||||
// 导航菜单列表
|
||||
list: MenuGridItemProperty[]
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
|
||||
/** 宫格导航项目属性 */
|
||||
export interface MenuGridItemProperty {
|
||||
// 图标链接
|
||||
iconUrl: string
|
||||
// 标题
|
||||
title: string
|
||||
// 标题颜色
|
||||
titleColor: string
|
||||
// 副标题
|
||||
subtitle: string
|
||||
// 副标题颜色
|
||||
subtitleColor: string
|
||||
// 链接
|
||||
url: string
|
||||
// 角标
|
||||
badge: {
|
||||
// 是否显示
|
||||
show: boolean
|
||||
// 角标文字
|
||||
text: string
|
||||
// 角标文字颜色
|
||||
textColor: string
|
||||
// 角标背景颜色
|
||||
bgColor: string
|
||||
}
|
||||
}
|
||||
|
||||
export const EMPTY_MENU_GRID_ITEM_PROPERTY = {
|
||||
title: '标题',
|
||||
titleColor: '#333',
|
||||
subtitle: '副标题',
|
||||
subtitleColor: '#bbb',
|
||||
badge: {
|
||||
show: false,
|
||||
textColor: '#fff',
|
||||
bgColor: '#FF6000'
|
||||
}
|
||||
} as MenuGridItemProperty
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-04.png'
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuGridTow',
|
||||
name: '魔方',
|
||||
// icon: 'bi:grid-3x3-gap',
|
||||
icon: logo,
|
||||
property: {
|
||||
column: 3,
|
||||
list: [cloneDeep(EMPTY_MENU_GRID_ITEM_PROPERTY)],
|
||||
style: {
|
||||
bgType: 'color',
|
||||
bgColor: '#fff',
|
||||
marginBottom: 8,
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
padding: 8,
|
||||
paddingTop: 8,
|
||||
paddingRight: 8,
|
||||
paddingBottom: 8,
|
||||
paddingLeft: 8,
|
||||
borderRadius: 8,
|
||||
borderTopLeftRadius: 8,
|
||||
borderTopRightRadius: 8,
|
||||
borderBottomRightRadius: 8,
|
||||
borderBottomLeftRadius: 8
|
||||
} as ComponentStyle
|
||||
}
|
||||
} as DiyComponent<MenuGridProperty>
|
@ -1,201 +0,0 @@
|
||||
<template>
|
||||
<div class='new_czbk'>
|
||||
<div class="t">
|
||||
<text class="left-font">超值爆款</text>
|
||||
<div class="sub">美好生活由此开始</div>
|
||||
</div>
|
||||
<div class="new-list">
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendBest',
|
||||
});"> -->
|
||||
<div class="item" >
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">今日推荐</div>
|
||||
<div class="c">店主诚意推荐品质商品</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img src="https://zysc.fjptzykj.com:3000/shangcheng/40a7582be7aeb5a6047415ab3a6728439a2798a4752ffcc1c063d66a534aa630.png"
|
||||
class="img"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/c80faeeeb2d6dadcdbe7e6d1a4caa06869b94301612cdf157414a10559b38267.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendHot',
|
||||
});"> -->
|
||||
<div class="item">
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">热门榜单</div>
|
||||
<div class="c">店主诚意推荐品质商品</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/5c72fc99989bf0a7e59b57f519c76c9a98cb20478384e20b1b934aa8f80cc598.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/904fd4848fde8025ccc17693662efd5b7bf5ec3f2656ecc7de407c8c46f910b2.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendNew',
|
||||
});"> -->
|
||||
<div class="item">
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">首发新品</div>
|
||||
<div class="c">新品上架等 你来拿</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/ebb2fc0512d1bd6a6d21a2c07f6603bfd2ea6f7e23377eb4cd8118d89d666589.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/7c71cbf2c757418302ea9ef2952893c24e1d46c4cc35a821f56be0f315bcabb0.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="item" @click="sheep.$router.go('/pages/goods/sales', {
|
||||
activityType: 'recommendGood',
|
||||
});"> -->
|
||||
<div class="item">
|
||||
<div class="nei">
|
||||
<div class="l">
|
||||
<div class="t">促销单品</div>
|
||||
<div class="c">综合评选好 产品</div>
|
||||
<div class="b">
|
||||
<!-- GO! -->
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/aac8baa7a6feb9ee3459d1cf75ba9a7e8bacb5d93c88ac95c1b0ecd29b847f96.png"
|
||||
class="img"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="r">
|
||||
<img
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/8a61c35d82702c61f97ef3db43a8d6755b2eca3d78a22dbaa55851e815e96a23.png"
|
||||
class="img" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { MenuGridProperty } from './config'
|
||||
/** 宫格导航 */
|
||||
defineOptions({ name: 'MenuGridTow' })
|
||||
defineProps<{ property: MenuGridProperty }>()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.new_czbk {
|
||||
width: 100%;
|
||||
background: rgba(255, 229, 227);
|
||||
border-radius: 5px;
|
||||
margin: 0 auto;
|
||||
padding: 5px 0;
|
||||
// margin-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
&>.t {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:0 10px;
|
||||
.left-font {
|
||||
color: rgba(252, 60, 62);
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sub {
|
||||
background: rgba(248, 79, 43);
|
||||
color: white;
|
||||
border-radius: 20px 0px 20px 0px;
|
||||
padding: 0 13px;
|
||||
margin-left: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.new-list {
|
||||
// width: 100%;
|
||||
margin-right:10px;
|
||||
.item {
|
||||
float: left;
|
||||
width: 50%;
|
||||
|
||||
.nei {
|
||||
margin: 10px;
|
||||
margin-right:0;
|
||||
margin-bottom: 0;
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
padding: 8px 10px;
|
||||
display: flex;
|
||||
|
||||
.l {
|
||||
width: 50%;
|
||||
|
||||
.t {
|
||||
// font-size: 17px;
|
||||
}
|
||||
|
||||
.c {
|
||||
color: rgba(153, 153, 153);
|
||||
font-size: 12px;
|
||||
margin: 3px 0;
|
||||
}
|
||||
|
||||
.b {
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: space-around;
|
||||
// background: #329cff;
|
||||
// margin: 0 3px;
|
||||
// border-radius: 15px;
|
||||
// color: white;
|
||||
// font-weight: 700;
|
||||
// padding: 0px 9px;
|
||||
// font-style: oblique;
|
||||
|
||||
.img {
|
||||
width: 76%;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.r {
|
||||
width: 49%;
|
||||
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
@ -1,107 +0,0 @@
|
||||
<template>
|
||||
<ComponentContainerProperty v-model="formData.style">
|
||||
<!-- 表单 -->
|
||||
<el-form label-width="80px" :model="formData" class="m-t-8px">
|
||||
<!-- <el-form-item label="每行数量" prop="column">
|
||||
<el-radio-group v-model="formData.column">
|
||||
<el-radio :label="3">3个</el-radio>
|
||||
<el-radio :label="4">4个</el-radio>
|
||||
<el-radio :label="5">5个</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-card header="菜单设置" class="property-group" shadow="never">
|
||||
<Draggable v-model="formData.list" handle="false">
|
||||
<template #default="{ element }">
|
||||
<!-- <el-form-item label="图标" prop="iconUrl">
|
||||
<UploadImg v-model="element.iconUrl" height="80px" width="80px">
|
||||
<template #tip> 建议尺寸:44 * 44 </template>
|
||||
</UploadImg>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="标题" prop="title">
|
||||
<!-- <InputWithColor v-model="element.title" v-model:color="element.titleColor" /> -->
|
||||
<div>{{element.title}}</div>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="副标题" prop="subtitle">
|
||||
<InputWithColor v-model="element.subtitle" v-model:color="element.subtitleColor" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="链接" prop="url">
|
||||
<AppLinkInput v-model="element.url" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="显示角标" prop="badge.show">
|
||||
<el-switch v-model="element.badge.show" />
|
||||
</el-form-item>
|
||||
<template v-if="element.badge.show">
|
||||
<el-form-item label="角标内容" prop="badge.text">
|
||||
<InputWithColor
|
||||
v-model="element.badge.text"
|
||||
v-model:color="element.badge.textColor"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="背景颜色" prop="badge.bgColor">
|
||||
<ColorInput v-model="element.badge.bgColor" />
|
||||
</el-form-item>
|
||||
</template> -->
|
||||
</template>
|
||||
</Draggable>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</ComponentContainerProperty>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import {
|
||||
EMPTY_MENU_GRID_ITEM_PROPERTY,
|
||||
MenuGridProperty
|
||||
} from '@/components/DiyEditor/components/mobile/MenuGrid/config'
|
||||
|
||||
/** 宫格导航属性面板 */
|
||||
defineOptions({ name: 'MenuGridProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue : MenuGridProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
if (formData.value.list.length == 1 || formData.value.list.length == 2 || formData.value.list.length == 3) {
|
||||
formData.value = {
|
||||
column: 3,
|
||||
list: [
|
||||
{
|
||||
title: "今日推荐",
|
||||
url: '/pages/index/page?id=19'
|
||||
},
|
||||
{
|
||||
title: "热门榜单",
|
||||
url: '/pages/index/page?id=21'
|
||||
},
|
||||
{
|
||||
title: "首发新品",
|
||||
url: '/pages/index/page?id=22'
|
||||
},
|
||||
{
|
||||
title: "促销单品",
|
||||
url: '/pages/index/page?id=23'
|
||||
}
|
||||
],
|
||||
style: {
|
||||
bgColor: "#fff",
|
||||
bgType: "color",
|
||||
borderBottomLeftRadius: 8,
|
||||
borderBottomRightRadius: 8,
|
||||
borderRadius: 8,
|
||||
borderTopLeftRadius: 8,
|
||||
borderTopRightRadius: 8,
|
||||
marginBottom: 8,
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
padding: 0,
|
||||
paddingBottom: 0,
|
||||
paddingLeft: 0,
|
||||
paddingRight: 0,
|
||||
paddingTop: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
@ -31,13 +31,12 @@ export const EMPTY_MENU_LIST_ITEM_PROPERTY = {
|
||||
subtitle: '副标题',
|
||||
subtitleColor: '#bbb'
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-05.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuList',
|
||||
name: '列表导航',
|
||||
// icon: 'fa-solid:list',
|
||||
icon: logo,
|
||||
icon: 'fa-solid:list',
|
||||
property: {
|
||||
list: [cloneDeep(EMPTY_MENU_LIST_ITEM_PROPERTY)],
|
||||
style: {
|
||||
|
@ -46,13 +46,12 @@ export const EMPTY_MENU_SWIPER_ITEM_PROPERTY = {
|
||||
bgColor: '#FF6000'
|
||||
}
|
||||
} as MenuSwiperItemProperty
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-03.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'MenuSwiper',
|
||||
name: '菜单导航',
|
||||
// icon: 'bi:grid-3x2-gap',
|
||||
icon: logo,
|
||||
icon: 'bi:grid-3x2-gap',
|
||||
property: {
|
||||
layout: 'iconText',
|
||||
row: 1,
|
||||
|
@ -21,13 +21,12 @@ export interface NoticeContentProperty {
|
||||
// 链接地址
|
||||
url: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-02.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'NoticeBar',
|
||||
name: '公告栏',
|
||||
// icon: 'ep:bell',
|
||||
icon: logo,
|
||||
icon: 'ep:bell',
|
||||
property: {
|
||||
iconUrl: 'http://mall.yudao.iocoder.cn/static/images/xinjian.png',
|
||||
contents: [
|
||||
|
@ -10,7 +10,7 @@
|
||||
<div class="h-24px truncate leading-24px">{{ item.text }}</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
<!-- <Icon icon="ep:arrow-right" /> -->
|
||||
<Icon icon="ep:arrow-right" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -13,13 +13,12 @@ export interface PopoverItemProperty {
|
||||
// 显示类型:仅显示一次、每次启动都会显示
|
||||
showType: 'once' | 'always'
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-06.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'Popover',
|
||||
name: '弹窗广告',
|
||||
// icon: 'carbon:popup',
|
||||
icon: logo,
|
||||
icon: 'carbon:popup',
|
||||
position: 'fixed',
|
||||
property: {
|
||||
list: [{ showType: 'once' }]
|
||||
|
@ -57,13 +57,12 @@ export interface ProductCardFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-15.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'ProductCard',
|
||||
name: '商品卡片',
|
||||
// icon: 'fluent:text-column-two-left-24-filled',
|
||||
icon: logo,
|
||||
icon: 'fluent:text-column-two-left-24-filled',
|
||||
property: {
|
||||
layoutType: 'oneColBigImg',
|
||||
fields: {
|
||||
|
@ -1,23 +1,5 @@
|
||||
<template>
|
||||
<div :class="`box-content min-h-30px w-full flex flex-row flex-wrap`" ref="containerRef">
|
||||
<view class="new-fenlei">
|
||||
<view class="list on">
|
||||
<view class="t">首页新品</view>
|
||||
<view class="b">最新出炉</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="t">精品推荐</view>
|
||||
<view class="b">猜你喜欢</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="t">热门榜单</view>
|
||||
<view class="b">好评如云</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="t">促销单品</view>
|
||||
<view class="b">多买多销</view>
|
||||
</view>
|
||||
</view>
|
||||
<div
|
||||
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
|
||||
:style="{
|
||||
@ -44,7 +26,6 @@
|
||||
'w-140px': property.layoutType === 'oneColSmallImg'
|
||||
}
|
||||
]"
|
||||
style="padding:10px;"
|
||||
>
|
||||
<el-image fit="cover" class="h-full w-full" :src="spu.picUrl" />
|
||||
</div>
|
||||
@ -182,44 +163,4 @@ const calculateWidth = () => {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.new-fenlei {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin:10px 0;
|
||||
justify-content: space-around;
|
||||
.list {
|
||||
width: 100%;
|
||||
display:flex;
|
||||
flex-wrap:wrap;
|
||||
&.on{
|
||||
.t {
|
||||
color: #e93422;
|
||||
}
|
||||
|
||||
.b {
|
||||
background: #e93422;
|
||||
color:white;
|
||||
}
|
||||
}
|
||||
.t {
|
||||
width:100%;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.b {
|
||||
// background: rgba(255, 102, 7);
|
||||
text-align: center;
|
||||
color: rgba(153,153,153);
|
||||
border-radius: 15px;
|
||||
width: 63%;
|
||||
margin: 0 auto;
|
||||
font-size: 12px;
|
||||
margin-top:5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -36,13 +36,12 @@ export interface ProductListFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-16.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'ProductList',
|
||||
name: '商品栏',
|
||||
// icon: 'fluent:text-column-two-24-filled',
|
||||
icon: logo,
|
||||
icon: 'fluent:text-column-two-24-filled',
|
||||
property: {
|
||||
layoutType: 'twoCol',
|
||||
fields: {
|
||||
|
@ -7,13 +7,12 @@ export interface PromotionArticleProperty {
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-20.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'PromotionArticle',
|
||||
name: '营销文章',
|
||||
// icon: 'ph:article-medium',
|
||||
icon: logo,
|
||||
icon: 'ph:article-medium',
|
||||
property: {
|
||||
style: {
|
||||
bgType: 'color',
|
||||
|
@ -37,13 +37,12 @@ export interface PromotionCombinationFieldProperty {
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-17.png'
|
||||
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'PromotionCombination',
|
||||
name: '拼团',
|
||||
// icon: 'mdi:account-group',
|
||||
icon: logo,
|
||||
icon: 'mdi:account-group',
|
||||
property: {
|
||||
layoutType: 'oneCol',
|
||||
fields: {
|
||||
|
@ -1,38 +1,17 @@
|
||||
<template>
|
||||
<el-scrollbar class="z-1 min-h-30px" wrap-class="w-full" ref="containerRef">
|
||||
|
||||
<div class="component">
|
||||
<div style="padding: 0px; border-radius: 0px; overflow: hidden;">
|
||||
<div class="min-h-42px flex flex-col">
|
||||
<div class="item h-42px flex flex-row items-center justify-between gap-4px p-x-12px">
|
||||
<div class="flex flex-1 flex-row items-center gap-8px">
|
||||
<div class="wh">
|
||||
<img class="new-text1"
|
||||
src="https://zysc.fjptzykj.com:3000/shangcheng/2f2be070c60ceb9466af937ff9dd8917ad2ee02f774dbac48fbb9e73bfc688d0.png" />
|
||||
<span class="new-text">拼团活动</span>
|
||||
</div>
|
||||
<span class="text-16px" style="color: rgb(187, 187, 187);">92人拼团成功</span>
|
||||
</div>
|
||||
<div class="item-center flex flex-row justify-center gap-4px">
|
||||
<span class="text-12px" style="color: rgb(187, 187, 187);">查看更多</span>
|
||||
<Icon icon="ep-arrow-right" color="#000" :size="16" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 商品网格 -->
|
||||
<!-- 商品网格 -->
|
||||
<div
|
||||
class="grid overflow-x-auto"
|
||||
:style="{
|
||||
gridGap: `${property.space}px`,
|
||||
gridTemplateColumns,
|
||||
width: scrollbarWidth
|
||||
}"
|
||||
style="padding:0 10px;padding-bottom: 8px;"
|
||||
>
|
||||
<!-- 商品 -->
|
||||
<div
|
||||
class="new-class relative box-content flex flex-row flex-wrap overflow-hidden "
|
||||
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
|
||||
:style="{
|
||||
borderTopLeftRadius: `${property.borderRadiusTop}px`,
|
||||
borderTopRightRadius: `${property.borderRadiusTop}px`,
|
||||
@ -53,7 +32,7 @@
|
||||
<el-image fit="cover" :src="spu.picUrl" :style="{ width: imageSize, height: imageSize }" />
|
||||
<div
|
||||
:class="[
|
||||
'flex flex-col p-8px box-border',
|
||||
'flex flex-col gap-8px p-8px box-border',
|
||||
{
|
||||
'w-[calc(100%-64px)]': columns === 2,
|
||||
'w-full': columns === 3
|
||||
@ -79,7 +58,6 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<view class="sss">参与拼团</view>
|
||||
</div>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
@ -101,8 +79,7 @@ watch(
|
||||
if (!props.property.activityId) return
|
||||
const activity = await CombinationActivityApi.getCombinationActivity(props.property.activityId)
|
||||
if (!activity?.spuId) return
|
||||
spuList.value = await ProductSpuApi.getSpuAdminSpuList()
|
||||
console.log(spuList.value,'请求成功')
|
||||
spuList.value = [await ProductSpuApi.getSpu(activity.spuId)]
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
@ -145,48 +122,4 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.sss {
|
||||
width: 100%;
|
||||
// margin-top: 10px;
|
||||
padding: 3px;
|
||||
font-size: 13px;
|
||||
background: #e93422;
|
||||
text-align: center;
|
||||
color: white;
|
||||
border-radius: 0px 0px 5px 5px;
|
||||
}
|
||||
.new-class{
|
||||
padding:0 0;
|
||||
// width:42%;
|
||||
}
|
||||
|
||||
:deep(.el-scrollbar__view) {
|
||||
background-color: white;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.wh {
|
||||
position: relative;
|
||||
padding-right: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.new-text1{
|
||||
width:30px;
|
||||
}
|
||||
.new-text{
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.wh::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 50%;
|
||||
right: 0;
|
||||
width: 1px;
|
||||
height: 57%;
|
||||
border-right: 1px solid #ababab;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card header="商品样式" class="property-group" shadow="never">
|
||||
<!-- <el-form-item label="布局" prop="type">
|
||||
<el-form-item label="布局" prop="type">
|
||||
<el-radio-group v-model="formData.layoutType">
|
||||
<el-tooltip class="item" content="单列" placement="bottom">
|
||||
<el-radio-button label="oneCol">
|
||||
@ -27,7 +27,7 @@
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="fields.name.show">
|
||||
<div class="flex gap-8px">
|
||||
<ColorInput v-model="formData.fields.name.color" />
|
||||
@ -99,7 +99,6 @@ defineOptions({ name: 'PromotionCombinationProperty' })
|
||||
const props = defineProps<{ modelValue: PromotionCombinationProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
formData.value.layoutType = 'threeCol';
|
||||
// 活动列表
|
||||
const activityList = ref<CombinationActivityApi.CombinationActivityVO>([])
|
||||
onMounted(async () => {
|
||||
|
@ -1,97 +0,0 @@
|
||||
import {ComponentStyle, DiyComponent} from '@/components/DiyEditor/util'
|
||||
|
||||
/** 积分商城属性 */
|
||||
export interface PromotionPointProperty {
|
||||
// 布局类型:单列 | 三列
|
||||
layoutType: 'oneColBigImg' | 'oneColSmallImg' | 'twoCol'
|
||||
// 商品字段
|
||||
fields: {
|
||||
// 商品名称
|
||||
name: PromotionPointFieldProperty
|
||||
// 商品简介
|
||||
introduction: PromotionPointFieldProperty
|
||||
// 商品价格
|
||||
price: PromotionPointFieldProperty
|
||||
// 市场价
|
||||
marketPrice: PromotionPointFieldProperty
|
||||
// 商品销量
|
||||
salesCount: PromotionPointFieldProperty
|
||||
// 商品库存
|
||||
stock: PromotionPointFieldProperty
|
||||
}
|
||||
// 角标
|
||||
badge: {
|
||||
// 是否显示
|
||||
show: boolean
|
||||
// 角标图片
|
||||
imgUrl: string
|
||||
}
|
||||
// 按钮
|
||||
btnBuy: {
|
||||
// 类型:文字 | 图片
|
||||
type: 'text' | 'img'
|
||||
// 文字
|
||||
text: string
|
||||
// 文字按钮:背景渐变起始颜色
|
||||
bgBeginColor: string
|
||||
// 文字按钮:背景渐变结束颜色
|
||||
bgEndColor: string
|
||||
// 图片按钮:图片地址
|
||||
imgUrl: string
|
||||
}
|
||||
// 上圆角
|
||||
borderRadiusTop: number
|
||||
// 下圆角
|
||||
borderRadiusBottom: number
|
||||
// 间距
|
||||
space: number
|
||||
// 秒杀活动编号
|
||||
activityIds: number[]
|
||||
// 组件样式
|
||||
style: ComponentStyle
|
||||
}
|
||||
|
||||
// 商品字段
|
||||
export interface PromotionPointFieldProperty {
|
||||
// 是否显示
|
||||
show: boolean
|
||||
// 颜色
|
||||
color: string
|
||||
}
|
||||
import logo from '@/assets/imgs/DiyEditorImges/组件图标-21.png'
|
||||
// 定义组件
|
||||
export const component = {
|
||||
id: 'PromotionPoint',
|
||||
name: '积分商城',
|
||||
// icon: 'ep:present',
|
||||
icon: logo,
|
||||
property: {
|
||||
layoutType: 'oneColBigImg',
|
||||
fields: {
|
||||
name: { show: true, color: '#000' },
|
||||
introduction: { show: true, color: '#999' },
|
||||
price: { show: true, color: '#ff3000' },
|
||||
marketPrice: { show: true, color: '#c4c4c4' },
|
||||
salesCount: { show: true, color: '#c4c4c4' },
|
||||
stock: { show: false, color: '#c4c4c4' }
|
||||
},
|
||||
badge: { show: false, imgUrl: '' },
|
||||
btnBuy: {
|
||||
type: 'text',
|
||||
text: '立即兑换',
|
||||
bgBeginColor: '#FF6000',
|
||||
bgEndColor: '#FE832A',
|
||||
imgUrl: ''
|
||||
},
|
||||
borderRadiusTop: 8,
|
||||
borderRadiusBottom: 8,
|
||||
space: 8,
|
||||
style: {
|
||||
bgType: 'color',
|
||||
bgColor: '',
|
||||
marginLeft: 8,
|
||||
marginRight: 8,
|
||||
marginBottom: 8
|
||||
} as ComponentStyle
|
||||
}
|
||||
} as DiyComponent<PromotionPointProperty>
|
@ -1,202 +0,0 @@
|
||||
<template>
|
||||
<div ref="containerRef" :class="`box-content min-h-30px w-full flex flex-row flex-wrap`">
|
||||
<div
|
||||
v-for="(spu, index) in spuList"
|
||||
:key="index"
|
||||
:style="{
|
||||
...calculateSpace(index),
|
||||
...calculateWidth(),
|
||||
borderTopLeftRadius: `${property.borderRadiusTop}px`,
|
||||
borderTopRightRadius: `${property.borderRadiusTop}px`,
|
||||
borderBottomLeftRadius: `${property.borderRadiusBottom}px`,
|
||||
borderBottomRightRadius: `${property.borderRadiusBottom}px`
|
||||
}"
|
||||
class="relative box-content flex flex-row flex-wrap overflow-hidden bg-white"
|
||||
>
|
||||
<!-- 角标 -->
|
||||
<div v-if="property.badge.show" class="absolute left-0 top-0 z-1 items-center justify-center">
|
||||
<el-image :src="property.badge.imgUrl" class="h-26px w-38px" fit="cover" />
|
||||
</div>
|
||||
<!-- 商品封面图 -->
|
||||
<div
|
||||
:class="[
|
||||
'h-140px',
|
||||
{
|
||||
'w-full': property.layoutType !== 'oneColSmallImg',
|
||||
'w-140px': property.layoutType === 'oneColSmallImg'
|
||||
}
|
||||
]"
|
||||
>
|
||||
<el-image :src="spu.picUrl" class="h-full w-full" fit="cover" />
|
||||
</div>
|
||||
<div
|
||||
:class="[
|
||||
' flex flex-col gap-8px p-8px box-border',
|
||||
{
|
||||
'w-full': property.layoutType !== 'oneColSmallImg',
|
||||
'w-[calc(100%-140px-16px)]': property.layoutType === 'oneColSmallImg'
|
||||
}
|
||||
]"
|
||||
>
|
||||
<!-- 商品名称 -->
|
||||
<div
|
||||
v-if="property.fields.name.show"
|
||||
:class="[
|
||||
'text-14px ',
|
||||
{
|
||||
truncate: property.layoutType !== 'oneColSmallImg',
|
||||
'overflow-ellipsis line-clamp-2': property.layoutType === 'oneColSmallImg'
|
||||
}
|
||||
]"
|
||||
:style="{ color: property.fields.name.color }"
|
||||
>
|
||||
{{ spu.name }}
|
||||
</div>
|
||||
<!-- 商品简介 -->
|
||||
<div
|
||||
v-if="property.fields.introduction.show"
|
||||
:style="{ color: property.fields.introduction.color }"
|
||||
class="truncate text-12px"
|
||||
>
|
||||
{{ spu.introduction }}
|
||||
</div>
|
||||
<div>
|
||||
<!-- 积分 -->
|
||||
<span
|
||||
v-if="property.fields.price.show"
|
||||
:style="{ color: property.fields.price.color }"
|
||||
class="text-16px"
|
||||
>
|
||||
{{ spu.point }}积分
|
||||
{{ !spu.pointPrice || spu.pointPrice === 0 ? '' : `+${fenToYuan(spu.pointPrice)}元` }}
|
||||
</span>
|
||||
<!-- 市场价 -->
|
||||
<span
|
||||
v-if="property.fields.marketPrice.show && spu.marketPrice"
|
||||
:style="{ color: property.fields.marketPrice.color }"
|
||||
class="ml-4px text-10px line-through"
|
||||
>
|
||||
¥{{ fenToYuan(spu.marketPrice) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="text-12px">
|
||||
<!-- 销量 -->
|
||||
<span
|
||||
v-if="property.fields.salesCount.show"
|
||||
:style="{ color: property.fields.salesCount.color }"
|
||||
>
|
||||
已兑{{ (spu.pointTotalStock || 0) - (spu.pointStock || 0) }}件
|
||||
</span>
|
||||
<!-- 库存 -->
|
||||
<span v-if="property.fields.stock.show" :style="{ color: property.fields.stock.color }">
|
||||
库存{{ spu.pointTotalStock || 0 }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 购买按钮 -->
|
||||
<div class="absolute bottom-8px right-8px">
|
||||
<!-- 文字按钮 -->
|
||||
<span
|
||||
v-if="property.btnBuy.type === 'text'"
|
||||
:style="{
|
||||
background: `linear-gradient(to right, ${property.btnBuy.bgBeginColor}, ${property.btnBuy.bgEndColor}`
|
||||
}"
|
||||
class="rounded-full p-x-12px p-y-4px text-12px text-white"
|
||||
>
|
||||
{{ property.btnBuy.text }}
|
||||
</span>
|
||||
<!-- 图片按钮 -->
|
||||
<el-image
|
||||
v-else
|
||||
:src="property.btnBuy.imgUrl"
|
||||
class="h-28px w-28px rounded-full"
|
||||
fit="cover"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { PromotionPointProperty } from './config'
|
||||
import * as ProductSpuApi from '@/api/mall/product/spu'
|
||||
import { PointActivityApi, PointActivityVO, SpuExtension0 } from '@/api/mall/promotion/point'
|
||||
import { fenToYuan } from '@/utils'
|
||||
|
||||
/** 积分商城卡片 */
|
||||
defineOptions({ name: 'PromotionPoint' })
|
||||
// 定义属性
|
||||
const props = defineProps<{ property: PromotionPointProperty }>()
|
||||
// 商品列表
|
||||
const spuList = ref<SpuExtension0[]>([])
|
||||
const spuIdList = ref<number[]>([])
|
||||
const pointActivityList = ref<PointActivityVO[]>([])
|
||||
|
||||
watch(
|
||||
() => props.property.activityIds,
|
||||
async () => {
|
||||
try {
|
||||
// 新添加的积分商城组件,是没有活动ID的
|
||||
const activityIds = props.property.activityIds
|
||||
// 检查活动ID的有效性
|
||||
if (Array.isArray(activityIds) && activityIds.length > 0) {
|
||||
// 获取积分商城活动详情列表
|
||||
pointActivityList.value = await PointActivityApi.getPointActivityListByIds(activityIds)
|
||||
|
||||
// 获取积分商城活动的 SPU 详情列表
|
||||
spuList.value = []
|
||||
spuIdList.value = pointActivityList.value.map((activity) => activity.spuId)
|
||||
if (spuIdList.value.length > 0) {
|
||||
spuList.value = await ProductSpuApi.getSpuDetailList(spuIdList.value)
|
||||
}
|
||||
|
||||
// 更新 SPU 的最低兑换积分和所需兑换金额
|
||||
pointActivityList.value.forEach((activity) => {
|
||||
// 匹配spuId
|
||||
const spu = spuList.value.find((spu) => spu.id === activity.spuId)
|
||||
if (spu) {
|
||||
spu.pointStock = activity.stock
|
||||
spu.pointTotalStock = activity.totalStock
|
||||
spu.point = activity.point
|
||||
spu.pointPrice = activity.price
|
||||
}
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取积分商城活动细节或 SPU 细节时出错:', error)
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* 计算商品的间距
|
||||
* @param index 商品索引
|
||||
*/
|
||||
const calculateSpace = (index: number) => {
|
||||
// 商品的列数
|
||||
const columns = props.property.layoutType === 'twoCol' ? 2 : 1
|
||||
// 第一列没有左边距
|
||||
const marginLeft = index % columns === 0 ? '0' : props.property.space + 'px'
|
||||
// 第一行没有上边距
|
||||
const marginTop = index < columns ? '0' : props.property.space + 'px'
|
||||
|
||||
return { marginLeft, marginTop }
|
||||
}
|
||||
|
||||
// 容器
|
||||
const containerRef = ref()
|
||||
// 计算商品的宽度
|
||||
const calculateWidth = () => {
|
||||
let width = '100%'
|
||||
// 双列时每列的宽度为:(总宽度 - 间距)/ 2
|
||||
if (props.property.layoutType === 'twoCol') {
|
||||
width = `${(containerRef.value.offsetWidth - props.property.space) / 2}px`
|
||||
}
|
||||
return { width }
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -1,154 +0,0 @@
|
||||
<template>
|
||||
<ComponentContainerProperty v-model="formData.style">
|
||||
<el-form :model="formData" label-width="80px">
|
||||
<el-card class="property-group" header="积分商城活动" shadow="never">
|
||||
<PointShowcase v-model="formData.activityIds" />
|
||||
</el-card>
|
||||
<el-card class="property-group" header="商品样式" shadow="never">
|
||||
<el-form-item label="布局" prop="type">
|
||||
<el-radio-group v-model="formData.layoutType">
|
||||
<el-tooltip class="item" content="单列大图" placement="bottom">
|
||||
<el-radio-button value="oneColBigImg">
|
||||
<Icon icon="fluent:text-column-one-24-filled" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" content="单列小图" placement="bottom">
|
||||
<el-radio-button value="oneColSmallImg">
|
||||
<Icon icon="fluent:text-column-two-left-24-filled" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip class="item" content="双列" placement="bottom">
|
||||
<el-radio-button value="twoCol">
|
||||
<Icon icon="fluent:text-column-two-24-filled" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
<!--<el-tooltip class="item" content="三列" placement="bottom">
|
||||
<el-radio-button value="threeCol">
|
||||
<Icon icon="fluent:text-column-three-24-filled" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>-->
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="fields.name.show">
|
||||
<div class="flex gap-8px">
|
||||
<ColorInput v-model="formData.fields.name.color" />
|
||||
<el-checkbox v-model="formData.fields.name.show" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品简介" prop="fields.introduction.show">
|
||||
<div class="flex gap-8px">
|
||||
<ColorInput v-model="formData.fields.introduction.color" />
|
||||
<el-checkbox v-model="formData.fields.introduction.show" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品价格" prop="fields.price.show">
|
||||
<div class="flex gap-8px">
|
||||
<ColorInput v-model="formData.fields.price.color" />
|
||||
<el-checkbox v-model="formData.fields.price.show" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="市场价" prop="fields.marketPrice.show">
|
||||
<div class="flex gap-8px">
|
||||
<ColorInput v-model="formData.fields.marketPrice.color" />
|
||||
<el-checkbox v-model="formData.fields.marketPrice.show" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品销量" prop="fields.salesCount.show">
|
||||
<div class="flex gap-8px">
|
||||
<ColorInput v-model="formData.fields.salesCount.color" />
|
||||
<el-checkbox v-model="formData.fields.salesCount.show" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品库存" prop="fields.stock.show">
|
||||
<div class="flex gap-8px">
|
||||
<ColorInput v-model="formData.fields.stock.color" />
|
||||
<el-checkbox v-model="formData.fields.stock.show" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card class="property-group" header="角标" shadow="never">
|
||||
<el-form-item label="角标" prop="badge.show">
|
||||
<el-switch v-model="formData.badge.show" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.badge.show" label="角标" prop="badge.imgUrl">
|
||||
<UploadImg v-model="formData.badge.imgUrl" height="44px" width="72px">
|
||||
<template #tip> 建议尺寸:36 * 22</template>
|
||||
</UploadImg>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card class="property-group" header="按钮" shadow="never">
|
||||
<el-form-item label="按钮类型" prop="btnBuy.type">
|
||||
<el-radio-group v-model="formData.btnBuy.type">
|
||||
<el-radio-button value="text">文字</el-radio-button>
|
||||
<el-radio-button value="img">图片</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<template v-if="formData.btnBuy.type === 'text'">
|
||||
<el-form-item label="按钮文字" prop="btnBuy.text">
|
||||
<el-input v-model="formData.btnBuy.text" />
|
||||
</el-form-item>
|
||||
<el-form-item label="左侧背景" prop="btnBuy.bgBeginColor">
|
||||
<ColorInput v-model="formData.btnBuy.bgBeginColor" />
|
||||
</el-form-item>
|
||||
<el-form-item label="右侧背景" prop="btnBuy.bgEndColor">
|
||||
<ColorInput v-model="formData.btnBuy.bgEndColor" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-form-item label="图片" prop="btnBuy.imgUrl">
|
||||
<UploadImg v-model="formData.btnBuy.imgUrl" height="56px" width="56px">
|
||||
<template #tip> 建议尺寸:56 * 56</template>
|
||||
</UploadImg>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-card>
|
||||
<el-card class="property-group" header="商品样式" shadow="never">
|
||||
<el-form-item label="上圆角" prop="borderRadiusTop">
|
||||
<el-slider
|
||||
v-model="formData.borderRadiusTop"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:show-input-controls="false"
|
||||
input-size="small"
|
||||
show-input
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下圆角" prop="borderRadiusBottom">
|
||||
<el-slider
|
||||
v-model="formData.borderRadiusBottom"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:show-input-controls="false"
|
||||
input-size="small"
|
||||
show-input
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="间隔" prop="space">
|
||||
<el-slider
|
||||
v-model="formData.space"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:show-input-controls="false"
|
||||
input-size="small"
|
||||
show-input
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
</el-form>
|
||||
</ComponentContainerProperty>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { PromotionPointProperty } from './config'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import PointShowcase from '@/views/mall/promotion/point/components/PointShowcase.vue'
|
||||
|
||||
// 秒杀属性面板
|
||||
defineOptions({ name: 'PromotionPointProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: PromotionPointProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|