Commit 3182af42 by Sixong.Zhu

自动滚动到底

parent 77a09347
Showing with 15 additions and 7 deletions
...@@ -156,7 +156,6 @@ ...@@ -156,7 +156,6 @@
o && n && this.messages.length o && n && this.messages.length
? this.fetchNewMsg() ? this.fetchNewMsg()
: setTimeout(() => this.fetchNewMsg(), 300); : setTimeout(() => this.fetchNewMsg(), 300);
this.scroll2End(this.messages.length ? 0 : 100);
} }
private raiseFileOpen(value: boolean) { private raiseFileOpen(value: boolean) {
...@@ -341,6 +340,9 @@ ...@@ -341,6 +340,9 @@
if (data.length === 0) { if (data.length === 0) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log("没有更多新消息了"); console.log("没有更多新消息了");
this.scroll2End();
} else {
setTimeout(() => this.fetchNewMsg(), 200);
} }
const removingIds: number[] = []; const removingIds: number[] = [];
......
...@@ -10,14 +10,14 @@ import { ...@@ -10,14 +10,14 @@ import {
UploadImageItem, UploadImageItem,
orderPayItemPredict, orderPayItemPredict,
OrderComment, OrderComment,
PayStatus PayStatus,
} from "../model"; } from "../model";
import { GeneralOrderDirection } from "../model/order-product"; import { GeneralOrderDirection } from "../model/order-product";
class OrderService { class OrderService {
public readonly generalOrder = "general_order_info"; public readonly generalOrder = "general_order_info";
public readonly generalOrderPaymentModel = "general_order_payment_info"; public readonly generalOrderPaymentModel = "general_order_payment_info";
public readonly generalOrderDefaultDetailName = 'userOrderDetail'; public readonly generalOrderDefaultDetailName = "userOrderDetail";
private readonly commentModel = "uniplat_model_remark@general_order"; private readonly commentModel = "uniplat_model_remark@general_order";
private readonly fileModel = "general_order_payment_file_info"; private readonly fileModel = "general_order_payment_file_info";
...@@ -138,11 +138,17 @@ class OrderService { ...@@ -138,11 +138,17 @@ class OrderService {
r.pageData.rows, r.pageData.rows,
orderPayItemPredict orderPayItemPredict
); );
items = items.filter(i => i.status !== PayStatus.Deleted && items = items.filter(
i.status !== PayStatus.Cancel) (i) =>
i.status !== PayStatus.Deleted &&
i.status !== PayStatus.Cancel
);
if (withActions) { if (withActions) {
for (let i = 0; i < r.pageData.rows.length; i++) { for (let i = 0; i < r.pageData.rows.length; i++) {
items[i].actions = r.pageData.rows[i].actions; r.pageData &&
r.pageData.rows &&
r.pageData.rows[i] &&
(items[i].actions = r.pageData.rows[i].actions);
} }
} }
...@@ -227,7 +233,7 @@ class OrderService { ...@@ -227,7 +233,7 @@ class OrderService {
.query(); .query();
} }
public sendPayAccountInfo(params: { send: string, type?: number }) { public sendPayAccountInfo(params: { send: string; type?: number }) {
return this.getSdk() return this.getSdk()
.domainService("hro_spview", "OrderSetting", "sendPayAccountInfo") .domainService("hro_spview", "OrderSetting", "sendPayAccountInfo")
.request("get", { params }); .request("get", { params });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment