Commit 824a831b by 杨明

fixed

1 parent ec761d38
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-23 17:38:30
* @LastEditTime: 2023-02-27 17:56:47
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
......@@ -20,8 +20,8 @@ export const fetchConfig = function(isEnv = true) {
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
// return new Http().get('https://oss-config.test.glsx.com.cn/mock/6351298f6a118b4ff787ef2b/live/config')
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6324135a4edfe442ee0530ae/live/config')
return new Http().get('https://oss-config.test.glsx.com.cn/mock/6351298f6a118b4ff787ef2b/live/config')
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/6324135a4edfe442ee0530ae/live/config')
}
export const config = {
install(vue, cfg) {
......
......@@ -144,8 +144,11 @@ export default {
reader.readAsDataURL(fileInfo)
reader.onload = e => {
const imgFile = e.target.result
const base64 = fileInfo.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.$apis.common.pictureUpload({ file: base64 }).then(res => {
const arrBase64 = imgFile.split(',')
const fileName = fileInfo.name.split('.')
//fileUrl: 文件名 + @ + base64拼接
const fileUrl = fileName.pop() + '@' + arrBase64[1]
this.$apis.common.pictureUpload({ file: fileUrl }).then(res => {
this.$refs['uploadForm'].clearValidate('coverUrl')
this.$set(this.uploadForm, 'coverUrl', res)
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!