|
@@ -20,8 +20,18 @@ class Userwallet extends Api
|
|
|
|
|
|
//积分日志
|
|
|
public function score_log(){
|
|
|
+ $type = input('type',1);
|
|
|
+
|
|
|
+ $where = [
|
|
|
+ 'user_id' => $this->auth->id
|
|
|
+ ];
|
|
|
+ if($type == 1){
|
|
|
+ $where['change_value'] = ['egt',0];
|
|
|
+ }else{
|
|
|
+ $where['change_value'] = ['lt',0];
|
|
|
+ }
|
|
|
$list = Db::name('user_score_log')->field('id,before,change_value,remain,remark,createtime')
|
|
|
- ->where('user_id',$this->auth->id)->autopage()->select();
|
|
|
+ ->where($where)->autopage()->select();
|
|
|
|
|
|
if(!empty($list)){
|
|
|
foreach($list as $key => &$val){
|