Browse Source

uas手机版
首页红点接口对接
应用菜单接口对接

RaoMeng 5 years ago
parent
commit
4bcefb4e4e

+ 13 - 2
uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx

@@ -6,7 +6,7 @@
 import React, { Component } from 'react'
 import './common-func.less'
 import { Icon } from 'antd-mobile'
-import { isObjEmpty } from '../../../utils/common/common.util'
+import { isObjEmpty, getOS } from '../../../utils/common/common.util'
 import { fetchGet } from '../../../utils/common/fetchRequest'
 import { FUNC_TYPE_DOC } from '../../../configs/constans.config'
 import { GlobalEvent } from '../../../utils/common/eventbus/eventbus'
@@ -29,6 +29,12 @@ export default class FuncItem extends Component {
         if (funcObj.funcType === FUNC_TYPE_DOC) {
           GlobalEvent.emit(EVENT_DOC_FUNC_COUNT, this, funcObj)
         }
+      }).catch(error => {
+        funcObj.sup = 0
+        this.props.onFuncDataChange && this.props.onFuncDataChange(funcObj)
+        if (funcObj.funcType === FUNC_TYPE_DOC) {
+          GlobalEvent.emit(EVENT_DOC_FUNC_COUNT, this, funcObj)
+        }
       })
     }
   }
@@ -54,7 +60,12 @@ export default class FuncItem extends Component {
           <span className='func-func-text'>{funcObj.name}</span>
           {
             (sup || funcObj.sup) ?
-              <sup className='func-func-sup'>{sup || funcObj.sup}</sup> : ''
+              <sup
+                className='func-func-sup'
+                style={{
+                  // paddingTop: getOS() === 'Android' ? '3px' : '0px',
+                }}
+              >{sup || funcObj.sup}</sup> : ''
           }
         </div>
         {

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

@@ -48,9 +48,9 @@
   position: relative;
 
   .func-func-sup {
-    text-rendering: optimizeLegibility;
-    -webkit-font-smoothing: antialiased;
-    -moz-osx-font-smoothing: grayscale;
+    //text-rendering: optimizeLegibility;
+    //-webkit-font-smoothing: antialiased;
+    //-moz-osx-font-smoothing: grayscale;
     position: absolute;
     white-space: nowrap;
     min-width: 20px;
@@ -68,7 +68,7 @@
     transform: translateX(-45%);
     transform-origin: -10% center;
     z-index: 10;
-    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", SimSun, sans-serif;
+    //font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", SimSun, sans-serif, MIUI;
   }
 }
 

+ 5 - 5
uas-office-web/uas-mobile/src/components/private/subscribe/comp-subscrive.less

@@ -1,17 +1,17 @@
 @comp-subscribe-item-border-radius: 10px;
-@comp-subscribe-top-height: 140px;
-@comp-subscribe-child-height: 60px;
+@comp-subscribe-top-height: 120px;
+@comp-subscribe-child-height: 54px;
 @comp-subscribe-child-padding: 10px;
 
 .comp-subscribe-group-root {
-  padding: 16px;
+  padding: 12px 20px;
   background-color: @com-bg-color-lightGray;
   .com-column-flex;
 
   .comp-subscribe-group-time {
-    margin: 4px auto 12px;
+    margin: 4px auto 10px;
     background-color: white;
-    padding: 6px 12px;
+    padding: 4px 12px;
     border-radius: 30px;
     color: @com-text-color-normal;
   }

+ 5 - 0
uas-office-web/uas-mobile/src/configs/antd.config.less

@@ -17,6 +17,11 @@
   margin: 4px 0 0 0 !important;
 }
 
+.am-badge-text {
+  //@tab-bar-padding-top: 3px;
+  //padding-top: @tab-bar-padding-top !important;
+}
+
 /********************itemList的样式***********************/
 .am-list-item {
   margin-bottom: 10px;

+ 1 - 2
uas-office-web/uas-mobile/src/configs/api.config.js

@@ -20,6 +20,5 @@ export const API = {
   //应用菜单列表
   APPCOMMON_GETSERVICE: _baseURL + '/mobile/appcommon/getServices.action',
   //保存常用应用
-  APPCOMMON_SAVECOMMONSERVICES: _baseURL +
-    '/mobile/appcommon/saveCommonServices.action',
+  APPCOMMON_SAVESERVICES: _baseURL + '/mobile/appcommon/saveServices.action',
 }

+ 7 - 0
uas-office-web/uas-mobile/src/pages/private/homePage/HomePage.jsx

@@ -37,8 +37,15 @@ class HomePage extends Component {
     document.title = 'UAS系统'
     clearListState()
 
+    // fetchGet(API.COMMON_LOGIN, {
+    //   username: 'U0815',
+    //   password: 'wyx12345',
+    //   sob: 'UAS',
+    // }).then(response => {
     //获取应用列表
     requestServices()
+    // })
+
     //刷新应用红点
     GlobalEvent.on(EVENT_DOC_FUNC_COUNT, onDocFuncCountRefresh, this)
   }

+ 1 - 1
uas-office-web/uas-mobile/src/pages/private/oftenFunc/OftenFuncManage.jsx

@@ -114,7 +114,7 @@ class OftenFuncManage extends Component {
 
   onSaveOften = () => {
     Toast.loading('正在保存', 0)
-    fetchPostObj(API.APPCOMMON_SAVECOMMONSERVICES, {
+    fetchPostObj(API.APPCOMMON_SAVESERVICES, {
       data: this.oftenFuncList,
     }).then(response => {
       Toast.hide()

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

@@ -495,3 +495,25 @@ export function NoToChinese (num) {
   return re
 }
 
+/**
+ * 获取当前操作系统
+ * @returns {string}
+ */
+export function getOS () {
+  let os, navigator = window.navigator
+  if (navigator.userAgent.indexOf('Android') > -1
+    // || navigator.userAgent.indexOf('Linux') > -1
+  ) {
+    os = 'Android'
+  } else if (navigator.userAgent.indexOf('iPhone') > -1 ||
+    navigator.userAgent.indexOf('iPad') > -1) {
+    os = 'iOS'
+  } else if (navigator.userAgent.indexOf('Windows Phone') > -1) {
+    os = 'WP'
+  } else {
+    os = 'Others'
+  }
+  return os
+}
+
+