diff --git a/app/api/goods/index.js b/app/api/goods/index.js index 99c537d..9760a4d 100644 --- a/app/api/goods/index.js +++ b/app/api/goods/index.js @@ -30,3 +30,11 @@ export async function userArtworks(data) { data }) } +export async function userArtwork(data) { + + return await request( { + url:'/api/v1/m/user/artwork', + method: 'POST', + data + }) +} \ No newline at end of file diff --git a/app/components/x-message/index.vue b/app/components/x-message/index.vue index cd38213..0073f47 100644 --- a/app/components/x-message/index.vue +++ b/app/components/x-message/index.vue @@ -1,21 +1,65 @@ @@ -26,9 +70,12 @@ defineExpose({ showMessage }) > diff --git a/app/components/x-message/message/index.vue b/app/components/x-message/message/index.vue index 2b7b9fa..c28f333 100644 --- a/app/components/x-message/message/index.vue +++ b/app/components/x-message/message/index.vue @@ -7,13 +7,36 @@ import warning from '../images/warning.png' const props = defineProps({ type: { type: String, - default: 'success', - validator: value => ['success', 'error', 'warning'].includes(value), + default: 'success' }, - text: { + message: { type: String, - default: '', + default: '' }, + title: { + type: Object, + default: () => ({ + text: '', + color: '', + align: 'left' + }) + }, + subTitle: { + type: Object, + default: () => ({ + text: '', + color: '', + align: 'left' + }) + }, + showIcon: { + type: Boolean, + default: true + }, + customStyle: { + type: Object, + default: () => ({}) + } }) const typeConfig = { @@ -24,34 +47,64 @@ const typeConfig = { }, error: { imgSrc: error, - borderColor: '#F3CBD3', - bgColor: '#FBEEF1', + borderColor: '#FFD4D4', + bgColor: '#FFF0F0', }, warning: { imgSrc: warning, - borderColor: '#FAE0B5', - bgColor: '#FEF7ED', - }, + borderColor: '#FFE2BA', + bgColor: '#FFF7EC', + } } diff --git a/app/components/x-message/useMessage.js b/app/components/x-message/useMessage.js index 10eed19..da23492 100644 --- a/app/components/x-message/useMessage.js +++ b/app/components/x-message/useMessage.js @@ -2,22 +2,46 @@ import { createApp, nextTick } from 'vue' import MessagePopup from './index.vue' const message = { - success(text, duration = 2000) { + success(options, duration = 2000) { if (process.client) { - this.show({ type: 'success', message: text, duration }) + if (typeof options === 'string') { + this.show({ type: 'success', message: options, duration }) + } else { + this.show({ + type: 'success', + ...options, + duration + }) + } } }, - error(text, duration = 2000) { + error(options, duration = 2000) { if (process.client) { - this.show({ type: 'error', message: text, duration }) + if (typeof options === 'string') { + this.show({ type: 'error', message: options, duration }) + } else { + this.show({ + type: 'error', + ...options, + duration + }) + } } }, - warning(text, duration = 2000) { + warning(options, duration = 2000) { if (process.client) { - this.show({ type: 'warning', message: text, duration }) + if (typeof options === 'string') { + this.show({ type: 'warning', message: options, duration }) + } else { + this.show({ + type: 'warning', + ...options, + duration + }) + } } }, - show({ type = 'success', message, duration = 2000 }) { + show(options) { if (!process.client) return const container = document.createElement('div') @@ -32,11 +56,7 @@ const message = { const instance = app.mount(container) nextTick(() => { - instance.showMessage?.({ - type, - message, - duration - }) + instance.showMessage?.(options) }) } } diff --git a/app/pages/artDetail/index.vue b/app/pages/artDetail/index.vue new file mode 100644 index 0000000..266f7fd --- /dev/null +++ b/app/pages/artDetail/index.vue @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/app/pages/home/index.vue b/app/pages/home/index.vue index 117ba2e..aa35bef 100644 --- a/app/pages/home/index.vue +++ b/app/pages/home/index.vue @@ -3,6 +3,7 @@ import liveRoom from '@/pages/liveRoom/index.client.vue'; import {goodStore} from "@/stores/goods/index.js"; import ItemList from './components/ItemList/index.vue' import Cescribe from './components/Cescribe/index.vue' +import {message} from '@/components/x-message/useMessage.js' const {fullLive,getAuctionDetail,auctionDetail} = goodStore(); const changeLive = () => { fullLive.value = true; diff --git a/app/pages/liveRoom/components/Broadcast/index.vue b/app/pages/liveRoom/components/Broadcast/index.vue index 0b8e46b..7c04913 100644 --- a/app/pages/liveRoom/components/Broadcast/index.vue +++ b/app/pages/liveRoom/components/Broadcast/index.vue @@ -65,10 +65,10 @@ onUnmounted(() => {