Your Name 3 years ago
parent
commit
4bf50eddee
2 changed files with 4 additions and 3 deletions
  1. 0
    1
      package.json
  2. 4
    2
      src/pages/mine/components/UserDetailFollowRecord/index.jsx

+ 0
- 1
package.json View File

@@ -41,7 +41,6 @@
41 41
     "@tarojs/react": "3.2.8",
42 42
     "@tarojs/runtime": "3.2.8",
43 43
     "@tarojs/taro": "3.2.8",
44
-    "dayjs": "^1.8.14",
45 44
     "classnames": "^2.3.1",
46 45
     "react": "^17.0.0",
47 46
     "react-dom": "^17.0.0",

+ 4
- 2
src/pages/mine/components/UserDetailFollowRecord/index.jsx View File

@@ -2,9 +2,11 @@ import { useState, useEffect } from 'react'
2 2
 import { ScrollView } from '@tarojs/components'
3 3
 import { fetch } from '@/utils/request'
4 4
 import { API_FOLLOW_LIST } from '@/constants/api'
5
-import dayjs from 'dayjs'
5
+import getDateFormat from "@/utils/chatDate";
6 6
 import './index.scss'
7 7
 
8
+const formatDate = (dtStr, formatStr) => getDateFormat((new Date(dtStr)).valueOf(), true, formatStr)
9
+
8 10
 export default function UserDetailFollowRecord (props) {
9 11
   const { CustomerId = null, AddFollow = () => {}, AddFollowCounts = 0 } = props
10 12
   const [PageList, setPageList] = useState([])
@@ -65,7 +67,7 @@ export default function UserDetailFollowRecord (props) {
65 67
               PageList.map((item, index) => (
66 68
                 <view className='flex-h' key={`Item-${index}`}>
67 69
                   <view className='flex-item'>
68
-                    <text>{dayjs(item.createDate).format('YYYY年MM月DD日 HH:mm:ss')}</text>
70
+                    <text>{formatDate(item.createDate, 'YYYY年MM月DD日 HH:mm:ss')}</text>
69 71
                   </view>
70 72
                   <view className='Line'>
71 73
                     <view></view>