Commit abfee68e by cwq0219

联调

1 parent fc4fd33b
...@@ -2638,6 +2638,15 @@ ...@@ -2638,6 +2638,15 @@
} }
} }
}, },
"call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
}
},
"call-me-maybe": { "call-me-maybe": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
...@@ -5676,8 +5685,7 @@ ...@@ -5676,8 +5685,7 @@
"function-bind": { "function-bind": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
"dev": true
}, },
"functional-red-black-tree": { "functional-red-black-tree": {
"version": "1.0.1", "version": "1.0.1",
...@@ -5753,6 +5761,16 @@ ...@@ -5753,6 +5761,16 @@
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true "dev": true
}, },
"get-intrinsic": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1"
}
},
"get-stdin": { "get-stdin": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
...@@ -5858,12 +5876,14 @@ ...@@ -5858,12 +5876,14 @@
} }
}, },
"glsx-common": { "glsx-common": {
"version": "1.3.2", "version": "1.3.7",
"resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.3.2.tgz", "resolved": "https://registry.npmjs.org/glsx-common/-/glsx-common-1.3.7.tgz",
"integrity": "sha512-7M63cdjzx9HvqwOWLOQOUTSKIuR40KTxS6T2Cu6+lzvX3ey/KNNFDDMEsiJ8PNvQHtVeodFfPtzqSchopJyfJw==", "integrity": "sha512-AZGkgjXsnWyI37IXf0Aj2ZvXcmNtXHp6o4BwwdbYEE/i21C0vR+G0syGhaBzVzrnumxyRTwKgsfJXWJEiGyYzQ==",
"requires": { "requires": {
"axios": "^0.21.3", "axios": "^0.21.3",
"md5": "^2.3.0" "md5": "^2.3.0",
"qs": "^6.10.1",
"sha1": "^1.1.1"
}, },
"dependencies": { "dependencies": {
"axios": { "axios": {
...@@ -5878,6 +5898,14 @@ ...@@ -5878,6 +5898,14 @@
"version": "1.14.4", "version": "1.14.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
"integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==" "integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g=="
},
"qs": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz",
"integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==",
"requires": {
"side-channel": "^1.0.4"
}
} }
} }
}, },
...@@ -6003,7 +6031,6 @@ ...@@ -6003,7 +6031,6 @@
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": { "requires": {
"function-bind": "^1.1.1" "function-bind": "^1.1.1"
} }
...@@ -6034,8 +6061,7 @@ ...@@ -6034,8 +6061,7 @@
"has-symbols": { "has-symbols": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
"dev": true
}, },
"has-unicode": { "has-unicode": {
"version": "2.0.1", "version": "2.0.1",
...@@ -10274,6 +10300,15 @@ ...@@ -10274,6 +10300,15 @@
"safe-buffer": "^5.0.1" "safe-buffer": "^5.0.1"
} }
}, },
"sha1": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz",
"integrity": "sha1-rdqnqTFo85PxnrKxUJFhjicA+Eg=",
"requires": {
"charenc": ">= 0.0.1",
"crypt": ">= 0.0.1"
}
},
"shallow-clone": { "shallow-clone": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
...@@ -10304,6 +10339,23 @@ ...@@ -10304,6 +10339,23 @@
"integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
"dev": true "dev": true
}, },
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
},
"dependencies": {
"object-inspect": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz",
"integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg=="
}
}
},
"signal-exit": { "signal-exit": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"core-js": "^3.4.4", "core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.3.2", "glsx-common": "^1.3.7",
"glsx-components": "^1.0.1", "glsx-components": "^1.0.1",
"glsx-table": "^1.1.0", "glsx-table": "^1.1.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
......
import { http } from '@/main'
const getWarehousListApi = params => {
params.method = 'scrm.api.live.goods.list'
return http({
url: '',
method: 'GET',
data: params,
sign: true
})
}
export { getWarehousListApi }
import { http } from '@/main'
const getLiveRoomListApi = params => {
params.method = 'scrm.api.live.live.room.list'
return http({
url: '',
method: 'GET',
data: params,
sign: true
})
}
export { getLiveRoomListApi }
...@@ -17,7 +17,8 @@ module.exports = { ...@@ -17,7 +17,8 @@ module.exports = {
code_message_map: {} code_message_map: {}
}, },
request: { request: {
baseURL: 'http://192.168.3.171:7300/mock/6136bea6ceeb5a5c2bec6950/', // baseURL: 'http://192.168.3.171:7300/mock/6136bea6ceeb5a5c2bec6950/',
baseURL: 'http://192.168.2.94:8115/rop-scrm-live/router',
// 设置超时时间 // 设置超时时间
timeout: 180000, timeout: 180000,
// 携带凭证 // 携带凭证
...@@ -26,7 +27,7 @@ module.exports = { ...@@ -26,7 +27,7 @@ module.exports = {
responseType: 'json' responseType: 'json'
}, },
sign: { sign: {
app_key: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
v: '1.0.0', v: '1.0.0',
format: 'json', format: 'json',
source: '' source: ''
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">添加商品</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">添加商品</el-button>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEditGroup(1)">添加商品组</el-button> <el-button :size="size" type="primary" class="el-icon-plus" @click="handleEditGroup(1)">添加商品组</el-button>
</div> </div>
<glsx-table ref="liveRoomRef" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <glsx-table ref="warehousListRef" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="showImg" slot-scope="scope"> <span slot="coverImgUrl" slot-scope="scope">
<img style="width: 100px; height: 100px;" :src="scope.scope.img" /> <img style="width: 100px; height: 100px;" :src="scope.scope.img" />
</span> </span>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span slot="auth-button" slot-scope="scope" :data="scope.scope">
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
</template> </template>
<script> <script>
import { getWarehousListApi } from '@/api/modules/cmmodityLibrary'
export default { export default {
name: 'warehousList', name: 'warehousList',
data() { data() {
...@@ -36,16 +37,8 @@ export default { ...@@ -36,16 +37,8 @@ export default {
searchForm: { searchForm: {
name: '' name: ''
}, },
tableData: [
{
title: '直播间名称',
price: '1001',
img: 'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
origin: '1'
}
],
// 表格组件 // 表格组件
getListApi: '', getListApi: getWarehousListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -54,13 +47,12 @@ export default { ...@@ -54,13 +47,12 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品标题', label: '商品标题',
prop: 'title' prop: 'name'
}, },
{ {
label: '直播间图片', label: '直播间图片',
prop: 'img', prop: 'coverImgUrl',
line: 1, addHtml: 'coverImgUrl'
addHtml: 'showImg'
}, },
{ {
label: '价格(元)', label: '价格(元)',
...@@ -68,7 +60,7 @@ export default { ...@@ -68,7 +60,7 @@ export default {
}, },
{ {
label: '来源门店', label: '来源门店',
prop: 'origin' prop: 'merchantName'
} }
] ]
} }
...@@ -137,7 +129,7 @@ export default { ...@@ -137,7 +129,7 @@ export default {
} }
}, },
handleSearch() { handleSearch() {
// this.$refs.liveRoomRef.refreshTable() this.$refs.warehousListRef.refreshTable()
} }
} }
} }
......
<!-- 直播间列表 --> <!-- 直播间列表 -->
<template> <template>
<div class="live-room"> <div class="live-room">
<el-form :inline="true" :model="searchForm"> <el-form
:inline="true"
:model="searchForm"
>
<el-form-item label="直播间搜索:"> <el-form-item label="直播间搜索:">
<el-input :size="size" v-model="searchForm.name" placeholder="请输入直播间名称" clearable></el-input> <el-input
:size="size"
v-model="searchForm.name"
placeholder="请输入直播间名称"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button> <el-button
:size="size"
type="primary"
@click="handleSearch"
>查询</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div> <div>
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)">新增</el-button> <el-button
:size="size"
type="primary"
class="el-icon-plus"
@click="handleEdit(1)"
>新增</el-button>
</div> </div>
<glsx-table ref="liveRoomRef" :searchForm="searchForm" :tableParams="tableParams" :tableData="tableData" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <glsx-table
<span slot="showImg" slot-scope="scope"> ref="liveRoomRef"
<img style="width: 100px; height: 100px;" :src="scope.scope.img" /> :searchForm="searchForm"
:tableParams="tableParams"
:getListApi="getListApi"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
>
<span
slot="shareImgUrl"
slot-scope="scope"
>
<img
style="width: 100px; height: 100px;"
:src="scope.scope.shareImgUrl"
/>
</span> </span>
<span slot="auth-button" slot-scope="scope" :data="scope.scope"> <span
<el-button type="text" @click="handleDetail(scope.scope)">控制台</el-button> slot="auth-button"
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button> slot-scope="scope"
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> :data="scope.scope"
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> >
<el-button
type="text"
@click="handleDetail(scope.scope)"
>控制台</el-button>
<el-button
type="text"
@click="handleShare(scope.scope)"
>分享</el-button>
<el-button
type="text"
@click="handleEdit(2, scope.scope)"
>编辑</el-button>
<el-button
type="text"
@click="handleDelete(scope.scope)"
>删除</el-button>
</span> </span>
</glsx-table> </glsx-table>
<glsx-dialog title="分享" width="620px" :isVisible="isShareVisible" :noCancel="noCancel" @closeDialog="handleShareClose" @confirmDialog="handleShareClose"> <glsx-dialog
title="分享"
width="620px"
:isVisible="isShareVisible"
:noCancel="noCancel"
@closeDialog="handleShareClose"
@confirmDialog="handleShareClose"
>
<div class="share-dialog"> <div class="share-dialog">
<div class="flex"> <div class="flex">
<div class="flex box poster"> <div class="flex box poster">
...@@ -58,6 +111,7 @@ ...@@ -58,6 +111,7 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
import { getLiveRoomListApi } from '@/api/modules/liveRoom'
export default { export default {
name: 'liveRoom', name: 'liveRoom',
data() { data() {
...@@ -66,21 +120,11 @@ export default { ...@@ -66,21 +120,11 @@ export default {
searchForm: { searchForm: {
name: '' name: ''
}, },
tableData: [
{
time: '2021-10-01',
title: '直播间名称',
roomNum: '1001',
name: '主播',
img: 'https://img2.baidu.com/it/u=4276914015,335466661&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
status: '1'
}
],
// 分享 - 弹窗 // 分享 - 弹窗
isShareVisible: false, isShareVisible: false,
noCancel: true, noCancel: true,
// 表格组件 // 表格组件
getListApi: '', getListApi: getLiveRoomListApi,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
// 表格参数 // 表格参数
tableParams: { tableParams: {
...@@ -89,39 +133,67 @@ export default { ...@@ -89,39 +133,67 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '最近开播', label: '最近开播',
prop: 'time' prop: 'time',
formatter: cellValue => {
return cellValue.startTime + '-' + cellValue.endTime
}
}, },
{ {
label: '直播间名称', label: '直播间名称',
prop: 'title' prop: 'name'
}, },
{ {
label: '房间号', label: '房间号',
prop: 'roomNum' prop: 'roomId'
}, },
{ {
label: '主播', label: '主播',
prop: 'name' prop: 'anchorName'
}, },
{ {
label: '直播间图片', label: '直播间图片',
prop: 'img', prop: 'shareImgUrl',
line: 1, line: 1,
addHtml: 'showImg' addHtml: 'shareImgUrl'
}, },
{ {
label: '直播状态', label: '直播状态',
prop: 'status', prop: 'liveStatus',
formatter: cellValue => { formatter: cellValue => {
return { return this.baseDataList.liveStatus.find(item => item.confId == cellValue.liveStatus).confName
0: '未开始',
1: '已结束',
2: '过期',
3: '直播中'
}[cellValue.status]
} }
} }
] ]
},
baseDataList: {
liveStatus: [{
confId: '101',
confName: '直播中'
},
{
confId: '102',
confName: '未开始'
},
{
confId: '103',
confName: '直播中'
},
{
confId: '104',
confName: '直播中'
},
{
confId: '105',
confName: '直播中'
},
{
confId: '106',
confName: '直播中'
},
{
confId: '107',
confName: '直播中'
},]
} }
} }
}, },
...@@ -130,7 +202,7 @@ export default { ...@@ -130,7 +202,7 @@ export default {
glsxDialog glsxDialog
}, },
mounted() {}, mounted() { },
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
...@@ -172,7 +244,7 @@ export default { ...@@ -172,7 +244,7 @@ export default {
}) })
}, },
handleSearch() { handleSearch() {
// this.$refs.liveRoomRef.refreshTable() this.$refs.liveRoomRef.refreshTable()
} }
} }
} }
......
...@@ -30,6 +30,15 @@ module.exports = { ...@@ -30,6 +30,15 @@ module.exports = {
port: process.env.VUE_APP_PORT, port: process.env.VUE_APP_PORT,
headers: { headers: {
'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头 'Access-Control-Allow-Origin': '*' // 主应用获取子应用时跨域响应头
},
proxy: {
'/api': {
target: 'http://192.168.2.94:8115/rop-scrm-live',
changeOrigin: true,
pathRewrite: {
'^/api': '/router'
}
}
} }
}, },
chainWebpack: config => { chainWebpack: config => {
...@@ -49,4 +58,4 @@ module.exports = { ...@@ -49,4 +58,4 @@ module.exports = {
}) })
.end() .end()
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!