Skip to content

Commit

Permalink
설계 확인
Browse files Browse the repository at this point in the history
  • Loading branch information
skymill2000 committed Apr 16, 2021
1 parent 807b217 commit 367b4a5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
35 changes: 32 additions & 3 deletions src/pages/ConfirmCont.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import SearchTool from '../component/SearchTool';
import SearchResult from '../component/SearchResult';
import qs from 'query-string';
import axios from 'axios';
import cryptoMy from '../lib/apiCrypto';

//LOGIC

Expand All @@ -13,13 +14,41 @@ const ConfirmCont = ({location}) => {
startScreen();
},[])
//시작하자마자 함수를 불러오고 싶을때


let planId = qs.parse(location.search).planId;
let ssnnum = sessionStorage.getItem('ssnnum');
console.log(planId, ssnnum)

const startScreen = () => {
console.log('hello')
const databody = {
"dataHeader":
{
"z_user_id":"10786830"
},
"dataBody":
{
"inpt_plan_no": planId
}
}

const option = {
method: 'post',
url: '/v1.0/GNI/trip_overseas/inj/wound/design/detail',
data : JSON.stringify(databody),
headers: {
'Authorization' : 'Bearer ' + sessionStorage.getItem('userToken'),
'timestamp' : '20210218190839',
'ci' : 'E4PIs45uiscs8quYnySoQXuZKwjB66mE3Wqvw9gRuWOqMON3FiLQt+U4ZV42Y1+prQWpFWWnbKomShR+O5dHlg==',
'appKey': 'l7xxe840074288574eeabb346f15f7a3d6af',
'appSecret': 'f8449d6220b54dddb892a262409c3e07',
'Content-Type': 'application/json; charset=utf-8',
'hsKey' : cryptoMy.hsKey(JSON.stringify(databody))
}
}
axios(option).then((res) =>{
console.log(res.data);

})

}

const changeText = (e) =>{
Expand Down
1 change: 1 addition & 0 deletions src/pages/SignupResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const SignupInsure = () => {
}).then((res) => {
console.log(res.data.dataBody.access_token);
var userToken = res.data.dataBody.access_token;
sessionStorage.setItem('userToken',res.data.dataBody.access_token);
var requestData = {
"dataBody": {
"z_chn_cd": "API",
Expand Down

0 comments on commit 367b4a5

Please sign in to comment.