solve conflicts
This commit is contained in:
@@ -2,6 +2,7 @@ export default {
|
||||
data() {
|
||||
let that = this;
|
||||
return {
|
||||
height: 0,
|
||||
config: {
|
||||
page: 1
|
||||
},
|
||||
@@ -9,8 +10,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
console.log("jonas");
|
||||
this.getData();
|
||||
this.getBodyHeight();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
@@ -19,11 +20,8 @@ export default {
|
||||
getData() {
|
||||
let options = _.extend({}, this.config, this.options),
|
||||
that = this;
|
||||
console.log("GETTTTTTTTTT");
|
||||
|
||||
this.options.requestFunction(options)
|
||||
.then((data) => {
|
||||
console.log("jonas vue car view");
|
||||
that.data = data.data;
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -34,7 +32,21 @@ export default {
|
||||
* Get data when press the button more view
|
||||
*/
|
||||
viewMore() {
|
||||
let options = _.extend({}, this.config, this.options, { page: this.config.page + 1 }),
|
||||
that = this;
|
||||
this.options.requestFunctionViewMore(options)
|
||||
.then((data) => {
|
||||
if (data.data && data.data.length != 0) {
|
||||
that.data = that.data.concat(data.data);
|
||||
that.config.page += 1;
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
getBodyHeight() {
|
||||
this.height = window.innerHeight - this.$root.$el.clientHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user