获取价格范围.find猫鼬节点js

我要创建几个按钮来指示不同的价格范围,当我按下其中的一个按钮时,我只会获得该范围内的产品,而我仅成功获得了一个数字,问题是查找价格的语法是什么?数字范围

。查找查询:

 if(req.query.$){
    Food.find({price: 111},function(err,allFood){
        if(err){
            console.log(err);
            req.flash("error",err.message);
            redirect("back");
        }
        else{

            if(allFood.length < 1){
                noMatch = "No Matches for this search,please try again"
            }
            res.render("food/index",{food:allFood,noMatch: noMatch} );
        }
    });
}

按钮:

<form action="/gallery" method="GET"  class="form-inline mb-3 float-right">
            <div class="form-group ">
                <input type="submit" name="$" value="$" class=" btn btn-sm roundButton aqua-gradient btn-rounded">     
            </div>
        </form>
wxryyb 回答:获取价格范围.find猫鼬节点js

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3089952.html

大家都在问