12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php
- namespace app\user\controller;
- use library\Controller;
- use think\Db;
- use function GuzzleHttp\Psr7\build_query;
- class MemberCollection extends Controller
- {
-
- protected $table = 'store_order_info';
-
- public function index()
- {
- $this->title = '藏品记录';
- $hash_send=$this->request->get('hash_send');
- $query = $this->_query($this->table)->whereIn('status','1,3');
- if ($hash_send){
- if ($hash_send==1){
- $query->where('collectors_hash','neq','');
- }else if ($hash_send==2){
- $query->where('collectors_hash','eq','');
- }
- }
- $query->dateBetween('create_at')->order('id desc')->page();
- }
-
- protected function _index_page_filter(&$data)
- {
- foreach ($data as $k=>&$v){
- $v['pro_info'] =json_decode($v['pro_info'],true);
- $info = Db::name('store_member')->where('id',$v['mid'])->field('name,phone,wallet_address')->find();
- $v['scz'] = $info['name'].'('.$info['phone'].')';
- $v['wallet_address'] = $info['wallet_address'];
- $pro_info = Db::name('store_collection')->where('id',$v['c_id'])->field('one_given_day,other_given_day')->find();
- $log = Db::name('store_collect_examples_log')
- ->where('order_info_id',$v['id'])
- ->count();
- if (!$log){
- if ($pro_info['one_given_day']!=0){
- $v['exam_time'] = date('Y-m-d H:i:s',strtotime($v['create_at'])+($pro_info['one_given_day']*24*60*60));
- }else{
- $v['exam_time'] = $v['create_at'];
- }
- }else{
- if ($pro_info['other_given_day']!=0){
- $v['exam_time'] = date('Y-m-d H:i:s',strtotime($v['create_at'])+($pro_info['other_given_day']*24*60*60));
- }else{
- $v['exam_time'] = $v['create_at'];
- }
- }
- }
- }
- }
|