Commit c76c9bdd authored by Hsinli's avatar Hsinli

add

parent a5c428c4
Pipeline #19807 passed with stage
in 1 minute 2 seconds
...@@ -12,7 +12,7 @@ class UserController extends Controller { ...@@ -12,7 +12,7 @@ class UserController extends Controller {
let rule = { let rule = {
code: { type: 'string', required: true }, code: { type: 'string', required: true },
iv: { type: 'string', required: true }, iv: { type: 'string', required: true },
encryptedData: { type: 'string', required: true }, data: { type: 'string', required: true },
}; };
ctx.validate(rule, inputParams); ctx.validate(rule, inputParams);
let ret = await ctx.service.cd.user.userAuth(inputParams); let ret = await ctx.service.cd.user.userAuth(inputParams);
......
...@@ -109,9 +109,19 @@ class UserService extends Service { ...@@ -109,9 +109,19 @@ class UserService extends Service {
async userAuth(params) { async userAuth(params) {
const { ctx } = this; const { ctx } = this;
let code = params.code; let code = params.code;
let encryptedData = params.encryptedData; let encryptedData = params.data;
let iv = params.iv; let iv = params.iv;
//暂时就传我的用户编号
let userInfo = {
user_id: '64ce8e93-5c3d-4f9f-9bc6-05385b8213f7',
app_user_id: 'ac152654-2cc2-4b84-8b81-31329c720a26',
token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImFwcF91c2VyX2lkIjoiYWMxNTI2NTQtMmNjMi00Yjg0LThiODEtMzEzMjljNzIwYTI2IiwicGFzc3BvcnQiOiIxODM1ODMzNTc0NyIsImFwcF9pZCI6ImExOGIyYjdiLWFmMDUtNDM1MC04NDUxLTA1ZTE2ZDEzNmQyZSIsInVpZCI6IjY0Y2U4ZTkzLTVjM2QtNGY5Zi05YmM2LTA1Mzg1YjgyMTNmNyIsImxvZ2luX3R5cGUiOiIxIiwiYWNjb3VudF9pZCI6ImRiZmQ5Y2FiLWZkOTMtNDk1ZC05ZGZkLWQ0ZTA2ODYyYTQwZiIsImNoYW5uZWxfaWQiOiI2NDgzODAxMC00NTg0LTExZTktYTgzNi05ZDNkY2ZkNjRkNGUiLCJkZXZpY2VfaWQiOiI4MjI5ZGQ2Yy1mMTljLTQ5MjEtODRkZS05ZTkxMWEyNmM5YWMiLCJvaWQiOiI0NDk3OXZiYjFvWUVKWG9FIiwiZGV2aWNlX2xvZ2luX2xvZ3NfaWQiOiJmZjlhMDhjOC1lZWU5LTQ5YjQtODFhMC1kZGJiMjlkNDc0MGQiLCJhcHBfdHlwZV9pZCI6IjIxNTBkMGYxLWVlMDctNGQxNy1hMDE5LTI1MWJlMzY5OWJkMSJ9LCJleHAiOjE1ODU4MDg2NDAsImlhdCI6MTU4MzIxNjYzOX0.knn0vZVHHQ24_pFKX44UPt7x_aqhK8LNz5Wk8U0S4-g',
device_id: '8229dd6c-f19c-4921-84de-9e911a26c9ac',
device_login_id: 'ff9a08c8-eee9-49b4-81a0-ddbb29d4740d'
}
return userInfo;
//获取微信session_key //获取微信session_key
let wxAuth = await this.requestWxAuth(code); let wxAuth = await this.requestWxAuth(code);
//解密获得手机号 //解密获得手机号
......
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