-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vote): refactor vote engine init process
- Loading branch information
1 parent
ad110a4
commit c3c7a3d
Showing
8 changed files
with
71 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +0,0 @@ | ||
import Mock from 'mockjs'; | ||
import setupMock from '@/utils/setupMock'; | ||
|
||
setupMock({ | ||
setup: () => { | ||
// Mock.mock(new RegExp('/admin/v1/businesses'), () => { | ||
// return [ | ||
// { | ||
// title: '评论点赞', | ||
// business_id: 'COMMENT_LIKE', | ||
// type: 'SIMPLE_VOTE', | ||
// }, | ||
// { | ||
// title: '评论点踩', | ||
// business_id: 'COMMENT_UNLIKE', | ||
// type: 'SIMPLE_VOTE', | ||
// }, | ||
// ]; | ||
// }); | ||
|
||
Mock.mock(new RegExp('/admin/v1/vote_system'), () => { | ||
return [ | ||
{ | ||
id: 'SIMPLE_VOTE', | ||
feature: ['vote', 'unvote','vote_count'], | ||
qps: 100, | ||
}, | ||
]; | ||
}); | ||
|
||
// create and update | ||
// Mock.mock(new RegExp('/admin/v1/business'), () => { | ||
// return { | ||
// code: 0, | ||
// }; | ||
// }); | ||
|
||
}, | ||
}); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package domain | ||
|
||
const ( | ||
SimpleVote string = "SIMPLE_VOTE" | ||
|
||
MiddleVote string = "MIDDLE_VOTE" | ||
) | ||
|
||
type Feature struct { | ||
Features []string | ||
} | ||
|
||
type Require struct { | ||
Database map[string]int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters