mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-16 07:48:34 +08:00
获取小程序appid
This commit is contained in:
@@ -102,9 +102,12 @@ public class MemberController extends BaseController {
|
|||||||
* http://localhost:8080/uniapp/member/wechatLogin
|
* http://localhost:8080/uniapp/member/wechatLogin
|
||||||
*/
|
*/
|
||||||
@PostMapping("/wechatLogin")
|
@PostMapping("/wechatLogin")
|
||||||
public RestApiResponse<?> wechatLogin(@RequestBody WechatLoginDTO dto) {
|
public RestApiResponse<?> wechatLogin(HttpServletRequest request, @RequestBody WechatLoginDTO dto) {
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
try {
|
try {
|
||||||
|
// 获取小程序appid
|
||||||
|
String appId = request.getHeader("appId");
|
||||||
|
dto.setAppId(appId);
|
||||||
String memberToken = memberService.wechatLogin(dto);
|
String memberToken = memberService.wechatLogin(dto);
|
||||||
response = new RestApiResponse<>(ImmutableMap.of("memberToken", memberToken));
|
response = new RestApiResponse<>(ImmutableMap.of("memberToken", memberToken));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user