635ec8bf by unknown

提示运行环境

1 parent df6e4c3a
......@@ -21,11 +21,19 @@ function toJson(str) {
if(str.length > 2){
var result = /\{([\s\S]*)\}/.exec(str);
}
var arr = result[1].split(',')
var obj = {}
arr.forEach(function (value) {
if(isAndroid){
var key = value.split('=')[0]
var val = value.split('=')[1]
}
if(isiOS) {
var key = value.split(':')[0]
var val = value.split(':')[1]
}
obj[key] = val
})
return obj
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!