张延森 3 years ago
parent
commit
1d79ec0746
5 changed files with 22 additions and 4 deletions
  1. 1
    1
      config/prod.js
  2. 3
    1
      src/layout/index.js
  3. 1
    1
      src/pages/mine/index.jsx
  4. 5
    1
      src/utils/chatDate.js
  5. 12
    0
      src/utils/subscribeMessage.js

+ 1
- 1
config/prod.js View File

@@ -10,7 +10,7 @@ module.exports = {
10 10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11 11
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
12 12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
13
-    Version: '"V0.0.42-20210812"'
13
+    Version: '"V0.0.43-20210812"'
14 14
   },
15 15
   mini: {},
16 16
   h5: {

+ 3
- 1
src/layout/index.js View File

@@ -13,6 +13,7 @@ import FirstScreen from '@/components/FirstScreen'
13 13
 import ShareToCircle from '@/components/ShareToCircle'
14 14
 import { report as reportCustomer } from '@/utils/customer'
15 15
 import nav2Target from '@/utils/nav2Target'
16
+import { showSubscribeMessage } from '@/utils/subscribeMessage'
16 17
 import { ROLE_CODE } from '@/constants/user'
17 18
 import useAuth from './useAuth'
18 19
 import useScreen from './useScreen'
@@ -34,7 +35,6 @@ export default (ChildComponent) => (props) => {
34 35
   const [authPhone, authAvatar, authPage] = useAuth(person, page)
35 36
   const [shareTimelineVisible, setShareTimelineVisible] = useState(false)
36 37
 
37
-
38 38
   const { id } = router.params
39 39
   const showConsultant = page.shortcut && page.shortcut.consultant
40 40
 
@@ -62,6 +62,8 @@ export default (ChildComponent) => (props) => {
62 62
     })
63 63
   }
64 64
 
65
+  showSubscribeMessage()
66
+
65 67
   // 报备客户
66 68
   useEffect(() => {
67 69
     if (isSinglePage) return;

+ 1
- 1
src/pages/mine/index.jsx View File

@@ -15,7 +15,7 @@ import MineMenuList from './tabData'
15 15
 const defaultRuleImage = 'https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/index-icon18.jpg'
16 16
 
17 17
 const version = `版本: ${Version}`
18
-const copyRight = `云致科技 @ ${(new Date()).getFullYear()}`
18
+const copyRight = `技术支持: 云致科技 @ ${(new Date()).getFullYear()}`
19 19
 
20 20
 export default withLayout(() => {
21 21
 

+ 5
- 1
src/utils/chatDate.js View File

@@ -18,7 +18,11 @@ export const diff = (dt1, dt2) => {
18 18
 
19 19
 //例子 getDateFormat(new Date().valueOf(),true,'yyyy/M/d')
20 20
 export function formatDate(dt, fmt) {
21
-  const date = new Date(dt)
21
+  if (!dt) return dt;
22
+
23
+  // 解决苹果手机不能正常初始化的问题
24
+  const dtStr = typeof dt === 'string' ? dt.replace(/-/g, "/") : dt;
25
+  const date = new Date(dtStr)
22 26
 
23 27
   var o = {
24 28
     "M+": date.getMonth() + 1, //月份

+ 12
- 0
src/utils/subscribeMessage.js View File

@@ -0,0 +1,12 @@
1
+
2
+import store from '../store'
3
+
4
+export const MESSAGE_TYPE = {
5
+  NOTICE: 'notice',
6
+}
7
+
8
+export function showSubscribeMessage (messageType) {
9
+  const { user } = store.getState()
10
+  const { miniApp } = (user || {}).userInfo || {}
11
+
12
+}