知識(shí)
不管是網(wǎng)站,軟件還是小程序,都要直接或間接能為您產(chǎn)生價(jià)值,我們在追求其視覺表現(xiàn)的同時(shí),更側(cè)重于功能的便捷,營銷的便利,運(yùn)營的高效,讓網(wǎng)站成為營銷工具,讓軟件能切實(shí)提升企業(yè)內(nèi)部管理水平和效率。優(yōu)秀的程序?yàn)楹笃谏?jí)提供便捷的支持!
小程序云函數(shù)中用group分組查詢,只能查詢20條,怎么解決?
發(fā)表時(shí)間:2019-9-24
發(fā)布人:葵宇科技
瀏覽次數(shù):52
小程序云函數(shù)中用group分組查詢,只能查詢20條,怎么解決?
用滾動(dòng)條每次加10加載,希望對(duì)您有幫助。
fetchNickYMCount: function() {
db.collection('findingList').aggregate()
.group({
_id: {
userName: '$userName',
writeYM: '$writeYM',
},
t: $.sum(1)
})
.sort({
_id:-1
})
.skip(this.data.s)
.limit(this.data.l)
.end()
.then(res => {
this.setData({
result: this.data.result.concat(res.list)
})
// console.log(this.data.result)
})
},
lower:function(){
this.setData({
s:this.data.s+10,
l:this.data.l+10
})
this.fetchNickYMCount()
},
WXML:
<scroll-view scroll-y="true" class="scoll-h" lower-threshold="100" bindscrolltolower="lower" style='height:878rpx;overflow-y: scroll;padding-top:1rpx;' >
<view class='history-table-wrap'>
<view class="table">
<view class="tr">
<view class="th th1">填寫人</view>
<view class="th th2">填寫年月</view>
<view class="th th3">共計(jì)</view>
</view>
<view class="tr" wx:for="{{result}}" wx:key="{{index}}">
<view class="td td1">{{item._id.userName}}</view>
<view class="td td2">{{item._id.writeYM}}</view>
<view class="td td3">{{item.t}}</view>
</view>
</view>
</view>
</scroll-view>
相關(guān)案例查看更多
相關(guān)閱讀
- 云南網(wǎng)絡(luò)營銷顧問
- 百度自然排名
- 區(qū)塊鏈
- 云南網(wǎng)站建設(shè)費(fèi)用
- 百度快速排名
- 百度小程序公司
- web
- 商標(biāo)注冊
- 云南小程序哪家好
- 昆明小程序代建
- 網(wǎng)頁制作
- 霸屏推廣
- 保山小程序開發(fā)
- 網(wǎng)站排名
- 汽車回收管理
- 人人商城
- 小程序被騙退款成功
- 支付寶小程序被騙
- 汽車報(bào)廢拆解管理系統(tǒng)
- Web開發(fā)框架
- python開發(fā)小程序
- 微信分銷
- 報(bào)廢車拆解軟件
- 汽車拆解管理軟件
- 云南小程序商城
- 網(wǎng)站建設(shè)公司哪家好
- 云南小程序開發(fā)推薦
- 紅河小程序開發(fā)
- 汽車回收系統(tǒng)
- 小程序開發(fā)聯(lián)系方式