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
src/global/config/navigation.config.ts
src/services/*Api.ts
src/services/*Api
router.config.json
......@@ -4,18 +4,19 @@
* @LastEditors: Please set LastEditors
* @LastEditTime: 2020-10-19 11:12:51
*/
import CommodityRoute from './commodityRoute' // 商品能力路由
import MemberRoute from './memberRoute' // 会员能力路由
import ShopRoute from './shopRoute' // 店铺能力路由
import ChannelRoute from './channelRoute' // 渠道能力路由
import TranactionRoute from './tranactionRoute' // 交易能力路由
import LogisticsRoute from './logisticsRoutes' // 物流能力路由
import PayandSettleRoute from './payandSettle' //支付与结算
import AuthConfigRoute from './authConfigRoute'
import AfterService from './afterServiceRoute' // 售后
import HandlingRoute from './handlingRoute'; // 加工能力
import BalaceRoute from './balanceRoute';
const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
// import CommodityRoute from './commodityRoute' // 商品能力路由
// import MemberRoute from './memberRoute' // 会员能力路由
// import ShopRoute from './shopRoute' // 店铺能力路由
// import ChannelRoute from './channelRoute' // 渠道能力路由
// import TranactionRoute from './tranactionRoute' // 交易能力路由
// import LogisticsRoute from './logisticsRoutes' // 物流能力路由
// import PayandSettleRoute from './payandSettle' //支付与结算
// import AuthConfigRoute from './authConfigRoute'
// import AfterService from './afterServiceRoute' // 售后
// import HandlingRoute from './handlingRoute'; // 加工能力
// import BalaceRoute from './balanceRoute';
import asyncRoutes from '../router.config.json'
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const memberCenterRoute = {
path: '/memberCenter',
......@@ -41,7 +42,7 @@ const memberCenterRoute = {
// component: '@/pages/index',
component: '@/pages/home',
},
...routes,
...asyncRoutes,
{
path: '/memberCenter/noAuth',
auth: false,
......
......@@ -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: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: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": {
"*.{js,jsx,less,md,json}": [
......
......@@ -8,16 +8,17 @@ const fetchConfig = require(runFile).fetchConfig
const gulp = require('gulp')
const json2ts = require('json2ts')
const uploadBuildStram = require('./build')
const pullRemoteRouter = require('./pullRemoteRouterList')
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')
// Logs.start('gulp start')
gulp.task('start', gulp.series(done => {
getAsyncConfig(done)
startRemotePull(done)
}))
gulp.task('upload', gulp.series(done => {
......@@ -59,10 +60,18 @@ function genarateDtsFile(json, done) {
}
/**
* 异步读取远程路由并写入
*/
async function startRemotePull(done) {
await pullRemoteRouter()
getAsyncConfig(done)
}
/**
* 异步获取远程配置
* @todo
*/
async function getAsyncConfig(done) {
const data = await fetchConfig()
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) => {
return list[0]
}
const { formatMessage } = useIntl();
const basicInfo = getMenuData(props.route.routes, { locale: true }, formatMessage)
// const { formatMessage } = useIntl();
const basicInfo = getMenuData(props.route.routes, { locale: false })
const menuData = basicInfo.menuData ? basicInfo.menuData.filter(item => !item.redirect) : []
const menuRouter = getMenuRouter(menuData, location.pathname)
......@@ -152,45 +152,40 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
: {}
return (
<>
{/* <Helmet>
<link rel="icon" type="image/x-icon" href={GlobalConfig.global.siteInfo.logo} />
</Helmet> */}
<ProLayout
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
// contentStyle={{minWidth: '1280px'}}
style={prolayoutStyle}
logo={logo}
formatMessage={formatMessage}
menuHeaderRender={(logoDom, titleDom) => (
<Link to="/">
{logoDom}
{titleDom}
</Link>
)}
collapsed={collapsed}
collapsedButtonRender={(flag) => (isHome ? null : flag ? <MenuUnfoldOutlined /> : <MenuFoldOutlined/>) }
onCollapse={handleMenuCollapse}
disableContentMargin={currentRouter?.noMargin !== undefined}
breadcrumbRender={(routers = []) => [
]}
menuRender={() => <MenuSlider
currentSelectKey={selectedKeys}
openKeys={openKeys}
menuData={menuData}
pathname={location.pathname}
collapseState={collapsed}
changeOpenKeys={(keys: string[]) => setOpenKeys(keys)}
/>}
footerRender={() => defaultFooterDom}
rightContentRender={() => <RightContent />}
{...props}
{...settings}
>
{children}
</ProLayout>
</>
<ProLayout
pageTitleRender={() => currentRouter ? currentRouter.name : window.location.href}
// contentStyle={{minWidth: '1280px'}}
style={prolayoutStyle}
logo={logo}
// formatMessage={formatMessage}
menuHeaderRender={(logoDom, titleDom) => (
<Link to="/">
{logoDom}
{titleDom}
</Link>
)}
collapsed={collapsed}
collapsedButtonRender={(flag) => (isHome ? null : flag ? <MenuUnfoldOutlined /> : <MenuFoldOutlined/>) }
onCollapse={handleMenuCollapse}
disableContentMargin={currentRouter?.noMargin !== undefined}
breadcrumbRender={(routers = []) => [
]}
menuRender={() => <MenuSlider
currentSelectKey={selectedKeys}
openKeys={openKeys}
menuData={menuData}
pathname={location.pathname}
collapseState={collapsed}
changeOpenKeys={(keys: string[]) => setOpenKeys(keys)}
/>}
footerRender={() => defaultFooterDom}
rightContentRender={() => <RightContent />}
{...props}
{...settings}
>
{children}
</ProLayout>
);
};
......
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-26 18:06:04
* @LastEditTime: 2021-01-29 10:53:28
* @Description: 维修商品抽屉组件
*/
import React, { useState, useEffect } from 'react';
......@@ -12,7 +12,7 @@ import moment from 'moment';
import { ColumnType } from 'antd/lib/table/interface';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
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 NestTable from '@/components/NestTable';
import { goodItem, OrderListParams, OrderListRes } from './interface';
......@@ -501,7 +501,7 @@ class GoodsDrawer extends React.Component<GoodsDrawerProps, GoodsDrawerState> {
payAmount:
product.payInfoList ?
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
});
......
......@@ -554,6 +554,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
let logisticsInfo = {}
setConfirmLoading(true)
const purchaseIds = []
let isInvoice = false
for (const item of selectOrderList) {
purchaseIds.push(item.id)
productIds.push(item.commodityUnitPrice.id)
......@@ -563,6 +564,11 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
hasLogistics = true
logisticsInfo = item.commodityUnitPrice.commodity.logistics
}
if(item.commodityUnitPrice.commodity.isInvoice) {
isInvoice = true
}
const buyCommodityInfo: any = {
id: item.commodityUnitPrice.id,
purchaseId: item.id,
......@@ -602,6 +608,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
supplyMembersId: selectItem.memberId,
supplyMembersRoleId: selectItem.memberRoleId,
shopId: storeId,
isInvoice,
orderList: [{
id: selectItem.id,
shopname: selectItem.shopname,
......
import React, { useState, Fragment } from 'react';
import React, { Fragment } from 'react';
import cx from 'classnames';
import { Row, Button, message } from 'antd';
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 { forgetPwdSchema } from './schema';
import { PATTERN_MAPS } from '@/constants/regExp';
......@@ -12,7 +9,8 @@ import { omit } from '@/utils';
import { createFormActions } from '@formily/antd';
import { PublicApi } from '@/services/api';
import { encryptedByAES } from '@/utils/cryptoAes';
import messages from '@/constants/responseCode';
import PasswordInput from './components/PasswordInput'
import './index.less'
const actions = createFormActions()
......@@ -46,8 +44,11 @@ const GetBack: React.FC = () => {
schema={forgetPwdSchema}
onSubmit={handleSubmit}
actions={actions}
components={{
PasswordInput,
}}
expressionScope={{
SubmitBtn
SubmitBtn,
}}
effects={($, { setFieldState, getFieldState }) => {
$('onFieldInputChange', 'account').subscribe(fieldState => {
......@@ -95,14 +96,14 @@ const GetBack: React.FC = () => {
const selfValue = fieldState.value
const otherName = selfName == 'password' ? 'confirmPassword' : 'password'
const otherValue = getFieldState(otherName, state => state.value)
setFieldState(otherName, state => {
if (selfValue && otherValue && selfValue !== otherValue) {
state.errors = ['两次密码输入不一致']
} else {
state.errors = ['']
}
})
setFieldState(selfName, state => {
// setFieldState(otherName, state => {
// if (selfValue && otherValue && selfValue !== otherValue) {
// state.errors = ['两次密码输入不一致']
// } else {
// state.errors = ['']
// }
// })
setFieldState('confirmPassword', state => {
if (selfValue && otherValue && selfValue !== otherValue) {
state.errors = ['两次密码输入不一致']
} else {
......
import React, { useState, useEffect, Fragment } from 'react';
import globalStyles from '@/global/styles/global.less';
import './index.less'
import cx from 'classnames';
import { Row, Col, Space, Carousel } from 'antd';
import ImageBox from '@/components/ImageBox'
import TextLink from '@/components/TextLink';
import {
ScanOutlined
} from '@ant-design/icons'
import { Link, history, Helmet } from 'umi'
import ScanLoginWrap from './components/ScanLoginWrap';
// import leftPicture from '../../../mockStatic/image_ad.png'
import { PublicApi } from '@/services/api'
import wechat from '../../../mockStatic/Wechat.png'
import qq from '../../../mockStatic/QQ.png'
import alipay from '../../../mockStatic/Alipay.png'
import LoginWrap from './components/LoginWrap'
const User: React.FC = () => {
const [isScanQrCode, setIsScanQrCode] = useState(false)
const [sceneList, setSceneList] = useState<any>()
const handleGuideLogin = (param: boolean) => {
setIsScanQrCode(param)
}
const forgetPassword = () => {
history.push('/user/forget')
console.log('找回密码')
}
useEffect(() => {
fetchUseScene()
}, [])
const fetchUseScene = () => {
let param = {
useScene: 1,
position: 1
}
//@ts-ignore
PublicApi.getManageContentImageFindAllByUseSceneAndPosition(param).then(res => {
if (res.code === 1000) {
setSceneList(res.data)
}
})
}
return (
<Fragment>
<Helmet>
<title>用户登录</title>
</Helmet>
<Row className={cx('loginWrap', globalStyles.lingxiBusinessContent1024)}>
<Col className={cx('loginItem', 'loginDesc')}>
<div className={'adBox'}>
<Carousel autoplay>
{
sceneList && sceneList.map(item => <ImageBox key={item.id} direction={"column"} width={512} height={550} imgUrl={item.imageUrl} />)
}
</Carousel>
</div>
</Col>
<Col className={cx('loginItem', 'loginCtl')}>
<div className={'loginMain'}>
{isScanQrCode ? (
<>
<a onClick={() => handleGuideLogin(false)} className={'clickUsernameLogin'}>使用账号密码登录</a>
<ScanLoginWrap />
<div className={'scanTips'}>
<ScanOutlined className={'scanIcon'} />
<span>打开 App<br />扫一扫登录</span>
</div>
</>
) : (
<>
<a onClick={() => handleGuideLogin(true)} className={'clickScanLogin'} />
<h2>欢迎您</h2>
<LoginWrap />
<Row justify='end' style={{ marginTop: 16 }}>
<Space size={32}>
<TextLink><Link to='/user/register' style={{ color: '#909399' }}>免费注册</Link></TextLink>
<TextLink><a onClick={forgetPassword} style={{ color: '#909399' }}>忘记密码</a></TextLink>
</Space>
</Row>
</>
)
}
</div>
<Row className={'thirdLogin'} align='middle' justify='center'>
<Col>其他方式登录
<a title="微登录"><img src={wechat} alt="微信登录" /></a>
<a title="QQ登录"><img src={qq} alt="QQ登录" /></a>
<a title="支付宝登录"><img src={alipay} alt="支付宝登录" /></a>
</Col>
</Row>
</Col>
</Row>
</Fragment>
)
}
export default User
import React, { useState, useEffect, Fragment } from 'react';
import globalStyles from '@/global/styles/global.less';
import './index.less'
import cx from 'classnames';
import { Row, Col, Space, Carousel } from 'antd';
import ImageBox from '@/components/ImageBox'
import TextLink from '@/components/TextLink';
import {
ScanOutlined
} from '@ant-design/icons'
import { Link, history, Helmet } from 'umi'
import ScanLoginWrap from './components/ScanLoginWrap';
// import leftPicture from '../../../mockStatic/image_ad.png'
import { PublicApi } from '@/services/api'
import wechat from '../../../mockStatic/Wechat.png'
import qq from '../../../mockStatic/QQ.png'
import alipay from '../../../mockStatic/Alipay.png'
import LoginWrap from './components/LoginWrap'
const User: React.FC = () => {
const [isScanQrCode, setIsScanQrCode] = useState(false)
const [sceneList, setSceneList] = useState<any>()
const handleGuideLogin = (param: boolean) => {
setIsScanQrCode(param)
}
const forgetPassword = () => {
history.push('/user/forget')
console.log('找回密码')
}
useEffect(() => {
fetchUseScene()
}, [])
const sortData = (data) => {
let result = []
if(data) {
result = data.sort((a, b) => b.sort > a.sort ? -1 : 1)
}
return result
}
const fetchUseScene = () => {
const param: any = {
useScene: 1,
position: 1
}
PublicApi.getManageContentImageFindAllByUseSceneAndPosition(param).then(res => {
if (res.code === 1000) {
setSceneList(sortData(res.data))
}
})
}
return (
<Fragment>
<Helmet>
<title>用户登录</title>
</Helmet>
<Row className={cx('loginWrap', globalStyles.lingxiBusinessContent1024)}>
<Col className={cx('loginItem', 'loginDesc')}>
<div className={'adBox'}>
<Carousel autoplay>
{
sceneList && sceneList.map(item => <ImageBox key={item.id} direction={"column"} width={512} height={550} imgUrl={item.imageUrl} />)
}
</Carousel>
</div>
</Col>
<Col className={cx('loginItem', 'loginCtl')}>
<div className={'loginMain'}>
{isScanQrCode ? (
<>
<a onClick={() => handleGuideLogin(false)} className={'clickUsernameLogin'}>使用账号密码登录</a>
<ScanLoginWrap />
<div className={'scanTips'}>
<ScanOutlined className={'scanIcon'} />
<span>打开 App<br />扫一扫登录</span>
</div>
</>
) : (
<>
<a onClick={() => handleGuideLogin(true)} className={'clickScanLogin'} />
<h2>欢迎您</h2>
<LoginWrap />
<Row justify='end' style={{ marginTop: 16 }}>
<Space size={32}>
<TextLink><Link to='/user/register' style={{ color: '#909399' }}>免费注册</Link></TextLink>
<TextLink><a onClick={forgetPassword} style={{ color: '#909399' }}>忘记密码</a></TextLink>
</Space>
</Row>
</>
)
}
</div>
{/* <Row className={'thirdLogin'} align='middle' justify='center'>
<Col>其他方式登录
<a title="微登录"><img src={wechat} alt="微信登录" /></a>
<a title="QQ登录"><img src={qq} alt="QQ登录" /></a>
<a title="支付宝登录"><img src={alipay} alt="支付宝登录" /></a>
</Col>
</Row> */}
</Col>
</Row>
</Fragment>
)
}
export default User
import React from 'react'
import cx from 'classnames'
import styles from './index.less'
import globalStyles from '@/global/styles/global.less'
export interface PolicyProps {
}
const Policy:React.FC<PolicyProps> = (props) => {
return <div className={styles.policyBox}>
<h1>隐私政策</h1>
<div className={globalStyles.lingxiBusinessMarginContent}>
<article>
<h4>一、权利归属</h4>
<main>
<p>1.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
<p>1.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<p>1.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
</main>
<h4>二、责任限制</h4>
<main>
<p>2.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
<p>2.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<p>2.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
</main>
</article>
</div>
</div>
}
Policy.defaultProps = {}
export default Policy
\ No newline at end of file
import React from 'react'
import cx from 'classnames'
import styles from './index.less'
import globalStyles from '@/global/styles/global.less'
const Policy = (props) => {
return <div className={styles.policyBox}>
<h1>隐私政策</h1>
<div className={globalStyles.lingxiBusinessMarginContent}>
<article>
<h4>一、权利归属</h4>
<main>
<p>1.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
<p>1.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<p>1.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
</main>
<h4>二、责任限制</h4>
<main>
<p>2.1. 涂鸦网站的Logo、“涂鸦”、“涂鸦智能”、“tuya”等文字、图形及其组合,以及涂鸦网站的其他标识、徽记、涂鸦服务的名称等为涂鸦及其关联公司在中国和其他国家的注册商标。未经涂鸦书面授权,任何人不得以任何方式展示、使用或做其他处理(包括但不限于复制、传播、展示、镜像、上传、下载),也不得向他人表明您有权展示、使用或做其他处理。</p>
<p>2.2. 涂鸦网站所有的产品、服务、技术与所有程序(以下或简称“技术服务”)的知识产权均归属于涂鸦或归其权利人所有。</p>
<p>2.3. 除非涂鸦另行声明,涂鸦拥有涂鸦在网站内发布文档等信息(包括但不限于文字、图形、图片、照片、音频、视频、图标、色彩、版面设计、电子文档)的所有权利(包括但不限于版权、商标权、专利权、商业秘密和其他所有相关权利)。未经涂鸦许可,任何人不得擅自使用如上内容(包括但不限于通过程序或设备监视、复制、转播、展示、镜像、上传、下载涂鸦网站内的任何内容)。被授权浏览、复制、打印和传播属于涂鸦网站内信息内容的,该等内容都不得用于商业目的且所有信息内容及其任何部分的使用都必须包括此权利声明。</p>
</main>
</article>
</div>
</div>
}
Policy.defaultProps = {}
export default Policy
......@@ -70,26 +70,19 @@ const useLinkageValidateEffects = () => {
}
})
})
// onFieldValueChange$('*(password,confirmPassword)').subscribe(fieldState => {
// const selfName = fieldState.name
// const selfValue = fieldState.value
// const otherName = selfName == 'password' ? 'confirmPassword' : 'password'
// const otherValue = getFieldState(otherName, state => state.value)
// setFieldState(otherName, state => {
// if (selfValue && otherValue && selfValue !== otherValue) {
// state.errors = ['两次密码输入不一致']
// } else {
// state.errors = ['']
// }
// })
// setFieldState(selfName, state => {
// if (selfValue && otherValue && selfValue !== otherValue) {
// state.errors = ['两次密码输入不一致']
// } else {
// state.errors = ['']
// }
// })
// })
onFieldValidateEnd$('isRead').subscribe(fieldState => {
console.log(fieldState, "fieldState")
if(!fieldState.value) {
setFieldState('isRead', state => {
state.errors = ['请先同意勾选协议']
})
} else {
setFieldState('isRead', state => {
state.errors = []
})
}
})
}
let timeChange: any; // 定时器
......@@ -114,10 +107,10 @@ const UserRegistry = () => {
}, [])
const fetchAgreement = () => {
const param = {
const param: any = {
columnType: 2
}
//@ts-ignore
PublicApi.getManageContentNoticeFindAllByColumnType(param).then(res => {
if (res.code === 1000) {
setAgreementList(res.data)
......@@ -187,7 +180,7 @@ const UserRegistry = () => {
maxTime: 60,
minTime: 0,
initText: '获取验证码',
onEnd: () => { },
onEnd: () => { console.log("end") },
decayRate: 1,
delay: 1 * 1000
})
......@@ -231,7 +224,7 @@ const UserRegistry = () => {
setSubStep(true)
}
}).catch(() => {
console.log()
}).finally(() => {
setSubmitLoading(false)
})
......@@ -306,7 +299,7 @@ const UserRegistry = () => {
smsCodeAfter: <Button disabled={isActive} style={{ minWidth: 110, marginLeft: 8 }} size='large' onClick={handleSendSMS}>{text}</Button>,
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>,
......
......@@ -16,9 +16,12 @@ export const registerStep0Schema: ISchema = {
properties: {
phone: {
type: 'string',
required: true,
"x-rules": [
{
required: true,
message: '请填写手机号'
},
{
pattern: PATTERN_MAPS.phone,
message: '请填写手机号'
}
......@@ -35,9 +38,12 @@ export const registerStep0Schema: ISchema = {
smsCode: {
type: 'string',
"x-component": 'Phone',
required: true,
"x-rules": [
{
required: true,
message: '请填写验证码'
},
{
pattern: PATTERN_MAPS.smsCode,
message: '请输入正确的6位验证码'
}
......@@ -49,6 +55,12 @@ export const registerStep0Schema: ISchema = {
password: {
type: 'string',
"x-component": 'PasswordInput',
"x-rules": [
{
required: true,
message: '请填写登录密码'
},
],
"x-component-props": {
type: 'password',
placeholder: '请设置你的登录密码',
......@@ -106,7 +118,13 @@ export const registerStep0Schema: ISchema = {
}
},
isRead: {
required: true,
"x-rules": [
{
required: true,
message: '请先同意勾选协议'
},
],
default: false,
"x-component": 'CheckboxSingle',
"x-component-props": {
children: "{{checkBoxChildren}}"
......@@ -273,22 +291,31 @@ export const forgetPwdSchema: ISchema = {
},
password: {
type: 'string',
"x-rules": [
{
required: true,
message: '请输入密码'
},
{
pattern: PATTERN_MAPS.password,
message: '请输入正确的密码'
}
],
"x-component": 'PasswordInput',
"x-component-props": {
type: 'password',
placeholder: '请设置你的新密码',
size: 'large'
}
},
// password: {
// type: 'string',
// "x-rules": [
// {
// required: true,
// message: '请输入密码'
// },
// {
// pattern: PATTERN_MAPS.password,
// message: '请输入正确的密码'
// }
// ],
// "x-component-props": {
// type: 'password',
// placeholder: '请设置你的新密码',
// size: 'large'
// }
// },
confirmPassword: {
type: 'string',
"x-rules": [
......@@ -296,10 +323,10 @@ export const forgetPwdSchema: ISchema = {
required: true,
message: '请输入密码'
},
{
pattern: PATTERN_MAPS.password,
message: '请输入正确的密码'
}
// {
// pattern: PATTERN_MAPS.password,
// message: '请输入正确的密码'
// }
],
"x-component-props": {
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