Browse Source

uas手机版
过渡页面区分pc端与移动端,调整相应系统
调整菜单间距

RaoMeng 5 years ago
parent
commit
1b7af9f21f

+ 6 - 0
uas-office-web/uas-mobile/src/components/common/currencyList/CurrencyList.jsx

@@ -59,6 +59,12 @@ class CurrencyList extends Component {
         rowHasChanged: (row1, row2) => row1 !== row2,
       }),
     })
+    setTimeout(() => {
+      this.setState({
+        height: document.documentElement.clientHeight -
+          ReactDOM.findDOMNode(this.lv).offsetTop,
+      })
+    }, 400)
 
     const {
       tabUrl,

+ 1 - 1
uas-office-web/uas-mobile/src/components/common/func/common-func.less

@@ -53,7 +53,7 @@
   width: 25%;
   position: relative;
   display: inline-block;
-  padding: 8px 4px 6px;
+  padding: 12px 4px;
   background: white;
 }
 

+ 8 - 2
uas-office-web/uas-mobile/src/pages/common/UasEntry.jsx

@@ -6,6 +6,8 @@
 import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import { clearAllRedux } from '../../redux/utils/redux.utils'
+import { isMobile } from '../../utils/common/common.util'
+import { _baseURL } from '../../configs/api.config'
 
 class UasEntry extends Component {
 
@@ -17,9 +19,13 @@ class UasEntry extends Component {
 
   componentDidMount () {
     document.title = 'UAS系统'
-    clearAllRedux()
 
-    this.props.history.replace('/homePage')
+    if (isMobile()) {
+      clearAllRedux()
+      this.props.history.replace('/homePage')
+    } else {
+      window.location.href = _baseURL
+    }
   }
 
   componentWillUnmount () {

+ 13 - 0
uas-office-web/uas-mobile/src/utils/common/common.util.js

@@ -560,3 +560,16 @@ export function formatCurrency (s, n) {
   //将顺序反转回来,并返回一个字符串
   return t.split('').reverse().join('') + '.' + numArry[1]
 }
+
+/**
+ * 网页是否运行在移动端
+ * @returns {boolean}
+ */
+export function isMobile () {
+  if ((navigator.userAgent.match(
+    /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
+    return true
+  } else {
+    return false
+  }
+}