|
|
|
@ -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'; |
|
|
|
|
|
|
|
@ -147,11 +147,20 @@ |
|
|
|
onMounted(() => { |
|
|
|
// console.log(useCommon.phonenumber) |
|
|
|
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber); |
|
|
|
new Vconsolefrom(); |
|
|
|
// 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,59 +171,52 @@ |
|
|
|
// 最终还需要转成全小写 |
|
|
|
const signature = sha1(str).toString().toLowerCase(); |
|
|
|
|
|
|
|
// //深i企鉴权测试 |
|
|
|
getSiqLoginAuthTest({userId: "1795031916332843009", userName: "陈瑞"},success =>{ |
|
|
|
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber); |
|
|
|
useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString()); |
|
|
|
useCommon.SET_TOKEN(success.data.token); |
|
|
|
console.log("phone : "+useCommon.phonenumber); |
|
|
|
console.log("token : "+useCommon.token); |
|
|
|
getEnterpriseMerchant(success.data.phonenumber.toString()); |
|
|
|
},error =>{}) |
|
|
|
|
|
|
|
// w6s.config({ |
|
|
|
// access_key: access_key, |
|
|
|
// nonce: nonce, |
|
|
|
// timestamp: timestamp, |
|
|
|
// signature: signature, |
|
|
|
// }) |
|
|
|
// .then((res) => { |
|
|
|
// // 成功 |
|
|
|
// console.log("鉴权", res); |
|
|
|
|
|
|
|
// }) |
|
|
|
// .catch((err) => { |
|
|
|
// // 失败 |
|
|
|
// // console.log(err) |
|
|
|
// console.log("鉴权", err); |
|
|
|
// // todo 临时工 |
|
|
|
// if(useCommon.phonenumber != '' || useCommon.phonenumber != null){ |
|
|
|
// getEnterpriseMerchant(useCommon.phonenumber.toString()); |
|
|
|
// } |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// w6s.ready(() => { |
|
|
|
// w6s.szient.getAuthCode({ |
|
|
|
// success: function (res) { |
|
|
|
// console.log(res) |
|
|
|
// console.log("认证", res); |
|
|
|
// console.log("code: " + res.result.result.code); |
|
|
|
// getSiqLoginAuth({code: res.result.result.code}, success => { |
|
|
|
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString()); |
|
|
|
// useCommon.SET_USER_ID(success.data.userId); |
|
|
|
//深i企鉴权测试 |
|
|
|
// getSiqLoginAuthTest({userId: "1795031916332843009", userName: "陈瑞"}, success => { |
|
|
|
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber); |
|
|
|
// getEnterpriseMerchant(success.data.phonenumber.toString()); |
|
|
|
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString()); |
|
|
|
// console.log("phone : " + useCommon.phonenumber); |
|
|
|
// }, error => { |
|
|
|
// console.log("error : " + error) |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// fail: function (err) { |
|
|
|
|
|
|
|
w6s.config({ |
|
|
|
access_key: access_key, |
|
|
|
nonce: nonce, |
|
|
|
timestamp: timestamp, |
|
|
|
signature: signature, |
|
|
|
}).then((res) => { |
|
|
|
// 成功 |
|
|
|
console.log("鉴权", res); |
|
|
|
|
|
|
|
}).catch((err) => { |
|
|
|
// 失败 |
|
|
|
// console.log(err) |
|
|
|
// console.log("认证", err); |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
console.log("鉴权", err); |
|
|
|
// todo 临时工 |
|
|
|
getEnterpriseMerchant(useCommon.phonenumber.toString()); |
|
|
|
}); |
|
|
|
|
|
|
|
w6s.ready(() => { |
|
|
|
w6s.szient.getAuthCode({ |
|
|
|
success: function (res) { |
|
|
|
console.log(res) |
|
|
|
console.log("认证", res); |
|
|
|
console.log("code: " + res.result.result.code); |
|
|
|
getSiqLoginAuth({code: res.result.result.code}, success => { |
|
|
|
useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString()); |
|
|
|
useCommon.SET_USER_ID(success.data.userId); |
|
|
|
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber); |
|
|
|
getEnterpriseMerchant(success.data.phonenumber.toString()); |
|
|
|
}, error => { |
|
|
|
console.log("error : " + error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
fail: function (err) { |
|
|
|
console.log(err) |
|
|
|
console.log("认证", err); |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber},success =>{ |
|
|
|
// if(!(success.data == null && success.data.length == 0)){ |
|
|
|
@ -223,6 +225,9 @@ |
|
|
|
// } |
|
|
|
// },error =>{ |
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
</script> |
|
|
|
|
|
|
|
@ -243,7 +248,7 @@ |
|
|
|
background-size: auto 100%; |
|
|
|
overflow-x: hidden; |
|
|
|
overflow-y: auto; |
|
|
|
margin-top: 0%; |
|
|
|
|
|
|
|
.carousel_box { |
|
|
|
height: 4rem; |
|
|
|
width: 100%; |
|
|
|
@ -281,6 +286,7 @@ |
|
|
|
font-size: 0.5rem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-qr-code::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -290,7 +296,7 @@ |
|
|
|
width: calc(100% + 0.13rem); |
|
|
|
height: calc(100% + 0.13rem); |
|
|
|
background-color: #fff; |
|
|
|
border: 0.14rem solid rgba(255,255,255,0.5); |
|
|
|
border: 0.14rem solid rgba(255, 255, 255, 0.5); |
|
|
|
border-radius: 0.27rem; |
|
|
|
} |
|
|
|
|
|
|
|
@ -325,6 +331,7 @@ |
|
|
|
font-size: 0.5rem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-info::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -334,7 +341,7 @@ |
|
|
|
width: calc(100% + 0.13rem); |
|
|
|
height: calc(100% + 0.13rem); |
|
|
|
background-color: #fff; |
|
|
|
border: 0.14rem solid rgba(255,255,255,0.5); |
|
|
|
border: 0.14rem solid rgba(255, 255, 255, 0.5); |
|
|
|
border-radius: 0.27rem; |
|
|
|
} |
|
|
|
|
|
|
|
@ -370,6 +377,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-complaint::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -379,7 +387,7 @@ |
|
|
|
width: calc(100% + 0.13rem); |
|
|
|
height: calc(100% + 0.13rem); |
|
|
|
background-color: #fff; |
|
|
|
border: 0.14rem solid rgba(255,255,255,0.5); |
|
|
|
border: 0.14rem solid rgba(255, 255, 255, 0.5); |
|
|
|
border-radius: 0.27rem; |
|
|
|
} |
|
|
|
|
|
|
|
|