|
@@ -12,7 +12,7 @@
|
|
|
进行定制化导出
|
|
|
</p>
|
|
|
<div class="export-dialog-wx">
|
|
|
- <img :src="getWxCustom" alt="" />
|
|
|
+ <img :src="kefuInfo.wxer" alt="" />
|
|
|
</div>
|
|
|
<p class="wx-code-label">客服微信</p>
|
|
|
<el-button @click="$emit('setExport')" class="export-continue-btn"
|
|
@@ -27,7 +27,8 @@
|
|
|
|
|
|
<script>
|
|
|
import { Button, Checkbox } from 'element-ui'
|
|
|
-import { mapState } from 'vuex'
|
|
|
+// import { mapState } from 'vuex'
|
|
|
+import { getCustomInfo } from '@/api/modules/'
|
|
|
export default {
|
|
|
name: 'export-dialog-container',
|
|
|
components: {
|
|
@@ -36,30 +37,48 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- agreement: false
|
|
|
+ agreement: false,
|
|
|
+ kefuInfo: {}
|
|
|
}
|
|
|
},
|
|
|
+ created () {
|
|
|
+ this.getKefuInfo()
|
|
|
+ },
|
|
|
watch: {
|
|
|
agreement(newval) {
|
|
|
this.$emit('checkBoxChange', newval)
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState({
|
|
|
- info: (state) => state.user.info
|
|
|
- }),
|
|
|
- getWxCustom() {
|
|
|
- const customers = this.info.customers
|
|
|
- if (customers && customers.length > 0) {
|
|
|
- const getWxCode = customers.filter((v) => v.name === '高静')
|
|
|
- if (getWxCode && getWxCode.length > 0) {
|
|
|
- return getWxCode[0].wxer
|
|
|
- } else {
|
|
|
- return ''
|
|
|
- }
|
|
|
- } else {
|
|
|
- return ''
|
|
|
+ // ...mapState({
|
|
|
+ // info: (state) => state.user.info
|
|
|
+ // }),
|
|
|
+ // getWxCustom() {
|
|
|
+ // const customers = this.info.customers
|
|
|
+ // if (customers && customers.length > 0) {
|
|
|
+ // const getWxCode = customers.filter((v) => v.name === '高静')
|
|
|
+ // if (getWxCode && getWxCode.length > 0) {
|
|
|
+ // return getWxCode[0].wxer
|
|
|
+ // } else {
|
|
|
+ // return ''
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // return ''
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 获取客服二维码信息
|
|
|
+ getKefuInfo () {
|
|
|
+ const params = {
|
|
|
+ type: 'kf'
|
|
|
}
|
|
|
+ getCustomInfo(params).then(res => {
|
|
|
+ const { error_code: code, data } = res
|
|
|
+ if(code === 0 && data) {
|
|
|
+ this.kefuInfo = data
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|