Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-provider
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 2be3f646
authored
Nov 17, 2022
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
5a559dff
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
78 deletions
src/mixins/index.js
src/views/application/components/activityList.vue
src/views/application/components/activityOpen.vue
src/views/application/index.vue
vue.config.js
src/mixins/index.js
View file @
2be3f64
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 09:44:10
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-1
0-17 17:34:25
* @LastEditTime: 2022-1
1-16 13:45:49
* @FilePath: \scrm-micro-provider\src\mixins\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -14,6 +14,10 @@ const STORE_STATUS = [
{
label
:
'已开通'
,
value
:
1
},
{
label
:
'已开通'
,
value
:
3
}
]
const
ACTIVITY_STATUS
=
[
...
...
@@ -28,6 +32,10 @@ const ACTIVITY_STATUS = [
{
label
:
'已开通'
,
value
:
2
},
{
label
:
'已开通'
,
value
:
3
}
]
export
default
{
...
...
@@ -51,6 +59,7 @@ export default {
},
methods
:
{
handleSearch
()
{
this
.
$parent
.
$emit
(
'aaa'
)
this
.
$refs
.
table
.
refreshTable
()
},
handleReset
()
{
...
...
@@ -59,7 +68,7 @@ export default {
},
taskStatus
(
status
)
{
const
statusItem
=
this
.
activeItem
==
0
?
STORE_STATUS
:
ACTIVITY_STATUS
return
statusItem
.
find
(
item
=>
item
.
value
==
status
).
label
return
statusItem
.
find
(
item
=>
item
.
value
==
status
)
?
.
label
}
}
}
src/views/application/components/activityList.vue
View file @
2be3f64
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 10:56:40
* @LastEditors:
前端 qianduan01
@didihu.com.cn
* @LastEditTime: 2022-1
0-31 15:53:21
* @LastEditors:
yangming yangming
@didihu.com.cn
* @LastEditTime: 2022-1
1-16 09:44:09
* @FilePath: \scrm-micro-provider\src\views\home\components\activityList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -15,20 +15,20 @@
<el-button
type=
"text"
v-else
@
click=
"handleOpen(scope.scope)"
>
去处理
</el-button>
</
template
>
<
template
slot=
"status"
slot-scope=
"scope"
>
<div
:class=
"['task_icon', `task_icon_$
{scope.scope.status == 2 ? 'green' : 'grey'}`]">
{{
taskStatus
(
scope
.
scope
.
status
)
}}
</div>
<div
:class=
"['task_icon', `task_icon_$
{scope.scope.status == 2
|| scope.scope.status == 3
? 'green' : 'grey'}`]">
{{
taskStatus
(
scope
.
scope
.
status
)
}}
</div>
</
template
>
</GLTable>
<GLDialog
title=
"已开通业务"
:hasFooter=
"false"
:visible
.
sync=
"detailVisible"
>
<div
class=
"dialog-body-panel"
v-for=
"(item, index) in productList"
:key=
"index"
>
<
template
v-if=
"item.sceneCode != 'SC004'"
>
<div
class=
"dialog-body-title"
>
{{
item
.
stage
}}
:
</div>
<div
class=
"dialog-body-content"
v-for=
"act in item.list"
:key=
"act.productCode"
>
{{
act
.
productName
}}
</div>
<div
class=
"dialog-body-content"
v-for=
"act in item.list"
:key=
"act.productCode"
>
{{
act
.
activityName
?
act
.
activityName
:
act
.
productName
}}
</div>
</
template
>
<
template
v-else
>
<div
class=
"dialog-body-title"
>
{{
item
.
stage
}}
:
</div>
<div
class=
"dialog-body-activity"
v-for=
"act in item.list"
:key=
"act.productCode"
>
<div
class=
"activity-row"
>
<div
class=
"activity-item"
>
活动名称:
{{
act
.
productName
}}
</div>
<div
class=
"activity-item"
>
活动名称:
{{
act
.
activityName
?
act
.
activityName
:
act
.
productName
}}
</div>
</div>
<div
class=
"activity-row"
>
<div
class=
"activity-item"
>
开始时间:
{{
act
.
beginTime
}}
</div>
...
...
src/views/application/components/activityOpen.vue
View file @
2be3f64
<!--
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 10:56:40
* @LastEditors:
前端 qianduan01
@didihu.com.cn
* @LastEditTime: 2022-11-
01 18:04:39
* @LastEditors:
yangming yangming
@didihu.com.cn
* @LastEditTime: 2022-11-
10 14:05:46
* @FilePath: \scrm-micro-provider\src\views\home\components\activityList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
...
...
@@ -82,6 +82,7 @@ export default {
productName
:
''
,
activityUrl
:
''
},
merchantId
:
''
,
createTime
:
[],
activityStatus
:
null
,
selectActivity
:
''
,
...
...
@@ -135,11 +136,12 @@ export default {
}
this
.
$apis
.
application
.
activityDetail
({
id
:
this
.
activityId
}).
then
(
res
=>
{
if
(
res
)
{
const
{
activityName
,
endTime
,
startTime
,
linkUrl
,
goodsCategoryCode
}
=
res
const
{
activityName
,
endTime
,
startTime
,
linkUrl
,
goodsCategoryCode
,
merchantId
}
=
res
this
.
activity
.
productName
=
activityName
this
.
createTime
=
[
startTime
,
endTime
]
this
.
activity
.
activityUrl
=
linkUrl
this
.
activity
.
productCode
=
goodsCategoryCode
this
.
merchantId
=
merchantId
}
else
{
this
.
activity
=
{}
this
.
createTime
=
[]
...
...
@@ -156,7 +158,8 @@ export default {
}
let
params
=
{
productCode
,
serviceMerchantId
,
serviceMerchantName
,
merchant4sName
:
merchantName
,
merchant4sId
:
merchantId
,
id
,
status
:
stageText
.
includes
(
this
.
stage
)
?
2
:
1
}
if
(
this
.
activityStatus
)
{
params
=
{
...
params
,
...
activity
}
if
(
merchantId
!==
this
.
merchantId
)
return
this
.
$message
.
error
(
'门店不一致'
)
params
=
{
...
params
,
...
activity
,
activityName
:
this
.
activity
.
productName
,
crowdFundActivityId
:
this
.
activityId
}
}
if
(
!
params
.
productCode
)
{
this
.
$message
.
error
(
'请选择产品'
)
...
...
src/views/application/index.vue
View file @
2be3f64
...
...
@@ -36,6 +36,11 @@ export default {
tabName
()
{
return
[
'storeList'
,
'activityList'
][
+
this
.
activeItem
]
}
},
created
()
{
this
.
$on
(
'aaa'
,
()
=>
{
console
.
log
(
888
)
})
}
}
</
script
>
...
...
vue.config.js
View file @
2be3f64
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2022-10-10 09:34:39
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-11-17 11:10:58
* @FilePath: \scrm-micro-provider\vue.config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
const
path
=
require
(
'path'
)
const
packageName
=
require
(
'./package.json'
).
name
const
node_env
=
process
.
env
.
NODE_ENV
===
'production'
...
...
@@ -5,75 +13,66 @@ const publicPath = node_env ? `/child/${packageName}/` : '/'
const
resolve
=
dir
=>
path
.
join
(
__dirname
,
dir
)
const
CDN_DOMAIN
=
'https://img02.glsx.com.cn/'
const
cdn
=
{
css
:
[
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js
:
[
`
${
CDN_DOMAIN
}
ajax/libs/vue/2.6.11/vue.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vue-router/3.2.0/vue-router.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/index.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vuex/3.6.2/vuex.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
]
css
:
[
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/theme-chalk/index.css`
],
js
:
[
`
${
CDN_DOMAIN
}
ajax/libs/vue/2.6.11/vue.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vue-router/3.2.0/vue-router.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/index.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vuex/3.6.2/vuex.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
]
}
module
.
exports
=
{
outputDir
:
`../dist/
${
packageName
}
`
,
publicPath
,
assetsDir
:
'static'
,
productionSourceMap
:
false
,
configureWebpack
:
{
resolve
:
{
alias
:
{
'@'
:
resolve
(
'src'
),
assets
:
resolve
(
'src/assets'
),
views
:
resolve
(
'src/views'
),
components
:
resolve
(
'src/components'
)
}
},
output
:
{
library
:
`
${
packageName
}
-[name]`
,
libraryTarget
:
'umd'
,
// 把微应用打包成 umd 库格式
jsonpFunction
:
`webpackJsonp_
${
packageName
}
`
},
externals
:
{
'vue'
:
'Vue'
,
'element-ui'
:
'ELEMENT'
,
'vue-router'
:
'VueRouter'
,
'vuex'
:
'Vuex'
,
'axios'
:
'axios'
,
'echarts'
:
'echarts'
}
outputDir
:
`dist`
,
publicPath
,
assetsDir
:
'static'
,
productionSourceMap
:
false
,
configureWebpack
:
{
resolve
:
{
alias
:
{
'@'
:
resolve
(
'src'
),
assets
:
resolve
(
'src/assets'
),
views
:
resolve
(
'src/views'
),
components
:
resolve
(
'src/components'
)
}
},
devServer
:
{
hot
:
true
,
disableHostCheck
:
true
,
host
:
process
.
env
.
VUE_APP_HOST
,
port
:
process
.
env
.
VUE_APP_PORT
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
// 主应用获取子应用时跨域响应头
}
output
:
{
library
:
`
${
packageName
}
-[name]`
,
libraryTarget
:
'umd'
,
// 把微应用打包成 umd 库格式
jsonpFunction
:
`webpackJsonp_
${
packageName
}
`
},
chainWebpack
:
config
=>
{
config
.
plugin
(
'html'
)
.
tap
(
args
=>
{
// args[0].minify.removeComments = false;
args
[
0
].
cdn
=
cdn
return
args
})
config
.
plugins
.
delete
(
'preload'
)
// TODO: need test
config
.
plugins
.
delete
(
'prefetch'
)
// TODO: need test
config
.
module
.
rule
(
'fonts'
)
.
test
(
/.
(
ttf|otf|eot|woff|woff2
)
$/
)
.
use
(
'url-loader'
)
.
loader
(
'url-loader'
)
.
tap
(
options
=>
{
options
=
{
// limit: 10000,
name
:
'/static/fonts/[name].[ext]'
}
return
options
})
.
end
()
externals
:
{
vue
:
'Vue'
,
'element-ui'
:
'ELEMENT'
,
'vue-router'
:
'VueRouter'
,
vuex
:
'Vuex'
,
axios
:
'axios'
,
echarts
:
'echarts'
}
},
devServer
:
{
hot
:
true
,
disableHostCheck
:
true
,
host
:
process
.
env
.
VUE_APP_HOST
,
port
:
process
.
env
.
VUE_APP_PORT
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
// 主应用获取子应用时跨域响应头
}
}
\ No newline at end of file
},
chainWebpack
:
config
=>
{
config
.
plugin
(
'html'
).
tap
(
args
=>
{
// args[0].minify.removeComments = false;
args
[
0
].
cdn
=
cdn
return
args
})
config
.
plugins
.
delete
(
'preload'
)
// TODO: need test
config
.
plugins
.
delete
(
'prefetch'
)
// TODO: need test
config
.
module
.
rule
(
'fonts'
)
.
test
(
/.
(
ttf|otf|eot|woff|woff2
)
$/
)
.
use
(
'url-loader'
)
.
loader
(
'url-loader'
)
.
tap
(
options
=>
{
options
=
{
// limit: 10000,
name
:
'/static/fonts/[name].[ext]'
}
return
options
})
.
end
()
}
}
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