


function query(self, queryParams){
	// return (self.beforeGetData && self.beforeGetData()) ||
	// queryParams || self.queryParams
	
	// 深度合并对象
	return self.$utils.deepMergeObject(
	
	self.$utils.deepMergeObject(self.queryParams,
	
	(self.beforeGetData && self.beforeGetData()) || {}),
	
	queryParams)
}



export default {
	data() {
		return {
			queryParams: {
				pageNo: 1,
				pageSize: 10,
			},
			total : 0,
			list : [],
		}
	},
	onPullDownRefresh() {
		this.getData()
	},
	onReachBottom() {
		this.loadMoreData()
	},
	onShow() {
		this.getData()
	},
	methods: {
		getData(queryParams){
			return new Promise((success, error) => {
				if(!this.mixinsListApi){
					return console.error('mixinsListApi 缺失');
				}
				this.$api(this.mixinsListApi, 
				query(this, queryParams), res => {
					uni.stopPullDownRefresh()
					if(res.code == 200){
						
						this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
						
						success(res.result)
						
						this[this.mixinsListKey || 'list'] = res.result.records
						
						this.total = res.result.total
					}
				})
			})
		},
		loadMoreData(){
			console.log('loadMoreData----', this.queryParams.pageSize < this.total);
			if(this.queryParams.pageSize < this.total){
				this.queryParams.pageSize += 10
				this.getData()
			}
		},
	}
}