Authored by huangyi

活动sdk 修改登录h5的url

@@ -103,6 +103,8 @@ window.yo_sdk.getUid(). @@ -103,6 +103,8 @@ window.yo_sdk.getUid().
103 103
104 描述:微信验签方法提供 104 描述:微信验签方法提供
105 105
  106 +参数:类型function,非必传
  107 +
106 用法: 108 用法:
107 ``` 109 ```
108 function callback(){/*** 回调执行 ***/} 110 function callback(){/*** 回调执行 ***/}
@@ -114,6 +116,9 @@ window.yo_sdk.getUid(). @@ -114,6 +116,9 @@ window.yo_sdk.getUid().
114 116
115 描述:微信分享方法 117 描述:微信分享方法
116 118
  119 +参数:类型Object,必传
  120 +
  121 +
117 用法:微信分享只需要直接调用就可以执行,该方法里面已经封装过验签方法无需验签 122 用法:微信分享只需要直接调用就可以执行,该方法里面已经封装过验签方法无需验签
118 ``` 123 ```
119 let shareData = { 124 let shareData = {
@@ -128,3 +133,35 @@ let shareData = { @@ -128,3 +133,35 @@ let shareData = {
128 await window.yo_sdk.wxShare(shareData) 133 await window.yo_sdk.wxShare(shareData)
129 134
130 ``` 135 ```
  136 +#### getQueryObj
  137 +类型:function
  138 +
  139 +描述:获取url参数返回对象
  140 +
  141 +参数:类型String,非必传(默认不穿会返回当前url的参数对象)
  142 +
  143 +用法:
  144 +```
  145 +let url = 'http://wwww.baidu.com?a=111&b=222'
  146 +let result = window.yo_sdk.getQueryObj(url)
  147 +//result的值为{a:'111',b='222'}
  148 +
  149 +```
  150 +#### invokeMethod
  151 +类型:function
  152 +
  153 +描述:调用app对外的方法
  154 +
  155 +参数:类型Object,必传
  156 +
  157 +用法:
  158 +```
  159 +let obj={
  160 + success:function(){} //成功回调
  161 + fail:function(){} //失败回调
  162 + method:'', //app的方法名
  163 + arguments:{} //参数
  164 +}
  165 +window.yo_sdk.invokeMethod(obj)
  166 +
  167 +```
@@ -150,7 +150,7 @@ @@ -150,7 +150,7 @@
150 /*!**************************************************************!*\ 150 /*!**************************************************************!*\
151 !*** ./node_modules/core-js/library/modules/_iter-define.js ***! 151 !*** ./node_modules/core-js/library/modules/_iter-define.js ***!
152 \**************************************************************/ 152 \**************************************************************/
153 -/*! no static exports found */function(e,o,r){"use strict";var h=r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),v=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),g=r(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),w=r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),x=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),k=r(/*! ./_iter-create */"./node_modules/core-js/library/modules/_iter-create.js"),S=r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),T=r(/*! ./_object-gpo */"./node_modules/core-js/library/modules/_object-gpo.js"),I=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),M=!([].keys&&"next"in[].keys()),P="values",O=function(){return this};e.exports=function(e,o,r,n,t,s,i){k(r,o,n);var u,l,c,a=function(e){if(!M&&e in p)return p[e];switch(e){case"keys":case P:return function(){return new r(this,e)}}return function(){return new r(this,e)}},d=o+" Iterator",m=t==P,f=!1,p=e.prototype,_=p[I]||p["@@iterator"]||t&&p[t],j=_||a(t),y=t?m?a("entries"):j:void 0,b="Array"==o&&p.entries||_;if(b&&(c=T(b.call(new e)))!==Object.prototype&&c.next&&(S(c,d,!0),h||"function"==typeof c[I]||w(c,I,O)),m&&_&&_.name!==P&&(f=!0,j=function(){return _.call(this)}),h&&!i||!M&&!f&&p[I]||w(p,I,j),x[o]=j,x[d]=O,t)if(u={values:m?j:a(P),keys:s?j:a("keys"),entries:y},i)for(l in u)l in p||g(p,l,u[l]);else v(v.P+v.F*(M||f),o,u);return u}},"./node_modules/core-js/library/modules/_iter-detect.js": 153 +/*! no static exports found */function(e,o,r){"use strict";var h=r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),v=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),g=r(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),w=r(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),x=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),k=r(/*! ./_iter-create */"./node_modules/core-js/library/modules/_iter-create.js"),S=r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),T=r(/*! ./_object-gpo */"./node_modules/core-js/library/modules/_object-gpo.js"),I=r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),M=!([].keys&&"next"in[].keys()),O="values",P=function(){return this};e.exports=function(e,o,r,n,t,s,i){k(r,o,n);var u,l,c,a=function(e){if(!M&&e in p)return p[e];switch(e){case"keys":case O:return function(){return new r(this,e)}}return function(){return new r(this,e)}},d=o+" Iterator",m=t==O,f=!1,p=e.prototype,_=p[I]||p["@@iterator"]||t&&p[t],j=_||a(t),y=t?m?a("entries"):j:void 0,b="Array"==o&&p.entries||_;if(b&&(c=T(b.call(new e)))!==Object.prototype&&c.next&&(S(c,d,!0),h||"function"==typeof c[I]||w(c,I,P)),m&&_&&_.name!==O&&(f=!0,j=function(){return _.call(this)}),h&&!i||!M&&!f&&p[I]||w(p,I,j),x[o]=j,x[d]=P,t)if(u={values:m?j:a(O),keys:s?j:a("keys"),entries:y},i)for(l in u)l in p||g(p,l,u[l]);else v(v.P+v.F*(M||f),o,u);return u}},"./node_modules/core-js/library/modules/_iter-detect.js":
154 /*!**************************************************************!*\ 154 /*!**************************************************************!*\
155 !*** ./node_modules/core-js/library/modules/_iter-detect.js ***! 155 !*** ./node_modules/core-js/library/modules/_iter-detect.js ***!
156 \**************************************************************/ 156 \**************************************************************/
@@ -310,7 +310,7 @@ @@ -310,7 +310,7 @@
310 /*!*************************************************************!*\ 310 /*!*************************************************************!*\
311 !*** ./node_modules/core-js/library/modules/es6.promise.js ***! 311 !*** ./node_modules/core-js/library/modules/es6.promise.js ***!
312 \*************************************************************/ 312 \*************************************************************/
313 -/*! no static exports found */function(e,o,r){"use strict";var n,t,s,i,u=r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),l=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),c=r(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),a=r(/*! ./_classof */"./node_modules/core-js/library/modules/_classof.js"),d=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),m=r(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),f=r(/*! ./_a-function */"./node_modules/core-js/library/modules/_a-function.js"),p=r(/*! ./_an-instance */"./node_modules/core-js/library/modules/_an-instance.js"),_=r(/*! ./_for-of */"./node_modules/core-js/library/modules/_for-of.js"),j=r(/*! ./_species-constructor */"./node_modules/core-js/library/modules/_species-constructor.js"),y=r(/*! ./_task */"./node_modules/core-js/library/modules/_task.js").set,b=r(/*! ./_microtask */"./node_modules/core-js/library/modules/_microtask.js")(),h=r(/*! ./_new-promise-capability */"./node_modules/core-js/library/modules/_new-promise-capability.js"),v=r(/*! ./_perform */"./node_modules/core-js/library/modules/_perform.js"),g=r(/*! ./_user-agent */"./node_modules/core-js/library/modules/_user-agent.js"),w=r(/*! ./_promise-resolve */"./node_modules/core-js/library/modules/_promise-resolve.js"),x="Promise",k=l.TypeError,S=l.process,T=S&&S.versions,I=T&&T.v8||"",M=l[x],P="process"==a(S),O=function(){},C=t=h.f,A=!!function(){try{var e=M.resolve(1),o=(e.constructor={})[r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("species")]=function(e){e(O,O)};return(P||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof o&&0!==I.indexOf("6.6")&&-1===g.indexOf("Chrome/66")}catch(e){}}(),L=function(e){var o;return!(!m(e)||"function"!=typeof(o=e.then))&&o},E=function(a,r){if(!a._n){a._n=!0;var n=a._c;b(function(){for(var l=a._v,c=1==a._s,e=0,o=function(e){var o,r,n,t=c?e.ok:e.fail,s=e.resolve,i=e.reject,u=e.domain;try{t?(c||(2==a._h&&B(a),a._h=1),!0===t?o=l:(u&&u.enter(),o=t(l),u&&(u.exit(),n=!0)),o===e.promise?i(k("Promise-chain cycle")):(r=L(o))?r.call(o,s,i):s(o)):i(l)}catch(e){u&&!n&&u.exit(),i(e)}};n.length>e;)o(n[e++]);a._c=[],a._n=!1,r&&!a._h&&R(a)})}},R=function(s){y.call(l,function(){var e,o,r,n=s._v,t=V(s);if(t&&(e=v(function(){P?S.emit("unhandledRejection",n,s):(o=l.onunhandledrejection)?o({promise:s,reason:n}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",n)}),s._h=P||V(s)?2:1),s._a=void 0,t&&e.e)throw e.v})},V=function(e){return 1!==e._h&&0===(e._a||e._c).length},B=function(o){y.call(l,function(){var e;P?S.emit("rejectionHandled",o):(e=l.onrejectionhandled)&&e({promise:o,reason:o._v})})},N=function(e){var o=this;o._d||(o._d=!0,(o=o._w||o)._v=e,o._s=2,o._a||(o._a=o._c.slice()),E(o,!0))},U=function(e){var r,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(r=L(e))?b(function(){var o={_w:n,_d:!1};try{r.call(e,c(U,o,1),c(N,o,1))}catch(e){N.call(o,e)}}):(n._v=e,n._s=1,E(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};A||(M=function(e){p(this,M,x,"_h"),f(e),n.call(this);try{e(c(U,this,1),c(N,this,1))}catch(e){N.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(/*! ./_redefine-all */"./node_modules/core-js/library/modules/_redefine-all.js")(M.prototype,{then:function(e,o){var r=C(j(this,M));return r.ok="function"!=typeof e||e,r.fail="function"==typeof o&&o,r.domain=P?S.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&E(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),s=function(){var e=new n;this.promise=e,this.resolve=c(U,e,1),this.reject=c(N,e,1)},h.f=C=function(e){return e===M||e===i?new s(e):t(e)}),d(d.G+d.W+d.F*!A,{Promise:M}),r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js")(M,x),r(/*! ./_set-species */"./node_modules/core-js/library/modules/_set-species.js")(x),i=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js")[x],d(d.S+d.F*!A,x,{reject:function(e){var o=C(this);return(0,o.reject)(e),o.promise}}),d(d.S+d.F*(u||!A),x,{resolve:function(e){return w(u&&this===i?M:this,e)}}),d(d.S+d.F*!(A&&r(/*! ./_iter-detect */"./node_modules/core-js/library/modules/_iter-detect.js")(function(e){M.all(e).catch(O)})),x,{all:function(e){var i=this,o=C(i),u=o.resolve,l=o.reject,r=v(function(){var n=[],t=0,s=1;_(e,!1,function(e){var o=t++,r=!1;n.push(void 0),s++,i.resolve(e).then(function(e){r||(r=!0,n[o]=e,--s||u(n))},l)}),--s||u(n)});return r.e&&l(r.v),o.promise},race:function(e){var o=this,r=C(o),n=r.reject,t=v(function(){_(e,!1,function(e){o.resolve(e).then(r.resolve,n)})});return t.e&&n(t.v),r.promise}})},"./node_modules/core-js/library/modules/es6.string.iterator.js": 313 +/*! no static exports found */function(e,o,r){"use strict";var n,t,s,i,u=r(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),l=r(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),c=r(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),a=r(/*! ./_classof */"./node_modules/core-js/library/modules/_classof.js"),d=r(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),m=r(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),f=r(/*! ./_a-function */"./node_modules/core-js/library/modules/_a-function.js"),p=r(/*! ./_an-instance */"./node_modules/core-js/library/modules/_an-instance.js"),_=r(/*! ./_for-of */"./node_modules/core-js/library/modules/_for-of.js"),j=r(/*! ./_species-constructor */"./node_modules/core-js/library/modules/_species-constructor.js"),y=r(/*! ./_task */"./node_modules/core-js/library/modules/_task.js").set,b=r(/*! ./_microtask */"./node_modules/core-js/library/modules/_microtask.js")(),h=r(/*! ./_new-promise-capability */"./node_modules/core-js/library/modules/_new-promise-capability.js"),v=r(/*! ./_perform */"./node_modules/core-js/library/modules/_perform.js"),g=r(/*! ./_user-agent */"./node_modules/core-js/library/modules/_user-agent.js"),w=r(/*! ./_promise-resolve */"./node_modules/core-js/library/modules/_promise-resolve.js"),x="Promise",k=l.TypeError,S=l.process,T=S&&S.versions,I=T&&T.v8||"",M=l[x],O="process"==a(S),P=function(){},C=t=h.f,A=!!function(){try{var e=M.resolve(1),o=(e.constructor={})[r(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("species")]=function(e){e(P,P)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(P)instanceof o&&0!==I.indexOf("6.6")&&-1===g.indexOf("Chrome/66")}catch(e){}}(),L=function(e){var o;return!(!m(e)||"function"!=typeof(o=e.then))&&o},E=function(a,r){if(!a._n){a._n=!0;var n=a._c;b(function(){for(var l=a._v,c=1==a._s,e=0,o=function(e){var o,r,n,t=c?e.ok:e.fail,s=e.resolve,i=e.reject,u=e.domain;try{t?(c||(2==a._h&&B(a),a._h=1),!0===t?o=l:(u&&u.enter(),o=t(l),u&&(u.exit(),n=!0)),o===e.promise?i(k("Promise-chain cycle")):(r=L(o))?r.call(o,s,i):s(o)):i(l)}catch(e){u&&!n&&u.exit(),i(e)}};n.length>e;)o(n[e++]);a._c=[],a._n=!1,r&&!a._h&&R(a)})}},R=function(s){y.call(l,function(){var e,o,r,n=s._v,t=V(s);if(t&&(e=v(function(){O?S.emit("unhandledRejection",n,s):(o=l.onunhandledrejection)?o({promise:s,reason:n}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",n)}),s._h=O||V(s)?2:1),s._a=void 0,t&&e.e)throw e.v})},V=function(e){return 1!==e._h&&0===(e._a||e._c).length},B=function(o){y.call(l,function(){var e;O?S.emit("rejectionHandled",o):(e=l.onrejectionhandled)&&e({promise:o,reason:o._v})})},N=function(e){var o=this;o._d||(o._d=!0,(o=o._w||o)._v=e,o._s=2,o._a||(o._a=o._c.slice()),E(o,!0))},U=function(e){var r,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(r=L(e))?b(function(){var o={_w:n,_d:!1};try{r.call(e,c(U,o,1),c(N,o,1))}catch(e){N.call(o,e)}}):(n._v=e,n._s=1,E(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};A||(M=function(e){p(this,M,x,"_h"),f(e),n.call(this);try{e(c(U,this,1),c(N,this,1))}catch(e){N.call(this,e)}},(n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=r(/*! ./_redefine-all */"./node_modules/core-js/library/modules/_redefine-all.js")(M.prototype,{then:function(e,o){var r=C(j(this,M));return r.ok="function"!=typeof e||e,r.fail="function"==typeof o&&o,r.domain=O?S.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&E(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),s=function(){var e=new n;this.promise=e,this.resolve=c(U,e,1),this.reject=c(N,e,1)},h.f=C=function(e){return e===M||e===i?new s(e):t(e)}),d(d.G+d.W+d.F*!A,{Promise:M}),r(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js")(M,x),r(/*! ./_set-species */"./node_modules/core-js/library/modules/_set-species.js")(x),i=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js")[x],d(d.S+d.F*!A,x,{reject:function(e){var o=C(this);return(0,o.reject)(e),o.promise}}),d(d.S+d.F*(u||!A),x,{resolve:function(e){return w(u&&this===i?M:this,e)}}),d(d.S+d.F*!(A&&r(/*! ./_iter-detect */"./node_modules/core-js/library/modules/_iter-detect.js")(function(e){M.all(e).catch(P)})),x,{all:function(e){var i=this,o=C(i),u=o.resolve,l=o.reject,r=v(function(){var n=[],t=0,s=1;_(e,!1,function(e){var o=t++,r=!1;n.push(void 0),s++,i.resolve(e).then(function(e){r||(r=!0,n[o]=e,--s||u(n))},l)}),--s||u(n)});return r.e&&l(r.v),o.promise},race:function(e){var o=this,r=C(o),n=r.reject,t=v(function(){_(e,!1,function(e){o.resolve(e).then(r.resolve,n)})});return t.e&&n(t.v),r.promise}})},"./node_modules/core-js/library/modules/es6.string.iterator.js":
314 /*!*********************************************************************!*\ 314 /*!*********************************************************************!*\
315 !*** ./node_modules/core-js/library/modules/es6.string.iterator.js ***! 315 !*** ./node_modules/core-js/library/modules/es6.string.iterator.js ***!
316 \*********************************************************************/ 316 \*********************************************************************/
@@ -358,15 +358,15 @@ @@ -358,15 +358,15 @@
358 /*!*********************************************!*\ 358 /*!*********************************************!*\
359 !*** ./node_modules/weixin-js-sdk/index.js ***! 359 !*** ./node_modules/weixin-js-sdk/index.js ***!
360 \*********************************************/ 360 \*********************************************/
361 -/*! no static exports found */function(e,o){var r;r=window,e.exports=function(t,e){function u(o,e,r){t.WeixinJSBridge?WeixinJSBridge.invoke(o,s(e),function(e){i(o,e,r)}):c(o,r)}function o(o,r,n){t.WeixinJSBridge?WeixinJSBridge.on(o,function(e){n&&n.trigger&&n.trigger(e),i(o,e,r)}):c(o,n||r)}function s(e){return(e=e||{}).appId=S.appId,e.verifyAppId=S.appId,e.verifySignType="sha1",e.verifyTimestamp=S.timestamp+"",e.verifyNonceStr=S.nonceStr,e.verifySignature=S.signature,e}function r(e){return{timeStamp:e.timestamp+"",nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function i(e,o,r){"openEnterpriseChat"==e&&(o.errCode=o.err_code),delete o.err_code,delete o.err_desc,delete o.err_detail;var n=o.errMsg;n||(n=o.err_msg,delete o.err_msg,n=function(e,o){var r=e,n=f[r];n&&(r=n);var t="ok";if(o){var s=o.indexOf(":");"confirm"==(t=o.substring(s+1))&&(t="ok"),"failed"==t&&(t="fail"),-1!=t.indexOf("failed_")&&(t=t.substring(7)),-1!=t.indexOf("fail_")&&(t=t.substring(5)),"access denied"!=(t=(t=t.replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=t||(t="permission denied"),"config"==r&&"function not exist"==t&&(t="ok"),""==t&&(t="fail")}return o=r+":"+t}(e,n),o.errMsg=n),(r=r||{})._complete&&(r._complete(o),delete r._complete),n=o.errMsg||"",S.debug&&!r.isInnerInvoke&&alert(JSON.stringify(o));var t=n.indexOf(":");switch(n.substring(t+1)){case"ok":r.success&&r.success(o);break;case"cancel":r.cancel&&r.cancel(o);break;default:r.fail&&r.fail(o)}r.complete&&r.complete(o)}function l(e){if(e){for(var o=0,r=e.length;o<r;++o){var n=e[o],t=m[n];t&&(e[o]=t)}return e}}function c(e,o){if(!(!S.debug||o&&o.isInnerInvoke)){var r=f[e];r&&(e=r),o&&o._complete&&delete o._complete,console.log('"'+e+'",',o||"")}}function a(){return(new Date).getTime()}function d(e){h&&(t.WeixinJSBridge?"preInject"===n.__wxjsjs__isPreInject?n.addEventListener&&n.addEventListener("WeixinJSBridgeReady",e,!1):e():n.addEventListener&&n.addEventListener("WeixinJSBridgeReady",e,!1))}if(!t.jWeixin){var m={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},f=function(){var e={};for(var o in m)e[m[o]]=o;return e}(),n=t.document,p=n.title,_=navigator.userAgent.toLowerCase(),j=navigator.platform.toLowerCase(),y=!(!j.match("mac")&&!j.match("win")),b=-1!=_.indexOf("wxdebugger"),h=-1!=_.indexOf("micromessenger"),v=-1!=_.indexOf("android"),g=-1!=_.indexOf("iphone")||-1!=_.indexOf("ipad"),w=(L=_.match(/micromessenger\/(\d+\.\d+\.\d+)/)||_.match(/micromessenger\/(\d+\.\d+)/))?L[1]:"",x={initStartTime:a(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},k={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:g?1:v?2:-1,clientVersion:w,url:encodeURIComponent(location.href)},S={},T={_completes:[]},I={state:0,data:{}};d(function(){x.initEndTime=a()});var M=!1,P=[],O={config:function(e){c("config",S=e);var n=!1!==S.check;d(function(){if(n)u(m.config,{verifyJsApiList:l(S.jsApiList)},function(){T._complete=function(e){x.preVerifyEndTime=a(),I.state=1,I.data=e},T.success=function(e){k.isPreVerifyOk=0},T.fail=function(e){T._fail?T._fail(e):I.state=-1};var n=T._completes;return n.push(function(){!function(e){if(!(y||b||S.debug||w<"6.0.2"||k.systemType<0)){var r=new Image;k.appId=S.appId,k.initTime=x.initEndTime-x.initStartTime,k.preVerifyTime=x.preVerifyEndTime-x.preVerifyStartTime,O.getNetworkType({isInnerInvoke:!0,success:function(e){k.networkType=e.networkType;var o="https://open.weixin.qq.com/sdk/report?v="+k.version+"&o="+k.isPreVerifyOk+"&s="+k.systemType+"&c="+k.clientVersion+"&a="+k.appId+"&n="+k.networkType+"&i="+k.initTime+"&p="+k.preVerifyTime+"&u="+k.url;r.src=o}})}}()}),T.complete=function(e){for(var o=0,r=n.length;o<r;++o)n[o]();T._completes=[]},T}()),x.preVerifyStartTime=a();else{I.state=1;for(var e=T._completes,o=0,r=e.length;o<r;++o)e[o]();T._completes=[]}}),O.invoke||(O.invoke=function(e,o,r){t.WeixinJSBridge&&WeixinJSBridge.invoke(e,s(o),r)},O.on=function(e,o){t.WeixinJSBridge&&WeixinJSBridge.on(e,o)})},ready:function(e){0!=I.state?e():(T._completes.push(e),!h&&S.debug&&e())},error:function(e){w<"6.0.2"||(-1==I.state?e(I.data):T._fail=e)},checkJsApi:function(e){u("checkJsApi",{jsApiList:l(e.jsApiList)},(e._complete=function(e){if(v){var o=e.checkResult;o&&(e.checkResult=JSON.parse(o))}e=function(e){var o=e.checkResult;for(var r in o){var n=f[r];n&&(o[n]=o[r],delete o[r])}return e}(e)},e))},onMenuShareTimeline:function(e){o(m.onMenuShareTimeline,{complete:function(){u("shareTimeline",{title:e.title||p,desc:e.title||p,img_url:e.imgUrl||"",link:e.link||location.href,type:e.type||"link",data_url:e.dataUrl||""},e)}},e)},onMenuShareAppMessage:function(e){o(m.onMenuShareAppMessage,{complete:function(){u("sendAppMessage",{title:e.title||p,desc:e.desc||"",link:e.link||location.href,img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""},e)}},e)},onMenuShareQQ:function(e){o(m.onMenuShareQQ,{complete:function(){u("shareQQ",{title:e.title||p,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareWeibo:function(e){o(m.onMenuShareWeibo,{complete:function(){u("shareWeiboApp",{title:e.title||p,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareQZone:function(e){o(m.onMenuShareQZone,{complete:function(){u("shareQZone",{title:e.title||p,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},startRecord:function(e){u("startRecord",{},e)},stopRecord:function(e){u("stopRecord",{},e)},onVoiceRecordEnd:function(e){o("onVoiceRecordEnd",e)},playVoice:function(e){u("playVoice",{localId:e.localId},e)},pauseVoice:function(e){u("pauseVoice",{localId:e.localId},e)},stopVoice:function(e){u("stopVoice",{localId:e.localId},e)},onVoicePlayEnd:function(e){o("onVoicePlayEnd",e)},uploadVoice:function(e){u("uploadVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadVoice:function(e){u("downloadVoice",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},translateVoice:function(e){u("translateVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},chooseImage:function(e){u("chooseImage",{scene:"1|2",count:e.count||9,sizeType:e.sizeType||["original","compressed"],sourceType:e.sourceType||["album","camera"]},(e._complete=function(e){if(v){var o=e.localIds;o&&(e.localIds=JSON.parse(o))}},e))},getLocation:function(e){},previewImage:function(e){u(m.previewImage,{current:e.current,urls:e.urls},e)},uploadImage:function(e){u("uploadImage",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadImage:function(e){u("downloadImage",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},getLocalImgData:function(e){!1===M?(M=!0,u("getLocalImgData",{localId:e.localId},(e._complete=function(e){if(M=!1,0<P.length){var o=P.shift();O.getLocalImgData(o)}},e))):P.push(e)},getNetworkType:function(e){u("getNetworkType",{},(e._complete=function(e){e=function(e){var o=e.errMsg;e.errMsg="getNetworkType:ok";var r=e.subtype;if(delete e.subtype,r)e.networkType=r;else{var n=o.indexOf(":"),t=o.substring(n+1);switch(t){case"wifi":case"edge":case"wwan":e.networkType=t;break;default:e.errMsg="getNetworkType:fail"}}return e}(e)},e))},openLocation:function(e){u("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){u(m.getLocation,{type:(e=e||{}).type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){u("hideOptionMenu",{},e)},showOptionMenu:function(e){u("showOptionMenu",{},e)},closeWindow:function(e){u("closeWindow",{},e=e||{})},hideMenuItems:function(e){u("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){u("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){u("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){u("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){u("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(g){var o=e.resultStr;if(o){var r=JSON.parse(o);e.resultStr=r&&r.scan_code&&r.scan_code.scan_result}}},e))},openAddress:function(e){u(m.openAddress,{},(e._complete=function(e){var o;(o=e).postalCode=o.addressPostalCode,delete o.addressPostalCode,o.provinceName=o.proviceFirstStageName,delete o.proviceFirstStageName,o.cityName=o.addressCitySecondStageName,delete o.addressCitySecondStageName,o.countryName=o.addressCountiesThirdStageName,delete o.addressCountiesThirdStageName,o.detailInfo=o.addressDetailInfo,delete o.addressDetailInfo,e=o},e))},openProductSpecificView:function(e){u(m.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var o=e.cardList,r=[],n=0,t=o.length;n<t;++n){var s=o[n],i={card_id:s.cardId,card_ext:s.cardExt};r.push(i)}u(m.addCard,{card_list:r},(e._complete=function(e){var o=e.card_list;if(o){for(var r=0,n=(o=JSON.parse(o)).length;r<n;++r){var t=o[r];t.cardId=t.card_id,t.cardExt=t.card_ext,t.isSuccess=!!t.is_succ,delete t.card_id,delete t.card_ext,delete t.is_succ}e.cardList=o,delete e.card_list}},e))},chooseCard:function(e){u("chooseCard",{app_id:S.appId,location_id:e.shopId||"",sign_type:e.signType||"SHA1",card_id:e.cardId||"",card_type:e.cardType||"",card_sign:e.cardSign,time_stamp:e.timestamp+"",nonce_str:e.nonceStr},(e._complete=function(e){e.cardList=e.choose_card_info,delete e.choose_card_info},e))},openCard:function(e){for(var o=e.cardList,r=[],n=0,t=o.length;n<t;++n){var s=o[n],i={card_id:s.cardId,code:s.code};r.push(i)}u(m.openCard,{card_list:r},e)},consumeAndShareCard:function(e){u(m.consumeAndShareCard,{consumedCardId:e.cardId,consumedCode:e.code},e)},chooseWXPay:function(e){u(m.chooseWXPay,r(e),e)},openEnterpriseRedPacket:function(e){u(m.openEnterpriseRedPacket,r(e),e)},startSearchBeacons:function(e){u(m.startSearchBeacons,{ticket:e.ticket},e)},stopSearchBeacons:function(e){u(m.stopSearchBeacons,{},e)},onSearchBeacons:function(e){o(m.onSearchBeacons,e)},openEnterpriseChat:function(e){u("openEnterpriseChat",{useridlist:e.userIds,chatname:e.groupName},e)},launchMiniProgram:function(e){u("launchMiniProgram",{targetAppId:e.targetAppId,path:function(e){if("string"==typeof e&&0<e.length){var o=e.split("?")[0],r=e.split("?")[1];return o+=".html",void 0!==r?o+"?"+r:o}}(e.path),envVersion:e.envVersion},e)},miniProgram:{navigateBack:function(e){e=e||{},d(function(){u("invokeMiniProgramAPI",{name:"navigateBack",arg:{delta:e.delta||1}},e)})},navigateTo:function(e){d(function(){u("invokeMiniProgramAPI",{name:"navigateTo",arg:{url:e.url}},e)})},redirectTo:function(e){d(function(){u("invokeMiniProgramAPI",{name:"redirectTo",arg:{url:e.url}},e)})},switchTab:function(e){d(function(){u("invokeMiniProgramAPI",{name:"switchTab",arg:{url:e.url}},e)})},reLaunch:function(e){d(function(){u("invokeMiniProgramAPI",{name:"reLaunch",arg:{url:e.url}},e)})},postMessage:function(e){d(function(){u("invokeMiniProgramAPI",{name:"postMessage",arg:e.data||{}},e)})},getEnv:function(e){d(function(){e({miniprogram:"miniprogram"===t.__wxjs_environment})})}}},C=1,A={};return n.addEventListener("error",function(e){if(!v){var o=e.target,r=o.tagName,n=o.src;if(("IMG"==r||"VIDEO"==r||"AUDIO"==r||"SOURCE"==r)&&-1!=n.indexOf("wxlocalresource://")){e.preventDefault(),e.stopPropagation();var t=o["wx-id"];if(t||(t=C++,o["wx-id"]=t),A[t])return;A[t]=!0,O.ready(function(){O.getLocalImgData({localId:n,success:function(e){o.src=e.localData}})})}}},!0),n.addEventListener("load",function(e){if(!v){var o=e.target,r=o.tagName;if(o.src,"IMG"==r||"VIDEO"==r||"AUDIO"==r||"SOURCE"==r){var n=o["wx-id"];n&&(A[n]=!1)}}},!0),e&&(t.wx=t.jWeixin=O),O}var L}(r)},"./src/index.js": 361 +/*! no static exports found */function(e,o){var r;r=window,e.exports=function(t,e){function u(o,e,r){t.WeixinJSBridge?WeixinJSBridge.invoke(o,s(e),function(e){i(o,e,r)}):c(o,r)}function o(o,r,n){t.WeixinJSBridge?WeixinJSBridge.on(o,function(e){n&&n.trigger&&n.trigger(e),i(o,e,r)}):c(o,n||r)}function s(e){return(e=e||{}).appId=S.appId,e.verifyAppId=S.appId,e.verifySignType="sha1",e.verifyTimestamp=S.timestamp+"",e.verifyNonceStr=S.nonceStr,e.verifySignature=S.signature,e}function r(e){return{timeStamp:e.timestamp+"",nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function i(e,o,r){"openEnterpriseChat"==e&&(o.errCode=o.err_code),delete o.err_code,delete o.err_desc,delete o.err_detail;var n=o.errMsg;n||(n=o.err_msg,delete o.err_msg,n=function(e,o){var r=e,n=f[r];n&&(r=n);var t="ok";if(o){var s=o.indexOf(":");"confirm"==(t=o.substring(s+1))&&(t="ok"),"failed"==t&&(t="fail"),-1!=t.indexOf("failed_")&&(t=t.substring(7)),-1!=t.indexOf("fail_")&&(t=t.substring(5)),"access denied"!=(t=(t=t.replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=t||(t="permission denied"),"config"==r&&"function not exist"==t&&(t="ok"),""==t&&(t="fail")}return o=r+":"+t}(e,n),o.errMsg=n),(r=r||{})._complete&&(r._complete(o),delete r._complete),n=o.errMsg||"",S.debug&&!r.isInnerInvoke&&alert(JSON.stringify(o));var t=n.indexOf(":");switch(n.substring(t+1)){case"ok":r.success&&r.success(o);break;case"cancel":r.cancel&&r.cancel(o);break;default:r.fail&&r.fail(o)}r.complete&&r.complete(o)}function l(e){if(e){for(var o=0,r=e.length;o<r;++o){var n=e[o],t=m[n];t&&(e[o]=t)}return e}}function c(e,o){if(!(!S.debug||o&&o.isInnerInvoke)){var r=f[e];r&&(e=r),o&&o._complete&&delete o._complete,console.log('"'+e+'",',o||"")}}function a(){return(new Date).getTime()}function d(e){h&&(t.WeixinJSBridge?"preInject"===n.__wxjsjs__isPreInject?n.addEventListener&&n.addEventListener("WeixinJSBridgeReady",e,!1):e():n.addEventListener&&n.addEventListener("WeixinJSBridgeReady",e,!1))}if(!t.jWeixin){var m={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},f=function(){var e={};for(var o in m)e[m[o]]=o;return e}(),n=t.document,p=n.title,_=navigator.userAgent.toLowerCase(),j=navigator.platform.toLowerCase(),y=!(!j.match("mac")&&!j.match("win")),b=-1!=_.indexOf("wxdebugger"),h=-1!=_.indexOf("micromessenger"),v=-1!=_.indexOf("android"),g=-1!=_.indexOf("iphone")||-1!=_.indexOf("ipad"),w=(L=_.match(/micromessenger\/(\d+\.\d+\.\d+)/)||_.match(/micromessenger\/(\d+\.\d+)/))?L[1]:"",x={initStartTime:a(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},k={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:g?1:v?2:-1,clientVersion:w,url:encodeURIComponent(location.href)},S={},T={_completes:[]},I={state:0,data:{}};d(function(){x.initEndTime=a()});var M=!1,O=[],P={config:function(e){c("config",S=e);var n=!1!==S.check;d(function(){if(n)u(m.config,{verifyJsApiList:l(S.jsApiList)},function(){T._complete=function(e){x.preVerifyEndTime=a(),I.state=1,I.data=e},T.success=function(e){k.isPreVerifyOk=0},T.fail=function(e){T._fail?T._fail(e):I.state=-1};var n=T._completes;return n.push(function(){!function(e){if(!(y||b||S.debug||w<"6.0.2"||k.systemType<0)){var r=new Image;k.appId=S.appId,k.initTime=x.initEndTime-x.initStartTime,k.preVerifyTime=x.preVerifyEndTime-x.preVerifyStartTime,P.getNetworkType({isInnerInvoke:!0,success:function(e){k.networkType=e.networkType;var o="https://open.weixin.qq.com/sdk/report?v="+k.version+"&o="+k.isPreVerifyOk+"&s="+k.systemType+"&c="+k.clientVersion+"&a="+k.appId+"&n="+k.networkType+"&i="+k.initTime+"&p="+k.preVerifyTime+"&u="+k.url;r.src=o}})}}()}),T.complete=function(e){for(var o=0,r=n.length;o<r;++o)n[o]();T._completes=[]},T}()),x.preVerifyStartTime=a();else{I.state=1;for(var e=T._completes,o=0,r=e.length;o<r;++o)e[o]();T._completes=[]}}),P.invoke||(P.invoke=function(e,o,r){t.WeixinJSBridge&&WeixinJSBridge.invoke(e,s(o),r)},P.on=function(e,o){t.WeixinJSBridge&&WeixinJSBridge.on(e,o)})},ready:function(e){0!=I.state?e():(T._completes.push(e),!h&&S.debug&&e())},error:function(e){w<"6.0.2"||(-1==I.state?e(I.data):T._fail=e)},checkJsApi:function(e){u("checkJsApi",{jsApiList:l(e.jsApiList)},(e._complete=function(e){if(v){var o=e.checkResult;o&&(e.checkResult=JSON.parse(o))}e=function(e){var o=e.checkResult;for(var r in o){var n=f[r];n&&(o[n]=o[r],delete o[r])}return e}(e)},e))},onMenuShareTimeline:function(e){o(m.onMenuShareTimeline,{complete:function(){u("shareTimeline",{title:e.title||p,desc:e.title||p,img_url:e.imgUrl||"",link:e.link||location.href,type:e.type||"link",data_url:e.dataUrl||""},e)}},e)},onMenuShareAppMessage:function(e){o(m.onMenuShareAppMessage,{complete:function(){u("sendAppMessage",{title:e.title||p,desc:e.desc||"",link:e.link||location.href,img_url:e.imgUrl||"",type:e.type||"link",data_url:e.dataUrl||""},e)}},e)},onMenuShareQQ:function(e){o(m.onMenuShareQQ,{complete:function(){u("shareQQ",{title:e.title||p,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareWeibo:function(e){o(m.onMenuShareWeibo,{complete:function(){u("shareWeiboApp",{title:e.title||p,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},onMenuShareQZone:function(e){o(m.onMenuShareQZone,{complete:function(){u("shareQZone",{title:e.title||p,desc:e.desc||"",img_url:e.imgUrl||"",link:e.link||location.href},e)}},e)},startRecord:function(e){u("startRecord",{},e)},stopRecord:function(e){u("stopRecord",{},e)},onVoiceRecordEnd:function(e){o("onVoiceRecordEnd",e)},playVoice:function(e){u("playVoice",{localId:e.localId},e)},pauseVoice:function(e){u("pauseVoice",{localId:e.localId},e)},stopVoice:function(e){u("stopVoice",{localId:e.localId},e)},onVoicePlayEnd:function(e){o("onVoicePlayEnd",e)},uploadVoice:function(e){u("uploadVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadVoice:function(e){u("downloadVoice",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},translateVoice:function(e){u("translateVoice",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},chooseImage:function(e){u("chooseImage",{scene:"1|2",count:e.count||9,sizeType:e.sizeType||["original","compressed"],sourceType:e.sourceType||["album","camera"]},(e._complete=function(e){if(v){var o=e.localIds;o&&(e.localIds=JSON.parse(o))}},e))},getLocation:function(e){},previewImage:function(e){u(m.previewImage,{current:e.current,urls:e.urls},e)},uploadImage:function(e){u("uploadImage",{localId:e.localId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},downloadImage:function(e){u("downloadImage",{serverId:e.serverId,isShowProgressTips:0==e.isShowProgressTips?0:1},e)},getLocalImgData:function(e){!1===M?(M=!0,u("getLocalImgData",{localId:e.localId},(e._complete=function(e){if(M=!1,0<O.length){var o=O.shift();P.getLocalImgData(o)}},e))):O.push(e)},getNetworkType:function(e){u("getNetworkType",{},(e._complete=function(e){e=function(e){var o=e.errMsg;e.errMsg="getNetworkType:ok";var r=e.subtype;if(delete e.subtype,r)e.networkType=r;else{var n=o.indexOf(":"),t=o.substring(n+1);switch(t){case"wifi":case"edge":case"wwan":e.networkType=t;break;default:e.errMsg="getNetworkType:fail"}}return e}(e)},e))},openLocation:function(e){u("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){u(m.getLocation,{type:(e=e||{}).type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){u("hideOptionMenu",{},e)},showOptionMenu:function(e){u("showOptionMenu",{},e)},closeWindow:function(e){u("closeWindow",{},e=e||{})},hideMenuItems:function(e){u("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){u("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){u("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){u("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){u("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(g){var o=e.resultStr;if(o){var r=JSON.parse(o);e.resultStr=r&&r.scan_code&&r.scan_code.scan_result}}},e))},openAddress:function(e){u(m.openAddress,{},(e._complete=function(e){var o;(o=e).postalCode=o.addressPostalCode,delete o.addressPostalCode,o.provinceName=o.proviceFirstStageName,delete o.proviceFirstStageName,o.cityName=o.addressCitySecondStageName,delete o.addressCitySecondStageName,o.countryName=o.addressCountiesThirdStageName,delete o.addressCountiesThirdStageName,o.detailInfo=o.addressDetailInfo,delete o.addressDetailInfo,e=o},e))},openProductSpecificView:function(e){u(m.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var o=e.cardList,r=[],n=0,t=o.length;n<t;++n){var s=o[n],i={card_id:s.cardId,card_ext:s.cardExt};r.push(i)}u(m.addCard,{card_list:r},(e._complete=function(e){var o=e.card_list;if(o){for(var r=0,n=(o=JSON.parse(o)).length;r<n;++r){var t=o[r];t.cardId=t.card_id,t.cardExt=t.card_ext,t.isSuccess=!!t.is_succ,delete t.card_id,delete t.card_ext,delete t.is_succ}e.cardList=o,delete e.card_list}},e))},chooseCard:function(e){u("chooseCard",{app_id:S.appId,location_id:e.shopId||"",sign_type:e.signType||"SHA1",card_id:e.cardId||"",card_type:e.cardType||"",card_sign:e.cardSign,time_stamp:e.timestamp+"",nonce_str:e.nonceStr},(e._complete=function(e){e.cardList=e.choose_card_info,delete e.choose_card_info},e))},openCard:function(e){for(var o=e.cardList,r=[],n=0,t=o.length;n<t;++n){var s=o[n],i={card_id:s.cardId,code:s.code};r.push(i)}u(m.openCard,{card_list:r},e)},consumeAndShareCard:function(e){u(m.consumeAndShareCard,{consumedCardId:e.cardId,consumedCode:e.code},e)},chooseWXPay:function(e){u(m.chooseWXPay,r(e),e)},openEnterpriseRedPacket:function(e){u(m.openEnterpriseRedPacket,r(e),e)},startSearchBeacons:function(e){u(m.startSearchBeacons,{ticket:e.ticket},e)},stopSearchBeacons:function(e){u(m.stopSearchBeacons,{},e)},onSearchBeacons:function(e){o(m.onSearchBeacons,e)},openEnterpriseChat:function(e){u("openEnterpriseChat",{useridlist:e.userIds,chatname:e.groupName},e)},launchMiniProgram:function(e){u("launchMiniProgram",{targetAppId:e.targetAppId,path:function(e){if("string"==typeof e&&0<e.length){var o=e.split("?")[0],r=e.split("?")[1];return o+=".html",void 0!==r?o+"?"+r:o}}(e.path),envVersion:e.envVersion},e)},miniProgram:{navigateBack:function(e){e=e||{},d(function(){u("invokeMiniProgramAPI",{name:"navigateBack",arg:{delta:e.delta||1}},e)})},navigateTo:function(e){d(function(){u("invokeMiniProgramAPI",{name:"navigateTo",arg:{url:e.url}},e)})},redirectTo:function(e){d(function(){u("invokeMiniProgramAPI",{name:"redirectTo",arg:{url:e.url}},e)})},switchTab:function(e){d(function(){u("invokeMiniProgramAPI",{name:"switchTab",arg:{url:e.url}},e)})},reLaunch:function(e){d(function(){u("invokeMiniProgramAPI",{name:"reLaunch",arg:{url:e.url}},e)})},postMessage:function(e){d(function(){u("invokeMiniProgramAPI",{name:"postMessage",arg:e.data||{}},e)})},getEnv:function(e){d(function(){e({miniprogram:"miniprogram"===t.__wxjs_environment})})}}},C=1,A={};return n.addEventListener("error",function(e){if(!v){var o=e.target,r=o.tagName,n=o.src;if(("IMG"==r||"VIDEO"==r||"AUDIO"==r||"SOURCE"==r)&&-1!=n.indexOf("wxlocalresource://")){e.preventDefault(),e.stopPropagation();var t=o["wx-id"];if(t||(t=C++,o["wx-id"]=t),A[t])return;A[t]=!0,P.ready(function(){P.getLocalImgData({localId:n,success:function(e){o.src=e.localData}})})}}},!0),n.addEventListener("load",function(e){if(!v){var o=e.target,r=o.tagName;if(o.src,"IMG"==r||"VIDEO"==r||"AUDIO"==r||"SOURCE"==r){var n=o["wx-id"];n&&(A[n]=!1)}}},!0),e&&(t.wx=t.jWeixin=P),P}var L}(r)},"./src/index.js":
362 /*!**********************!*\ 362 /*!**********************!*\
363 !*** ./src/index.js ***! 363 !*** ./src/index.js ***!
364 \**********************/ 364 \**********************/
365 -/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=u(r(/*! ./public/base */"./src/public/base.js")),t=u(r(/*! ./public/login */"./src/public/login.js")),s=u(r(/*! ./public/goto */"./src/public/goto.js")),i=u(r(/*! ./public/share */"./src/public/share.js"));function u(e){return e&&e.__esModule?e:{default:e}}var l=n.default.env(),c=n.default.loginUrl(),a=new t.default({loginUrl:c,env:l}),d=new s.default(l),m=new i.default;o.default={auth:a.auth.bind(a),goLogin:a.goLogin.bind(a),getUid:n.default.getUid,env:l,link:d.link.bind(d),goBack:d.goBack.bind(d),wxShare:m.wxShare.bind(m),wxSignature:m.wxSignature}},"./src/public/base.js": 365 +/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=l(r(/*! ./public/base */"./src/public/base.js")),t=l(r(/*! ./public/login */"./src/public/login.js")),s=l(r(/*! ./public/goto */"./src/public/goto.js")),i=l(r(/*! ./public/share */"./src/public/share.js")),u=r(/*! ./utils/common */"./src/utils/common.js");function l(e){return e&&e.__esModule?e:{default:e}}var c=n.default.env(),a=n.default.loginUrl(),d=new t.default({loginUrl:a,env:c}),m=new s.default(c),f=new i.default;o.default={auth:d.auth.bind(d),goLogin:d.goLogin.bind(d),getUid:n.default.getUid,env:c,link:m.link.bind(m),goBack:m.goBack.bind(m),wxShare:f.wxShare.bind(f),wxSignature:f.wxSignature,getQueryObj:u.getQueryObj,invokeMethod:u.invokeMethod}},"./src/public/base.js":
366 /*!****************************!*\ 366 /*!****************************!*\
367 !*** ./src/public/base.js ***! 367 !*** ./src/public/base.js ***!
368 \****************************/ 368 \****************************/
369 -/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=l(r(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),t=l(r(/*! ../utils/jsonp */"./src/utils/jsonp.js")),s=l(r(/*! ../utils/cookie */"./src/utils/cookie.js")),i=r(/*! ../utils/common */"./src/utils/common.js"),u=l(r(/*! promise-polyfill */"./node_modules/promise-polyfill/src/index.js"));function l(e){return e&&e.__esModule?e:{default:e}}var c="";o.default={env:function(){var e=window.__wxjs_environment;return c=!e&&navigator.userAgent.match(/yohobuy/i)?(document.addEventListener("deviceready",function(){}),"app"):!e&&navigator.userAgent.match(/miniProgram/i)||"miniprogram"===e?"miniprogram":"https://www.yohobuy.com"===location.origin?"pc":"h5"},loginUrl:function(){var e=void 0,o=location.href;return e="http://m.yohobuy.com/signin.html?refer="+encodeURIComponent(o),"app"===c?(o=function(e){var o={},r=void 0,n=void 0,t=void 0;if((r=((e=(e||"").split("?"))[1]||"").split("&"))&&r.length)for(t=0;t<r.length;t++)o[(n=r[t].split("="))[0]]=n[1];return{path:e[0],query:o}}(o),/Android/i.test(navigator.userAgent||"")?(e.indexOf("?")<0&&(e+="?appLogin=1"),0<=location.href.indexOf("&openby")&&(e=e.substring(0,e.indexOf("&openby"))),e+="&"):(0<=location.href.indexOf("#openby")&&(e=e.substring(0,e.indexOf("#openby"))),e+="#"),e+="openby:yohobuy="+(0,n.default)({action:"go.weblogin",params:{priority:"N",jumpurl:{url:o.path,param:o.query},needlogout:"Y"}})):"pc"===c?e="https://www.yoho/signin.html?refer="+encodeURIComponent(location.href):"miniprogram"===c&&(e="/pages/userCenter/userCenter"),e},getUid:function(){return new u.default(function(r){if("h5"===c||"pc"===c)(0,t.default)("https://m.yohobuy.com/passport/login/user").then(function(e){var o=0;200===e.code&&(o=Number(e.data)),r(o)});else{var e=Number(s.default.cookie("app_uid"))||Number((0,i.getQueryObj)().uid)||0;r(e)}})}}},"./src/public/goto.js": 369 +/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=l(r(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),t=l(r(/*! ../utils/jsonp */"./src/utils/jsonp.js")),s=l(r(/*! ../utils/cookie */"./src/utils/cookie.js")),i=r(/*! ../utils/common */"./src/utils/common.js"),u=l(r(/*! promise-polyfill */"./node_modules/promise-polyfill/src/index.js"));function l(e){return e&&e.__esModule?e:{default:e}}var c="";o.default={env:function(){var e=window.__wxjs_environment;return c=!e&&navigator.userAgent.match(/yohobuy/i)?(document.addEventListener("deviceready",function(){}),"app"):!e&&navigator.userAgent.match(/miniProgram/i)||"miniprogram"===e?"miniprogram":"https://www.yohobuy.com"===location.origin?"pc":"h5"},loginUrl:function(){var e=void 0,o=location.href;return"app"===c?(e="http://m.yohobuy.com/signin.html?refer="+encodeURIComponent(o),o=function(e){var o={},r=void 0,n=void 0,t=void 0;if((r=((e=(e||"").split("?"))[1]||"").split("&"))&&r.length)for(t=0;t<r.length;t++)o[(n=r[t].split("="))[0]]=n[1];return{path:e[0],query:o}}(o),/Android/i.test(navigator.userAgent||"")?(e.indexOf("?")<0&&(e+="?appLogin=1"),0<=location.href.indexOf("&openby")&&(e=e.substring(0,e.indexOf("&openby"))),e+="&"):(0<=location.href.indexOf("#openby")&&(e=e.substring(0,e.indexOf("#openby"))),e+="#"),e+="openby:yohobuy="+(0,n.default)({action:"go.weblogin",params:{priority:"N",jumpurl:{url:o.path,param:o.query},needlogout:"Y"}})):e="pc"===c?"https://www.yoho/signin.html?refer="+encodeURIComponent(location.href):"miniprogram"===c?"/pages/userCenter/userCenter":(o.indexOf("?")<0?o+="?skcall=1":o+="&skcall=1","http://m.yohobuy.com/signin.html?refer="+encodeURIComponent(o)),e},getUid:function(){return new u.default(function(r){if("h5"===c||"pc"===c)(0,t.default)("https://m.yohobuy.com/passport/login/user").then(function(e){var o=0;200===e.code&&(o=Number(e.data)),r(o)});else{var e=Number(s.default.cookie("app_uid"))||Number((0,i.getQueryObj)().uid)||0;r(e)}})}}},"./src/public/goto.js":
370 /*!****************************!*\ 370 /*!****************************!*\
371 !*** ./src/public/goto.js ***! 371 !*** ./src/public/goto.js ***!
372 \****************************/ 372 \****************************/
@@ -382,7 +382,7 @@ @@ -382,7 +382,7 @@
382 /*!*****************************!*\ 382 /*!*****************************!*\
383 !*** ./src/utils/common.js ***! 383 !*** ./src/utils/common.js ***!
384 \*****************************/ 384 \*****************************/
385 -/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.createLinkButton=o.linkToMiniApp=o.getQueryObj=o.invokeMethod=void 0;var u=n(r(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),l=n(r(/*! weixin-js-sdk */"./node_modules/weixin-js-sdk/index.js"));function n(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var o=decodeURIComponent(document.location.href);e&&(o=decodeURIComponent(e));var r="",n=[],t=[];0<o.indexOf("?")&&(r=o.split("?")[1]),0<r.length&&(n=r.split("#")[0].split("&"));for(var s=0;s<n.length;s++){var i={};i.name=n[s].split("=")[0],i.value=n[s].split("=")[1],t.push(i)}for(var u={},l=0;l<t.length;l++)u[t[l].name]=t[l].value;return u};o.invokeMethod=function(e){var o=window.yohoInterface;o?o.triggerEvent(e.success||function(){},e.fail||function(){},{method:e.method,arguments:e.args}):console.log("暂不支持,请在YOHO!BUY应用中打开")},o.getQueryObj=c,o.linkToMiniApp=function(e,o){var r=e||"";if(r&&r.indexOf("http")<0&&"other"===o&&(r=document.location.protocol+"//"+document.location.host+r),r){var n=void 0;if("product"===o||"brand"===o)n=r;else{var t=decodeURIComponent(r).split("?")[0],s=c(r),i="";(0,u.default)(s).forEach(function(e){i+=""===i?"?"+e+"="+s[e]:"&"+e+"="+s[e]}),n="/pages/webview/webview?url="+t+encodeURIComponent(i)}return l.default.miniProgram.navigateTo({url:n}),!1}return!0},o.createLinkButton=function(e,o){var r=document.createElement("a");return r.style.position="fixed",r.style.top=0,r.style.left=0,r.style.border="none",r.style.outline="none",r.style.resize="none",r.style.background="transparent",r.style.color="transparent",r.setAttribute("id",o),r.setAttribute("href",e),document.body.appendChild(r),r}},"./src/utils/cookie.js": 385 +/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.createLinkButton=o.linkToMiniApp=o.getQueryObj=o.invokeMethod=void 0;var u=n(r(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),l=n(r(/*! weixin-js-sdk */"./node_modules/weixin-js-sdk/index.js"));function n(e){return e&&e.__esModule?e:{default:e}}var c=function(e){var o=decodeURIComponent(document.location.href);e&&(o=decodeURIComponent(e));var r="",n=[],t=[];0<o.indexOf("?")&&(r=o.split("?")[1]),0<r.length&&(n=r.split("#")[0].split("&"));for(var s=0;s<n.length;s++){var i={};if(i.name=n[s].split("=")[0],i.value=n[s].split("=")[1],2<n[s].split("=").length)for(var u=2;u<n[s].split("=").length;u++)i.value+="="+n[s].split("=")[u];t.push(i)}for(var l={},c=0;c<t.length;c++)l[t[c].name]=t[c].value;return l};o.invokeMethod=function(e){var o=window.yohoInterface;o?o.triggerEvent(e.success||function(){},e.fail||function(){},{method:e.method,arguments:e.args}):console.log("暂不支持,请在YOHO!BUY应用中打开")},o.getQueryObj=c,o.linkToMiniApp=function(e,o){var r=e||"";if(r&&r.indexOf("http")<0&&"other"===o&&(r=document.location.protocol+"//"+document.location.host+r),r){var n=void 0;if("product"===o||"brand"===o)n=r;else{var t=decodeURIComponent(r).split("?")[0],s=c(r),i="";(0,u.default)(s).forEach(function(e){i+=""===i?"?"+e+"="+s[e]:"&"+e+"="+s[e]}),n="/pages/webview/webview?url="+t+encodeURIComponent(i)}return l.default.miniProgram.navigateTo({url:n}),!1}return!0},o.createLinkButton=function(e,o){var r=document.createElement("a");return r.style.position="fixed",r.style.top=0,r.style.left=0,r.style.border="none",r.style.outline="none",r.style.resize="none",r.style.background="transparent",r.style.color="transparent",r.setAttribute("id",o),r.setAttribute("href",e),document.body.appendChild(r),r}},"./src/utils/cookie.js":
386 /*!*****************************!*\ 386 /*!*****************************!*\
387 !*** ./src/utils/cookie.js ***! 387 !*** ./src/utils/cookie.js ***!
388 \*****************************/ 388 \*****************************/
1 { 1 {
2 "name": "yoho-activity-sdk", 2 "name": "yoho-activity-sdk",
3 - "version": "1.0.3", 3 + "version": "1.0.4",
4 "description": "YOHO!前端js的功能封装包,主要用于在活动页面中,对主要功能的封装。", 4 "description": "YOHO!前端js的功能封装包,主要用于在活动页面中,对主要功能的封装。",
5 "keywords": [ 5 "keywords": [
6 "YOHO!", 6 "YOHO!",
@@ -2,6 +2,7 @@ import base from './public/base' @@ -2,6 +2,7 @@ import base from './public/base'
2 import Login from './public/login' 2 import Login from './public/login'
3 import Goto from './public/goto' 3 import Goto from './public/goto'
4 import wxCtrl from './public/share' 4 import wxCtrl from './public/share'
  5 +import {getQueryObj,invokeMethod} from './utils/common'
5 6
6 const env = base.env(); 7 const env = base.env();
7 const loginUrl = base.loginUrl(); 8 const loginUrl = base.loginUrl();
@@ -17,5 +18,7 @@ export default { @@ -17,5 +18,7 @@ export default {
17 link: goto.link.bind(goto), 18 link: goto.link.bind(goto),
18 goBack: goto.goBack.bind(goto), 19 goBack: goto.goBack.bind(goto),
19 wxShare: wx.wxShare.bind(wx), 20 wxShare: wx.wxShare.bind(wx),
20 - wxSignature: wx.wxSignature 21 + wxSignature: wx.wxSignature,
  22 + getQueryObj,
  23 + invokeMethod
21 } 24 }
@@ -45,8 +45,8 @@ export default { @@ -45,8 +45,8 @@ export default {
45 //url 45 //url
46 loginUrl: function () { 46 loginUrl: function () {
47 let url, refer = location.href; 47 let url, refer = location.href;
48 - url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(refer);  
49 if (env === 'app') { 48 if (env === 'app') {
  49 + url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(refer);
50 refer = parseUrl(refer); 50 refer = parseUrl(refer);
51 if (/Android/i.test(navigator.userAgent || '')) { 51 if (/Android/i.test(navigator.userAgent || '')) {
52 if (url.indexOf('?') < 0) { 52 if (url.indexOf('?') < 0) {
@@ -77,6 +77,13 @@ export default { @@ -77,6 +77,13 @@ export default {
77 url = 'https://www.yoho/signin.html?refer=' + encodeURIComponent(location.href); 77 url = 'https://www.yoho/signin.html?refer=' + encodeURIComponent(location.href);
78 } else if (env === 'miniprogram') { 78 } else if (env === 'miniprogram') {
79 url = '/pages/userCenter/userCenter' 79 url = '/pages/userCenter/userCenter'
  80 + } else {
  81 + if(refer.indexOf('?')<0){
  82 + refer += "?skcall=1"
  83 + }else{
  84 + refer += "&skcall=1"
  85 + }
  86 + url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(refer);
80 } 87 }
81 return url; 88 return url;
82 }, 89 },
@@ -62,6 +62,11 @@ const getQueryObj = (link) => { @@ -62,6 +62,11 @@ const getQueryObj = (link) => {
62 62
63 obj.name = variableArr[i].split('=')[0]; 63 obj.name = variableArr[i].split('=')[0];
64 obj.value = variableArr[i].split('=')[1]; 64 obj.value = variableArr[i].split('=')[1];
  65 + if (variableArr[i].split('=').length > 2) {
  66 + for (let j = 2; j < variableArr[i].split('=').length; j++) {
  67 + obj.value += '=' + variableArr[i].split('=')[j];
  68 + }
  69 + }
65 finalArr.push(obj); 70 finalArr.push(obj);
66 } 71 }
67 72