张延森 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
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
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
   mini: {},
15
   mini: {},
16
   h5: {
16
   h5: {

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

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

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

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

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

18
 
18
 
19
 //例子 getDateFormat(new Date().valueOf(),true,'yyyy/M/d')
19
 //例子 getDateFormat(new Date().valueOf(),true,'yyyy/M/d')
20
 export function formatDate(dt, fmt) {
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
   var o = {
27
   var o = {
24
     "M+": date.getMonth() + 1, //月份
28
     "M+": date.getMonth() + 1, //月份

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

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
+}