|
|
|
@ -50,7 +50,7 @@ |
|
|
|
import Vconsolefrom from 'vconsole'; |
|
|
|
import * as w6s from 'szient-js-sdk'; |
|
|
|
import sha1 from 'crypto-js/sha1'; |
|
|
|
import {getEnterpriseMerchantAuthorization, getSiqLoginAuth, getSiqLoginAuthTest} from '../api/Home'; |
|
|
|
import {getEnterpriseMerchantAuthorization, getSiqLoginAuth, getSiqLoginAuthTest, siqCode} from '../api/Home'; |
|
|
|
import {showSuccessToast} from "vant"; |
|
|
|
import 'vant/es/toast/style'; |
|
|
|
|
|
|
|
@ -149,9 +149,18 @@ |
|
|
|
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber); |
|
|
|
// new Vconsolefrom(); |
|
|
|
|
|
|
|
const access_key = '6374106c5eb449a4ad6c2430f30796e6'; |
|
|
|
const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f'; |
|
|
|
// const access_key = '6374106c5eb449a4ad6c2430f30796e6'; |
|
|
|
// const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f'; |
|
|
|
// generateRandomNumber() |
|
|
|
|
|
|
|
siqCode(null, success => { |
|
|
|
let access_key = ""; |
|
|
|
let access_secret = ""; |
|
|
|
if (success.success) { |
|
|
|
access_key = success.data.accessKey; |
|
|
|
access_secret = success.data.accessSecret; |
|
|
|
} |
|
|
|
|
|
|
|
const nonce = generateRandomNumber(); |
|
|
|
const timestamp = `${Date.now()}`; |
|
|
|
|
|
|
|
@ -162,25 +171,24 @@ |
|
|
|
// 最终还需要转成全小写 |
|
|
|
const signature = sha1(str).toString().toLowerCase(); |
|
|
|
|
|
|
|
// //深i企鉴权测试 |
|
|
|
// getSiqLoginAuthTest({userId: "1608644307579883522", userName: "汪鑫"},success =>{ |
|
|
|
//深i企鉴权测试 |
|
|
|
// getSiqLoginAuthTest({userId: "1795031916332843009", userName: "陈瑞"}, success => { |
|
|
|
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber); |
|
|
|
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString()); |
|
|
|
// console.log("phone : " + useCommon.phonenumber); |
|
|
|
// },error =>{}) |
|
|
|
// }, error => { |
|
|
|
// }) |
|
|
|
|
|
|
|
w6s.config({ |
|
|
|
access_key: access_key, |
|
|
|
nonce: nonce, |
|
|
|
timestamp: timestamp, |
|
|
|
signature: signature, |
|
|
|
}) |
|
|
|
.then((res) => { |
|
|
|
}).then((res) => { |
|
|
|
// 成功 |
|
|
|
console.log("鉴权", res); |
|
|
|
|
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
}).catch((err) => { |
|
|
|
// 失败 |
|
|
|
// console.log(err) |
|
|
|
console.log("鉴权", err); |
|
|
|
@ -217,6 +225,9 @@ |
|
|
|
// } |
|
|
|
// },error =>{ |
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
</script> |
|
|
|
|
|
|
|
@ -275,6 +286,7 @@ |
|
|
|
font-size: 0.5rem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-qr-code::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -319,6 +331,7 @@ |
|
|
|
font-size: 0.5rem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-info::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -364,6 +377,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-complaint::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
|