BazaarModel.class.php 695 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Common\Model;
  3. class BazaarModel extends \Think\Model
  4. {
  5. protected $keyS = 'Bazaar';
  6. public function get_market_mr()
  7. {
  8. $get_market_mr = M('BazaarConfig')->where(array('default' => 1))->getField('market');
  9. if (!$get_market_mr) {
  10. $get_market_mr = M('BazaarConfig')->where(array('status' => 1))->order('id asc')->getField('market');
  11. }
  12. return $get_market_mr;
  13. }
  14. public function get_market_list()
  15. {
  16. $get_market_list = M('BazaarConfig')->where(array('status' => 1))->order('sort asc')->select();
  17. foreach ($get_market_list as $k => $v) {
  18. $get_market_list_data[$v['market']] = D('Market')->get_title($v['market']);
  19. }
  20. return $get_market_list_data;
  21. }
  22. }
  23. ?>