Commit b4865765 authored by Bill's avatar Bill

Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev

parents e9e04d90 c208c6ea
...@@ -33,3 +33,5 @@ src/global/config/global.d.ts ...@@ -33,3 +33,5 @@ src/global/config/global.d.ts
src/global/config/navigation.config.ts src/global/config/navigation.config.ts
src/services/*Api.ts src/services/*Api.ts
src/services/*Api src/services/*Api
router.config.json
...@@ -4,18 +4,19 @@ ...@@ -4,18 +4,19 @@
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-19 11:12:51 * @LastEditTime: 2020-10-19 11:12:51
*/ */
import CommodityRoute from './commodityRoute' // 商品能力路由 // import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由 // import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由 // import ShopRoute from './shopRoute' // 店铺能力路由
import ChannelRoute from './channelRoute' // 渠道能力路由 // import ChannelRoute from './channelRoute' // 渠道能力路由
import TranactionRoute from './tranactionRoute' // 交易能力路由 // import TranactionRoute from './tranactionRoute' // 交易能力路由
import LogisticsRoute from './logisticsRoutes' // 物流能力路由 // import LogisticsRoute from './logisticsRoutes' // 物流能力路由
import PayandSettleRoute from './payandSettle' //支付与结算 // import PayandSettleRoute from './payandSettle' //支付与结算
import AuthConfigRoute from './authConfigRoute' // import AuthConfigRoute from './authConfigRoute'
import AfterService from './afterServiceRoute' // 售后 // import AfterService from './afterServiceRoute' // 售后
import HandlingRoute from './handlingRoute'; // 加工能力 // import HandlingRoute from './handlingRoute'; // 加工能力
import BalaceRoute from './balanceRoute'; // import BalaceRoute from './balanceRoute';
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute] import asyncRoutes from '../router.config.json'
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const memberCenterRoute = { const memberCenterRoute = {
path: '/memberCenter', path: '/memberCenter',
...@@ -41,7 +42,7 @@ const memberCenterRoute = { ...@@ -41,7 +42,7 @@ const memberCenterRoute = {
// component: '@/pages/index', // component: '@/pages/index',
component: '@/pages/home', component: '@/pages/home',
}, },
...routes, ...asyncRoutes,
{ {
path: '/memberCenter/noAuth', path: '/memberCenter/noAuth',
auth: false, auth: false,
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
"start:cross": "cross-env SITE_ID=352 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.25:9400 yarn start", "start:cross": "cross-env SITE_ID=352 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.0.25:9400 yarn start",
"start:scm": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn start", "start:scm": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn start",
"start:url": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true SOCKET_URL=ws://lingxi-all.wg.shushangyun.com yarn start", "start:url": "cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com USE_ROUTE_CONFIG=true SOCKET_URL=ws://lingxi-all.wg.shushangyun.com yarn start",
"start:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.10:9400 yarn start" "start:10": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.10:9400 yarn start",
"start:25": "cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.25:9400 yarn start"
}, },
"lint-staged": { "lint-staged": {
"*.{js,jsx,less,md,json}": [ "*.{js,jsx,less,md,json}": [
......
...@@ -8,16 +8,17 @@ const fetchConfig = require(runFile).fetchConfig ...@@ -8,16 +8,17 @@ const fetchConfig = require(runFile).fetchConfig
const gulp = require('gulp') const gulp = require('gulp')
const json2ts = require('json2ts') const json2ts = require('json2ts')
const uploadBuildStram = require('./build') const uploadBuildStram = require('./build')
const pullRemoteRouter = require('./pullRemoteRouterList')
const rootPath = '../'; const rootPath = '../';
const outputPath = path.resolve(__dirname, rootPath, 'config/base.config.json') const outputPath = path.resolve(__dirname, rootPath, 'config/base.config.json')
const outputDts = path.resolve(__dirname, rootPath, 'src/global/config/global.d.ts') const outputDts = path.resolve(__dirname, rootPath, 'src/global/config/global.d.ts')
// Logs.start('gulp start') // Logs.start('gulp start')
gulp.task('start', gulp.series(done => { gulp.task('start', gulp.series(done => {
getAsyncConfig(done) startRemotePull(done)
})) }))
gulp.task('upload', gulp.series(done => { gulp.task('upload', gulp.series(done => {
...@@ -59,10 +60,18 @@ function genarateDtsFile(json, done) { ...@@ -59,10 +60,18 @@ function genarateDtsFile(json, done) {
} }
/** /**
* 异步读取远程路由并写入
*/
async function startRemotePull(done) {
await pullRemoteRouter()
getAsyncConfig(done)
}
/**
* 异步获取远程配置 * 异步获取远程配置
* @todo * @todo
*/ */
async function getAsyncConfig(done) { async function getAsyncConfig(done) {
const data = await fetchConfig() const data = await fetchConfig()
genarateBaseJson(data, done) genarateBaseJson(data, done)
} }
\ No newline at end of file
/**
* 用于在项目开始前获取所有的配置
* 在项目开始前运行`yarn scripts:build`
* @todo 缺少异常处理清空
* @author xjm
*/
const Axios = require('axios').default;
const deepClone = require('clone')
const fs = require('fs')
const path = require('path')
const BACK_GATEWAY = process.env.BACK_GATEWAY
const source = 1
const remoteUrl = BACK_GATEWAY || process.argv[2] || 'http://10.0.0.25:8100'
console.log(`\n当前访问的后端url是${remoteUrl}!!!!!!`)
const axios = Axios.create({
baseURL: remoteUrl,
responseType: 'json',
})
const serviceConfig = {
//初始化会员支付策略配置
router: {
componentList: {
url: '/system/menu/code/list',
method: 'get',
params: {
source
}
},
routerList: {
url: '/system/menu/tree',
method: 'get',
params: {
source
}
}
},
}
function code2component(components, codes) {
components.forEach(v => {
if (v.routes) {
code2component(v.routes, codes)
}
if (v.component) {
const codeResult = codes.find(c => c.code === v.component)
if (!codeResult) {
console.error(`出现不匹配的component->${v.component}\n`)
}
v.component = codeResult.url
}
})
}
// 批量组装接口
async function batchAxiosHttps() {
const asyncHttpQueue = deepClone(serviceConfig)
const httpErrorQueue = []
const serverErrorQueue = []
console.log('\n')
for (const item in serviceConfig) {
if (JSON.stringify(item) !== '{}') {
for (const subItem in serviceConfig[item]) {
try {
const data = await axios(serviceConfig[item][subItem])
// 当接口出错时 不写入json文件
if (data.data.code === 1000) {
asyncHttpQueue[item][subItem] = data.data.data
} else {
serverErrorQueue.push({ ...asyncHttpQueue[item][subItem], ...data.data })
// 默认置为null
asyncHttpQueue[item][subItem] = null
}
} catch (err) {
httpErrorQueue.push({ ...serviceConfig[item][subItem], ...err.response.data })
}
}
}
}
if (httpErrorQueue.length > 0) {
console.log('\n网络错误\n')
// 可在此做日志收集
console.log(httpErrorQueue)
}
if (serverErrorQueue.length > 0) {
console.log('接口服务错误\n')
// 可在此做日志收集
console.log(serverErrorQueue)
}
if (httpErrorQueue.length > 0 || serverErrorQueue.length > 0) {
// 退出构建
console.log('\n脚本构建失败!!!!!!')
// 终止当前进程
process.exit(1)
}
// fs.writeFile(path.resolve(__dirname, '../config/component.config.json'), `${JSON.stringify(asyncHttpQueue.router.componentList)}`, function(err) {
// if (err) throw err
// })
// code2component(asyncHttpQueue.router.routerList, asyncHttpQueue.router.componentList)
fs.writeFile(path.resolve(__dirname, '../config/router.config.json'), `${JSON.stringify(asyncHttpQueue.router.routerList)}`, function(err) {
if (err) throw err
})
}
module.exports = batchAxiosHttps
...@@ -92,8 +92,8 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -92,8 +92,8 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
return list[0] return list[0]
} }
const { formatMessage } = useIntl(); // const { formatMessage } = useIntl();
const basicInfo = getMenuData(props.route.routes, { locale: true }, formatMessage) const basicInfo = getMenuData(props.route.routes, { locale: false })
const menuData = basicInfo.menuData ? basicInfo.menuData.filter(item => !item.redirect) : [] const menuData = basicInfo.menuData ? basicInfo.menuData.filter(item => !item.redirect) : []
const menuRouter = getMenuRouter(menuData, location.pathname) const menuRouter = getMenuRouter(menuData, location.pathname)
...@@ -152,45 +152,40 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -152,45 +152,40 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
: {} : {}
return ( return (
<> <ProLayout
{/* <Helmet> pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
<link rel="icon" type="image/x-icon" href={GlobalConfig.global.siteInfo.logo} /> // contentStyle={{minWidth: '1280px'}}
</Helmet> */} style={prolayoutStyle}
<ProLayout logo={logo}
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href} // formatMessage={formatMessage}
// contentStyle={{minWidth: '1280px'}} menuHeaderRender={(logoDom, titleDom) => (
style={prolayoutStyle} <Link to="/">
logo={logo} {logoDom}
formatMessage={formatMessage} {titleDom}
menuHeaderRender={(logoDom, titleDom) => ( </Link>
<Link to="/"> )}
{logoDom} collapsed={collapsed}
{titleDom} collapsedButtonRender={(flag) => (isHome ? null : flag ? <MenuUnfoldOutlined /> : <MenuFoldOutlined/>) }
</Link> onCollapse={handleMenuCollapse}
)} disableContentMargin={currentRouter?.noMargin !== undefined}
collapsed={collapsed} breadcrumbRender={(routers = []) => [
collapsedButtonRender={(flag) => (isHome ? null : flag ? <MenuUnfoldOutlined /> : <MenuFoldOutlined/>) }
onCollapse={handleMenuCollapse} ]}
disableContentMargin={currentRouter?.noMargin !== undefined} menuRender={() => <MenuSlider
breadcrumbRender={(routers = []) => [ currentSelectKey={selectedKeys}
openKeys={openKeys}
]} menuData={menuData}
menuRender={() => <MenuSlider pathname={location.pathname}
currentSelectKey={selectedKeys} collapseState={collapsed}
openKeys={openKeys} changeOpenKeys={(keys: string[]) => setOpenKeys(keys)}
menuData={menuData} />}
pathname={location.pathname} footerRender={() => defaultFooterDom}
collapseState={collapsed} rightContentRender={() => <RightContent />}
changeOpenKeys={(keys: string[]) => setOpenKeys(keys)} {...props}
/>} {...settings}
footerRender={() => defaultFooterDom} >
rightContentRender={() => <RightContent />} {children}
{...props} </ProLayout>
{...settings}
>
{children}
</ProLayout>
</>
); );
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: XieZhiXiong * @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09 * @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong * @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-26 18:06:04 * @LastEditTime: 2021-01-29 10:53:28
* @Description: 维修商品抽屉组件 * @Description: 维修商品抽屉组件
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -12,7 +12,7 @@ import moment from 'moment'; ...@@ -12,7 +12,7 @@ import moment from 'moment';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'; import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const'; import { FORM_FILTER_PATH } from '@/formSchema/const';
import { PurchaseOrderOutWorkStateTexts, ORDER_TYPE2, PAYWAY, PAY_CHANNEL} from '@/constants'; import { PurchaseOrderOutWorkStateTexts, ORDER_TYPE2, PAYWAY, PAY_CHANNEL, PayOutWorkState } from '@/constants';
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import NestTable from '@/components/NestTable'; import NestTable from '@/components/NestTable';
import { goodItem, OrderListParams, OrderListRes } from './interface'; import { goodItem, OrderListParams, OrderListRes } from './interface';
...@@ -501,7 +501,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> { ...@@ -501,7 +501,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
payAmount: payAmount:
product.payInfoList ? product.payInfoList ?
product.payInfoList.reduce((prev, now) => { product.payInfoList.reduce((prev, now) => {
return +((product.price * product.purchaseCount * (now.payRatio / 100)).toFixed(2)) + prev; return now.externalState === PayOutWorkState.CONFIRM_ACCOUNT ? now.payPrice + prev : 0;
}, 0) : }, 0) :
0 0
}); });
......
...@@ -554,6 +554,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -554,6 +554,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
let logisticsInfo = {} let logisticsInfo = {}
setConfirmLoading(true) setConfirmLoading(true)
const purchaseIds = [] const purchaseIds = []
let isInvoice = false
for (const item of selectOrderList) { for (const item of selectOrderList) {
purchaseIds.push(item.id) purchaseIds.push(item.id)
productIds.push(item.commodityUnitPrice.id) productIds.push(item.commodityUnitPrice.id)
...@@ -563,6 +564,11 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -563,6 +564,11 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
hasLogistics = true hasLogistics = true
logisticsInfo = item.commodityUnitPrice.commodity.logistics logisticsInfo = item.commodityUnitPrice.commodity.logistics
} }
if(item.commodityUnitPrice.commodity.isInvoice) {
isInvoice = true
}
const buyCommodityInfo: any = { const buyCommodityInfo: any = {
id: item.commodityUnitPrice.id, id: item.commodityUnitPrice.id,
purchaseId: item.id, purchaseId: item.id,
...@@ -602,6 +608,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -602,6 +608,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
supplyMembersId: selectItem.memberId, supplyMembersId: selectItem.memberId,
supplyMembersRoleId: selectItem.memberRoleId, supplyMembersRoleId: selectItem.memberRoleId,
shopId: storeId, shopId: storeId,
isInvoice,
orderList: [{ orderList: [{
id: selectItem.id, id: selectItem.id,
shopname: selectItem.shopname, shopname: selectItem.shopname,
......
import React, { useState, Fragment } from 'react'; import React, { Fragment } from 'react';
import cx from 'classnames'; import cx from 'classnames';
import { Row, Button, message } from 'antd'; import { Row, Button, message } from 'antd';
import { Link, Helmet, history } from 'umi' import { Link, Helmet, history } from 'umi'
import { FormPage, RiskCheck } from 'god'
import { IFormControllers, IFormButtonTypes } from 'god/dist/src/form-page'
import './index.less'
import NiceForm from '@/components/NiceForm'; import NiceForm from '@/components/NiceForm';
import { forgetPwdSchema } from './schema'; import { forgetPwdSchema } from './schema';
import { PATTERN_MAPS } from '@/constants/regExp'; import { PATTERN_MAPS } from '@/constants/regExp';
...@@ -12,7 +9,8 @@ import { omit } from '@/utils'; ...@@ -12,7 +9,8 @@ import { omit } from '@/utils';
import { createFormActions } from '@formily/antd'; import { createFormActions } from '@formily/antd';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { encryptedByAES } from '@/utils/cryptoAes'; import { encryptedByAES } from '@/utils/cryptoAes';
import messages from '@/constants/responseCode'; import PasswordInput from './components/PasswordInput'
import './index.less'
const actions = createFormActions() const actions = createFormActions()
...@@ -46,8 +44,11 @@ const GetBack: React.FC = () => { ...@@ -46,8 +44,11 @@ const GetBack: React.FC = () => {
schema={forgetPwdSchema} schema={forgetPwdSchema}
onSubmit={handleSubmit} onSubmit={handleSubmit}
actions={actions} actions={actions}
components={{
PasswordInput,
}}
expressionScope={{ expressionScope={{
SubmitBtn SubmitBtn,
}} }}
effects={($, { setFieldState, getFieldState }) => { effects={($, { setFieldState, getFieldState }) => {
$('onFieldInputChange', 'account').subscribe(fieldState => { $('onFieldInputChange', 'account').subscribe(fieldState => {
...@@ -95,14 +96,14 @@ const GetBack: React.FC = () => { ...@@ -95,14 +96,14 @@ const GetBack: React.FC = () => {
const selfValue = fieldState.value const selfValue = fieldState.value
const otherName = selfName == 'password' ? 'confirmPassword' : 'password' const otherName = selfName == 'password' ? 'confirmPassword' : 'password'
const otherValue = getFieldState(otherName, state => state.value) const otherValue = getFieldState(otherName, state => state.value)
setFieldState(otherName, state => { // setFieldState(otherName, state => {
if (selfValue && otherValue && selfValue !== otherValue) { // if (selfValue && otherValue && selfValue !== otherValue) {
state.errors = ['两次密码输入不一致'] // state.errors = ['两次密码输入不一致']
} else { // } else {
state.errors = [''] // state.errors = ['']
} // }
}) // })
setFieldState(selfName, state => { setFieldState('confirmPassword', state => {
if (selfValue && otherValue && selfValue !== otherValue) { if (selfValue && otherValue && selfValue !== otherValue) {
state.errors = ['两次密码输入不一致'] state.errors = ['两次密码输入不一致']
} else { } else {
......
import React, { useState, useEffect, Fragment } from 'react'; import React, { useState, useEffect, Fragment } from 'react';
import globalStyles from '@/global/styles/global.less'; import globalStyles from '@/global/styles/global.less';
import './index.less' import './index.less'
import cx from 'classnames'; import cx from 'classnames';
import { Row, Col, Space, Carousel } from 'antd'; import { Row, Col, Space, Carousel } from 'antd';
import ImageBox from '@/components/ImageBox' import ImageBox from '@/components/ImageBox'
import TextLink from '@/components/TextLink'; import TextLink from '@/components/TextLink';
import { import {
ScanOutlined ScanOutlined
} from '@ant-design/icons' } from '@ant-design/icons'
import { Link, history, Helmet } from 'umi' import { Link, history, Helmet } from 'umi'
import ScanLoginWrap from './components/ScanLoginWrap'; import ScanLoginWrap from './components/ScanLoginWrap';
// import leftPicture from '../../../mockStatic/image_ad.png' // import leftPicture from '../../../mockStatic/image_ad.png'
import { PublicApi } from '@/services/api' import { PublicApi } from '@/services/api'
import wechat from '../../../mockStatic/Wechat.png' import wechat from '../../../mockStatic/Wechat.png'
import qq from '../../../mockStatic/QQ.png' import qq from '../../../mockStatic/QQ.png'
import alipay from '../../../mockStatic/Alipay.png' import alipay from '../../../mockStatic/Alipay.png'
import LoginWrap from './components/LoginWrap' import LoginWrap from './components/LoginWrap'
const User: React.FC = () => { const User: React.FC = () => {
const [isScanQrCode, setIsScanQrCode] = useState(false) const [isScanQrCode, setIsScanQrCode] = useState(false)
const [sceneList, setSceneList] = useState<any>() const [sceneList, setSceneList] = useState<any>()
const handleGuideLogin = (param: boolean) => { const handleGuideLogin = (param: boolean) => {
setIsScanQrCode(param) setIsScanQrCode(param)
} }
const forgetPassword = () => { const forgetPassword = () => {
history.push('/user/forget') history.push('/user/forget')
console.log('找回密码') console.log('找回密码')
} }
useEffect(() => { useEffect(() => {
fetchUseScene() fetchUseScene()
}, []) }, [])
const fetchUseScene = () => { const sortData = (data) => {
let param = { let result = []
useScene: 1, if(data) {
position: 1 result = data.sort((a, b) => b.sort > a.sort ? -1 : 1)
} }
//@ts-ignore return result
PublicApi.getManageContentImageFindAllByUseSceneAndPosition(param).then(res => { }
if (res.code === 1000) {
setSceneList(res.data) const fetchUseScene = () => {
} const param: any = {
}) useScene: 1,
} position: 1
}
return (
<Fragment> PublicApi.getManageContentImageFindAllByUseSceneAndPosition(param).then(res => {
<Helmet> if (res.code === 1000) {
<title>用户登录</title> setSceneList(sortData(res.data))
</Helmet> }
<Row className={cx('loginWrap', globalStyles.lingxiBusinessContent1024)}> })
<Col className={cx('loginItem', 'loginDesc')}> }
<div className={'adBox'}>
<Carousel autoplay> return (
{ <Fragment>
sceneList && sceneList.map(item => <ImageBox key={item.id} direction={"column"} width={512} height={550} imgUrl={item.imageUrl} />) <Helmet>
} <title>用户登录</title>
</Carousel> </Helmet>
</div> <Row className={cx('loginWrap', globalStyles.lingxiBusinessContent1024)}>
</Col> <Col className={cx('loginItem', 'loginDesc')}>
<Col className={cx('loginItem', 'loginCtl')}> <div className={'adBox'}>
<div className={'loginMain'}> <Carousel autoplay>
{isScanQrCode ? ( {
<> sceneList && sceneList.map(item => <ImageBox key={item.id} direction={"column"} width={512} height={550} imgUrl={item.imageUrl} />)
<a onClick={() => handleGuideLogin(false)} className={'clickUsernameLogin'}>使用账号密码登录</a> }
<ScanLoginWrap /> </Carousel>
<div className={'scanTips'}> </div>
<ScanOutlined className={'scanIcon'} /> </Col>
<span>打开 App<br />扫一扫登录</span> <Col className={cx('loginItem', 'loginCtl')}>
</div> <div className={'loginMain'}>
</> {isScanQrCode ? (
) : ( <>
<> <a onClick={() => handleGuideLogin(false)} className={'clickUsernameLogin'}>使用账号密码登录</a>
<a onClick={() => handleGuideLogin(true)} className={'clickScanLogin'} /> <ScanLoginWrap />
<h2>欢迎您</h2> <div className={'scanTips'}>
<LoginWrap /> <ScanOutlined className={'scanIcon'} />
<Row justify='end' style={{ marginTop: 16 }}> <span>打开 App<br />扫一扫登录</span>
<Space size={32}> </div>
<TextLink><Link to='/user/register' style={{ color: '#909399' }}>免费注册</Link></TextLink> </>
<TextLink><a onClick={forgetPassword} style={{ color: '#909399' }}>忘记密码</a></TextLink> ) : (
</Space> <>
</Row> <a onClick={() => handleGuideLogin(true)} className={'clickScanLogin'} />
</> <h2>欢迎您</h2>
) <LoginWrap />
} <Row justify='end' style={{ marginTop: 16 }}>
</div> <Space size={32}>
<Row className={'thirdLogin'} align='middle' justify='center'> <TextLink><Link to='/user/register' style={{ color: '#909399' }}>免费注册</Link></TextLink>
<Col>其他方式登录 <TextLink><a onClick={forgetPassword} style={{ color: '#909399' }}>忘记密码</a></TextLink>
<a title="微登录"><img src={wechat} alt="微信登录" /></a> </Space>
<a title="QQ登录"><img src={qq} alt="QQ登录" /></a> </Row>
<a title="支付宝登录"><img src={alipay} alt="支付宝登录" /></a> </>
</Col> )
</Row> }
</Col> </div>
</Row> {/* <Row className={'thirdLogin'} align='middle' justify='center'>
</Fragment> <Col>其他方式登录
) <a title="微登录"><img src={wechat} alt="微信登录" /></a>
} <a title="QQ登录"><img src={qq} alt="QQ登录" /></a>
<a title="支付宝登录"><img src={alipay} alt="支付宝登录" /></a>
export default User </Col>
</Row> */}
</Col>
</Row>
</Fragment>
)
}
export default User
import React from 'react' import React from 'react'
import cx from 'classnames' import cx from 'classnames'
import styles from './index.less' import styles from './index.less'
import globalStyles from '@/global/styles/global.less' import globalStyles from '@/global/styles/global.less'
export interface PolicyProps { const Policy = (props) => {
} return <div className={styles.policyBox}>
<h1>隐私政策</h1>
const Policy:React.FC<PolicyProps> = (props) => { <div className={globalStyles.lingxiBusinessMarginContent}>
<article>
return <div className={styles.policyBox}> <h4>一、权利归属</h4>
<h1>隐私政策</h1> <main>
<div className={globalStyles.lingxiBusinessMarginContent}> <p>1.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
<article> <p>1.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<h4>一、权利归属</h4> <p>1.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
<main> </main>
<p>1.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p> <h4>二、责任限制</h4>
<p>1.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p> <main>
<p>1.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p> <p>2.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
</main> <p>2.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<h4>二、责任限制</h4> <p>2.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
<main> </main>
<p>2.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p> </article>
<p>2.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p> </div>
<p>2.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p> </div>
</main> }
</article>
</div> Policy.defaultProps = {}
</div>
} export default Policy
Policy.defaultProps = {}
export default Policy
\ No newline at end of file
...@@ -70,26 +70,19 @@ const useLinkageValidateEffects = () => { ...@@ -70,26 +70,19 @@ const useLinkageValidateEffects = () => {
} }
}) })
}) })
// onFieldValueChange$('*(password,confirmPassword)').subscribe(fieldState => {
// const selfName = fieldState.name onFieldValidateEnd$('isRead').subscribe(fieldState => {
// const selfValue = fieldState.value console.log(fieldState, "fieldState")
// const otherName = selfName == 'password' ? 'confirmPassword' : 'password' if(!fieldState.value) {
// const otherValue = getFieldState(otherName, state => state.value) setFieldState('isRead', state => {
// setFieldState(otherName, state => { state.errors = ['请先同意勾选协议']
// if (selfValue && otherValue && selfValue !== otherValue) { })
// state.errors = ['两次密码输入不一致'] } else {
// } else { setFieldState('isRead', state => {
// state.errors = [''] state.errors = []
// } })
// }) }
// setFieldState(selfName, state => { })
// if (selfValue && otherValue && selfValue !== otherValue) {
// state.errors = ['两次密码输入不一致']
// } else {
// state.errors = ['']
// }
// })
// })
} }
let timeChange: any; // 定时器 let timeChange: any; // 定时器
...@@ -114,10 +107,10 @@ const UserRegistry = () => { ...@@ -114,10 +107,10 @@ const UserRegistry = () => {
}, []) }, [])
const fetchAgreement = () => { const fetchAgreement = () => {
const param = { const param: any = {
columnType: 2 columnType: 2
} }
//@ts-ignore
PublicApi.getManageContentNoticeFindAllByColumnType(param).then(res => { PublicApi.getManageContentNoticeFindAllByColumnType(param).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
setAgreementList(res.data) setAgreementList(res.data)
...@@ -187,7 +180,7 @@ const UserRegistry = () => { ...@@ -187,7 +180,7 @@ const UserRegistry = () => {
maxTime: 60, maxTime: 60,
minTime: 0, minTime: 0,
initText: '获取验证码', initText: '获取验证码',
onEnd: () => { }, onEnd: () => { console.log("end") },
decayRate: 1, decayRate: 1,
delay: 1 * 1000 delay: 1 * 1000
}) })
...@@ -231,7 +224,7 @@ const UserRegistry = () => { ...@@ -231,7 +224,7 @@ const UserRegistry = () => {
setSubStep(true) setSubStep(true)
} }
}).catch(() => { }).catch(() => {
console.log()
}).finally(() => { }).finally(() => {
setSubmitLoading(false) setSubmitLoading(false)
}) })
...@@ -306,7 +299,7 @@ const UserRegistry = () => { ...@@ -306,7 +299,7 @@ const UserRegistry = () => {
smsCodeAfter: <Button disabled={isActive} style={{ minWidth: 110, marginLeft: 8 }} size='large' onClick={handleSendSMS}>{text}</Button>, smsCodeAfter: <Button disabled={isActive} style={{ minWidth: 110, marginLeft: 8 }} size='large' onClick={handleSendSMS}>{text}</Button>,
checkBoxChildren: <span style={{ fontSize: 12 }}>阅读并同意<span className='commonPickColor'> checkBoxChildren: <span style={{ fontSize: 12 }}>阅读并同意<span className='commonPickColor'>
{ {
agreementList && agreementList.map(item => (<a key={`aggreem_${item.id}`} href={`/user/agreement?id=${item.id}`} target="_blank">{item.title}</a>)) agreementList && agreementList.map(item => (<a key={`aggreem_${item.id}`} href={`/user/agreement?id=${item.id}`} target="_blank" rel="noreferrer">{item.title}</a>))
} }
</span> </span>
</span>, </span>,
......
...@@ -16,9 +16,12 @@ export const registerStep0Schema: ISchema = { ...@@ -16,9 +16,12 @@ export const registerStep0Schema: ISchema = {
properties: { properties: {
phone: { phone: {
type: 'string', type: 'string',
required: true,
"x-rules": [ "x-rules": [
{ {
required: true,
message: '请填写手机号'
},
{
pattern: PATTERN_MAPS.phone, pattern: PATTERN_MAPS.phone,
message: '请填写手机号' message: '请填写手机号'
} }
...@@ -35,9 +38,12 @@ export const registerStep0Schema: ISchema = { ...@@ -35,9 +38,12 @@ export const registerStep0Schema: ISchema = {
smsCode: { smsCode: {
type: 'string', type: 'string',
"x-component": 'Phone', "x-component": 'Phone',
required: true,
"x-rules": [ "x-rules": [
{ {
required: true,
message: '请填写验证码'
},
{
pattern: PATTERN_MAPS.smsCode, pattern: PATTERN_MAPS.smsCode,
message: '请输入正确的6位验证码' message: '请输入正确的6位验证码'
} }
...@@ -49,6 +55,12 @@ export const registerStep0Schema: ISchema = { ...@@ -49,6 +55,12 @@ export const registerStep0Schema: ISchema = {
password: { password: {
type: 'string', type: 'string',
"x-component": 'PasswordInput', "x-component": 'PasswordInput',
"x-rules": [
{
required: true,
message: '请填写登录密码'
},
],
"x-component-props": { "x-component-props": {
type: 'password', type: 'password',
placeholder: '请设置你的登录密码', placeholder: '请设置你的登录密码',
...@@ -106,7 +118,13 @@ export const registerStep0Schema: ISchema = { ...@@ -106,7 +118,13 @@ export const registerStep0Schema: ISchema = {
} }
}, },
isRead: { isRead: {
required: true, "x-rules": [
{
required: true,
message: '请先同意勾选协议'
},
],
default: false,
"x-component": 'CheckboxSingle', "x-component": 'CheckboxSingle',
"x-component-props": { "x-component-props": {
children: "{{checkBoxChildren}}" children: "{{checkBoxChildren}}"
...@@ -273,22 +291,31 @@ export const forgetPwdSchema: ISchema = { ...@@ -273,22 +291,31 @@ export const forgetPwdSchema: ISchema = {
}, },
password: { password: {
type: 'string', type: 'string',
"x-rules": [ "x-component": 'PasswordInput',
{
required: true,
message: '请输入密码'
},
{
pattern: PATTERN_MAPS.password,
message: '请输入正确的密码'
}
],
"x-component-props": { "x-component-props": {
type: 'password', type: 'password',
placeholder: '请设置你的新密码', placeholder: '请设置你的新密码',
size: 'large' size: 'large'
} }
}, },
// password: {
// type: 'string',
// "x-rules": [
// {
// required: true,
// message: '请输入密码'
// },
// {
// pattern: PATTERN_MAPS.password,
// message: '请输入正确的密码'
// }
// ],
// "x-component-props": {
// type: 'password',
// placeholder: '请设置你的新密码',
// size: 'large'
// }
// },
confirmPassword: { confirmPassword: {
type: 'string', type: 'string',
"x-rules": [ "x-rules": [
...@@ -296,10 +323,10 @@ export const forgetPwdSchema: ISchema = { ...@@ -296,10 +323,10 @@ export const forgetPwdSchema: ISchema = {
required: true, required: true,
message: '请输入密码' message: '请输入密码'
}, },
{ // {
pattern: PATTERN_MAPS.password, // pattern: PATTERN_MAPS.password,
message: '请输入正确的密码' // message: '请输入正确的密码'
} // }
], ],
"x-component-props": { "x-component-props": {
type: 'password', type: 'password',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment