修复重大故障: JwtAuthenticationFilter文件,远程读取用户接口导致的服务器请求数量跑满
This commit is contained in:
@@ -45,22 +45,23 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交付方式" class="px-4" label-width="100" label-position="left">
|
||||
<el-input v-model="form.deliveryMethod" placeholder="交付方式"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计费方式" class="px-4" label-width="100" label-position="left">
|
||||
<el-input v-model="form.chargingMethod" placeholder="计费方式"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="插件价格" class="px-4" label-width="100" label-position="left">
|
||||
<el-input v-model="form.price" placeholder="插件价格"/>
|
||||
<el-form-item label="色系" class="px-4" label-width="100" label-position="left">
|
||||
<el-space>
|
||||
<template v-for="(item,index) in colors" :key="index">
|
||||
<div @click="handleColor(item.label)">
|
||||
<el-avatar v-if="selectColor == item.label" :size="28" :style="item.comments" class="border-solid border-1 border-gray-800 rounded-full"></el-avatar>
|
||||
<el-avatar v-else :size="24" :style="item.comments"></el-avatar>
|
||||
</div>
|
||||
</template>
|
||||
</el-space>
|
||||
</el-form-item>
|
||||
<el-form-item label="插件图标" class="px-4" label-width="100" label-position="left">
|
||||
<el-upload
|
||||
v-model:file-list="avatar"
|
||||
action="https://common-api.websoft.top/api/oss/upload"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
TenantId: '5'
|
||||
}"
|
||||
:limit="1"
|
||||
list-type="picture-card"
|
||||
@@ -80,10 +81,10 @@
|
||||
<el-tab-pane label="插件截屏" name="files">
|
||||
<el-upload
|
||||
v-model:file-list="files"
|
||||
action="https://common-api.websoft.top/api/oss/upload"
|
||||
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||
:headers="{
|
||||
Authorization: token,
|
||||
TenantId: 5,
|
||||
TenantId: '5'
|
||||
}"
|
||||
:limit="8"
|
||||
list-type="picture-card"
|
||||
@@ -95,9 +96,7 @@
|
||||
<Plus/>
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
<el-form-item class="px-4" label-width="100" label-position="left">
|
||||
<el-button type="primary" class="sm:w-auto w-full" size="large" @click="onSubmit">保存</el-button>
|
||||
</el-form-item>
|
||||
<el-button type="primary" class="sm:w-auto px-5" size="large" @click="onSubmit">保存</el-button>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="详细介绍" name="content">
|
||||
<!-- 编辑器 -->
|
||||
@@ -113,9 +112,27 @@
|
||||
<el-tab-pane label="评论管理" name="comments">
|
||||
<Comments :productId="form.companyId" :comments="comments" :count="commentsTotal" @done="doComments"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="价格设置" name="price">
|
||||
<el-form-item label="插件价格" class="px-4" label-width="100" label-position="left">
|
||||
<el-input-number v-model="form.price" placeholder="插件价格"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="交付方式" class="px-4" label-width="100" label-position="left">
|
||||
<el-radio-group v-model="form.deliveryMethod" @change="onSubmit">
|
||||
<el-radio-button label="SaaS交付" :value="0" />
|
||||
<el-radio-button label="源码交付" :value="1" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="计费方式" class="px-4" label-width="100" label-position="left">
|
||||
<el-radio-group v-model="form.chargingMethod">
|
||||
<el-radio-button label="一次性" :value="1" />
|
||||
<el-radio-button label="按年" :value="2" />
|
||||
<el-radio-button label="按月" :value="3" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="插件设置" name="setting">
|
||||
<el-form-item label="允许展示到插件市场" class="px-4" label-width="200" label-position="left">
|
||||
<el-switch v-model="form.market" title="允许展示到插件市场" @change="onSubmit"/>
|
||||
<el-form-item label="是否允许展示及被搜索" class="px-4" label-width="200" label-position="left">
|
||||
<el-switch v-model="form.search" title="是否允许展示及被搜索" @change="onSubmit"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否推荐" class="px-4" label-width="200" label-position="left">
|
||||
<el-switch disabled v-model="form.official" @change="onSubmit"/>
|
||||
@@ -159,26 +176,25 @@ import {MdEditor} from 'md-editor-v3';
|
||||
import 'md-editor-v3/lib/style.css';
|
||||
import {uploadOss} from "~/api/system/file";
|
||||
import Statistic from "./components/Statistic.vue";
|
||||
import {listDictData} from "~/api/system/dict-data";
|
||||
|
||||
|
||||
// 配置信息
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const tenantId = localStorage.getItem('ServerTenantId')
|
||||
const token = useToken();
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const website = useWebsite()
|
||||
const user = useUser();
|
||||
const navId = ref();
|
||||
const activeIndex = ref('');
|
||||
const avatar = ref<UploadUserFile[]>([])
|
||||
const files = ref<UploadUserFile[]>([])
|
||||
const srcList = ref<string[]>([])
|
||||
const dialogImageUrl = ref('')
|
||||
const content = ref('');
|
||||
const dialogVisible = ref(false)
|
||||
const activeName = ref('info')
|
||||
const comments = ref<CompanyComment[]>([]);
|
||||
const developer = ref<string>();// 色系
|
||||
const colors = ref<any[]>()
|
||||
const selectColor = ref<string>();
|
||||
|
||||
|
||||
// 配置信息
|
||||
@@ -217,6 +233,10 @@ const {form, assignFields} = useFormData<CmsWebsite>({
|
||||
official: undefined,
|
||||
// 是否显示在插件市场
|
||||
market: undefined,
|
||||
// 是否允许展示及被搜索
|
||||
search: undefined,
|
||||
// 主题色
|
||||
color: undefined,
|
||||
// 全局样式
|
||||
style: undefined,
|
||||
// 后台管理地址
|
||||
@@ -239,6 +259,8 @@ const {form, assignFields} = useFormData<CmsWebsite>({
|
||||
industryChild: undefined,
|
||||
// 企业ID
|
||||
companyId: undefined,
|
||||
// 开发者名称
|
||||
developer: undefined,
|
||||
// 所在国家
|
||||
country: undefined,
|
||||
// 所在省份
|
||||
@@ -313,32 +335,10 @@ const logs = [
|
||||
},
|
||||
]
|
||||
|
||||
const types = [
|
||||
{
|
||||
value: '网站',
|
||||
label: '网站',
|
||||
},
|
||||
{
|
||||
value: '小程序',
|
||||
label: '小程序',
|
||||
},
|
||||
{
|
||||
value: 'MacOS',
|
||||
label: 'MacOS',
|
||||
},
|
||||
{
|
||||
value: 'Windows',
|
||||
label: 'Windows',
|
||||
},
|
||||
{
|
||||
value: 'App',
|
||||
label: 'App',
|
||||
},
|
||||
]
|
||||
const types = ref<any[]>()
|
||||
|
||||
useHead({
|
||||
title: `用户中心`,
|
||||
meta: [{name: website.value.keywords, content: website.value.comments}]
|
||||
title: `开发者中心`
|
||||
});
|
||||
|
||||
const onDone = (index: string) => {
|
||||
@@ -346,6 +346,25 @@ const onDone = (index: string) => {
|
||||
}
|
||||
|
||||
const reload = async () => {
|
||||
// 查询字典
|
||||
listDictData({dictCode: 'WebsiteType'}).then(data => {
|
||||
types.value = data
|
||||
})
|
||||
listDictData({
|
||||
dictCode: 'Color'
|
||||
}).then(data => {
|
||||
colors.value = data.map((item: any) => {
|
||||
return {
|
||||
label: item.dictDataName,
|
||||
value: item.dictDataCode,
|
||||
comments: item.comments
|
||||
}
|
||||
})
|
||||
})
|
||||
getSiteData();
|
||||
}
|
||||
|
||||
const getSiteData = () => {
|
||||
getCmsWebsiteAll(navId.value).then(data => {
|
||||
// 获取栏目信息
|
||||
assignFields(data)
|
||||
@@ -374,7 +393,10 @@ const reload = async () => {
|
||||
}
|
||||
|
||||
if(data.websiteType){
|
||||
form.websiteType = JSON.parse(data.websiteType)
|
||||
form.websiteType = JSON.parse(data.websiteType) || []
|
||||
}
|
||||
if(data.color){
|
||||
selectColor.value = data.color;
|
||||
}
|
||||
|
||||
// 设置页面标题
|
||||
@@ -384,9 +406,7 @@ const reload = async () => {
|
||||
titleTemplate: `${data?.websiteName}` + ' - %s',
|
||||
})
|
||||
|
||||
|
||||
// 加载评论
|
||||
|
||||
}).catch(err => {
|
||||
console.log(err, '加载失败...')
|
||||
})
|
||||
@@ -396,6 +416,12 @@ const goBack = () => {
|
||||
router.back(); // 返回上一页
|
||||
}
|
||||
|
||||
// 选择色系
|
||||
const handleColor = (text: string) => {
|
||||
selectColor.value = text;
|
||||
form.color = text;
|
||||
}
|
||||
|
||||
const avatarRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
|
||||
form.websiteLogo = '';
|
||||
}
|
||||
@@ -438,10 +464,13 @@ const onSubmit = () => {
|
||||
if (srcList.value.length > 0) {
|
||||
form.files = JSON.stringify(srcList.value)
|
||||
}
|
||||
if(form.websiteType){
|
||||
form.websiteType = JSON.stringify(form.websiteType)
|
||||
if(!form.developer){
|
||||
form.developer = developer.value;
|
||||
}
|
||||
updateCmsWebsiteAll(form).then(() => {
|
||||
updateCmsWebsiteAll({
|
||||
...form,
|
||||
websiteType: JSON.stringify(form.websiteType)
|
||||
}).then(() => {
|
||||
ElMessage.success('修改成功');
|
||||
});
|
||||
}
|
||||
@@ -450,6 +479,9 @@ watch(
|
||||
() => route.params.id,
|
||||
(id) => {
|
||||
navId.value = getNavIdByParamsId(id);
|
||||
if(route.query.developer){
|
||||
developer.value = `${route.query.developer}`;
|
||||
}
|
||||
reload();
|
||||
},
|
||||
{immediate: true}
|
||||
|
||||
@@ -4,37 +4,49 @@
|
||||
<div class="xl:w-screen-xl m-auto py-4 mt-20">
|
||||
<el-page-header :icon="ArrowLeft" @back="goBack">
|
||||
<template #content>
|
||||
<span class="text-large font-600 mr-3"> 开发者中心 </span>
|
||||
<span class="text-large font-600 mr-3"> 开发者中心</span>
|
||||
</template>
|
||||
<template #extra>
|
||||
<el-space class="flex items-center">
|
||||
</el-space>
|
||||
</template>
|
||||
<el-row :gutter="24" id="container" class="clearfix">
|
||||
<el-col v-for="(item,index) in list" :key="index" :span="8" class="left mb-8">
|
||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-white cursor-pointer">
|
||||
<nuxt-link :to="`/developer/${item.websiteId}`">
|
||||
<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 gap-1.5">
|
||||
<el-avatar
|
||||
<template v-if="!isDeveloper">
|
||||
<el-card class="m-5 w-screen-sm mt-24 mb-[200px] m-auto">
|
||||
<el-result
|
||||
icon="warning"
|
||||
title="您还不是开发者!"
|
||||
:sub-title="`请先完成实名认证`"
|
||||
>
|
||||
</el-result>
|
||||
</el-card>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-row v-if="list" :gutter="24" id="container" class="clearfix">
|
||||
<el-col v-for="(item,index) in list" :key="index" :span="8" class="left mb-8">
|
||||
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-white cursor-pointer">
|
||||
<nuxt-link :to="{path: `/developer/${item.websiteId}`, query: {developer: `${developer?.merchantName}`}}">
|
||||
<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 gap-1.5">
|
||||
<el-avatar
|
||||
:src="item.websiteLogo" shape="square" :size="55" style="background-color: white;"/>
|
||||
<div class="flex-1 text-lg cursor-pointer flex flex-col">
|
||||
{{ item.websiteName }}
|
||||
<div class="flex justify-between items-center">
|
||||
<sapn class="text-xs text-gray-400 font-normal line-clamp-1">{{ item.comments || '暂无描述' }}</sapn>
|
||||
<el-button size="small" round>编辑</el-button>
|
||||
<div class="flex-1 text-lg cursor-pointer flex flex-col">
|
||||
{{ item.websiteName }}
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="text-xs text-gray-400 font-normal line-clamp-1">{{ item.comments || '暂无描述' }}</div>
|
||||
<el-button size="small" round>编辑</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-image pt-3">
|
||||
<el-image v-if="item.files" :src="`${JSON.parse(item.files)[0]}`" class="w-full h-1/2 max-h-[220px]" />
|
||||
<el-image v-else class="w-full h-[220px]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-image pt-3">
|
||||
<el-image v-if="item.files" :src="`${JSON.parse(item.files)[0]}`" class="w-full h-1/2 max-h-[220px]" />
|
||||
<el-image v-else class="w-full h-[220px]" />
|
||||
</div>
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</nuxt-link>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-page-header>
|
||||
</div>
|
||||
|
||||
@@ -44,9 +56,13 @@ import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
||||
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||
import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
||||
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
||||
import {getShopMerchantByPhone} from "~/api/shop/shopMerchant";
|
||||
import type {ShopMerchant} from "~/api/shop/shopMerchant/model";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const isDeveloper = ref<boolean>(false);
|
||||
const developer = ref<ShopMerchant>();
|
||||
// 页面信息
|
||||
const list = ref<CmsWebsite[]>([]);
|
||||
const total = ref(0);
|
||||
@@ -69,8 +85,14 @@ const goBack = () => {
|
||||
}
|
||||
|
||||
// 加载页面数据
|
||||
const reload = async () => {
|
||||
await pageCmsWebsiteAll(where).then(response => {
|
||||
const reload = () => {
|
||||
getShopMerchantByPhone().then((data) => {
|
||||
isDeveloper.value = true
|
||||
developer.value = data
|
||||
}).catch(() => {
|
||||
isDeveloper.value = false
|
||||
})
|
||||
pageCmsWebsiteAll(where).then(response => {
|
||||
if(response?.list){
|
||||
list.value = response?.list;
|
||||
total.value = response.count;
|
||||
|
||||
Reference in New Issue
Block a user