Commit c78f8038 by 杨明

fixed

1 parent eb32bc5f
......@@ -118,7 +118,28 @@ const momentCancel = params => {
sign: true
})
}
//同步朋友圈状态
const createStatus = params => {
params.method = 'marketing.api.moment.sync.create.status'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
//同步朋友圈员工发送状态
const publicStatus = params => {
params.method = 'marketing.api.moment.sync.staff.public.status'
params.sessionId = session
return http({
url: '/rop-scrm-marketing/router',
method: 'POST',
data: params,
sign: true
})
}
export default {
momentDetail,
momentRemindUser,
......@@ -129,5 +150,7 @@ export default {
momentStaff,
momentStaffCustomers,
getListApi,
momentCancel
momentCancel,
createStatus,
publicStatus
}
......@@ -19,7 +19,7 @@ export const fetchConfig = function(isEnv = true) {
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
// return new Http({ Headers: { refererurl: location.href }, request: { timeout: 30000 } }).get('http://config-center-backend.test.glsx.com/glsxAdmin/config?moduleUrl=marketing').then(res => res.data)
// return new Http().get('https://oss-config.dev.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
}
......
......@@ -134,12 +134,19 @@ export default {
},
methods: {
handleRefresh: utils.debounce(function() {
this.getCustomerDetail()
this.publicStatus()
this.refreshStatus = true
setTimeout(() => {
this.refreshStatus = false
}, 1000)
}, 1000),
publicStatus() {
const id = this.$route.query.id
this.$apis.friendGroup.publicStatus({ id }).then(res => {
this.getCustomerDetail()
this.$emit('refreshList')
})
},
getCustomerDetail() {
const id = this.$route.query.id
this.$apis.friendGroup.momentDetail({ id }).then(res => {
......
<template>
<div>
<BasicInof :eventBus="eventBus" :id="$route.query.id" :form="'customer'"></BasicInof>
<BasicInof :id="$route.query.id" :form="'customer'" @refreshList="refreshList"></BasicInof>
<div class="detail-container">
<div class="detail-modular">
<div class="title">成员详情</div>
......@@ -131,6 +131,9 @@ export default {
this.searchForm.status = val
this.$refs.table.refreshTable()
},
refreshList() {
this.$refs.table.refreshTable()
},
handleCustomSelect(val) {
this.customIndex = val
this.getCustomerList(val)
......
......@@ -2,8 +2,17 @@
<template>
<div class="marketing pro-group">
<div class="m-b-20 friend-title">
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
<div>
<GLButton :size="size" type="primary" fn="编辑朋友圈" @click="handleEdit(1)">发布朋友圈</GLButton>
<span>管理员可直接在后台为员工创建朋友圈,员工收到朋友圈新消息提醒后,可快捷将管理员创建的朋友圈发送到自己朋友圈中。</span>
</div>
<div class="title">
<span class="info-refresh" @click="handleRefresh">
<i :class="{ 'el-icon-refresh': true, 'wait-status': refreshStatus }"></i>
更新数据
</span>
<span class="info-time">更新于{{ this.updatedTime }}</span>
</div>
</div>
<div class="container">
<!-- <div>
......@@ -68,10 +77,12 @@
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { utils } from 'glsx-common'
export default {
name: 'friendGroup',
data() {
return {
refreshStatus: false,
size: 'small',
loading: false,
url: url,
......@@ -85,6 +96,7 @@ export default {
downRules: {
offReason: [{ required: true, message: '请输入下架备注', trigger: 'change' }]
},
updatedTime: '',
// 分享
isShareVisible: false,
shareForm: {},
......@@ -300,6 +312,18 @@ export default {
},
methods: {
handleRefresh: utils.debounce(function() {
this.createStatus()
this.refreshStatus = true
setTimeout(() => {
this.refreshStatus = false
}, 1000)
}, 1000),
createStatus() {
this.$apis.friendGroup.createStatus({}).then(res => {
this.getListData()
})
},
getListData() {
this.loading = true
const params = {
......@@ -313,6 +337,7 @@ export default {
}
this.$apis.friendGroup.getListApi(params).then(res => {
this.loading = false
this.updatedTime = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss')
if (res) {
this.tableData = res.data
this.tableData.forEach(listM => {
......@@ -490,7 +515,27 @@ export default {
<style scoped lang="scss">
.friend-title {
display: flex;
justify-content: space-between;
align-items: center;
color: #666666;
.title {
.info-refresh {
font-size: 14px;
color: #5850ff;
cursor: pointer;
margin-left: 20px;
.wait-status {
transition: all ease-in 1s;
transform: rotate(360deg);
}
}
.info-time {
font-size: 14px;
color: #7d7d7d;
margin-left: 10px;
}
}
span {
font-size: 14px;
margin-left: 10px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!