|
@@ -886,15 +886,20 @@ export default {
|
|
|
//初始绘画区域是画布自身的宽度也就是屏幕宽度
|
|
//初始绘画区域是画布自身的宽度也就是屏幕宽度
|
|
|
let drawWidth = uni.getSystemInfoSync().windowWidth
|
|
let drawWidth = uni.getSystemInfoSync().windowWidth
|
|
|
let that = this
|
|
let that = this
|
|
|
|
|
+ let token = uni.getStorageSync("shopToken");
|
|
|
getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
|
|
getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
|
|
|
- uni.showLoading({
|
|
|
|
|
- title: '上传中'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // uni.showLoading({
|
|
|
|
|
+ // title: '上传中'
|
|
|
|
|
+ // })
|
|
|
uni.uploadFile({
|
|
uni.uploadFile({
|
|
|
- url: that.config('APIHOST1') + '/alioss/upload',
|
|
|
|
|
|
|
+ url: that.config('APIHOST1') + '/admin/new-file/upload',
|
|
|
filePath: resPath,
|
|
filePath: resPath,
|
|
|
|
|
+ header: {
|
|
|
|
|
+ token: token
|
|
|
|
|
+ },
|
|
|
name: 'file',
|
|
name: 'file',
|
|
|
success: (uploadFileRes) => {
|
|
success: (uploadFileRes) => {
|
|
|
|
|
+ console.log(uploadFileRes,'l')
|
|
|
if (e == 1) {
|
|
if (e == 1) {
|
|
|
if (that.goodsPicture.length < 6) {
|
|
if (that.goodsPicture.length < 6) {
|
|
|
that.goodsPicture.push(JSON.parse(uploadFileRes.data).data)
|
|
that.goodsPicture.push(JSON.parse(uploadFileRes.data).data)
|
|
@@ -936,15 +941,20 @@ export default {
|
|
|
//初始绘画区域是画布自身的宽度也就是屏幕宽度
|
|
//初始绘画区域是画布自身的宽度也就是屏幕宽度
|
|
|
let drawWidth = uni.getSystemInfoSync().windowWidth
|
|
let drawWidth = uni.getSystemInfoSync().windowWidth
|
|
|
let that = this
|
|
let that = this
|
|
|
|
|
+ let token = uni.getStorageSync("shopToken");
|
|
|
getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
|
|
getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
|
|
|
- uni.showLoading({
|
|
|
|
|
- title: '上传中'
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // uni.showLoading({
|
|
|
|
|
+ // title: '上传中'
|
|
|
|
|
+ // })
|
|
|
uni.uploadFile({
|
|
uni.uploadFile({
|
|
|
- url: that.config('APIHOST1') + '/alioss/upload',
|
|
|
|
|
|
|
+ url: that.config('APIHOST1') + '/admin/new-file/upload',
|
|
|
filePath: resPath,
|
|
filePath: resPath,
|
|
|
|
|
+ header: {
|
|
|
|
|
+ token: token
|
|
|
|
|
+ },
|
|
|
name: 'file',
|
|
name: 'file',
|
|
|
success: (uploadFileRes) => {
|
|
success: (uploadFileRes) => {
|
|
|
|
|
+ console.log(uploadFileRes,'l')
|
|
|
if (e == 1) {
|
|
if (e == 1) {
|
|
|
that.shop.goodsCover = JSON.parse(uploadFileRes.data).data
|
|
that.shop.goodsCover = JSON.parse(uploadFileRes.data).data
|
|
|
}
|
|
}
|