master
Joe 1 year ago
parent 43921c93d1
commit b6e9b7d982

@ -48,6 +48,7 @@ const TableList: React.FC<{}> = () => {
{ {
title: '主营品类', title: '主营品类',
dataIndex: 'pbcBusinessMainCategory', dataIndex: 'pbcBusinessMainCategory',
ellipsis: true,
search: false, search: false,
}, },
{ {

@ -1,10 +1,10 @@
import { listTreeUsingGet } from '@/services/pop-b2b2c/pbcCategoryController';
import { dashboardUsingPost } from '@/services/pop-b2b2c/pbcUserRecordLogController'; import { dashboardUsingPost } from '@/services/pop-b2b2c/pbcUserRecordLogController';
import { Bar, Pie } from '@ant-design/plots'; import { Bar, Pie, WordCloud, WordCloudConfig } from '@ant-design/plots';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { PageContainer, ProCard, ProForm, ProFormDateRangePicker, ProFormGroup, ProFormInstance, ProFormRadio } from '@ant-design/pro-components'; import { PageContainer, ProCard, ProForm, ProFormDateRangePicker, ProFormGroup, ProFormInstance, ProFormRadio } from '@ant-design/pro-components';
import { Card, Col, DatePickerProps, Row, Spin, Statistic } from 'antd'; import { Card, Col, DatePickerProps, Row, Spin, Statistic } from 'antd';
import React, { useEffect, useRef, useState } from 'react'; import React, { useEffect, useRef, useState } from 'react';
import { querySearchKeyRankUsingPost } from '@/services/pop-b2b2c/pbcSearchKeyController';
const Welcome: React.FC = () => { const Welcome: React.FC = () => {
@ -14,6 +14,7 @@ const Welcome: React.FC = () => {
const [data2, setData2] = useState<any[]>([]); const [data2, setData2] = useState<any[]>([]);
const [data3, setData3] = useState<any[]>([]); const [data3, setData3] = useState<any[]>([]);
const [data4, setData4] = useState<any[]>([]); const [data4, setData4] = useState<any[]>([]);
const [data5, setData5] = useState<any[]>([]);
const [pbcRegisterStatical, setPbcRegisterStatical] = useState<API.PbcRegisterStaticalVO>({ const [pbcRegisterStatical, setPbcRegisterStatical] = useState<API.PbcRegisterStaticalVO>({
vipNumber: 0, vipNumber: 0,
businessNumber: 0 businessNumber: 0
@ -57,6 +58,27 @@ const Welcome: React.FC = () => {
}, },
}; };
const asyncFetch = () => {
fetch('https://gw.alipayobjects.com/os/antfincdn/jPKbal7r9r/mock.json')
.then((response) => response.json())
.then((json) => setData5(json))
.catch((error) => {
console.log('fetch data failed', error);
});
};
const wordCloudConfig: WordCloudConfig = {
data: data5,
wordField: 'x',
weightField: 'value',
colorField: 'x',
wordStyle: {
fontFamily: 'Verdana',
fontSize: [14, 60],
rotation: 0,
},
random: () => 0.5,
};
const getData = () => { const getData = () => {
const param: any = ref.current?.getFieldsValue() const param: any = ref.current?.getFieldsValue()
if (param) { if (param) {
@ -109,6 +131,12 @@ const Welcome: React.FC = () => {
}).catch(() => { }).catch(() => {
handleLoadChange(true) handleLoadChange(true)
}) })
querySearchKeyRankUsingPost(param).then(res => {
if (res.retcode) {
}
})
} }
} }
@ -122,6 +150,7 @@ const Welcome: React.FC = () => {
useEffect(() => { useEffect(() => {
getData() getData()
asyncFetch()
}, []) }, [])
return ( return (
@ -235,6 +264,13 @@ const Welcome: React.FC = () => {
</Card> </Card>
</Col> </Col>
</Row> </Row>
<Row gutter={16}>
<Col span={12}>
<Card title="搜索关键词排行" bordered={false}>
<WordCloud {...wordCloudConfig} data={data5} />
</Card>
</Col>
</Row>
</Spin> </Spin>
</PageContainer> </PageContainer>
); );

@ -4,7 +4,6 @@ import {
} from '@ant-design/icons'; } from '@ant-design/icons';
import { import {
LoginForm, LoginForm,
ProFormCheckbox,
ProFormText, ProFormText,
} from '@ant-design/pro-components'; } from '@ant-design/pro-components';
import { useEmotionCss } from '@ant-design/use-emotion-css'; import { useEmotionCss } from '@ant-design/use-emotion-css';
@ -155,78 +154,6 @@ const Login: React.FC = () => {
}, },
]} ]}
/> />
{/* {status === 'error' && loginType === 'mobile' && <LoginMessage content="验证码错误" />} */}
{/* {type === 'mobile' && (
<>
<ProFormText
fieldProps={{
size: 'large',
prefix: <MobileOutlined />,
}}
name="mobile"
placeholder={'请输入手机号!'}
rules={[
{
required: true,
message: '手机号是必填项!',
},
{
pattern: /^1\d{10}$/,
message: '不合法的手机号!',
},
]}
/>
<ProFormCaptcha
fieldProps={{
size: 'large',
prefix: <LockOutlined />,
}}
captchaProps={{
size: 'large',
}}
placeholder={'请输入验证码!'}
captchaTextRender={(timing, count) => {
if (timing) {
return `${count} ${'秒后重新获取'}`;
}
return '获取验证码';
}}
name="captcha"
rules={[
{
required: true,
message: '验证码是必填项!',
},
]}
onGetCaptcha={async (phone) => {
const result = await getFakeCaptcha({
phone,
});
if (!result) {
return;
}
message.success('获取验证码成功验证码为1234');
}}
/>
</>
)} */}
{/* <div
style={{
marginBottom: 24,
}}
>
<ProFormCheckbox noStyle name="autoLogin">
</ProFormCheckbox>
<a
style={{
float: 'right',
}}
>
?
</a>
</div> */}
</LoginForm> </LoginForm>
</div> </div>
</div> </div>

