提交 141461d5 authored 作者: lihuihui's avatar lihuihui

修改bug

上级 175860c3
......@@ -32,6 +32,9 @@ export default {
padding-bottom: 16px;
margin-bottom: 20px;
border-bottom: 1px solid #eee;
div{
font-weight: bold;
}
}
.app-container-hd__title {
font-size: 16px;
......
......@@ -17,6 +17,7 @@ export default class MyUploadAdapter {
}
_sendRequest(resolve, reject, file) {
debugger
uploadFile({ file })
.then(response => {
if (response.success) {
......
<template>
<div class="dialog-box">
<div class="dialog-cont">
<div class="close el-icon-circle-close" @click="$emit('dialogClose')"></div>
<div class="title">{{ data.title }}</div>
<img :src="data.url" alt="">
<slot name="btn"></slot>
</div>
</div>
</template>
<script>
export default {
props: {
data: {
type: Object
}
}
}
</script>
<style lang="scss" scoped>
.dialog-box{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: rgba(0,0,0,.3);
z-index: 999;
.dialog-cont{
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
width: 348px;
// height: 264px;
background: #FFFFFF;
border-radius: 5px;
text-align: center;
.title{
max-width: 182px;
margin: 0 auto;
font-size: 14px;
color: #222222;
line-height: 20px;
padding: 24px 0;
text-align: center;
}
}
}
.close{
cursor: pointer;
position: absolute;
top: 10px;
right: -50px;
font-size: 30px;
color: #fff;
}
</style>
......@@ -10,7 +10,7 @@
{{ subitem.title }}
</el-menu-item>
</el-submenu>
<el-menu-item :key="index" :index="item.path" v-else>{{ item.title }}</el-menu-item>
<el-menu-item :key="index" :index="item.path" v-else class="menu-box"><div class="icon"></div><span>{{ item.title }}</span></el-menu-item>
</template>
</el-menu>
</div>
......@@ -27,19 +27,26 @@ export default {
defaultMenus: [
{
title: '案例背景选择',
icon: '',
path: '/caseSelection'
},
{ title: '用户群分析', icon: '', path: '/groupAnalysis' },
{ title: '用户触达', icon: '', path: '/userTrigger' }
{
title: '用户群分析',
path: '/groupAnalysis'
},
{
title: '用户触达',
path: '/userTrigger'
}
],
defaultMenus2: [
{
title: '案例背景选择',
icon: '',
path: '/caseSelection'
},
{ title: '用户触达', icon: '', path: '/userTrigger' }
{
title: '用户触达',
path: '/userTrigger'
}
]
}
},
......@@ -50,17 +57,74 @@ export default {
}
return this.$store.state.level === 1 ? this.defaultMenus2 : this.defaultMenus
}
},
methods: {
backgroundImg(url) {
return `background: url(${url});background-size: 100% 100%`
}
}
}
</script>
<style lang="scss">
.menu-box{
display: flex;
align-items: center;
.icon{
margin-right: 20px;
width: 16px;
height: 16px;
}
&.is-active{
&:nth-child(1){
.icon{
background: url(https://zws-imgs-pub.ezijing.com/static/public/77a12a34c892aba13cfa55e6b9f82b9b.png);
background-size: 100% 100%;
}
}
&:nth-child(2){
.icon{
background: url(https://zws-imgs-pub.ezijing.com/static/public/663d17a9f6e2d55783da99a1a245525e.png);
background-size: 100% 100%;
}
}
&:nth-child(3){
.icon{
background: url(https://zws-imgs-pub.ezijing.com/static/public/313f61af3d2494cd9a09347c94dcaef3.png);
background-size: 100% 100%;
}
}
}
&:nth-child(1){
.icon{
background: url(https://zws-imgs-pub.ezijing.com/static/public/842479001e1492231309a0ae57abf9ff.png);
background-size: 100% 100%;
}
}
&:nth-child(2){
.icon{
background: url(https://zws-imgs-pub.ezijing.com/static/public/6ba738bb988e0f12931fdfc18f0020fb.png);
background-size: 100% 100%;
}
}
&:nth-child(3){
.icon{
background: url(https://zws-imgs-pub.ezijing.com/static/public/5bd7572fcb751cc73c0fb982270ee7a9.png);
background-size: 100% 100%;
}
}
}
.app-aside {
padding-top: 16px;
width: 200px;
background-color: #fff;
.menu {
border: 0;
}
}
.el-menu-item{
&.is-active{
font-weight: bold !important;
}
}
</style>
......@@ -4,9 +4,9 @@
<router-link to="/">{{ title }}</router-link>
</div>
<div class="tool">
<nav class="nav">
<!-- <nav class="nav">
<router-link to="/">首页</router-link>
</nav>
</nav> -->
<div class="user">
<div class="user-tools">
<router-link to="/account/password">修改密码</router-link>
......@@ -56,14 +56,8 @@ export default {
height: 56px;
padding: 0 30px;
color: #fff;
background: linear-gradient(
47deg,
#c01540 0%,
#c01540 7%,
rgba(192, 21, 64, 0.76) 26%,
rgba(192, 21, 64, 0.58) 66%,
#c01540 100%
);
background: url(https://zws-imgs-pub.ezijing.com/static/public/08a0582bed60e67b08e9311306a6fb34.png), linear-gradient(47deg, #C01540 0%, #C01540 7%, rgba(192, 21, 64, 0.76) 26%, rgba(192, 21, 64, 0.58) 66%, #C01540 100%);
background-size: cover;
box-shadow: 0px 0px 22px 0px #f8f9fb;
.tool {
......
<template>
<div>
<div class="box-s">
<div v-if="!isDetail" :class="isSelected == data.id ? 'card-box hover actvie' : 'card-box hover'">
<div class="ban-top" :style="style(data.poster_url)">
<div class="title">{{ data.name }}</div>
......@@ -95,6 +95,9 @@ export default {
}
</script>
<style lang="scss" scoped>
.box-s{
box-sizing: border-box;
}
.hover{
&:hover{
box-shadow: 0px 8px 16px 0px rgba(88, 111, 174, 0.2);
......@@ -113,6 +116,8 @@ export default {
overflow: hidden;
background: #FFFFFF;
box-shadow: 0px 2px 10px 0px rgba(88, 111, 174, 0.1);
box-sizing: border-box;
border: 2px solid #fff;
&.actvie{
box-sizing: border-box;
border: 2px solid #C01540;
......
......@@ -16,8 +16,8 @@
</ul>
<template #footer>
<div class="app-container-ft">
<el-button type="primary" size="mini" @click="open">开始实训</el-button>
<el-button type="primary" size="mini" @click="viewDetails" v-if="!isDetail">查看背景详情</el-button>
<el-button v-if="$store.state.level != 1" class="app-btn" type="primary" size="mini" @click="open">开始实训</el-button>
<el-button class="app-btn" type="primary" size="mini" @click="viewDetails" v-if="!isDetail">查看背景详情</el-button>
</div>
</template>
</app-container>
......@@ -81,6 +81,14 @@ export default {
</script>
<style scoped lang="scss">
.app-btn{
padding-top: 0;
padding-bottom: 0;
border: none;
line-height: 32px;
background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%);
border-radius: 4px;
}
app-container {
overflow: hidden;
// it-em {
......@@ -94,8 +102,11 @@ app-container {
}
.cases-box{
display: flex;
flex-wrap: wrap;
margin-left: -24px;
li{
margin-right: 24px;
margin-left: 24px;
margin-bottom: 24px;
}
}
.back{
......
......@@ -64,12 +64,15 @@ export default {
margin-right: 24px;
margin-bottom: 16px;
box-sizing: border-box;
border: 2px solid #fff;
&.active{
box-shadow: 0px 4px 8px 0px rgba(192, 21, 64, 0.4);
border: 2px solid #C01540;
.cont-m{
max-width: 354px;
background: rgba(255, 255, 255, 0.7);
.text{
// width: auto;
color: #C01540;
&.active{
color: #C01540;
......@@ -82,6 +85,7 @@ export default {
}
&:hover{
.cont-m{
max-width: 354px;
background: rgba(255, 255, 255, 0.7);
.text{
color: #C01540;
......@@ -97,19 +101,22 @@ export default {
.cont-m{
position: absolute;
top: 0;
left: 0;
left: 50%;
-webkit-transform: translateX(-50%);
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
// max-width: 354px;
i{
color: #7FFF30;
font-size: 30px;
margin-right: 20px;
}
.text{
max-width: 354px;
font-size: 24px;
font-weight: bold;
color: #FFFFFF;
......
......@@ -28,11 +28,17 @@
</div>
</div>
</template>
<dialogs :data="dialogParam" v-if="isDialog" @dialogClose="dialogClose">
<template #btn>
<div class="dialogs-btn" @click="dialogEvent">确定</div>
</template>
</dialogs>
</app-container>
</template>
<script>
import AppContainer from '@/components/AppContainer'
import dialogs from '@/components/dialog'
import item from './components/item.vue'
import currentCard from './components/currentCard.vue'
import formRadio from './components/form.vue'
......@@ -43,7 +49,8 @@ export default {
AppContainer,
item,
currentCard,
formRadio
formRadio,
dialogs
},
data() {
return {
......@@ -54,13 +61,34 @@ export default {
casesId: 1,
currentCasesId: 1,
formData: [],
verificationData: []
verificationData: [],
dialogParam: {},
isDialog: false,
dialogIndex: 0
}
},
mounted() {
this.getCaseList()
},
methods: {
dialogClose() {
this.isDialog = false
},
dialogEvent() {
switch (this.dialogIndex) {
case 1:
this.$router.push({
path: '/userTrigger'
})
break
case 2:
this.$router.go(0)
break
case 3:
this.isDialog = false
break
}
},
currentSelect(id) {
this.currentCasesId = id
},
......@@ -167,6 +195,7 @@ export default {
: parseInt(response.data.result)
? 2
: 3
this.dialogIndex = num
this.messageBox(num)
})
.finally(() => {
......@@ -188,43 +217,37 @@ export default {
messageBox(n) {
switch (n) {
case 1:
this.$alert('恭喜您,已经全部通过,您可以进入用户触达部分了。', {
confirmButtonText: '确定',
callback: action => {
this.$router.push({
path: '/userTrigger'
})
}
})
this.dialogParam.title = '恭喜您,已经全部通过,您可以进入用户触达部分了。'
this.dialogParam.url = 'https://zws-imgs-pub.ezijing.com/static/public/b7248a82051a538614ab3e3fe188f9dd.png'
break
case 2:
this.$alert('恭喜您,您的筛选正确。', {
confirmButtonText: '确定',
callback: action => {
this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
this.$router.go(0)
}
})
this.dialogParam.title = '恭喜您,您的筛选正确。'
this.dialogParam.url = 'https://zws-imgs-pub.ezijing.com/static/public/b7248a82051a538614ab3e3fe188f9dd.png'
break
case 3:
this.$alert('您的答案有误', {
confirmButtonText: '确定',
callback: action => {
}
})
this.dialogParam.title = '您的答案有误'
this.dialogParam.url = 'https://zws-imgs-pub.ezijing.com/static/public/c627274a8c7e7c20b46cdd58a52da2dc.png'
break
}
this.isDialog = true
}
}
}
</script>
<style scoped lang="scss">
.dialogs-btn{
text-align: center;
width: 76px;
height: 32px;
background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%);
border-radius: 4px;
font-size: 14px;
color: #FFFFFF;
line-height: 32px;
margin: 24px auto;
cursor: pointer;
}
.app-container{
::v-deep .app-container-hd{
margin-bottom: 0;
......@@ -235,14 +258,17 @@ export default {
}
.card-box{
position: relative;
padding-bottom: 0;
}
.tips{
font-size: 14px;
color: #222222;
margin-bottom: 16px;
margin-top: 16px;
}
.btn-box{
width: 100%;
padding-bottom: 16px;
// padding: 0 16px;
background: #fff;
box-sizing: border-box;
......
<template>
<div class="trigger-box">
<app-container title="用户触达" class="trigger-top">
<el-steps :space="200" :active="active" process-status="wait">
<!-- <el-steps :space="200" :active="active" process-status="wait">
<el-step title="触达方式"></el-step>
<el-step title="文案编辑"></el-step>
</el-steps>
</el-steps> -->
<div class="steps-box">
<div :class="active == 0 ? 'ste active1' : 'ste'">
<div class="icon" v-if="active == 0">1</div>
<div class="icons el-icon-circle-check" v-else></div>
<div class="name">触达方式</div>
</div>
<div class="cent-line"></div>
<div :class="active == 1 ? 'ste active1' : 'ste'">
<div class="icon">2</div>
<div class="name">文案编辑</div>
</div>
</div>
</app-container>
<app-container class="trigger-mian">
<template v-if="!active">
......@@ -29,6 +41,20 @@
</div>
</div>
</template>
<dialogs :data="dialogParam" v-if="isDialog" @dialogClose="dialogClose">
<template #btn>
<div class="dialogs-btn" @click="isDialog = false">确定</div>
</template>
</dialogs>
<dialogs :data="dialogParam2" v-if="isDialog2" @dialogClose="isDialog2 = false">
<template #btn>
<!-- <div class="dialogs-btn" @click="isDialog = false">确定</div> -->
<div class="dialogs-btn-box">
<div class="dialogs-btns" @click="isDialog2 = false">留在此页</div>
<div class="dialogs-btns" @click="diaEvent">确认进入</div>
</div>
</template>
</dialogs>
</app-container>
</div>
</template>
......@@ -38,6 +64,7 @@ import AppContainer from '@/components/AppContainer'
import currentCard from '../groupAnalysis/components/currentCard'
import step1 from './components/step1'
import step2 from './components/step2'
import dialogs from '@/components/dialog'
import * as api from '@/api/common.js'
export default {
......@@ -45,7 +72,8 @@ export default {
AppContainer,
currentCard,
step1,
step2
step2,
dialogs
},
data() {
return {
......@@ -59,13 +87,33 @@ export default {
cgroup_id: '',
reach_way_id: '',
reach_date_id: ''
}
},
dialogParam: {
title: '您的触达方案有问题,请重新来过。',
url: 'https://zws-imgs-pub.ezijing.com/static/public/c627274a8c7e7c20b46cdd58a52da2dc.png'
},
isDialog: false,
isDialog2: false,
dialogParam2: {}
}
},
mounted() {
this.getCaseList()
},
methods: {
diaEvent() {
if (this.active === 0) {
this.active = 1
this.isDialog2 = false
} else {
this.$router.push({
path: '/caseSelection'
})
}
},
dialogClose() {
this.isDialog = false
},
// 跳转页面
goPage(path) {
this.$router.push({
......@@ -112,40 +160,43 @@ export default {
},
messageBox(n) {
if (n) {
this.$confirm('您做得很好,是否要进入文案编辑?', '提示', {
confirmButtonText: '确认进入',
cancelButtonText: '留在此页',
type: 'warning'
}).then(() => {
this.active = 1
}).catch(() => {
})
this.dialogParam2.title = '您做得很好,是否要进入文案编辑?'
this.dialogParam2.url = 'https://zws-imgs-pub.ezijing.com/static/public/b7248a82051a538614ab3e3fe188f9dd.png'
this.isDialog2 = true
// this.$confirm('您做得很好,是否要进入文案编辑?', '提示', {
// confirmButtonText: '确认进入',
// cancelButtonText: '留在此页',
// type: 'warning'
// }).then(() => {
// this.active = 1
// }).catch(() => {
// })
} else {
this.$alert('您的触达方案有问题,请重新来过。', '提示', {
confirmButtonText: '确定',
callback: action => {
}
})
this.isDialog = true
}
},
messageBox2(n) {
if (n) {
this.$confirm('您做得很好,是否要进入案例选择页面?', '提示', {
confirmButtonText: '确认进入',
cancelButtonText: '留在此页',
type: 'warning'
}).then(() => {
this.$router.push({
path: '/caseSelection'
})
}).catch(() => {
})
// this.$confirm('您做得很好,是否要进入案例选择页面?', '提示', {
// confirmButtonText: '确认进入',
// cancelButtonText: '留在此页',
// type: 'warning'
// }).then(() => {
// this.$router.push({
// path: '/caseSelection'
// })
// }).catch(() => {
// })
this.dialogParam2.title = '您做得很好,是否要进入案例选择页面?'
this.dialogParam2.url = 'https://zws-imgs-pub.ezijing.com/static/public/b7248a82051a538614ab3e3fe188f9dd.png'
this.isDialog2 = true
} else {
this.$alert('您的触达方案有问题,请重新来过。', '提示', {
confirmButtonText: '确定',
callback: action => {
}
})
this.isDialog = true
// this.$alert('您的触达方案有问题,请重新来过。', '提示', {
// confirmButtonText: '确定',
// callback: action => {
// }
// })
}
},
getTriggerList(id) {
......@@ -177,6 +228,90 @@ export default {
</script>
<style scoped lang="scss">
.steps-box{
display: flex;
align-items: center;
.ste{
display: flex;
align-items: center;
&.active1{
.icon{
width: 20px;
height: 20px;
background: #C01540;
border-radius: 50%;
font-size: 12px;
color: #FFFFFF;
line-height: 20px;
text-align: center;
border: 1px solid #C01540;
}
.name{
font-size: 14px;
color: #222;
line-height: 18px;
}
}
.icon{
box-sizing: border-box;
width: 20px;
height: 20px;
border: 1px solid #666;
border-radius: 50%;
font-size: 12px;
color: #666;
line-height: 20px;
text-align: center;
}
.name{
font-size: 14px;
color: #666666;
line-height: 18px;
margin-left: 10px;
}
.icons{
font-size: 22px;
color: #37A912;
}
}
.cent-line{
width: 137px;
height: 1px;
background: #DDDDDD;
margin: 0 10px;
}
}
.dialogs-btn-box{
width: 232px;
margin: 24px auto;
display: flex;
.dialogs-btns{
text-align: center;
width: 104px;
height: 32px;
background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%);
border-radius: 4px;
font-size: 14px;
color: #FFFFFF;
line-height: 32px;
cursor: pointer;
&:nth-child(2){
margin-left: auto;
}
}
}
.dialogs-btn{
text-align: center;
width: 76px;
height: 32px;
background: linear-gradient(315deg, rgba(225, 47, 116, 0.83) 0%, #C01540 100%);
border-radius: 4px;
font-size: 14px;
color: #FFFFFF;
line-height: 32px;
margin: 24px auto;
cursor: pointer;
}
.trigger-box{
height: 100%;
.trigger-top{
......@@ -184,7 +319,7 @@ export default {
}
.trigger-mian{
margin-top: 20px;
height: 70%;
height: 80%;
}
}
::v-deep .el-step__head.is-success{
......@@ -197,6 +332,7 @@ export default {
.btn-box{
width: 100%;
// padding: 0 16px;
// padding-bottom: 16px;
background: #fff;
box-sizing: border-box;
position: sticky;
......
......@@ -18,6 +18,13 @@ httpRequest.interceptors.request.use(
if (config.headers['Content-Type'] === 'application/x-www-form-urlencoded') {
config.data = qs.stringify(config.data)
}
if (config.headers['Content-Type'] === 'multipart/form-data') {
const params = new URLSearchParams()
for (const key in config.data) {
params.append('key', config.data[key])
}
params.data = params
}
return config
},
function(error) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论