修复重大故障: JwtAuthenticationFilter文件,远程读取用户接口导致的服务器请求数量跑满
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
# 应用模块接口
|
# 应用模块接口
|
||||||
API_BASE=http://127.0.0.1:9001/api
|
API_BASE=http://127.0.0.1:9001/api
|
||||||
#API_BASE=https://cms-api.websoft.top/api
|
#API_BASE=https://cms-api.websoft.top/api
|
||||||
|
|
||||||
|
#VITE_SERVER_URL=http://127.0.0.1:30000/api
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# 基础模块
|
# 基础模块
|
||||||
VITE_SERVER_URL=https://common-api.websoft.top/api
|
VITE_SERVER_URL=https://server.gxwebsoft.com/api
|
||||||
# 应用模块
|
# 应用模块
|
||||||
API_BASE=https://cms-api.websoft.top/api
|
API_BASE=https://cms-api.websoft.top/api
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ export interface CmsArticle {
|
|||||||
toUsers?: string;
|
toUsers?: string;
|
||||||
// 文章内容
|
// 文章内容
|
||||||
content?: string;
|
content?: string;
|
||||||
|
// 是否翻译
|
||||||
|
translation?: boolean;
|
||||||
|
// 编辑器
|
||||||
|
editor?: number;
|
||||||
// 是否推荐
|
// 是否推荐
|
||||||
recommend?: number;
|
recommend?: number;
|
||||||
// 用户ID
|
// 用户ID
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import request from '~/utils/request';
|
import request from '~/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { CmsDomain, CmsDomainParam } from './model';
|
import type { CmsDomain, CmsDomainParam } from './model';
|
||||||
import { SERVER_API_URL } from '@/config';
|
import {COMMON_API_URL, SERVER_API_URL} from '@/config';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询网站域名记录表
|
* 分页查询网站域名记录表
|
||||||
@@ -138,7 +138,7 @@ export async function resolvable(id: number) {
|
|||||||
export async function getTenantIdByDomain(params: CmsDomainParam) {
|
export async function getTenantIdByDomain(params: CmsDomainParam) {
|
||||||
const config = useRuntimeConfig();
|
const config = useRuntimeConfig();
|
||||||
const res = await request.get<ApiResult<PageResult<CmsDomain>>>(
|
const res = await request.get<ApiResult<PageResult<CmsDomain>>>(
|
||||||
config.public.apiServer + '/cms/cms-domain/page',
|
COMMON_API_URL + '/cms/cms-domain/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ export interface CmsWebsite {
|
|||||||
// 应用价格
|
// 应用价格
|
||||||
price?: string,
|
price?: string,
|
||||||
// 交付方式
|
// 交付方式
|
||||||
deliveryMethod: number,
|
deliveryMethod?: number,
|
||||||
// 计费方式
|
// 计费方式
|
||||||
chargingMethod: number,
|
chargingMethod?: number,
|
||||||
// 服务到期时间
|
// 服务到期时间
|
||||||
expirationTime?: string;
|
expirationTime?: string;
|
||||||
// 模版ID
|
// 模版ID
|
||||||
@@ -59,6 +59,8 @@ export interface CmsWebsite {
|
|||||||
industryChild?: string;
|
industryChild?: string;
|
||||||
// 企业ID
|
// 企业ID
|
||||||
companyId?: number;
|
companyId?: number;
|
||||||
|
// 开发者
|
||||||
|
developer?: string;
|
||||||
// 所在国家
|
// 所在国家
|
||||||
country?: string;
|
country?: string;
|
||||||
// 所在省份
|
// 所在省份
|
||||||
@@ -91,6 +93,12 @@ export interface CmsWebsite {
|
|||||||
official?: boolean;
|
official?: boolean;
|
||||||
// 是否显示在插件市场
|
// 是否显示在插件市场
|
||||||
market?: boolean;
|
market?: boolean;
|
||||||
|
// 是否插件
|
||||||
|
plugin?: boolean;
|
||||||
|
// 是否允许被搜索(案例展示)
|
||||||
|
search?: boolean;
|
||||||
|
// 主题色
|
||||||
|
color?: string;
|
||||||
// 运行状态
|
// 运行状态
|
||||||
running?: number;
|
running?: number;
|
||||||
// 状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停
|
// 状态 0未开通 1运行中 2维护中 3已关闭 4已欠费停机 5违规关停
|
||||||
@@ -131,6 +139,8 @@ export interface CmsWebsiteParam extends PageParam {
|
|||||||
recommend?: number;
|
recommend?: number;
|
||||||
official?: boolean;
|
official?: boolean;
|
||||||
market?: boolean;
|
market?: boolean;
|
||||||
|
plugin?: boolean;
|
||||||
|
search?: boolean;
|
||||||
websiteType?: string;
|
websiteType?: string;
|
||||||
userId?: number;
|
userId?: number;
|
||||||
keywords?: string;
|
keywords?: string;
|
||||||
|
|||||||
105
api/cms/cmsWebsiteSetting/index.ts
Normal file
105
api/cms/cmsWebsiteSetting/index.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { CmsWebsiteSetting, CmsWebsiteSettingParam } from './model';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询网站设置
|
||||||
|
*/
|
||||||
|
export async function pageCmsWebsiteSetting(params: CmsWebsiteSettingParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<CmsWebsiteSetting>>>(
|
||||||
|
'/cms/cms-website-setting/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.code === 0) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询网站设置列表
|
||||||
|
*/
|
||||||
|
export async function listCmsWebsiteSetting(params?: CmsWebsiteSettingParam) {
|
||||||
|
const res = await request.get<ApiResult<CmsWebsiteSetting[]>>(
|
||||||
|
'/cms/cms-website-setting',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加网站设置
|
||||||
|
*/
|
||||||
|
export async function addCmsWebsiteSetting(data: CmsWebsiteSetting) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
'/cms/cms-website-setting',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.code === 0) {
|
||||||
|
return res.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改网站设置
|
||||||
|
*/
|
||||||
|
export async function updateCmsWebsiteSetting(data: CmsWebsiteSetting) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
'/cms/cms-website-setting',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.code === 0) {
|
||||||
|
return res.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除网站设置
|
||||||
|
*/
|
||||||
|
export async function removeCmsWebsiteSetting(id?: number) {
|
||||||
|
const res = await request.del<ApiResult<unknown>>(
|
||||||
|
'/cms/cms-website-setting/' + id
|
||||||
|
);
|
||||||
|
if (res.code === 0) {
|
||||||
|
return res.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除网站设置
|
||||||
|
*/
|
||||||
|
export async function removeBatchCmsWebsiteSetting(data: (number | undefined)[]) {
|
||||||
|
const res = await request.del<ApiResult<unknown>>(
|
||||||
|
'/cms/cms-website-setting/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.code === 0) {
|
||||||
|
return res.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询网站设置
|
||||||
|
*/
|
||||||
|
export async function getCmsWebsiteSetting(id: number) {
|
||||||
|
const res = await request.get<ApiResult<CmsWebsiteSetting>>(
|
||||||
|
'/cms/cms-website-setting/' + id
|
||||||
|
);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
51
api/cms/cmsWebsiteSetting/model/index.ts
Normal file
51
api/cms/cmsWebsiteSetting/model/index.ts
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站设置
|
||||||
|
*/
|
||||||
|
export interface CmsWebsiteSetting {
|
||||||
|
// 自增ID
|
||||||
|
id?: number;
|
||||||
|
// 关联网站ID
|
||||||
|
websiteId?: number;
|
||||||
|
// 是否官方插件
|
||||||
|
official?: string;
|
||||||
|
// 是否展示在插件市场
|
||||||
|
market?: string;
|
||||||
|
// 是否允许被搜索
|
||||||
|
search?: string;
|
||||||
|
// 是否共享
|
||||||
|
share?: string;
|
||||||
|
// 是否插件 0应用1 插件
|
||||||
|
plugin?: string;
|
||||||
|
// 编辑器类型 1 md-editor-v3, 2 tinymce-editor
|
||||||
|
editor?: number;
|
||||||
|
// 显示站内搜索
|
||||||
|
searchBtn?: string;
|
||||||
|
// 显示登录注册功能
|
||||||
|
loginBtn?: string;
|
||||||
|
// 显示悬浮客服工具
|
||||||
|
floatTool?: boolean;
|
||||||
|
// 显示版权链接
|
||||||
|
copyrightLink?: string;
|
||||||
|
// 导航栏最多显示数量
|
||||||
|
maxMenuNum?: string;
|
||||||
|
// 排序号
|
||||||
|
sortNumber?: number;
|
||||||
|
// 是否删除, 0否, 1是
|
||||||
|
deleted?: number;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
// 修改时间
|
||||||
|
updateTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站设置搜索条件
|
||||||
|
*/
|
||||||
|
export interface CmsWebsiteSettingParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ import type { ApiResult } from '@/api';
|
|||||||
import type { User } from '@/api/system/user/model';
|
import type { User } from '@/api/system/user/model';
|
||||||
import type { UpdatePasswordParam } from './model';
|
import type { UpdatePasswordParam } from './model';
|
||||||
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
||||||
import {COMMON_API_URL} from "~/config";
|
import {COMMON_API_URL, SERVER_API_URL} from "~/config";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取网站信息
|
* 获取网站信息
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type {
|
|||||||
CaptchaResult,
|
CaptchaResult,
|
||||||
SmsCaptchaResult
|
SmsCaptchaResult
|
||||||
} from './model';
|
} from './model';
|
||||||
import { SERVER_API_URL } from '~/config';
|
import {SERVER_API_URL} from '~/config';
|
||||||
import type {UserParam} from "~/api/system/user/model";
|
import type {UserParam} from "~/api/system/user/model";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { ShopMerchant, ShopMerchantParam } from './model';
|
import type { ShopMerchant, ShopMerchantParam } from './model';
|
||||||
import { MODULES_API_URL } from '@/config';
|
import {COMMON_API_URL} from "~/config";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询商户
|
* 分页查询商户
|
||||||
*/
|
*/
|
||||||
export async function pageShopMerchant(params: ShopMerchantParam) {
|
export async function pageShopMerchant(params: ShopMerchantParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<ShopMerchant>>>(
|
const res = await request.get<ApiResult<PageResult<ShopMerchant>>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant/page',
|
'/shop/shop-merchant/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -24,15 +24,15 @@ export async function pageShopMerchant(params: ShopMerchantParam) {
|
|||||||
*/
|
*/
|
||||||
export async function listShopMerchant(params?: ShopMerchantParam) {
|
export async function listShopMerchant(params?: ShopMerchantParam) {
|
||||||
const res = await request.get<ApiResult<ShopMerchant[]>>(
|
const res = await request.get<ApiResult<ShopMerchant[]>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant',
|
'/shop/shop-merchant',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.code === 0 && res.data) {
|
||||||
return res.data.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,13 +40,13 @@ export async function listShopMerchant(params?: ShopMerchantParam) {
|
|||||||
*/
|
*/
|
||||||
export async function addShopMerchant(data: ShopMerchant) {
|
export async function addShopMerchant(data: ShopMerchant) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant',
|
'/shop/shop-merchant',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,42 +54,42 @@ export async function addShopMerchant(data: ShopMerchant) {
|
|||||||
*/
|
*/
|
||||||
export async function updateShopMerchant(data: ShopMerchant) {
|
export async function updateShopMerchant(data: ShopMerchant) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant',
|
'/shop/shop-merchant',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除商户
|
* 删除商户
|
||||||
*/
|
*/
|
||||||
export async function removeShopMerchant(id?: number) {
|
export async function removeShopMerchant(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.del<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant/' + id
|
'/shop/shop-merchant/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除商户
|
* 批量删除商户
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopMerchant(data: (number | undefined)[]) {
|
export async function removeBatchShopMerchant(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.del<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant/batch',
|
'/shop/shop-merchant/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,10 +97,37 @@ export async function removeBatchShopMerchant(data: (number | undefined)[]) {
|
|||||||
*/
|
*/
|
||||||
export async function getShopMerchant(id: number) {
|
export async function getShopMerchant(id: number) {
|
||||||
const res = await request.get<ApiResult<ShopMerchant>>(
|
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant/' + id
|
'/shop/shop-merchant/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.code === 0 && res.data) {
|
||||||
return res.data.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据userId查询商户
|
||||||
|
*/
|
||||||
|
export async function getShopMerchantByUserId(id: number) {
|
||||||
|
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||||
|
'/shop/shop-merchant/' + id
|
||||||
|
);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据phone查询商户
|
||||||
|
*/
|
||||||
|
export async function getShopMerchantByPhone() {
|
||||||
|
const res = await request.get<ApiResult<ShopMerchant>>(
|
||||||
|
COMMON_API_URL + '/shop/shop-merchant/getByPhone'
|
||||||
|
);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { ShopMerchantApply, ShopMerchantApplyParam } from './model';
|
import type { ShopMerchantApply, ShopMerchantApplyParam } from './model';
|
||||||
import { MODULES_API_URL } from '@/config';
|
import {COMMON_API_URL} from "~/config";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询商户入驻申请
|
* 分页查询商户入驻申请
|
||||||
*/
|
*/
|
||||||
export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
|
export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
|
||||||
const res = await request.get<ApiResult<PageResult<ShopMerchantApply>>>(
|
const res = await request.get<ApiResult<PageResult<ShopMerchantApply>>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-apply/page',
|
'/shop/shop-merchant-apply/page',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -24,15 +24,15 @@ export async function pageShopMerchantApply(params: ShopMerchantApplyParam) {
|
|||||||
*/
|
*/
|
||||||
export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
|
export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
|
||||||
const res = await request.get<ApiResult<ShopMerchantApply[]>>(
|
const res = await request.get<ApiResult<ShopMerchantApply[]>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-apply',
|
'/shop/shop-merchant-apply',
|
||||||
{
|
{
|
||||||
params
|
params
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.code === 0 && res.data) {
|
||||||
return res.data.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -40,13 +40,13 @@ export async function listShopMerchantApply(params?: ShopMerchantApplyParam) {
|
|||||||
*/
|
*/
|
||||||
export async function addShopMerchantApply(data: ShopMerchantApply) {
|
export async function addShopMerchantApply(data: ShopMerchantApply) {
|
||||||
const res = await request.post<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-apply',
|
COMMON_API_URL + '/shop/shop-merchant-apply',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,42 +54,42 @@ export async function addShopMerchantApply(data: ShopMerchantApply) {
|
|||||||
*/
|
*/
|
||||||
export async function updateShopMerchantApply(data: ShopMerchantApply) {
|
export async function updateShopMerchantApply(data: ShopMerchantApply) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-apply',
|
COMMON_API_URL + '/shop/shop-merchant-apply',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除商户入驻申请
|
* 删除商户入驻申请
|
||||||
*/
|
*/
|
||||||
export async function removeShopMerchantApply(id?: number) {
|
export async function removeShopMerchantApply(id?: number) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.del<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-apply/' + id
|
'/shop/shop-merchant-apply/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除商户入驻申请
|
* 批量删除商户入驻申请
|
||||||
*/
|
*/
|
||||||
export async function removeBatchShopMerchantApply(data: (number | undefined)[]) {
|
export async function removeBatchShopMerchantApply(data: (number | undefined)[]) {
|
||||||
const res = await request.delete<ApiResult<unknown>>(
|
const res = await request.del<ApiResult<unknown>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-apply/batch',
|
'/shop/shop-merchant-apply/batch',
|
||||||
{
|
{
|
||||||
data
|
data
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.code === 0) {
|
||||||
return res.data.message;
|
return res.message;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -97,10 +97,36 @@ export async function removeBatchShopMerchantApply(data: (number | undefined)[])
|
|||||||
*/
|
*/
|
||||||
export async function getShopMerchantApply(id: number) {
|
export async function getShopMerchantApply(id: number) {
|
||||||
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||||
MODULES_API_URL + '/shop/shop-merchant-apply/' + id
|
'/shop/shop-merchant-apply/' + id
|
||||||
);
|
);
|
||||||
if (res.data.code === 0 && res.data.data) {
|
if (res.code === 0 && res.data) {
|
||||||
return res.data.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
return Promise.reject(new Error(res.data.message));
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据userId查询商户
|
||||||
|
*/
|
||||||
|
export async function getShopMerchantApplyByUserId() {
|
||||||
|
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||||
|
COMMON_API_URL + '/shop/shop-merchant-apply/getByUserId'
|
||||||
|
);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据phone查询商户入驻申请
|
||||||
|
*/
|
||||||
|
export async function getShopMerchantApplyByPhone() {
|
||||||
|
const res = await request.get<ApiResult<ShopMerchantApply>>(
|
||||||
|
COMMON_API_URL + '/shop/shop-merchant-apply/getByPhone'
|
||||||
|
);
|
||||||
|
if (res.code === 0 && res.data) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.message));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import request from '~/utils/request';
|
import request from '~/utils/request';
|
||||||
import type { ApiResult, PageResult } from '@/api';
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
import type { DictData, DictDataParam } from './model';
|
import type { DictData, DictDataParam } from './model';
|
||||||
import { SERVER_API_URL } from '@/config';
|
import {SERVER_API_URL} from '@/config';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询字典数据
|
* 分页查询字典数据
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { PageParam } from '@/api';
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典数据
|
* 字典数据
|
||||||
|
|||||||
@@ -2616,7 +2616,7 @@ h3.map_title {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
right: 17px;
|
right: 17px;
|
||||||
bottom: 10%;
|
bottom: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toolbar li {
|
#toolbar li {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import type {CmsLink} from "~/api/cms/cmsLink/model";
|
|||||||
|
|
||||||
const list = ref<CmsLink[]>([])
|
const list = ref<CmsLink[]>([])
|
||||||
listCmsLink({}).then(res => {
|
listCmsLink({}).then(res => {
|
||||||
console.log(res);
|
|
||||||
list.value = res;
|
list.value = res;
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {useConfigInfo} from "~/composables/configState";
|
import {useConfigInfo, useSetting} from "~/composables/configState";
|
||||||
const config = useConfigInfo();
|
const config = useConfigInfo();
|
||||||
|
const setting = useSetting()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div id="toolbar" v-if="config">
|
<div id="toolbar" v-if="setting.floatTool">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a :href="`http://wpa.qq.com/msgrd?v=3&uin=${config.qqCode}&site=qq&menu=yes`" target="_blank">
|
<li><a :href="`http://wpa.qq.com/msgrd?v=3&uin=${config.qqCode}&site=qq&menu=yes`" target="_blank">
|
||||||
<span class="icon-font icon-qq"></span>
|
<span class="icon-font icon-qq"></span>
|
||||||
@@ -22,9 +23,9 @@ const config = useConfigInfo();
|
|||||||
<span class="icon-font icon-message"></span>
|
<span class="icon-font icon-message"></span>
|
||||||
<span class="wz">在线留言</span>
|
<span class="wz">在线留言</span>
|
||||||
</a></li>
|
</a></li>
|
||||||
<el-backtop :bottom="50" :right="25"><li class="backtop"><span class="icon-font icon-top"></span></li></el-backtop>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<el-backtop :bottom="50" :right="25"></el-backtop>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fr clearfix flex items-center">
|
<div class="fr clearfix flex items-center">
|
||||||
<div class="fl mr-5">
|
<div v-if="setting.searchBtn" class="fl mr-5">
|
||||||
<el-input v-model="keywords" :placeholder="`${$t('searchKeywords')}`" :suffix-icon="Search" @change="onSearch"/>
|
<el-input v-model="keywords" :placeholder="`${$t('searchKeywords')}`" :suffix-icon="Search" @change="onSearch"/>
|
||||||
</div>
|
</div>
|
||||||
|
<template v-if="setting.loginBtn">
|
||||||
<!-- 未登录 -->
|
<!-- 未登录 -->
|
||||||
<div v-if="!token" class="lang flex justify-center text-center items-center">
|
<div v-if="!token" class="lang flex justify-center text-center items-center">
|
||||||
<el-space>
|
<el-space>
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
<el-dropdown-item command="user"><nuxt-link to="/user">用户中心</nuxt-link></el-dropdown-item>
|
<el-dropdown-item command="user"><nuxt-link to="/user">用户中心</nuxt-link></el-dropdown-item>
|
||||||
<el-dropdown-item command="password"><nuxt-link to="/user/password">修改密码</nuxt-link></el-dropdown-item>
|
<el-dropdown-item command="password"><nuxt-link to="/user/password">修改密码</nuxt-link></el-dropdown-item>
|
||||||
<el-dropdown-item command="auth"><nuxt-link to="/user/auth">实名认证</nuxt-link></el-dropdown-item>
|
<el-dropdown-item command="auth"><nuxt-link to="/user/auth">实名认证</nuxt-link></el-dropdown-item>
|
||||||
<el-dropdown-item divided command="order"><nuxt-link to="/user/order">我的订单</nuxt-link></el-dropdown-item>
|
<el-dropdown-item divided command="order"><nuxt-link to="/user/order">已购插件</nuxt-link></el-dropdown-item>
|
||||||
<el-dropdown-item divided command="logOut"><nuxt-link to="/user/logout">退出登录</nuxt-link>
|
<el-dropdown-item divided command="logOut"><nuxt-link to="/user/logout">退出登录</nuxt-link>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
@@ -42,12 +43,15 @@
|
|||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
|
import {useConfigInfo, useSetting} from "~/composables/configState";
|
||||||
const token = useToken();
|
const token = useToken();
|
||||||
const user = useUser();
|
const user = useUser();
|
||||||
|
const setting = useSetting();
|
||||||
const keywords = ref<string>();
|
const keywords = ref<string>();
|
||||||
|
|
||||||
const onSearch = () => {
|
const onSearch = () => {
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<nuxt-link to="/" class="flex items-center cursor-pointer gap-sm mr-7" v-if="logo">
|
<nuxt-link to="/" class="flex items-center cursor-pointer gap-sm mr-7" v-if="website">
|
||||||
<!-- <el-image src="https://oss.wsdns.cn/20250211/eedb87d7b95b41e3bc9eca1247c85fa4.png" class="h-[30px]" size="small" shape="square" />-->
|
<el-image v-if="website.websiteLogo || logo?.value" :style="`${logo?.style}`" :src="logo?.value || website?.websiteLogo" class=" rounded-sm rounded-sm w-[107px] h-[24px]"/>
|
||||||
<!-- <h4 class="text-gray-700 text-xl font-bold">WEBSOFT</h4>-->
|
<h4 v-else class="text-gray-700 text-xl font-bold" :style="`${logo?.style}`">{{ website?.websiteName }}</h4>
|
||||||
<el-image :src="logo?.value" class=" rounded-sm rounded-sm w-[107px] h-[24px]"/>
|
|
||||||
<!-- <div class="text-sm text-gray-700 text-xl font-bold" :style="`${logo?.style}`">{{ website?.websiteName }}</div>-->
|
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -11,7 +9,6 @@
|
|||||||
import {useLogo, useWebsite} from "~/composables/configState";
|
import {useLogo, useWebsite} from "~/composables/configState";
|
||||||
import {listCmsWebsiteField} from "~/api/cms/cmsWebsiteField";
|
import {listCmsWebsiteField} from "~/api/cms/cmsWebsiteField";
|
||||||
const logo = useLogo()
|
const logo = useLogo()
|
||||||
const config = useAppConfig();
|
|
||||||
const website = useWebsite();
|
const website = useWebsite();
|
||||||
|
|
||||||
listCmsWebsiteField({
|
listCmsWebsiteField({
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<MdPreview v-if="editor === 2" :id="id" :modelValue="data" />
|
||||||
|
<div v-else v-html="data"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { MdPreview } from 'md-editor-v3';
|
||||||
|
import 'md-editor-v3/lib/preview.css';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
data?: any;
|
data?: any;
|
||||||
|
editor?: number;
|
||||||
isMobile?: boolean;
|
isMobile?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const id = 'preview-only';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
|
||||||
<div v-html="data"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.content {
|
.content {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -1,242 +0,0 @@
|
|||||||
<!-- 富文本编辑器 -->
|
|
||||||
<template>
|
|
||||||
<component v-if="inlineEditor" :is="tagName" :id="elementId" />
|
|
||||||
<textarea v-else :id="elementId"></textarea>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import {
|
|
||||||
watch,
|
|
||||||
onMounted,
|
|
||||||
onBeforeUnmount,
|
|
||||||
onActivated,
|
|
||||||
onDeactivated,
|
|
||||||
nextTick,
|
|
||||||
useAttrs
|
|
||||||
} from 'vue';
|
|
||||||
import tinymce from 'tinymce/tinymce';
|
|
||||||
import type {
|
|
||||||
Editor as TinyMCEEditor,
|
|
||||||
EditorEvent,
|
|
||||||
RawEditorSettings
|
|
||||||
} from 'tinymce';
|
|
||||||
import 'tinymce/themes/silver';
|
|
||||||
import 'tinymce/icons/default';
|
|
||||||
import 'tinymce/plugins/code';
|
|
||||||
import 'tinymce/plugins/preview';
|
|
||||||
import 'tinymce/plugins/fullscreen';
|
|
||||||
import 'tinymce/plugins/paste';
|
|
||||||
import 'tinymce/plugins/searchreplace';
|
|
||||||
import 'tinymce/plugins/save';
|
|
||||||
import 'tinymce/plugins/autosave';
|
|
||||||
import 'tinymce/plugins/link';
|
|
||||||
import 'tinymce/plugins/autolink';
|
|
||||||
import 'tinymce/plugins/image';
|
|
||||||
import 'tinymce/plugins/media';
|
|
||||||
import 'tinymce/plugins/table';
|
|
||||||
import 'tinymce/plugins/codesample';
|
|
||||||
import 'tinymce/plugins/lists';
|
|
||||||
import 'tinymce/plugins/advlist';
|
|
||||||
import 'tinymce/plugins/hr';
|
|
||||||
import 'tinymce/plugins/charmap';
|
|
||||||
import 'tinymce/plugins/emoticons';
|
|
||||||
import 'tinymce/plugins/anchor';
|
|
||||||
import 'tinymce/plugins/directionality';
|
|
||||||
import 'tinymce/plugins/pagebreak';
|
|
||||||
import 'tinymce/plugins/quickbars';
|
|
||||||
import 'tinymce/plugins/nonbreaking';
|
|
||||||
import 'tinymce/plugins/visualblocks';
|
|
||||||
import 'tinymce/plugins/visualchars';
|
|
||||||
import 'tinymce/plugins/wordcount';
|
|
||||||
import 'tinymce/plugins/emoticons/js/emojis';
|
|
||||||
import { storeToRefs } from 'pinia';
|
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
|
||||||
import {
|
|
||||||
DEFAULT_CONFIG,
|
|
||||||
DARK_CONFIG,
|
|
||||||
uuid,
|
|
||||||
bindHandlers,
|
|
||||||
openAlert
|
|
||||||
} from './util';
|
|
||||||
import type { AlertOption } from './util';
|
|
||||||
|
|
||||||
const props = withDefaults(
|
|
||||||
defineProps<{
|
|
||||||
// 编辑器唯一 id
|
|
||||||
id?: string;
|
|
||||||
// v-model
|
|
||||||
value?: string;
|
|
||||||
// 编辑器配置
|
|
||||||
init?: RawEditorSettings;
|
|
||||||
// 是否内联模式
|
|
||||||
inline?: boolean;
|
|
||||||
// model events
|
|
||||||
modelEvents?: string;
|
|
||||||
// 内联模式标签名
|
|
||||||
tagName?: string;
|
|
||||||
// 是否禁用
|
|
||||||
disabled?: boolean;
|
|
||||||
// 是否跟随框架主题
|
|
||||||
autoTheme?: boolean;
|
|
||||||
// 不跟随框架主题时是否使用暗黑主题
|
|
||||||
darkTheme?: boolean;
|
|
||||||
}>(),
|
|
||||||
{
|
|
||||||
inline: false,
|
|
||||||
modelEvents: 'change input undo redo',
|
|
||||||
tagName: 'div',
|
|
||||||
autoTheme: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
|
||||||
(e: 'update:value', value: string): void;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const attrs = useAttrs();
|
|
||||||
const themeStore = useThemeStore();
|
|
||||||
const { darkMode } = storeToRefs(themeStore);
|
|
||||||
|
|
||||||
// 编辑器唯一 id
|
|
||||||
const elementId: string = props.id || uuid('tiny-vue');
|
|
||||||
|
|
||||||
// 编辑器实例
|
|
||||||
let editorIns: TinyMCEEditor | null = null;
|
|
||||||
|
|
||||||
// 是否内联模式
|
|
||||||
const inlineEditor: boolean = props.init?.inline || props.inline;
|
|
||||||
|
|
||||||
/* 更新 value */
|
|
||||||
const updateValue = (value: string) => {
|
|
||||||
emit('update:value', value);
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 修改内容 */
|
|
||||||
const setContent = (value?: string) => {
|
|
||||||
if (
|
|
||||||
editorIns &&
|
|
||||||
typeof value === 'string' &&
|
|
||||||
value !== editorIns.getContent()
|
|
||||||
) {
|
|
||||||
editorIns.setContent(value);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 渲染编辑器 */
|
|
||||||
const render = () => {
|
|
||||||
const isDark = props.autoTheme ? darkMode.value : props.darkTheme;
|
|
||||||
tinymce.init({
|
|
||||||
...DEFAULT_CONFIG,
|
|
||||||
...(isDark ? DARK_CONFIG : {}),
|
|
||||||
...props.init,
|
|
||||||
selector: `#${elementId}`,
|
|
||||||
readonly: props.disabled,
|
|
||||||
inline: inlineEditor,
|
|
||||||
setup: (editor: TinyMCEEditor) => {
|
|
||||||
editorIns = editor;
|
|
||||||
editor.on('init', (e: EditorEvent<any>) => {
|
|
||||||
// 回显初始值
|
|
||||||
if (props.value) {
|
|
||||||
setContent(props.value);
|
|
||||||
}
|
|
||||||
// v-model
|
|
||||||
editor.on(props.modelEvents, () => {
|
|
||||||
updateValue(editor.getContent());
|
|
||||||
});
|
|
||||||
// valid events
|
|
||||||
bindHandlers(e, attrs, editor);
|
|
||||||
});
|
|
||||||
if (typeof props.init?.setup === 'function') {
|
|
||||||
props.init.setup(editor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 销毁编辑器 */
|
|
||||||
const destory = () => {
|
|
||||||
if (tinymce != null && editorIns != null) {
|
|
||||||
tinymce.remove(editorIns as any);
|
|
||||||
editorIns = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 弹出提示框 */
|
|
||||||
const alert = (option?: AlertOption) => {
|
|
||||||
openAlert(editorIns, option);
|
|
||||||
};
|
|
||||||
|
|
||||||
defineExpose({ editorIns, alert });
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.value,
|
|
||||||
(val: string, prevVal: string) => {
|
|
||||||
if (val !== prevVal) {
|
|
||||||
setContent(val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.disabled,
|
|
||||||
(disable) => {
|
|
||||||
if (editorIns !== null) {
|
|
||||||
if (typeof editorIns.mode?.set === 'function') {
|
|
||||||
editorIns.mode.set(disable ? 'readonly' : 'design');
|
|
||||||
} else {
|
|
||||||
editorIns.setMode(disable ? 'readonly' : 'design');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.tagName,
|
|
||||||
() => {
|
|
||||||
destory();
|
|
||||||
nextTick(() => {
|
|
||||||
render();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
watch(darkMode, () => {
|
|
||||||
if (props.autoTheme) {
|
|
||||||
destory();
|
|
||||||
nextTick(() => {
|
|
||||||
render();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
render();
|
|
||||||
});
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
|
||||||
destory();
|
|
||||||
});
|
|
||||||
|
|
||||||
onActivated(() => {
|
|
||||||
render();
|
|
||||||
});
|
|
||||||
|
|
||||||
onDeactivated(() => {
|
|
||||||
destory();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body .tox-tinymce-aux {
|
|
||||||
z-index: 19990000;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea[id^='tiny-vue'] {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
opacity: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,248 +0,0 @@
|
|||||||
import type {
|
|
||||||
Editor as TinyMCEEditor,
|
|
||||||
EditorEvent,
|
|
||||||
RawEditorSettings
|
|
||||||
} from 'tinymce';
|
|
||||||
const BASE_URL = import.meta.env.BASE_URL;
|
|
||||||
|
|
||||||
// 默认加载插件
|
|
||||||
const PLUGINS: string = [
|
|
||||||
'code',
|
|
||||||
'preview',
|
|
||||||
'fullscreen',
|
|
||||||
'paste',
|
|
||||||
'searchreplace',
|
|
||||||
'save',
|
|
||||||
'autosave',
|
|
||||||
'link',
|
|
||||||
'autolink',
|
|
||||||
'image',
|
|
||||||
'media',
|
|
||||||
'table',
|
|
||||||
'codesample',
|
|
||||||
'lists',
|
|
||||||
'advlist',
|
|
||||||
'hr',
|
|
||||||
'charmap',
|
|
||||||
'emoticons',
|
|
||||||
'anchor',
|
|
||||||
'directionality',
|
|
||||||
'pagebreak',
|
|
||||||
'quickbars',
|
|
||||||
'nonbreaking',
|
|
||||||
'visualblocks',
|
|
||||||
'visualchars',
|
|
||||||
'wordcount'
|
|
||||||
].join(' ');
|
|
||||||
|
|
||||||
// 默认工具栏布局
|
|
||||||
const TOOLBAR: string = [
|
|
||||||
'fullscreen',
|
|
||||||
'preview',
|
|
||||||
'code',
|
|
||||||
'codesample',
|
|
||||||
'emoticons',
|
|
||||||
'image',
|
|
||||||
'media',
|
|
||||||
'|',
|
|
||||||
'undo',
|
|
||||||
'redo',
|
|
||||||
'|',
|
|
||||||
'forecolor',
|
|
||||||
'backcolor',
|
|
||||||
'|',
|
|
||||||
'bold',
|
|
||||||
'italic',
|
|
||||||
'underline',
|
|
||||||
'strikethrough',
|
|
||||||
'|',
|
|
||||||
'alignleft',
|
|
||||||
'aligncenter',
|
|
||||||
'alignright',
|
|
||||||
'alignjustify',
|
|
||||||
'|',
|
|
||||||
'outdent',
|
|
||||||
'indent',
|
|
||||||
'|',
|
|
||||||
'numlist',
|
|
||||||
'bullist',
|
|
||||||
'|',
|
|
||||||
'formatselect',
|
|
||||||
'fontselect',
|
|
||||||
'fontsizeselect',
|
|
||||||
'|',
|
|
||||||
'link',
|
|
||||||
'charmap',
|
|
||||||
'anchor',
|
|
||||||
'pagebreak',
|
|
||||||
'|',
|
|
||||||
'ltr',
|
|
||||||
'rtl'
|
|
||||||
].join(' ');
|
|
||||||
|
|
||||||
// 默认配置
|
|
||||||
export const DEFAULT_CONFIG: RawEditorSettings = {
|
|
||||||
height: 300,
|
|
||||||
branding: false,
|
|
||||||
skin_url: BASE_URL + 'tinymce/skins/ui/oxide',
|
|
||||||
content_css: BASE_URL + 'tinymce/skins/content/default/content.min.css',
|
|
||||||
language_url: BASE_URL + 'tinymce/langs/zh_CN.js',
|
|
||||||
language: 'zh_CN',
|
|
||||||
plugins: PLUGINS,
|
|
||||||
toolbar: TOOLBAR,
|
|
||||||
draggable_modal: true,
|
|
||||||
toolbar_mode: 'sliding',
|
|
||||||
quickbars_insert_toolbar: '',
|
|
||||||
images_upload_handler: (blobInfo: any, success: any, error: any) => {
|
|
||||||
if (blobInfo.blob().size / 1024 > 400) {
|
|
||||||
error('大小不能超过 400KB');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
success('data:image/jpeg;base64,' + blobInfo.base64());
|
|
||||||
},
|
|
||||||
file_picker_types: 'media',
|
|
||||||
file_picker_callback: () => {}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 暗黑主题配置
|
|
||||||
export const DARK_CONFIG: RawEditorSettings = {
|
|
||||||
skin_url: BASE_URL + 'tinymce/skins/ui/oxide-dark',
|
|
||||||
content_css: BASE_URL + 'tinymce/skins/content/dark/content.min.css'
|
|
||||||
};
|
|
||||||
|
|
||||||
// 支持监听的事件
|
|
||||||
export const VALID_EVENTS = [
|
|
||||||
'onActivate',
|
|
||||||
'onAddUndo',
|
|
||||||
'onBeforeAddUndo',
|
|
||||||
'onBeforeExecCommand',
|
|
||||||
'onBeforeGetContent',
|
|
||||||
'onBeforeRenderUI',
|
|
||||||
'onBeforeSetContent',
|
|
||||||
'onBeforePaste',
|
|
||||||
'onBlur',
|
|
||||||
'onChange',
|
|
||||||
'onClearUndos',
|
|
||||||
'onClick',
|
|
||||||
'onContextMenu',
|
|
||||||
'onCopy',
|
|
||||||
'onCut',
|
|
||||||
'onDblclick',
|
|
||||||
'onDeactivate',
|
|
||||||
'onDirty',
|
|
||||||
'onDrag',
|
|
||||||
'onDragDrop',
|
|
||||||
'onDragEnd',
|
|
||||||
'onDragGesture',
|
|
||||||
'onDragOver',
|
|
||||||
'onDrop',
|
|
||||||
'onExecCommand',
|
|
||||||
'onFocus',
|
|
||||||
'onFocusIn',
|
|
||||||
'onFocusOut',
|
|
||||||
'onGetContent',
|
|
||||||
'onHide',
|
|
||||||
'onInit',
|
|
||||||
'onKeyDown',
|
|
||||||
'onKeyPress',
|
|
||||||
'onKeyUp',
|
|
||||||
'onLoadContent',
|
|
||||||
'onMouseDown',
|
|
||||||
'onMouseEnter',
|
|
||||||
'onMouseLeave',
|
|
||||||
'onMouseMove',
|
|
||||||
'onMouseOut',
|
|
||||||
'onMouseOver',
|
|
||||||
'onMouseUp',
|
|
||||||
'onNodeChange',
|
|
||||||
'onObjectResizeStart',
|
|
||||||
'onObjectResized',
|
|
||||||
'onObjectSelected',
|
|
||||||
'onPaste',
|
|
||||||
'onPostProcess',
|
|
||||||
'onPostRender',
|
|
||||||
'onPreProcess',
|
|
||||||
'onProgressState',
|
|
||||||
'onRedo',
|
|
||||||
'onRemove',
|
|
||||||
'onReset',
|
|
||||||
'onSaveContent',
|
|
||||||
'onSelectionChange',
|
|
||||||
'onSetAttrib',
|
|
||||||
'onSetContent',
|
|
||||||
'onShow',
|
|
||||||
'onSubmit',
|
|
||||||
'onUndo',
|
|
||||||
'onVisualAid'
|
|
||||||
];
|
|
||||||
|
|
||||||
let unique = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成编辑器 id
|
|
||||||
*/
|
|
||||||
export function uuid(prefix: string): string {
|
|
||||||
const time = Date.now();
|
|
||||||
const random = Math.floor(Math.random() * 1000000000);
|
|
||||||
unique++;
|
|
||||||
return prefix + '_' + random + unique + String(time);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定事件
|
|
||||||
*/
|
|
||||||
export function bindHandlers(
|
|
||||||
initEvent: EditorEvent<any>,
|
|
||||||
listeners: Record<string, any>,
|
|
||||||
editor: TinyMCEEditor
|
|
||||||
): void {
|
|
||||||
const validEvents = VALID_EVENTS.map((event) => event.toLowerCase());
|
|
||||||
Object.keys(listeners)
|
|
||||||
.filter((key: string) => validEvents.includes(key.toLowerCase()))
|
|
||||||
.forEach((key: string) => {
|
|
||||||
const handler = listeners[key];
|
|
||||||
if (typeof handler === 'function') {
|
|
||||||
if (key === 'onInit') {
|
|
||||||
handler(initEvent, editor);
|
|
||||||
} else {
|
|
||||||
editor.on(key.substring(2), (e: EditorEvent<any>) =>
|
|
||||||
handler(e, editor)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 弹出提示框
|
|
||||||
*/
|
|
||||||
export function openAlert(
|
|
||||||
editor: TinyMCEEditor | null,
|
|
||||||
option: AlertOption = {}
|
|
||||||
) {
|
|
||||||
editor?.windowManager?.open({
|
|
||||||
title: option.title ?? '提示',
|
|
||||||
body: {
|
|
||||||
type: 'panel',
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
type: 'htmlpanel',
|
|
||||||
html: `<p>${option.content ?? ''}</p>`
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
buttons: [
|
|
||||||
{
|
|
||||||
type: 'cancel',
|
|
||||||
name: 'closeButton',
|
|
||||||
text: '确定',
|
|
||||||
primary: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface AlertOption {
|
|
||||||
title?: string;
|
|
||||||
content?: string;
|
|
||||||
}
|
|
||||||
@@ -6,14 +6,18 @@ import type {Company} from "~/api/system/company/model";
|
|||||||
import type {Layout} from "~/api/layout/model";
|
import type {Layout} from "~/api/layout/model";
|
||||||
import type {Config} from "~/types/global";
|
import type {Config} from "~/types/global";
|
||||||
import type {CmsWebsiteField} from "~/api/cms/cmsWebsiteField/model";
|
import type {CmsWebsiteField} from "~/api/cms/cmsWebsiteField/model";
|
||||||
|
import type {CmsWebsiteSetting} from "~/api/cms/cmsWebsiteSetting/model";
|
||||||
|
|
||||||
// 网站信息
|
// 网站信息
|
||||||
export const useWebsite = () =>
|
export const useWebsite = () => useState<CmsWebsite>('website', undefined);
|
||||||
useState<CmsWebsite>('website', () => {
|
|
||||||
|
// 网站设置
|
||||||
|
export const useSetting = () =>
|
||||||
|
useState<CmsWebsiteSetting>('setting', () => {
|
||||||
return {};
|
return {};
|
||||||
});
|
});
|
||||||
|
|
||||||
// 参数配置
|
// 扩展字段
|
||||||
export const useConfigInfo = () =>
|
export const useConfigInfo = () =>
|
||||||
useState<Config>('config', () => {
|
useState<Config>('config', () => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ export const APP_SECRET = 'ffd6eee985af45e4a75098422d1decbb';
|
|||||||
|
|
||||||
export const domain = 'https://websoft.top';
|
export const domain = 'https://websoft.top';
|
||||||
// 主节点
|
// 主节点
|
||||||
export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://common-api.websoft.top/api';
|
export const SERVER_API_URL = import.meta.env.VITE_SERVER_URL || 'https://server.gxwebsoft.com/api';
|
||||||
// 模块节点
|
// 模块节点
|
||||||
export const MODULES_API_URL = import.meta.env.VITE_API_URL || 'https://cms-api.websoft.top/api';
|
export const MODULES_API_URL = import.meta.env.VITE_API_URL || 'https://cms-api.websoft.top/api';
|
||||||
export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://common-api.websoft.top/api';
|
export const COMMON_API_URL = import.meta.env.VITE_THINK_URL || 'https://server.gxwebosoft.com/api';
|
||||||
// 文件服务器地址
|
// 文件服务器地址
|
||||||
export const FILE_SERVER = 'https://file.wsdns.cn';
|
export const FILE_SERVER = 'https://file.wsdns.cn';
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="overflow-x-hidden">
|
<div class="overflow-x-hidden">
|
||||||
<AppHeader />
|
<AppHeader/>
|
||||||
<slot/>
|
<slot/>
|
||||||
<AppFooter />
|
<AppFooter/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useMenu, useSubMenu, useWebsite} from "~/composables/configState";
|
import {useMenu, useSetting, useSubMenu, useWebsite} from "~/composables/configState";
|
||||||
import {getLoacl, setLocal} from "~/utils/state";
|
import {getLoacl, setLocal} from "~/utils/state";
|
||||||
import {useI18n} from "#imports";
|
import {useI18n} from "#imports";
|
||||||
import {getSiteInfo} from "~/api/layout";
|
import {getSiteInfo} from "~/api/layout";
|
||||||
import {getTenantIdByDomain} from "~/api/cms/cmsDomain";
|
import {getTenantIdByDomain} from "~/api/cms/cmsDomain";
|
||||||
|
import {getCmsWebsiteSetting} from "~/api/cms/cmsWebsiteSetting";
|
||||||
|
|
||||||
// 加载状态
|
// 加载状态
|
||||||
const website = useWebsite()
|
const website = useWebsite()
|
||||||
const menu = useMenu()
|
const menu = useMenu()
|
||||||
const subMenu = useSubMenu()
|
const subMenu = useSubMenu()
|
||||||
|
const setting = useSetting()
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
|
|
||||||
|
|
||||||
@@ -45,17 +47,16 @@ const reload = async () => {
|
|||||||
getTenantIdByDomain({
|
getTenantIdByDomain({
|
||||||
domain
|
domain
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
if(data?.count && data.count > 0){
|
if (data?.count && data.count > 0) {
|
||||||
console.log('域名已授权 => ',data.list[0].domain)
|
console.log('域名已授权 => ', data.list[0].domain)
|
||||||
localStorage.setItem('TenantId',`${data?.list[0].tenantId}`)
|
localStorage.setItem('TenantId', `${data?.list[0].tenantId}`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO 2 读取服务器缓存数据
|
// TODO 2 读取服务器缓存数据
|
||||||
getSiteInfo({
|
getSiteInfo({})
|
||||||
lang: i18n.locale.value
|
.then(data => {
|
||||||
}).then(data => {
|
|
||||||
website.value = data
|
website.value = data
|
||||||
if (data.topNavs) {
|
if (data.topNavs) {
|
||||||
menu.value = data.topNavs;
|
menu.value = data.topNavs;
|
||||||
@@ -63,10 +64,14 @@ const reload = async () => {
|
|||||||
if (data.bottomNavs) {
|
if (data.bottomNavs) {
|
||||||
subMenu.value = data.bottomNavs;
|
subMenu.value = data.bottomNavs;
|
||||||
}
|
}
|
||||||
if(data.config){
|
if (data.config) {
|
||||||
localStorage.setItem('Domain',data.config.Domain);
|
localStorage.setItem('Domain', data.config.Domain);
|
||||||
localStorage.setItem('SysDomain',data.config.SysDomain);
|
localStorage.setItem('SysDomain', data.config.SysDomain);
|
||||||
}
|
}
|
||||||
|
// 网站设置信息
|
||||||
|
getCmsWebsiteSetting(Number(data.websiteId)).then(res => {
|
||||||
|
setting.value = res;
|
||||||
|
})
|
||||||
// seo
|
// seo
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
description: data.comments || data.websiteName,
|
description: data.comments || data.websiteName,
|
||||||
@@ -74,13 +79,20 @@ const reload = async () => {
|
|||||||
titleTemplate: localStorage.getItem('SiteName')
|
titleTemplate: localStorage.getItem('SiteName')
|
||||||
})
|
})
|
||||||
// 站点状态
|
// 站点状态
|
||||||
if(data.running != 1){
|
if (data.running != 1) {
|
||||||
showError({
|
showError({
|
||||||
statusCode: data.running,
|
statusCode: data.running,
|
||||||
message: data.statusText
|
message: data.statusText
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
showError({
|
||||||
|
statusCode: 0,
|
||||||
|
message: '未开通'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
loading.close();
|
loading.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {useIsMobile, useToken} from "~/composables/configState";
|
|||||||
* @description 路由守卫
|
* @description 路由守卫
|
||||||
*/
|
*/
|
||||||
export default defineNuxtRouteMiddleware((to, from) => {
|
export default defineNuxtRouteMiddleware((to, from) => {
|
||||||
const matchers = ['/user'];
|
const matchers = ['/user','/developer'];
|
||||||
if(matchers.includes(to.path)){
|
if(matchers.includes(to.path)){
|
||||||
if(import.meta.client){
|
if(import.meta.client){
|
||||||
let token = useToken()
|
let token = useToken()
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const appName = '网宿软件';
|
|||||||
|
|
||||||
const isDev = process.env.NODE_ENV === 'development'
|
const isDev = process.env.NODE_ENV === 'development'
|
||||||
if(isDev){
|
if(isDev){
|
||||||
apiBaseUrl = 'http://127.0.0.1:9002/api'
|
apiBaseUrl = 'http://127.0.0.1:9000/api'
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
|
|||||||
89
pages/case/components/AppInfo.vue
Normal file
89
pages/case/components/AppInfo.vue
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="form" class="app-info bg-white py-5 flex justify-around items-center">
|
||||||
|
<div class="item text-center">
|
||||||
|
<div class="rate text-gray-400">评分</div>
|
||||||
|
<div class="text-2xl font-bold">3.1</div>
|
||||||
|
<el-rate v-model="form.rate" disabled size="small"/>
|
||||||
|
</div>
|
||||||
|
<el-divider class="opacity-40" style="height: 40px" direction="vertical" />
|
||||||
|
<div class="item text-center flex flex-col items-center">
|
||||||
|
<div class="text-gray-400">类别</div>
|
||||||
|
<el-icon size="24" class="py-1"><Monitor /></el-icon>
|
||||||
|
<span class="text-gray-500">{{ form.industryParent || '网站' }}</span>
|
||||||
|
</div>
|
||||||
|
<el-divider class="opacity-40" style="height: 40px" direction="vertical" />
|
||||||
|
<nuxt-link :to="`https://${form.domain}`" class="item text-center flex flex-col items-center">
|
||||||
|
<div class="text-gray-400">域名</div>
|
||||||
|
<div>
|
||||||
|
<svg t="1739721752315" class="icon pt-2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11933" width="22" height="22"><path d="M319.9 428.9h37.7l-66.1 216.7H259c-28.9-98-43.9-149.1-44.9-154.3-2.1-4.6-3.1-12.4-3.1-23.2h-1c0 4.6-1 12.4-3.1 23.2-2.1 4.6-18.1 56.2-48 154.3h-32.5l-63-216.7h37.7c23.7 91.3 36.6 141.4 38.7 149.6 0 0.5 0.5 1.5 1 3.1 1.5 9.8 2.1 17 2.1 21.2h1c0-7.7 1.5-15.5 4.1-24.3 2.1-5.7 17-55.7 44.9-149.6h35.6c25.8 94.4 39.7 144.5 41.8 149.6 2.6 8.3 4.1 16.5 4.1 24.3h1c0-4.1 0.5-11.4 2.1-21.2 0.5-1.5 1-2.6 1-3.1 2.7-8.2 16.1-58.2 41.4-149.6z m300.8 0h37.7l-66.1 216.7h-32.5c-28.9-98-43.9-149.1-44.9-154.3-2.1-4.6-3.1-12.4-3.1-23.2h-1c0 4.6-1 12.4-3.1 23.2-2.1 4.6-18.1 56.2-48 154.3h-32.5l-63-216.7h37.7c23.7 91.3 36.6 141.4 38.7 149.6 0 0.5 0.5 1.5 1 3.1 1.5 9.8 2.1 17 2.1 21.2h0.5c0-7.7 1.5-15.5 4.1-24.3 2.1-5.7 17-55.7 44.9-149.6h35.6c25.8 94.4 39.7 144.5 41.8 149.6 2.6 8.3 4.1 16.5 4.1 24.3h1c0-4.1 0.5-11.4 2.1-21.2 0.5-1.5 1-2.6 1-3.1 3.2-8.2 16.6-58.2 41.9-149.6z m300.9 0h37.7l-66.1 216.7h-32.5c-28.9-98-43.9-149.1-44.9-154.3-2.1-4.6-3.1-12.4-3.1-23.2h-1c0 4.6-1 12.4-3.1 23.2-2.1 4.6-18.1 56.2-48 154.3h-32.5l-63-216.7h37.7c23.7 91.3 36.6 141.4 38.7 149.6 0 0.5 0.5 1.5 1 3.1 1.5 9.8 2.1 17 2.1 21.2h1c0-7.7 1.5-15.5 4.1-24.3 2.1-5.7 17-55.7 44.9-149.6h35.6C856 523.4 870 573.4 872 578.6c2.6 8.3 4.1 16.5 4.1 24.3h1c0-4.1 0.5-11.4 2.1-21.2 0.5-1.5 1-2.6 1-3.1 2.7-8.3 16.1-58.3 41.4-149.7z m-755.5-39.2C222.9 254 357 158.5 513.4 158.5S803.9 254 860.7 389.7h45.9c-58.8-160-212.6-274-393.2-274s-333.9 114-393.2 274h45.9z m691 299.3c-58.8 131.1-190.4 222.9-343.7 222.9-153.3 0-284.8-91.3-343.7-222.9h-46.4c61.4 155.3 212.6 265.2 390.1 265.2 177 0 328.7-109.9 390.1-265.2h-46.4z" fill="" p-id="11934"></path><path d="M513.4 217.8c-123.2 0-230.1 69.7-283.4 171.9h-14.9c54.4-109.8 167.6-185.2 298.4-185.2" fill="" p-id="11935"></path></svg>
|
||||||
|
</div>
|
||||||
|
<!-- <el-icon size="24" class="py-1"><Compass /></el-icon>-->
|
||||||
|
<span class="text-gray-500">{{ form.domain }}</span>
|
||||||
|
</nuxt-link>
|
||||||
|
<el-divider class="opacity-40" style="height: 40px" direction="vertical" />
|
||||||
|
<nuxt-link :to="`/market/user/${form.userId}`" class="item text-center flex flex-col items-center">
|
||||||
|
<div class="text-gray-400">开发者</div>
|
||||||
|
<el-icon size="24" class="py-1"><Avatar /></el-icon>
|
||||||
|
<span class="text-gray-500">{{'WebSoft Inc.'}}</span>
|
||||||
|
</nuxt-link>
|
||||||
|
<el-divider class="opacity-40" style="height: 40px" direction="vertical" />
|
||||||
|
<nuxt-link :to="`http://git.gxwebsoft.com`" class="item text-center">
|
||||||
|
<div class="text-gray-400">仓库</div>
|
||||||
|
<div class="text-2xl font-bold">
|
||||||
|
<!-- <svg t="1739721615244" class="icon pt-2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10773" width="22" height="22"><path d="M512 64c81.636 0 156.8 19.911 225.493 59.733s122.951 94.08 162.773 162.773S960 430.364 960 512s-19.911 156.8-59.733 225.493-94.08 122.951-162.773 162.773S593.636 960 512 960s-156.8-19.911-225.493-59.733-122.951-94.08-162.773-162.773S64 593.636 64 512s19.911-156.8 59.733-225.493 94.08-122.951 162.773-162.773S430.364 64 512 64z m119.467 812.373c57.742-17.92 108.516-48.782 152.32-92.587 43.804-43.805 75.164-94.578 94.08-152.32 18.916-57.742 23.396-117.476 13.44-179.2-9.956-61.724-32.853-117.476-68.693-167.253-35.84-49.778-81.138-88.604-135.893-116.48C631.964 140.658 573.724 126.72 512 126.72s-119.964 13.938-174.72 41.813-100.053 66.702-135.893 116.48-58.738 105.529-68.693 167.253c-9.956 61.724-5.476 121.458 13.44 179.2s50.276 108.516 94.08 152.32c43.804 43.804 94.578 74.667 152.32 92.587h2.987c5.973 0 10.951-1.493 14.933-4.48 3.982-2.987 5.973-7.467 5.973-13.44v-65.707l-20.907 2.987H377.6c-19.911 1.991-38.329-1.991-55.253-11.947S293.974 759.893 288 741.973l-17.92-32.853-11.947-11.947-23.893-17.92c-3.982-3.982-5.973-6.969-5.973-8.96s0.996-3.982 2.987-5.973l14.933-2.987c5.973 0 11.947 1.493 17.92 4.48 5.973 2.987 11.947 5.476 17.92 7.467l11.947 14.933 11.947 11.947c7.964 13.938 17.422 24.889 28.373 32.853 10.951 7.964 23.893 11.449 38.827 10.453 14.933-0.996 29.369-4.48 43.307-10.453 1.991-9.956 4.978-19.413 8.96-28.373 3.982-8.96 8.96-16.427 14.933-22.4-25.884-1.991-49.778-7.467-71.68-16.427-21.902-8.96-40.818-21.404-56.747-37.333-15.929-15.929-26.88-34.844-32.853-56.747-7.964-25.884-11.947-52.764-11.947-80.64 0-17.92 3.484-35.84 10.453-53.76 6.969-17.92 16.427-33.849 28.373-47.787-1.991-7.964-3.484-15.431-4.48-22.4s-1.493-14.933-1.493-23.893 0.996-17.92 2.987-26.88c1.991-8.96 3.982-18.418 5.973-28.373h8.96c7.964 0 16.427 0.996 25.387 2.987s17.422 4.978 25.387 8.96l26.88 14.933 20.907 11.947c63.716-17.92 127.431-17.92 191.147 0l20.907-11.947 26.88-14.933c7.964-3.982 15.929-6.969 23.893-8.96 7.964-1.991 16.924-2.987 26.88-2.987h5.973c3.982 9.956 6.969 19.413 8.96 28.373 1.991 8.96 2.987 17.92 2.987 26.88 0 8.96-0.498 16.924-1.493 23.893s-2.489 14.436-4.48 22.4c11.947 13.938 21.404 29.867 28.373 47.787 6.969 17.92 10.453 35.84 10.453 53.76 0 27.876-3.982 54.756-11.947 80.64-5.973 21.902-16.924 40.818-32.853 56.747-15.929 15.929-35.342 28.373-58.24 37.333-22.898 8.96-47.289 14.436-73.173 16.427 9.956 7.964 16.924 18.418 20.907 31.36 3.982 12.942 5.973 26.382 5.973 40.32v104.533c0 5.973 1.991 10.453 5.973 13.44 3.982 2.987 7.964 4.48 11.947 4.48h5.972z" p-id="10774"></path></svg>-->
|
||||||
|
<svg t="1739720696276" class="icon pt-2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4176" width="22" height="22"><path d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9 23.5 23.2 38.1 55.4 38.1 91v112.5c0.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z" p-id="4177"></path></svg>
|
||||||
|
</div>
|
||||||
|
<span class="text-gray-500">3.12 MB</span>
|
||||||
|
</nuxt-link>
|
||||||
|
<el-divider class="opacity-40" style="height: 40px" direction="vertical" />
|
||||||
|
<div class="item text-center flex flex-col items-center">
|
||||||
|
<div class="text-gray-400">插件ID</div>
|
||||||
|
<el-icon size="24" class="py-1"><Cpu /></el-icon>
|
||||||
|
<span class="text-gray-500">{{ form.websiteId }}</span>
|
||||||
|
</div>
|
||||||
|
<!-- <el-divider class="opacity-40" style="height: 40px" direction="vertical" />-->
|
||||||
|
<!-- <div class="item text-center flex flex-col items-center">-->
|
||||||
|
<!-- <div class="text-gray-400">下载次数</div>-->
|
||||||
|
<!-- <el-icon size="24" class="py-1"><Download /></el-icon>-->
|
||||||
|
<!-- <span class="text-gray-500">{{ form.downloads }}</span>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ArrowLeft,View, Menu, Search,Compass, Cpu,Monitor, Download, Platform, Avatar } from '@element-plus/icons-vue'
|
||||||
|
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
|
||||||
|
|
||||||
|
const i18n = useI18n();
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
title?: string;
|
||||||
|
desc?: string;
|
||||||
|
buyUrl?: string;
|
||||||
|
form?: CmsWebsite;
|
||||||
|
value?: number;
|
||||||
|
}>(),
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done', where: any): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
// 搜索表单
|
||||||
|
const where = reactive<any>({
|
||||||
|
keywords: '',
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
status: 0,
|
||||||
|
parentId: undefined,
|
||||||
|
categoryId: undefined,
|
||||||
|
lang: i18n.locale.value
|
||||||
|
});
|
||||||
|
|
||||||
|
const reload = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
reload();
|
||||||
|
</script>
|
||||||
195
pages/case/components/Comments.vue
Normal file
195
pages/case/components/Comments.vue
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
<template>
|
||||||
|
<el-descriptions title="评分及评价">
|
||||||
|
<template #extra>
|
||||||
|
<el-button type="text" @click="onComplaint">投诉</el-button>
|
||||||
|
<el-button type="text" @click="onComments">发表评论</el-button>
|
||||||
|
</template>
|
||||||
|
</el-descriptions>
|
||||||
|
<form
|
||||||
|
ref="formRef"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-position="top"
|
||||||
|
class="w-full sm:py-2"
|
||||||
|
size="large"
|
||||||
|
status-icon
|
||||||
|
>
|
||||||
|
<template v-if="comments && comments.length > 0">
|
||||||
|
<div class="w-full p-4 bg-white">
|
||||||
|
<div v-for="(item,index) in comments" :key="index"
|
||||||
|
class="flex flex-col border-b-2 border-gray-200 pb-2 mb-3"
|
||||||
|
style="border-bottom:1px solid #f3f3f3">
|
||||||
|
<el-space class="user-info flex items-start" style="align-items:normal">
|
||||||
|
<div class="avatar">
|
||||||
|
<el-avatar :src="item.logo"/>
|
||||||
|
</div>
|
||||||
|
<div class="nickname flex flex-col">
|
||||||
|
<el-space class="text-sm text-gray-900">
|
||||||
|
<span class="font-bold">{{ item.tenantName }}</span>
|
||||||
|
<el-rate v-model="item.rate" disabled size="small"/>
|
||||||
|
</el-space>
|
||||||
|
<span class="text-xs text-gray-400">{{ item.createTime }}</span>
|
||||||
|
<div class="comments py-2" v-html="item.comments"></div>
|
||||||
|
<template v-if="item.children" v-for="(sub,index2) in item.children" :key="index2">
|
||||||
|
<el-space class="text-sm text-gray-900">
|
||||||
|
<el-avatar :src="sub.logo" size="small"/>
|
||||||
|
<span class="font-bold">{{ sub.tenantName }}</span>
|
||||||
|
<span class="text-xs text-gray-400">{{ sub.createTime }}</span>
|
||||||
|
</el-space>
|
||||||
|
<div class="comments py-2" v-html="sub.comments"></div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</el-space>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pagination flex justify-center">
|
||||||
|
<el-pagination background layout="prev, pager, next" size="small" :total="count" @change="onPageChange"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
暂无用户评论
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 发表评论 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
title="发表评论"
|
||||||
|
align-center
|
||||||
|
width="500"
|
||||||
|
:before-close="() => visible = false"
|
||||||
|
>
|
||||||
|
<el-form-item prop="rate">
|
||||||
|
<el-rate v-model="form.rate" size="large" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="comments">
|
||||||
|
<el-input v-model="form.comments" :rows="5" type="textarea"
|
||||||
|
placeholder="最多300字,支持 markdown 语法。请认真填写评论内容,以便于帮助作者更好完善插件,如需反馈问题,请到下方插件提问进行提交。"/>
|
||||||
|
</el-form-item>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm(formRef)">
|
||||||
|
提交
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 发起投诉 -->
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible2"
|
||||||
|
title="为什么举报此内容?"
|
||||||
|
align-center
|
||||||
|
width="500"
|
||||||
|
:before-close="() => visible2 = false"
|
||||||
|
>
|
||||||
|
<el-checkbox-group v-model="checkList">
|
||||||
|
<el-checkbox label="与我无关" value="与我无关"/>
|
||||||
|
<el-checkbox label="文章过时" value="文章过时"/>
|
||||||
|
<el-checkbox label="标题有误" value="标题有误"/>
|
||||||
|
<el-checkbox label="图像质量差或视觉缺陷" value="图像质量差或视觉缺陷"/>
|
||||||
|
<el-checkbox label="垃圾邮件" value="垃圾邮件"/>
|
||||||
|
<el-checkbox label="成人或违法违规内容" value="成人或违法违规内容"/>
|
||||||
|
<el-checkbox label="侵犯知识产权" value="侵犯知识产权"/>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<div class="py-3">
|
||||||
|
<el-input v-model="form.comments" :rows="5" type="textarea"
|
||||||
|
placeholder="在此处输入反馈。请记住不要包含个人信息,如电话号码。"/>
|
||||||
|
</div>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="visible2 = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submitForm(formRef)">
|
||||||
|
提交
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {FullScreen} from '@element-plus/icons-vue'
|
||||||
|
import type {ApiResult} from "~/api";
|
||||||
|
import type {FormInstance, FormRules} from "element-plus";
|
||||||
|
import {useClientRequest} from "~/composables/useClientRequest";
|
||||||
|
import {reactive, ref} from "vue";
|
||||||
|
import useFormData from "~/utils/use-form-data";
|
||||||
|
import type {CompanyComment} from "~/api/system/companyComment/model";
|
||||||
|
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
title?: string;
|
||||||
|
companyId?: number;
|
||||||
|
comments?: CompanyComment[];
|
||||||
|
count?: number;
|
||||||
|
}>(),
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
const formRef = ref<FormInstance>()
|
||||||
|
const visible = ref<boolean>(false);
|
||||||
|
const visible2 = ref<boolean>(false);
|
||||||
|
const checkList = ref<string[]>([]);
|
||||||
|
const loading = ref<boolean>(true)
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done', page: number): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
// 配置信息
|
||||||
|
const {form, resetFields} = useFormData<CompanyComment>({
|
||||||
|
id: undefined,
|
||||||
|
parentId: undefined,
|
||||||
|
userId: undefined,
|
||||||
|
companyId: undefined,
|
||||||
|
rate: undefined,
|
||||||
|
sortNumber: undefined,
|
||||||
|
comments: undefined,
|
||||||
|
status: undefined,
|
||||||
|
});
|
||||||
|
|
||||||
|
const rules = reactive<FormRules<any>>({
|
||||||
|
rate: [
|
||||||
|
{required: true, message: '请输入评分', trigger: 'blur'},
|
||||||
|
],
|
||||||
|
comments: [
|
||||||
|
{required: true, message: '请输入手机号码', trigger: 'blur'},
|
||||||
|
{pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码', trigger: 'blur'},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
const onComments = () => {
|
||||||
|
visible.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const onComplaint = () => {
|
||||||
|
visible2.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const onPageChange = (page: number) => {
|
||||||
|
emit('done', page)
|
||||||
|
}
|
||||||
|
|
||||||
|
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||||
|
if (!formEl) return
|
||||||
|
if (form.rate === 0) {
|
||||||
|
ElMessage.error('还没有评分哦!')
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
form.companyId = Number(getIdBySpm(5));
|
||||||
|
useClientRequest<ApiResult<any>>(`/system/company-comment`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: form
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
visible.value = false
|
||||||
|
resetFields();
|
||||||
|
emit('done',0)
|
||||||
|
} else {
|
||||||
|
return ElMessage.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
102
pages/case/components/PageBanner.vue
Normal file
102
pages/case/components/PageBanner.vue
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
<template>
|
||||||
|
<div class="banner m-auto relative sm:flex">
|
||||||
|
<div class="md:w-screen-xl m-auto py-10">
|
||||||
|
<div class="gap-8 sm:gap-y-16 lg:items-center" v-if="form">
|
||||||
|
<div class="w-full sm:px-0 px-4">
|
||||||
|
<div class="flex flex-1">
|
||||||
|
<template v-if="form.websiteLogo">
|
||||||
|
<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"/>
|
||||||
|
</template>
|
||||||
|
<div class="title flex flex-col">
|
||||||
|
<h1
|
||||||
|
class="text-2xl font-bold tracking-tight text-gray-900 dark:text-white sm:text-3xl lg:text-3xl">
|
||||||
|
<el-space>
|
||||||
|
<span>{{ form.websiteName }}</span>
|
||||||
|
</el-space>
|
||||||
|
</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">
|
||||||
|
{{ form?.comments || desc }}
|
||||||
|
</div>
|
||||||
|
<el-space class="btn">
|
||||||
|
<nuxt-link target="_blank"><el-button type="primary" round>获取</el-button></nuxt-link>
|
||||||
|
</el-space>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import type {ApiResult} from "~/api";
|
||||||
|
import type {Company} from "~/api/system/company/model";
|
||||||
|
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
|
||||||
|
|
||||||
|
const token = useToken();
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
title?: string;
|
||||||
|
desc?: string;
|
||||||
|
buyUrl?: string;
|
||||||
|
form?: CmsWebsite;
|
||||||
|
value?: number;
|
||||||
|
}>(),
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done'): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const onBuy = (item: Company) => {
|
||||||
|
// if(item.type === 1){
|
||||||
|
// // 插件
|
||||||
|
// openSpmUrl(`/product/checkout`,item,item.productId)
|
||||||
|
// }else {
|
||||||
|
// // 产品
|
||||||
|
// openSpmUrl(`/product/create`,item,item.productId)
|
||||||
|
// }
|
||||||
|
if (!token.value || token.value == '') {
|
||||||
|
ElMessage.error('请先登录');
|
||||||
|
setTimeout(() => {
|
||||||
|
navigateTo(`/product/create`)
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 安装插件
|
||||||
|
const installPlug = () => {
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '安装中...'
|
||||||
|
})
|
||||||
|
useClientRequest<ApiResult<any>>(`/system/menu/install`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: {
|
||||||
|
companyId: getIdBySpm(5)
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
setTimeout(() => {
|
||||||
|
ElMessage.success(res.message);
|
||||||
|
loading.close()
|
||||||
|
emit('done')
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
.rounded-avatar {
|
||||||
|
border-radius: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rounded-avatar-xs {
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
45
pages/case/components/SearchBar.vue
Normal file
45
pages/case/components/SearchBar.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<el-space class="flex items-center">
|
||||||
|
<el-input v-model="where.keywords" :placeholder="`${$t('searchKeywords')}...`" :suffix-icon="Search" @change="reload"/>
|
||||||
|
</el-space>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { Search } from '@element-plus/icons-vue'
|
||||||
|
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
||||||
|
|
||||||
|
const i18n = useI18n();
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
title?: string;
|
||||||
|
desc?: string;
|
||||||
|
buyUrl?: string;
|
||||||
|
form?: CmsArticle;
|
||||||
|
value?: number;
|
||||||
|
}>(),
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done', where: any): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
// 搜索表单
|
||||||
|
const where = reactive<any>({
|
||||||
|
keywords: '',
|
||||||
|
page: 1,
|
||||||
|
limit: 20,
|
||||||
|
status: 0,
|
||||||
|
parentId: undefined,
|
||||||
|
categoryId: undefined,
|
||||||
|
lang: i18n.locale.value
|
||||||
|
});
|
||||||
|
|
||||||
|
const reload = () => {
|
||||||
|
navigateTo(`/search/${where.keywords}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
</style>
|
||||||
@@ -4,116 +4,94 @@
|
|||||||
<div class="xl:w-screen-xl m-auto py-4 mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 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 mr-3"> {{ page.title || '客户案例' }} </span>
|
<span class="text-large font-600 mr-3"> 客户案例 </span>
|
||||||
|
</template>
|
||||||
|
<template #extra>
|
||||||
|
<el-space class="flex items-center">
|
||||||
|
<el-input v-model="where.keywords" style="width: 400px" :placeholder="`搜索关键词`" :suffix-icon="Search"
|
||||||
|
@change="reload"/>
|
||||||
|
</el-space>
|
||||||
</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">
|
<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-gray-50 cursor-pointer" @click="navigateTo(`/detail/${item.articleId}.html`)">
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class="cursor-pointer" @mouseover="showDomain(item)"
|
||||||
<el-image
|
@mouseleave="hideDomain">
|
||||||
:src="item.image"
|
<nuxt-link :to="`/market/${item.websiteId}`">
|
||||||
fit="cover"
|
<div class="flex-1 px-4 py-5 sm:p-4 !p-4">
|
||||||
:lazy="true" class="w-full md:h-[166px] h-[199px] cursor-pointer bg-gray-50"/>
|
<div class="text-gray-700 dark:text-white text-base font-semibold flex gap-1.5">
|
||||||
<div class="flex-1 px-4 py-5 sm:p-6 !p-4">
|
<el-avatar
|
||||||
<div class="text-gray-700 dark:text-white text-base font-semibold flex flex-col gap-1.5">
|
:src="item.websiteLogo" shape="square" :size="55" style="background-color: white;"/>
|
||||||
<div class="flex-1 text-xl cursor-pointer flex items-center">
|
<div class="flex-1 text-lg cursor-pointer flex flex-col">
|
||||||
{{ item.title }}
|
{{ item.websiteName }}
|
||||||
</div>
|
<div class="flex justify-between items-center">
|
||||||
</div>
|
<sapn class="text-xs text-gray-400 font-normal line-clamp-1">
|
||||||
<div class="flex items-center gap-1.5 py-2 text-gray-500 justify-between">
|
{{ id == item.websiteId ? item.domain : item.comments || '暂无描述' }}
|
||||||
<div class="text-gray-500 line-clamp-2">{{ item.comments }}</div>
|
</sapn>
|
||||||
</div>
|
<el-button size="small" round>获取</el-button>
|
||||||
<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">
|
|
||||||
{{ dayjs(item.createTime).format('YYYY-MM-DD') }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
||||||
|
</nuxt-link>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
|
|
||||||
<Pagination :total="total" @done="search" />
|
<Pagination :total="total" @done="search"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Banner from "@/components/Banner.vue";
|
import {ArrowLeft, Search} from '@element-plus/icons-vue'
|
||||||
import { ArrowLeft,View, Search } from '@element-plus/icons-vue'
|
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||||
import { ElNotification as notify } from 'element-plus'
|
import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
||||||
import {useConfigInfo, useLayout, usePage} from "~/composables/configState";
|
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
||||||
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
|
|
||||||
import type {CmsArticle, CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
|
||||||
import type { ComponentSize } from 'element-plus'
|
|
||||||
import { ElNotification } from 'element-plus'
|
|
||||||
import type { TabsPaneContext } from 'element-plus'
|
|
||||||
import { h } from 'vue'
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import {detail, getNavIdByParamsId, navTo, paramsId} from "~/utils/common";
|
|
||||||
import Left from "~/components/Left.vue";
|
|
||||||
import {getCmsNavigation, listCmsNavigation} from "~/api/cms/cmsNavigation";
|
|
||||||
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const navId = ref();
|
|
||||||
// 页面信息
|
// 页面信息
|
||||||
const list = ref<CmsArticle[]>([]);
|
const list = ref<CmsWebsite[]>([]);
|
||||||
const i18n = useI18n();
|
|
||||||
const category = ref<CmsNavigation[]>([]);
|
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const activeName = ref('2839');
|
const id = ref<number>();
|
||||||
|
|
||||||
// 获取状态
|
|
||||||
const page = usePage();
|
|
||||||
const layout = useLayout();
|
|
||||||
|
|
||||||
// 搜索表单
|
// 搜索表单
|
||||||
const where = reactive<CmsArticleParam>({
|
const where = reactive<CmsWebsiteParam>({
|
||||||
keywords: '',
|
keywords: '',
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 12,
|
||||||
model: 'case',
|
status: undefined,
|
||||||
status: 0,
|
recommend: undefined,
|
||||||
parentId: undefined,
|
search: true,
|
||||||
|
websiteType: undefined,
|
||||||
categoryId: undefined,
|
categoryId: undefined,
|
||||||
lang: i18n.locale.value
|
lang: undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
|
const showDomain = (item: CmsWebsite) => {
|
||||||
|
id.value = Number(item.websiteId);
|
||||||
|
};
|
||||||
|
|
||||||
|
const hideDomain = () => {
|
||||||
|
id.value = 0;
|
||||||
|
};
|
||||||
|
|
||||||
// 加载页面数据
|
// 加载页面数据
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
pageCmsArticle(where).then(response => {
|
await pageCmsWebsiteAll(where).then(response => {
|
||||||
if(response){
|
if (response?.list) {
|
||||||
|
list.value = response?.list;
|
||||||
total.value = response.count;
|
total.value = response.count;
|
||||||
list.value = response.list;
|
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
// seo
|
|
||||||
// useSeoMeta({
|
|
||||||
// description: data.comments || data.title,
|
|
||||||
// keywords: data.title,
|
|
||||||
// titleTemplate: `${data?.title}` + ' - %s',
|
|
||||||
// })
|
|
||||||
|
|
||||||
// 二级栏目分类
|
|
||||||
// listCmsNavigation({}).then(navigation => {
|
|
||||||
// category.value = navigation;
|
|
||||||
// // 加载文章列表
|
|
||||||
// if(data.parentId == 0 && category.value.length > 0){
|
|
||||||
// where.parentId = page.value.navigationId;
|
|
||||||
// }else {
|
|
||||||
// where.categoryId = page.value.navigationId;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// })
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -125,49 +103,15 @@ const search = (data: CmsArticleParam) => {
|
|||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
||||||
console.log(tab, event)
|
|
||||||
}
|
|
||||||
const value = ref('')
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
value: 'Option1',
|
|
||||||
label: 'Option1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'Option2',
|
|
||||||
label: 'Option2',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'Option3',
|
|
||||||
label: 'Option3',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'Option4',
|
|
||||||
label: 'Option4',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'Option5',
|
|
||||||
label: 'Option5',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
() => {
|
() => {
|
||||||
reload();
|
reload();
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{immediate: true}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.right .content img{
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
.demo-tabs > .el-tabs__content {
|
|
||||||
padding: 32px;
|
|
||||||
color: #6b778c;
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
|
<div class="w-full bg-white mb-3 hidden-sm-and-down" v-if="ad">
|
||||||
<el-carousel :height="'750px'">
|
<el-carousel :height="`${ad?.height || '500'}px`">
|
||||||
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
<el-carousel-item v-for="(item,index) in ad?.imageList" :key="index">
|
||||||
<div class="item relative flex justify-center items-center">
|
<div class="item relative flex justify-center items-center">
|
||||||
<el-image :src="item.url" />
|
<el-image :src="item.url" fit="cover" class="w-full" :style="`height: ${ad?.height}px;`" />
|
||||||
|
<!-- fit: '' | 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'-->
|
||||||
</div>
|
</div>
|
||||||
|
{{ad.height}}==
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,12 +101,12 @@
|
|||||||
<!-- <el-button size="large" type="danger" :icon="ElIconUser" @click="openUrl(`https://site.websoft.top`)">立即登录</el-button>-->
|
<!-- <el-button size="large" type="danger" :icon="ElIconUser" @click="openUrl(`https://site.websoft.top`)">立即登录</el-button>-->
|
||||||
<!-- <el-button size="large" type="primary" :icon="ElIconArrowRight" @click="openUrl(`https://site.websoft.top/register`)">免费注册</el-button>-->
|
<!-- <el-button size="large" type="primary" :icon="ElIconArrowRight" @click="openUrl(`https://site.websoft.top/register`)">免费注册</el-button>-->
|
||||||
|
|
||||||
<div class="flex flex-col justify-center cursor-pointer text-white items-center bg-gray-400 hover:bg-gray-500 w-[100px] h-[100px] rounded-full">
|
<div class="flex flex-col justify-center cursor-pointer text-white items-center bg-gray-400 hover:bg-green-600 w-[100px] h-[100px] rounded-full" @click="openUrl(`https://dl.wsdns.cn/soft/WebSoft-window.zip`)">
|
||||||
<img alt="Windows" src="data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E %3Cg fill='%23FFF' fill-rule='evenodd'%3E %3Cpath d='M6.316 21.826v9.025l10.99 1.539V21.826zm12.045 0v10.712l14.463 2.026V21.826zM6.316 11.767v9.004h10.99V10.205zM32.824 8l-14.463 2.055v10.716h14.463z' opacity='1'/%3E %3Cpath fill='none' d='M0 0h40v40H0z'/%3E %3C/g%3E%3C/svg%3E" />
|
<img alt="Windows" src="data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E %3Cg fill='%23FFF' fill-rule='evenodd'%3E %3Cpath d='M6.316 21.826v9.025l10.99 1.539V21.826zm12.045 0v10.712l14.463 2.026V21.826zM6.316 11.767v9.004h10.99V10.205zM32.824 8l-14.463 2.055v10.716h14.463z' opacity='1'/%3E %3Cpath fill='none' d='M0 0h40v40H0z'/%3E %3C/g%3E%3C/svg%3E" />
|
||||||
<span class="text-sm">Windows</span>
|
<span class="text-sm">Windows</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col justify-center cursor-pointer text-white items-center bg-gray-400 hover:bg-green-600 w-[100px] h-[100px] rounded-full" @click="openUrl(`https://oss.wsdns.cn/download/%E7%BD%91%E5%AE%BF%E8%BD%AF%E4%BB%B6%28OA%29-3.0.0-arm64.dmg`)">
|
<div class="flex flex-col justify-center cursor-pointer text-white items-center bg-gray-400 hover:bg-green-600 w-[100px] h-[100px] rounded-full" @click="openUrl(`https://dl.wsdns.cn/soft/WebSoft-3.0.0-arm64.dmg`)">
|
||||||
<img alt="macOs" src="data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='40' height='40' viewBox='0 0 40 40'%3E %3Cdefs%3E %3Cpath id='47f1323c-993c-4d45-aab1-bebb1206c2bb-a' d='M.001.592h26.926v24.039H.001z'/%3E %3C/defs%3E %3Cg fill='none' fill-rule='evenodd'%3E %3Cpath d='M0 0h40v40H0z'/%3E %3Cg opacity='1' transform='translate(6.316 2.737)'%3E %3Cg transform='translate(0 7.045)'%3E %3Cmask id='47f1323c-993c-4d45-aab1-bebb1206c2bb-b' fill='%23fff'%3E %3Cuse xlink:href='%2347f1323c-993c-4d45-aab1-bebb1206c2bb-a'/%3E %3C/mask%3E %3Cpath fill='%23FFF' d='M20.005.608c-2.722-.193-5.031 1.456-6.32 1.456-1.308 0-3.324-1.415-5.461-1.376-2.806.04-5.393 1.564-6.84 3.972C-1.531 9.506.64 16.687 3.479 20.62c1.389 1.922 3.045 4.088 5.221 4.009 2.094-.08 2.887-1.298 5.418-1.298 2.53 0 3.243 1.298 5.458 1.259 2.254-.04 3.683-1.962 5.061-3.894 1.596-2.23 2.251-4.39 2.29-4.505-.05-.018-4.394-1.614-4.437-6.408-.04-4.008 3.415-5.935 3.573-6.028C24.102.989 21.073.684 20.005.608' mask='url(%2347f1323c-993c-4d45-aab1-bebb1206c2bb-b)'/%3E %3C/g%3E %3Cpath fill='%23FFF' d='M18.325 5.057C19.482 3.718 20.26 1.854 20.045 0c-1.663.063-3.676 1.062-4.87 2.4-1.07 1.185-2.008 3.083-1.753 4.899 1.855.137 3.748-.902 4.903-2.242'/%3E %3C/g%3E %3C/g%3E%3C/svg%3E" />
|
<img alt="macOs" src="data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='40' height='40' viewBox='0 0 40 40'%3E %3Cdefs%3E %3Cpath id='47f1323c-993c-4d45-aab1-bebb1206c2bb-a' d='M.001.592h26.926v24.039H.001z'/%3E %3C/defs%3E %3Cg fill='none' fill-rule='evenodd'%3E %3Cpath d='M0 0h40v40H0z'/%3E %3Cg opacity='1' transform='translate(6.316 2.737)'%3E %3Cg transform='translate(0 7.045)'%3E %3Cmask id='47f1323c-993c-4d45-aab1-bebb1206c2bb-b' fill='%23fff'%3E %3Cuse xlink:href='%2347f1323c-993c-4d45-aab1-bebb1206c2bb-a'/%3E %3C/mask%3E %3Cpath fill='%23FFF' d='M20.005.608c-2.722-.193-5.031 1.456-6.32 1.456-1.308 0-3.324-1.415-5.461-1.376-2.806.04-5.393 1.564-6.84 3.972C-1.531 9.506.64 16.687 3.479 20.62c1.389 1.922 3.045 4.088 5.221 4.009 2.094-.08 2.887-1.298 5.418-1.298 2.53 0 3.243 1.298 5.458 1.259 2.254-.04 3.683-1.962 5.061-3.894 1.596-2.23 2.251-4.39 2.29-4.505-.05-.018-4.394-1.614-4.437-6.408-.04-4.008 3.415-5.935 3.573-6.028C24.102.989 21.073.684 20.005.608' mask='url(%2347f1323c-993c-4d45-aab1-bebb1206c2bb-b)'/%3E %3C/g%3E %3Cpath fill='%23FFF' d='M18.325 5.057C19.482 3.718 20.26 1.854 20.045 0c-1.663.063-3.676 1.062-4.87 2.4-1.07 1.185-2.008 3.083-1.753 4.899 1.855.137 3.748-.902 4.903-2.242'/%3E %3C/g%3E %3C/g%3E%3C/svg%3E" />
|
||||||
<span class="text-sm">macOs</span>
|
<span class="text-sm">macOs</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,8 +53,7 @@
|
|||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
<!-- 内容组件 -->
|
<!-- 内容组件 -->
|
||||||
<Content class="content text-lg py-5" :data="form.content" />
|
<Content class="content text-lg py-5" :editor="form?.editor" :data="form.content" />
|
||||||
|
|
||||||
<NextArticle :articleId="articleId" />
|
<NextArticle :articleId="articleId" />
|
||||||
<h3 class="tag">{{ $t('articleUrl') }}:{{ locationUrl() }} </h3>
|
<h3 class="tag">{{ $t('articleUrl') }}:{{ locationUrl() }} </h3>
|
||||||
<Tags :data="form.tags" />
|
<Tags :data="form.tags" />
|
||||||
@@ -136,6 +135,8 @@ const {form, assignFields} = useFormData<CmsArticle>({
|
|||||||
tags: undefined,
|
tags: undefined,
|
||||||
// 文章内容
|
// 文章内容
|
||||||
content: undefined,
|
content: undefined,
|
||||||
|
// 文章编辑器
|
||||||
|
editor: undefined,
|
||||||
// 虚拟阅读量
|
// 虚拟阅读量
|
||||||
virtualViews: undefined,
|
virtualViews: undefined,
|
||||||
// 实际阅读量
|
// 实际阅读量
|
||||||
|
|||||||
@@ -45,22 +45,23 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="交付方式" class="px-4" label-width="100" label-position="left">
|
<el-form-item label="色系" class="px-4" label-width="100" label-position="left">
|
||||||
<el-input v-model="form.deliveryMethod" placeholder="交付方式"/>
|
<el-space>
|
||||||
</el-form-item>
|
<template v-for="(item,index) in colors" :key="index">
|
||||||
<el-form-item label="计费方式" class="px-4" label-width="100" label-position="left">
|
<div @click="handleColor(item.label)">
|
||||||
<el-input v-model="form.chargingMethod" placeholder="计费方式"/>
|
<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-form-item>
|
<el-avatar v-else :size="24" :style="item.comments"></el-avatar>
|
||||||
<el-form-item label="插件价格" class="px-4" label-width="100" label-position="left">
|
</div>
|
||||||
<el-input v-model="form.price" placeholder="插件价格"/>
|
</template>
|
||||||
|
</el-space>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="插件图标" class="px-4" label-width="100" label-position="left">
|
<el-form-item label="插件图标" class="px-4" label-width="100" label-position="left">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="avatar"
|
v-model:file-list="avatar"
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: '5'
|
||||||
}"
|
}"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
@@ -80,10 +81,10 @@
|
|||||||
<el-tab-pane label="插件截屏" name="files">
|
<el-tab-pane label="插件截屏" name="files">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="files"
|
v-model:file-list="files"
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: '5'
|
||||||
}"
|
}"
|
||||||
:limit="8"
|
:limit="8"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
@@ -95,9 +96,7 @@
|
|||||||
<Plus/>
|
<Plus/>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-form-item class="px-4" label-width="100" label-position="left">
|
<el-button type="primary" class="sm:w-auto px-5" size="large" @click="onSubmit">保存</el-button>
|
||||||
<el-button type="primary" class="sm:w-auto w-full" size="large" @click="onSubmit">保存</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="详细介绍" name="content">
|
<el-tab-pane label="详细介绍" name="content">
|
||||||
<!-- 编辑器 -->
|
<!-- 编辑器 -->
|
||||||
@@ -113,9 +112,27 @@
|
|||||||
<el-tab-pane label="评论管理" name="comments">
|
<el-tab-pane label="评论管理" name="comments">
|
||||||
<Comments :productId="form.companyId" :comments="comments" :count="commentsTotal" @done="doComments"/>
|
<Comments :productId="form.companyId" :comments="comments" :count="commentsTotal" @done="doComments"/>
|
||||||
</el-tab-pane>
|
</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-tab-pane label="插件设置" name="setting">
|
||||||
<el-form-item label="允许展示到插件市场" class="px-4" label-width="200" label-position="left">
|
<el-form-item label="是否允许展示及被搜索" class="px-4" label-width="200" label-position="left">
|
||||||
<el-switch v-model="form.market" title="允许展示到插件市场" @change="onSubmit"/>
|
<el-switch v-model="form.search" title="是否允许展示及被搜索" @change="onSubmit"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否推荐" class="px-4" label-width="200" label-position="left">
|
<el-form-item label="是否推荐" class="px-4" label-width="200" label-position="left">
|
||||||
<el-switch disabled v-model="form.official" @change="onSubmit"/>
|
<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 'md-editor-v3/lib/style.css';
|
||||||
import {uploadOss} from "~/api/system/file";
|
import {uploadOss} from "~/api/system/file";
|
||||||
import Statistic from "./components/Statistic.vue";
|
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 token = useToken();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const website = useWebsite()
|
|
||||||
const user = useUser();
|
|
||||||
const navId = ref();
|
const navId = ref();
|
||||||
const activeIndex = ref('');
|
const activeIndex = ref('');
|
||||||
const avatar = ref<UploadUserFile[]>([])
|
const avatar = ref<UploadUserFile[]>([])
|
||||||
const files = ref<UploadUserFile[]>([])
|
const files = ref<UploadUserFile[]>([])
|
||||||
const srcList = ref<string[]>([])
|
const srcList = ref<string[]>([])
|
||||||
const dialogImageUrl = ref('')
|
const dialogImageUrl = ref('')
|
||||||
const content = ref('');
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const activeName = ref('info')
|
const activeName = ref('info')
|
||||||
const comments = ref<CompanyComment[]>([]);
|
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,
|
official: undefined,
|
||||||
// 是否显示在插件市场
|
// 是否显示在插件市场
|
||||||
market: undefined,
|
market: undefined,
|
||||||
|
// 是否允许展示及被搜索
|
||||||
|
search: undefined,
|
||||||
|
// 主题色
|
||||||
|
color: undefined,
|
||||||
// 全局样式
|
// 全局样式
|
||||||
style: undefined,
|
style: undefined,
|
||||||
// 后台管理地址
|
// 后台管理地址
|
||||||
@@ -239,6 +259,8 @@ const {form, assignFields} = useFormData<CmsWebsite>({
|
|||||||
industryChild: undefined,
|
industryChild: undefined,
|
||||||
// 企业ID
|
// 企业ID
|
||||||
companyId: undefined,
|
companyId: undefined,
|
||||||
|
// 开发者名称
|
||||||
|
developer: undefined,
|
||||||
// 所在国家
|
// 所在国家
|
||||||
country: undefined,
|
country: undefined,
|
||||||
// 所在省份
|
// 所在省份
|
||||||
@@ -313,32 +335,10 @@ const logs = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const types = [
|
const types = ref<any[]>()
|
||||||
{
|
|
||||||
value: '网站',
|
|
||||||
label: '网站',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '小程序',
|
|
||||||
label: '小程序',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'MacOS',
|
|
||||||
label: 'MacOS',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'Windows',
|
|
||||||
label: 'Windows',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'App',
|
|
||||||
label: 'App',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `用户中心`,
|
title: `开发者中心`
|
||||||
meta: [{name: website.value.keywords, content: website.value.comments}]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDone = (index: string) => {
|
const onDone = (index: string) => {
|
||||||
@@ -346,6 +346,25 @@ const onDone = (index: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const reload = async () => {
|
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 => {
|
getCmsWebsiteAll(navId.value).then(data => {
|
||||||
// 获取栏目信息
|
// 获取栏目信息
|
||||||
assignFields(data)
|
assignFields(data)
|
||||||
@@ -374,7 +393,10 @@ const reload = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(data.websiteType){
|
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',
|
titleTemplate: `${data?.websiteName}` + ' - %s',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 加载评论
|
// 加载评论
|
||||||
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.log(err, '加载失败...')
|
console.log(err, '加载失败...')
|
||||||
})
|
})
|
||||||
@@ -396,6 +416,12 @@ const goBack = () => {
|
|||||||
router.back(); // 返回上一页
|
router.back(); // 返回上一页
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 选择色系
|
||||||
|
const handleColor = (text: string) => {
|
||||||
|
selectColor.value = text;
|
||||||
|
form.color = text;
|
||||||
|
}
|
||||||
|
|
||||||
const avatarRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
|
const avatarRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
|
||||||
form.websiteLogo = '';
|
form.websiteLogo = '';
|
||||||
}
|
}
|
||||||
@@ -438,10 +464,13 @@ const onSubmit = () => {
|
|||||||
if (srcList.value.length > 0) {
|
if (srcList.value.length > 0) {
|
||||||
form.files = JSON.stringify(srcList.value)
|
form.files = JSON.stringify(srcList.value)
|
||||||
}
|
}
|
||||||
if(form.websiteType){
|
if(!form.developer){
|
||||||
form.websiteType = JSON.stringify(form.websiteType)
|
form.developer = developer.value;
|
||||||
}
|
}
|
||||||
updateCmsWebsiteAll(form).then(() => {
|
updateCmsWebsiteAll({
|
||||||
|
...form,
|
||||||
|
websiteType: JSON.stringify(form.websiteType)
|
||||||
|
}).then(() => {
|
||||||
ElMessage.success('修改成功');
|
ElMessage.success('修改成功');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -450,6 +479,9 @@ watch(
|
|||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
(id) => {
|
(id) => {
|
||||||
navId.value = getNavIdByParamsId(id);
|
navId.value = getNavIdByParamsId(id);
|
||||||
|
if(route.query.developer){
|
||||||
|
developer.value = `${route.query.developer}`;
|
||||||
|
}
|
||||||
reload();
|
reload();
|
||||||
},
|
},
|
||||||
{immediate: true}
|
{immediate: true}
|
||||||
|
|||||||
@@ -4,16 +4,27 @@
|
|||||||
<div class="xl:w-screen-xl m-auto py-4 mt-20">
|
<div class="xl:w-screen-xl m-auto py-4 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 mr-3"> 开发者中心 </span>
|
<span class="text-large font-600 mr-3"> 开发者中心</span>
|
||||||
</template>
|
</template>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<el-space class="flex items-center">
|
<el-space class="flex items-center">
|
||||||
</el-space>
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
<el-row :gutter="24" id="container" class="clearfix">
|
<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-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">
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class=" hover:bg-white cursor-pointer">
|
||||||
<nuxt-link :to="`/developer/${item.websiteId}`">
|
<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="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">
|
<div class="text-gray-700 dark:text-white text-base font-semibold flex gap-1.5">
|
||||||
<el-avatar
|
<el-avatar
|
||||||
@@ -21,7 +32,7 @@
|
|||||||
<div class="flex-1 text-lg cursor-pointer flex flex-col">
|
<div class="flex-1 text-lg cursor-pointer flex flex-col">
|
||||||
{{ item.websiteName }}
|
{{ item.websiteName }}
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<sapn class="text-xs text-gray-400 font-normal line-clamp-1">{{ item.comments || '暂无描述' }}</sapn>
|
<div class="text-xs text-gray-400 font-normal line-clamp-1">{{ item.comments || '暂无描述' }}</div>
|
||||||
<el-button size="small" round>编辑</el-button>
|
<el-button size="small" round>编辑</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,6 +46,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
</template>
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -44,9 +56,13 @@ import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
|||||||
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
||||||
import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
||||||
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
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 route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const isDeveloper = ref<boolean>(false);
|
||||||
|
const developer = ref<ShopMerchant>();
|
||||||
// 页面信息
|
// 页面信息
|
||||||
const list = ref<CmsWebsite[]>([]);
|
const list = ref<CmsWebsite[]>([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
@@ -69,8 +85,14 @@ const goBack = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 加载页面数据
|
// 加载页面数据
|
||||||
const reload = async () => {
|
const reload = () => {
|
||||||
await pageCmsWebsiteAll(where).then(response => {
|
getShopMerchantByPhone().then((data) => {
|
||||||
|
isDeveloper.value = true
|
||||||
|
developer.value = data
|
||||||
|
}).catch(() => {
|
||||||
|
isDeveloper.value = false
|
||||||
|
})
|
||||||
|
pageCmsWebsiteAll(where).then(response => {
|
||||||
if(response?.list){
|
if(response?.list){
|
||||||
list.value = response?.list;
|
list.value = response?.list;
|
||||||
total.value = response.count;
|
total.value = response.count;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
|
<Carousel />
|
||||||
<Flash/>
|
<Flash/>
|
||||||
|
|
||||||
<SiteList title="产品服务" :param="{official: true,limit: 4,sort: 'websiteId',order:'asc'}" :fit="`cover`" />
|
<SiteList title="产品服务" :param="{official: true,limit: 4,sort: 'websiteId',order:'asc'}" :fit="`cover`" />
|
||||||
@@ -20,6 +21,7 @@ import {pageCmsLink} from "~/api/cms/cmsLink";
|
|||||||
import {addCmsOrder} from "~/api/cms/cmsOrder";
|
import {addCmsOrder} from "~/api/cms/cmsOrder";
|
||||||
import {getCaptcha} from "~/api/passport/login";
|
import {getCaptcha} from "~/api/passport/login";
|
||||||
import Flash from './components/Flash.vue';
|
import Flash from './components/Flash.vue';
|
||||||
|
import Carousel from "~/pages/components/Carousel.vue";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<div class="m-page">
|
<div class="m-page">
|
||||||
<div class="sitemp h-[32px] flex justify-between">
|
<div class="sitemp h-[32px] flex justify-between">
|
||||||
<h2>矛盾纠纷收集与解决</h2>
|
<h2>矛盾纠纷收集与处理</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-box p-5">
|
<div class="form-box p-5">
|
||||||
<el-form
|
<el-form
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<el-input v-model="form.phone" :maxlength="11" :placeholder="`手机号码`"/>
|
<el-input v-model="form.phone" :maxlength="11" :placeholder="`手机号码`"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="`您的住址`" prop="address" class="p-2 text-left">
|
<el-form-item :label="`您的住址`" prop="address" class="p-2 text-left">
|
||||||
<el-cascader v-model="value" class="w-full" :options="RegionsData" placeholder="所在城区" @change="handleChange" />
|
<el-cascader v-model="value" class="w-full" :options="options" placeholder="所在城区" @change="handleChange" />
|
||||||
<el-input class="mt-2" v-model="form.address" :placeholder="`您的住址`"/>
|
<el-input class="mt-2" v-model="form.address" :placeholder="`您的住址`"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="`纠纷描述`" prop="content" class=" p-2">
|
<el-form-item :label="`纠纷描述`" prop="content" class=" p-2">
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<el-form-item :label="`附件上传`" prop="files" class=" p-2">
|
<el-form-item :label="`附件上传`" prop="files" class=" p-2">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="files"
|
v-model:file-list="files"
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
@@ -49,12 +49,12 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="`验证码`" prop="code" class=" p-2">
|
<!-- <el-form-item :label="`验证码`" prop="code" class=" p-2">-->
|
||||||
<el-space class="flex">
|
<!-- <el-space class="flex">-->
|
||||||
<el-input size="large" :placeholder="$t('order.imgCode')" maxlength="5" v-model="form.code"/>
|
<!-- <el-input size="large" :placeholder="$t('order.imgCode')" maxlength="5" v-model="form.code"/>-->
|
||||||
<el-image :alt="$t('order.imgCode')" v-if="captcha" :src="captcha" @click="changeCaptcha"/>
|
<!-- <el-image :alt="$t('order.imgCode')" v-if="captcha" :src="captcha" @click="changeCaptcha"/>-->
|
||||||
</el-space>
|
<!-- </el-space>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="ml-2 w-full">
|
<div class="ml-2 w-full">
|
||||||
<el-button type="primary" size="large" class="block w-full" @click="submitForm(formRef)">
|
<el-button type="primary" size="large" class="block w-full" @click="submitForm(formRef)">
|
||||||
@@ -106,8 +106,8 @@ const {form, resetFields} = useFormData<CmsOrder>({
|
|||||||
title: undefined,
|
title: undefined,
|
||||||
// 订单编号
|
// 订单编号
|
||||||
orderNo: undefined,
|
orderNo: undefined,
|
||||||
// 订单类型,0商城 1询价 2留言
|
// 订单类型,0订单 1留言 2询价订单
|
||||||
type: undefined,
|
type: 1,
|
||||||
// 关联项目ID,配合订单类型使用
|
// 关联项目ID,配合订单类型使用
|
||||||
articleId: undefined,
|
articleId: undefined,
|
||||||
// 真实姓名
|
// 真实姓名
|
||||||
@@ -169,7 +169,7 @@ const rules = reactive<FormRules<CmsOrder>>({
|
|||||||
{required: true, message: '请输入联系人姓名', trigger: 'blur'},
|
{required: true, message: '请输入联系人姓名', trigger: 'blur'},
|
||||||
],
|
],
|
||||||
content: [
|
content: [
|
||||||
{required: true, message: '请输入留言内容', trigger: 'blur'},
|
{required: true, message: '请输入纠纷内容', trigger: 'blur'},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -181,6 +181,7 @@ const props = {
|
|||||||
|
|
||||||
const handleChange = (value:any) => {
|
const handleChange = (value:any) => {
|
||||||
address.value = ''
|
address.value = ''
|
||||||
|
console.log(value)
|
||||||
const province = RegionsData.find(item => item.value == value[0]);
|
const province = RegionsData.find(item => item.value == value[0]);
|
||||||
if(province){
|
if(province){
|
||||||
address.value = `${province?.label}`
|
address.value = `${province?.label}`
|
||||||
@@ -212,6 +213,8 @@ const reload = async () => {
|
|||||||
keywords: form.title,
|
keywords: form.title,
|
||||||
titleTemplate: `${form?.title || '矛盾纠纷收集平台'}` + ' - %s',
|
titleTemplate: `${form?.title || '矛盾纠纷收集平台'}` + ' - %s',
|
||||||
})
|
})
|
||||||
|
const gx = RegionsData.find(item => item.value == '450000')
|
||||||
|
options.value = gx?.children
|
||||||
changeCaptcha();
|
changeCaptcha();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,35 +233,21 @@ const filesSuccess = (e: any) => {
|
|||||||
|
|
||||||
// 提交表单
|
// 提交表单
|
||||||
const submitForm = (formEl: FormInstance | undefined) => {
|
const submitForm = (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return
|
if (process.client) {
|
||||||
if (form.code !== text.value) {
|
|
||||||
reload();
|
|
||||||
ElMessage.error('验证码不正确!');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
formEl.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
// form.files = undefined;
|
|
||||||
// if (srcList.value.length > 0) {
|
|
||||||
// form.files = JSON.stringify(srcList.value)
|
|
||||||
// }
|
|
||||||
if (process.client && form.code) {
|
|
||||||
addCmsOrder({
|
addCmsOrder({
|
||||||
...form,
|
...form,
|
||||||
files: JSON.stringify(srcList.value) || undefined,
|
files: JSON.stringify(srcList.value) || undefined,
|
||||||
address: `${address.value}${form.address}`
|
address: `${address.value} ${form.address}`
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
resetFields();
|
||||||
|
files.value = []
|
||||||
ElMessage.success(res.message)
|
ElMessage.success(res.message)
|
||||||
} else {
|
} else {
|
||||||
return ElMessage.error(res.message)
|
return ElMessage.error(res.message)
|
||||||
}
|
}
|
||||||
resetFields();
|
|
||||||
changeCaptcha();
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -275,18 +264,4 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.content {
|
|
||||||
padding-top: 15px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-indent: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content p {
|
|
||||||
line-height: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content img {
|
|
||||||
padding: 10px;
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<el-descriptions title="详细介绍" class="mt-5" />
|
<el-descriptions title="详细介绍" class="mt-5" />
|
||||||
<MdPreview id="preview-only" class="px-3" :modelValue="form.content" />
|
<MdPreview id="preview-only" class="px-3" :modelValue="form.content || '暂无详细内容'" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 评分及评价 -->
|
<!-- 评分及评价 -->
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<nuxt-link :to="`/market/user/${form.userId}`" class="item text-center flex flex-col items-center">
|
<nuxt-link :to="`/market/user/${form.userId}`" class="item text-center flex flex-col items-center">
|
||||||
<div class="text-gray-400">开发者</div>
|
<div class="text-gray-400">开发者</div>
|
||||||
<el-icon size="24" class="py-1"><Avatar /></el-icon>
|
<el-icon size="24" class="py-1"><Avatar /></el-icon>
|
||||||
<span class="text-gray-500">{{'WebSoft Inc.'}}</span>
|
<span class="text-gray-500">{{ form || 'WebSoft Inc.' }}</span>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<el-divider class="opacity-40" style="height: 40px" direction="vertical" />
|
<el-divider class="opacity-40" style="height: 40px" direction="vertical" />
|
||||||
<nuxt-link :to="`http://git.gxwebsoft.com`" class="item text-center">
|
<nuxt-link :to="`http://git.gxwebsoft.com`" class="item text-center">
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ArrowLeft,View, Menu, Search,Compass, Cpu,Monitor, Download, Platform, Avatar } from '@element-plus/icons-vue'
|
import { ArrowLeft,View, Menu, Search,Compass, Cpu,Monitor, Download, Platform, Avatar } from '@element-plus/icons-vue'
|
||||||
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
|
import type {CmsWebsite} from "~/api/cms/cmsWebsite/model";
|
||||||
|
import {getUser, listUsers} from "~/api/system/user";
|
||||||
|
|
||||||
const i18n = useI18n();
|
const i18n = useI18n();
|
||||||
|
|
||||||
@@ -82,8 +83,4 @@ const where = reactive<any>({
|
|||||||
lang: i18n.locale.value
|
lang: i18n.locale.value
|
||||||
});
|
});
|
||||||
|
|
||||||
const reload = () => {
|
|
||||||
|
|
||||||
}
|
|
||||||
reload();
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,45 +1,212 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-space class="flex items-center">
|
<div class="flex flex-col text-sm bg-white px-4 mt-5 pt-2 pb-2">
|
||||||
<el-input v-model="where.keywords" :placeholder="`${$t('searchKeywords')}...`" :suffix-icon="Search" @change="reload"/>
|
<div class="flex flex-col">
|
||||||
|
<el-space class="my-2">
|
||||||
|
<h4 class="text-sm w-[40px] text-gray-400 font-normal text-center">行业</h4>
|
||||||
|
<div class="flex-wrap">
|
||||||
|
<el-radio-group v-model="selectIndustry" @change="onIndustry">
|
||||||
|
<el-radio-button v-for="(item,index) in IndustryData" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
</el-space>
|
||||||
|
<el-space class="my-2">
|
||||||
|
<h4 class="text-sm w-[40px] text-gray-400 font-normal text-center">类型</h4>
|
||||||
|
<el-radio-group v-model="selectType" @change="onType">
|
||||||
|
<el-radio-button v-for="(item,index) in websiteType" :key="index" :label="item.label" :value="item.value" />
|
||||||
|
</el-radio-group>
|
||||||
|
</el-space>
|
||||||
|
<el-space class="my-2" :size="12">
|
||||||
|
<h4 class="text-sm w-[40px] text-gray-400 font-normal text-center">色系</h4>
|
||||||
|
<template v-for="(item,index) in colors" :key="index">
|
||||||
|
<nuxt-link :to="`?color=${item.label}`" @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>
|
||||||
|
</nuxt-link>
|
||||||
|
</template>
|
||||||
|
</el-space>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-space class="gap-4 mt-5">
|
||||||
|
<el-button type="primary" @click="handleDefault">默认</el-button>
|
||||||
|
<el-button @click="handleLast">最新</el-button>
|
||||||
|
<el-button @click="handleHot">最热</el-button>
|
||||||
|
<el-button @click="handleFree">免费</el-button>
|
||||||
|
<el-button @click="handlePay">付费</el-button>
|
||||||
|
<el-button @click="handleOfficial">官方</el-button>
|
||||||
|
<el-input v-model="keywords" style="width: 400px" :placeholder="`云官网`"
|
||||||
|
:suffix-icon="Search" @change="handleKeywords"/>
|
||||||
|
<el-button @click="clearWhere">重置</el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import {Search} from '@element-plus/icons-vue'
|
||||||
import type {CmsArticle} from "~/api/cms/cmsArticle/model";
|
import {listDictData} from "~/api/system/dict-data";
|
||||||
|
import IndustryData from "~/api/json/industry-data.json"
|
||||||
const i18n = useI18n();
|
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
title?: string;
|
|
||||||
desc?: string;
|
|
||||||
buyUrl?: string;
|
|
||||||
form?: CmsArticle;
|
|
||||||
value?: number;
|
value?: number;
|
||||||
}>(),
|
}>(),
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
// 关键词
|
||||||
(e: 'done', where: any): void
|
const keywords = ref<string | undefined>()
|
||||||
}>()
|
const selectIndustry = ref<string>();
|
||||||
|
const selectType = ref<string>();
|
||||||
|
const selectColor = ref<string>();
|
||||||
|
// 行业
|
||||||
|
const industry = ref<string>()
|
||||||
|
// 类型
|
||||||
|
const websiteType = ref<any[]>([])
|
||||||
|
// 色系
|
||||||
|
const colors = ref<any[]>()
|
||||||
|
|
||||||
// 搜索表单
|
// 搜索条件
|
||||||
const where = reactive<any>({
|
let where = <any>{
|
||||||
keywords: '',
|
keywords: undefined,
|
||||||
page: 1,
|
websiteType: undefined,
|
||||||
limit: 20,
|
industry: undefined,
|
||||||
status: 0,
|
color: undefined,
|
||||||
parentId: undefined,
|
sort: undefined,
|
||||||
categoryId: undefined,
|
order: undefined
|
||||||
lang: i18n.locale.value
|
|
||||||
});
|
|
||||||
|
|
||||||
const reload = () => {
|
|
||||||
navigateTo(`/search/${where.keywords}`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 选择类型
|
||||||
|
const handleType = (text: string) => {
|
||||||
|
if (text === '全部') {
|
||||||
|
where.websiteType = undefined;
|
||||||
|
} else {
|
||||||
|
where.websiteType = text;
|
||||||
|
}
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择行业
|
||||||
|
const handleIndustry = (text: string) => {
|
||||||
|
if (text === '全部') {
|
||||||
|
where.industry = undefined;
|
||||||
|
} else {
|
||||||
|
where.industry = text;
|
||||||
|
}
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择色系
|
||||||
|
const handleColor = (text: string) => {
|
||||||
|
selectColor.value = text;
|
||||||
|
if (text === '彩色') {
|
||||||
|
where.color = undefined;
|
||||||
|
} else {
|
||||||
|
where.color = text;
|
||||||
|
}
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDefault = () => {
|
||||||
|
where.sort = undefined
|
||||||
|
where.order = undefined
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleLast = () => {
|
||||||
|
where.sort = 'createTime'
|
||||||
|
where.order = 'desc'
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleHot = () => {
|
||||||
|
where.sort = 'clicks'
|
||||||
|
where.order = 'desc'
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleFree = () => {
|
||||||
|
where.price = 0
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handlePay = () => {
|
||||||
|
where.isPay = true
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleOfficial = () => {
|
||||||
|
where.official = true
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
const clearWhere = () => {
|
||||||
|
where = {}
|
||||||
|
selectColor.value = ''
|
||||||
|
selectType.value = ''
|
||||||
|
selectIndustry.value = ''
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 搜索关键词
|
||||||
|
const handleKeywords = () => {
|
||||||
|
where.keywords = keywords.value;
|
||||||
|
reload()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转路由
|
||||||
|
const reload = () => {
|
||||||
|
navigateTo({
|
||||||
|
path: '/market',
|
||||||
|
query: where
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const onType = (text: string) => {
|
||||||
|
where.websiteType = text
|
||||||
|
if(text == '全部'){
|
||||||
|
where.websiteType = undefined
|
||||||
|
}
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
const onIndustry = (text: string) => {
|
||||||
|
where.industry = text
|
||||||
|
if(text == '全部'){
|
||||||
|
where.industry = undefined
|
||||||
|
}
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取基础数据
|
||||||
|
const getData = () => {
|
||||||
|
listDictData({
|
||||||
|
dictCode: 'WebsiteType'
|
||||||
|
}).then(data => {
|
||||||
|
websiteType.value = data.map((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.dictDataName,
|
||||||
|
value: item.dictDataCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
listDictData({
|
||||||
|
dictCode: 'Color'
|
||||||
|
}).then(data => {
|
||||||
|
colors.value = data.map((item: any) => {
|
||||||
|
return {
|
||||||
|
label: item.dictDataName,
|
||||||
|
value: item.dictDataCode,
|
||||||
|
comments: item.comments
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
getData()
|
||||||
|
|
||||||
|
// watch(
|
||||||
|
// () => props.where,
|
||||||
|
// (query) => {
|
||||||
|
// if(query){
|
||||||
|
// where = query;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// );
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -7,27 +7,17 @@
|
|||||||
<span class="text-large font-600 mr-3"> 插件市场 </span>
|
<span class="text-large font-600 mr-3"> 插件市场 </span>
|
||||||
</template>
|
</template>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<el-space class="flex items-center">
|
<span class="text-gray-400">基于WebSoft开发的应用和插件!</span>
|
||||||
<el-select v-model="value" clearable placeholder="类型" style="width: 180px" @change="onTypes">
|
|
||||||
<el-option
|
|
||||||
v-for="item in types"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<!-- <el-button-group v-model:value="where" @tab-click="handleClick" @change="reload">-->
|
|
||||||
<!-- <el-button>综合</el-button>-->
|
|
||||||
<!-- <el-button>最新</el-button>-->
|
|
||||||
<!-- <el-button>免费</el-button>-->
|
|
||||||
<!-- <el-button>付费</el-button>-->
|
|
||||||
<!-- </el-button-group>-->
|
|
||||||
<el-input v-model="where.keywords" style="width: 400px" :placeholder="`插件ID | 插件名称 | 域名`" :suffix-icon="Search" @change="reload"/>
|
|
||||||
</el-space>
|
|
||||||
</template>
|
</template>
|
||||||
|
<!-- 搜索工具栏 -->
|
||||||
|
<SearchBar :where="where" id="search" />
|
||||||
|
|
||||||
|
<!-- 应用列表 -->
|
||||||
<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="8" class="left mb-8">
|
<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="cursor-pointer" @mouseover="showDomain(item)" @mouseleave="hideDomain" @click="navigateTo(`/market/${item.websiteId}.html`)">
|
<el-card shadow="hover" :body-style="{ padding: '0px' }" class="cursor-pointer" @mouseover="showDomain(item)"
|
||||||
|
@mouseleave="hideDomain">
|
||||||
|
<nuxt-link :to="`/market/${item.websiteId}`">
|
||||||
<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 gap-1.5">
|
<div class="text-gray-700 dark:text-white text-base font-semibold flex gap-1.5">
|
||||||
<el-avatar
|
<el-avatar
|
||||||
@@ -43,87 +33,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-image pt-3">
|
<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-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]" />
|
<el-image v-else class="w-full h-[220px]"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</nuxt-link>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
|
|
||||||
<Pagination :total="total" @done="search" />
|
<Pagination :total="total" @done="search"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import {ArrowLeft, View, Search} from '@element-plus/icons-vue'
|
||||||
import { Picture as IconPicture } from '@element-plus/icons-vue'
|
|
||||||
import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
|
||||||
import { ElNotification as notify } from 'element-plus'
|
|
||||||
import { useLayout, usePage} from "~/composables/configState";
|
|
||||||
import type {CmsNavigation} from "~/api/cms/cmsNavigation/model";
|
|
||||||
import type {CmsArticleParam} from "~/api/cms/cmsArticle/model";
|
|
||||||
import type { ComponentSize } from 'element-plus'
|
|
||||||
import { ElNotification } from 'element-plus'
|
|
||||||
import type { TabsPaneContext } from 'element-plus'
|
|
||||||
import dayjs from "dayjs";
|
|
||||||
import {getCmsNavigation, listCmsNavigation} from "~/api/cms/cmsNavigation";
|
|
||||||
import {pageCmsArticle} from "~/api/cms/cmsArticle";
|
|
||||||
import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
import {pageCmsWebsiteAll} from "~/api/cms/cmsWebsite";
|
||||||
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
import type {CmsWebsite, CmsWebsiteParam} from "~/api/cms/cmsWebsite/model";
|
||||||
|
import SearchBar from "./components/SearchBar.vue";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const navId = ref();
|
|
||||||
// 页面信息
|
// 页面信息
|
||||||
const list = ref<CmsWebsite[]>([]);
|
const list = ref<CmsWebsite[]>([]);
|
||||||
const i18n = useI18n();
|
|
||||||
const category = ref<CmsNavigation[]>([]);
|
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const activeName = ref('2839');
|
|
||||||
const id = ref<number>();
|
const id = ref<number>();
|
||||||
|
const loading = ref<boolean>(false)
|
||||||
|
const where = ref<CmsWebsiteParam>({
|
||||||
|
|
||||||
// 获取状态
|
|
||||||
const page = usePage();
|
|
||||||
const layout = useLayout();
|
|
||||||
|
|
||||||
// 搜索表单
|
|
||||||
const where = reactive<CmsWebsiteParam>({
|
|
||||||
keywords: '',
|
|
||||||
page: 1,
|
|
||||||
limit: 12,
|
|
||||||
status: undefined,
|
|
||||||
recommend: undefined,
|
|
||||||
market: true,
|
|
||||||
websiteType: undefined,
|
|
||||||
categoryId: undefined,
|
|
||||||
lang: undefined
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const types = [
|
|
||||||
{
|
|
||||||
value: '网站',
|
|
||||||
label: '网站',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '小程序',
|
|
||||||
label: '小程序',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'MacOS',
|
|
||||||
label: 'MacOS',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'Windows',
|
|
||||||
label: 'Windows',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'App',
|
|
||||||
label: 'App',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
router.back();
|
router.back();
|
||||||
}
|
}
|
||||||
@@ -136,87 +76,58 @@ const hideDomain = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 加载页面数据
|
// 加载页面数据
|
||||||
const reload = async () => {
|
const reload = async (where: any) => {
|
||||||
await pageCmsWebsiteAll(where).then(response => {
|
if (loading.value) return;
|
||||||
if(response?.list){
|
loading.value = true;
|
||||||
list.value = response?.list;
|
pageCmsWebsiteAll({
|
||||||
|
...where,
|
||||||
|
market: true,
|
||||||
|
limit: where.limit || 12
|
||||||
|
}).then(response => {
|
||||||
|
if (response?.list) {
|
||||||
|
list.value = response?.list.map(d => {
|
||||||
|
if (d.domain == '' || d.domain == null) {
|
||||||
|
d.domain = `${d.websiteCode}.wsdns.cn`;
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
});
|
||||||
total.value = response.count;
|
total.value = response.count;
|
||||||
}
|
}
|
||||||
}).catch(() => {})
|
loading.value = false;
|
||||||
}
|
}).catch(() => {
|
||||||
|
loading.value = false;
|
||||||
const bakReload = async () => {
|
}).finally(() => {
|
||||||
await getCmsNavigation(navId.value).then(data => {
|
console.log('index>>>>')
|
||||||
page.value = data;
|
|
||||||
layout.value.banner = data.banner;
|
|
||||||
|
|
||||||
// seo
|
|
||||||
useSeoMeta({
|
|
||||||
description: data.comments || data.title,
|
|
||||||
keywords: data.title,
|
|
||||||
titleTemplate: `${data?.title}` + ' - %s',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 二级栏目分类
|
|
||||||
listCmsNavigation({
|
|
||||||
parentId: data.parentId == 0 ? data.navigationId : data.parentId
|
|
||||||
}).then(navigation => {
|
|
||||||
category.value = navigation;
|
|
||||||
// 加载文章列表
|
|
||||||
if(data.parentId == 0 && category.value.length > 0){
|
|
||||||
where.parentId = page.value.navigationId;
|
|
||||||
}else {
|
|
||||||
where.categoryId = page.value.navigationId;
|
|
||||||
}
|
|
||||||
pageCmsArticle(where).then(response => {
|
|
||||||
if(response){
|
|
||||||
total.value = response.count;
|
|
||||||
list.value = response.list;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}).catch(() => {})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索
|
* 搜索
|
||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
const search = (data: CmsArticleParam) => {
|
const search = (data: CmsWebsiteParam) => {
|
||||||
where.page = data.page;
|
navigateTo({
|
||||||
reload();
|
path: '/market',
|
||||||
}
|
query: {
|
||||||
|
market: 1,
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
page: data.page,
|
||||||
console.log(tab, event)
|
limit: 12
|
||||||
}
|
}
|
||||||
const value = ref('')
|
})
|
||||||
|
window.scrollTo(0, 0)
|
||||||
const onTypes = (value: string) => {
|
|
||||||
where.websiteType = value;
|
|
||||||
reload();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.query,
|
||||||
(id) => {
|
(query) => {
|
||||||
// navId.value = getNavIdByParamsId(id);
|
where.value = query;
|
||||||
reload();
|
console.log(where.value,'>>>>>')
|
||||||
|
reload(query);
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{immediate: true}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.right .content img{
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
.demo-tabs > .el-tabs__content {
|
|
||||||
padding: 32px;
|
|
||||||
color: #6b778c;
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<!-- Banner -->
|
<!-- Banner -->
|
||||||
<Banner :layout="layout" />
|
<Banner :layout="layout" />
|
||||||
<!-- 主体部分 -->
|
<!-- 主体部分 -->
|
||||||
<div class="xl:w-screen-xl m-auto py-4 mt-2">
|
<div class="xl:w-screen-xl m-auto py-4 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 mr-3"> {{ page.title || '页面标题' }} </span>
|
<span class="text-large font-600 mr-3"> {{ page.title || '页面标题' }} </span>
|
||||||
</template>
|
</template>
|
||||||
<el-card shadow="hover" class=" my-5">
|
<el-card shadow="hover" class=" my-5">
|
||||||
|
<el-image :src="page?.design?.photo" class="right max-w-lg" />
|
||||||
<!-- 新闻详细 -->
|
<!-- 新闻详细 -->
|
||||||
<div class=" bg-white">
|
<div class=" bg-white">
|
||||||
<!-- 内容组件 -->
|
<!-- 内容组件 -->
|
||||||
|
|||||||
@@ -231,8 +231,7 @@ const changeCaptcha = async () => {
|
|||||||
|
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `登录页 - ${config.value?.siteName || 'WEB应用开发平台'}`,
|
title: `登录页 - ${config.value?.siteName || 'WEB应用开发平台'}`
|
||||||
meta: [{ name: website.value.keywords, content: website.value.comments }]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,59 +4,51 @@
|
|||||||
<template #content>
|
<template #content>
|
||||||
<span class="text-large font-600 mr-3"> 实名认证 </span>
|
<span class="text-large font-600 mr-3"> 实名认证 </span>
|
||||||
</template>
|
</template>
|
||||||
<div class="login-layout m-auto mt-10 sm:w-screen-xl w-full">
|
<el-card shadow="hover" class="my-10 px-2">
|
||||||
<div class="m-auto flex sm:flex-row flex-col sm:px-0 px-3 ">
|
<el-row :gutter="30" justify="space-between">
|
||||||
<!-- 用户菜单 -->
|
<el-col :span="16">
|
||||||
<!-- <UserMenu :activeIndex="activeIndex" @done="reload"/>-->
|
|
||||||
<div class="flash bg-white rounded-lg w-full">
|
|
||||||
<div class="sm:w-screen-md w-full sm:px-4 sm:py-2">
|
|
||||||
<Auth @done="reload"/>
|
<Auth @done="reload"/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="5">
|
||||||
|
<div class="w-full mt-2 text-center" v-if="isCheck">
|
||||||
|
<el-alert type="warning" :closable="false" :title="`扫二维码完成实名认证`" />
|
||||||
|
<el-image :src="config.wxQrcode" shape="square" class="mt-2" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</el-col>
|
||||||
</div>
|
</el-row>
|
||||||
</div>
|
</el-card>
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
import { ArrowLeft,View,Search } from '@element-plus/icons-vue'
|
||||||
import {useConfigInfo, useWebsite} from "~/composables/configState";
|
import {useConfigInfo} from "~/composables/configState";
|
||||||
import {ref} from 'vue'
|
import {ref} from 'vue'
|
||||||
import {useServerRequest} from "~/composables/useServerRequest";
|
|
||||||
import type {ApiResult} from "~/api";
|
|
||||||
import UserMenu from "./components/UserMenu.vue";
|
|
||||||
import Auth from './components/Auth.vue';
|
import Auth from './components/Auth.vue';
|
||||||
import type {ShopMerchantApply} from "~/api/shop/shopMerchantApply/model";
|
|
||||||
import {COMMON_API_URL} from "~/config";
|
|
||||||
|
|
||||||
// 配置信息
|
// 配置信息
|
||||||
const runtimeConfig = useRuntimeConfig();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const activeIndex = ref('');
|
const activeIndex = ref('');
|
||||||
const website = useWebsite()
|
|
||||||
const config = useConfigInfo();
|
const config = useConfigInfo();
|
||||||
const merchantApply = ref<ShopMerchantApply>();
|
const isCheck = ref(true);
|
||||||
|
|
||||||
const reload = async () => {
|
const reload = async (status?: boolean) => {
|
||||||
// 未登录状态(是否强制登录)
|
// 未登录状态(是否强制登录)
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
if (!token || token == '') {
|
if (!token || token == '') {
|
||||||
navigateTo('/passport/login');
|
navigateTo('/passport/login');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const {data: response} = await useServerRequest<ApiResult<ShopMerchantApply>>(COMMON_API_URL + '/shop/shop-merchant-apply/getByUserId', {baseURL: runtimeConfig.public.apiServer})
|
|
||||||
if (response.value?.data) {
|
|
||||||
merchantApply.value = response.value.data;
|
|
||||||
}
|
|
||||||
if(config.value){
|
|
||||||
useHead({
|
|
||||||
title: `实名认证 - ${config.value?.siteName}`,
|
|
||||||
meta: [{name: website.value.keywords, content: website.value.comments}]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if(status){
|
||||||
|
isCheck.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: `实名认证 - ${config.value?.siteName}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
router.back(); // 返回上一页
|
router.back(); // 返回上一页
|
||||||
|
|||||||
@@ -9,13 +9,19 @@
|
|||||||
size="large"
|
size="large"
|
||||||
status-icon
|
status-icon
|
||||||
>
|
>
|
||||||
<el-tabs v-model="form.type" class="flash bg-white ml-0">
|
<el-tabs v-model="form.type">
|
||||||
<!-- <el-tab-pane :name="0" label="个人认证"/>-->
|
<el-tab-pane :name="0" label="个人认证">
|
||||||
<el-tab-pane :name="1" label="实名认证"/>
|
<!-- 未完成认证 -->
|
||||||
</el-tabs>
|
<template v-if="form.status === 0 && form.checkStatus">
|
||||||
|
<el-result
|
||||||
|
icon="warning"
|
||||||
|
title="审核中"
|
||||||
|
:sub-title="`您的申请已提交,请耐心等待工作人员的审核,非常感谢`"
|
||||||
|
>
|
||||||
|
</el-result>
|
||||||
|
</template>
|
||||||
<!-- 已完成认证 -->
|
<!-- 已完成认证 -->
|
||||||
<template v-if="form.status === 1">
|
<template v-if="form.status === 1">
|
||||||
<template v-if="form.type == 0">
|
|
||||||
<el-result
|
<el-result
|
||||||
icon="success"
|
icon="success"
|
||||||
title="个人认证已通过"
|
title="个人认证已通过"
|
||||||
@@ -26,18 +32,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-result>
|
</el-result>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
|
||||||
<el-result
|
|
||||||
icon="success"
|
|
||||||
title="企业认证已通过"
|
|
||||||
:sub-title="`认证完成时间 ${form.completedTime}`"
|
|
||||||
>
|
|
||||||
<template #extra>
|
|
||||||
<el-button type="text" @click="onUpdate">修改认证信息</el-button>
|
|
||||||
</template>
|
|
||||||
</el-result>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<!-- 申请被驳回 -->
|
<!-- 申请被驳回 -->
|
||||||
<template v-if="form.status === 2">
|
<template v-if="form.status === 2">
|
||||||
<el-result
|
<el-result
|
||||||
@@ -50,109 +44,24 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-result>
|
</el-result>
|
||||||
</template>
|
</template>
|
||||||
<!-- 未完成认证 -->
|
<!-- 未提交 -->
|
||||||
<template v-if="form.status === 0 && form.checkStatus">
|
<template v-if="form.status == 0 && !form.checkStatus">
|
||||||
<el-result
|
<el-form-item label="手机号码" prop="phone">
|
||||||
icon="warning"
|
<el-input v-model="form.phone" disabled maxlength="11" placeholder="请输入真实有效的手机号码"/>
|
||||||
title="审核中"
|
|
||||||
:sub-title="`您的申请已提交,请耐心等待工作人员的审核,非常感谢`"
|
|
||||||
>
|
|
||||||
</el-result>
|
|
||||||
</template>
|
|
||||||
<template v-if="form.status === 0 && !form.checkStatus">
|
|
||||||
<template v-if="form.type == 1">
|
|
||||||
<el-form-item label="企业名称" prop="merchantName">
|
|
||||||
<el-input v-model="form.merchantName" placeholder="请输入企业名称"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="社会信用代码" prop="merchantCode">
|
|
||||||
<el-input v-model="form.merchantCode" placeholder="请输入社会信用代码"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="营业执照" required>
|
|
||||||
<el-upload
|
|
||||||
v-model:file-list="yyzzFile"
|
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
|
||||||
:headers="{
|
|
||||||
Authorization: token,
|
|
||||||
TenantId: tenantId,
|
|
||||||
}"
|
|
||||||
:limit="1"
|
|
||||||
list-type="picture-card"
|
|
||||||
:on-preview="handlePictureCardPreview"
|
|
||||||
:on-remove="yyzzRemove"
|
|
||||||
:on-success="yyzzOnSuccess"
|
|
||||||
>
|
|
||||||
<el-icon><Plus /></el-icon>
|
|
||||||
</el-upload>
|
|
||||||
|
|
||||||
<el-dialog v-model="dialogVisible">
|
|
||||||
<div class="flex justify-center">
|
|
||||||
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="门头照片">
|
|
||||||
<el-upload
|
|
||||||
v-model:file-list="image"
|
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
|
||||||
:headers="{
|
|
||||||
Authorization: token,
|
|
||||||
TenantId: tenantId,
|
|
||||||
}"
|
|
||||||
:limit="1"
|
|
||||||
list-type="picture-card"
|
|
||||||
:on-preview="handlePictureCardPreview"
|
|
||||||
:on-remove="imageRemove"
|
|
||||||
:on-success="imageOnSuccess"
|
|
||||||
>
|
|
||||||
<el-icon><Plus /></el-icon>
|
|
||||||
</el-upload>
|
|
||||||
|
|
||||||
<el-dialog v-model="dialogVisible">
|
|
||||||
<div class="flex justify-center">
|
|
||||||
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="其他证件">
|
|
||||||
<el-upload
|
|
||||||
v-model:file-list="files"
|
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
|
||||||
:headers="{
|
|
||||||
Authorization: token,
|
|
||||||
TenantId: tenantId,
|
|
||||||
}"
|
|
||||||
:limit="9"
|
|
||||||
list-type="picture-card"
|
|
||||||
:on-preview="handlePictureCardPreview"
|
|
||||||
:on-remove="filesRemove"
|
|
||||||
:on-success="filesOnSuccess"
|
|
||||||
>
|
|
||||||
<el-icon><Plus /></el-icon>
|
|
||||||
</el-upload>
|
|
||||||
|
|
||||||
<el-dialog v-model="dialogVisible">
|
|
||||||
<div class="flex justify-center">
|
|
||||||
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
<el-form-item label="真实姓名" prop="realName">
|
<el-form-item label="真实姓名" prop="realName">
|
||||||
<el-input v-model="form.realName" placeholder="请输入真实姓名"/>
|
<el-input v-model="form.realName" placeholder="请输入真实姓名"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机号码" prop="phone">
|
<el-form-item label="身份证号码" prop="idCard" required>
|
||||||
<el-input v-model="form.phone" maxlength="11" placeholder="请输入真实有效的手机号码"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="身份证号码" prop="idCard">
|
|
||||||
<el-input v-model="form.idCard" placeholder="请输入证件号码"/>
|
<el-input v-model="form.idCard" placeholder="请输入证件号码"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="身份证" required>
|
<el-form-item label="身份证">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="sfzFile"
|
v-model:file-list="sfzFile"
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: tenantId,
|
TenantId: 5,
|
||||||
}"
|
}"
|
||||||
:limit="2"
|
:limit="2"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
@@ -160,7 +69,9 @@
|
|||||||
:on-remove="sfzRemove"
|
:on-remove="sfzRemove"
|
||||||
:on-success="sfzSuccess"
|
:on-success="sfzSuccess"
|
||||||
>
|
>
|
||||||
<el-icon><Plus /></el-icon>
|
<el-icon>
|
||||||
|
<Plus/>
|
||||||
|
</el-icon>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属行业" prop="category">
|
<el-form-item label="所属行业" prop="category">
|
||||||
@@ -173,7 +84,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="业务描述" prop="comments">
|
<el-form-item label="业务描述" prop="comments">
|
||||||
<el-input v-model="form.comments" placeholder="请输入公司业务介绍" :rows="5" type="textarea" />
|
<el-input v-model="form.comments" placeholder="请输入公司业务介绍" :rows="5" type="textarea"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="注册协议">
|
<el-form-item label="注册协议">
|
||||||
<el-checkbox v-model="isAgree">
|
<el-checkbox v-model="isAgree">
|
||||||
@@ -186,12 +97,184 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :name="1" label="企业认证">
|
||||||
|
<!-- 未完成认证 -->
|
||||||
|
<template v-if="form.status === 0 && form.checkStatus">
|
||||||
|
<el-result
|
||||||
|
icon="warning"
|
||||||
|
title="审核中"
|
||||||
|
:sub-title="`您的申请已提交,请耐心等待工作人员的审核,非常感谢`"
|
||||||
|
>
|
||||||
|
</el-result>
|
||||||
|
</template>
|
||||||
|
<!-- 已完成认证 -->
|
||||||
|
<template v-if="form.status === 1">
|
||||||
|
<el-result
|
||||||
|
icon="success"
|
||||||
|
title="企业认证已通过"
|
||||||
|
:sub-title="`认证完成时间 ${form.completedTime}`"
|
||||||
|
>
|
||||||
|
<template #extra>
|
||||||
|
<el-button type="text" @click="onUpdate">修改认证信息</el-button>
|
||||||
|
</template>
|
||||||
|
</el-result>
|
||||||
|
</template>
|
||||||
|
<!-- 申请被驳回 -->
|
||||||
|
<template v-if="form.status === 2">
|
||||||
|
<el-result
|
||||||
|
icon="error"
|
||||||
|
title="您的申请已被驳回"
|
||||||
|
:sub-title="`${form.reason}`"
|
||||||
|
>
|
||||||
|
<template #extra>
|
||||||
|
<el-button type="text" @click="onUpdate">修改认证信息</el-button>
|
||||||
|
</template>
|
||||||
|
</el-result>
|
||||||
|
</template>
|
||||||
|
<!-- 未提交 -->
|
||||||
|
<template v-if="form.status == 0 && !form.checkStatus">
|
||||||
|
<el-form-item label="企业名称" prop="merchantName">
|
||||||
|
<el-input v-model="form.merchantName" placeholder="请输入企业名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="社会信用代码" prop="merchantCode">
|
||||||
|
<el-input v-model="form.merchantCode" placeholder="请输入社会信用代码"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="营业执照" required>
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="yyzzFile"
|
||||||
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
|
:headers="{
|
||||||
|
Authorization: token,
|
||||||
|
TenantId: 5,
|
||||||
|
}"
|
||||||
|
:limit="1"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:on-remove="yyzzRemove"
|
||||||
|
:on-success="yyzzOnSuccess"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Plus/>
|
||||||
|
</el-icon>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
<el-dialog v-model="dialogVisible">
|
<el-dialog v-model="dialogVisible">
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
<el-image w-full :src="dialogImageUrl" alt="查看证件" />
|
<img w-full :src="dialogImageUrl" alt="Preview Image"/>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="门头照片">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="image"
|
||||||
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
|
:headers="{
|
||||||
|
Authorization: token,
|
||||||
|
TenantId: 5,
|
||||||
|
}"
|
||||||
|
:limit="1"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:on-remove="imageRemove"
|
||||||
|
:on-success="imageOnSuccess"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Plus/>
|
||||||
|
</el-icon>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogVisible">
|
||||||
|
<div class="flex justify-center">
|
||||||
|
<img w-full :src="dialogImageUrl" alt="Preview Image"/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="其他证件">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="files"
|
||||||
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
|
:headers="{
|
||||||
|
Authorization: token,
|
||||||
|
TenantId: 5,
|
||||||
|
}"
|
||||||
|
:limit="9"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:on-remove="filesRemove"
|
||||||
|
:on-success="filesOnSuccess"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Plus/>
|
||||||
|
</el-icon>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogVisible">
|
||||||
|
<div class="flex justify-center">
|
||||||
|
<img w-full :src="dialogImageUrl" alt="Preview Image"/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="真实姓名" prop="realName">
|
||||||
|
<el-input v-model="form.realName" placeholder="请输入真实姓名"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号码" prop="phone">
|
||||||
|
<el-input v-model="form.phone" disabled maxlength="11" placeholder="请输入真实有效的手机号码"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证号码" prop="idCard" required>
|
||||||
|
<el-input v-model="form.idCard" placeholder="请输入证件号码"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证">
|
||||||
|
<el-upload
|
||||||
|
v-model:file-list="sfzFile"
|
||||||
|
action="https://server.gxwebosoft.com/api/oss/upload"
|
||||||
|
:headers="{
|
||||||
|
Authorization: token,
|
||||||
|
TenantId: 5,
|
||||||
|
}"
|
||||||
|
:limit="2"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:on-remove="sfzRemove"
|
||||||
|
:on-success="sfzSuccess"
|
||||||
|
>
|
||||||
|
<el-icon>
|
||||||
|
<Plus/>
|
||||||
|
</el-icon>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所属行业" prop="category">
|
||||||
|
<el-cascader
|
||||||
|
v-model="industry"
|
||||||
|
:options="industryData"
|
||||||
|
placeholder="请选择所属行业"
|
||||||
|
class="w-full"
|
||||||
|
@change="handleChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="业务描述" prop="comments">
|
||||||
|
<el-input v-model="form.comments" placeholder="请输入公司业务介绍" :rows="5" type="textarea"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="注册协议">
|
||||||
|
<el-checkbox v-model="isAgree">
|
||||||
|
请务必提供真实信息,我司有权自行或委托第三方审查您提供的身份信息是否属真实,有效。若提供虚假信息,由此的全部后果由您承担。
|
||||||
|
</el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
<el-space class="flex">
|
||||||
|
<el-button type="primary" size="large" :disabled="!isAgree" @click="submitForm(formRef)">
|
||||||
|
{{ isUpdate ? '提交修改' : '提交申请' }}
|
||||||
|
</el-button>
|
||||||
|
</el-space>
|
||||||
|
</template>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<el-dialog v-model="dialogVisible">
|
||||||
|
<div class="flex justify-center">
|
||||||
|
<el-image w-full :src="dialogImageUrl" alt="查看证件"/>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -200,15 +283,21 @@ import {Plus} from '@element-plus/icons-vue'
|
|||||||
import type {FormInstance, FormRules, UploadProps, UploadUserFile} from 'element-plus'
|
import type {FormInstance, FormRules, UploadProps, UploadUserFile} from 'element-plus'
|
||||||
import type {ShopMerchantApply} from "~/api/shop/shopMerchantApply/model";
|
import type {ShopMerchantApply} from "~/api/shop/shopMerchantApply/model";
|
||||||
import industryData from '@/assets/json/industry-data.json';
|
import industryData from '@/assets/json/industry-data.json';
|
||||||
import {useClientRequest} from "~/composables/useClientRequest";
|
|
||||||
import type {ApiResult} from "~/api";
|
|
||||||
import {useServerRequest} from "~/composables/useServerRequest";
|
|
||||||
import type {ShopMerchant} from "~/api/shop/shopMerchant/model";
|
|
||||||
import useFormData from "~/utils/use-form-data";
|
import useFormData from "~/utils/use-form-data";
|
||||||
import {COMMON_API_URL} from "~/config";
|
import {
|
||||||
|
addShopMerchantApply, getShopMerchantApplyByPhone,
|
||||||
|
getShopMerchantApplyByUserId,
|
||||||
|
updateShopMerchantApply
|
||||||
|
} from "~/api/shop/shopMerchantApply";
|
||||||
|
import {useUser} from "~/composables/configState";
|
||||||
|
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'done', status: boolean): void
|
||||||
|
}>()
|
||||||
|
|
||||||
const token = useToken();
|
const token = useToken();
|
||||||
const tenantId = localStorage.getItem('ServerTenantId')
|
const user = useUser();
|
||||||
const formRef = ref<FormInstance>()
|
const formRef = ref<FormInstance>()
|
||||||
const yyzzFile = ref<UploadUserFile[]>([])
|
const yyzzFile = ref<UploadUserFile[]>([])
|
||||||
const sfzFile = ref<UploadUserFile[]>([])
|
const sfzFile = ref<UploadUserFile[]>([])
|
||||||
@@ -230,7 +319,7 @@ const {form, assignFields, resetFields} = useFormData<ShopMerchantApply>({
|
|||||||
merchantName: undefined,
|
merchantName: undefined,
|
||||||
merchantCode: undefined,
|
merchantCode: undefined,
|
||||||
image: undefined,
|
image: undefined,
|
||||||
phone: undefined,
|
phone: user.value.phone,
|
||||||
realName: undefined,
|
realName: undefined,
|
||||||
idCard: undefined,
|
idCard: undefined,
|
||||||
sfz1: undefined,
|
sfz1: undefined,
|
||||||
@@ -293,7 +382,7 @@ const sfzRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => {
|
|||||||
form.sfz2 = '';
|
form.sfz2 = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const sfzSuccess = (e:any) => {
|
const sfzSuccess = (e: any) => {
|
||||||
sfzStr.value.push(e.data.downloadUrl)
|
sfzStr.value.push(e.data.downloadUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,58 +435,62 @@ const handlePictureCardPreview: UploadProps['onPreview'] = (uploadFile) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const runtimeConfig = useRuntimeConfig();
|
|
||||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return
|
if (!formEl) return;
|
||||||
await formEl.validate((valid, fields) => {
|
|
||||||
if (valid) {
|
await formEl.validate(async (valid) => {
|
||||||
console.log('submit!',valid)
|
if (!valid) return;
|
||||||
if (form.type == 0) {
|
|
||||||
|
console.log('submit!', valid);
|
||||||
|
|
||||||
|
if (form.type === 0) {
|
||||||
form.shopType = '个人开发者';
|
form.shopType = '个人开发者';
|
||||||
form.merchantName = form.realName;
|
form.merchantName = form.realName;
|
||||||
}
|
}
|
||||||
if(form.type == 1){
|
|
||||||
|
if (form.type === 1) {
|
||||||
form.shopType = '企业开发者';
|
form.shopType = '企业开发者';
|
||||||
if(form.yyzz == ''){
|
if (!form.yyzz) {
|
||||||
return ElMessage.error('请上营业执照');
|
ElMessage.error('请上传营业执照');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if(filesStr.value.length > 0){
|
if (filesStr.value.length > 0) {
|
||||||
form.files = JSON.stringify(filesStr.value)
|
form.files = JSON.stringify(filesStr.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(sfzStr.value.length == 1){
|
|
||||||
return ElMessage.error('请上传身份证正反面');
|
if (sfzStr.value.length < 2) {
|
||||||
|
ElMessage.error('请上传身份证正反面');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.sfz1 = sfzStr.value[0];
|
form.sfz1 = sfzStr.value[0];
|
||||||
form.sfz2 = sfzStr.value[1];
|
form.sfz2 = sfzStr.value[1];
|
||||||
useClientRequest<ApiResult<any>>(`/shop/shop-merchant-apply`, {
|
|
||||||
baseURL: runtimeConfig.public.apiServer,
|
|
||||||
method: isUpdate.value ? 'PUT' : 'POST',
|
|
||||||
body: form
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
ElMessage.success(res.message)
|
|
||||||
reload();
|
|
||||||
} else {
|
|
||||||
return ElMessage.error(res.message)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.log('error submit!', fields)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const resetForm = (formEl: FormInstance | undefined) => {
|
const saveOrUpdate = isUpdate.value ? updateShopMerchantApply : addShopMerchantApply;
|
||||||
if (!formEl) return
|
|
||||||
resetFields();
|
try {
|
||||||
}
|
const res = await saveOrUpdate({
|
||||||
|
...form,
|
||||||
|
files: filesStr.value.length ? JSON.stringify(filesStr.value) : undefined,
|
||||||
|
yyzz: form.yyzz || undefined,
|
||||||
|
sfz1: form.sfz1 || undefined,
|
||||||
|
sfz2: form.sfz2 || undefined,
|
||||||
|
});
|
||||||
|
console.log(res);
|
||||||
|
ElMessage.success('提交成功');
|
||||||
|
await reload()
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
const {data: response} = await useServerRequest<ApiResult<ShopMerchant>>(COMMON_API_URL + '/shop/shop-merchant-apply/getByUserId')
|
getShopMerchantApplyByPhone()
|
||||||
if (response.value?.data) {
|
.then(data => {
|
||||||
isUpdate.value = true;
|
assignFields(data)
|
||||||
assignFields(response.value.data)
|
|
||||||
industry.value = []
|
industry.value = []
|
||||||
industry.value.push(form.parentId)
|
industry.value.push(form.parentId)
|
||||||
industry.value.push(form.categoryId)
|
industry.value.push(form.categoryId)
|
||||||
@@ -407,28 +500,35 @@ const reload = async () => {
|
|||||||
sfzFile.value = []
|
sfzFile.value = []
|
||||||
sfzStr.value = []
|
sfzStr.value = []
|
||||||
image.value = []
|
image.value = []
|
||||||
if(form.sfz1){
|
|
||||||
|
// 赋值
|
||||||
|
if (user.value.phone) {
|
||||||
|
form.phone = user.value.phone;
|
||||||
|
}
|
||||||
|
if (form.sfz1) {
|
||||||
sfzFile.value.push({
|
sfzFile.value.push({
|
||||||
uid: 1,
|
uid: 1,
|
||||||
url: form.sfz1,
|
url: form.sfz1,
|
||||||
name: '身份证正面',
|
name: '身份证正面',
|
||||||
})
|
})
|
||||||
|
sfzStr.value.push(form.sfz1)
|
||||||
}
|
}
|
||||||
if(form.sfz2){
|
if (form.sfz2) {
|
||||||
sfzFile.value.push({
|
sfzFile.value.push({
|
||||||
uid: 2,
|
uid: 2,
|
||||||
url: form.sfz2,
|
url: form.sfz2,
|
||||||
name: '身份证反面',
|
name: '身份证反面',
|
||||||
})
|
})
|
||||||
|
sfzStr.value.push(form.sfz2)
|
||||||
}
|
}
|
||||||
if(form.yyzz){
|
if (form.yyzz) {
|
||||||
yyzzFile.value.push({
|
yyzzFile.value.push({
|
||||||
uid: 3,
|
uid: 3,
|
||||||
url: form.yyzz,
|
url: form.yyzz,
|
||||||
name: '营业执照',
|
name: '营业执照',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(form.image){
|
if (form.image) {
|
||||||
image.value.push({
|
image.value.push({
|
||||||
uid: 4,
|
uid: 4,
|
||||||
url: form.image,
|
url: form.image,
|
||||||
@@ -438,24 +538,27 @@ const reload = async () => {
|
|||||||
if (form.files) {
|
if (form.files) {
|
||||||
const arr = JSON.parse(form.files)
|
const arr = JSON.parse(form.files)
|
||||||
let i = 1;
|
let i = 1;
|
||||||
arr.map(d => {
|
arr.map((item: any) => {
|
||||||
files.value.push({
|
files.value.push({
|
||||||
uid: i++,
|
uid: i++,
|
||||||
url: d,
|
url: item,
|
||||||
name: '',
|
name: '',
|
||||||
})
|
})
|
||||||
filesStr.value.push(d)
|
filesStr.value.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if(form.status == 1){
|
||||||
|
emit('done',true)
|
||||||
}
|
}
|
||||||
|
isUpdate.value = true
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
resetFields();
|
||||||
|
emit('done',false)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
reload();
|
reload();
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
|
||||||
/* 自定义 el-dialog 的样式 */
|
|
||||||
.el-dialog {
|
|
||||||
background: rgba(255, 255, 255, 0.5); /* 设置背景颜色为半透明白色 */
|
|
||||||
backdrop-filter: blur(10px); /* 可选:为背景添加模糊效果 */
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="xl:w-screen-xl m-auto py-4 my-20">
|
<div class="xl:w-screen-xl m-auto py-4 my-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 mr-3"> 用户中心 </span>
|
<span class="text-large font-600 mr-3"> 用户中心{{ user?.certification }} </span>
|
||||||
</template>
|
</template>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<nuxt-link to="/user/modify" class="text-gray-400 text-sm">修改资料</nuxt-link>
|
<nuxt-link to="/user/modify" class="text-gray-400 text-sm">修改资料</nuxt-link>
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
<el-descriptions-item label="昵称">{{ user?.nickname }}</el-descriptions-item>
|
<el-descriptions-item label="昵称">{{ user?.nickname }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="性别">{{ user?.sexName }}</el-descriptions-item>
|
<el-descriptions-item label="性别">{{ user?.sexName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="邮箱">{{ user?.email }}</el-descriptions-item>
|
<el-descriptions-item label="邮箱">{{ user?.email }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="所在省份">{{ user?.province }}</el-descriptions-item>
|
<!-- <el-descriptions-item label="所在省份">{{ user?.province }}</el-descriptions-item>-->
|
||||||
<el-descriptions-item label="所在城市">{{ user?.city }}</el-descriptions-item>
|
<!-- <el-descriptions-item label="所在城市">{{ user?.city }}</el-descriptions-item>-->
|
||||||
<el-descriptions-item label="可用余额">{{ user?.balance }}</el-descriptions-item>
|
<el-descriptions-item label="可用余额">{{ user?.balance }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="可用积分">{{ user?.points }}</el-descriptions-item>
|
<el-descriptions-item label="可用积分">{{ user?.points }}</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item :rowspan="1" :span="2" label="生日">{{ user?.birthday }}</el-descriptions-item>-->
|
<!-- <el-descriptions-item :rowspan="1" :span="2" label="生日">{{ user?.birthday }}</el-descriptions-item>-->
|
||||||
@@ -43,18 +43,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ArrowLeft, View, Search} from '@element-plus/icons-vue'
|
import {ArrowLeft, View, Search} from '@element-plus/icons-vue'
|
||||||
import {useWebsite} from "~/composables/configState";
|
|
||||||
import useFormData from '@/utils/use-form-data';
|
import useFormData from '@/utils/use-form-data';
|
||||||
import type {User} from '@/api/system/user/model';
|
import type {User} from '@/api/system/user/model';
|
||||||
import {ref} from 'vue'
|
import {ref} from 'vue'
|
||||||
import {updateUser} from "~/api/layout";
|
import {updateUser} from "~/api/layout";
|
||||||
|
|
||||||
|
|
||||||
// 配置信息
|
// 配置信息
|
||||||
const runtimeConfig = useRuntimeConfig();
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const website = useWebsite()
|
|
||||||
const user = useUser();
|
const user = useUser();
|
||||||
const activeIndex = ref('');
|
const activeIndex = ref('');
|
||||||
|
|
||||||
@@ -76,15 +72,6 @@ const {form, assignFields} = useFormData<User>({
|
|||||||
tenantName: undefined
|
tenantName: undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
|
||||||
title: `用户中心`,
|
|
||||||
meta: [{name: website.value.keywords, content: website.value.comments}]
|
|
||||||
});
|
|
||||||
|
|
||||||
const onDone = (index: string) => {
|
|
||||||
activeIndex.value = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
// 未登录状态(是否强制登录)
|
// 未登录状态(是否强制登录)
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<el-form-item label="上传头像" class="px-4">
|
<el-form-item label="上传头像" class="px-4">
|
||||||
<el-upload
|
<el-upload
|
||||||
v-model:file-list="avatar"
|
v-model:file-list="avatar"
|
||||||
action="https://common-api.websoft.top/api/oss/upload"
|
action="https://server.gxwebsoft.com/api/oss/upload"
|
||||||
:headers="{
|
:headers="{
|
||||||
Authorization: token,
|
Authorization: token,
|
||||||
TenantId: 5,
|
TenantId: 5,
|
||||||
@@ -65,21 +65,16 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ArrowLeft, View, Search, Plus} from '@element-plus/icons-vue'
|
import {ArrowLeft, View, Search, Plus} from '@element-plus/icons-vue'
|
||||||
import type {FormInstance, FormRules, UploadProps, UploadUserFile} from 'element-plus'
|
import type {UploadProps, UploadUserFile} from 'element-plus'
|
||||||
import {useWebsite} from "~/composables/configState";
|
|
||||||
import useFormData from '@/utils/use-form-data';
|
import useFormData from '@/utils/use-form-data';
|
||||||
import type {User} from '@/api/system/user/model';
|
import type {User} from '@/api/system/user/model';
|
||||||
import {ref} from 'vue'
|
import {ref} from 'vue'
|
||||||
import {updateUser} from "~/api/layout";
|
import {updateUser} from "~/api/layout";
|
||||||
|
|
||||||
|
|
||||||
// 配置信息
|
// 配置信息
|
||||||
const runtimeConfig = useRuntimeConfig();
|
|
||||||
const tenantId = localStorage.getItem('ServerTenantId')
|
|
||||||
const token = useToken();
|
const token = useToken();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const website = useWebsite()
|
|
||||||
const user = useUser();
|
const user = useUser();
|
||||||
const activeIndex = ref('');
|
const activeIndex = ref('');
|
||||||
const avatar = ref<UploadUserFile[]>([])
|
const avatar = ref<UploadUserFile[]>([])
|
||||||
@@ -107,14 +102,9 @@ const {form, assignFields} = useFormData<User>({
|
|||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `用户中心`,
|
title: `用户中心`
|
||||||
meta: [{name: website.value.keywords, content: website.value.comments}]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDone = (index: string) => {
|
|
||||||
activeIndex.value = index;
|
|
||||||
}
|
|
||||||
|
|
||||||
const reload = async () => {
|
const reload = async () => {
|
||||||
// 未登录状态(是否强制登录)
|
// 未登录状态(是否强制登录)
|
||||||
const token = localStorage.getItem('token');
|
const token = localStorage.getItem('token');
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="xl:w-screen-xl m-auto py-4 my-20">
|
<div class="xl:w-screen-xl m-auto py-4 my-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 mr-3"> 订单列表 </span>
|
<span class="text-large font-600 mr-3"> 已购插件 </span>
|
||||||
</template>
|
</template>
|
||||||
<div class="login-layout m-auto mt-10 sm:w-screen-xl w-full">
|
<div class="login-layout m-auto mt-10 sm:w-screen-xl w-full">
|
||||||
<div class="m-auto flex sm:flex-row flex-col sm:px-0 px-3">
|
<div class="m-auto flex sm:flex-row flex-col sm:px-0 px-3">
|
||||||
@@ -57,8 +57,7 @@ const { form, assignFields } = useFormData<User>({
|
|||||||
const tableData = ref<any[]>();
|
const tableData = ref<any[]>();
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `用户中心 - ${config.value?.siteName}`,
|
title: `用户中心 - ${config.value?.siteName}`
|
||||||
meta: [{ name: website.value.keywords, content: website.value.comments }]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ const {form, assignFields} = useFormData<User>({
|
|||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: `用户中心 - ${config.value?.siteName}`,
|
title: `用户中心 - ${config.value?.siteName}`
|
||||||
meta: [{name: website.value.keywords, content: website.value.comments}]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
types/global.d.ts
vendored
1
types/global.d.ts
vendored
@@ -36,6 +36,7 @@ export interface Config {
|
|||||||
MobileIndexBottomBanner?: string;
|
MobileIndexBottomBanner?: string;
|
||||||
IndexAboutNum?: string;
|
IndexAboutNum?: string;
|
||||||
showTopBar?: string;
|
showTopBar?: string;
|
||||||
|
showLoginButton?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BreadcrumbItem {
|
export interface BreadcrumbItem {
|
||||||
|
|||||||
Reference in New Issue
Block a user