Browse Source

fix: show all activity categories in detail

Developer 2 tuần trước cách đây
mục cha
commit
1a2a60081a

BIN
dist.zip


+ 5 - 4
src/views/modules/activity/detail.vue

@@ -141,10 +141,11 @@ export default {
       organizerOptions: [],
       tidx: 1,
       basicForm: {
-        id: '',
-        typeId: '',
-        categoryId: '',
-        activityName: '',
+        id: '',
+        typeId: '',
+        categoryId: '',
+        categoryIds: '',
+        activityName: '',
         signupStartEnd: [],
         signupStartTime: '',
         signupEndTime: '',

+ 1 - 0
tests/activity-detail-category.test.js

@@ -9,6 +9,7 @@ test('活动详情页展示全部多选活动分类并兼容旧数据', () => {
   const source = fs.readFileSync(detailFile, 'utf8')
 
   assert.match(source, /getCategoryNames\(basicForm\)/)
+  assert.match(source, /basicForm:\s*\{[\s\S]*categoryIds:\s*['"]['"]/)
   assert.match(source, /categoryIds/)
   assert.match(source, /categoryId/)
   assert.match(source, /join\(['"]、['"]\)/)