|
@@ -65,6 +65,7 @@
|
|
<script>
|
|
<script>
|
|
import PickerColor from "./color-picker.vue"
|
|
import PickerColor from "./color-picker.vue"
|
|
import config from '@/config'
|
|
import config from '@/config'
|
|
|
|
+ import {getToken} from '@/utils/auth'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
PickerColor
|
|
PickerColor
|
|
@@ -97,6 +98,9 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ headers: {
|
|
|
|
+ Authorization: "Bearer " + getToken()
|
|
|
|
+ },
|
|
currentTab: 0,
|
|
currentTab: 0,
|
|
curColor: '#000000',
|
|
curColor: '#000000',
|
|
show: true,
|
|
show: true,
|
|
@@ -257,8 +261,6 @@
|
|
sourceType: ['album'],
|
|
sourceType: ['album'],
|
|
sizeType: 'compressed',
|
|
sizeType: 'compressed',
|
|
success: (chooseImageRes) => {
|
|
success: (chooseImageRes) => {
|
|
- console.log("this.api",this.api)
|
|
|
|
- console.log("this.photoUrl",this.photoUrl)
|
|
|
|
const tempFilePaths = chooseImageRes.tempFiles[0].tempFilePath;
|
|
const tempFilePaths = chooseImageRes.tempFiles[0].tempFilePath;
|
|
console.log(tempFilePaths)
|
|
console.log(tempFilePaths)
|
|
if (!this.api || !this.photoUrl) {
|
|
if (!this.api || !this.photoUrl) {
|
|
@@ -277,6 +279,7 @@
|
|
url: this.photoUrl + this.api,
|
|
url: this.photoUrl + this.api,
|
|
filePath: tempFilePaths,
|
|
filePath: tempFilePaths,
|
|
name: this.name,
|
|
name: this.name,
|
|
|
|
+ header: this.headers,
|
|
formData: {},
|
|
formData: {},
|
|
success: (uploadFileRes) => {
|
|
success: (uploadFileRes) => {
|
|
var obj = JSON.parse(uploadFileRes.data)
|
|
var obj = JSON.parse(uploadFileRes.data)
|