@ -5,6 +5,7 @@
import * as errorController from './errorController'; import * as errorController from './errorController';
import * as pbcBusinessApprovalController from './pbcBusinessApprovalController'; import * as pbcBusinessApprovalController from './pbcBusinessApprovalController';
import * as pbcBusinessController from './pbcBusinessController'; import * as pbcBusinessController from './pbcBusinessController';
import * as pbcBusinessPostConfigController from './pbcBusinessPostConfigController';
import * as pbcBusinessTeamController from './pbcBusinessTeamController'; import * as pbcBusinessTeamController from './pbcBusinessTeamController';
import * as pbcCategoryController from './pbcCategoryController'; import * as pbcCategoryController from './pbcCategoryController';
import * as pbcCommonDataController from './pbcCommonDataController'; import * as pbcCommonDataController from './pbcCommonDataController';
@ -18,6 +19,7 @@ import * as pbcProductController from './pbcProductController';
import * as pbcProductHotController from './pbcProductHotController'; import * as pbcProductHotController from './pbcProductHotController';
import * as pbcQrController from './pbcQrController'; import * as pbcQrController from './pbcQrController';
import * as pbcRoleController from './pbcRoleController'; import * as pbcRoleController from './pbcRoleController';
import * as pbcSearchKeyController from './pbcSearchKeyController';
import * as pbcSmsController from './pbcSmsController'; import * as pbcSmsController from './pbcSmsController';
import * as pbcSmsLogController from './pbcSmsLogController'; import * as pbcSmsLogController from './pbcSmsLogController';
import * as pbcUserBusinessController from './pbcUserBusinessController'; import * as pbcUserBusinessController from './pbcUserBusinessController';
@ -31,7 +33,9 @@ export default {
pbcSmsLogController, pbcSmsLogController,
pbcImageController, pbcImageController,
pbcLoginController, pbcLoginController,
pbcBusinessPostConfigController,
pbcRoleController, pbcRoleController,
pbcSearchKeyController,
pbcVipGradeController, pbcVipGradeController,
pbcBusinessController, pbcBusinessController,
pbcBusinessApprovalController, pbcBusinessApprovalController,

@ -32,10 +32,32 @@ export async function frontChangeBusinessInfoUsingPost(
}); });
} }
/** 获取商家海报 商家海报 GET /b2b2c/pbcbusiness/getBusinessPoster */ /** 取得商户的图片,用以合成海报 GET /b2b2c/pbcbusiness/getBusinessImage */
export async function getBusinessPosterUsingGet(options?: { [key: string]: any }) { export async function getBusinessImageUsingGet(
return request<API.AjaxResultString_>('/b2b2c/pbcbusiness/getBusinessPoster', { // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getBusinessImageUsingGETParams,
options?: { [key: string]: any },
) {
return request<API.AjaxResultString_>('/b2b2c/pbcbusiness/getBusinessImage', {
method: 'GET', method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 获取商家海报 商家海报 POST /b2b2c/pbcbusiness/getBusinessPoster */
export async function getBusinessPosterUsingPost(
body: API.PbcGenerateBusinessPosterDTO,
options?: { [key: string]: any },
) {
return request<API.AjaxResultString_>('/b2b2c/pbcbusiness/getBusinessPoster', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}), ...(options || {}),
}); });
} }

