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,6 +8,7 @@ const fetchConfig = require(runFile).fetchConfig ...@@ -8,6 +8,7 @@ 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 = '../';
...@@ -17,7 +18,7 @@ const outputDts = path.resolve(__dirname, rootPath, 'src/global/config/global.d. ...@@ -17,7 +18,7 @@ const outputDts = path.resolve(__dirname, rootPath, 'src/global/config/global.d.
// 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,6 +60,14 @@ function genarateDtsFile(json, done) { ...@@ -59,6 +60,14 @@ function genarateDtsFile(json, done) {
} }
/** /**
* 异步读取远程路由并写入
*/
async function startRemotePull(done) {
await pullRemoteRouter()
getAsyncConfig(done)
}
/**
* 异步获取远程配置 * 异步获取远程配置
* @todo * @todo
*/ */
......
/**
* 用于在项目开始前获取所有的配置
* 在项目开始前运行`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,16 +152,12 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -152,16 +152,12 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
: {} : {}
return ( return (
<>
{/* <Helmet>
<link rel="icon" type="image/x-icon" href={GlobalConfig.global.siteInfo.logo} />
</Helmet> */}
<ProLayout <ProLayout
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href} pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
// contentStyle={{minWidth: '1280px'}} // contentStyle={{minWidth: '1280px'}}
style={prolayoutStyle} style={prolayoutStyle}
logo={logo} logo={logo}
formatMessage={formatMessage} // formatMessage={formatMessage}
menuHeaderRender={(logoDom, titleDom) => ( menuHeaderRender={(logoDom, titleDom) => (
<Link to="/"> <Link to="/">
{logoDom} {logoDom}
...@@ -190,7 +186,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => { ...@@ -190,7 +186,6 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
> >
{children} {children}
</ProLayout> </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 {
......
...@@ -34,15 +34,23 @@ const User: React.FC = () => { ...@@ -34,15 +34,23 @@ const User: React.FC = () => {
fetchUseScene() fetchUseScene()
}, []) }, [])
const sortData = (data) => {
let result = []
if(data) {
result = data.sort((a, b) => b.sort > a.sort ? -1 : 1)
}
return result
}
const fetchUseScene = () => { const fetchUseScene = () => {
let param = { const param: any = {
useScene: 1, useScene: 1,
position: 1 position: 1
} }
//@ts-ignore
PublicApi.getManageContentImageFindAllByUseSceneAndPosition(param).then(res => { PublicApi.getManageContentImageFindAllByUseSceneAndPosition(param).then(res => {
if (res.code === 1000) { if (res.code === 1000) {
setSceneList(res.data) setSceneList(sortData(res.data))
} }
}) })
} }
...@@ -88,13 +96,13 @@ const User: React.FC = () => { ...@@ -88,13 +96,13 @@ const User: React.FC = () => {
) )
} }
</div> </div>
<Row className={'thirdLogin'} align='middle' justify='center'> {/* <Row className={'thirdLogin'} align='middle' justify='center'>
<Col>其他方式登录 <Col>其他方式登录
<a title="微登录"><img src={wechat} alt="微信登录" /></a> <a title="微登录"><img src={wechat} alt="微信登录" /></a>
<a title="QQ登录"><img src={qq} alt="QQ登录" /></a> <a title="QQ登录"><img src={qq} alt="QQ登录" /></a>
<a title="支付宝登录"><img src={alipay} alt="支付宝登录" /></a> <a title="支付宝登录"><img src={alipay} alt="支付宝登录" /></a>
</Col> </Col>
</Row> </Row> */}
</Col> </Col>
</Row> </Row>
</Fragment> </Fragment>
......
...@@ -3,11 +3,7 @@ import cx from 'classnames' ...@@ -3,11 +3,7 @@ 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) => {
}
const Policy:React.FC<PolicyProps> = (props) => {
return <div className={styles.policyBox}> return <div className={styles.policyBox}>
<h1>隐私政策</h1> <h1>隐私政策</h1>
......
...@@ -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: {
"x-rules": [
{
required: true, 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