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
     "@tarojs/react": "3.2.8",
41
     "@tarojs/react": "3.2.8",
42
     "@tarojs/runtime": "3.2.8",
42
     "@tarojs/runtime": "3.2.8",
43
     "@tarojs/taro": "3.2.8",
43
     "@tarojs/taro": "3.2.8",
44
-    "dayjs": "^1.8.14",
45
     "classnames": "^2.3.1",
44
     "classnames": "^2.3.1",
46
     "react": "^17.0.0",
45
     "react": "^17.0.0",
47
     "react-dom": "^17.0.0",
46
     "react-dom": "^17.0.0",

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

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