Skip to content

Commit 1af4648

Browse files
authored
Merge pull request #200 from yuchenyao/dev-0.9.0
modify workspaceId format
2 parents ae69b3e + 64e18e7 commit 1af4648

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

web/src/js/module/project/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default {
216216
return item.id === projectData.taxonomyID;
217217
});
218218
if (this.checkName(projectList[0].dssProjectList, projectData.name, projectData.id)) return this.$Message.warning(this.$t('message.project.nameUnrepeatable'));
219-
projectData.workspaceId = this.workspaceId;
219+
projectData.workspaceId = Number(this.workspaceId);
220220
this.loading = true;
221221
if (this.actionType === 'add') {
222222
api.fetch('/dss/addProject', projectData, 'post').then(() => {

web/src/js/view/newhome/module/workspace/index.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export default {
157157
],
158158
total: null,
159159
pageSize: 4,
160+
videoSize: 4,
160161
pageNum: 1,
161162
videosClick: 1,
162163
videosMaxClick: null,
@@ -271,17 +272,17 @@ export default {
271272
changeVideos() {
272273
this.videosClick += 1;
273274
this.videosClick = this.videosClick > this.videosMaxClick ? 1 : this.videosClick;
274-
const start = ( this.videosClick - 1 ) * this.pageSize;
275-
const end = this.videosClick * this.pageSize;
275+
const start = ( this.videosClick - 1 ) * this.videoSize;
276+
const end = this.videosClick * this.videoSize;
276277
this.videos = this.videoCache.slice(start, end);
277278
},
278279
initVideos() {
279280
const videosTotal = this.videoCache.length;
280-
this.videosMaxClick = Math.ceil(videosTotal / this.pageSize);
281-
if (videosTotal < this.pageSize) {
281+
this.videosMaxClick = Math.ceil(videosTotal / this.videoSize);
282+
if (videosTotal < this.videoSize) {
282283
this.videos = this.videoCache;
283284
} else {
284-
this.videos = this.videoCache.slice(0, this.pageSize);
285+
this.videos = this.videoCache.slice(0, this.videoSize);
285286
}
286287
},
287288
play(item) {

0 commit comments

Comments
 (0)