Authored by 李奇

dayjs替换

... ... @@ -5,7 +5,7 @@ import yaSDK from 'yoho-activity-sdk';
import config from '../../../../config';
import wx from 'weixin-js-sdk';
import TipModal from '../components/tip-modal';
import moment from 'moment';
import dayjs from 'dayjs';
export default class Prize extends PureComponent {
... ... @@ -74,7 +74,7 @@ export default class Prize extends PureComponent {
let redEnvelopeLink = 'https://activity.yoho.cn/feature/3221.html?title=我的红包&openby:yohobuy={"action":"go.mineredpackage"}';
this.state.prizes.map(prize => {
prize.createTime = moment(new Date(prize.createTime).getTime()).format('YYYY-MM-DD HH:mm');
prize.createTime = dayjs(new Date(prize.createTime).getTime()).format('YYYY-MM-DD HH:mm');
});
return (
... ...
... ... @@ -16,7 +16,6 @@
"dependencies": {
"dateformat": "^3.0.3",
"jquery": "^3.3.1",
"moment": "^2.22.1",
"moment-timezone": "^0.5.15",
"prop-types": "^15.6.1",
"react": "^16.3.2",
... ... @@ -47,6 +46,7 @@
"compression-webpack-plugin": "^1.1.11",
"copy-webpack-plugin": "^4.5.1",
"css-loader": "^0.28.11",
"dayjs": "^1.7.7",
"file-loader": "^1.1.11",
"html-webpack-plugin": "^3.2.0",
"html-withimg-loader": "^0.1.16",
... ...
... ... @@ -2006,6 +2006,10 @@ dateformat@^3.0.3:
version "3.0.3"
resolved "http://npm.yohops.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
dayjs@^1.7.7:
version "1.7.7"
resolved "http://npm.yohops.com/dayjs/-/dayjs-1.7.7.tgz#8df20f78ac2476e3f5348ef49f8f22ebc3016370"
debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
resolved "http://npm.yohops.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
... ... @@ -3943,7 +3947,7 @@ moment-timezone@^0.5.15:
dependencies:
moment ">= 2.9.0"
"moment@>= 2.9.0", moment@^2.22.1:
"moment@>= 2.9.0":
version "2.22.2"
resolved "http://npm.yohops.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
... ...