将小程序scene中的字符串转为对象
sceneToObject:function(scene){ scene = decodeURIComponent(scene); let ret = {} let regParam = /([^&=]+)=([\w\W]*?)(&|$|#)/g let strParam = scene; let result while ((result = regParam.exec(strParam)) != null) { ret[result[1]] = result[2] } return ret; }