diff --git a/src/api/bot/bot.js b/src/api/bot/bot.js index b159323..bea70d7 100644 --- a/src/api/bot/bot.js +++ b/src/api/bot/bot.js @@ -108,3 +108,12 @@ export const getBotPublic = () => { method: 'get', }) } + +//BulkUpload +export const bulkCreateBot = (data) => { + return service({ + url: '/bt/bulkBot', + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/api/goods/teacherVip.js b/src/api/goods/teacherVip.js index a4ce514..268731a 100644 --- a/src/api/goods/teacherVip.js +++ b/src/api/goods/teacherVip.js @@ -37,3 +37,12 @@ export const detail = (params) => { params }) } + +// 批量更新价格 +export const batchUpdatePrice = (data) => { + return service({ + url: '/app_user/teacher_vip/price', + method: 'put', + data + }) +} diff --git a/src/api/user/index.js b/src/api/user/index.js index 9a6bd12..87f561f 100644 --- a/src/api/user/index.js +++ b/src/api/user/index.js @@ -16,7 +16,7 @@ export const list = (params) => { // /app_user/status/:id export const status = (data) => { return service({ - url: '/app_user/status/'+ data.ID, + url: '/app_user/status/' + data.ID, method: 'put', data }) @@ -103,4 +103,23 @@ export const getVipUserList = (params) => { method: 'get', params }) -} \ No newline at end of file +} + +// setTeacherWeight 设置讲师权重 +export const setTeacherWeight = (data) => { + return service({ + url: '/app_user/weight', + method: 'put', + data + }) +} + +// setTeacherRate 设置讲师分成比例 +export const setTeacherRate = (data) => { + return service({ + url: '/app_user/rate', + method: 'put', + data + }) +} + diff --git a/src/assets/bot_logo.png b/src/assets/bot_logo.png index b5ea9a6..4fbf9fc 100644 Binary files a/src/assets/bot_logo.png and b/src/assets/bot_logo.png differ diff --git a/src/components/richtext/rich-edit.vue b/src/components/richtext/rich-edit.vue index 5308ddc..d080c1b 100644 --- a/src/components/richtext/rich-edit.vue +++ b/src/components/richtext/rich-edit.vue @@ -58,7 +58,7 @@ const userStore = useUserStore() const toolbarConfig = {} - + // 创建自定义上传函数,直接检查当前 props 值 const createCustomUpload = () => { return async (file, insertFn) => { @@ -66,13 +66,13 @@ const shouldUseWatermark = props.useWatermark console.log('customUpload called, useWatermark:', shouldUseWatermark) console.log('props.useWatermark:', props.useWatermark) - + // 未开启水印则直接上传原图 if (!shouldUseWatermark) { const formData = new FormData() formData.append('file', file) - const resp = await fetch(basePath + '/fileUploadAndDownload/upload?noSave=1', { - method: 'POST', + const resp = await fetch(basePath + '/fileUploadAndDownload/upload?noSave=1', { + method: 'POST', body: formData, headers: { 'x-token': userStore.token, @@ -93,7 +93,7 @@ const watermarkedBlob = await addBottomWatermark(file, { stripRatio: 0.18, // 水印条高度占原图高度比例 background: 'rgba(255,255,255,0.96)', - text: '老陈机器人', + text: '好运助手', textColor: '#333', fontFamily: 'PingFang SC, Microsoft YaHei, Arial', logo: botLogo @@ -181,7 +181,7 @@ const handleCreated = (editor) => { editorRef.value = editor valueHtml.value = props.modelValue - + // 动态更新上传配置 if (editor && editor.getConfig) { const config = editor.getConfig() @@ -197,7 +197,7 @@ // 确保整个编辑器区域都可以点击 editorContainer.style.cursor = 'text' editorContainer.style.minHeight = '300px' - + // 添加点击事件监听器 editorContainer.addEventListener('click', (e) => { if (e.target === editorContainer) { @@ -366,4 +366,4 @@ min-height: 300px !important; cursor: text !important; } - \ No newline at end of file + diff --git a/src/config.js b/src/config.js index 198c772..d93a817 100644 --- a/src/config.js +++ b/src/config.js @@ -578,6 +578,14 @@ export const ARTICLE_TABLE_CONFIG = { }, slot: 'UpdatedAt' }, + { + attrs: { + label: '发布状态', + prop: 'status', + align: 'center' + }, + slot: 'status' + }, { attrs: { label: '操作', diff --git a/src/pathInfo.json b/src/pathInfo.json index 23ba649..5e722ae 100644 --- a/src/pathInfo.json +++ b/src/pathInfo.json @@ -3,6 +3,7 @@ "/src/view/banner/index.vue": "Index", "/src/view/bot/bot/bot.vue": "Bot", "/src/view/bot/bot/botForm.vue": "BotForm", + "/src/view/bot/bot/bulkBot.vue": "BotBulk", "/src/view/category/category/category.vue": "Category", "/src/view/category/category/categoryForm.vue": "CategoryForm", "/src/view/cdk/cdkManage.vue": "CdkManage", @@ -25,6 +26,7 @@ "/src/view/example/index.vue": "Example", "/src/view/example/upload/scanUpload.vue": "scanUpload", "/src/view/example/upload/upload.vue": "Upload", + "/src/view/goods/article/bulkUpload.vue": "BulkUpload", "/src/view/goods/article/edit.vue": "Edit", "/src/view/goods/article/index.vue": "Index", "/src/view/goods/index.vue": "goods", @@ -96,6 +98,7 @@ "/src/view/user/user/index.vue": "Index", "/src/view/user/user/loginLog.vue": "LoginLog", "/src/view/user/user/teacherApply.vue": "TeacherApply", + "/src/view/user/user/teacherManger.vue": "TeacherManagement", "/src/view/user/user/vipUser.vue": "VipUser", "/src/view/user/user/with.vue": "WithdrawManagement", "/src/plugin/announcement/form/info.vue": "InfoForm", diff --git a/src/router/index.js b/src/router/index.js index 4181603..dbb799b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -5,6 +5,15 @@ const routes = [ path: '/', redirect: '/login' }, + { + path: '/bot/bulk', + name: 'BotBulk', + meta: { + title: '批量新增机器人', + keepAlive: true + }, + component: () => import('@/view/bot/bot/bulkBot.vue') + }, { path: '/init', name: 'Init', diff --git a/src/view/bot/bot/bot.vue b/src/view/bot/bot/bot.vue index e4f6474..e380113 100644 --- a/src/view/bot/bot/bot.vue +++ b/src/view/bot/bot/bot.vue @@ -33,6 +33,7 @@