Commit 8a9a50dd by 李伟康

修复分页BUG

1 parent 82f4f5c6
...@@ -141,10 +141,12 @@ export default { ...@@ -141,10 +141,12 @@ export default {
}, },
/**话术 */ /**话术 */
async getChatLibraryList () { async getChatLibraryList () {
const { params, list, $refs: {
scrollView
} } = this
this.showLoading() this.showLoading()
try { try {
const { params, list } = this, const { data, count } = await marketingApi.getChatLibraryList(params),
{ data, count } = await marketingApi.getChatLibraryList(params),
val = params.scriptContent || '', val = params.scriptContent || '',
rex = new RegExp(val, 'g') rex = new RegExp(val, 'g')
data.length && data.map(e => { data.length && data.map(e => {
...@@ -159,7 +161,7 @@ export default { ...@@ -159,7 +161,7 @@ export default {
this.list = list.concat(data) this.list = list.concat(data)
this.total = count this.total = count
this.hideLoading() this.hideLoading()
this.$refs.scrollView.loading = false if (scrollView) scrollView.loading = false
} catch (error) { } catch (error) {
this.hideLoading() this.hideLoading()
} }
......
...@@ -137,10 +137,12 @@ export default { ...@@ -137,10 +137,12 @@ export default {
}, },
methods: { methods: {
async getActivityReportLogList () { async getActivityReportLogList () {
const { params, list, $refs: {
scrollView
} } = this
this.showLoading() this.showLoading()
try { try {
const { params, list } = this, const { data, count } = await entmicroApi.getActivityReportLogList(params)
{ data, count } = await entmicroApi.getActivityReportLogList(params)
this.list = list.concat(data) this.list = list.concat(data)
this.total = count this.total = count
this.hideLoading() this.hideLoading()
...@@ -148,7 +150,7 @@ export default { ...@@ -148,7 +150,7 @@ export default {
this.hideLoading() this.hideLoading()
} }
this.flag = true this.flag = true
this.$refs.scrollView.loading = false if (scrollView) scrollView.loading = false
}, },
handleViewImage (i) { handleViewImage (i) {
this.paperInfo = i this.paperInfo = i
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!