|
@@ -294,10 +294,10 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-form-item label="课程封面" prop="imgUrl">
|
|
<el-form-item label="课程封面" prop="imgUrl">
|
|
|
- <ImageUpload v-model="form.imgUrl" type="image" :num="10" :width="150" :height="150"/>
|
|
|
|
|
|
|
+ <ImageUpload v-model="form.imgUrl" :headers="uploadHeaders" type="image" :num="10" :width="150" :height="150"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="小封面" prop="imgUrl">
|
|
<el-form-item label="小封面" prop="imgUrl">
|
|
|
- <ImageUpload v-model="form.secondImg" type="image" :num="10" :width="150" :height="150"/>
|
|
|
|
|
|
|
+ <ImageUpload v-model="form.secondImg" :headers="uploadHeaders" type="image" :num="10" :width="150" :height="150"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -464,6 +464,7 @@ import {listBySearch} from "@/api/course/userTalent";
|
|
|
import userCourseCatalogDetails from '../../components/course/userCourseCatalogDetails.vue';
|
|
import userCourseCatalogDetails from '../../components/course/userCourseCatalogDetails.vue';
|
|
|
import {getAllCourseCategoryList, getCatePidList, getCateListByPid} from "@/api/course/userCourseCategory";
|
|
import {getAllCourseCategoryList, getCatePidList, getCateListByPid} from "@/api/course/userCourseCategory";
|
|
|
import {allList} from "@/api/company/company";
|
|
import {allList} from "@/api/company/company";
|
|
|
|
|
+import { getToken, getTenantCode } from '@/utils/auth'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "UserCoursePublic",
|
|
name: "UserCoursePublic",
|
|
@@ -594,6 +595,19 @@ export default {
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ uploadHeaders() {
|
|
|
|
|
+ const token = getToken()
|
|
|
|
|
+ const headers = {
|
|
|
|
|
+ 'X-Frontend-Type': 'admin',
|
|
|
|
|
+ 'tenant-code': getTenantCode()
|
|
|
|
|
+ }
|
|
|
|
|
+ if (token) {
|
|
|
|
|
+ headers.Authorization = 'Bearer ' + token
|
|
|
|
|
+ }
|
|
|
|
|
+ return headers
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
getCatePidList().then(response => {
|
|
getCatePidList().then(response => {
|