@ -0,0 +1,32 @@
// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';
/** 获取海报配置列表 获取列表 GET /b2b2c/pbcBusinessPostConfig/getPostConfigList */
export async function getPostConfigListUsingGet(options?: { [key: string]: any }) {
return request<API.AjaxResultListPbcBusinessPostConfig_>(
'/b2b2c/pbcBusinessPostConfig/getPostConfigList',
{
method: 'GET',
...(options || {}),
},
);
}
/** 单个海报配置信息 单个 GET /b2b2c/pbcBusinessPostConfig/postConfigDetail */
export async function postConfigDetailUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.postConfigDetailUsingGETParams,
options?: { [key: string]: any },
) {
return request<API.AjaxResultPbcBusinessPostConfig_>(
'/b2b2c/pbcBusinessPostConfig/postConfigDetail',
{
method: 'GET',
params: {
...params,
},
...(options || {}),
},
);
}

@ -2,6 +2,14 @@
/* eslint-disable */ /* eslint-disable */
import request from '@/utils/request'; import request from '@/utils/request';
/** 匿名登录 GET /b2b2c/login/anoLogin */
export async function anoLoginUsingGet(options?: { [key: string]: any }) {
return request<API.AjaxResult>('/b2b2c/login/anoLogin', {
method: 'GET',
...(options || {}),
});
}
/** auth POST /b2b2c/login/auth */ /** auth POST /b2b2c/login/auth */
export async function authUsingPost(body: API.PbcUserLoginDTO, options?: { [key: string]: any }) { export async function authUsingPost(body: API.PbcUserLoginDTO, options?: { [key: string]: any }) {
return request<API.AjaxResult>('/b2b2c/login/auth', { return request<API.AjaxResult>('/b2b2c/login/auth', {

@ -93,6 +93,21 @@ export async function getProductByQrCodeUsingGet(
}); });
} }
/** 根据商品id获取商品的详情图地址 获取商品详情图地址 GET /b2b2c/pbcproduct/getProductImage */
export async function getProductImageUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.getProductImageUsingGETParams,
options?: { [key: string]: any },
) {
return request<API.AjaxResultString_>('/b2b2c/pbcproduct/getProductImage', {
method: 'GET',
params: {
...params,
},
...(options || {}),
});
}
/** 获取商品分页 分页 POST /b2b2c/pbcproduct/getproductpage */ /** 获取商品分页 分页 POST /b2b2c/pbcproduct/getproductpage */
export async function getProductPageUsingPost( export async function getProductPageUsingPost(
body: API.PbcProductPageDTO, body: API.PbcProductPageDTO,
@ -134,17 +149,17 @@ export async function gogoYayaUsingPost(options?: { [key: string]: any }) {
}); });
} }
/** 根据商品id生成商品分享海报 分享海报 GET /b2b2c/pbcproduct/poster */ /** 根据商品id生成商品分享海报 分享海报 POST /b2b2c/pbcproduct/poster */
export async function posterUsingGet( export async function posterUsingPost(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象) body: API.PbcProductPosterVO,
params: API.posterUsingGETParams,
options?: { [key: string]: any }, options?: { [key: string]: any },
) { ) {
return request<API.AjaxResultString_>('/b2b2c/pbcproduct/poster', { return request<API.AjaxResultString_>('/b2b2c/pbcproduct/poster', {
method: 'GET', method: 'POST',
params: { headers: {
...params, 'Content-Type': 'application/json',
}, },
data: body,
...(options || {}), ...(options || {}),
}); });
} }

@ -0,0 +1,18 @@
// @ts-ignore
/* eslint-disable */
import request from '@/utils/request';
/** querySearchKeyRank 查询关键词排行 POST /b2b2c/pbcSearchKey/querySearchKeyRank */
export async function querySearchKeyRankUsingPost(
body: API.PbcSearchKeyDTO,
options?: { [key: string]: any },
) {
return request<API.AjaxResultListPbcSearchKeyVO_>('/b2b2c/pbcSearchKey/querySearchKeyRank', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

@ -39,3 +39,18 @@ export async function overViewUsingPost(options?: { [key: string]: any }) {
...(options || {}), ...(options || {}),
}); });
} }
/** 用登陆后的用户id替换未登录的用户id POST /b2b2c/statical/replaceLogUserId */
export async function replaceLogUserIdUsingPost(
body: API.PbcDashBoardDTO,
options?: { [key: string]: any },
) {
return request<API.AjaxResultString_>('/b2b2c/statical/replaceLogUserId', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
data: body,
...(options || {}),
});
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save