Commit 8d833469 by zhangquan

Merge branch 'v3.16.0' of http://192.168.3.233:8090/saas/scrm-micro-marketing into v3.16.0

2 parents efb35b11 e019a82a
...@@ -2083,6 +2083,17 @@ ...@@ -2083,6 +2083,17 @@
"color-convert": "^2.0.1" "color-convert": "^2.0.1"
} }
}, },
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"cliui": { "cliui": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz", "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
...@@ -2124,6 +2135,13 @@ ...@@ -2124,6 +2135,13 @@
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true "dev": true
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"is-fullwidth-code-point": { "is-fullwidth-code-point": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
...@@ -2165,6 +2183,28 @@ ...@@ -2165,6 +2183,28 @@
"ansi-regex": "^5.0.1" "ansi-regex": "^5.0.1"
} }
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
},
"wrap-ansi": { "wrap-ansi": {
"version": "6.2.0", "version": "6.2.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
...@@ -13657,75 +13697,6 @@ ...@@ -13657,75 +13697,6 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.5.4", "version": "3.5.4",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.4.tgz",
......
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-08-21 11:35:26
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-21 16:25:51
* @FilePath: \scrm-micro-marketing\src\api\glsxUpload.js
* @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 { http } from '@/main'
// 请求配置
const SIGN = {
v: '1.0.0',
source: 'scm-home',
format: 'json',
appKey: '48e5e13229b82c1b4e6e8c96151f0637'
}
const SECRET = 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
const REQUEST = {
timeout: 180000,
responseType: 'json',
baseURL: 'http://scrm.dev.glsx.com.cn',
withCredentials: true
}
// const RESPONSE = {
// code_key: ['code', 'returnCode'],
// code_message_map: {},
// code_success_value: '0',
// data_key: 'data',
// errId_logout_value: '21',
// message_key: 'message'
// }
class GlsxUpload {
constructor(params) {
this.initParam = params
}
init() {
return new Promise((resolve, reject) => {
if (this.tcVod) return resolve({ status: 0, msg: 'init successful' })
const { params: { data, url } = {} } = this.initParam || {}
console.log(data)
return http({
data,
url: url,
returnAll: true
})
.then(res => {
if (res.code == '0') {
this.tcVod = new TcVod({
getSignature: () => {
return res.data
}
})
}
if (this.tcVod) return resolve({ status: 0, msg: 'init successful' })
reject({ status: -1, msg: 'init failed' })
})
.catch(err => {
reject({ status: -1, msg: 'init failed' })
})
})
}
uploaded(file, img) {
return new Promise((resolve, reject) => {
if (!file) return reject({ status: -1, msg: 'file is required' })
let params = {
mediaFile: file
}
if (img) params.coverFile = img
this.uploader = this.tcVod.upload(params)
this.uploader
.done()
.then(doneResult => {
resolve(doneResult)
})
.catch(err => {
reject(err)
})
})
}
uploadEvent(eventType, callback) {
if (!eventType) callback({ status: -1, msg: 'eventType is required' })
try {
this.uploader.on(eventType, info => {
callback(info)
})
} catch (err) {
callback(err)
}
}
uploadCancel() {
this.uploader.cancel()
}
}
export default GlsxUpload
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-08-21 11:35:02
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-21 11:37:50
* @FilePath: \scrm-micro-marketing\src\api\modules\uploadApi.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import GlsxUpload from './glsxUpload'
const upload = new GlsxUpload({
params: {
data: { method: 'scrm.api.shopmall.tencentcloudmedia.uploadsignature' },
url: 'rop-scrm-shopmall/router'
}
})
export default upload
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-19 18:34:08
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-21 11:24:44
* @FilePath: \scrm-micro-marketing\src\config\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
...@@ -11,9 +19,9 @@ export const fetchConfig = function(isEnv = true) { ...@@ -11,9 +19,9 @@ export const fetchConfig = function(isEnv = true) {
// } // }
//return window.fetch('https://', {}).then(res => res.json()) //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' }) // 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/619c87331072f92988f05a29/marketing/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data) // return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
...@@ -15,24 +15,19 @@ ...@@ -15,24 +15,19 @@
</span> </span>
<div class="container"> <div class="container">
<div class="search-form"> <div class="search-form">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData" <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="materialFormData" @handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
@handleOk="getListApi" @handleRest="handleReset"></GLCombiForm>
</div> </div>
<div class="tabelList"> <div class="tabelList">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<div class="left"> <div class="left">
<MaterialGroup ref="materialGroup" @openAddDialog="addDialogShow" :groupHeight="boxHeight" <MaterialGroup ref="materialGroup" @openAddDialog="addDialogShow" :groupHeight="boxHeight" :eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
:eventBus="eventBus" @getList="getList" @getListApi="getListApi"></MaterialGroup>
</div> </div>
</el-col> </el-col>
<el-col :span="19"> <el-col :span="19">
<div class="right" :style="{ height: boxHeight + 'px' }"> <div class="right" :style="{ height: boxHeight + 'px' }">
<div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div> <div class="groupTitle">{{ materialGroupName }}(共{{ tableTotal }}条数据)</div>
<GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout" <GLTable ref="materialRef" :hasPage="false" :noDataImg="url" @refreshTable="getListApi" :layout="layout" :searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData" :pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true" :customHeadShowList="customHeadShowList">
:searchForm="searchForm" :tableParams="tableParams" :tableData="materialTableData"
:pageConf="pageConf" :tableTotal="tableTotal" @sortChange="sortChange" :isCustomHead="true"
:customHeadShowList="customHeadShowList">
<!-- 素材内容 --> <!-- 素材内容 -->
<div slot="materialContentRpcResponse" slot-scope="scope"> <div slot="materialContentRpcResponse" slot-scope="scope">
<span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span> <span class="hide-content">{{ scope.scope.materialContentRpcResponse.materialName }}</span>
...@@ -99,10 +94,8 @@ ...@@ -99,10 +94,8 @@
</el-row> </el-row>
</div> </div>
</div> </div>
<AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog" <AddMaterialGroupDia :businessTypes="businessTypes" ref="addMaterialGroup" :dialogVisible="materialGroupDialog" :eventBus="eventBus"></AddMaterialGroupDia>
:eventBus="eventBus"></AddMaterialGroupDia> <FunctionIntroduc :introductionDialog="introductionDialog" @closeIntroductDia="closeIntroductDia"></FunctionIntroduc>
<FunctionIntroduc :introductionDialog="introductionDialog"
@closeIntroductDia="closeIntroductDia"></FunctionIntroduc>
<VideoShowDia ref="VideoShowDia" :dialogVisible="dialogVisibleImg"></VideoShowDia> <VideoShowDia ref="VideoShowDia" :dialogVisible="dialogVisibleImg"></VideoShowDia>
</div> </div>
</template> </template>
...@@ -140,9 +133,9 @@ export default { ...@@ -140,9 +133,9 @@ export default {
businessType: '', // 业务类型 businessType: '', // 业务类型
status: '', // 状态 status: '', // 状态
materialName: '', // 素材名称 materialName: '', // 素材名称
createdType:'2' createdType: '2'
}, },
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'}, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
layout: 'sizes, prev, pager, next, jumper, ->, total', layout: 'sizes, prev, pager, next, jumper, ->, total',
// 表格数据 // 表格数据
materialTableData: [], materialTableData: [],
...@@ -265,7 +258,7 @@ export default { ...@@ -265,7 +258,7 @@ export default {
fn: '编辑' fn: '编辑'
}, },
listeners: { listeners: {
click: row => row.createdType == 1 ? this.addMaterial(3, row) : this.addMaterial(2, row) click: row => (row.createdType == 1 ? this.addMaterial(3, row) : this.addMaterial(2, row))
} }
}, },
{ {
...@@ -323,7 +316,7 @@ export default { ...@@ -323,7 +316,7 @@ export default {
formatter: cellVal => { formatter: cellVal => {
return cellVal.sendNum return cellVal.sendNum
}, },
renderHeader: (h, {column, $index}) => { renderHeader: (h, { column, $index }) => {
return h( return h(
'div', 'div',
{ {
...@@ -371,7 +364,7 @@ export default { ...@@ -371,7 +364,7 @@ export default {
formatter: cellVal => { formatter: cellVal => {
return cellVal.readNum return cellVal.readNum
}, },
renderHeader: (h, {column, $index}) => { renderHeader: (h, { column, $index }) => {
return h( return h(
'div', 'div',
{ {
...@@ -459,7 +452,7 @@ export default { ...@@ -459,7 +452,7 @@ export default {
businessType: '', businessType: '',
status: '', status: '',
materialName: '', materialName: '',
createdType:'2' createdType: '2'
} }
this.getListApi() this.getListApi()
this.$refs.materialGroup.currentIndex = null this.$refs.materialGroup.currentIndex = null
...@@ -525,7 +518,7 @@ export default { ...@@ -525,7 +518,7 @@ export default {
}, },
// 素材删除 // 素材删除
handleDelete(scope) { handleDelete(scope) {
this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', {id: scope.id}) this.secondConfirm('提示', '删除素材,该素材将不再可以使用,是否继续删除?', 'material', 'materialDelete', { id: scope.id })
}, },
// 1-新增素材,2-编辑素材 // 1-新增素材,2-编辑素材
addMaterial(addOrEdit, scope) { addMaterial(addOrEdit, scope) {
...@@ -557,13 +550,13 @@ export default { ...@@ -557,13 +550,13 @@ export default {
let videoHtml = html.match(/<video.*?(?:>|\/>)/g) let videoHtml = html.match(/<video.*?(?:>|\/>)/g)
if (imgHtml) { if (imgHtml) {
let imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"') let imgSrc = imgHtml[0].match('<img[^<>]*? src="([^<>]*?)"')
item.materialContentRpcResponse.materialUrl = imgSrc? imgSrc[1] :'' item.materialContentRpcResponse.materialUrl = imgSrc ? imgSrc[1] : ''
item.urlType = 'img' item.urlType = 'img'
item.imgCount = imgHtml.length item.imgCount = imgHtml.length
} }
if (videoHtml) { if (videoHtml) {
let videoSrc = videoHtml[0].match('<video[^<>]*? src="([^<>]*?)"') let videoSrc = videoHtml[0].match('<video[^<>]*? src="([^<>]*?)"')
item.materialContentRpcResponse.materialUrl = videoSrc ? videoSrc[1] :'' item.materialContentRpcResponse.materialUrl = videoSrc ? videoSrc[1] : ''
item.urlType = 'video' item.urlType = 'video'
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!