where('openid',$openid)->value('area'); $pinyin = new Pinyin(); $s = $pinyin->sentence($area); $s = strtr($s,array(' '=>'')); $table = 'recharge_'.$s; $list = Db::table($table)->where('openid',$openid)->order('id desc')->select()->toArray(); $i = 0; foreach ($list as $l){ $list[$i]['total'] /= 100; $list[$i]['payer_total']/= 100; $i+=1; } return json($list); } }