From b4e4b9d5a7861e97832c883c5fa3a6ae2a82a8a0 Mon Sep 17 00:00:00 2001 From: Double-_-Z <2492419643@qq.com> Date: Tue, 10 Dec 2024 10:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/http.api.js | 9 +- pages/mobile_web/home/home.vue | 18 +- pages/mobile_web/workshops/common/imgDeal.js | 3 + .../workshops/components/editor.vue | 22 +- pages/mobile_web/workshops/index.vue | 276 ++++++++++++++++-- uview-ui/components/u-tag/u-tag.vue | 2 +- 6 files changed, 286 insertions(+), 44 deletions(-) diff --git a/common/http.api.js b/common/http.api.js index 88950c5..722ba54 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -6,6 +6,9 @@ const install = (Vue, vm) => { vm.$api.login = async (params = {}) => await vm.$u.get('/acUser/phoneLogin', params);// 手机号登录 vm.$api.register = async (params = {}) => await vm.$u.get('/acUser/phoneRegister', params);// 手机号注册 + // 图片管理 + vm.$api.getCpPhotoById = async (params = {}) => await vm.$u.get('/cpPhoto/all', params);// 根据标签id查询全部图片 + // 应用服务 vm.$api.allServices = async (params = {}) => await vm.$u.get('/paServices/all', params);// 获取全部应用 vm.$api.singleServices = async (id) => await vm.$u.get(`/paServices/${id}`);// 获取单个应用 @@ -13,12 +16,6 @@ const install = (Vue, vm) => { // 留言板 vm.$api.addMessage = async (params = {}) => await vm.$u.post('/cpMessage', params);// 添加留言 - // 百度ai调用 - vm.$api.colouRize = async (params = {}) => await vm.$u.post('/AiPicture/Colourize', params);// 旧照修复 - vm.$api.selfieAnime = async (params = {}) => await vm.$u.post('/AiPicture/selfie_anime', params);// 人像动漫化 - - // 火山引擎ai接口 - vm.$api.imageDeal = async (params = {},Action,Version) => await vm.$u.post(configService.aiUrl+`?Action=${Action}&Version=${Version}`, params);// 图片处理统一接口 } export default { diff --git a/pages/mobile_web/home/home.vue b/pages/mobile_web/home/home.vue index 033833f..b58c8d1 100644 --- a/pages/mobile_web/home/home.vue +++ b/pages/mobile_web/home/home.vue @@ -32,9 +32,9 @@ @@ -393,17 +393,23 @@ export default { height: auto; display: flex; justify-content: start; - flex-flow: wrap; .category-item{ + max-width: 20%; display: flex; flex-direction: column; align-items: center; padding: 0 12rpx; - color: #fff; - font-size: 28rpx; &:active{ filter: opacity(0.8); } + view{ + width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: #fff; + font-size: 25rpx; + } image{ width: 110rpx; height: 60rpx; diff --git a/pages/mobile_web/workshops/common/imgDeal.js b/pages/mobile_web/workshops/common/imgDeal.js index 47f1606..1aad6c1 100644 --- a/pages/mobile_web/workshops/common/imgDeal.js +++ b/pages/mobile_web/workshops/common/imgDeal.js @@ -4,6 +4,9 @@ import configService from "@/common/config.service"; const selectDealFunction = (vm,model,params,success) => { switch(model){ case 0 : + case 1 : + case 2 : + case 3 : diagramOfTheSketch(vm,params,success); break; }; diff --git a/pages/mobile_web/workshops/components/editor.vue b/pages/mobile_web/workshops/components/editor.vue index af68b4f..bf82dad 100644 --- a/pages/mobile_web/workshops/components/editor.vue +++ b/pages/mobile_web/workshops/components/editor.vue @@ -7,9 +7,9 @@ - + @@ -17,6 +17,10 @@ @@ -404,6 +550,12 @@ export default { display: flex; flex-direction: column; margin: 15rpx 100rpx; + .mwu-promt{ + height: 100rpx; + margin-top: 120rpx; + display: flex; + align-items: center; + } .mwu-cover{ width: 100%; height: 550rpx; @@ -451,7 +603,7 @@ export default { } } .mw-editor{ - margin: 12rpx 46rpx; + margin: 50rpx 46rpx 12rpx; display: flex; flex-direction: column; .slot{ @@ -459,6 +611,32 @@ export default { font-size: 32rpx; font-weight: bold; } + .section-options{ + margin-top: 40rpx; + display: grid; + grid-gap: 30rpx; + grid-template-columns: repeat(3,1fr); + + .u-tag{ + width: 200rpx; + height: 80rpx; + font-size: 28rpx; + display: flex; + color: rgba(41,121,255,0.6); + background-color: rgba(236,245,255,0.8); + align-items: center; + justify-content: center; + + &:active{ + opacity: 0.8; + } + } + .u-tag-select{ + box-shadow: 0 0 15rpx #eee; + color: #2979ff; + background-color: rgba(236,245,255,1); + } + } } .workshops-tip{ margin-top: 70rpx; @@ -507,6 +685,50 @@ export default { } } } +.options-popup{ + .op-content{ + background-color: #2D3240; + padding: 10rpx 25rpx; + display: flex; + flex-direction: column; + .op-top{ + height: 80rpx; + display: flex; + align-items: center; + } + .options-list{ + height: 800rpx; + color: #a7b6b8; + width: 100%; + margin-top: 20rpx; + .section-options{ + display: grid; + grid-gap: 30rpx; + grid-template-columns: repeat(3,1fr); + + .u-tag{ + width: 200rpx; + height: 80rpx; + font-size: 28rpx; + display: flex; + color: rgba(41,121,255,0.6); + background-color: rgba(236,245,255,0.8); + align-items: center; + justify-content: center; + + &:active{ + opacity: 0.8; + } + } + .u-tag-select{ + box-shadow: 0 0 15rpx #eee; + color: #2979ff; + background-color: rgba(236,245,255,1); + } + } + } + } +} @keyframes fadeIn { from { opacity: 0; diff --git a/uview-ui/components/u-tag/u-tag.vue b/uview-ui/components/u-tag/u-tag.vue index 90ec3f4..4746c67 100644 --- a/uview-ui/components/u-tag/u-tag.vue +++ b/uview-ui/components/u-tag/u-tag.vue @@ -114,7 +114,7 @@ // 文字颜色(如果有此值,会覆盖type值的颜色) if(this.color) style.color = this.color; // tag的背景颜色(如果有此值,会覆盖type值的颜色) - if(this.bgColor) style.backgroundColor = this.bgColor; + if(this.bgColor) style.background = this.bgColor; // 如果是镂空型tag,没有传递边框颜色(borderColor)的话,使用文字的颜色(color属性) if(this.mode == 'plain' && this.color && !this.borderColor) style.borderColor = this.color; else style.borderColor = this.borderColor;