migrate vuex modules

This commit is contained in:
AceDataCloud committed 2023-12-28 03:11:04 +08:00
1 parent 9c5ce9acf3
commit f39e155301
17 files changed
+177 -133

No files matched your search

+2 -2
View File
@@ -64,8 +64,8 @@ export default defineComponent({
preset: {
handler(val) {
this.$emit('update:modelValue', val);
this.$store.dispatch('setMidjourney', {
preset: val
this.$store.dispatch('midjourney/setPreset', {
...val
});
},
deep: true,
+1 -1
View File
@@ -50,7 +50,7 @@ export default defineComponent({
computed: {
headers() {
return {
Authorization: `Bearer ${this.$store.state.token.access}`
Authorization: `Bearer ${this.$store.state.common.token.access}`
};
},
urls() {
@@ -79,7 +79,7 @@ export default defineComponent({
const {
data: { items: apiUsages }
} = await apiUsageOperator.getAll({
user_id: this.$store.state.user.id,
user_id: this.$store.state.common.user.id,
application_id: this.applications?.map((application) => application.id),
offset: 0,
limit: 5,
@@ -116,7 +116,7 @@ export default defineComponent({
const {
data: { items: apiUsages, count }
} = await apiUsageOperator.getAll({
user_id: this.$store.state.user.id,
user_id: this.$store.state.common.user.id,
application_id: this.applications?.map((application) => application.id),
offset: (this.page - 1) * this.limit,
limit: this.limit,