微信小程序发布试用版本
This commit is contained in:
122
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.js
vendored
Normal file
122
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.js
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
isLoading: true,
|
||||
loadMore: {
|
||||
contentdown: "",
|
||||
contentrefresh: "",
|
||||
contentnomore: ""
|
||||
},
|
||||
readNewsLog: [],
|
||||
udbWhere: ""
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.readNewsLog = common_vendor.index.getStorageSync("readNewsLog") || [];
|
||||
let readNewsLogIds = this.readNewsLog.map(({ article_id }) => article_id);
|
||||
common_vendor.index.__f__("log", "at pages-subpackage/ucenter/read-news-log/read-news-log.vue:40", typeof readNewsLogIds, readNewsLogIds);
|
||||
this.udbWhere = `"_id" in ${JSON.stringify(readNewsLogIds)}`;
|
||||
common_vendor.index.setNavigationBarTitle({
|
||||
title: this.$t("newsLog.navigationBarTitle")
|
||||
});
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.refreshData();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.$refs.udb.loadMore();
|
||||
},
|
||||
methods: {
|
||||
refreshData() {
|
||||
this.$refs.udb.loadData({
|
||||
clear: true
|
||||
}, (res) => {
|
||||
common_vendor.index.stopPullDownRefresh();
|
||||
});
|
||||
},
|
||||
handleItemClick(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/list/detail?id=" + item._id + "&title=" + item.title
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_dateformat2 = common_vendor.resolveComponent("uni-dateformat");
|
||||
const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item");
|
||||
const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list");
|
||||
const _easycom_uni_load_state2 = common_vendor.resolveComponent("uni-load-state");
|
||||
const _easycom_unicloud_db2 = common_vendor.resolveComponent("unicloud-db");
|
||||
(_easycom_uni_dateformat2 + _easycom_uni_list_item2 + _easycom_uni_list2 + _easycom_uni_load_state2 + _easycom_unicloud_db2)();
|
||||
}
|
||||
const _easycom_uni_dateformat = () => "../../../uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.js";
|
||||
const _easycom_uni_list_item = () => "../../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js";
|
||||
const _easycom_uni_list = () => "../../../uni_modules/uni-list/components/uni-list/uni-list.js";
|
||||
const _easycom_uni_load_state = () => "../../../components/uni-load-state/uni-load-state.js";
|
||||
const _easycom_unicloud_db = () => "../../../node-modules/@dcloudio/uni-components/lib/unicloud-db/unicloud-db.js";
|
||||
if (!Math) {
|
||||
(_easycom_uni_dateformat + _easycom_uni_list_item + _easycom_uni_list + _easycom_uni_load_state + _easycom_unicloud_db)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.w(({
|
||||
data,
|
||||
pagination,
|
||||
loading,
|
||||
hasMore,
|
||||
error
|
||||
}, s0, i0) => {
|
||||
return {
|
||||
a: common_vendor.f(data, (item, index, i1) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: "42bb1b1c-3-" + i0 + "-" + i1 + "," + ("42bb1b1c-2-" + i0 + "-" + i1),
|
||||
c: common_vendor.p({
|
||||
date: $data.readNewsLog[index].last_time,
|
||||
format: "yyyy-MM-dd hh:mm",
|
||||
threshold: [0, 0]
|
||||
}),
|
||||
d: index,
|
||||
e: common_vendor.o(($event) => $options.handleItemClick(item), index),
|
||||
f: "42bb1b1c-2-" + i0 + "-" + i1 + "," + ("42bb1b1c-1-" + i0)
|
||||
};
|
||||
}),
|
||||
b: "42bb1b1c-1-" + i0 + ",42bb1b1c-0",
|
||||
c: "42bb1b1c-4-" + i0 + ",42bb1b1c-0",
|
||||
d: common_vendor.p({
|
||||
state: {
|
||||
data,
|
||||
pagination,
|
||||
hasMore,
|
||||
loading,
|
||||
error
|
||||
}
|
||||
}),
|
||||
e: i0,
|
||||
f: s0
|
||||
};
|
||||
}, {
|
||||
name: "d",
|
||||
path: "a",
|
||||
vueId: "42bb1b1c-0"
|
||||
}),
|
||||
b: common_vendor.p({
|
||||
clickable: true
|
||||
}),
|
||||
c: common_vendor.o($options.refreshData),
|
||||
d: common_vendor.sr("udb", "42bb1b1c-0"),
|
||||
e: common_vendor.o(($event) => $data.isLoading == false),
|
||||
f: common_vendor.o(($event) => $data.isLoading == false),
|
||||
g: common_vendor.p({
|
||||
where: $data.udbWhere,
|
||||
collection: "opendb-news-articles",
|
||||
field: "title,_id",
|
||||
["page-size"]: 10
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.js.map
|
||||
11
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.json
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "阅读记录",
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"uni-dateformat": "../../../uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat",
|
||||
"uni-list-item": "../../../uni_modules/uni-list/components/uni-list-item/uni-list-item",
|
||||
"uni-list": "../../../uni_modules/uni-list/components/uni-list/uni-list",
|
||||
"uni-load-state": "../../../components/uni-load-state/uni-load-state",
|
||||
"unicloud-db": "../../../node-modules/@dcloudio/uni-components/lib/unicloud-db/unicloud-db"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="container"><unicloud-db wx:if="{{g}}" class="r" u-s="{{['d']}}" u-r="udb" bindload="{{e}}" binderror="{{f}}" u-i="42bb1b1c-0" bind:__l="__l" u-p="{{g}}"><view wx:for="{{a}}" wx:for-item="v0" wx:key="e" slot="{{v0.f}}"><uni-list u-s="{{['d']}}" u-i="{{v0.b}}" bind:__l="__l"><uni-list-item wx:for="{{v0.a}}" wx:for-item="item" wx:key="d" u-s="{{['body']}}" bindclick="{{item.e}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{b}}"><view class="item" slot="body"><text>{{item.a}}</text><uni-dateformat wx:if="{{item.c}}" class="article-date" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"/></view></uni-list-item></uni-list><uni-load-state wx:if="{{v0.d}}" bindnetworkResume="{{c}}" u-i="{{v0.c}}" bind:__l="__l" u-p="{{v0.d}}"></uni-load-state></view></unicloud-db></view>
|
||||
8
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.wxss
vendored
Normal file
8
unpackage/dist/dev/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.wxss
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
.item{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.article-date {
|
||||
color: #C8C7CC;
|
||||
}
|
||||
Reference in New Issue
Block a user