|
|
|
@ -99,6 +99,7 @@ export default { |
|
|
|
savesc(){ |
|
|
|
let form = this.$refs.form |
|
|
|
let formData={ |
|
|
|
id: this.scid, |
|
|
|
scname: form.scname.value, |
|
|
|
addr: form.addr.value, |
|
|
|
port: form.port.value, |
|
|
|
@ -110,11 +111,11 @@ export default { |
|
|
|
|
|
|
|
// 将fromdata 转成二进制 |
|
|
|
let binary = scproto.encodeServiceInfo(formData) |
|
|
|
console.log(binary,"binary") |
|
|
|
// console.log(binary,"binary") |
|
|
|
//二进制转为base64 |
|
|
|
let base64 = btoa(String.fromCharCode.apply(null, new Uint8Array(binary))) |
|
|
|
// let base64 = this.uint8ArrayToBase64(binary) |
|
|
|
console.log(base64) |
|
|
|
// console.log(base64) |
|
|
|
// let base64 =btoa(unescape(encodeURIComponent(binary))) |
|
|
|
// arraybuffer转为base64 |
|
|
|
|
|
|
|
|