Commit f3e11dab by 杨明

fixed

1 parent 17db9af8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-08-21 11:35:26 * @Date: 2023-08-21 11:35:26
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-21 16:25:51 * @LastEditTime: 2023-08-22 15:45:33
* @FilePath: \scrm-micro-marketing\src\api\glsxUpload.js * @FilePath: \scrm-micro-marketing\src\api\glsxUpload.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -36,63 +36,63 @@ class GlsxUpload { ...@@ -36,63 +36,63 @@ class GlsxUpload {
constructor(params) { constructor(params) {
this.initParam = params this.initParam = params
} }
// init() { init() {
// return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// if (this.tcVod) return resolve({ status: 0, msg: 'init successful' }) if (this.tcVod) return resolve({ status: 0, msg: 'init successful' })
// const { params: { data, url } = {} } = this.initParam || {} const { params: { data, url } = {} } = this.initParam || {}
// console.log(data) console.log(data)
// return http({ return http({
// data, data,
// url: url, url: url,
// returnAll: true returnAll: true
// }) })
// .then(res => { .then(res => {
// if (res.code == '0') { if (res.code == '0') {
// this.tcVod = new TcVod({ this.tcVod = new TcVod({
// getSignature: () => { getSignature: () => {
// return res.data return res.data
// } }
// }) })
// } }
// if (this.tcVod) return resolve({ status: 0, msg: 'init successful' }) if (this.tcVod) return resolve({ status: 0, msg: 'init successful' })
// reject({ status: -1, msg: 'init failed' }) reject({ status: -1, msg: 'init failed' })
// }) })
// .catch(err => { .catch(err => {
// reject({ status: -1, msg: 'init failed' }) reject({ status: -1, msg: 'init failed' })
// }) })
// }) })
// } }
// uploaded(file, img) { uploaded(file, img) {
// return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// if (!file) return reject({ status: -1, msg: 'file is required' }) if (!file) return reject({ status: -1, msg: 'file is required' })
// let params = { let params = {
// mediaFile: file mediaFile: file
// } }
// if (img) params.coverFile = img if (img) params.coverFile = img
// this.uploader = this.tcVod.upload(params) this.uploader = this.tcVod.upload(params)
// this.uploader this.uploader
// .done() .done()
// .then(doneResult => { .then(doneResult => {
// resolve(doneResult) resolve(doneResult)
// }) })
// .catch(err => { .catch(err => {
// reject(err) reject(err)
// }) })
// }) })
// } }
// uploadEvent(eventType, callback) { uploadEvent(eventType, callback) {
// if (!eventType) callback({ status: -1, msg: 'eventType is required' }) if (!eventType) callback({ status: -1, msg: 'eventType is required' })
// try { try {
// this.uploader.on(eventType, info => { this.uploader.on(eventType, info => {
// callback(info) callback(info)
// }) })
// } catch (err) { } catch (err) {
// callback(err) callback(err)
// } }
// } }
// uploadCancel() { uploadCancel() {
// this.uploader.cancel() this.uploader.cancel()
// } }
} }
export default GlsxUpload export default GlsxUpload
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!