Commit bc888d66 authored by hezhen's avatar hezhen

123

parent 41e93c4f
...@@ -1863,11 +1863,6 @@ class longbing_companyModuleWxapp extends WeModuleWxapp ...@@ -1863,11 +1863,6 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
$uniacid = $_W['uniacid']; $uniacid = $_W['uniacid'];
$encryptedData = $_GPC['encryptedData']; $encryptedData = $_GPC['encryptedData'];
$iv = $_GPC['iv']; $iv = $_GPC['iv'];
$info = pdo_get('longbing_company_user_phone', array('user_id' => $uid,'uniacid' => $uniacid));
if ($info) {
return $this->result(0, 'fail', array('phone' => $info['phone'], 'new' => 3, 'iv' => $iv));
}
/* /*
if (!$uid || !$to_uid) { if (!$uid || !$to_uid) {
return $this->result(-1, '', array()); return $this->result(-1, '', array());
...@@ -1901,16 +1896,18 @@ class longbing_companyModuleWxapp extends WeModuleWxapp ...@@ -1901,16 +1896,18 @@ class longbing_companyModuleWxapp extends WeModuleWxapp
return $this->result(-1, $errCode, array('sec' => 1, 'iv' => $iv)); return $this->result(-1, $errCode, array('sec' => 1, 'iv' => $iv));
} }
} }
$info = pdo_get('longbing_company_user_phone', array('user_id' => $uid,'uniacid' => $uniacid));
$time = time(); $time = time();
$data = array('user_id' => $uid, 'to_uid' => $to_uid, 'phone' => $phone, 'uniacid' => $uniacid, 'create_time' => $time, 'update_time' => $time); if ($info) {
$result = pdo_insert('longbing_company_user_phone', $data); $data=array('phone'=>$phone, 'update_time' => $time);
pdo_update('longbing_company_user_phone',$data,array('id'=>$info['id']));
if ($result) { }else{
return $this->result(0, '', array('phone' => $phone, 'new' => 3, 'iv' => $iv)); $data = array('user_id' => $uid, 'to_uid' => $to_uid, 'phone' => $phone, 'uniacid' => $uniacid, 'create_time' => $time, 'update_time' => $time);
pdo_insert('longbing_company_user_phone', $data);
} }
return $this->result(0, '', array('phone' => $phone, 'new' => 3, 'iv' => $iv));
return $this->result(-1, '1', array('new' => 3, 'res' => $result, 'iv' => $iv)); //return $this->result(-1, '1', array('new' => 3, 'res' => $result, 'iv' => $iv));
} }
public function doPageUserPhone() public function doPageUserPhone()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment