react_hsbc_teller 1.8.3 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "1.8.3",
3
+ "version": "1.8.6",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -1,9 +1,45 @@
1
1
  import Server from './server';
2
2
 
3
3
  class API extends Server{
4
+ // /hsbc/getAuthorizeResult/{activityId}/{appAccount}
5
+ async getAuthorizeResult(params = {}){
6
+ try{
7
+ let result = await this.axios('get', '/hsbc/getAuthorizeResult/'+params.activityId + '/' + params.appAccount, params);
8
+ if(result && result.code === 200){
9
+ return result||'';
10
+ }else{
11
+ let err = {
12
+ tip: '服务异常',
13
+ response: result,
14
+ data: params,
15
+ // url: 'https://api.cangdu.org/shopro/data/products',
16
+ }
17
+ throw err;
18
+ }
19
+ }catch(err){
20
+ throw err;
21
+ }
22
+ }
23
+ async saveAuthorize(params = {}){
24
+ try{
25
+ let result = await this.axios('post', '/hsbc/saveAuthorize', params);
26
+ if(result && result.code === 200){
27
+ return result||'';
28
+ }else{
29
+ let err = {
30
+ tip: '服务异常',
31
+ response: result,
32
+ data: params,
33
+ // url: 'https://api.cangdu.org/shopro/data/products',
34
+ }
35
+ throw err;
36
+ }
37
+ }catch(err){
38
+ throw err;
39
+ }
40
+ }
4
41
  // /hsbc/getToken
5
42
  async getToken(params = {}){
6
- // return this.axios('get', '/lang/select/2', params);
7
43
  try{
8
44
  let result = await this.axios('post', '/hsbc/getToken', params);
9
45
  if(result && result.code === 200){
@@ -28,6 +28,9 @@ export default class Server {
28
28
  timeout: 30000,
29
29
  params: null,
30
30
  data: params,
31
+ // headers: {
32
+ // Authorization: window.sessionStorage.getItem('authTokenHSBC') ? window.sessionStorage.getItem('authTokenHSBC') : '',
33
+ // },
31
34
  withCredentials: true, //是否携带cookies发起请求
32
35
  validateStatus:(status)=>{
33
36
  return status >= 200 && status < 300;
@@ -137,14 +137,15 @@ export default class foot extends Component {
137
137
  </Popover>
138
138
  }
139
139
  {
140
- item == 'OCR' && <Popover content={content} trigger="click" visible={clickedOcr} onVisibleChange={this.ocrHandleVisibleChange}>
140
+ item == 'OCR' &&
141
+ // <Popover content={content} trigger="click" visible={clickedOcr} onVisibleChange={this.ocrHandleVisibleChange}>
141
142
  <div className="one" onClick={this.ocrClick.bind(this)}>
142
143
  <img className="imgClass" src={require("../../assets/img/icon_ocr.png").default} alt="" />
143
144
  <div className="text">
144
145
  OCR识别
145
146
  </div>
146
147
  </div>
147
- </Popover>
148
+ // </Popover>
148
149
  }
149
150
  {
150
151
  item == 'INVITE' && <div className="one" onClick={this.invitationClick.bind(this)}>