Commit 82296985 by Jianli Ou

日期格式问题处理

parent 2cdf3fe6
File added
...@@ -16,7 +16,7 @@ var env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ...@@ -16,7 +16,7 @@ var env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate(); var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate();
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours(); var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours();
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes(); var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes();
version = yy + MM + DD + h + mm; version = `${yy}${MM}${DD}${h}${mm}`
versionPath = distPath + '/' + version; versionPath = distPath + '/' + version;
})(); })();
......
...@@ -3401,6 +3401,11 @@ ...@@ -3401,6 +3401,11 @@
"integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==",
"dev": true "dev": true
}, },
"dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
},
"de-indent": { "de-indent": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz",
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"axios": "0.17.1", "axios": "0.17.1",
"babel-plugin-component": "0.10.1", "babel-plugin-component": "0.10.1",
"babel-polyfill": "6.26.0", "babel-polyfill": "6.26.0",
"dayjs": "^1.11.13",
"element-ui": "2.8.2", "element-ui": "2.8.2",
"gulp": "4.0.2", "gulp": "4.0.2",
"gulp-concat": "2.6.1", "gulp-concat": "2.6.1",
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<script> <script>
import { piclevelList } from '@/utils' import { piclevelList } from '@/utils'
import Ueditor from '../temps/ueditor' import Ueditor from '../temps/ueditor'
import dayjs from 'dayjs'
export default { export default {
components: { components: {
Ueditor Ueditor
...@@ -100,7 +101,8 @@ export default { ...@@ -100,7 +101,8 @@ export default {
levels: 1, levels: 1,
fileurl: '', fileurl: '',
content: '', content: '',
showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`, // showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`,
showtime: `${dayjs().format('YYYY-MM-DD')}`,
announcetype: '' announcetype: ''
}, },
typeList: [ typeList: [
......
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
<el-form-item label="显示时间:" prop="showtime"> <el-form-item label="显示时间:" prop="showtime">
<el-date-picker <el-date-picker
v-show="!showInfo" v-show="!showInfo"
v-model="dataForm.showtime" v-model="dataForm.showtime"
value-format='yyyy-MM-dd' value-format='yyyy-MM-dd'
type="date" type="date"
...@@ -129,6 +128,7 @@ ...@@ -129,6 +128,7 @@
<script> <script>
import { piclevelList } from '@/utils' import { piclevelList } from '@/utils'
import Ueditor from '../temps/ueditor' import Ueditor from '../temps/ueditor'
import dayjs from 'dayjs'
export default { export default {
components: { components: {
Ueditor Ueditor
...@@ -157,7 +157,8 @@ export default { ...@@ -157,7 +157,8 @@ export default {
pic: '', pic: '',
content: '', content: '',
ishead: 0, ishead: 0,
showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`, // showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`,
showtime: `${dayjs().format('YYYY-MM-DD')}`,
classid: '', classid: '',
cclassid: '' cclassid: ''
}, },
......
...@@ -126,6 +126,7 @@ ...@@ -126,6 +126,7 @@
<script> <script>
import { piclevelList } from '@/utils' import { piclevelList } from '@/utils'
import Ueditor from '../temps/ueditor' import Ueditor from '../temps/ueditor'
import dayjs from 'dayjs'
export default { export default {
components: { components: {
Ueditor Ueditor
...@@ -155,7 +156,8 @@ export default { ...@@ -155,7 +156,8 @@ export default {
clanguage: '', clanguage: '',
brief: '', brief: '',
wavname: '', wavname: '',
showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}` // showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`
showtime: `${dayjs().format('YYYY-MM-DD')}`
}, },
cclassidStr: undefined, cclassidStr: undefined,
dataRule: { dataRule: {
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
<script> <script>
import { piclevelList } from '@/utils' import { piclevelList } from '@/utils'
import Ueditor from '../temps/ueditor' import Ueditor from '../temps/ueditor'
import dayjs from 'dayjs'
export default { export default {
components: { components: {
Ueditor Ueditor
...@@ -126,7 +127,8 @@ export default { ...@@ -126,7 +127,8 @@ export default {
categoryid: '', categoryid: '',
newtmpid: '', newtmpid: '',
levels: 1, levels: 1,
showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`, // showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`,
showtime: `${dayjs().format('YYYY-MM-DD')}`,
ppath: '', ppath: '',
content: '', content: '',
shortcontent: '', shortcontent: '',
......
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
<script> <script>
import { piclevelList } from '@/utils' import { piclevelList } from '@/utils'
import dayjs from 'dayjs'
export default { export default {
data () { data () {
return { return {
...@@ -121,7 +122,8 @@ export default { ...@@ -121,7 +122,8 @@ export default {
status: '', status: '',
keyword: '', keyword: '',
jumppath: '', jumppath: '',
showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}` // showtime: `${new Date().getFullYear()}-${new Date().getMonth() + 1}-${new Date().getDate()}`
showtime: `${dayjs().format('YYYY-MM-DD')}`
}, },
piclevelList, piclevelList,
pictureTypeList: [ pictureTypeList: [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment