Commit 23b7a6ccbbf9fe54f119a265aa9fa6931d094691
1 parent
9fe9063c
1.完成手机端英文翻译
Showing
10 changed files
with
294 additions
and
158 deletions
src/mobile/common/CommobileBase.js
| ... | ... | @@ -318,6 +318,10 @@ export default (ChildComponent) => { |
| 318 | 318 | const { |
| 319 | 319 | token, sModelsId, [`${name}SelectedRowKeys`]: tableSelectedRowKeys, |
| 320 | 320 | } = this.state; |
| 321 | + const friendlyReminder = commonFunc.showLocalMessage(this.props, 'FriendlyReminder', '温馨提示'); | |
| 322 | + | |
| 323 | + const btnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确认'); | |
| 324 | + | |
| 321 | 325 | const configDataId = configData.sId; |
| 322 | 326 | const dataUrl = `${commonConfig.server_host}business/getBusinessDataByFormcustomId/${configDataId}?sModelsId=${sModelsId}`; |
| 323 | 327 | const dataReturn = (await commonServices.postValueService(token, condition, dataUrl)).data; |
| ... | ... | @@ -343,8 +347,8 @@ export default (ChildComponent) => { |
| 343 | 347 | this.setState(addState); |
| 344 | 348 | } |
| 345 | 349 | } else if (dataReturn.code === -8) { |
| 346 | - Modal.alert('温馨提示', dataReturn.msg || '出错了', [ | |
| 347 | - { text: '确认' }, | |
| 350 | + Modal.alert(friendlyReminder, dataReturn.msg || '出错了', [ | |
| 351 | + { text: btnSure }, | |
| 348 | 352 | ]); |
| 349 | 353 | } else { |
| 350 | 354 | this.getServiceError(dataReturn); | ... | ... |
src/mobile/common/CommobileSearchComponent.js
| ... | ... | @@ -16,6 +16,7 @@ import moment from 'moment'; |
| 16 | 16 | import ShowType from './CommobileComponent'; |
| 17 | 17 | // eslint-disable-next-line import/first |
| 18 | 18 | import { createForm } from 'rc-form'; |
| 19 | +import * as commonFunc from "@/components/Common/commonFunc"; | |
| 19 | 20 | |
| 20 | 21 | |
| 21 | 22 | // const data = [ |
| ... | ... | @@ -469,6 +470,12 @@ class CommobileSearchComponent extends React.Component { |
| 469 | 470 | const { |
| 470 | 471 | label, initData, show, slavePagination, token, slaveFilterCondition, slaveConfig, showScan, app, sModelsId, masterData, |
| 471 | 472 | } = this.props; |
| 473 | + const allDataTitle = commonFunc.showLocalMessage(this.props, 'allData', '全部数据'); | |
| 474 | + const filter = commonFunc.showLocalMessage(this.props, 'filter', '筛选'); | |
| 475 | + const clearConditions = commonFunc.showLocalMessage(this.props, 'clearConditions', '清空条件'); | |
| 476 | + | |
| 477 | + const btnSure = commonFunc.showLocalMessage(this.props, 'btnSure', '确定'); | |
| 478 | + | |
| 472 | 479 | const showName = []; |
| 473 | 480 | const solutionData = []; |
| 474 | 481 | if (commonUtils.isNotEmptyArr(slaveFilterCondition) && commonUtils.isNotEmptyArr(slaveConfig)) { |
| ... | ... | @@ -483,12 +490,12 @@ class CommobileSearchComponent extends React.Component { |
| 483 | 490 | }); |
| 484 | 491 | } |
| 485 | 492 | const total = commonUtils.isEmptyObject(slavePagination) ? 0 : slavePagination.total; |
| 486 | - const showlabel = commonUtils.isEmptyObject(label) ? '全部数据' : label; | |
| 493 | + const showlabel = commonUtils.isEmptyObject(label) ? allDataTitle : label; | |
| 487 | 494 | const downUrl = `${commonConfig.file_host}file/download?savePathStr=/home/monkey/xlyerp/modlePath/Down.png&sModelsId=100&token=${token}`; |
| 488 | 495 | const upUrl = `${commonConfig.file_host}file/download?savePathStr=/home/monkey/xlyerp/modlePath/Up.png&sModelsId=100&token=${token}`; |
| 489 | 496 | const imgUrl = show ? upUrl : downUrl; |
| 490 | 497 | const tabs = [ |
| 491 | - { title: <Badge text="">筛选 <img style={{ height: '15px', marginleft: '20px' }} src={downUrl} alt="" /></Badge> }, | |
| 498 | + { title: <Badge text="">{filter} <img style={{ height: '15px', marginleft: '20px' }} src={downUrl} alt="" /></Badge> }, | |
| 492 | 499 | { |
| 493 | 500 | title: |
| 494 | 501 | <Badge style={{ left: '0px' }} text={total}>{showlabel} |
| ... | ... | @@ -517,16 +524,16 @@ class CommobileSearchComponent extends React.Component { |
| 517 | 524 | |
| 518 | 525 | return ( |
| 519 | 526 | <div> |
| 520 | - <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}> | |
| 527 | + <div style={{ display: "flex", justifyContent: "center", alignItems: "center" }}> | |
| 521 | 528 | <div |
| 522 | 529 | style={{ |
| 523 | 530 | backgroundImage: `url(${scan})`, |
| 524 | - backgroundSize: 'cover', | |
| 525 | - width: '30px', | |
| 526 | - height: '30px', | |
| 527 | - marginLeft: '8px', | |
| 531 | + backgroundSize: "cover", | |
| 532 | + width: "30px", | |
| 533 | + height: "30px", | |
| 534 | + marginLeft: "8px", | |
| 528 | 535 | // eslint-disable-next-line no-undef |
| 529 | - display: `${showScan ? 'block' : 'none'}`, | |
| 536 | + display: `${showScan ? "block" : "none"}`, | |
| 530 | 537 | }} |
| 531 | 538 | onClick={commonConfig.isWeiXin ? this.handleWxScan : this.handleScan} |
| 532 | 539 | /> |
| ... | ... | @@ -537,13 +544,17 @@ class CommobileSearchComponent extends React.Component { |
| 537 | 544 | value={this.state.scanValue} |
| 538 | 545 | onChange={this.handleChangleInput} |
| 539 | 546 | onCancel={this.handleCancel} |
| 540 | - ref={(el) => { this.inputSearch = el; }} | |
| 547 | + ref={el => { | |
| 548 | + this.inputSearch = el; | |
| 549 | + }} | |
| 541 | 550 | /> |
| 542 | 551 | </div> |
| 543 | 552 | <Tabs |
| 544 | 553 | tabs={tabs} |
| 545 | 554 | initialPage={1} |
| 546 | - onChange={(tab, index) => { console.log('onChange', index, tab); }} | |
| 555 | + onChange={(tab, index) => { | |
| 556 | + console.log("onChange", index, tab); | |
| 557 | + }} | |
| 547 | 558 | onTabClick={(tab, index) => { |
| 548 | 559 | if (index === 1) { |
| 549 | 560 | this.handleClick(); |
| ... | ... | @@ -552,70 +563,76 @@ class CommobileSearchComponent extends React.Component { |
| 552 | 563 | modal1: true, |
| 553 | 564 | }); |
| 554 | 565 | this.props.onSaveState({ |
| 555 | - show: false, | |
| 566 | + show: false, | |
| 556 | 567 | }); |
| 557 | 568 | } |
| 558 | 569 | }} |
| 559 | 570 | > |
| 560 | 571 | <div /> |
| 561 | 572 | <div /> |
| 562 | - | |
| 563 | 573 | </Tabs> |
| 564 | 574 | |
| 565 | 575 | <div> |
| 566 | - {show ? initData ? menuEl : loadingEl : null} | |
| 576 | + {show ? (initData ? menuEl : loadingEl) : null} | |
| 567 | 577 | {show ? <div className="menu-mask" onClick={this.onMaskClick} /> : null} |
| 568 | 578 | </div> |
| 569 | 579 | |
| 570 | 580 | <Modal |
| 571 | 581 | popup |
| 572 | 582 | visible={this.state.modal1} |
| 573 | - onClose={this.onClose('modal1')} | |
| 583 | + onClose={this.onClose("modal1")} | |
| 574 | 584 | animationType="slide-down" |
| 575 | 585 | className={styles.modal} |
| 576 | 586 | // afterClose={() => { alert('afterClose'); }} |
| 577 | 587 | > |
| 578 | - | |
| 579 | 588 | <List className={styles.filterListContent} renderHeader={() => `${showlabel}`}> |
| 580 | - { | |
| 581 | - solutionData.map((item, index) => { | |
| 582 | - const showTypeProps = { | |
| 583 | - app, | |
| 584 | - record: {}, | |
| 585 | - sId: item.sId, /* 修改当前编号(数据格式:字符串) */ | |
| 586 | - name: 'slave', | |
| 587 | - form: this.props.form, | |
| 588 | - formId: sModelsId, | |
| 589 | - getSqlDropDownData: this.props.getSqlDropDownData, | |
| 590 | - getSqlCondition: this.props.getSqlCondition, | |
| 591 | - handleSqlDropDownNewRecord: this.props.handleSqlDropDownNewRecord, | |
| 592 | - getFloatNum: this.props.getFloatNum, | |
| 593 | - getDateFormat: this.props.getDateFormat, | |
| 594 | - onChange: this.handleMasterChange, | |
| 595 | - showConfig: item, | |
| 596 | - formItemLayout: {}, | |
| 597 | - textArea: false, | |
| 598 | - enabled: true, | |
| 599 | - dataValue: commonUtils.isNotEmptyObject(masterData) ? masterData[item.sName] : '', | |
| 600 | - bTable: true, | |
| 601 | - onFilterDropDownData: this.props.onFilterDropDownData, | |
| 602 | - onSaveState: this.props.onSaveState, | |
| 603 | - }; | |
| 604 | - return ( | |
| 605 | - <div> | |
| 606 | - {/* eslint-disable-next-line react/no-array-index-key */} | |
| 607 | - <div className={styles.filterItem} key={index}> | |
| 608 | - <ShowType {...showTypeProps} /> | |
| 609 | - </div> | |
| 610 | - <WhiteSpace size="sm" /> | |
| 589 | + {solutionData.map((item, index) => { | |
| 590 | + const showTypeProps = { | |
| 591 | + app, | |
| 592 | + record: {}, | |
| 593 | + sId: item.sId /* 修改当前编号(数据格式:字符串) */, | |
| 594 | + name: "slave", | |
| 595 | + form: this.props.form, | |
| 596 | + formId: sModelsId, | |
| 597 | + getSqlDropDownData: this.props.getSqlDropDownData, | |
| 598 | + getSqlCondition: this.props.getSqlCondition, | |
| 599 | + handleSqlDropDownNewRecord: this.props.handleSqlDropDownNewRecord, | |
| 600 | + getFloatNum: this.props.getFloatNum, | |
| 601 | + getDateFormat: this.props.getDateFormat, | |
| 602 | + onChange: this.handleMasterChange, | |
| 603 | + showConfig: item, | |
| 604 | + formItemLayout: {}, | |
| 605 | + textArea: false, | |
| 606 | + enabled: true, | |
| 607 | + dataValue: commonUtils.isNotEmptyObject(masterData) ? masterData[item.sName] : "", | |
| 608 | + bTable: true, | |
| 609 | + onFilterDropDownData: this.props.onFilterDropDownData, | |
| 610 | + onSaveState: this.props.onSaveState, | |
| 611 | + }; | |
| 612 | + return ( | |
| 613 | + <div> | |
| 614 | + {/* eslint-disable-next-line react/no-array-index-key */} | |
| 615 | + <div className={styles.filterItem} key={index}> | |
| 616 | + <ShowType {...showTypeProps} /> | |
| 611 | 617 | </div> |
| 612 | - ); | |
| 613 | - }) | |
| 614 | - } | |
| 618 | + <WhiteSpace size="sm" /> | |
| 619 | + </div> | |
| 620 | + ); | |
| 621 | + })} | |
| 615 | 622 | <List.Item className={`${styles.filterList} ${styles.filterListBtn}`}> |
| 616 | 623 | <Flex> |
| 617 | - <Flex.Item> <Button style={{ background: '#f0f0f0', color: '#000' }} onClick={this.handleFilterSearchCancle}>清空条件</Button></Flex.Item> | |
| 618 | - <Flex.Item> <Button type="primary" onClick={this.handleFilterSearch.bind(this, solutionData)}>确定</Button></Flex.Item> | |
| 624 | + <Flex.Item> | |
| 625 | + {" "} | |
| 626 | + <Button style={{ background: "#f0f0f0", color: "#000" }} onClick={this.handleFilterSearchCancle}> | |
| 627 | + {clearConditions} | |
| 628 | + </Button> | |
| 629 | + </Flex.Item> | |
| 630 | + <Flex.Item> | |
| 631 | + {" "} | |
| 632 | + <Button type="primary" onClick={this.handleFilterSearch.bind(this, solutionData)}> | |
| 633 | + {btnSure} | |
| 634 | + </Button> | |
| 635 | + </Flex.Item> | |
| 619 | 636 | </Flex> |
| 620 | 637 | </List.Item> |
| 621 | 638 | </List> | ... | ... |
src/mobile/common/CommobileSubBill.js
| ... | ... | @@ -1959,7 +1959,7 @@ class CommobileBill extends React.Component { |
| 1959 | 1959 | let sValue = record === undefined ? undefined : record[showConfig.sName]; |
| 1960 | 1960 | if (showConfig.sDropDownType === 'const') { |
| 1961 | 1961 | let showDropDown = []; |
| 1962 | - if (typeof showConfig.showDropDown === 'object') { | |
| 1962 | + if (typeof showConfig.showDropDown === "object") { | |
| 1963 | 1963 | // eslint-disable-next-line prefer-destructuring |
| 1964 | 1964 | showDropDown = showConfig.showDropDown; |
| 1965 | 1965 | } else { |
| ... | ... | @@ -2016,10 +2016,12 @@ class CommobileBill extends React.Component { |
| 2016 | 2016 | */ |
| 2017 | 2017 | tabShowInfo = (params) => { |
| 2018 | 2018 | const { slaveChildConfig, slave0Config, slaveConfig } = this.props; |
| 2019 | + const detail = commonFunc.showLocalMessage(this.props, 'detail', '明细'); | |
| 2020 | + const sum = commonFunc.showLocalMessage(this.props, 'sum', '汇总'); | |
| 2019 | 2021 | const { ModalListProps, otherProps, TabComponentSum, temp, tabPage } = params; |
| 2020 | 2022 | let tabs = [ |
| 2021 | - { title: <Badge text="">明细</Badge> }, | |
| 2022 | - { title: <Badge text="">汇总</Badge> }, | |
| 2023 | + { title: <Badge text="">{detail}</Badge> }, | |
| 2024 | + { title: <Badge text="">{sum}</Badge> }, | |
| 2023 | 2025 | ]; |
| 2024 | 2026 | |
| 2025 | 2027 | let contentTab = <> | ... | ... |
src/mobile/common/MessageMobile.js
| ... | ... | @@ -9,6 +9,7 @@ import CommobileBase from '../../mobile/common/CommobileBase'; |
| 9 | 9 | import CommobileListEvent from './CommobileListEvent'; |
| 10 | 10 | import styles from '../../routes/mobile/IndexMobile.less'; |
| 11 | 11 | import NewsMobile from './NewsMobile'; |
| 12 | +import * as commonFunc from "@/components/Common/commonFunc"; | |
| 12 | 13 | // eslint-disable-next-line no-unused-vars |
| 13 | 14 | // import ExamineMobile from './ExamineMobile'; |
| 14 | 15 | // import CommobileBill from './CommobileBill'; |
| ... | ... | @@ -18,12 +19,7 @@ const dataSource = new ListView.DataSource({ |
| 18 | 19 | rowHasChanged: (row1, row2) => row2, |
| 19 | 20 | }); |
| 20 | 21 | // eslint-disable-next-line no-unused-vars |
| 21 | -const tabs = [ | |
| 22 | - { title: <Badge text="">消息</Badge> }, | |
| 23 | - { title: <Badge text="">待处理</Badge> }, | |
| 24 | - { title: <Badge text="">已处理</Badge> }, | |
| 25 | - { title: <Badge text="">我的申请</Badge> }, | |
| 26 | -]; | |
| 22 | + | |
| 27 | 23 | class MessageMobile extends React.Component { |
| 28 | 24 | constructor(props) { |
| 29 | 25 | super(props); |
| ... | ... | @@ -58,6 +54,17 @@ class MessageMobile extends React.Component { |
| 58 | 54 | |
| 59 | 55 | render() { |
| 60 | 56 | const { slaveConfig, slaveData: slaveDataOld } = this.props; |
| 57 | + const message = commonFunc.showLocalMessage(this.props, 'message', '汇总'); | |
| 58 | + const pending = commonFunc.showLocalMessage(this.props, 'pending', '待处理'); | |
| 59 | + const handled = commonFunc.showLocalMessage(this.props, 'handled', '已处理'); | |
| 60 | + const application = commonFunc.showLocalMessage(this.props, "application", "我的申请"); | |
| 61 | + | |
| 62 | + const tabs = [ | |
| 63 | + { title: <Badge text="">{message}</Badge> }, | |
| 64 | + { title: <Badge text="">{pending}</Badge> }, | |
| 65 | + { title: <Badge text="">{handled}</Badge> }, | |
| 66 | + { title: <Badge text="">{application}</Badge> }, | |
| 67 | + ]; | |
| 61 | 68 | const { tabPage } = this.state; |
| 62 | 69 | const slaveDataOld2 = slaveDataOld === undefined ? [] : slaveDataOld; |
| 63 | 70 | const slaveData = dataSource.cloneWithRows(slaveDataOld2); | ... | ... |
src/mobile/common/MyselfMobile.js
| ... | ... | @@ -10,6 +10,7 @@ import setting from '../../assets/mobile/setting.png'; |
| 10 | 10 | import mailList from '../../assets/mobile/mailList.png'; |
| 11 | 11 | import recommendation from '../../assets/mobile/recommendation.png'; |
| 12 | 12 | import CommobileListEvent from './CommobileListEvent'; |
| 13 | +import * as commonFunc from '../../components/Common/commonFunc'; | |
| 13 | 14 | |
| 14 | 15 | // eslint-disable-next-line prefer-destructuring |
| 15 | 16 | const Item = List.Item; |
| ... | ... | @@ -56,6 +57,14 @@ class myselfMobile extends React.Component { |
| 56 | 57 | sDepartName = '暂无'; |
| 57 | 58 | } |
| 58 | 59 | } |
| 60 | + const companyContactList = commonFunc.showLocalMessage(this.props, 'companyContactList', '企业通讯录'); | |
| 61 | + const ModifyPassword = commonFunc.showLocalMessage(this.props, 'ModifyPassword', '修改密码'); | |
| 62 | + const recommend = commonFunc.showLocalMessage(this.props, 'recommend', '推荐给好友'); | |
| 63 | + const aboutSoftware = commonFunc.showLocalMessage(this.props, 'aboutSoftware', '关于软件'); | |
| 64 | + const Logout = commonFunc.showLocalMessage(this.props, 'Logout', '退出登录'); | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 59 | 68 | |
| 60 | 69 | const sUserNameFirst = sUserName.charAt(0); |
| 61 | 70 | return ( |
| ... | ... | @@ -77,7 +86,7 @@ class myselfMobile extends React.Component { |
| 77 | 86 | onClick={this.btnOnclick.bind(this, 'contacts')} |
| 78 | 87 | style={{ margin: '10px 0' }} |
| 79 | 88 | > |
| 80 | - 企业通讯录 | |
| 89 | + {companyContactList} | |
| 81 | 90 | </Item> |
| 82 | 91 | <Item |
| 83 | 92 | thumb={setting} |
| ... | ... | @@ -85,7 +94,7 @@ class myselfMobile extends React.Component { |
| 85 | 94 | arrow="horizontal" |
| 86 | 95 | style={{ margin: '10px 0' }} |
| 87 | 96 | > |
| 88 | - 修改密码 | |
| 97 | + {ModifyPassword} | |
| 89 | 98 | </Item> |
| 90 | 99 | <Item |
| 91 | 100 | thumb={recommendation} |
| ... | ... | @@ -93,7 +102,7 @@ class myselfMobile extends React.Component { |
| 93 | 102 | arrow="horizontal" |
| 94 | 103 | style={{ margin: '10px 0' }} |
| 95 | 104 | > |
| 96 | - 推荐给好友 | |
| 105 | + {recommend} | |
| 97 | 106 | </Item> |
| 98 | 107 | <Item |
| 99 | 108 | thumb={setting} |
| ... | ... | @@ -101,14 +110,14 @@ class myselfMobile extends React.Component { |
| 101 | 110 | arrow="horizontal" |
| 102 | 111 | style={{ margin: '10px 0' }} |
| 103 | 112 | > |
| 104 | - 关于软件 | |
| 113 | + {aboutSoftware} | |
| 105 | 114 | </Item> |
| 106 | 115 | </List> |
| 107 | 116 | <Button |
| 108 | 117 | onClick={this.btnOnclick.bind(this, 'loginOut')} |
| 109 | 118 | style={{ color: 'red', margin: '50px 0 10px 0' }} |
| 110 | 119 | > |
| 111 | - 退出登录 | |
| 120 | + {Logout} | |
| 112 | 121 | </Button> |
| 113 | 122 | </div> |
| 114 | 123 | ); | ... | ... |
src/mobile/common/RevisePasswordMobile.js
| ... | ... | @@ -7,6 +7,7 @@ import 'antd-mobile-v2/dist/antd-mobile.css'; |
| 7 | 7 | // import * as commonUtils from '../../utils/utils'; |
| 8 | 8 | import CommobileBase from '../../mobile/common/CommobileBase'; |
| 9 | 9 | import CommobileListEvent from './CommobileListEvent'; |
| 10 | +import * as commonFunc from '../../components/Common/commonFunc'; | |
| 10 | 11 | import styles from '../mobile.less'; |
| 11 | 12 | import config from '../../utils/config'; |
| 12 | 13 | |
| ... | ... | @@ -20,6 +21,7 @@ class RevisePasswordMobile extends React.Component { |
| 20 | 21 | sOldPwd: '', |
| 21 | 22 | sUserPwd: '', |
| 22 | 23 | sUserPwdAgain: '', |
| 24 | + app: props.app, | |
| 23 | 25 | }; |
| 24 | 26 | this.obj = {}; |
| 25 | 27 | } |
| ... | ... | @@ -66,46 +68,56 @@ class RevisePasswordMobile extends React.Component { |
| 66 | 68 | dispatch({ type: 'app/editPwd', payload: { url, value: values, editPwdType: 'mobile' } }); |
| 67 | 69 | } |
| 68 | 70 | render() { |
| 71 | + const {app}= this.state; | |
| 72 | + const ModifyPassword = commonFunc.showMessage(app.commonConst, 'ModifyPassword');/* 修改密码 */ | |
| 73 | + const oldPassword = commonFunc.showMessage(app.commonConst, 'oldPassword');/* 原密码 */ | |
| 74 | + | |
| 75 | + const newPassword = commonFunc.showMessage(app.commonConst, 'newPassword');/* 新密码 */ | |
| 76 | + const confirmNewPassword = commonFunc.showMessage(app.commonConst, 'confirmNewPassword');/* 确认新密码 */ | |
| 77 | + const btnBack = commonFunc.showMessage(app.commonConst, 'btnBack');/* 返回 */ | |
| 78 | + | |
| 79 | + const btnSave = commonFunc.showMessage(app.commonConst, 'BtnSave');/* 确认 */ | |
| 69 | 80 | return ( |
| 70 | 81 | <div> |
| 71 | 82 | <NavBar |
| 72 | 83 | mode="light" |
| 73 | - leftContent={[ | |
| 74 | - <div style={{ width: '100%', textAlign: 'left', color: 'red' }}>返回</div>, | |
| 75 | - ] | |
| 76 | - } | |
| 84 | + leftContent={[<div style={{ width: "100%", textAlign: "left", color: "red" }}>{btnBack}</div>]} | |
| 77 | 85 | rightContent={[ |
| 78 | - <div onClick={this.handleSubmitPwd.bind(this)} style={{ width: '100%', textAlign: 'right', color: 'red' }}>保存</div>, | |
| 86 | + <div onClick={this.handleSubmitPwd.bind(this)} style={{ width: "100%", textAlign: "right", color: "red" }}> | |
| 87 | + {btnSave} | |
| 88 | + </div>, | |
| 79 | 89 | ]} |
| 80 | - onLeftClick={() => { window.history.back(-1); }} | |
| 90 | + onLeftClick={() => { | |
| 91 | + window.history.back(-1); | |
| 92 | + }} | |
| 81 | 93 | className={styles.iconColor} |
| 82 | 94 | > |
| 83 | - 修改密码 | |
| 95 | + {ModifyPassword} | |
| 84 | 96 | </NavBar> |
| 85 | 97 | <List className={styles.myselfList}> |
| 86 | - <div style={{ margin: '10px 0' }}> | |
| 98 | + <div style={{ margin: "10px 0" }}> | |
| 87 | 99 | <InputItem |
| 88 | - placeholder="原密码" | |
| 100 | + placeholder={oldPassword} | |
| 89 | 101 | type="password" |
| 90 | 102 | clear |
| 91 | - onChange={this.onChange.bind(this, 'sOldPwd')} | |
| 103 | + onChange={this.onChange.bind(this, "sOldPwd")} | |
| 92 | 104 | value={this.state.sOldPwd} |
| 93 | 105 | // ref={ el => this.inputRef = el} |
| 94 | 106 | /> |
| 95 | 107 | </div> |
| 96 | 108 | <InputItem |
| 97 | - placeholder="新密码" | |
| 109 | + placeholder={newPassword} | |
| 98 | 110 | type="password" |
| 99 | - onChange={this.onChange.bind(this, 'sUserPwd')} | |
| 111 | + onChange={this.onChange.bind(this, "sUserPwd")} | |
| 100 | 112 | value={this.state.sUserPwd} |
| 101 | 113 | // ref={el => this.inputRef = el} |
| 102 | 114 | /> |
| 103 | 115 | <InputItem |
| 104 | - placeholder="确认新密码" | |
| 116 | + placeholder={confirmNewPassword} | |
| 105 | 117 | type="password" |
| 106 | 118 | error={this.state.hasError} |
| 107 | 119 | onErrorClick={this.onErrorClick} |
| 108 | - onChange={this.onChange.bind(this, 'sUserPwdAgain')} | |
| 120 | + onChange={this.onChange.bind(this, "sUserPwdAgain")} | |
| 109 | 121 | value={this.state.sUserPwdAgain} |
| 110 | 122 | // ref={el => this.inputRef = el} |
| 111 | 123 | /> | ... | ... |
src/mobile/common/SceneMobile.js
| ... | ... | @@ -10,6 +10,7 @@ import * as commonUtils from '../../utils/utils'; |
| 10 | 10 | import ShowType from './CommobileComponent'; |
| 11 | 11 | import CommobileBase from './CommobileBase'; |
| 12 | 12 | import CommobileBillEvent from './CommobileBillEvent'; |
| 13 | +import * as commonFunc from "@/components/Common/commonFunc"; | |
| 13 | 14 | |
| 14 | 15 | class SceneMobile extends React.Component { |
| 15 | 16 | constructor(props) { |
| ... | ... | @@ -224,12 +225,15 @@ class SceneMobile extends React.Component { |
| 224 | 225 | onFilterDropDownData: this.props.onFilterDropDownData, |
| 225 | 226 | onSaveState: this.props.onSaveState, |
| 226 | 227 | }; |
| 228 | + const btnBackEbc = commonFunc.showMessage(app.commonConst, 'btnBackEbc');/* 返回 */ | |
| 229 | + | |
| 230 | + | |
| 227 | 231 | const iconSettingShow = true; |
| 228 | 232 | return iframeVisible ? ( |
| 229 | 233 | <div className={styles.iframe}> |
| 230 | 234 | <iframe title="iframe" src={iframeUrl} frameBorder={0} /> |
| 231 | 235 | <div className={styles.iframeBakBtn}> |
| 232 | - <Button type="link" onClick={() => { this.handleChangeIframeVisible(false); }}>{'<- 返回EBC'}</Button> | |
| 236 | + <Button type="link" onClick={() => { this.handleChangeIframeVisible(false); }}>{btnBackEbc}</Button> | |
| 233 | 237 | </div> |
| 234 | 238 | </div> |
| 235 | 239 | ) : ( | ... | ... |
src/mobile/components/FileManageMobile.js
| ... | ... | @@ -9,6 +9,7 @@ import CommobileBase from '../common/CommobileBase'; |
| 9 | 9 | import commonConfig from '../../utils/config'; |
| 10 | 10 | import preView from '../components/preView'; |
| 11 | 11 | import styles from './fileManage.less'; |
| 12 | +import * as commonFunc from "@/components/Common/commonFunc"; | |
| 12 | 13 | |
| 13 | 14 | class FileManageMobile extends React.Component { |
| 14 | 15 | constructor(props) { |
| ... | ... | @@ -230,6 +231,13 @@ class FileManageMobile extends React.Component { |
| 230 | 231 | const { files } = this.state; |
| 231 | 232 | const dWidth = document.documentElement.clientWidth || document.body.clientWidth; /* 获取手机视窗宽度 */ |
| 232 | 233 | const dHeight = document.documentElement.clientHeight || document.body.clientHeight; /* 获取手机视窗宽度 */ |
| 234 | + | |
| 235 | + const btnCamera = commonFunc.showLocalMessage(this.props, 'btnCamera', '拍照'); | |
| 236 | + | |
| 237 | + const album = commonFunc.showLocalMessage(this.props, 'Album', '相册'); | |
| 238 | + | |
| 239 | + const btnCancel = commonFunc.showLocalMessage(this.props, 'btnCancel', '取消'); | |
| 240 | + | |
| 233 | 241 | /* 上传照片样式定位 */ |
| 234 | 242 | let imgDivTop = '500'; |
| 235 | 243 | const mobileBarStyle = document.getElementsByClassName('am-list-view-scrollview-content'); |
| ... | ... | @@ -278,9 +286,9 @@ class FileManageMobile extends React.Component { |
| 278 | 286 | // disabled={!enabled} |
| 279 | 287 | onClick={() => |
| 280 | 288 | Modal.alert('', <div />, [ |
| 281 | - { text: '拍照', onPress: () => this.handleClick('BtnCamera') }, | |
| 282 | - { text: '相册', onPress: () => this.handleClick('BtnPhoto') }, | |
| 283 | - { text: '取消', onPress: () => this.handleClick.bind(this, 'BtnCancel') }, | |
| 289 | + { text: btnCamera, onPress: () => this.handleClick('BtnCamera') }, | |
| 290 | + { text: album, onPress: () => this.handleClick('BtnPhoto') }, | |
| 291 | + { text: btnCancel, onPress: () => this.handleClick.bind(this, 'BtnCancel') }, | |
| 284 | 292 | ]) |
| 285 | 293 | } |
| 286 | 294 | >{btnUpdConfig.showName} | ... | ... |
src/mobile/login/LoginMobile.js
| ... | ... | @@ -45,6 +45,7 @@ class LoginMobile extends React.Component { |
| 45 | 45 | const map = { ...item }; |
| 46 | 46 | map.label = item.sName; |
| 47 | 47 | map.value = item.sId; |
| 48 | + map.sLanguage = item.sLanguage; | |
| 48 | 49 | companysLabel.push(map); |
| 49 | 50 | }); |
| 50 | 51 | } |
| ... | ... | @@ -56,34 +57,72 @@ class LoginMobile extends React.Component { |
| 56 | 57 | } |
| 57 | 58 | componentDidMount() { |
| 58 | 59 | if (localStorage.getItem(`${commonConfig.prefix}privacyPolicy`) !== 'agree') { |
| 59 | - alert( | |
| 60 | - '用户协议与隐私政策', | |
| 61 | - <p>感谢您选择小羚羊EBC!<br /> | |
| 62 | - 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,请务必审慎阅读 | |
| 63 | - <a href="serviceAgreement.html">《小羚羊EBC服务协议》</a>与 | |
| 64 | - <a href="privacyPolicy.html">《小羚羊EBC隐私政策》</a>内的所有条款,尤其是:<br /> | |
| 65 | - 1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;<br /> | |
| 66 | - 2.约定我们的限制责任、免责条款。<br /> | |
| 67 | - 3.其他以颜色或加粗进行标识的重要条款。<br /> | |
| 68 | - 如您对以上协议有任何疑问,可通过人工客服或发邮件至yanghl@xlyerp.com与我们联系。您点击“同意并继续”的行为即表示您已阅读完毕并同意以上协议的全部内容。 | |
| 69 | - </p>, [ | |
| 70 | - { | |
| 71 | - text: '不同意', | |
| 72 | - onPress: () => { | |
| 73 | - const { plus } = window; | |
| 74 | - if (plus) { | |
| 75 | - plus.runtime.quit(); | |
| 76 | - } | |
| 60 | + const sLanguage = commonUtils.isNotEmptyArr(this.state.companys) ? this.state.companys[0].sLanguage : 'sChinese'; | |
| 61 | + if (sLanguage == "sEnglish") { | |
| 62 | + alert( | |
| 63 | + "User Agreement", | |
| 64 | + <p> | |
| 65 | + Thank you for choosing Xiaolingyang EBC! <br /> | |
| 66 | + We attach great importance to the protection of your personal information and privacy. To better safeguard your personal rights and | |
| 67 | + interests, please carefully read all the terms in the | |
| 68 | + <a href="serviceAgreement.html">Xiaolingyang EBC Service Agreement</a> and{" "} | |
| 69 | + <a href="privacyPolicy.html">Xiaolingyang EBC Privacy Policy</a> before using our products, especially the following: Clauses regarding | |
| 70 | + the rules for the collection, storage, use, external provision, and protection of your personal information, as well as clauses related to | |
| 71 | + your user rights; Clauses stipulating our limited liability and exemption from liability; Other important clauses marked with colors or | |
| 72 | + bold formatting. If you have any questions about the above agreements, you can contact us through customer service or by sending an email | |
| 73 | + to yanghl@xlyerp.com. By clicking "Agree and Continue", you confirm that you have read and agreed to all the contents of the above | |
| 74 | + agreements. | |
| 75 | + </p>, | |
| 76 | + [ | |
| 77 | + { | |
| 78 | + text: "Disagree", | |
| 79 | + onPress: () => { | |
| 80 | + const { plus } = window; | |
| 81 | + if (plus) { | |
| 82 | + plus.runtime.quit(); | |
| 83 | + } | |
| 84 | + }, | |
| 77 | 85 | }, |
| 78 | - }, | |
| 79 | - { | |
| 80 | - text: '同意并继续', | |
| 81 | - onPress: () => { | |
| 82 | - localStorage.setItem(`${commonConfig.prefix}privacyPolicy`, 'agree'); | |
| 86 | + { | |
| 87 | + text: "Agree and Continue", | |
| 88 | + onPress: () => { | |
| 89 | + localStorage.setItem(`${commonConfig.prefix}privacyPolicy`, "agree"); | |
| 90 | + }, | |
| 83 | 91 | }, |
| 84 | - }, | |
| 85 | - ], | |
| 86 | - ); | |
| 92 | + ] | |
| 93 | + ); | |
| 94 | + }else { | |
| 95 | + | |
| 96 | + | |
| 97 | + alert( | |
| 98 | + '用户协议与隐私政策', | |
| 99 | + <p>感谢您选择小羚羊EBC!<br /> | |
| 100 | + 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,请务必审慎阅读 | |
| 101 | + <a href="serviceAgreement.html">《小羚羊EBC服务协议》</a>与 | |
| 102 | + <a href="privacyPolicy.html">《小羚羊EBC隐私政策》</a>内的所有条款,尤其是:<br /> | |
| 103 | + 1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;<br /> | |
| 104 | + 2.约定我们的限制责任、免责条款。<br /> | |
| 105 | + 3.其他以颜色或加粗进行标识的重要条款。<br /> | |
| 106 | + 如您对以上协议有任何疑问,可通过人工客服或发邮件至yanghl@xlyerp.com与我们联系。您点击“同意并继续”的行为即表示您已阅读完毕并同意以上协议的全部内容。 | |
| 107 | + </p>, [ | |
| 108 | + { | |
| 109 | + text: '不同意', | |
| 110 | + onPress: () => { | |
| 111 | + const { plus } = window; | |
| 112 | + if (plus) { | |
| 113 | + plus.runtime.quit(); | |
| 114 | + } | |
| 115 | + }, | |
| 116 | + }, | |
| 117 | + { | |
| 118 | + text: '同意并继续', | |
| 119 | + onPress: () => { | |
| 120 | + localStorage.setItem(`${commonConfig.prefix}privacyPolicy`, 'agree'); | |
| 121 | + }, | |
| 122 | + }, | |
| 123 | + ], | |
| 124 | + ); | |
| 125 | + } | |
| 87 | 126 | } |
| 88 | 127 | } |
| 89 | 128 | |
| ... | ... | @@ -147,8 +186,7 @@ class LoginMobile extends React.Component { |
| 147 | 186 | type: 'loginMobile/login', |
| 148 | 187 | payload: { ...param, dispatch }, |
| 149 | 188 | }); |
| 150 | - console.log('登录成功',param,dispatch); | |
| 151 | - | |
| 189 | + | |
| 152 | 190 | } else { |
| 153 | 191 | Toast.fail(dataReturn.msg); |
| 154 | 192 | } |
| ... | ... | @@ -156,66 +194,84 @@ class LoginMobile extends React.Component { |
| 156 | 194 | } |
| 157 | 195 | |
| 158 | 196 | render() { |
| 159 | - const { loginCompany } = this.state; | |
| 197 | + const { loginCompany, companys } = this.state; | |
| 198 | + console.log('2loginCompany22', loginCompany, companys); | |
| 160 | 199 | const { getFieldProps } = this.props.form; |
| 200 | + let sLanguage = commonUtils.isNotEmptyArr(companys) ? companys[0].sLanguage : 'sChinese'; | |
| 201 | + const settingTitle = sLanguage === 'sEnglish' ? 'server settings' :'服务器设置'; | |
| 202 | + const loginTitle = sLanguage === 'sEnglish' ? 'Login' :'登录'; | |
| 203 | + const pleaseInputUser = sLanguage === 'sEnglish' ? 'please Input User' :'请输入用户'; | |
| 204 | + const pleaseInputPassword = sLanguage === 'sEnglish' ? 'please Input Password' :'请输入密码'; | |
| 205 | + | |
| 161 | 206 | return ( |
| 162 | 207 | <div className={styles.wraper}> |
| 163 | 208 | <div className={styles.logo}> |
| 164 | 209 | <img src={LoginIcon} alt="login" /> |
| 165 | 210 | </div> |
| 166 | - <div className={styles.login} > | |
| 211 | + <div className={styles.login}> | |
| 167 | 212 | <WhiteSpace size="xs" /> |
| 168 | 213 | <InputItem |
| 169 | - {...getFieldProps('username')} | |
| 170 | - placeholder="请输入用户名" | |
| 214 | + {...getFieldProps("username")} | |
| 215 | + placeholder={pleaseInputUser} | |
| 171 | 216 | value={this.state.username} |
| 172 | - onChange={this.onChange.bind(this, 'username')} | |
| 173 | - style={{ backgroundColor: '#fff' }} | |
| 217 | + onChange={this.onChange.bind(this, "username")} | |
| 218 | + style={{ backgroundColor: "#fff" }} | |
| 174 | 219 | > |
| 175 | - <div style={{ | |
| 176 | - backgroundImage: `url(${LoginUser})`, backgroundSize: 'cover', height: '22px', width: '22px', | |
| 177 | - }} | |
| 220 | + <div | |
| 221 | + style={{ | |
| 222 | + backgroundImage: `url(${LoginUser})`, | |
| 223 | + backgroundSize: "cover", | |
| 224 | + height: "22px", | |
| 225 | + width: "22px", | |
| 226 | + }} | |
| 178 | 227 | /> |
| 179 | 228 | </InputItem> |
| 180 | 229 | <WhiteSpace size="xs" /> |
| 181 | 230 | <InputItem |
| 182 | - {...getFieldProps('userpwd')} | |
| 231 | + {...getFieldProps("userpwd")} | |
| 183 | 232 | type="password" |
| 184 | - placeholder="请输入密码" | |
| 233 | + placeholder={pleaseInputPassword} | |
| 185 | 234 | value={this.state.userpwd} |
| 186 | - onChange={this.onChange.bind(this, 'userpwd')} | |
| 235 | + onChange={this.onChange.bind(this, "userpwd")} | |
| 187 | 236 | > |
| 188 | - <div style={{ | |
| 189 | - backgroundImage: `url(${LoginPassword})`, backgroundSize: 'cover', height: '22px', width: '22px', | |
| 190 | - }} | |
| 237 | + <div | |
| 238 | + style={{ | |
| 239 | + backgroundImage: `url(${LoginPassword})`, | |
| 240 | + backgroundSize: "cover", | |
| 241 | + height: "22px", | |
| 242 | + width: "22px", | |
| 243 | + }} | |
| 191 | 244 | /> |
| 192 | 245 | </InputItem> |
| 193 | 246 | <div className="chooseCompany"> |
| 194 | - <Picker | |
| 195 | - data={this.state.companys} | |
| 196 | - cols={1} | |
| 197 | - value={loginCompany} | |
| 198 | - onChange={this.handleCompanyChange} | |
| 199 | - onOk={this.handleChoodeCompanyOk} | |
| 200 | - > | |
| 247 | + <Picker data={this.state.companys} cols={1} value={loginCompany} onChange={this.handleCompanyChange} onOk={this.handleChoodeCompanyOk}> | |
| 201 | 248 | <List.Item arrow="horizontal"> |
| 202 | - <div style={{ | |
| 203 | - backgroundImage: `url(${loginCompanyPic})`, backgroundSize: 'cover', height: '22px', width: '22px', | |
| 204 | - }} | |
| 249 | + <div | |
| 250 | + style={{ | |
| 251 | + backgroundImage: `url(${loginCompanyPic})`, | |
| 252 | + backgroundSize: "cover", | |
| 253 | + height: "22px", | |
| 254 | + width: "22px", | |
| 255 | + }} | |
| 205 | 256 | /> |
| 206 | 257 | </List.Item> |
| 207 | 258 | </Picker> |
| 208 | 259 | </div> |
| 209 | 260 | <WhiteSpace size="lg" /> |
| 210 | 261 | <WhiteSpace size="lg" /> |
| 211 | - <div className={styles.loginSubmit}><Button type="primary" onClick={this.handleLogin.bind(this)} style={{ backgroundColor: '#5e81e5' }}>登录</Button></div> | |
| 262 | + <div className={styles.loginSubmit}> | |
| 263 | + <Button type="primary" onClick={this.handleLogin.bind(this)} style={{ backgroundColor: "#5e81e5" }}> | |
| 264 | + {loginTitle} | |
| 265 | + </Button> | |
| 266 | + </div> | |
| 212 | 267 | {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} |
| 213 | 268 | <a |
| 214 | 269 | className={styles.setting} |
| 215 | 270 | onClick={() => { |
| 216 | 271 | AppUtil.openSettingPage(); |
| 217 | 272 | }} |
| 218 | - >服务器设置 | |
| 273 | + > | |
| 274 | + {settingTitle} | |
| 219 | 275 | </a> |
| 220 | 276 | </div> |
| 221 | 277 | </div> | ... | ... |
src/routes/mobile/IndexMobile.js
| ... | ... | @@ -31,7 +31,8 @@ import Icon51 from "../../assets/mobile/51.png"; |
| 31 | 31 | import Icon6 from "../../assets/mobile/6.png"; |
| 32 | 32 | import Icon61 from "../../assets/mobile/61.png"; |
| 33 | 33 | import Quotation from "./quotation/index"; |
| 34 | -import QuotationDetail from "./quotation/detail"; | |
| 34 | +import QuotationDetail from "./quotation/detail"; | |
| 35 | +import * as commonFunc from '../../components/Common/commonFunc'; | |
| 35 | 36 | // import AppUtil from '../../utils/AppUtil'; |
| 36 | 37 | import * as commonBusiness from "../../components/Common/commonBusiness"; |
| 37 | 38 | |
| ... | ... | @@ -69,13 +70,20 @@ class IndexMobile extends React.Component { |
| 69 | 70 | componentDidUpdate(prevProps) { |
| 70 | 71 | /* eslint-disable */ |
| 71 | 72 | if (this.props.location && prevProps?.location.state !== this.props.location.state) { |
| 73 | + const message = commonFunc.showLocalMessage(this.props, 'message', '消息'); | |
| 74 | + const scene = commonFunc.showLocalMessage(this.props, 'Scene', '现场'); | |
| 75 | + const workbench = commonFunc.showLocalMessage(this.props, 'workbench', '工作台'); | |
| 76 | + const device = commonFunc.showLocalMessage(this.props, 'device', '设备'); | |
| 77 | + const quotation = commonFunc.showLocalMessage(this.props, 'quotation', '报价下单'); | |
| 78 | + const mine = commonFunc.showLocalMessage(this.props, 'mine', '我的'); | |
| 79 | + scene | |
| 72 | 80 | const originTitle = { |
| 73 | - message: "消息", | |
| 74 | - scene: "现场", | |
| 75 | - workbench: "工作台", | |
| 76 | - device: "设备", | |
| 77 | - quotation: "报价下单", | |
| 78 | - myself: "我的", | |
| 81 | + message: message , | |
| 82 | + scene: scene, | |
| 83 | + workbench: workbench, | |
| 84 | + device: device, | |
| 85 | + quotation: quotation, | |
| 86 | + myself: mine, | |
| 79 | 87 | }[this.state.selectedTab]; |
| 80 | 88 | |
| 81 | 89 | try { |
| ... | ... | @@ -97,6 +105,9 @@ class IndexMobile extends React.Component { |
| 97 | 105 | handleTouchEnd = e => { |
| 98 | 106 | const touchEndtPageX = e.changedTouches[0].pageX; |
| 99 | 107 | const touchEndtPageY = e.changedTouches[0].pageY; |
| 108 | + const bExist = commonFunc.showLocalMessage(this.props, 'bExist', '确定退出吗'); | |
| 109 | + const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); | |
| 110 | + const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消'); | |
| 100 | 111 | const touchDireactionX = touchEndtPageX - this.state.touchStartPageX; // 滑动横向坐标 |
| 101 | 112 | const touchDireactionY = touchEndtPageY - this.state.touchStartPageY; // 滑动横向坐标 |
| 102 | 113 | if (touchDireactionX > 100 && touchDireactionY > -80) { |
| ... | ... | @@ -215,7 +226,7 @@ class IndexMobile extends React.Component { |
| 215 | 226 | } else if (pageText === "quotation") { |
| 216 | 227 | if (location.pathname === "/indexMobile/quotationDetail") { |
| 217 | 228 | return ( |
| 218 | - | |
| 229 | + | |
| 219 | 230 | <QuotationDetail {...this.props} sModelType={pageText} sModelsId="101251240115016076506222050" /> |
| 220 | 231 | ) |
| 221 | 232 | } else { |
| ... | ... | @@ -234,6 +245,12 @@ class IndexMobile extends React.Component { |
| 234 | 245 | const navbarIconShow = !["/indexMobile/commobileBill"].includes(location.pathname); |
| 235 | 246 | const msg = this.props.app.unRead; |
| 236 | 247 | const msgObj = commonUtils.isJSON(msg) ? JSON.parse(msg) : {}; |
| 248 | + const message = commonFunc.showLocalMessage(this.props, 'message', '消息'); | |
| 249 | + const scene = commonFunc.showLocalMessage(this.props, 'Scene', '现场'); | |
| 250 | + const workbench = commonFunc.showLocalMessage(this.props, 'workbench', '工作台'); | |
| 251 | + const device = commonFunc.showLocalMessage(this.props, 'device', '设备'); | |
| 252 | + const quotation = commonFunc.showLocalMessage(this.props, 'quotation', '报价下单'); | |
| 253 | + const mine = commonFunc.showLocalMessage(this.props, 'mine', '我的'); | |
| 237 | 254 | return ( |
| 238 | 255 | <div id="tab-bar" className={styles.demo}> |
| 239 | 256 | <div className="demoName"> |
| ... | ... | @@ -280,7 +297,7 @@ class IndexMobile extends React.Component { |
| 280 | 297 | style={{ display: location.pathname === "/indexMobile" ? "block" : "none" }} |
| 281 | 298 | > |
| 282 | 299 | <TabBar.Item |
| 283 | - title="消息" | |
| 300 | + title={message} | |
| 284 | 301 | key="message" |
| 285 | 302 | icon={ |
| 286 | 303 | <div |
| ... | ... | @@ -308,7 +325,7 @@ class IndexMobile extends React.Component { |
| 308 | 325 | commonBusiness.clearSocketData({ token, value: {}, sModelsId: 100 }); |
| 309 | 326 | this.setState({ |
| 310 | 327 | selectedTab: "message", |
| 311 | - title: "消息", | |
| 328 | + title: message, | |
| 312 | 329 | }); |
| 313 | 330 | history.push("/indexMobile"); |
| 314 | 331 | }} |
| ... | ... | @@ -335,7 +352,7 @@ class IndexMobile extends React.Component { |
| 335 | 352 | }} |
| 336 | 353 | /> |
| 337 | 354 | } |
| 338 | - title="现场" | |
| 355 | + title={scene} | |
| 339 | 356 | key="scene" |
| 340 | 357 | // badge="new" |
| 341 | 358 | selected={this.state.selectedTab === "scene"} |
| ... | ... | @@ -345,7 +362,7 @@ class IndexMobile extends React.Component { |
| 345 | 362 | commonBusiness.clearSocketData({ token, value: {}, sModelsId: 100 }); |
| 346 | 363 | this.setState({ |
| 347 | 364 | selectedTab: "scene", |
| 348 | - title: "现场", | |
| 365 | + title:scene, | |
| 349 | 366 | }); |
| 350 | 367 | history.push("/indexMobile"); |
| 351 | 368 | }} |
| ... | ... | @@ -372,7 +389,7 @@ class IndexMobile extends React.Component { |
| 372 | 389 | }} |
| 373 | 390 | /> |
| 374 | 391 | } |
| 375 | - title="工作台" | |
| 392 | + title={workbench} | |
| 376 | 393 | key="workbench" |
| 377 | 394 | // badge="2" |
| 378 | 395 | selected={this.state.selectedTab === "workbench"} |
| ... | ... | @@ -382,7 +399,7 @@ class IndexMobile extends React.Component { |
| 382 | 399 | commonBusiness.clearSocketData({ token, value: {}, sModelsId: 100 }); |
| 383 | 400 | this.setState({ |
| 384 | 401 | selectedTab: "workbench", |
| 385 | - title: "工作台", | |
| 402 | + title: workbench, | |
| 386 | 403 | }); |
| 387 | 404 | history.push("/indexMobile"); |
| 388 | 405 | }} |
| ... | ... | @@ -408,7 +425,7 @@ class IndexMobile extends React.Component { |
| 408 | 425 | }} |
| 409 | 426 | /> |
| 410 | 427 | } |
| 411 | - title="报价" | |
| 428 | + title={quotation} | |
| 412 | 429 | key="quotation" |
| 413 | 430 | // badge="2" |
| 414 | 431 | selected={this.state.selectedTab === "quotation"} |
| ... | ... | @@ -418,7 +435,7 @@ class IndexMobile extends React.Component { |
| 418 | 435 | commonBusiness.clearSocketData({ token, value: {}, sModelsId: 100 }); |
| 419 | 436 | this.setState({ |
| 420 | 437 | selectedTab: "quotation", |
| 421 | - title: "报价下单", | |
| 438 | + title: quotation, | |
| 422 | 439 | }); |
| 423 | 440 | history.push("/indexMobile"); |
| 424 | 441 | }} |
| ... | ... | @@ -444,7 +461,7 @@ class IndexMobile extends React.Component { |
| 444 | 461 | }} |
| 445 | 462 | /> |
| 446 | 463 | } |
| 447 | - title="我的" | |
| 464 | + title={mine} | |
| 448 | 465 | key="contacts" |
| 449 | 466 | // badge="4" |
| 450 | 467 | selected={this.state.selectedTab === "myself"} |
| ... | ... | @@ -454,7 +471,7 @@ class IndexMobile extends React.Component { |
| 454 | 471 | commonBusiness.clearSocketData({ token, value: {}, sModelsId: 100 }); |
| 455 | 472 | this.setState({ |
| 456 | 473 | selectedTab: "myself", |
| 457 | - title: "我的", | |
| 474 | + title: mine, | |
| 458 | 475 | }); |
| 459 | 476 | history.push("/indexMobile"); |
| 460 | 477 | }} | ... | ... |