Commit c6a87c5c by 高淑倩

modified:materialstyle

parent ad0fe209
......@@ -4621,7 +4621,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -5036,7 +5037,8 @@
"safe-buffer": {
"version": "5.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -5092,6 +5094,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "2.1.1"
}
......@@ -5135,12 +5138,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......
......@@ -3,3 +3,8 @@ import moment from 'moment'
export function fomatDate (value, format) {
return moment(value).format(format || 'YYYY-MM-DD HH:mm:ss')
}
export function formatedDate(date) {
if (!date) return ''
return (date + '').replace(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/, '$1-$2-$3 $4:$5:$6')
}
......@@ -10,9 +10,9 @@
体系下的精准消息推送</span>
</el-col>
<el-col :span="12" class="top-right">
<span><i class="el-icon-question"></i>微信营销推送怎么玩</span>
<span><i class="el-icon-question"></i>微信软文如何精准营销</span>
<span><i class="el-icon-question"></i>短信营销怎么配置</span>
<a style="color: #73879C;margin-right: 10px" target="_blank" href="http://help.bigaka.com/2017/08/31/%E6%80%8E%E6%A0%B7%E4%BD%BF%E7%94%A8%E5%BE%AE%E4%BF%A1%E6%A8%A1%E6%9D%BF%E6%B6%88%E6%81%AF%E8%90%A5%E9%94%80%EF%BC%9F/"><i class="el-icon-question"></i>微信营销推送怎么玩</a>
<a style="color: #73879C;margin-right: 10px" target="_blank" href="http://help.bigaka.com/2017/04/27/%E5%A6%82%E4%BD%95%E9%80%9A%E8%BF%87%E4%BC%9A%E5%91%98%E6%A0%87%E7%AD%BE%E5%AF%B9%E4%BC%9A%E5%91%98%E7%B2%BE%E5%87%86%E6%8A%95%E6%94%BE%E5%BE%AE%E4%BF%A1%E6%8E%A8%E9%80%81/"><i class="el-icon-question"></i>微信软文如何精准营销</a>
<a style="color: #73879C" target="_blank" href="http://help.bigaka.com/2017/08/31/%E6%80%8E%E6%A0%B7%E4%BD%BF%E7%94%A8%E7%9F%AD%E4%BF%A1%E8%90%A5%E9%94%80%EF%BC%9F/"><i class="el-icon-question"></i>短信营销怎么配置</a>
</el-col>
</el-row>
<el-row></el-row>
......@@ -53,6 +53,26 @@
</div>
</div>
</template>
<script>
import api from '@/tool/api'
const STATE_OK = 200
export default {
created() {
this.getAuth()
},
methods: {
async getAuth() {
await this.axios.get(api.getAuthState).then(res=> {
if(res&&res.status===STATE_OK){
console.log('auth', res.data)
}
})
}
}
}
</script>
<style lang='stylus' scoped>
.marketing-title
height 177px
......
......@@ -16,7 +16,6 @@
</template>
<script>
import api from '@/tool/api'
import MateriaList from './MateriaList'
import PushDetail from './PushList'
import MaterialDetails from './MaterialDetails'
......
......@@ -2,13 +2,38 @@
<div class="materialist clear">
<ul :style="{width: ulWidth}">
<li v-for="(item,index) in imgList" :key="index" @click="handleClick(item)" class="fl">
<img v-for="(mater,index) in item.content.news_item" :key="index" :src="mater.thumb_url">
<span v-if="item.content.news_item.length===1" v-for="(art,index) in item.content.news_item" :key="index">
<div>
<p style="white-space:normal;
word-break:break-all;
word-wrap:break-word;padding:15px 0 0 15px;height:45px">{{art.title}}</p>
<img :src="art.thumb_url" style="width:220px;height:120px;margin:5px 10px">
</div>
</span>
<span v-if="item.content.news_item.length===2" v-for="(art,index) in item.content.news_item" :key="index" class="two-item">
<div style="border-top:1px solid #eee;height:60px;">
<p style="width:185px;
white-space:normal;
word-break:break-all;
word-wrap:break-word;padding: 5px 0 0 5px;display:inline-block;">{{art.title}}</p>
<img style="width:40px;heigth:40px; margin-top: 8px;" :src="art.thumb_url">
</div>
</span>
<span v-if="item.content.news_item.length>2" v-for="(art,index) in item.content.news_item" :key="index" class="three-item">
<div class="dv clear">
<p>{{art.title}}</p>
<img :src="art.thumb_url">
</div>
</span>
</li>
</ul>
</div>
</template>
<script>
import { mapMutations } from 'vuex';
export default {
data () {
return {
......@@ -17,12 +42,14 @@ export default {
},
computed: {
ulWidth () {
return this.imgList.length * 240 + 80 + 'px'
return this.imgList.length * 247 + 100 + 'px'
}
},
props: ['imgList'],
methods: {
...mapMutations(['MEDIA_LIST']),
handleClick (item) {
this.MEDIA_LIST(item)
this.$emit('sendid', item.media_id)
}
}
......@@ -41,10 +68,62 @@ export default {
li
display inline-block
margin-left 5px
img
width 240px
height 200px
li img:hover
width 247px
height 195px
border 1px solid #eee
background #fff
.three-item
float left
div
width 247px
height 46px
border-bottom 1px solid #ccc
p
display inline-block
line-height 43px
img
width 30px
height 30px
float right
margin-top 6px
margin-right 5px
.two-item:nth-child(1)
div
height 132px !important
margin-bottom 5px
border-bottom 1px solid #eee
p
float left
position relative
top 99px
z-index 6622222
width 247px !important
background-color rgba(0,0,0,0.2)
padding 10px 0 !important
img
width 244px !important
height 131px !important
float left
margin-top -33px !important
.three-item:nth-child(1)
height 100px
border-bottom 1px solid #ccc
padding-bottom 5px
p
font-size 20px
position relative
top 58px
z-index 6622222
float left
width 247px
background-color rgba(0,0,0,0.2)
img
width 247px
float left
height 100px
position relative
top -49px
li:hover
border 2px solid skyblue
box-shadow 2px 2px 2px skyblue
/* 定义滚动条高宽及背景 */
......
......@@ -3,6 +3,28 @@
<el-row>
<el-col :span="6">
<div class="detail-left">
<div class="fl">
<span v-if="global.mediaList&&global.mediaList.content.news_item.length===1" v-for="(art,index) in global.mediaList.content.news_item" :key="index">
<div>
<p style="white-space:normal;
word-break:break-all;
word-wrap:break-word;padding:15px 0 0 15px">{{art.title}}</p>
<img :src="art.thumb_url" style="width:220px;height:120px;margin:15px 10px">
</div>
</span>
<span v-if="global.mediaList&&global.mediaList.content.news_item.length===2" v-for="(art,index) in global.mediaList.content.news_item" :key="index">
<div>
<p>{{art.title}}</p>
<img :src="art.thumb_url">
</div>
</span>
<span v-if="global.mediaList&&global.mediaList.content.news_item.length>2" v-for="(art,index) in global.mediaList.content.news_item" :key="index" class="three-item">
<div class="dv clear">
<p>{{art.title}}</p>
<img :src="art.thumb_url">
</div>
</span>
</div>
<!-- <img :src="materianImg" class="info-img"> -->
</div>
</el-col>
......@@ -13,6 +35,7 @@
</div>
</template>
<script>
import {mapState} from 'vuex'
import MaterialText from './MaterialText'
export default {
data () {
......@@ -23,6 +46,12 @@ export default {
props: ['MediaList'],
components: {
MaterialText
},
computed:{
...mapState(['global']),
item(){
return this.global.mediaList
}
}
}
</script>
......
......@@ -6,7 +6,7 @@
<div class="detail-top">
<span class="top-name detail-title">{{item.title}}</span>
<div class="top-right fr">
<span class="top-time detail-title">{{item.pushTime | fomatDate}}</span>
<span class="top-time detail-title">{{item.pushTime | formatedDate}}</span>
<span class="top-pushbtn">
<img src="@/assets/images/pushbtn.png">
<span class="top-state" v-if="item.status === 0">推送中</span>
......@@ -22,13 +22,13 @@
</span>
<span class="detail-title result-add">推送成功:</span> {{item.sentCount}}
</span>
<span v-if="item.status === -1" class="detail-title">失败原因: <span style="color:red">{{item.statusMsg}}</span> </span>
<span v-if="item.status === -1" class="detail-title">失败原因: <span style="color:red;overflow:hidden">{{item.statusMsg}}</span> </span>
<el-button class="fr" slot="reference" v-if="item.scope === 0">全体推送</el-button>
<el-popover placement="right" title="标签" width="200" trigger="click" v-if="item.scope === 1">
<div>
<button v-for="item in item.tagList" :key="item" class="detail-tagbtn">{{item}}</button>
</div>
<el-button class="fr" slot="reference">精准推送</el-button>
<el-button class="fr" slot="reference" style="color:blue">精准推送</el-button>
</el-popover>
</div>
<div class="detail-node">
......
......@@ -12,8 +12,8 @@ export default new Router({
component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/login'),
},
{
// path: '/salesCenter/activity/lotteryActivity.do',
path: '/',
path: '/salesCenter/activity/lotteryActivity.do',
// path: '/',
name: 'test',
component: () => import(/* web packChunkName: 'wxhome' */ '@/pages/home'),
children: [
......
......@@ -23,6 +23,8 @@ const HEADER_HISTORY = 'HEADER_HISTORY'
const MENU_HISTORY_JSON = 'MENU_HISTORY_JSON'
const MEDIA_LIST = 'MEDIA_LIST'
const state = {
menus: [],
editMenus: false,
......@@ -33,7 +35,8 @@ const state = {
menuHistoryJson: {
name: '',
value: []
}
},
mediaList: ''
}
const actions = {
......@@ -92,6 +95,9 @@ const getters = {
}
const mutations = {
[MEDIA_LIST](state, mediaList) {
state.mediaList = mediaList
},
[MENU_HISTORY_JSON](state, history) {
const {name, value} = history
// 判断是否是数组
......
export default {
getMenu: 'http://testcenter.bigaka.net/crm/back/menu/getMenu',
getAuthState: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/marketingPushAuthState',
// 营销中心
getMaterialsList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/materials-list', // 获取图文素材列表
getPushList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/medialist', // 获取图文推送列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment