Commit fddb0ee7 by 王志慧
2 parents 8e6ba13f 1ab425a8
const url = '/rop-scrm-entmicro/router'
export default {
/**全部活码接口 */
getAllEntmicroChannelCodeList(data){
data.method = 'entmicro.api.code.listStaffEntmicroChannelCodeList'
return window.$HTTP({
url,
data,
returnAll: true
})
},
/**引流获客列表 */
getEntmicroChannelCodeList(data) {
data.method = 'entmicro.api.code.listEntmicroChannelCodeList'
......
......@@ -2,6 +2,10 @@
<div class="layout">
<div class="search sticky">
<search @search="search" />
<tab
:list="['全部活码','我的活码']"
@change="change"
></tab>
</div>
<scroll-view
class="content"
......@@ -73,15 +77,21 @@ export default {
}
},
mounted() {
this.getList()
this.getList(0)
},
methods: {
getList() {
change(e) {
this.flag = false
this.list = []
this.getList(e)
},
getList(index) {
let { codeNameOrStaffName } = this
let obj = {}
if (codeNameOrStaffName) obj.codeNameOrStaffName = codeNameOrStaffName
this.showLoading()
entmicroApi.getEntmicroChannelCodeList(obj).then(({ code, data, message }) => {
let target = ['getAllEntmicroChannelCodeList', 'getEntmicroChannelCodeList'][index]
entmicroApi[target](obj).then(({ code, data, message }) => {
this.hideLoading()
if (code == '0') {
data.map(e => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!