Merge branch 'main' of http://git.zihai.cn/szj1219/JiaZhiQianYan-MiniProgram
# Conflicts: # unpackage/dist/dev/.sourcemap/mp-weixin/app.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/common/assets.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/components/LCCalendar/LCCalendar.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pages/geGuCenter/geGuCenter.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/pagesStock/stockCenterDetails/bkydmx.js.map # unpackage/dist/dev/.sourcemap/mp-weixin/uni_modules/uni-popup/components/uni-popup/uni-popup.js.map # unpackage/dist/dev/mp-weixin/common/assets.js # unpackage/dist/dev/mp-weixin/common/vendor.js # unpackage/dist/dev/mp-weixin/components/zysj-view/zysj-view.js # unpackage/dist/dev/mp-weixin/pages/geGuCenter/geGuCenter.wxml # unpackage/dist/dev/mp-weixin/pages/mine/mine.js # unpackage/dist/dev/mp-weixin/pages/ztfx/ztfx.js # unpackage/dist/dev/mp-weixin/pagesMine/vip/vip.js # unpackage/dist/dev/mp-weixin/pagesMine/vipMeal/vipMeal.js # unpackage/dist/dev/mp-weixin/pagesStock/stockCenterDetails/bkydmx.js # unpackage/dist/dev/mp-weixin/pagesStock/stockCenterDetails/bkydmx.wxml # unpackage/dist/dev/mp-weixin/pagesStock/stockCenterDetails/cwDetails.js # unpackage/dist/dev/mp-weixin/pagesStock/stockCenterDetails/stockCenterDetails.js # unpackage/dist/dev/mp-weixin/pagesStock/stockCenterDetails/ztfx.js
This commit is contained in:
@@ -1,96 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const request_api = require("../../../request/api.js");
|
||||
const utils_util = require("../../../utils/util.js");
|
||||
const common_assets = require("../../../common/assets.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
navH: common_vendor.inject("navHeight"),
|
||||
myLikeList: [],
|
||||
page: 1,
|
||||
loadAll: false,
|
||||
getLocaleHourMinute: utils_util.getLocaleHourMinute
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getMyLikeListData();
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.page = 1;
|
||||
this.getMyLikeListData();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.loadAll) {
|
||||
this.page++;
|
||||
this.getMyLikeListData();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点赞评论
|
||||
*/
|
||||
clickLikeComment(id, index) {
|
||||
request_api.likeEventComment(id).then((res) => {
|
||||
common_vendor.index.showToast({
|
||||
title: res.message
|
||||
});
|
||||
this.myLikeList.splice(index, 1);
|
||||
}).catch((error) => {
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 获取我的点赞列表数据
|
||||
*/
|
||||
getMyLikeListData() {
|
||||
let param = { page: this.page, type: "likes" };
|
||||
request_api.userActivityList(param).then((res) => {
|
||||
if (res.code == 200) {
|
||||
if (res.data.current_page == 1) {
|
||||
this.myLikeList = res.data.activities;
|
||||
} else
|
||||
this.myLikeList = this.myLikeList.concat(res.data.activities);
|
||||
if (res.data.current_page == res.data.pages) {
|
||||
this.loadAll = true;
|
||||
}
|
||||
} else
|
||||
common_vendor.index.showToast({
|
||||
title: res.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch((error) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_navBar2 = common_vendor.resolveComponent("navBar");
|
||||
_easycom_navBar2();
|
||||
}
|
||||
const _easycom_navBar = () => "../../../components/navBar/navBar.js";
|
||||
if (!Math) {
|
||||
_easycom_navBar();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.p({
|
||||
leftText: "我的点赞"
|
||||
}),
|
||||
b: common_assets._imports_0,
|
||||
c: common_vendor.f($data.myLikeList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.author.avatar_url,
|
||||
b: common_vendor.t(item.author.nickname),
|
||||
c: item.post_content,
|
||||
d: common_vendor.t($data.getLocaleHourMinute(item.like_time)),
|
||||
e: common_vendor.o(($event) => $options.clickLikeComment(item.like_id, index), index),
|
||||
f: index
|
||||
};
|
||||
}),
|
||||
d: common_assets._imports_1$6,
|
||||
e: common_vendor.s("top:" + $data.navH + "px;")
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/mine/myLike/myLike.js.map
|
||||
Reference in New Issue
Block a user