diff --git a/src/api/exam.ts b/src/api/exam.ts
index 68177ae..40a9add 100644
--- a/src/api/exam.ts
+++ b/src/api/exam.ts
@@ -19,6 +19,7 @@ export interface IExamData {
icon?: string
banner?: string
qtypes: string[]
+ shopCates: string[]
qcount: number
timeone: number
beginTime: number
@@ -40,6 +41,7 @@ export const defaultExamData: IExamData = {
shop: '',
source: 0,
rewardInfo: [],
+ shopCates: [],
questions: []
}
diff --git a/src/views/activity/list.vue b/src/views/activity/list.vue
index 731d5d3..89657f5 100644
--- a/src/views/activity/list.vue
+++ b/src/views/activity/list.vue
@@ -137,9 +137,9 @@ import Pagination from '@/components/Pagination/index.vue'
import { getShops } from '@/api/shop'
import { parseTime } from '@/utils'
import { getAllCategory, getAllTags } from '@/api/question'
-import { deleteActivity, getActivitys, publishActivity, IActivityData } from '@/api/activity'
+import { deleteActivity, getActivitys, IActivityData, publishActivity } from '@/api/activity'
import { UserModule } from '@/store/modules/user'
-import { EVENT_ACTIVITY_UPDATE, EVENT_SHOP_PUZZLES_UPDATE, EVENT_SHOP_UPDATE, EventBus } from '@/utils/event-bus'
+import { EVENT_ACTIVITY_UPDATE, EVENT_SHOP_UPDATE, EventBus } from '@/utils/event-bus'
@Component({
name: 'ActivityList',
diff --git a/src/views/exam/edit.vue b/src/views/exam/edit.vue
index b6727b4..edf8268 100644
--- a/src/views/exam/edit.vue
+++ b/src/views/exam/edit.vue
@@ -142,6 +142,24 @@
>
系统题库
自定义题库
+ {{$t('main.shop')}}题库
+
+
+
+
+
0) {
@@ -671,6 +693,15 @@ export default class extends Vue {
this.postForm.banner = imgUrl
this.$forceUpdate()
}
+
+ private async getRemoteShopCategory() {
+ try {
+ const { data } = await getShopCategory(this.postForm.shop)
+ this.shopCates = data
+ this.$forceUpdate()
+ } catch (err) {
+ }
+ }
}
diff --git a/src/views/exam/list.vue b/src/views/exam/list.vue
index 48225dd..f3b4d81 100644
--- a/src/views/exam/list.vue
+++ b/src/views/exam/list.vue
@@ -138,6 +138,7 @@ import { getAllCategory, getAllTags, IQuestionData } from '@/api/question'
import { deleteExam, getExams } from '@/api/exam'
import { UserModule } from '@/store/modules/user'
import { EVENT_EXAM_UPDATE, EVENT_SHOP_PUZZLES_UPDATE, EVENT_SHOP_UPDATE, EventBus } from '@/utils/event-bus'
+import i18n from '@/lang'
@Component({
name: 'ExamList',
@@ -298,8 +299,15 @@ export default class extends Vue {
return cellValue ? '是' : '否'
}
- private formatSource(row: number, column: number, cellValue: boolean) {
- return cellValue ? '自定义' : '系统'
+ private formatSource(row: number, column: number, cellValue: number) {
+ switch (cellValue) {
+ case 0:
+ return '系统题库'
+ case 1:
+ return '自定义'
+ case 2:
+ return i18n.tc('main.shop') + '题库'
+ }
}
}
diff --git a/src/views/question/shop_puzzle_editor.vue b/src/views/question/shop_puzzle_editor.vue
index a1eb4cd..765dd0e 100644
--- a/src/views/question/shop_puzzle_editor.vue
+++ b/src/views/question/shop_puzzle_editor.vue
@@ -107,7 +107,6 @@
allow-create
default-first-option
style="width: 50%"
- @change="tagChange"
placeholder="请选择">