|
@@ -237,22 +237,7 @@ var _default = {
|
|
|
return {
|
|
|
user: {},
|
|
|
// 获赞数
|
|
|
- list: [{
|
|
|
- title: "点赞",
|
|
|
- route: '/pagesIndex/like/index',
|
|
|
- type: '0',
|
|
|
- num: 0
|
|
|
- }, {
|
|
|
- title: "评论",
|
|
|
- route: '/pagesIndex/comment/index',
|
|
|
- type: '2',
|
|
|
- num: 0
|
|
|
- }, {
|
|
|
- title: "收藏",
|
|
|
- route: '/pagesIndex/collect/index',
|
|
|
- type: '1',
|
|
|
- num: 0
|
|
|
- }],
|
|
|
+ list: [],
|
|
|
// 订单图标菜单
|
|
|
orderList: [],
|
|
|
// 菜单
|
|
@@ -323,13 +308,26 @@ var _default = {
|
|
|
search: function search() {
|
|
|
var _this = this;
|
|
|
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
|
- var that;
|
|
|
+ var that, res;
|
|
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
|
while (1) {
|
|
|
switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
that = _this;
|
|
|
- case 1:
|
|
|
+ _context3.next = 3;
|
|
|
+ return that.$api("/user/statistics", 'GET', {
|
|
|
+ user: that.user._id
|
|
|
+ });
|
|
|
+ case 3:
|
|
|
+ res = _context3.sent;
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ that.$set(that, "list", res.data);
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg
|
|
|
+ });
|
|
|
+ }
|
|
|
+ case 5:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
@@ -357,7 +355,7 @@ var _default = {
|
|
|
},
|
|
|
// 点赞或收藏
|
|
|
toLike: function toLike(item) {
|
|
|
- var that = this;
|
|
|
+ console.log(item);
|
|
|
if (that.user && that.user._id) {
|
|
|
if (item.type == '2') {
|
|
|
uni.navigateTo({
|