Merge branch 'feature/user_action_log' of wmtx/sdk into master

用户行为日志修改
master
张谷诚 5 years ago committed by Gogs
commit 7f396e24d6

@ -1971,14 +1971,30 @@ function get_shortcut_pay_type(){
//获取微信支付类型 0官方 1金猪wap 2双乾
function get_zfb_type($game_id=0, $user_id=0){
/* if ($game_id) {
if ($game_id) {
$game = M('game', 'tab_')->where(['id' => $game_id])->find();
if ($game && $game['pay_config']) {
$payConf = json_decode($game['pay_config'], true);
if ($payConf['zfb'] == 'gf') return 0;
if ($payConf['zfb'] == 'sq') return 2;
if ($payConf['zfb'] == 'gf') {
if(C('alipay.status') == 1) return 0;
return -1;
}
if ($payConf['zfb'] == 'sq') {
$map['name']='sqpay';
$type=M('Tool','tab_')->field('status')->where($map)->find();
if($type['status']==1 && C('sqpay.zfb')) return 2; // 双乾支付
return -1;
}
if ($payConf['zfb'] == 'heepay') {
$map['name']='heepay';
$type=M('Tool','tab_')->field('status')->where($map)->find();
if($type['status']==1 && C('heepay.zfb')) return 4; // 汇付宝
return -1;
}
}
} */
}
if(C('alipay.status') == 1) {return 0;}
$map['name']='goldpig';

@ -64,7 +64,10 @@ class PayH5Controller extends BaseController{
if ($check) {
echo json_encode(['code'=>1001,'msg'=> "请求发起失效,编号{$request['pay_order_number']},请选择其他支付方式或联系客服"]);exit;
}
if(get_zfb_type($game_id, $user_id)== -1){
echo json_encode(['code'=>1001,'msg'=> "暂不支持支付,请联系客服"]);
exit;
}
if(get_zfb_type($game_id, $user_id)==0){ // 支付宝官方
if(C('alipay.way')==1/* || ($request['is_create_ordernumer']==1 && C('alipay.way')==0) */){ /* wap */
@ -370,6 +373,10 @@ class PayH5Controller extends BaseController{
$this->other_price($request);
if(get_zfb_type($game_id, $user_id)== -1){
echo json_encode(['code'=>1001,'msg'=> "暂不支持支付,请联系客服"]);
exit;
}
if(get_zfb_type($game_id, $user_id)==0){ // 支付宝官方
if(C('alipay.way')==1/* || ($request['is_create_ordernumer']==1 && C('alipay.way')==0) */){ /* wap */

@ -1084,7 +1084,9 @@ class UserController extends BaseController
$userApi = new MemberApi();
$log['uid'] = $user['user_id'];
$log['game_id'] = $user['game_id'];
$log['action'] = json_encode($user);
$log['action'] = json_encode($user);;
$action = [];
// $log['action'] = json_encode($user);
switch ($user['code']) {
case 'phone':
@ -1104,11 +1106,16 @@ class UserController extends BaseController
log_action($log);
$this -> new_set_message(1098, '该手机号已被绑定');
}
$action['phone'] = $user['phone'];
$log['action'] = json_encode($action);
#验证短信验证码
$this -> sms_verify2($user['phone'], $user['sms_code']);
$data['phone'] = $user['phone'];
break;
case 'nickname':
$log['type'] = 7;
$nickname_len = $user['nickname'];
$encode = mb_detect_encoding($user['nickname'], array('UTF-8','GB2312','GBK'));
if($encode == "UTF-8"){
@ -1122,6 +1129,14 @@ class UserController extends BaseController
if (!empty($nk) && is_array($nk) && $user['user_id'] != $nk['id']) {
$this -> new_set_message(1012, "昵称已被使用");
}
$old_data = M('User', 'tab_') -> field('id,account,nickname') -> where(['id' => $user['user_id']]) -> find();
$action['old_data'] = $old_data['nickname'];
$action['new_data'] = $user['nickname'];
$log['action'] = json_encode($action);
$data['nickname'] = $user['nickname'];
break;
case 'pwd':
@ -1977,13 +1992,26 @@ class UserController extends BaseController
$this -> sms_verify($data['phone'], $data['code']);
$map['id'] = $data['user_id'];
$user = M('user', 'tab_') -> where($map) -> setField('phone', "");
$log['uid'] = $data['user_id'];
$log['account'] = $user['account'];
$log['game_id'] = $data['game_id'];
$log['type'] = 8;
$action['phone'] = $data['phone'];
$log['action'] = json_encode($action);
if ($user) {
echo base64_encode(json_encode(array('status' => 200, 'return_msg' => '解绑成功')));
$log['remarks'] = "解绑成功";
log_action($log);
echo base64_encode(json_encode(array('status' => 200, 'return_msg' => '解绑成功')));
} else {
$log['remarks'] = "解绑失败";
log_action($log);
echo base64_encode(json_encode(array('status' => - 1, 'return_msg' => '解绑失败')));
@ -2371,7 +2399,11 @@ class UserController extends BaseController
$log['uid'] = $user['user_id'];
$log['game_id'] = $user['game_id'];
$log['type'] = 2;
$log['action'] = json_encode($user);
// $log['action'] = json_encode($user);
$log['action'] = '';
$action = [];
if (empty($user['user_id']) || empty($user['idcard']) || empty($user['real_name'])) {
$this -> set_message(1066, "fail", "用户数据异常");
@ -2467,12 +2499,20 @@ class UserController extends BaseController
}
}
$old_data = M('User', 'tab_') -> where($map) ->field('idcard,real_name')-> find();
$action['old_data'] = $old_data;
$action['new_data'] = ['idcard'=>$data['idcard'],'real_name'=>$data['real_name']];
$log['action'] = json_encode($action);
$return = M('User', 'tab_') -> where($map) -> save($data);
if ($return === false) {
$log['remarks'] = '用户数据更新失败';
log_action($log);
$this -> set_message(1070, "fail", "用户数据更新失败");
}
$log['remarks'] = '修改成功';
log_action($log);
$data['status'] = 200;

@ -82,7 +82,7 @@
<div class="payment_rest_way way_btn" data-type="sqshorcut" data-url="{:U('Shortcut/wap_shortcut_pay', array('user_id'=>$user_id,'game_id'=>I('game_id'),'user_token'=>I('user_token'),'code'=>0,'type'=>'platform', 'price' => $money, 'api_ver' => 2))}">
<div>
<img src="__IMG__/pay_way/xianshang.png" alt="">
<span>快捷支付</span>
<span>快捷银行</span>
</div>
<img src="__IMG__/pay_way/dagou1.png" alt="">
</div>
@ -93,7 +93,7 @@
<div class="payment_rest_way way_btn" data-type="shorcut" data-url="{:U('Shortcut/yee_pay', array('user_id'=>$user_id,'game_id'=>I('game_id'),'user_token'=>I('user_token'),'code'=>0,'type'=>'platform', 'price' => $money, 'api_ver' => 2))}">
<div>
<img src="__IMG__/pay_way/xianshang.png" alt="">
<span>易宝支付</span>
<span>快捷银行</span>
</div>
<img src="__IMG__/pay_way/dagou1.png" alt="">
</div>
@ -189,7 +189,7 @@
<div class="payment_rest_way way_btn" data-type="sqshorcut" data-url="{:U('Shortcut/wap_shortcut_pay', array('user_id'=>$user_id,'game_id'=>I('game_id'),'user_token'=>I('user_token'),'code'=>0,'type'=>'platform', 'price' => $money, 'api_ver' => 2))}">
<div>
<img src="__IMG__/pay_way/xianshang.png" alt="">
<span>快捷支付</span>
<span>快捷银行</span>
</div>
<img src="__IMG__/pay_way/dagou1.png" alt="">
</div>
@ -200,7 +200,7 @@
<div class="payment_rest_way way_btn" data-type="shorcut" data-url="{:U('Shortcut/yee_pay', array('user_id'=>$user_id,'game_id'=>I('game_id'),'user_token'=>I('user_token'),'code'=>0,'type'=>'platform', 'price' => $money, 'api_ver' => 2))}">
<div>
<img src="__IMG__/pay_way/xianshang.png" alt="">
<span>易宝支付</span>
<span>快捷银行</span>
</div>
<img src="__IMG__/pay_way/dagou1.png" alt="">
</div>

@ -34,7 +34,7 @@ class Sqpay
'limitPay' => 'creditCard',
'MD5info' => $sign,
];
// var_dump($params);
// var_dump($params);die;
$ret = curl_post("https://scan.95epay.cn/ScanCodePayment.action", $params);
return $ret;

Loading…
Cancel
Save