1.26 个股详情业务结构,发展历程模块完善
This commit is contained in:
96
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.js
vendored
Normal file
96
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.js
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
"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$7,
|
||||
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
|
||||
6
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "",
|
||||
"usingComponents": {
|
||||
"nav-bar": "../../../components/navBar/navBar"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view><nav-bar wx:if="{{a}}" u-i="005f0838-0" bind:__l="__l" u-p="{{a}}"></nav-bar><image class="topBg absolute" src="{{b}}" mode="widthFix"></image><view class="list fixed" style="{{e}}"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" class="item"><image class="avatar" src="{{item.a}}" mode="aspectFill"></image><view class="flex1"><view class="nickname">{{item.b}}</view><rich-text class="content" nodes="{{item.c}}"></rich-text><view class="timeReplyLikeC flex between"><view class="timeReplyC flex"><view class="time">{{item.d}}</view></view><view class="likeC flex" bindtap="{{item.e}}"><image class="icon" src="{{d}}" mode="widthFix"></image></view></view></view></view></view></view>
|
||||
79
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxss
vendored
Normal file
79
unpackage/dist/dev/mp-weixin/pages/mine/myLike/myLike.wxss
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
.topBg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.list {
|
||||
background-color: white;
|
||||
margin-top: 10rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.list .item {
|
||||
display: flex;
|
||||
padding: 30rpx 25rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
}
|
||||
.list .item .avatar {
|
||||
margin-right: 23rpx;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.list .item .nickname {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #111;
|
||||
}
|
||||
.list .item .content {
|
||||
margin-top: 10rpx;
|
||||
line-height: 1.2rem;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
.list .item .timeReplyLikeC .time {
|
||||
margin-right: 36rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #aaa;
|
||||
}
|
||||
.list .item .timeReplyLikeC .reply {
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
.list .item .timeReplyLikeC .likeC {
|
||||
padding: 14rpx 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #999;
|
||||
}
|
||||
.list .item .timeReplyLikeC .likeC .icon {
|
||||
margin-right: 12rpx;
|
||||
width: 27rpx;
|
||||
height: auto;
|
||||
}
|
||||
.list .item .timeReplyLikeC .likeC.like {
|
||||
color: #F97316;
|
||||
}
|
||||
.list .item .totalCommentNumC {
|
||||
padding: 14rpx 0 22rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #999;
|
||||
}
|
||||
.list .item .totalCommentNumC .line {
|
||||
background-color: #aaa;
|
||||
margin-right: 18rpx;
|
||||
width: 30rpx;
|
||||
height: 2rpx;
|
||||
}
|
||||
.list .item .totalCommentNumC .arrow {
|
||||
margin-left: 14rpx;
|
||||
width: 13rpx;
|
||||
height: auto;
|
||||
}
|
||||
Reference in New Issue
Block a user