优化已知问题

This commit is contained in:
2025-03-15 16:37:11 +08:00
parent abb9a4dbe7
commit 287ceacaf3
19 changed files with 279 additions and 123 deletions

View File

@@ -68,7 +68,7 @@ export async function updateCmsWebsite(data: CmsWebsite) {
*/ */
export async function updateCmsWebsiteAll(data: CmsWebsite) { export async function updateCmsWebsiteAll(data: CmsWebsite) {
const res = await request.put<ApiResult<unknown>>( const res = await request.put<ApiResult<unknown>>(
'http://127.0.0.1:9002/api/cms/cms-website/updateAll', '/cms/cms-website/updateAll',
data data
); );
if (res.code === 0) { if (res.code === 0) {

View File

@@ -46,7 +46,6 @@ export async function updateUser(data: User){
return res.message ?? '修改成功'; return res.message ?? '修改成功';
} }
return Promise.reject(new Error(res.message)); return Promise.reject(new Error(res.message));
} }
/** /**

View File

@@ -1,7 +1,5 @@
<template> <template>
<!-- 下单定制 -->
<Customized />
<!-- 底部菜单 --> <!-- 底部菜单 -->
<SubMenu /> <SubMenu />
<!-- 版权信息 --> <!-- 版权信息 -->

View File

@@ -0,0 +1,109 @@
<template>
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
<div class="text-center flex flex-col items-center z-0 relative">
<h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
{{ title || '客户案例' }}
</h2>
<div class="sub-title">
<p class="text-gray-400 text-sm dark:text-gray-400 py-3">
{{ comments || '推荐的代表性客户案例' }}
</p>
</div>
</div>
<el-row id="container" :gutter="24" class="clearfix">
<el-col v-for="(item,index) in list" :key="index" :span="6" :xs="24" class="left mb-8">
<el-card :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" shadow="hover" @click="navigateTo(`/detail/${item.articleId}`)">
<el-image
:lazy="true"
:src="item.image"
class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50" fit="cover"/>
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col gap-1.5">
<div class="text-xl cursor-pointer items-center line-clamp-1">
{{ item.title }}
</div>
</div>
<div class="flex items-center gap-1.5 py-2 text-gray-500 justify-between">
<div class="text-gray-500 line-clamp-2">{{ item.comments }}</div>
</div>
<div class="button-group flex justify-between items-center mt-3 text-sm">
<el-space class="flex items-end">
<div class="text-gray-400 gap-1 flex items-center"><el-icon><View /></el-icon><span>{{ getViews(item) }}</span></div>
</el-space>
<div class="text-gray-400">
<el-avatar v-if="item.avatar" :src="`${item.avatar}`" size="small" />
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
</div>
<div v-if="disabled" class="px-1 text-center text-gray-500 min-h-xs">
没有更多了
</div>
</template>
<script lang="ts" setup>
import {navigateTo} from "#imports";
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
import { ArrowLeft,View, Search } from '@element-plus/icons-vue'
import {pageCmsArticle} from "~/api/cms/cmsArticle";
import dayjs from "dayjs";
import type {CmsArticle, CmsArticleParam} from "~/api/cms/cmsArticle/model";
const props = withDefaults(
defineProps<{
param?: CmsWebsiteParam | any;
disabled?: boolean;
title?: string;
comments?: string;
fit?: any;
}>(),
{
fit: 'cover'
}
);
const emit = defineEmits<{
(e: 'done'): void;
}>();
const list = ref<CmsArticle[]>([]);
const id = ref<number>(0);
const i18n = useI18n();
const total = ref(0);
const showMenu = (item: CmsWebsite) => {
id.value = Number(item.websiteId);
};
const hideMenu = () => {
id.value = 0;
};
// 搜索表单
const where = reactive<CmsArticleParam>({
keywords: '',
page: 1,
limit: 12,
status: 0,
recommend: 1,
order: 'desc',
sort: 'actualViews',
parentId: undefined,
categoryId: 2838
});
// 请求数据
const reload = async () => {
pageCmsArticle(where).then(response => {
if(response){
total.value = response.count;
list.value = response.list;
}
})
}
reload();
</script>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0"> <div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
<div class="text-center flex flex-col items-center z-0 relative"> <div class="text-center flex flex-col items-center z-0 relative">
<h2 class="text-4xl font-bold tracking-tight text-gray-500 dark:text-white"> <h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
{{ title || '合作伙伴' }} {{ title || '合作伙伴' }}
</h2> </h2>
<div class="sub-title"> <div class="sub-title">

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0"> <div class="xl:w-screen-xl m-auto py-4 px-4 sm:px-0">
<div class="text-center flex flex-col items-center z-0 relative"> <div class="text-center flex flex-col items-center z-0 relative">
<h2 class="text-4xl font-bold tracking-tight text-gray-500 dark:text-white"> <h2 class="text-4xl font-bold tracking-tight text-gray-800 dark:text-white">
{{ title || '产品服务' }} {{ title || '产品服务' }}
</h2> </h2>
<div class="sub-title"> <div class="sub-title">
@@ -15,16 +15,16 @@
<el-card :body-style="{ padding: '0px' }" class="h-[180px] items-center flex justify-center" shadow="hover" @mouseleave="hideMenu" @mouseover="showMenu(item)"> <el-card :body-style="{ padding: '0px' }" class="h-[180px] items-center flex justify-center" shadow="hover" @mouseleave="hideMenu" @mouseover="showMenu(item)">
<div class="flex-1 px-4 py-5 sm:p-4 !p-4"> <div class="flex-1 px-4 py-5 sm:p-4 !p-4">
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col items-center gap-1.5"> <div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col items-center gap-1.5">
<nuxt-link :to="`https://${item.adminUrl}`" target="_blank"> <nuxt-link :to="`/market/${item.websiteId}`" target="_blank">
<el-avatar <el-avatar
:size="55" :src="item.websiteLogo" shape="square" style="background-color: white;"/> :size="55" :src="item.websiteLogo" shape="square" style="background-color: white;"/>
</nuxt-link> </nuxt-link>
<div class="flex-1 cursor-pointer flex flex-col text-center"> <div class="flex-1 cursor-pointer flex flex-col text-center">
<nuxt-link :to="`https://${item.adminUrl}`" class="text-lg" target="_blank">{{ item.websiteName }}</nuxt-link> <nuxt-link :to="`/market/${item.websiteId}`" target="_blank">
<el-button type="text"><span class="text-lg text-gray-800">{{ item.websiteName }}</span></el-button>
</nuxt-link>
<div v-if="id == item.websiteId" class="flex text-gray-400 text-sm font-normal py2 justify-between items-center"> <div v-if="id == item.websiteId" class="flex text-gray-400 text-sm font-normal py2 justify-between items-center">
<div> <div>
<nuxt-link :to="`https://${item.adminUrl}`" target="_blank"><span class="text-gray-400 hover:text-green-700">控制台</span></nuxt-link>
<el-divider direction="vertical" />
<nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">详情</span></nuxt-link> <nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">详情</span></nuxt-link>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">评论</span></nuxt-link> <nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">评论</span></nuxt-link>

View File

@@ -6,20 +6,20 @@
<template #content> <template #content>
<span class="text-large font-600 line-clamp-1"> 发布文章 </span> <span class="text-large font-600 line-clamp-1"> 发布文章 </span>
</template> </template>
<div class="my-5 sm:my-10"> <div class="my-5 sm:my-10">
<el-form :model="form" label-width="auto" size="large"> <el-form ref="formRef" :model="form" :rules="rules" label-width="auto" size="large">
<el-form-item label-position="left" label-width="0"> <el-form-item label-position="left" label-width="0" prop="title">
<el-input v-model="form.title" placeholder="文章标题"/> <el-input v-model="form.title" :maxlength="100" placeholder="文章标题"/>
</el-form-item> </el-form-item>
<el-form-item label-position="left" label-width="0"> <el-form-item label-position="left" label-width="0" prop="content">
<!-- 编辑器 --> <!-- 编辑器 -->
<MdEditor v-model="form.content" @onUploadImg="onUploadImg"/> <MdEditor v-model="form.content" placeholder="请填写文章内容" @onUploadImg="onUploadImg"/>
</el-form-item> </el-form-item>
<el-form-item label="关联栏目" label-position="left"> <el-form-item label="关联栏目" label-position="left">
<el-switch v-model="hasCategory" /> <el-switch v-model="hasCategory"/>
<div v-if="hasCategory" class="mx-5"> <div v-if="hasCategory" class="mx-5">
<el-cascader v-model="category" :options="categoryList" placeholder="选项关联的栏目" @change="handleCategory" /> <el-cascader v-model="category" :options="categoryList" placeholder="选项关联的栏目"
@change="handleCategory"/>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="选择话题" label-position="left"> <el-form-item label="选择话题" label-position="left">
@@ -38,22 +38,15 @@
</el-select> </el-select>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label-position="left" label-width="0"> <el-form-item label="保存操作" label-position="left">
<div class="m-auto text-center flex justify-center text-center items-center">
<el-button size="large" @click="saveDraft">存草稿</el-button> <el-button size="large" @click="saveDraft">存草稿</el-button>
<el-button class="sm:w-auto w-full" size="large" type="primary" @click="onRelease">发布</el-button> <el-button class="sm:w-auto" size="large" type="primary" @click="onRelease(formRef)">立即发布
</div> </el-button>
</el-form-item> </el-form-item>
<div class="flex flex-col">
<el-form-item class="my-4" label-position="left">
</el-form-item>
</div>
</el-form> </el-form>
<div class="h-[20px]"></div>
<el-divider />
</div> </div>
</el-page-header> </el-page-header>
</div> </div>
@@ -66,14 +59,15 @@ import {MdEditor} from 'md-editor-v3';
import 'md-editor-v3/lib/style.css'; import 'md-editor-v3/lib/style.css';
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model"; import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
import {addCmsArticle, pageCmsArticle, updateCmsArticle} from "~/api/cms/cmsArticle"; import {addCmsArticle, pageCmsArticle, updateCmsArticle} from "~/api/cms/cmsArticle";
import type {UploadUserFile} from 'element-plus'
import useFormData from "~/utils/use-form-data"; import useFormData from "~/utils/use-form-data";
import {uploadOss} from "~/api/system/file"; import {uploadOss} from "~/api/system/file";
import type {FormInstance, FormRules, UploadProps, UploadUserFile} from 'element-plus'
import {updateCmsWebsiteAll} from "~/api/cms/cmsWebsite"; import {updateCmsWebsiteAll} from "~/api/cms/cmsWebsite";
import {addShopMerchantApply, updateShopMerchantApply} from "~/api/shop/shopMerchantApply"; import {addShopMerchantApply, updateShopMerchantApply} from "~/api/shop/shopMerchantApply";
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model"; import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
import {listDictData} from "~/api/system/dict-data"; import {listDictData} from "~/api/system/dict-data";
import {getLang} from "~/utils/common"; import {getLang} from "~/utils/common";
import type {ShopMerchantApply} from "~/api/shop/shopMerchantApply/model";
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@@ -92,6 +86,7 @@ const srcList = ref<string[]>([])
const inputWidth = ref<string>('180px'); const inputWidth = ref<string>('180px');
const showSearch = ref<boolean>(false); const showSearch = ref<boolean>(false);
const loading = ref(false) const loading = ref(false)
const formRef = ref<FormInstance>()
// 搜索表单 // 搜索表单
const where = reactive<CmsWebsiteParam>({ const where = reactive<CmsWebsiteParam>({
@@ -188,6 +183,17 @@ const {form, assignFields} = useFormData<CmsArticle>({
detail: undefined detail: undefined
}); });
const rules = reactive<FormRules<CmsArticle>>({
title: [
{required: true, message: '请输入文章标题', trigger: 'blur'},
{min: 5, message: '标题长度太短啦', trigger: 'blur'},
],
content: [
{required: true, message: '请输入手机号码', trigger: 'blur'},
{pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur'},
]
})
const goBack = () => { const goBack = () => {
router.back(); router.back();
} }
@@ -259,9 +265,12 @@ const saveDraft = () => {
} }
const onRelease = () => { // 发布文章
const onRelease = async (formEl: FormInstance | undefined) => {
if (!formEl) return;
if (loading.value) return // 防止重复提交 if (loading.value) return // 防止重复提交
await formEl.validate(async (valid) => {
if (!valid) return;
form.files = undefined; form.files = undefined;
if (srcList.value.length > 0) { if (srcList.value.length > 0) {
form.files = JSON.stringify(srcList.value) form.files = JSON.stringify(srcList.value)
@@ -273,9 +282,14 @@ const onRelease = () => {
loading.value = true loading.value = true
const saveOrUpdate = isUpdate.value ? updateCmsArticle : addCmsArticle; const saveOrUpdate = isUpdate.value ? updateCmsArticle : addCmsArticle;
saveOrUpdate(form).then(() => { saveOrUpdate(form).then(() => {
assignFields({});
ElMessage.success('发布成功'); ElMessage.success('发布成功');
loading.value = false;
}).catch((err => {
console.log(err)
loading.value = false;
}));
}); });
} }
watch( watch(

View File

@@ -1,13 +1,13 @@
<template> <template>
<!-- 主体部分 --> <!-- 主体部分 -->
<div class="xl:w-screen-xl m-auto py-4 mt-20"> <div class="xl:w-screen-xl m-auto py-4 mt-12 px-4 sm:px-0 sm:mt-20">
<el-page-header :icon="ArrowLeft" @back="goBack"> <el-page-header :icon="ArrowLeft" @back="goBack">
<template #content> <template #content>
<span class="text-large font-600"> {{ page.title }} </span> <span class="text-large font-600"> {{ page.title }} </span>
</template> </template>
<el-row :gutter="24" id="container" class="clearfix"> <el-row :gutter="24" id="container" class="clearfix">
<el-col v-for="(item,index) in list" :key="index" :span="6" class="left mb-8"> <el-col v-for="(item,index) in list" :key="index" :span="6" :xs="24" class="left mb-8">
<el-card :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" shadow="hover" @click="navigateTo(`/detail/${item.articleId}.html`)"> <el-card :body-style="{ padding: '0px' }" class=" hover:bg-gray-50 cursor-pointer" shadow="hover" @click="navigateTo(`/detail/${item.articleId}.html`)">
<el-image <el-image
:src="item.image" :src="item.image"

View File

@@ -35,7 +35,7 @@
</el-dialog> </el-dialog>
</template> </template>
<el-row :gutter="24" id="container" class="clearfix"> <el-row :gutter="24" id="container" class="clearfix">
<el-col v-for="(item,index) in list" :key="index" :xs="24" :sm="8" class="left mb-8"> <el-col v-for="(item,index) in list" :key="index" :span="6" :xs="24" class="left mb-8">
<el-card shadow="hover" :body-style="{ padding: '0px' }" class="cursor-pointer" @mouseover="showDomain(item)" <el-card shadow="hover" :body-style="{ padding: '0px' }" class="cursor-pointer" @mouseover="showDomain(item)"
@mouseleave="hideDomain"> @mouseleave="hideDomain">
<nuxt-link :to="`/market/${item.websiteId}`"> <nuxt-link :to="`/market/${item.websiteId}`">

View File

@@ -11,8 +11,8 @@
<!-- 新闻详细 --> <!-- 新闻详细 -->
<div class=" bg-white"> <div class=" bg-white">
<h1 class="pt-5 text-3xl">{{ form.title }}</h1> <h1 class="pt-5 text-3xl text-center">{{ form.title }}</h1>
<div class="flex items-center justify-between py-4"> <div class="flex items-center justify-center py-4">
<el-space size="large" class="text-gray-400"> <el-space size="large" class="text-gray-400">
<span>{{ $t('createTime') }}{{ dayjs(form.createTime).format('YYYY-MM-DD') }}</span> <span>{{ $t('createTime') }}{{ dayjs(form.createTime).format('YYYY-MM-DD') }}</span>
<span>{{ $t('author') }}{{ form.author }}</span> <span>{{ $t('author') }}{{ form.author }}</span>

View File

@@ -10,13 +10,14 @@
</el-space> </el-space>
</template> </template>
<template v-if="!isDeveloper"> <template v-if="!isDeveloper">
<el-card class="m-5 w-screen-sm mt-24 mb-[200px] m-auto"> <el-card class="m-5 w-screen-sm mt-24 mb-[200px] m-auto flex justify-center text-center">
<el-result <el-result
icon="warning" icon="warning"
title="您还不是开发者!" :sub-title="`审核通过后可管理您的应用`"
:sub-title="`请先完成实名认证`" title="请先完成实名认证"
> >
</el-result> </el-result>
<nuxt-link to="/user/auth"><el-button type="primary">加入开发者</el-button></nuxt-link>
</el-card> </el-card>
</template> </template>
<template v-else> <template v-else>

View File

@@ -7,13 +7,19 @@
<LandingHero/> <LandingHero/>
<!-- 站点列表 --> <!-- 站点列表 -->
<SiteList /> <SiteList/>
<!-- 插件列表 --> <!-- 插件列表 -->
<!-- <MarketList />--> <!-- <MarketList />-->
<!-- 客户案例 -->
<CaseList/>
<!-- 合作伙伴 --> <!-- 合作伙伴 -->
<Partners /> <Partners/>
<!-- 下单定制 -->
<Customized />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -32,6 +38,7 @@ import Carousel from "~/components/Index/Carousel.vue";
import LandingHero from "~/components/Index/LandingHero.vue"; import LandingHero from "~/components/Index/LandingHero.vue";
import SiteList from "~/components/Index/SiteList.vue"; import SiteList from "~/components/Index/SiteList.vue";
import MarketList from "~/components/Index/MarketList.vue"; import MarketList from "~/components/Index/MarketList.vue";
import CaseList from "~/components/Index/CaseList.vue"
import Partners from "~/components/Index/Partners.vue"; import Partners from "~/components/Index/Partners.vue";
import Customized from "~/components/Index/Customized.vue"; import Customized from "~/components/Index/Customized.vue";

View File

@@ -6,40 +6,39 @@
<span class="text-large font-600"> 产品详情 </span> <span class="text-large font-600"> 产品详情 </span>
</template> </template>
<template #extra> <template #extra>
<div class="h-[32px]"></div>
</template> </template>
<!-- 应用介绍 --> <!-- 应用介绍 -->
<PageBanner :form="page" @done="reload"/> <PageBanner :form="page" @done="reload"/>
<!-- 评分插件 --> <!-- 评分插件 -->
<AppInfo :form="form" /> <AppInfo :form="form"/>
<!-- 应用截屏 --> <!-- 应用截屏 -->
<div id="screen-item" class="screen-item my-6"> <div id="screen-item" class="screen-item my-6">
<el-descriptions title="截屏" class="mt-5" /> <el-descriptions class="mt-5" title="截屏"/>
<el-scrollbar class="bg-white p-5"> <el-scrollbar class="bg-white p-5">
<div class="flex" v-if="form.files"> <div v-if="form.files" class="flex">
<el-image <el-image
v-for="(item,index) in JSON.parse(form.files)" v-for="(item,index) in JSON.parse(form.files)"
:key="index" :key="index"
class="scrollbar-item w-[240px] max-h-[625px] mr-4 mb-3" :initial-index="4"
:src="item"
:zoom-rate="1.2"
:max-scale="7" :max-scale="7"
:min-scale="0.2" :min-scale="0.2"
:preview-src-list="srcList" :preview-src-list="srcList"
:initial-index="4" :src="item"
:zoom-rate="1.2"
class="scrollbar-item w-[240px] max-h-[625px] mr-4 mb-3"
fit="contain" fit="contain"
/> />
</div> </div>
</el-scrollbar> </el-scrollbar>
<el-descriptions title="详细介绍" class="mt-5" /> <el-descriptions class="mt-5" title="详细介绍"/>
<MdPreview id="preview-only" class="px-3" :modelValue="form.content || '暂无详细内容'" /> <MdPreview id="preview-only" :modelValue="form.content || '暂无详细内容'" class="px-3"/>
</div> </div>
<!-- 评分及评价 --> <!-- 评分及评价 -->
<Comments :productId="form.companyId" :comments="comments" :count="commentsTotal" @done="doComments" /> <Comments :comments="comments" :count="commentsTotal" :productId="form.companyId" @done="doComments"/>
<div class="h-[100px]"></div> <div class="h-[100px]"></div>
@@ -47,7 +46,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ArrowLeft,View, Monitor, Search,Cpu, Platform, Avatar } from '@element-plus/icons-vue' import {ArrowLeft, View, Monitor, Search, Cpu, Platform, Avatar, MoreFilled} from '@element-plus/icons-vue'
import type {ApiResult, PageResult} from "~/api"; import type {ApiResult, PageResult} from "~/api";
import {useServerRequest} from "~/composables/useServerRequest"; import {useServerRequest} from "~/composables/useServerRequest";
import {usePage} from "~/composables/configState"; import {usePage} from "~/composables/configState";
@@ -59,13 +58,14 @@ import Comments from './components/Comments.vue';
import type {CompanyComment} from "~/api/system/companyComment/model"; import type {CompanyComment} from "~/api/system/companyComment/model";
import {getCmsWebsiteAll} from "~/api/cms/cmsWebsite"; import {getCmsWebsiteAll} from "~/api/cms/cmsWebsite";
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model"; import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
import { MdPreview } from 'md-editor-v3'; import {MdPreview} from 'md-editor-v3';
// preview.css相比style.css少了编辑器那部分样式 // preview.css相比style.css少了编辑器那部分样式
import 'md-editor-v3/lib/preview.css'; import 'md-editor-v3/lib/preview.css';
// 引入状态管理 // 引入状态管理
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const user = useUser();
const page = usePage(); const page = usePage();
const comments = ref<CompanyComment[]>([]); const comments = ref<CompanyComment[]>([]);
const commentsTotal = ref(0); const commentsTotal = ref(0);
@@ -194,7 +194,7 @@ const reloadComments = async () => {
// status: 1 // status: 1
} }
}) })
if(commentsResponse.value && commentsResponse.value?.data){ if (commentsResponse.value && commentsResponse.value?.data) {
comments.value = commentsResponse.value?.data?.list comments.value = commentsResponse.value?.data?.list
commentsTotal.value = commentsResponse.value?.data?.count; commentsTotal.value = commentsResponse.value?.data?.count;
} }
@@ -217,7 +217,7 @@ const reload = async () => {
} }
// 应用截图 // 应用截图
if(data.files){ if (data.files) {
const imgArr = JSON.parse(data.files); const imgArr = JSON.parse(data.files);
imgArr.map((item: any) => { imgArr.map((item: any) => {
srcList.value.push(item) srcList.value.push(item)
@@ -232,7 +232,7 @@ const reload = async () => {
}) })
}).catch(err => { }).catch(err => {
console.log(err,'加载失败...') console.log(err, '加载失败...')
}) })
} }
@@ -242,7 +242,7 @@ watch(
navId.value = getNavIdByParamsId(id); navId.value = getNavIdByParamsId(id);
reload(); reload();
}, },
{ immediate: true } {immediate: true}
); );
</script> </script>
@@ -253,9 +253,11 @@ watch(
height: auto !important; height: auto !important;
} }
} }
.scrollbar-flex-content { .scrollbar-flex-content {
display: flex; display: flex;
} }
.scrollbar-item { .scrollbar-item {
flex-shrink: 0; flex-shrink: 0;
display: flex; display: flex;

View File

@@ -8,18 +8,30 @@
<el-image :src="form.websiteLogo" shape="square" <el-image :src="form.websiteLogo" shape="square"
class="hidden-sm-and-down bg-white w-[128px] h-[128px] cursor-pointer rounded-avatar shadow-sm hover:shadow mr-6"/> class="hidden-sm-and-down bg-white w-[128px] h-[128px] cursor-pointer rounded-avatar shadow-sm hover:shadow mr-6"/>
</template> </template>
<div class="title flex flex-col"> <div class="title flex flex-col justify-between">
<div>
<h1 <h1
class="text-2xl font-bold tracking-tight text-gray-900 dark:text-white sm:text-3xl lg:text-3xl"> class="text-2xl font-bold tracking-tight text-gray-900 dark:text-white sm:text-3xl lg:text-3xl">
<el-space> <el-space>
<span>{{ form.websiteName }}</span> <span>{{ form.websiteName }}</span>
</el-space> </el-space>
</h1> </h1>
<div class="my-1 text-sm text-gray-500 w-auto sm:max-w-3xl max-w-xs flex-1 dark:text-gray-400"> <div class="text-sm mt-1 text-gray-500 w-auto sm:max-w-4xl line-clamp-2 max-w-xs dark:text-gray-400">
{{ form?.comments || desc }} {{ form?.comments }}
</div>
</div> </div>
<el-space class="btn"> <el-space class="btn">
<nuxt-link target="_blank"><el-button type="primary" round>获取</el-button></nuxt-link> <nuxt-link v-if="form.domain" :to="`https://${form.domain}`" target="_blank"><el-button round type="primary">访问</el-button></nuxt-link>
<nuxt-link v-if="form.adminUrl" :to="`https://${form.adminUrl}`" target="_blank"><el-button round>管理</el-button></nuxt-link>
<!-- <el-dropdown>-->
<!-- <el-button :icon="MoreFilled" round></el-button>-->
<!-- <template #dropdown>-->
<!-- <el-dropdown-menu>-->
<!-- <el-dropdown-item @click="openUrl(`https://git.websoft.top`)">源码</el-dropdown-item>-->
<!-- <el-dropdown-item divided><nuxt-link to="/developer">编辑</nuxt-link></el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </template>-->
<!-- </el-dropdown>-->
</el-space> </el-space>
</div> </div>
</div> </div>
@@ -33,6 +45,7 @@
import type {ApiResult} from "~/api"; import type {ApiResult} from "~/api";
import type {Company} from "~/api/system/company/model"; import type {Company} from "~/api/system/company/model";
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model"; import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
import {MoreFilled} from "@element-plus/icons-vue";
const token = useToken(); const token = useToken();

View File

@@ -39,6 +39,12 @@
<SearchBar :where="where" id="search" /> <SearchBar :where="where" id="search" />
<!-- 应用列表 --> <!-- 应用列表 -->
<el-tabs>
<el-tab-pane label="全部" name="all">
<el-button :icon="View" class="hidden-sm-and-up" @click="showSearch = true"></el-button>
</el-tab-pane>
</el-tabs>
<el-row :gutter="24" id="container" class="clearfix"> <el-row :gutter="24" id="container" class="clearfix">
<el-col v-for="(item,index) in list" :key="index" :xs="24" :sm="8" class="left mb-8"> <el-col v-for="(item,index) in list" :key="index" :xs="24" :sm="8" class="left mb-8">
<el-card shadow="hover" :body-style="{ padding: '0px' }" class="cursor-pointer" @mouseover="showDomain(item)" <el-card shadow="hover" :body-style="{ padding: '0px' }" class="cursor-pointer" @mouseover="showDomain(item)"

View File

@@ -12,16 +12,16 @@
<el-card :body-style="{ padding: '0px' }" class="h-[180px] items-center flex justify-center" shadow="hover" @mouseleave="hideMenu" @mouseover="showMenu(item)"> <el-card :body-style="{ padding: '0px' }" class="h-[180px] items-center flex justify-center" shadow="hover" @mouseleave="hideMenu" @mouseover="showMenu(item)">
<div class="flex-1 px-4 py-5 sm:p-4 !p-4"> <div class="flex-1 px-4 py-5 sm:p-4 !p-4">
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col items-center gap-1.5"> <div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col items-center gap-1.5">
<nuxt-link :to="`https://${item.adminUrl}`" target="_blank"> <nuxt-link :to="`/market/${item.websiteId}`" target="_blank">
<el-avatar <el-avatar
:size="55" :src="item.websiteLogo" shape="square" style="background-color: white;"/> :size="55" :src="item.websiteLogo" shape="square" style="background-color: white;"/>
</nuxt-link> </nuxt-link>
<div class="flex-1 cursor-pointer flex flex-col text-center"> <div class="flex-1 cursor-pointer flex flex-col text-center">
<nuxt-link :to="`https://${item.adminUrl}`" class="text-lg" target="_blank">{{ item.websiteName }}</nuxt-link> <nuxt-link :to="`/market/${item.websiteId}`" target="_blank">
<el-button type="text"><span class="text-lg text-gray-800">{{ item.websiteName }}</span></el-button>
</nuxt-link>
<div v-if="id == item.websiteId" class="flex text-gray-400 text-sm font-normal py2 justify-between items-center"> <div v-if="id == item.websiteId" class="flex text-gray-400 text-sm font-normal py2 justify-between items-center">
<div> <div>
<nuxt-link :to="`https://${item.adminUrl}`" target="_blank"><span class="text-gray-400 hover:text-green-700">控制台</span></nuxt-link>
<el-divider direction="vertical" />
<nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">详情</span></nuxt-link> <nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">详情</span></nuxt-link>
<el-divider direction="vertical" /> <el-divider direction="vertical" />
<nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">评论</span></nuxt-link> <nuxt-link :to="`/market/${item.websiteId}`"><span class="text-gray-400 hover:text-green-700">评论</span></nuxt-link>

View File

@@ -151,6 +151,7 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
} }
const onSubmit = () => { const onSubmit = () => {
form.tenantId = Number(localStorage.getItem('ServerTenantId'));
updateUser(form).then(() => { updateUser(form).then(() => {
ElMessage.success('修改成功'); ElMessage.success('修改成功');
}); });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 796 B

After

Width:  |  Height:  |  Size: 635 B

View File

@@ -1,11 +1,17 @@
import type { UseFetchOptions } from '#app'; import type { UseFetchOptions } from '#app';
import {useToken} from "~/composables/configState"; import {useToken} from "~/composables/configState";
import {getTenantId} from "~/utils/domain";
export const request = <T>(url:string, options?: UseFetchOptions<T, unknown>) => { export const request = <T>(url:string, options?: UseFetchOptions<T, unknown>) => {
const nuxtApp = useNuxtApp() const nuxtApp = useNuxtApp()
const config = useRuntimeConfig() const config = useRuntimeConfig()
const TenantId = localStorage.getItem('TenantId') || `${config.public.tenantId}`; let TenantId = localStorage.getItem('TenantId') || `${config.public.tenantId}`;
const body = options?.body;
// @ts-ignore
const tenantIdByOptions = body?.tenantId;
if(tenantIdByOptions){
// 自定义传TenantId
TenantId = tenantIdByOptions;
}
return useFetch<T>(url,{ return useFetch<T>(url,{
baseURL: config.public.apiBaseUrl, baseURL: config.public.apiBaseUrl,
onRequest({ options }: any){ onRequest({ options }: any){