if (jump == 0) {
await db.collection(CollectionName).orderBy('num','asc')
.where({
excel_name:excel_name,
phenomenon:condition[1]
}).limit(num).get().then(res =>{
let data = res.data
let length = data.length
num_record = length
for(let i=0;i<length;i++){
if (data[i].Quest1 != result_container) {
result_container = data[i].Quest1
if(result_container != null){
if (data[i].Answer1 == null) {
if (!tip_flag) {tip_flag = true}
tips.push(data[i].tips)
}else{
tips.push('no tips')
}
if (p_last < data[i].num) {p_last = data[i].num}
result.push(result_container)
}
}
}
})
}else{
await db.collection(CollectionName).orderBy('num','asc').skip(jump)
.where({
excel_name:excel_name,
phenomenon:condition[1]
}).limit(num).get().then(res =>{
let data = res.data
let length = data.length
num_record = length
for(let i=0;i<length;i++){
if (data[i].Quest1 != result_container) {
result_container = data[i].Quest1
if(result_container != null){
if (data[i].Answer1 == null) {
if (!tip_flag) {tip_flag = true}
tips.push(data[i].tips)
}else{
tips.push('no tips')
}
if (p_last < data[i].num) {p_last = data[i].num}
result.push(result_container)
}
}
}
})
}
这个从返回的save变量可以看出collection.skip不执行的,程序在调用云函数时依旧报错
小程序调试的时候报错,本地调试不报错,云端调试也不报错,麻了