| | |
| | | "defaultLang": "zh-CN", |
| | | "WXAppID": "", |
| | | "debugger": false, |
| | | "licenseKey": "E1A8FE", |
| | | "host": "http://qingqiumarket.cn", |
| | | "service": "mkwms/" |
| | | } |
| | |
| | | let GLOB = {} |
| | | GLOB.appId = config.appId || '' |
| | | GLOB.lineColor = config.lineColor || '' |
| | | GLOB.licenseKey = config.licenseKey || '' |
| | | |
| | | if (config.externalDatabase !== false && config.externalDatabase !== 'false' && config.externalDatabase !== undefined) { |
| | | GLOB.externalDatabase = config.externalDatabase ? `[${config.externalDatabase}]..` : '' |
| | |
| | | */ |
| | | linerender = () => { |
| | | const { card } = this.state |
| | | let plot = {...card.plot} // 去除title所占空间 |
| | | const plot = card.plot |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.65)' |
| | | let X_axis = plot.Xaxis || 'x' |
| | | let Y_axis = plot.Yaxis || ['y'] |
| | | |
| | | if (card.plot.title || card.search.length > 0) { |
| | | plot.height = card.plot.height - 70 |
| | | } |
| | | |
| | | let data = this.getdata(X_axis, Y_axis) |
| | | |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'canvas', |
| | | autoFit: true, |
| | | height: plot.height || 400 |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(dv.rows) |
| | |
| | | */ |
| | | customrender = (data) => { |
| | | let card = fromJS(this.state.card).toJS() |
| | | let plot = {...card.plot} // 去除title所占空间 |
| | | let plot = card.plot |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.65)' |
| | | let fields = [] |
| | | let legends = [] |
| | | let transfield = {} |
| | | let Bar_axis = [] |
| | | |
| | | if (card.plot.title || card.search.length > 0) { |
| | | plot.height = card.plot.height - 70 |
| | | } |
| | | |
| | | card.columns.forEach(col => { |
| | | if (col.field) { |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'canvas', |
| | | autoFit: true, |
| | | height: plot.height || 400, |
| | | height: this.wrap.offsetHeight - 25, |
| | | }) |
| | | |
| | | // chart.axis(plot.Xaxis, { label: { style: { fill: color } }, tickLine: {style: { stroke: color }}, line: { style: { stroke: color } } }) |
| | |
| | | */ |
| | | barrender = () => { |
| | | const { card } = this.state |
| | | let plot = {...card.plot} |
| | | const plot = card.plot |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.65)' |
| | | let X_axis = plot.Xaxis || 'x' |
| | | let Y_axis = plot.Yaxis || ['y'] |
| | | |
| | | if (card.plot.title || card.search.length > 0) { |
| | | plot.height = card.plot.height - 70 |
| | | } |
| | | |
| | | let data = this.getdata(X_axis, Y_axis) |
| | | |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'canvas', |
| | | autoFit: true, |
| | | height: plot.height || 400 |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(dv.rows) |
| | |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null} |
| | | <div className="canvas" id={card.uuid + 'canvas'}></div> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | | {appType !== 'mob' ? <ActionComponent |
| | | type="chart" |
| | | config={card} |
| | |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas { |
| | | margin: 0px; |
| | | padding: 15px 10px 10px; |
| | | letter-spacing: 0px; |
| | | height: 100%; |
| | | // height: 100%; |
| | | flex: 1; |
| | | } |
| | | .normal-header + .canvas { |
| | | height: calc(100% - 45px); |
| | | } |
| | | // .normal-header + .canvas { |
| | | // height: calc(100% - 45px); |
| | | // } |
| | | |
| | | .chart-header { |
| | | position: relative; |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'dashboard', |
| | | autoFit: true, |
| | | height: plot.title ? plot.height - 45 : plot.height, |
| | | height: this.wrap.offsetHeight - 30, |
| | | }) |
| | | |
| | | chart.data(data) |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'dashboard', |
| | | autoFit: true, |
| | | height: plot.title ? plot.height - 45 : plot.height, |
| | | height: this.wrap.offsetHeight - 30, |
| | | padding: [0, 0, 0, 0], |
| | | }) |
| | | chart.data(data) |
| | |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | {card.plot.title ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null} |
| | | <div className="canvas" id={card.uuid + 'dashboard'}></div> |
| | | <div className="canvas" id={card.uuid + 'dashboard'} ref={ref => this.wrap = ref}></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas { |
| | | margin: 0px; |
| | | padding: 15px; |
| | | letter-spacing: 0px; |
| | | height: 100%; |
| | | // height: 100%; |
| | | flex: 1; |
| | | } |
| | | .normal-header + .canvas { |
| | | height: calc(100% - 45px); |
| | | } |
| | | // .normal-header + .canvas { |
| | | // height: calc(100% - 45px); |
| | | // } |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | |
| | | let X_axis = plot.Xaxis || 'x' |
| | | let Y_axis = plot.Yaxis || 'y' |
| | | let type = plot.type || 'type' |
| | | let height = plot.height || 400 |
| | | if (card.plot.title || card.search.length > 0) { |
| | | height = height - 45 |
| | | } |
| | | |
| | | const _data = this.getnestdata(X_axis, Y_axis, type) |
| | | const dvx = new DataView().source(_data) |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'canvas', |
| | | autoFit: true, |
| | | height: height, |
| | | height: this.wrap.offsetHeight - 30, |
| | | padding: 0, |
| | | }) |
| | | |
| | |
| | | let color = plot.color || 'rgba(0, 0, 0, 0.85)' |
| | | let X_axis = plot.Xaxis || 'x' |
| | | let Y_axis = plot.Yaxis || 'y' |
| | | let height = plot.height || 400 |
| | | if (card.plot.title || card.search.length > 0) { |
| | | height = height - 45 |
| | | } |
| | | |
| | | let data = this.getdata(X_axis, Y_axis) |
| | | |
| | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'canvas', |
| | | autoFit: true, |
| | | height: height |
| | | height: this.wrap.offsetHeight - 30 |
| | | }) |
| | | |
| | | if (plot.shape !== 'nightingale' && plot.show !== 'value') { |
| | |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null} |
| | | <div className="canvas" id={card.uuid + 'canvas'}></div> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | | </div> |
| | | ) |
| | | } |
| | |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas { |
| | | margin: 0px; |
| | | padding: 15px; |
| | | letter-spacing: 0px; |
| | | height: 100%; |
| | | // height: 100%; |
| | | flex: 1; |
| | | } |
| | | .normal-header + .canvas { |
| | | height: calc(100% - 45px); |
| | | } |
| | | // .normal-header + .canvas { |
| | | // height: calc(100% - 45px); |
| | | // } |
| | | |
| | | >.anticon-tool { |
| | | position: absolute; |
| | |
| | | const { card } = this.state |
| | | const plot = card.plot |
| | | const data = this.getdata() |
| | | let height = plot.height - 25 |
| | | |
| | | if (card.plot.title || card.search.length > 0) { |
| | | height = plot.height - 70 |
| | | } |
| | | |
| | | const chart = new Chart({ |
| | | container: card.uuid + 'canvas', |
| | | autoFit: true, |
| | | height: height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(data); |
| | |
| | | <Icon type="tool" /> |
| | | </Popover> |
| | | {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null} |
| | | <div className="canvas" id={card.uuid + 'canvas'}></div> |
| | | <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div> |
| | | {appType !== 'mob' ? <ActionComponent type="chart" config={card} updateaction={this.updateComponent}/> : null} |
| | | </div> |
| | | ) |
| | |
| | | background-position: center center; |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas { |
| | | margin: 0px; |
| | | padding: 15px 10px 10px; |
| | | letter-spacing: 0px; |
| | | height: 100%; |
| | | // height: 100%; |
| | | flex: 1; |
| | | } |
| | | .normal-header + .canvas { |
| | | height: calc(100% - 45px); |
| | | } |
| | | // .normal-header + .canvas { |
| | | // height: calc(100% - 45px); |
| | | // } |
| | | |
| | | .chart-header { |
| | | position: relative; |
| | |
| | | _loginWays.push(item) |
| | | } |
| | | }) |
| | | console.log(nextProps.wrap) |
| | | console.log(loginWays) |
| | | console.log(_loginWays) |
| | | |
| | | this.setState({ |
| | | loginWays: _loginWays, |
| | | activeWay: _loginWays[0], |
| | |
| | | let authCode = localStorage.getItem(window.location.href.split('#')[0] + 'AuthCode') // 判断系统是否在授权期限内 |
| | | let _s = md5('mksoft' + moment().format('YYYYMMDD')) |
| | | let isauth = authCode && authCode.includes(_s) |
| | | let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6) |
| | | |
| | | if (window.GLOB.licenseKey === key) { |
| | | isauth = true |
| | | } |
| | | |
| | | if (userId && isauth) { |
| | | return (<item.component {...props}/>) |
| | |
| | | import Utils from '@/utils/utils.js' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import NormalHeader from '@/tabviews/custom/components/share/normalheader' |
| | | import './index.scss' |
| | | |
| | | const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | // const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | const ExcelOutButton = asyncComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton')) |
| | | const ExcelInButton = asyncComponent(() => import('@/tabviews/zshare/actionList/excelInbutton')) |
| | | |
| | |
| | | }) |
| | | } |
| | | |
| | | let padding = 0 |
| | | if (_config.style.paddingTop && !isNaN(parseInt(_config.style.paddingTop))) { |
| | | padding += parseInt(_config.style.paddingTop) |
| | | } |
| | | if (_config.style.paddingBottom && !isNaN(parseInt(_config.style.paddingBottom))) { |
| | | padding += parseInt(_config.style.paddingBottom) |
| | | } |
| | | |
| | | let height = config.plot.height || 400 |
| | | if (config.plot.title || config.search.length > 0) { |
| | | _config.plot.height = height - 70 - padding |
| | | } else { |
| | | _config.plot.height = height - 25 - padding |
| | | } |
| | | |
| | | _config.style.height = height |
| | | _config.style.height = config.plot.height || 400 |
| | | |
| | | let transfield = {} |
| | | _config.columns.forEach(col => { |
| | |
| | | const chart = new Chart({ |
| | | container: this.state.chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(_data) |
| | |
| | | const chart = new Chart({ |
| | | container: this.state.chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | // 坐标轴格式化 |
| | |
| | | const chart = new Chart({ |
| | | container: this.state.chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(_data) |
| | |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <div className="canvas-wrap"> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | <div className="chart-action"> |
| | | {config.action.map(item => { |
| | | if (item.OpenType === 'excelOut') { |
| | |
| | | } |
| | | })} |
| | | </div> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> |
| | | </div> |
| | | {empty ? <Empty description={false}/> : null} |
| | | </div> |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 100px; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas-wrap { |
| | | margin: 0 0px; |
| | | position: relative; |
| | | min-height: calc(100% - 45px); |
| | | flex: 1; |
| | | .chart-action { |
| | | position: absolute; |
| | | top: 0px; |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import asyncComponent from '@/utils/asyncComponent' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import NormalHeader from '@/tabviews/custom/components/share/normalheader' |
| | | import './index.scss' |
| | | |
| | | const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | // const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | |
| | | registerShape('point', 'pointer', { |
| | | draw(cfg, container) { |
| | |
| | | } |
| | | } |
| | | |
| | | let height = config.plot.height || 400 |
| | | if (config.plot.title) { |
| | | _config.plot.height = height - 75 |
| | | } else { |
| | | _config.plot.height = height - 30 |
| | | } |
| | | _config.style.height = height |
| | | _config.style.height = config.plot.height || 400 |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | |
| | | const chart = new Chart({ |
| | | container: chartId, |
| | | autoFit: true, |
| | | height: plot.height, |
| | | height: this.wrap.offsetHeight - 30, |
| | | }) |
| | | |
| | | chart.data(data) |
| | |
| | | const chart = new Chart({ |
| | | container: chartId, |
| | | autoFit: true, |
| | | height: plot.height, |
| | | height: this.wrap.offsetHeight - 30, |
| | | padding: [0, 0, 0, 0], |
| | | }) |
| | | chart.data([_data]) |
| | |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} /> |
| | | <div className="canvas-wrap"> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 30}} id={this.state.chartId}></div> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> |
| | | </div> |
| | | </div> |
| | | ) |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 100px; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas-wrap { |
| | | margin: 0 0px; |
| | | position: relative; |
| | | min-height: calc(100% - 45px); |
| | | flex: 1; |
| | | .chart-action { |
| | | position: absolute; |
| | | top: 2px; |
| | |
| | | import Utils from '@/utils/utils.js' |
| | | import { modifyTabview } from '@/store/action' |
| | | import { chartColors } from '@/utils/option.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import asyncComponent from '@/utils/asyncComponent' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import NormalHeader from '@/tabviews/custom/components/share/normalheader' |
| | | import './index.scss' |
| | | |
| | | const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | // const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | |
| | | class PieChart extends Component { |
| | | static propTpyes = { |
| | |
| | | _sync = false |
| | | } |
| | | |
| | | let height = config.plot.height || 400 |
| | | if (config.plot.title || config.search.length > 0) { |
| | | _config.plot.height = height - 75 |
| | | } else { |
| | | _config.plot.height = height - 30 |
| | | } |
| | | |
| | | _config.style.height = height |
| | | _config.style.height = config.plot.height || 400 |
| | | |
| | | let decimal = 0 |
| | | _config.columns.forEach(col => { |
| | |
| | | const chart = new Chart({ |
| | | container: chartId, |
| | | autoFit: true, |
| | | height: plot.height, |
| | | height: this.wrap.offsetHeight - 30, |
| | | padding: 0, |
| | | }) |
| | | |
| | |
| | | const chart = new Chart({ |
| | | container: chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 30 |
| | | }) |
| | | |
| | | if (plot.shape !== 'nightingale' && plot.show !== 'value') { |
| | |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <div className="canvas-wrap"> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 30}} id={this.state.chartId}></div> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> |
| | | </div> |
| | | {empty ? <Empty description={false}/> : null} |
| | | </div> |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 100px; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas-wrap { |
| | | margin: 0 0px; |
| | | position: relative; |
| | | min-height: calc(100% - 45px); |
| | | flex: 1; |
| | | .chart-action { |
| | | position: absolute; |
| | | top: 2px; |
| | |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | // import asyncComponent from '@/utils/asyncComponent' |
| | | import asyncBtnComponent from './asyncButtonComponent' |
| | | import UtilsDM from '@/utils/utils-datamanage.js' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import NormalHeader from '@/tabviews/custom/components/share/normalheader' |
| | | import './index.scss' |
| | | |
| | | const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | // const NormalHeader = asyncComponent(() => import('@/tabviews/custom/components/share/normalheader')) |
| | | const ExcelOutButton = asyncBtnComponent(() => import('@/tabviews/zshare/actionList/exceloutbutton')) |
| | | const ExcelInButton = asyncBtnComponent(() => import('@/tabviews/zshare/actionList/excelInbutton')) |
| | | |
| | |
| | | _sync = false |
| | | } |
| | | |
| | | let height = config.plot.height || 400 |
| | | if (config.plot.title || config.search.length > 0) { |
| | | _config.plot.height = height - 70 |
| | | } else { |
| | | _config.plot.height = height - 25 |
| | | } |
| | | |
| | | _config.style.height = height |
| | | _config.style.height = config.plot.height || 400 |
| | | |
| | | this.setState({ |
| | | config: _config, |
| | |
| | | const chart = new Chart({ |
| | | container: chartId, |
| | | autoFit: true, |
| | | height: plot.height |
| | | height: this.wrap.offsetHeight - 25 |
| | | }) |
| | | |
| | | chart.data(data); |
| | |
| | | </div> : null |
| | | } |
| | | <NormalHeader config={config} BID={BID} menuType={this.props.menuType} refresh={this.refreshSearch} /> |
| | | <div className="canvas-wrap"> |
| | | <div className="canvas-wrap" ref={ref => this.wrap = ref}> |
| | | <div className="chart-action"> |
| | | {config.action.map(item => { |
| | | if (item.OpenType === 'excelOut') { |
| | |
| | | } |
| | | })} |
| | | </div> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} style={{height: config.plot.height + 25}} id={this.state.chartId}></div> |
| | | <div className={'canvas' + (empty ? ' empty' : '')} id={this.state.chartId}></div> |
| | | </div> |
| | | {empty ? <Empty description={false}/> : null} |
| | | </div> |
| | |
| | | background-repeat: no-repeat; |
| | | background-size: cover; |
| | | min-height: 100px; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .canvas-wrap { |
| | | margin: 0 0px; |
| | | position: relative; |
| | | min-height: calc(100% - 45px); |
| | | flex: 1; |
| | | .chart-action { |
| | | position: absolute; |
| | | top: 0px; |
| | |
| | | if (loading || waiting) { |
| | | return (<div className="home-loading-view" style={{background: background}}><Spin className="home-box-spin" size="large" /></div>) |
| | | } else if (view === 'custom') { |
| | | return (<CustomPage MenuID={this.props.MenuID}/>) |
| | | return (<CustomPage MenuID={this.props.MenuID} MenuName="首页"/>) |
| | | } else { |
| | | return (<DefaultHome />) |
| | | } |
| | |
| | | |
| | | componentDidMount () { |
| | | // 获取ip及城市信息 |
| | | let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, '')) |
| | | Api.directRequest(ipurl, 'get', null, 'true').then(res => { |
| | | if (!res || !res.location) return |
| | | sessionStorage.setItem('city', res.location) |
| | | this.setState({ |
| | | ipAddress: res.ip || '', |
| | | city: res.location |
| | | }) |
| | | }) |
| | | // 获取地理位置:谷歌无效,谷歌定位需要将附近的无线信息发送到谷歌的服务器,查询定位信息,国内无法连接到谷歌服务器,火狐可以获取经纬度 |
| | | // let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, '')) |
| | | // Api.directRequest(ipurl, 'get', null, 'true').then(res => { |
| | | // if (!res || !res.location) return |
| | | // sessionStorage.setItem('city', res.location) |
| | | // this.setState({ |
| | | // ipAddress: res.ip || '', |
| | | // city: res.location |
| | | // }) |
| | | // }) |
| | | sessionStorage.setItem('city', '') // ip地址定位暂停使用 |
| | | const timeStamp = new Date().getTime() |
| | | const _authUrl = window.location.href.split('#')[0] + 'AuthCode' |
| | | |
| | |
| | | authCode = authCode ? authCode.split(',') : [] |
| | | let index = authCode.findIndex(key => key === _s) |
| | | |
| | | if (index > -1) { |
| | | let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6) |
| | | |
| | | if (index > -1 || window.GLOB.licenseKey === key) { |
| | | this.setState({ |
| | | auth: true |
| | | }) |
| | | } |
| | | |
| | | if (index === -1 || index > 5) { |
| | | if (window.GLOB.licenseKey !== key && (index === -1 || index > 5)) { |
| | | let _appId = window.GLOB.appId |
| | | |
| | | if (options.sysType === 'cloud') { // 云端使用系统配置appid |