|
@@ -239,6 +239,8 @@ var _default = {
|
|
|
status: 1,
|
|
|
accountId: undefined
|
|
|
},
|
|
|
+ page: 1,
|
|
|
+ limit: 10,
|
|
|
items: []
|
|
|
};
|
|
|
},
|
|
@@ -249,7 +251,7 @@ var _default = {
|
|
|
this.accountId = accountId;
|
|
|
this.groupId = groupId;
|
|
|
this.init();
|
|
|
- this.getData();
|
|
|
+ this.getDangerByPage();
|
|
|
},
|
|
|
methods: {
|
|
|
formateGoafName: function formateGoafName(_ref) {
|
|
@@ -285,9 +287,6 @@ var _default = {
|
|
|
}).length;
|
|
|
});
|
|
|
},
|
|
|
- onPullDownRefresh: function onPullDownRefresh() {
|
|
|
- this.getData();
|
|
|
- },
|
|
|
getData: function getData() {
|
|
|
var _this2 = this;
|
|
|
var conditions = {
|
|
@@ -349,7 +348,40 @@ var _default = {
|
|
|
uni.navigateTo({
|
|
|
url: url
|
|
|
});
|
|
|
+ },
|
|
|
+ getDangerByPage: function getDangerByPage() {
|
|
|
+ var _this3 = this;
|
|
|
+ var page = this.page;
|
|
|
+ var conditions = {
|
|
|
+ status: this.conditions.status,
|
|
|
+ page: page,
|
|
|
+ limit: this.limit
|
|
|
+ };
|
|
|
+ var statusName = "submit";
|
|
|
+ if (this.conditions.status == 1) {
|
|
|
+ statusName = "review";
|
|
|
+ } else if (this.conditions.status == 2) {
|
|
|
+ statusName = "rectify";
|
|
|
+ } else if (this.conditions.status == 3) {
|
|
|
+ statusName = "accept";
|
|
|
+ }
|
|
|
+ if (this.type === 'user') {
|
|
|
+ conditions[statusName + "AccountId"] = this.accountId;
|
|
|
+ } else {
|
|
|
+ conditions[statusName + "GroupId"] = this.groupId;
|
|
|
+ }
|
|
|
+ (0, _dangerApi.getDangerByPage)(conditions).then(function (res) {
|
|
|
+ _this3.items = _this3.items.concat(_this3.items);
|
|
|
+ _this3.page++;
|
|
|
+ });
|
|
|
}
|
|
|
+ },
|
|
|
+ onPullDownRefresh: function onPullDownRefresh() {
|
|
|
+ this.page = 1;
|
|
|
+ this.getDangerByPage();
|
|
|
+ },
|
|
|
+ onReachBottom: function onReachBottom() {
|
|
|
+ this.getDangerByPage();
|
|
|
}
|
|
|
};
|
|
|
exports.default = _default;
|