欧美三级国产三级日韩三级_亚洲熟妇丰满大屁股熟妇_欧美亚洲成人一区二区三区_国产精品久久久久久模特

小程序云函數(shù)中用group分組查詢,只能查詢20條,怎么解決? - 新聞資訊 - 云南小程序開發(fā)|云南軟件開發(fā)|云南網(wǎng)站建設(shè)-昆明葵宇信息科技有限公司

159-8711-8523

云南網(wǎng)建設(shè)/小程序開發(fā)/軟件開發(fā)

知識

不管是網(wǎng)站,軟件還是小程序,都要直接或間接能為您產(chǎn)生價值,我們在追求其視覺表現(xiàn)的同時,更側(cè)重于功能的便捷,營銷的便利,運營的高效,讓網(wǎng)站成為營銷工具,讓軟件能切實提升企業(yè)內(nèi)部管理水平和效率。優(yōu)秀的程序為后期升級提供便捷的支持!

您當(dāng)前位置>首頁 » 新聞資訊 » 技術(shù)分享 >

小程序云函數(shù)中用group分組查詢,只能查詢20條,怎么解決?

發(fā)表時間:2019-9-24

發(fā)布人:葵宇科技

瀏覽次數(shù):52

小程序云函數(shù)中用group分組查詢,只能查詢20條,怎么解決?

用滾動條每次加10加載,希望對您有幫助。

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">共計</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)案例查看更多