作者 xwp
1 个管道 的构建 通过 耗费 1 秒

注册记录手机号关系

@@ -183,19 +183,18 @@ class User extends Backend @@ -183,19 +183,18 @@ class User extends Backend
183 } 183 }
184 184
185 if ($row) { 185 if ($row) {
  186 +
186 if(!empty($mobile_col)){ 187 if(!empty($mobile_col)){
187 //处理已有手机号 188 //处理已有手机号
188 - $mobile = $currentSheet->getCellByColumnAndRow($col, $currentRow)->getValue();  
189 - echo $mobile_col;  
190 - echo $mobile;exit; 189 + $mobile = $currentSheet->getCellByColumnAndRow($mobile_col, $currentRow)->getValue();
  190 +
191 $user = new \app\admin\model\User; 191 $user = new \app\admin\model\User;
192 $user = $user->where(['mobile'=>$mobile,'openid' => ['<>','']])->find(); 192 $user = $user->where(['mobile'=>$mobile,'openid' => ['<>','']])->find();
193 if(!empty($user)){ 193 if(!empty($user)){
194 - echo $user['openid'];  
195 $row['openid'] = $user['openid']; 194 $row['openid'] = $user['openid'];
196 } 195 }
197 } 196 }
198 - echo json_encode($insert);exit; 197 +
199 $insert[] = $row; 198 $insert[] = $row;
200 199
201 200