mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-20 01:07:46 +08:00
Compare commits
12 Commits
wjx2022091
...
wjx2022091
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8167380abe | ||
|
|
c69c104cd6 | ||
|
|
5ae19337d9 | ||
|
|
387b38a009 | ||
|
|
915b989e7b | ||
|
|
a2e1541538 | ||
|
|
849335def9 | ||
|
|
2f8194e93b | ||
|
|
c6dd43762f | ||
|
|
7a0b4259c2 | ||
|
|
43da5265ff | ||
|
|
7cfb55124c |
@@ -18,5 +18,5 @@ onLaunch(async () => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
//
|
||||
</style>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" href="/assets/uni.fb5f5659.css">
|
||||
<link rel="stylesheet" href="/assets/uni.a9022e9f.css">
|
||||
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -113,8 +113,8 @@ public class UserController {
|
||||
@PostMapping("/mnpMobile")
|
||||
public Object mnpMobile(@RequestBody Map<String, String> params) {
|
||||
Assert.notNull(params.get("code"), "code参数缺失");
|
||||
Map<String, Object> map = iUserService.mnpMobile(params.get("code").trim());
|
||||
return AjaxResult.success(map);
|
||||
iUserService.mnpMobile(params.get("code").trim());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,8 +61,7 @@ public interface IUserService {
|
||||
*
|
||||
* @author fzr
|
||||
* @param code 获取手机号的Code
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> mnpMobile(String code);
|
||||
void mnpMobile(String code);
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.mdd.common.mapper.system.SystemConfigMapper;
|
||||
import com.mdd.common.mapper.user.UserAuthMapper;
|
||||
import com.mdd.common.mapper.user.UserMapper;
|
||||
import com.mdd.common.utils.*;
|
||||
import com.mdd.front.LikeFrontThreadLocal;
|
||||
import com.mdd.front.service.IUserService;
|
||||
import com.mdd.front.vo.user.UserCenterVo;
|
||||
import com.mdd.front.vo.user.UserInfoVo;
|
||||
@@ -243,10 +244,9 @@ public class UserServiceImpl implements IUserService {
|
||||
*
|
||||
* @author fzr
|
||||
* @param code 获取手机号的Code
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> mnpMobile(String code) {
|
||||
public void mnpMobile(String code) {
|
||||
Map<String, String> config = ConfigUtil.get("mp_channel");
|
||||
WxMaService wxMaService = new WxMaServiceImpl();
|
||||
WxMaDefaultConfigImpl wxConfig = new WxMaDefaultConfigImpl();
|
||||
@@ -257,10 +257,12 @@ public class UserServiceImpl implements IUserService {
|
||||
try {
|
||||
WxMaPhoneNumberInfo wxMaPhoneNumberInfo = wxMaService.getUserService().getNewPhoneNoInfo(code);
|
||||
|
||||
Map<String, Object> response = new LinkedHashMap<>();
|
||||
response.put("countryCode", wxMaPhoneNumberInfo.getCountryCode());
|
||||
response.put("phoneNumber", wxMaPhoneNumberInfo.getPhoneNumber());
|
||||
return response;
|
||||
Integer userId = LikeFrontThreadLocal.getUserId();
|
||||
User user = new User();
|
||||
user.setId(userId);
|
||||
user.setMobile(wxMaPhoneNumberInfo.getPhoneNumber());
|
||||
user.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
userMapper.updateById(user);
|
||||
} catch (WxErrorException e) {
|
||||
throw new OperateException(e.getError().getErrorCode() + ", " + e.getError().getErrorMsg());
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.7 KiB |
Reference in New Issue
Block a user