Commit c6a87c5c by 高淑倩

modified:materialstyle

parent ad0fe209
...@@ -4621,7 +4621,8 @@ ...@@ -4621,7 +4621,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -5036,7 +5037,8 @@ ...@@ -5036,7 +5037,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -5092,6 +5094,7 @@ ...@@ -5092,6 +5094,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "2.1.1" "ansi-regex": "2.1.1"
} }
...@@ -5135,12 +5138,14 @@ ...@@ -5135,12 +5138,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
......
...@@ -3,3 +3,8 @@ import moment from 'moment' ...@@ -3,3 +3,8 @@ import moment from 'moment'
export function fomatDate (value, format) { export function fomatDate (value, format) {
return moment(value).format(format || 'YYYY-MM-DD HH:mm:ss') 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 @@ ...@@ -10,9 +10,9 @@
体系下的精准消息推送</span> 体系下的精准消息推送</span>
</el-col> </el-col>
<el-col :span="12" class="top-right"> <el-col :span="12" class="top-right">
<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>
<span><i class="el-icon-question"></i>微信软文如何精准营销</span> <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>
<span><i class="el-icon-question"></i>短信营销怎么配置</span> <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-col>
</el-row> </el-row>
<el-row></el-row> <el-row></el-row>
...@@ -53,6 +53,26 @@ ...@@ -53,6 +53,26 @@
</div> </div>
</div> </div>
</template> </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> <style lang='stylus' scoped>
.marketing-title .marketing-title
height 177px height 177px
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
</template> </template>
<script> <script>
import api from '@/tool/api' import api from '@/tool/api'
import MateriaList from './MateriaList' import MateriaList from './MateriaList'
import PushDetail from './PushList' import PushDetail from './PushList'
import MaterialDetails from './MaterialDetails' import MaterialDetails from './MaterialDetails'
......
...@@ -2,13 +2,38 @@ ...@@ -2,13 +2,38 @@
<div class="materialist clear"> <div class="materialist clear">
<ul :style="{width: ulWidth}"> <ul :style="{width: ulWidth}">
<li v-for="(item,index) in imgList" :key="index" @click="handleClick(item)" class="fl"> <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> </li>
</ul> </ul>
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from 'vuex';
export default { export default {
data () { data () {
return { return {
...@@ -17,12 +42,14 @@ export default { ...@@ -17,12 +42,14 @@ export default {
}, },
computed: { computed: {
ulWidth () { ulWidth () {
return this.imgList.length * 240 + 80 + 'px' return this.imgList.length * 247 + 100 + 'px'
} }
}, },
props: ['imgList'], props: ['imgList'],
methods: { methods: {
...mapMutations(['MEDIA_LIST']),
handleClick (item) { handleClick (item) {
this.MEDIA_LIST(item)
this.$emit('sendid', item.media_id) this.$emit('sendid', item.media_id)
} }
} }
...@@ -41,10 +68,62 @@ export default { ...@@ -41,10 +68,62 @@ export default {
li li
display inline-block display inline-block
margin-left 5px margin-left 5px
img width 247px
width 240px height 195px
height 200px border 1px solid #eee
li img:hover 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 border 2px solid skyblue
box-shadow 2px 2px 2px skyblue box-shadow 2px 2px 2px skyblue
/* 定义滚动条高宽及背景 */ /* 定义滚动条高宽及背景 */
......
...@@ -3,6 +3,28 @@ ...@@ -3,6 +3,28 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<div class="detail-left"> <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"> --> <!-- <img :src="materianImg" class="info-img"> -->
</div> </div>
</el-col> </el-col>
...@@ -13,6 +35,7 @@ ...@@ -13,6 +35,7 @@
</div> </div>
</template> </template>
<script> <script>
import {mapState} from 'vuex'
import MaterialText from './MaterialText' import MaterialText from './MaterialText'
export default { export default {
data () { data () {
...@@ -23,6 +46,12 @@ export default { ...@@ -23,6 +46,12 @@ export default {
props: ['MediaList'], props: ['MediaList'],
components: { components: {
MaterialText MaterialText
},
computed:{
...mapState(['global']),
item(){
return this.global.mediaList
}
} }
} }
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="detail-top"> <div class="detail-top">
<span class="top-name detail-title">{{item.title}}</span> <span class="top-name detail-title">{{item.title}}</span>
<div class="top-right fr"> <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"> <span class="top-pushbtn">
<img src="@/assets/images/pushbtn.png"> <img src="@/assets/images/pushbtn.png">
<span class="top-state" v-if="item.status === 0">推送中</span> <span class="top-state" v-if="item.status === 0">推送中</span>
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
</span> </span>
<span class="detail-title result-add">推送成功:</span> {{item.sentCount}} <span class="detail-title result-add">推送成功:</span> {{item.sentCount}}
</span> </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-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"> <el-popover placement="right" title="标签" width="200" trigger="click" v-if="item.scope === 1">
<div> <div>
<button v-for="item in item.tagList" :key="item" class="detail-tagbtn">{{item}}</button> <button v-for="item in item.tagList" :key="item" class="detail-tagbtn">{{item}}</button>
</div> </div>
<el-button class="fr" slot="reference">精准推送</el-button> <el-button class="fr" slot="reference" style="color:blue">精准推送</el-button>
</el-popover> </el-popover>
</div> </div>
<div class="detail-node"> <div class="detail-node">
......
...@@ -12,8 +12,8 @@ export default new Router({ ...@@ -12,8 +12,8 @@ export default new Router({
component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/login'), component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/login'),
}, },
{ {
// path: '/salesCenter/activity/lotteryActivity.do', path: '/salesCenter/activity/lotteryActivity.do',
path: '/', // path: '/',
name: 'test', name: 'test',
component: () => import(/* web packChunkName: 'wxhome' */ '@/pages/home'), component: () => import(/* web packChunkName: 'wxhome' */ '@/pages/home'),
children: [ children: [
......
...@@ -23,6 +23,8 @@ const HEADER_HISTORY = 'HEADER_HISTORY' ...@@ -23,6 +23,8 @@ const HEADER_HISTORY = 'HEADER_HISTORY'
const MENU_HISTORY_JSON = 'MENU_HISTORY_JSON' const MENU_HISTORY_JSON = 'MENU_HISTORY_JSON'
const MEDIA_LIST = 'MEDIA_LIST'
const state = { const state = {
menus: [], menus: [],
editMenus: false, editMenus: false,
...@@ -33,7 +35,8 @@ const state = { ...@@ -33,7 +35,8 @@ const state = {
menuHistoryJson: { menuHistoryJson: {
name: '', name: '',
value: [] value: []
} },
mediaList: ''
} }
const actions = { const actions = {
...@@ -92,6 +95,9 @@ const getters = { ...@@ -92,6 +95,9 @@ const getters = {
} }
const mutations = { const mutations = {
[MEDIA_LIST](state, mediaList) {
state.mediaList = mediaList
},
[MENU_HISTORY_JSON](state, history) { [MENU_HISTORY_JSON](state, history) {
const {name, value} = history const {name, value} = history
// 判断是否是数组 // 判断是否是数组
......
export default { export default {
getMenu: 'http://testcenter.bigaka.net/crm/back/menu/getMenu', 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', // 获取图文素材列表 getMaterialsList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/materials-list', // 获取图文素材列表
getPushList: 'http://testcenter.bigaka.net/crm/back/wechat/msg-mass/medialist', // 获取图文推送列表 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