|
|
|
@ -1,9 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div class="home app_content"> |
|
|
|
<!-- 导航栏 --> |
|
|
|
<div class="header_body"> |
|
|
|
<header-nav :leftArrow="false" titelText="执法监督码"></header-nav> |
|
|
|
</div> |
|
|
|
<!-- <div class="header_body">--> |
|
|
|
<!-- <header-nav :leftArrow="false" titelText="执法监督码"></header-nav>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<!-- 中间 --> |
|
|
|
<div class="warp_body"> |
|
|
|
@ -50,7 +50,7 @@ |
|
|
|
import Vconsolefrom from 'vconsole'; |
|
|
|
import * as w6s from 'szient-js-sdk'; |
|
|
|
import sha1 from 'crypto-js/sha1'; |
|
|
|
import {getEnterpriseMerchantAuthorization,getSiqLoginAuth} from '../api/Home'; |
|
|
|
import {getEnterpriseMerchantAuthorization,getSiqLoginAuth, getSiqLoginAuthTest} from '../api/Home'; |
|
|
|
const { useCommon } = $globalStore; |
|
|
|
const router = useRouter(); |
|
|
|
const route = useRoute(); |
|
|
|
@ -84,7 +84,7 @@ const boutiqueGoods = async () => { |
|
|
|
}; |
|
|
|
|
|
|
|
const toRegisterView = async() =>{ |
|
|
|
console.log(useCommon.phonenumber); |
|
|
|
console.log(useCommon.enterpriseNumber); |
|
|
|
if(useCommon.enterpriseNumber == null || useCommon.enterpriseNumber == ""){ |
|
|
|
router.push({ path: "/enterprise/register" }); |
|
|
|
}else{ |
|
|
|
@ -137,7 +137,7 @@ onMounted(() => { |
|
|
|
const access_key = '6374106c5eb449a4ad6c2430f30796e6'; |
|
|
|
const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f'; |
|
|
|
// generateRandomNumber() |
|
|
|
const nonce = generateRandomNumber; |
|
|
|
const nonce = generateRandomNumber(); |
|
|
|
const timestamp = `${Date.now()}`; |
|
|
|
|
|
|
|
const str = [access_secret, nonce, timestamp] |
|
|
|
@ -146,7 +146,13 @@ onMounted(() => { |
|
|
|
|
|
|
|
// 最终还需要转成全小写 |
|
|
|
const signature = sha1(str).toString().toLowerCase(); |
|
|
|
//深i企鉴权 |
|
|
|
|
|
|
|
// //深i企鉴权 |
|
|
|
getSiqLoginAuthTest({userId: "1608644307579883522", userName: "汪鑫"},success =>{ |
|
|
|
console.log(success.data) |
|
|
|
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber); |
|
|
|
},error =>{}) |
|
|
|
|
|
|
|
w6s.config({ |
|
|
|
access_key: access_key, |
|
|
|
nonce: nonce, |
|
|
|
@ -183,17 +189,12 @@ onMounted(() => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// getSiqLoginAuth({code:""},success =>{ |
|
|
|
// console.log(success.data) |
|
|
|
// },error =>{ |
|
|
|
|
|
|
|
// }) |
|
|
|
// getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber},success =>{ |
|
|
|
// if(!(success.data == null && success.data.length == 0)){ |
|
|
|
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); |
|
|
|
// } |
|
|
|
// },error =>{ |
|
|
|
// }) |
|
|
|
getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber},success =>{ |
|
|
|
if(!(success.data == null && success.data.length == 0)){ |
|
|
|
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); |
|
|
|
} |
|
|
|
},error =>{ |
|
|
|
}) |
|
|
|
}); |
|
|
|
</script> |
|
|
|
|
|
|
|
|