吃个甘蔗嚼一年 3 年 前
コミット
f84899ee69
共有3 個のファイルを変更した6 個の追加5 個の削除を含む
  1. 1
    1
      src/components/BossCard/index.jsx
  2. 2
    2
      src/components/OrderMolded/index.jsx
  3. 3
    2
      src/components/PayOrderCard/index.jsx

+ 1
- 1
src/components/BossCard/index.jsx ファイルの表示

@@ -2,7 +2,7 @@ import withLayout from '@/layouts'
2 2
 import useSave from "@/utils/hooks/useSave"
3 3
 import image from '@/assets/icons/ProCard/8kb.jpg'
4 4
 import AuthPage from '@/components/AuthPage'
5
-import moment from 'moment'
5
+import formatTimes from '@/utils/formatTime'
6 6
 import { useState, useEffect } from 'react'
7 7
 import { Button, Radio, Input } from '@tarojs/components'
8 8
 import food from '@/assets/icons/ProCard/food.png'

+ 2
- 2
src/components/OrderMolded/index.jsx ファイルの表示

@@ -2,7 +2,7 @@ import { useState } from 'react'
2 2
 import image from '@/assets/icons/ProCard/8kb.jpg'
3 3
 import { Button, Radio } from '@tarojs/components'
4 4
 import PayOrderCard from '@/components/PayOrderCard'
5
-import moment from 'moment'
5
+import formatTimes from '@/utils/formatTime'
6 6
 import food from '@/assets/icons/ProCard/food.png'
7 7
 import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
8 8
 import './style.less'
@@ -26,7 +26,7 @@ export default (props) => {
26 26
             <view className='title-text'>{item.description}</view>
27 27
           </view>
28 28
           <text className='title-money' >¥{item.actualPrice / 100}元</text>
29
-          <view className='title-time' >有效期:<text>{moment(item.startTimeal).format('YYYY/MM/DD')}</text> - <text>{moment(item.endTime).format('YYYY/MM/DD')}</text></view>
29
+          <view className='title-time' >有效期:{formatTimes(item.startTime, "yyyy/MM/dd")}-{formatTimes(item.endTime, "yyyy/MM/dd")}</view>
30 30
         </view>
31 31
       </view>
32 32
     </view>

+ 3
- 2
src/components/PayOrderCard/index.jsx ファイルの表示

@@ -2,7 +2,7 @@ import withLayout from '@/layouts'
2 2
 import useSave from "@/utils/hooks/useSave"
3 3
 import image from '@/assets/icons/ProCard/8kb.jpg'
4 4
 import AuthPage from '@/components/AuthPage'
5
-import moment from 'moment'
5
+import formatTimes from '@/utils/formatTime'
6 6
 import { useState, useEffect } from 'react'
7 7
 import { Button, Radio, Input } from '@tarojs/components'
8 8
 import food from '@/assets/icons/ProCard/food.png'
@@ -103,7 +103,7 @@ export default (props) => {
103 103
                 <view className='title-text'>{item.description}</view>
104 104
               </view>
105 105
               <text className='title-money' >¥{item.actualPrice / 100}<text className='title-money-2'>{item.standardPrice / 100}</text></text>
106
-              <view className='title-time' >有效期:<text>{moment(item.startTimeal).format('YYYY/MM/DD')}</text> - <text>{moment(item.endTime).format('YYYY/MM/DD')}</text></view>
106
+              <view className='title-time' >有效期:{formatTimes(item.startTime, "yyyy/MM/dd")}-{formatTimes(item.endTime, "yyyy/MM/dd")}</view>
107 107
             </view>
108 108
           </view>
109 109
           <view class='right-complete-two' onClick={ShowMoldeOn} >
@@ -115,6 +115,7 @@ export default (props) => {
115 115
         </view>
116 116
       </view>
117 117
     </view>
118
+    // {moment(item.startTimeal).format('YYYY/MM/DD')}
118 119
 
119 120
 
120 121
   )