Bladeren bron

adjust time

EthnaYeh 6 jaren geleden
bovenliggende
commit
d24c7eea63

+ 6 - 6
src/views/agnetManagement/gambleMemberManagement/index.vue

@@ -158,22 +158,22 @@ export default {
158 158
       listQuery: {
159 159
         // page: 1,
160 160
         // limit: 20,
161
-        startAt: moment.utc(moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
162
-        endAt: moment.utc(moment().day(7).hour(11).minute(59).second(59)).format()
161
+        startAt: moment.utc(moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
162
+        endAt: moment.utc(moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)).format()
163 163
       },
164 164
       pickerOptions: {
165 165
         shortcuts: [{
166 166
           text: '本週',
167 167
           onClick(picker) {
168
-            const end = moment().day(7).hour(11).minute(59).second(59)
169
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
168
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
169
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
170 170
             picker.$emit('pick', [start, end])
171 171
           }
172 172
         }, {
173 173
           text: '上週',
174 174
           onClick(picker) {
175
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
176
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
175
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
176
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
177 177
             picker.$emit('pick', [start, end])
178 178
           }
179 179
         }]

+ 2 - 2
src/views/agnetManagement/index.vue

@@ -84,8 +84,8 @@ export default {
84 84
       listQuery: {
85 85
         page: 1,
86 86
         limit: 20,
87
-        startAt: moment.utc(moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
88
-        endAt: moment.utc(moment().day(7).hour(11).minute(59).second(59)).format()
87
+        startAt: moment.utc(moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)).format(),
88
+        endAt: moment.utc(moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)).format()
89 89
       },
90 90
       dialogCreateFormVisible: false,
91 91
       dialogStatus: '',

+ 4 - 4
src/views/gambleGameBucket/index.vue

@@ -80,15 +80,15 @@ export default {
80 80
         shortcuts: [{
81 81
           text: '本週',
82 82
           onClick(picker) {
83
-            const end = moment().day(7).hour(11).minute(59).second(59)
84
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
83
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
84
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
85 85
             picker.$emit('pick', [start, end])
86 86
           }
87 87
         }, {
88 88
           text: '上週',
89 89
           onClick(picker) {
90
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
91
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
90
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
91
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
92 92
             picker.$emit('pick', [start, end])
93 93
           }
94 94
         }]

+ 4 - 4
src/views/room/chipsHistory/index.vue

@@ -83,15 +83,15 @@ export default {
83 83
         shortcuts: [{
84 84
           text: '本週',
85 85
           onClick(picker) {
86
-            const end = moment().day(7).hour(11).minute(59).second(59)
87
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
86
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
87
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
88 88
             picker.$emit('pick', [start, end])
89 89
           }
90 90
         }, {
91 91
           text: '上週',
92 92
           onClick(picker) {
93
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
94
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
93
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
94
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
95 95
             picker.$emit('pick', [start, end])
96 96
           }
97 97
         }]

+ 4 - 4
src/views/room/gameHistory/index.vue

@@ -126,15 +126,15 @@ export default {
126 126
         shortcuts: [{
127 127
           text: '本週',
128 128
           onClick(picker) {
129
-            const end = moment().day(7).hour(11).minute(59).second(59)
130
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
129
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
130
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
131 131
             picker.$emit('pick', [start, end])
132 132
           }
133 133
         }, {
134 134
           text: '上週',
135 135
           onClick(picker) {
136
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
137
-            const startAt = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
136
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
137
+            const startAt = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
138 138
             picker.$emit('pick', [start, end])
139 139
           }
140 140
         }]

+ 4 - 4
src/views/studio/index.vue

@@ -58,15 +58,15 @@ export default {
58 58
         shortcuts: [{
59 59
           text: '本週',
60 60
           onClick(picker) {
61
-            const end = moment().day(7).hour(11).minute(59).second(59)
62
-            const start = moment().subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
61
+            const end = moment().startOf('isoweek').day(7).hour(11).minute(59).second(59)
62
+            const start = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(16).minute(0).second(0)
63 63
             picker.$emit('pick', [start, end])
64 64
           }
65 65
         }, {
66 66
           text: '上週',
67 67
           onClick(picker) {
68
-            const end = moment().subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
69
-            const start = moment().subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
68
+            const end = moment().startOf('isoweek').subtract(1, 'weeks').day(7).hour(11).minute(59).second(59)
69
+            const start = moment().startOf('isoweek').subtract(2, 'weeks').day(7).hour(16).minute(0).second(0)
70 70
             picker.$emit('pick', [start, end])
71 71
           }
72 72
         }]