Commit c78f8038 by 杨明

fixed

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