|
|
|
@ -126,7 +126,7 @@ const onLoad = () => { |
|
|
|
const generateRandomNumber =() =>{ |
|
|
|
const min = 100000; |
|
|
|
const max = 999999; |
|
|
|
const randomNum = Math.floor(Math.random() * (max - min + 1)) + min; |
|
|
|
const randomNum = (Math.floor(Math.random() * (max - min + 1)) + min); |
|
|
|
return randomNum.toString().padStart(6, '0'); |
|
|
|
} |
|
|
|
onMounted(() => { |
|
|
|
@ -136,7 +136,8 @@ onMounted(() => { |
|
|
|
|
|
|
|
const access_key = '6374106c5eb449a4ad6c2430f30796e6'; |
|
|
|
const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f'; |
|
|
|
const nonce = generateRandomNumber(); |
|
|
|
// generateRandomNumber() |
|
|
|
const nonce = generateRandomNumber; |
|
|
|
const timestamp = `${Date.now()}`; |
|
|
|
|
|
|
|
const str = [access_secret, nonce, timestamp] |
|
|
|
@ -163,30 +164,30 @@ onMounted(() => { |
|
|
|
console.log("鉴权",err); |
|
|
|
}); |
|
|
|
|
|
|
|
w6s.ready(() => { |
|
|
|
w6s.szient.getAuthCode({ |
|
|
|
success: function(res) { |
|
|
|
console.log(res) |
|
|
|
console.log("认证",res); |
|
|
|
console.log(res.result.result.code) |
|
|
|
getSiqLoginAuth({code: res.result.result.code},success =>{ |
|
|
|
console.log(success.data) |
|
|
|
},error =>{ |
|
|
|
// w6s.ready(() => { |
|
|
|
// w6s.szient.getAuthCode({ |
|
|
|
// success: function(res) { |
|
|
|
// console.log(res) |
|
|
|
// console.log("认证",res); |
|
|
|
// console.log(res.result.result.code) |
|
|
|
// getSiqLoginAuth({code: res.result.result.code},success =>{ |
|
|
|
// console.log(success.data) |
|
|
|
// },error =>{ |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: function(err) { |
|
|
|
console.log(err) |
|
|
|
console.log("认证",err); |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// fail: function(err) { |
|
|
|
// console.log(err) |
|
|
|
// console.log("认证",err); |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
|
|
|
|
getSiqLoginAuth({code:""},success =>{ |
|
|
|
console.log(success.data) |
|
|
|
},error =>{ |
|
|
|
// 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); |
|
|
|
|