Browse Source

修改聊天记录

zs 1 year ago
parent
commit
8182c70fff

+ 1 - 1
pages/customer/index.vue

@@ -134,7 +134,7 @@
 					...info,
 				})
 				if (res.errcode == '0') {
-					let list = [...that.msgList, ...res.data];
+					let list = [...res.data.reverse(), ...that.msgList];
 					that.$set(that, `msgList`, list)
 					that.$set(that, `total`, res.total)
 				} else {

+ 0 - 1
pages/home/index.vue

@@ -166,7 +166,6 @@
 						icon: 'none'
 					})
 				}
-
 			},
 			// 点击模块
 			toChange(item) {

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/customer/index.js.map


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/home/index.js.map


+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/customer/index.js

@@ -315,7 +315,7 @@ var _default = {
               case 6:
                 res = _context3.sent;
                 if (res.errcode == '0') {
-                  list = [].concat((0, _toConsumableArray2.default)(that.msgList), (0, _toConsumableArray2.default)(res.data));
+                  list = [].concat((0, _toConsumableArray2.default)(res.data.reverse()), (0, _toConsumableArray2.default)(that.msgList));
                   that.$set(that, "msgList", list);
                   that.$set(that, "total", res.total);
                 } else {