Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ad02ccd7
authored
Aug 22, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
e019a82a
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
365 additions
and
141 deletions
package-lock.json
package.json
src/api/glsxUpload.js
src/setup/qiankun.js
src/views/material/addMaterial.vue
src/views/material/components/MaterialView.vue
val.name
vue.config.js
package-lock.json
View file @
ad02ccd
...
@@ -2557,9 +2557,9 @@
...
@@ -2557,9 +2557,9 @@
}
}
},
},
"@xmldom/xmldom"
:
{
"@xmldom/xmldom"
:
{
"version"
:
"0.8.
6
"
,
"version"
:
"0.8.
10
"
,
"resolved"
:
"https://registry.npm
mirror.com/@xmldom/xmldom/-/xmldom-0.8.6
.tgz"
,
"resolved"
:
"https://registry.npm
js.org/@xmldom/xmldom/-/xmldom-0.8.10
.tgz"
,
"integrity"
:
"sha512-
uRjjusqpoqfmRkTaNuLJ2VohVr67Q5YwDATW3VU7PfzTj6IRaihGrYI7zckGZjxQPBIp63nfvJbM+Yu5ICh0Bg
=="
"integrity"
:
"sha512-
2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw
=="
},
},
"@xtuc/ieee754"
:
{
"@xtuc/ieee754"
:
{
"version"
:
"1.2.0"
,
"version"
:
"1.2.0"
,
...
@@ -3067,11 +3067,25 @@
...
@@ -3067,11 +3067,25 @@
"integrity"
:
"sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
"integrity"
:
"sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
},
},
"axios"
:
{
"axios"
:
{
"version"
:
"
0.21.4
"
,
"version"
:
"
1.4.0
"
,
"resolved"
:
"https://registry.npm
mirror.com/axios/-/axios-0.21.4
.tgz"
,
"resolved"
:
"https://registry.npm
js.org/axios/-/axios-1.4.0
.tgz"
,
"integrity"
:
"sha512-
ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg
=="
,
"integrity"
:
"sha512-
S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA
=="
,
"requires"
:
{
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
"follow-redirects"
:
"^1.15.0"
,
"form-data"
:
"^4.0.0"
,
"proxy-from-env"
:
"^1.1.0"
},
"dependencies"
:
{
"form-data"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz"
,
"integrity"
:
"sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww=="
,
"requires"
:
{
"asynckit"
:
"^0.4.0"
,
"combined-stream"
:
"^1.0.8"
,
"mime-types"
:
"^2.1.12"
}
}
}
}
},
},
"babel-eslint"
:
{
"babel-eslint"
:
{
...
@@ -4609,9 +4623,9 @@
...
@@ -4609,9 +4623,9 @@
"integrity"
:
"sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
"integrity"
:
"sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
},
},
"cos-js-sdk-v5"
:
{
"cos-js-sdk-v5"
:
{
"version"
:
"1.4.
14
"
,
"version"
:
"1.4.
20
"
,
"resolved"
:
"https://registry.npm
mirror.com/cos-js-sdk-v5/-/cos-js-sdk-v5-1.4.14
.tgz"
,
"resolved"
:
"https://registry.npm
js.org/cos-js-sdk-v5/-/cos-js-sdk-v5-1.4.20
.tgz"
,
"integrity"
:
"sha512-
nw4kQijqyXSzRElL9HAKGWA96SQk6Sfx/SvJrGra2cXo2L4ipL3Y0wNnH+Wga1f7iigun85+nIk9BrL5+iBJO
g=="
,
"integrity"
:
"sha512-
cGpmVoKN3iYBtWo8Lwp059fOrT4yyb/+I6fVS++Zyop/ZFJswDRkjnrASViwYd8N+hi3qWVAa6ruvvBsLutEw
g=="
,
"requires"
:
{
"requires"
:
{
"@xmldom/xmldom"
:
"^0.8.6"
"@xmldom/xmldom"
:
"^0.8.6"
}
}
...
@@ -7084,20 +7098,32 @@
...
@@ -7084,20 +7098,32 @@
}
}
},
},
"glsx-common"
:
{
"glsx-common"
:
{
"version"
:
"1.4.9"
,
"version"
:
"2.1.0"
,
"resolved"
:
"https://registry.npmmirror.com/glsx-common/-/glsx-common-1.4.9.tgz"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-2.1.0.tgz"
,
"integrity"
:
"sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg=="
,
"integrity"
:
"sha512-wlUFgrZkJODh5MNpnVaT2zswkep1BUnvRgyhUABp2mDrt7d8yemnrdDYCfuBSWT7LCn+httSEieOEtm2XSlc0Q=="
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"axios"
:
"^0.21.3"
,
"axios"
:
"^0.21.3"
,
"md5"
:
"^2.3.0"
,
"md5"
:
"^2.3.0"
,
"qs"
:
"^6.10.1"
,
"qs"
:
"^6.10.1"
,
"sha1"
:
"^1.1.1"
"sha1"
:
"^1.1.1"
},
"dependencies"
:
{
"axios"
:
{
"version"
:
"0.21.4"
,
"resolved"
:
"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz"
,
"integrity"
:
"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg=="
,
"dev"
:
true
,
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
}
}
}
}
},
},
"glsx-components"
:
{
"glsx-components"
:
{
"version"
:
"1.5.
3
"
,
"version"
:
"1.5.
7
"
,
"resolved"
:
"https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.
3
.tgz"
,
"resolved"
:
"https://registry.npmjs.org/glsx-components/-/glsx-components-1.5.
7
.tgz"
,
"integrity"
:
"sha512-
tj/2DSGKpbwrlP7ByBZQrgEgCcmrP2iR8p/BafY6BFr0/q4sJuxQx6of586rJuoVUasRveIIuFmUcLCkBSnQFA
=="
,
"integrity"
:
"sha512-
WEWt1Ev7uf8VgILrEr15ZHxOreqWEVEY2WRP5EmZKzYKTVF/7dQU/oI84+Xo4vSmlz7ltblaATyrwm1U1LDnHg
=="
,
"requires"
:
{
"requires"
:
{
"@amap/amap-jsapi-loader"
:
"^1.0.1"
,
"@amap/amap-jsapi-loader"
:
"^1.0.1"
,
"core-js"
:
"^3.6.5"
,
"core-js"
:
"^3.6.5"
,
...
@@ -7106,6 +7132,27 @@
...
@@ -7106,6 +7132,27 @@
"vue"
:
"^2.6.11"
,
"vue"
:
"^2.6.11"
,
"vue-amap"
:
"^0.5.10"
,
"vue-amap"
:
"^0.5.10"
,
"vuedraggable"
:
"^2.24.3"
"vuedraggable"
:
"^2.24.3"
},
"dependencies"
:
{
"axios"
:
{
"version"
:
"0.21.4"
,
"resolved"
:
"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz"
,
"integrity"
:
"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg=="
,
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
}
},
"glsx-common"
:
{
"version"
:
"1.4.9"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz"
,
"integrity"
:
"sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg=="
,
"requires"
:
{
"axios"
:
"^0.21.3"
,
"md5"
:
"^2.3.0"
,
"qs"
:
"^6.10.1"
,
"sha1"
:
"^1.1.1"
}
}
}
}
},
},
"glsx-components_beta"
:
{
"glsx-components_beta"
:
{
...
@@ -7118,6 +7165,27 @@
...
@@ -7118,6 +7165,27 @@
"glsx-common"
:
"^1.3.2"
,
"glsx-common"
:
"^1.3.2"
,
"gulp"
:
"^4.0.2"
,
"gulp"
:
"^4.0.2"
,
"vue"
:
"^2.6.11"
"vue"
:
"^2.6.11"
},
"dependencies"
:
{
"axios"
:
{
"version"
:
"0.21.4"
,
"resolved"
:
"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz"
,
"integrity"
:
"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg=="
,
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
}
},
"glsx-common"
:
{
"version"
:
"1.4.9"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz"
,
"integrity"
:
"sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg=="
,
"requires"
:
{
"axios"
:
"^0.21.3"
,
"md5"
:
"^2.3.0"
,
"qs"
:
"^6.10.1"
,
"sha1"
:
"^1.1.1"
}
}
}
}
},
},
"graceful-fs"
:
{
"graceful-fs"
:
{
...
@@ -10885,6 +10953,11 @@
...
@@ -10885,6 +10953,11 @@
"ipaddr.js"
:
"1.9.1"
"ipaddr.js"
:
"1.9.1"
}
}
},
},
"proxy-from-env"
:
{
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz"
,
"integrity"
:
"sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"prr"
:
{
"prr"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz"
,
"resolved"
:
"https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz"
,
...
@@ -10954,9 +11027,9 @@
...
@@ -10954,9 +11027,9 @@
"dev"
:
true
"dev"
:
true
},
},
"qs"
:
{
"qs"
:
{
"version"
:
"6.11.
1
"
,
"version"
:
"6.11.
2
"
,
"resolved"
:
"https://registry.npm
mirror.com/qs/-/qs-6.11.1
.tgz"
,
"resolved"
:
"https://registry.npm
js.org/qs/-/qs-6.11.2
.tgz"
,
"integrity"
:
"sha512-
0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ
=="
,
"integrity"
:
"sha512-
tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA
=="
,
"requires"
:
{
"requires"
:
{
"side-channel"
:
"^1.0.4"
"side-channel"
:
"^1.0.4"
}
}
...
@@ -13579,7 +13652,7 @@
...
@@ -13579,7 +13652,7 @@
},
},
"vod-js-sdk-v6"
:
{
"vod-js-sdk-v6"
:
{
"version"
:
"1.5.0"
,
"version"
:
"1.5.0"
,
"resolved"
:
"https://registry.npm
mirror.com
/vod-js-sdk-v6/-/vod-js-sdk-v6-1.5.0.tgz"
,
"resolved"
:
"https://registry.npm
js.org
/vod-js-sdk-v6/-/vod-js-sdk-v6-1.5.0.tgz"
,
"integrity"
:
"sha512-WkMtV9MDxO//6SDQgw+QsbO3dskJwE8nmch2Wn3e4Oub5/eav6DMedFAHRjar+tt9WDLveO0YLxa3yVBQ2DHbQ=="
,
"integrity"
:
"sha512-WkMtV9MDxO//6SDQgw+QsbO3dskJwE8nmch2Wn3e4Oub5/eav6DMedFAHRjar+tt9WDLveO0YLxa3yVBQ2DHbQ=="
,
"requires"
:
{
"requires"
:
{
"axios"
:
"^0.21.1"
,
"axios"
:
"^0.21.1"
,
...
@@ -13587,6 +13660,16 @@
...
@@ -13587,6 +13660,16 @@
"eventemitter3"
:
"^4.0.7"
,
"eventemitter3"
:
"^4.0.7"
,
"js-sha1"
:
"^0.6.0"
,
"js-sha1"
:
"^0.6.0"
,
"uuid"
:
"^3.3.2"
"uuid"
:
"^3.3.2"
},
"dependencies"
:
{
"axios"
:
{
"version"
:
"0.21.4"
,
"resolved"
:
"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz"
,
"integrity"
:
"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg=="
,
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
}
}
}
}
},
},
"vue"
:
{
"vue"
:
{
...
@@ -14448,6 +14531,27 @@
...
@@ -14448,6 +14531,27 @@
"vue"
:
"^2.6.11"
,
"vue"
:
"^2.6.11"
,
"vue-amap"
:
"^0.5.10"
,
"vue-amap"
:
"^0.5.10"
,
"vuedraggable"
:
"^2.24.3"
"vuedraggable"
:
"^2.24.3"
},
"dependencies"
:
{
"axios"
:
{
"version"
:
"0.21.4"
,
"resolved"
:
"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz"
,
"integrity"
:
"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg=="
,
"requires"
:
{
"follow-redirects"
:
"^1.14.0"
}
},
"glsx-common"
:
{
"version"
:
"1.4.9"
,
"resolved"
:
"https://registry.npmjs.org/glsx-common/-/glsx-common-1.4.9.tgz"
,
"integrity"
:
"sha512-RQWGOGEXUPNmHkZn7n+eukkXp6L/mOfsgMo4gFtrt80ZDxGaznHMg7Isi4+IrEdvVdzp8Cju0eiCTddnZfdsJg=="
,
"requires"
:
{
"axios"
:
"^0.21.3"
,
"md5"
:
"^2.3.0"
,
"qs"
:
"^6.10.1"
,
"sha1"
:
"^1.1.1"
}
}
}
}
},
},
"word-wrap"
:
{
"word-wrap"
:
{
...
...
package.json
View file @
ad02ccd
...
@@ -8,11 +8,12 @@
...
@@ -8,11 +8,12 @@
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
},
},
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^1.4.0"
,
"core-js"
:
"^3.4.4"
,
"core-js"
:
"^3.4.4"
,
"dayjs"
:
"^1.10.7"
,
"dayjs"
:
"^1.10.7"
,
"el-tree-transfer"
:
"^2.2.6"
,
"el-tree-transfer"
:
"^2.2.6"
,
"element-ui"
:
"^2.4.5"
,
"element-ui"
:
"^2.4.5"
,
"glsx-components"
:
"^1.5.
3
"
,
"glsx-components"
:
"^1.5.
7
"
,
"glsx-components_beta"
:
"^1.0.4"
,
"glsx-components_beta"
:
"^1.0.4"
,
"lodash"
:
"^4.17.21"
,
"lodash"
:
"^4.17.21"
,
"node-sass"
:
"^4.0.0"
,
"node-sass"
:
"^4.0.0"
,
...
@@ -36,7 +37,7 @@
...
@@ -36,7 +37,7 @@
"eslint"
:
"^5.16.0"
,
"eslint"
:
"^5.16.0"
,
"eslint-plugin-prettier"
:
"^3.1.1"
,
"eslint-plugin-prettier"
:
"^3.1.1"
,
"eslint-plugin-vue"
:
"^5.0.0"
,
"eslint-plugin-vue"
:
"^5.0.0"
,
"glsx-common"
:
"^
1.4.9
"
,
"glsx-common"
:
"^
2.1.0
"
,
"node-sass"
:
"^4.12.0"
,
"node-sass"
:
"^4.12.0"
,
"prettier"
:
"^1.19.1"
,
"prettier"
:
"^1.19.1"
,
"sass-loader"
:
"^8.0.0"
,
"sass-loader"
:
"^8.0.0"
,
...
...
src/api/glsxUpload.js
View file @
ad02ccd
...
@@ -6,14 +6,6 @@
...
@@ -6,14 +6,6 @@
* @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
*/
*/
/** 上传
* @param {*} baseURL method url 获取签名接口参数
* @param {*} uploadEvent(eventType, callback)
* eventType : media_upload 媒体上传完成, media_progress 媒体上传进度,cover_upload 图片上传完成, cover_progress 图片上传进度
* @returns params.url = 'rop-scrm-shopmall/router' params.data.method = 'scrm.api.shopmall.livebroadcast.uploadsignature'
*/
//npm install vod-js-sdk-v6
import
TcVod
from
'vod-js-sdk-v6'
import
TcVod
from
'vod-js-sdk-v6'
import
{
http
}
from
'@/main'
import
{
http
}
from
'@/main'
...
@@ -44,63 +36,63 @@ class GlsxUpload {
...
@@ -44,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
src/setup/qiankun.js
View file @
ad02ccd
...
@@ -2,16 +2,16 @@
...
@@ -2,16 +2,16 @@
* @Description:
* @Description:
* @Author: huyue
* @Author: huyue
* @Date: 2022-01-20 18:06:46
* @Date: 2022-01-20 18:06:46
* @LastEditors:
huyue
* @LastEditors:
yangming yangming@didihu.com.cn
* @LastEditTime: 202
2-07-12 14:14:15
* @LastEditTime: 202
3-08-22 13:42:52
*/
*/
import
Vue
from
'vue'
import
Vue
from
'vue'
import
{
message
,
messageBox
}
from
'@/plugins/element.js'
import
{
message
,
messageBox
}
from
'@/plugins/element.js'
import
{
fetchConfig
}
from
'@/config'
import
{
fetchConfig
}
from
'@/config'
import
ElementUI
from
'element-ui'
import
ElementUI
from
'element-ui'
import
{
GLButton
,
GLTable
,
GLFooter
,
GLCombiForm
,
GLTableButton
,
GLDialog
}
from
'glsx-components'
//权限按钮 (根据权限动态创建)
import
{
GLButton
,
GLTable
,
GLFooter
,
GLCombiForm
,
GLTableButton
,
GLDialog
}
from
'glsx-components'
//权限按钮 (根据权限动态创建)
import
{
GLEditor
}
from
'word-edit'
import
{
GLEditor
}
from
'word-edit'
import
{
getRoutes
}
from
'@/router'
import
{
getRoutes
}
from
'@/router'
import
'@/assets/css/public.scss'
import
'@/assets/css/public.scss'
import
render
from
'./render'
import
render
from
'./render'
// import 'glsx-components/src/theme/theme.scss'
// import 'glsx-components/src/theme/theme.scss'
...
@@ -29,18 +29,8 @@ Vue.use(GLTableButton)
...
@@ -29,18 +29,8 @@ Vue.use(GLTableButton)
Vue
.
use
(
GLEditor
)
Vue
.
use
(
GLEditor
)
Vue
.
use
(
GLDialog
)
Vue
.
use
(
GLDialog
)
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
export
async
function
bootstrap
({
history
,
common
,
messenger
,
globalState
,
routerBase
})
{
const
{
const
{
response
,
request
,
request2
,
sign
,
secret
,
sign_common
,
request_common
,
request_merchant
,
merchantId
}
=
await
fetchConfig
(
false
)
response
,
request
,
request2
,
sign
,
secret
,
sign_common
,
request_common
,
request_merchant
,
merchantId
}
=
await
fetchConfig
(
false
)
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$history
=
history
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$messenger
=
messenger
Vue
.
prototype
.
$globalState
=
globalState
Vue
.
prototype
.
$globalState
=
globalState
...
@@ -56,15 +46,15 @@ export async function bootstrap({history, common, messenger, globalState, router
...
@@ -56,15 +46,15 @@ export async function bootstrap({history, common, messenger, globalState, router
sign
,
sign
,
secret
,
secret
,
alert
:
message
.
error
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
headers
:
{
token
:
globalState
.
session
.
token
}
})
})
Vue
.
prototype
.
$http_upload
=
new
common
.
Http
({
Vue
.
prototype
.
$http_upload
=
new
common
.
Http
({
response
:
{...
response
,
data_key
:
'result'
,
code_success_value
:
true
,
code_key
:
'success'
},
response
:
{
...
response
,
data_key
:
'result'
,
code_success_value
:
true
,
code_key
:
'success'
},
request
,
request
,
sign
,
sign
,
secret
,
secret
,
alert
:
message
.
error
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
,
'Content-Type'
:
'multipart/form-data'
}
headers
:
{
token
:
globalState
.
session
.
token
,
'Content-Type'
:
'multipart/form-data'
}
})
})
Vue
.
prototype
.
$http2
=
new
common
.
Http
({
Vue
.
prototype
.
$http2
=
new
common
.
Http
({
response
,
response
,
...
@@ -72,7 +62,7 @@ export async function bootstrap({history, common, messenger, globalState, router
...
@@ -72,7 +62,7 @@ export async function bootstrap({history, common, messenger, globalState, router
sign
,
sign
,
secret
,
secret
,
alert
:
message
.
error
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
headers
:
{
token
:
globalState
.
session
.
token
}
})
})
Vue
.
prototype
.
$http_merchant
=
new
common
.
Http
({
Vue
.
prototype
.
$http_merchant
=
new
common
.
Http
({
response
,
response
,
...
@@ -80,7 +70,7 @@ export async function bootstrap({history, common, messenger, globalState, router
...
@@ -80,7 +70,7 @@ export async function bootstrap({history, common, messenger, globalState, router
sign
,
sign
,
secret
,
secret
,
alert
:
message
.
error
,
alert
:
message
.
error
,
headers
:
{
token
:
globalState
.
session
.
token
}
headers
:
{
token
:
globalState
.
session
.
token
}
})
})
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
Vue
.
prototype
.
$http_common
=
new
common
.
Http
({
response
,
response
,
...
@@ -89,7 +79,7 @@ export async function bootstrap({history, common, messenger, globalState, router
...
@@ -89,7 +79,7 @@ export async function bootstrap({history, common, messenger, globalState, router
sign
:
sign_common
,
sign
:
sign_common
,
secret
,
secret
,
alert
:
ElementUI
.
Message
.
error
,
alert
:
ElementUI
.
Message
.
error
,
headers
:
{
TGT
:
globalState
.
session
.
token
}
headers
:
{
TGT
:
globalState
.
session
.
token
}
})
})
// Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
// Vue.prototype.$http_xiaolong = new common.Http({ response, request: xiaolong_req, sign, secret, alert: message.error, headers: { token: globalState.session.token } })
Vue
.
prototype
.
$tracker
=
common
.
tracker
Vue
.
prototype
.
$tracker
=
common
.
tracker
...
@@ -103,8 +93,8 @@ export async function bootstrap({history, common, messenger, globalState, router
...
@@ -103,8 +93,8 @@ export async function bootstrap({history, common, messenger, globalState, router
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
// Vue.use(GLButton, { permissions: globalState.permissions || ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
const
routesData
=
common
.
utils
.
deepClone
(
globalState
.
routers
)
routes
=
getRoutes
(
routesData
)
routes
=
getRoutes
(
routesData
)
subscribe
({
messenger
})
subscribe
({
messenger
})
Vue
.
use
(
GLButton
,
{
routes
,
routerBase
})
Vue
.
use
(
GLButton
,
{
routes
,
routerBase
})
}
}
export
async
function
mount
(
props
)
{
export
async
function
mount
(
props
)
{
...
@@ -120,7 +110,7 @@ export async function unmount() {
...
@@ -120,7 +110,7 @@ export async function unmount() {
router
=
null
router
=
null
}
}
function
subscribe
({
messenger
})
{
function
subscribe
({
messenger
})
{
messenger
.
subscribe
(
v
=>
{
messenger
.
subscribe
(
v
=>
{
console
.
log
(
`监听到子应用
${
v
.
from
}
发来消息:`
,
v
)
console
.
log
(
`监听到子应用
${
v
.
from
}
发来消息:`
,
v
)
})
})
...
...
src/views/material/addMaterial.vue
View file @
ad02ccd
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<div
class=
"creat-material"
>
<div
class=
"creat-material"
>
<h4>
{{
title
}}
</h4>
<h4>
{{
title
}}
</h4>
<el-divider></el-divider>
<el-divider></el-divider>
<div
class=
"material-form"
>
<div
class=
"m-l-20"
>
<div
class=
"m-l-20"
>
<el-form-item
v-if=
"!notDisplayProperties"
label=
"选择素材组:"
prop=
"groupId"
>
<el-form-item
v-if=
"!notDisplayProperties"
label=
"选择素材组:"
prop=
"groupId"
>
<el-select
v-model=
"materialAddForm.groupId"
placeholder=
"全部"
:size=
"size"
>
<el-select
v-model=
"materialAddForm.groupId"
placeholder=
"全部"
:size=
"size"
>
...
@@ -98,6 +99,8 @@
...
@@ -98,6 +99,8 @@
<div
class=
"space"
></div>
<div
class=
"space"
></div>
</el-form-item>
</el-form-item>
</div>
</div>
<material-view
v-if=
"materialAddForm.materialType == 3"
:materialAddForm=
"materialAddForm"
:textBoxContent=
"textBoxContent"
></material-view>
</div>
</div>
</div>
<div
class=
"track"
>
<div
class=
"track"
>
<h4>
追踪设置
</h4>
<h4>
追踪设置
</h4>
...
@@ -248,6 +251,7 @@ import SelectLabel from '@/views/material/components/selectLable'
...
@@ -248,6 +251,7 @@ import SelectLabel from '@/views/material/components/selectLable'
import
bigView
from
'@/components/big-view'
import
bigView
from
'@/components/big-view'
import
upload
from
'@/api/uploadApi'
import
upload
from
'@/api/uploadApi'
import
uploadMixin
from
'@/mixins/upload'
import
uploadMixin
from
'@/mixins/upload'
import
materialView
from
'./components/MaterialView'
// import pdfReviewDia from './components/pdfReviewDia.vue'
// import pdfReviewDia from './components/pdfReviewDia.vue'
export
default
{
export
default
{
name
:
'addMaterialForm'
,
name
:
'addMaterialForm'
,
...
@@ -255,6 +259,7 @@ export default {
...
@@ -255,6 +259,7 @@ export default {
components
:
{
components
:
{
textBox
,
textBox
,
SelectLabel
,
SelectLabel
,
materialView
,
bigView
bigView
// pdfReviewDia
// pdfReviewDia
},
},
...
@@ -367,31 +372,31 @@ export default {
...
@@ -367,31 +372,31 @@ export default {
return
true
return
true
}
}
self
.
loading
=
true
self
.
loading
=
true
//
upload.init().then(res => {
upload
.
init
().
then
(
res
=>
{
//
if (res.status == 0) {
if
(
res
.
status
==
0
)
{
//
upload
upload
//
.uploaded(file)
.
uploaded
(
file
)
//
.then(res => {
.
then
(
res
=>
{
//
const videoUrl = res.video.url
const
videoUrl
=
res
.
video
.
url
// self.$set(self.materialAddForm, 'media
Url', videoUrl)
self
.
$set
(
self
.
materialAddForm
,
'video
Url'
,
videoUrl
)
//
self.$nextTick(() => {
self
.
$nextTick
(()
=>
{
//
self.getImgUrl(videoUrl).then(res => {
self
.
getImgUrl
(
videoUrl
).
then
(
res
=>
{
//
self.$set(self.materialAddForm, 'coverUrl', res)
self
.
$set
(
self
.
materialAddForm
,
'coverUrl'
,
res
)
//
})
})
//
})
})
//
self.loading = false
self
.
loading
=
false
//
})
})
//
.finally(end => {
.
finally
(
end
=>
{
//
console.log(end)
console
.
log
(
end
)
//
})
})
//
upload.uploadEvent('', res => {
upload
.
uploadEvent
(
''
,
res
=>
{
//
console.log(res, '视频上传完成')
console
.
log
(
res
,
'视频上传完成'
)
//
})
})
//
upload.uploadEvent('media_progress', res => {
upload
.
uploadEvent
(
'media_progress'
,
res
=>
{
//
console.log(res)
console
.
log
(
res
)
//
})
})
//
}
}
//
})
})
},
},
getParams
()
{
getParams
()
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialAddForm
))
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
materialAddForm
))
...
@@ -761,6 +766,10 @@ export default {
...
@@ -761,6 +766,10 @@ export default {
max-width
:
85%
;
max-width
:
85%
;
}
}
}
}
.material-form
{
display
:
flex
;
justify-content
:
space-between
;
}
.disableUpload
{
.disableUpload
{
cursor
:
not-allowed
;
cursor
:
not-allowed
;
cursor
:
no-drop
;
cursor
:
no-drop
;
...
...
src/views/material/components/MaterialView.vue
0 → 100644
View file @
ad02ccd
<
template
>
<div
class=
"material-view"
>
<div
class=
"material-view-container"
>
<el-carousel
:height=
"height + 'px'"
interval=
"100000"
@
change=
"handleChange"
v-if=
"fileList.length"
>
<el-carousel-item
v-for=
"item in fileList"
:key=
"item"
>
<div
class=
"carousel-item"
>
<img
:src=
"item.url"
class=
"carousel-img"
/>
<img
src=
"@/assets/material/videoIcon.png"
class=
"play"
v-if=
"item.type == 'video'"
/>
</div>
</el-carousel-item>
</el-carousel>
<div
class=
"material-text"
v-html=
"textBoxContent"
></div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
height
:
200
,
fileList
:
[]
}
},
watch
:
{
materialAddForm
:
{
async
handler
(
val
)
{
const
fileList
=
val
.
imageUrlList
.
map
(
item
=>
{
return
{
type
:
'img'
,
url
:
item
}
})
this
.
fileList
=
val
.
videoUrl
?
fileList
.
concat
({
url
:
val
.
coverUrl
,
type
:
'video'
})
:
fileList
if
(
this
.
fileList
.
length
)
{
for
(
let
i
in
this
.
fileList
)
{
this
.
$set
(
this
.
fileList
[
i
],
'height'
,
await
this
.
getHeight
(
this
.
fileList
[
i
].
url
))
}
this
.
height
=
this
.
fileList
[
0
].
height
}
},
deep
:
true
,
immediate
:
true
}
},
props
:
{
materialAddForm
:
{
type
:
Object
,
default
:
()
=>
{}
},
textBoxContent
:
{
type
:
String
}
},
methods
:
{
getHeight
(
url
)
{
return
new
Promise
(
resolve
=>
{
const
img
=
new
Image
()
img
.
src
=
url
img
.
onload
=
res
=>
{
console
.
log
(
img
.
width
,
img
.
height
)
resolve
((
img
.
width
/
img
.
height
)
*
250
)
}
})
},
handleChange
(
e
)
{
this
.
height
=
this
.
fileList
[
e
].
height
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.material-view
{
width
:
289.47px
;
height
:
566px
;
background
:
url('../../../assets/phone.png')
;
background-size
:
100%
100%
;
position
:
relative
;
overflow
:
hidden
;
.material-view-container
{
position
:
absolute
;
top
:
56px
;
left
:
20px
;
width
:
calc
(
100%
-
40px
);
height
:
calc
(
100%
-
112px
);
overflow-y
:
auto
;
/deep/
.el-carousel__button
{
width
:
8px
;
}
.carousel-item
{
position
:
relative
;
height
:
100%
;
width
:
100%
;
.carousel-img
{
width
:
100%
;
height
:
100%
;
}
.play
{
position
:
absolute
;
width
:
30px
;
height
:
30px
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
}
.material-text
{
word-wrap
:
break-word
;
img
{
width
:
100%
!important
;
}
}
}
}
</
style
>
<
style
>
.material-text
img
{
width
:
100%
!important
;
}
</
style
>
val.name
deleted
100644 → 0
View file @
e019a82
File mode changed
vue.config.js
View file @
ad02ccd
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-19 18:34:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-22 13:52:11
* @FilePath: \scrm-micro-marketing\vue.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const
path
=
require
(
'path'
)
const
path
=
require
(
'path'
)
const
packageName
=
require
(
'./package.json'
).
name
const
packageName
=
require
(
'./package.json'
).
name
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
...
@@ -32,7 +40,6 @@ module.exports = {
...
@@ -32,7 +40,6 @@ module.exports = {
'element-ui'
:
'ELEMENT'
,
'element-ui'
:
'ELEMENT'
,
'vue-router'
:
'VueRouter'
,
'vue-router'
:
'VueRouter'
,
vuex
:
'Vuex'
,
vuex
:
'Vuex'
,
axios
:
'axios'
,
echarts
:
'echarts'
,
echarts
:
'echarts'
,
moment
:
'moment'
,
moment
:
'moment'
,
AMap
:
'AMap'
AMap
:
'AMap'
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment