修正新建活动时, 没有将店铺所选分类带过来的bug

This commit is contained in:
zhl 2021-05-08 16:28:06 +08:00
parent 6108f3ce82
commit 92a0e18abf

View File

@ -368,7 +368,7 @@ import Sticky from '@/components/Sticky/index.vue'
import UploadImage from '@/components/UploadImage/index.vue' import UploadImage from '@/components/UploadImage/index.vue'
import RegionPicker from '@/components/RegionPicker/index.vue' import RegionPicker from '@/components/RegionPicker/index.vue'
import Tinymce from '@/components/Tinymce/index.vue' import Tinymce from '@/components/Tinymce/index.vue'
import { getShops } from '@/api/shop' import { getMyShop, getShops } from '@/api/shop'
import { import {
defaultActivityData, defaultActivityData,
defaultRewardData, defaultRewardData,
@ -490,6 +490,7 @@ export default class extends Vue {
await this.getRemoteDeptList() await this.getRemoteDeptList()
} else { } else {
this.postForm.shop = UserModule.department this.postForm.shop = UserModule.department
await this.fetchMyShop()
} }
this.tempTagView = Object.assign({}, this.$route) this.tempTagView = Object.assign({}, this.$route)
@ -593,6 +594,13 @@ export default class extends Vue {
this.allDepts = data.records this.allDepts = data.records
} }
private async fetchMyShop() {
const { data } = await getMyShop()
this.typeSelected = data.qtypes
console.log(this.typeSelected)
this.$refs.typeTree.setCheckedKeys(this.typeSelected)
}
private dataChange(_: any) { private dataChange(_: any) {
console.log(this.selectDate) console.log(this.selectDate)
} }