Commit 1a022a68 by 庄欣

f

parent 4617de87
...@@ -244,7 +244,13 @@ fetch(UI).then(function(res){ ...@@ -244,7 +244,13 @@ fetch(UI).then(function(res){
this.openUi(); this.openUi();
}, },
getWorksIdByBase64(url) { getWorksIdByBase64(url) {
let worksString = url.match(/\works\/\S*\?/g); let pre1 = /\works\/\S*\?/g;
let pre2 = /\works\/\S*\?*/g;
if (url.indexOf("?") > -1) {
worksString = url.match(pre1);
} else {
worksString = url.match(pre2);
}
let worksId = null; let worksId = null;
if (worksString !== undefined && worksString!==null&& worksString.length > 0) { if (worksString !== undefined && worksString!==null&& worksString.length > 0) {
worksId = worksString[0].replace("works/", ""); worksId = worksString[0].replace("works/", "");
...@@ -349,6 +355,7 @@ fetch(UI).then(function(res){ ...@@ -349,6 +355,7 @@ fetch(UI).then(function(res){
}, },
addZone() { addZone() {
let $this = this; let $this = this;
this.sendData(this.API.addZone, { this.sendData(this.API.addZone, {
object_id: this.objectId, object_id: this.objectId,
type: this.type type: this.type
...@@ -373,6 +380,9 @@ fetch(UI).then(function(res){ ...@@ -373,6 +380,9 @@ fetch(UI).then(function(res){
}, 3000); }, 3000);
}, },
base64Decode(data) { base64Decode(data) {
if (!isNaN(data)) {
return data;
}
var rv = window.atob(data); var rv = window.atob(data);
rv = escape(rv); rv = escape(rv);
rv = decodeURIComponent(rv); rv = decodeURIComponent(rv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment