ajax - thinkphp多条件筛选功能疑问?
phpcn_u1582
phpcn_u1582 2017-05-16 13:13:41
0
4
602

请问类似淘宝这种多条件筛选功能怎么组合筛选?我现在实现了大红框里面点击条件组合筛选的功能,但是输入框和里面的价格条件怎么和外面的条件去组合呢? 比如我要筛选 500-1000 价格范围内的女款电子表,求思路。谢谢

phpcn_u1582
phpcn_u1582

reply all (4)
左手右手慢动作

Your question is whether the front-end is implemented or the server is implemented. I guess it is the front-end implementation.

Then this query condition can be used to filter table data directly usingget方式,比如用户点击手表JavaScript中监听所有类别的点击事件,然后在当前urlfollowed by the corresponding field name and field value ofwatchto jump.

Similarly for the price, the operation logic when clicking the OK button is the same as clicking theWatch.

Taobao does not combine various filtering conditions at once and then query. Instead, click on a certain filtering condition to perform a filter refresh.

    曾经蜡笔没有小新

    Generally, parameters are passed through get method for filtering. After entering the price, there should be a confirm button. When clicking the confirm button, use js to get the current link, and then assemble the price link to jump.

      我想大声告诉你

      Use sql to combine where conditions to query the database, and then return the queried data to the front end

        世界只因有你

        Your question is a bit strange. There is essentially no difference between clicking and typing. They are both part of the form.
        As for how to check the database, you need to formulate sql according to your table structure.
        However, to achieve this function, you generally need to use a search engine. It is not very good to directly check the database, and it is too stressful.

          Latest Downloads
          More>
          Web Effects
          Website Source Code
          Website Materials
          Front End Template
          About us Disclaimer Sitemap
          php.cn:Public welfare online PHP training,Help PHP learners grow quickly!