微信小程序联调
This commit is contained in:
1
unpackage/dist/build/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../common/vendor.js"),t={data:()=>({isLoading:!0,loadMore:{contentdown:"",contentrefresh:"",contentnomore:""},readNewsLog:[],udbWhere:""}),onLoad(){this.readNewsLog=e.index.getStorageSync("readNewsLog")||[];let t=this.readNewsLog.map((({article_id:e})=>e));console.log(typeof t,t),this.udbWhere=`"_id" in ${JSON.stringify(t)}`,e.index.setNavigationBarTitle({title:this.$t("newsLog.navigationBarTitle")})},onPullDownRefresh(){this.refreshData()},onReachBottom(){this.$refs.udb.loadMore()},methods:{refreshData(){this.$refs.udb.loadData({clear:!0},(t=>{e.index.stopPullDownRefresh()}))},handleItemClick(t){e.index.navigateTo({url:"/pages/list/detail?id="+t._id+"&title="+t.title})}}};if(!Array){(e.resolveComponent("uni-dateformat")+e.resolveComponent("uni-list-item")+e.resolveComponent("uni-list")+e.resolveComponent("uni-load-state")+e.resolveComponent("unicloud-db"))()}Math||((()=>"../../../uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.js")+(()=>"../../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js")+(()=>"../../../uni_modules/uni-list/components/uni-list/uni-list.js")+(()=>"../../../components/uni-load-state/uni-load-state.js")+(()=>"../../../node-modules/@dcloudio/uni-components/lib/unicloud-db/unicloud-db.js"))();const o=e._export_sfc(t,[["render",function(t,o,i,a,n,s){return{a:e.w((({data:t,pagination:o,loading:i,hasMore:a,error:d},r,l)=>({a:e.f(t,((t,o,i)=>({a:e.t(t.title),b:"9ccf1f8a-3-"+l+"-"+i+",9ccf1f8a-2-"+l+"-"+i,c:e.p({date:n.readNewsLog[o].last_time,format:"yyyy-MM-dd hh:mm",threshold:[0,0]}),d:o,e:e.o((e=>s.handleItemClick(t)),o),f:"9ccf1f8a-2-"+l+"-"+i+",9ccf1f8a-1-"+l}))),b:"9ccf1f8a-1-"+l+",9ccf1f8a-0",c:"9ccf1f8a-4-"+l+",9ccf1f8a-0",d:e.p({state:{data:t,pagination:o,hasMore:a,loading:i,error:d}}),e:l,f:r})),{name:"d",path:"a",vueId:"9ccf1f8a-0"}),b:e.p({clickable:!0}),c:e.o(s.refreshData,"49"),d:e.sr("udb","9ccf1f8a-0"),e:e.o((e=>0==n.isLoading),"4f"),f:e.o((e=>0==n.isLoading),"7b"),g:e.p({where:n.udbWhere,collection:"opendb-news-articles",field:"title,_id","page-size":10})}}]]);wx.createPage(o);
|
||||
11
unpackage/dist/build/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.json
vendored
Normal file
11
unpackage/dist/build/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/build/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.wxml
vendored
Normal file
1
unpackage/dist/build/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="9ccf1f8a-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>
|
||||
1
unpackage/dist/build/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.wxss
vendored
Normal file
1
unpackage/dist/build/mp-weixin/pages-subpackage/ucenter/read-news-log/read-news-log.wxss
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.item{display:flex;flex-direction:column}.article-date{color:#c8c7cc}
|
||||
Reference in New Issue
Block a user