Authored by huangyi

更新getUid 改为getUser

@@ -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()),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": 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"),k=r(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),x=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){x(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),k[o]=j,k[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],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": 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"),k="Promise",x=l.TypeError,S=l.process,T=S&&S.versions,I=T&&T.v8||"",M=l[k],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(x("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 x("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,k,"_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,k),r(/*! ./_set-species */"./node_modules/core-js/library/modules/_set-species.js")(k),i=r(/*! ./_core */"./node_modules/core-js/library/modules/_core.js")[k],d(d.S+d.F*!A,k,{reject:function(e){var o=C(this);return(0,o.reject)(e),o.promise}}),d(d.S+d.F*(u||!A),k,{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)})),k,{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,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": 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]:"",k={initStartTime:a(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},x={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(){k.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){k.preVerifyEndTime=a(),I.state=1,I.data=e},T.success=function(e){x.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"||x.systemType<0)){var r=new Image;x.appId=S.appId,x.initTime=k.initEndTime-k.initStartTime,x.preVerifyTime=k.preVerifyEndTime-k.preVerifyStartTime,P.getNetworkType({isInnerInvoke:!0,success:function(e){x.networkType=e.networkType;var o="https://open.weixin.qq.com/sdk/report?v="+x.version+"&o="+x.isPreVerifyOk+"&s="+x.systemType+"&c="+x.clientVersion+"&a="+x.appId+"&n="+x.networkType+"&i="+x.initTime+"&p="+x.preVerifyTime+"&u="+x.url;r.src=o}})}}()}),T.complete=function(e){for(var o=0,r=n.length;o<r;++o)n[o]();T._completes=[]},T}()),k.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=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": 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),getUser:n.default.getUser,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"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)("//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)?"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},getUser:function(){return new u.default(function(o){var r={sessionType:s.default.cookie("app_client_type")||"",appVersion:s.default.cookie("app_version")||""};if("h5"===c||"pc"===c)(0,t.default)("//m.yohobuy.com/passport/login/user").then(function(e){r.uid=0,200===e.code&&(r.uid=Number(e.data)),r.sessionKey=s.default.cookie("app_session_key")||(0,i.getQueryObj)().session_key||"",o(r)});else{if("app"===c)return u.default.all([new u.default(function(o){(0,i.invokeMethod)({method:"get.uid",arguments:{},success:function(e){o(parseInt(e))},fail:function(){var e=Number(s.default.cookie("app_uid"))||Number((0,i.getQueryObj)().uid)||0;o(e)}})}),new u.default(function(o){(0,i.invokeMethod)({method:"get.sessionId",arguments:{},success:function(e){o(e)},fail:function(){var e=s.default.cookie("app_session_key")||(0,i.getQueryObj)().session_key||"";o(e)}})})]).then(function(e){r.uid=e[0],r.sessionKey=e[1],o(r)});r.uid=Number(s.default.cookie("app_uid"))||Number((0,i.getQueryObj)().uid)||0,r.sessionKey=s.default.cookie("app_session_key")||(0,i.getQueryObj)().session_key||"",o(r)}})}}},"./src/public/goto.js":
370 /*!****************************!*\ 370 /*!****************************!*\
371 !*** ./src/public/goto.js ***! 371 !*** ./src/public/goto.js ***!
372 \****************************/ 372 \****************************/
@@ -374,7 +374,7 @@ @@ -374,7 +374,7 @@
374 /*!*****************************!*\ 374 /*!*****************************!*\
375 !*** ./src/public/login.js ***! 375 !*** ./src/public/login.js ***!
376 \*****************************/ 376 \*****************************/
377 -/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=l(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),t=l(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=l(r(/*! weixin-js-sdk */"./node_modules/weixin-js-sdk/index.js")),i=r(/*! ../utils/common */"./src/utils/common.js"),u=l(r(/*! ./base */"./src/public/base.js"));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function o(e){(0,n.default)(this,o),this.env=e.env,this.url=e.loginUrl}return(0,t.default)(o,[{key:"auth",value:function(){var r=this;u.default.getUid().then(function(e){if(!e){var o=document.querySelectorAll(".auth");if(o.length)return o.forEach(function(e){e.onclick=function(e){e.preventDefault(),r.goLogin()}}),!0}})}},{key:"goLogin",value:function(){if("miniprogram"===this.env)s.default.miniProgram.switchTab({url:this.url});else if("app"===this.env){var e=document.getElementById("yosdk-login");e||(e=(0,i.createLinkButton)(this.url,"yosdk-login")),e.click()}else window.location.href=this.url;return!1}}]),o}();o.default=c},"./src/public/share.js": 377 +/*! no static exports found */function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=l(r(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),t=l(r(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=l(r(/*! weixin-js-sdk */"./node_modules/weixin-js-sdk/index.js")),i=r(/*! ../utils/common */"./src/utils/common.js"),u=l(r(/*! ./base */"./src/public/base.js"));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(){function o(e){(0,n.default)(this,o),this.env=e.env,this.url=e.loginUrl}return(0,t.default)(o,[{key:"auth",value:function(){var r=this;u.default.getUser().then(function(e){if(!e.uid){var o=document.querySelectorAll(".auth");if(o.length)return o.forEach(function(e){e.onclick=function(e){e.preventDefault(),r.goLogin()}}),!0}})}},{key:"goLogin",value:function(){if("miniprogram"===this.env)s.default.miniProgram.switchTab({url:this.url});else if("app"===this.env){var e=document.getElementById("yosdk-login");e||(e=(0,i.createLinkButton)(this.url,"yosdk-login")),e.click()}else window.location.href=this.url;return!1}}]),o}();o.default=c},"./src/public/share.js":
378 /*!*****************************!*\ 378 /*!*****************************!*\
379 !*** ./src/public/share.js ***! 379 !*** ./src/public/share.js ***!
380 \*****************************/ 380 \*****************************/
@@ -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={};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": 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){window.yohoInterface?window.yohoInterface.triggerEvent(e.success||function(){},e.fail||function(){},{method:e.method,arguments:e.args}):e.fail&&e.fail()},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 \*****************************/
@@ -13,7 +13,7 @@ const wx = new wxCtrl(); @@ -13,7 +13,7 @@ const wx = new wxCtrl();
13 export default { 13 export default {
14 auth:login.auth.bind(login), 14 auth:login.auth.bind(login),
15 goLogin: login.goLogin.bind(login), 15 goLogin: login.goLogin.bind(login),
16 - getUid:base.getUid, 16 + getUser:base.getUser,
17 env: env, 17 env: env,
18 link: goto.link.bind(goto), 18 link: goto.link.bind(goto),
19 goBack: goto.goBack.bind(goto), 19 goBack: goto.goBack.bind(goto),
@@ -2,6 +2,7 @@ import jsonp from "../utils/jsonp"; @@ -2,6 +2,7 @@ import jsonp from "../utils/jsonp";
2 import cookies from '../utils/cookie'; 2 import cookies from '../utils/cookie';
3 import {getQueryObj} from '../utils/common' 3 import {getQueryObj} from '../utils/common'
4 import Promise from 'promise-polyfill' 4 import Promise from 'promise-polyfill'
  5 +import {invokeMethod} from '../utils/common'
5 6
6 const parseUrl = (url) => { 7 const parseUrl = (url) => {
7 let query = {}, 8 let query = {},
@@ -25,14 +26,45 @@ const parseUrl = (url) => { @@ -25,14 +26,45 @@ const parseUrl = (url) => {
25 } 26 }
26 }; 27 };
27 let env = ''; 28 let env = '';
  29 +
  30 +const _appGetUid = function () {
  31 + return new Promise(function (resolve) {
  32 + invokeMethod({
  33 + method: 'get.uid',
  34 + arguments: {},
  35 + success: function (uid) {
  36 + resolve(parseInt(uid));
  37 + },
  38 + fail: function () {
  39 + let uid = Number(cookies.cookie('app_uid')) || Number(getQueryObj().uid) || 0;
  40 + resolve(uid);
  41 + }
  42 + });
  43 + })
  44 +}
  45 +const _appGetSessionKey = function () {
  46 + return new Promise(function (resolve) {
  47 + invokeMethod({
  48 + method: 'get.sessionId',
  49 + arguments: {},
  50 + success: function (sessionKey) {
  51 + resolve(sessionKey);
  52 + },
  53 + fail: function () {
  54 + let sessionKey = cookies.cookie('app_session_key') || getQueryObj().session_key || '';
  55 + resolve(sessionKey);
  56 + }
  57 + });
  58 + })
  59 +}
28 export default { 60 export default {
29 //evn 61 //evn
30 env: function () { 62 env: function () {
31 let envFlag = window.__wxjs_environment; 63 let envFlag = window.__wxjs_environment;
32 if (!envFlag && navigator.userAgent.match(/yohobuy/i)) { 64 if (!envFlag && navigator.userAgent.match(/yohobuy/i)) {
  65 + env = 'app';
33 document.addEventListener('deviceready', function () { 66 document.addEventListener('deviceready', function () {
34 }); 67 });
35 - env = 'app';  
36 } else if ((!envFlag && navigator.userAgent.match(/miniProgram/i)) || (envFlag === 'miniprogram')) { 68 } else if ((!envFlag && navigator.userAgent.match(/miniProgram/i)) || (envFlag === 'miniprogram')) {
37 env = 'miniprogram'; 69 env = 'miniprogram';
38 } else if (location.origin === 'https://www.yohobuy.com') { 70 } else if (location.origin === 'https://www.yohobuy.com') {
@@ -78,9 +110,9 @@ export default { @@ -78,9 +110,9 @@ export default {
78 } else if (env === 'miniprogram') { 110 } else if (env === 'miniprogram') {
79 url = '/pages/userCenter/userCenter' 111 url = '/pages/userCenter/userCenter'
80 } else { 112 } else {
81 - if(refer.indexOf('?')<0){ 113 + if (refer.indexOf('?') < 0) {
82 refer += "?skcall=1" 114 refer += "?skcall=1"
83 - }else{ 115 + } else {
84 refer += "&skcall=1" 116 refer += "&skcall=1"
85 } 117 }
86 url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(refer); 118 url = 'http://m.yohobuy.com/signin.html?refer=' + encodeURIComponent(refer);
@@ -88,19 +120,31 @@ export default { @@ -88,19 +120,31 @@ export default {
88 return url; 120 return url;
89 }, 121 },
90 //uid 122 //uid
91 - getUid: function () { 123 + getUser: function () {
92 return new Promise(function (resolve) { 124 return new Promise(function (resolve) {
  125 + let obj = {
  126 + sessionType: cookies.cookie('app_client_type') || '',
  127 + appVersion: cookies.cookie('app_version') || ''
  128 + }
93 if (env === 'h5' || env === 'pc') { 129 if (env === 'h5' || env === 'pc') {
94 jsonp('//m.yohobuy.com/passport/login/user').then(r => { 130 jsonp('//m.yohobuy.com/passport/login/user').then(r => {
95 - let uid = 0; 131 + obj.uid = 0;
96 if (r.code === 200) { 132 if (r.code === 200) {
97 - uid = Number(r.data) 133 + obj.uid = Number(r.data)
98 } 134 }
99 - resolve(uid); 135 + obj.sessionKey = cookies.cookie('app_session_key') || getQueryObj().session_key || '';
  136 + resolve(obj);
100 }); 137 });
  138 + } else if (env === 'app') {
  139 + return Promise.all([_appGetUid(), _appGetSessionKey()]).then(function (r) {
  140 + obj.uid = r[0]
  141 + obj.sessionKey = r[1]
  142 + resolve(obj);
  143 + })
101 } else { 144 } else {
102 - let uid = Number(cookies.cookie('app_uid')) || Number(getQueryObj().uid) || 0;  
103 - resolve(uid); 145 + obj.uid = Number(cookies.cookie('app_uid')) || Number(getQueryObj().uid) || 0;
  146 + obj.sessionKey = cookies.cookie('app_session_key') || getQueryObj().session_key || '';
  147 + resolve(obj);
104 } 148 }
105 }) 149 })
106 } 150 }
@@ -9,7 +9,7 @@ export default class { @@ -9,7 +9,7 @@ export default class {
9 } 9 }
10 10
11 auth() { 11 auth() {
12 - base.getUid().then((uid) => { 12 + base.getUser().then(({uid}) => {
13 if (!uid) { 13 if (!uid) {
14 let list = document.querySelectorAll('.auth'); 14 let list = document.querySelectorAll('.auth');
15 if (list.length) { 15 if (list.length) {
1 import wx from "weixin-js-sdk"; 1 import wx from "weixin-js-sdk";
2 2
3 const invokeMethod = (obj) => { 3 const invokeMethod = (obj) => {
4 - let appInterface = window.yohoInterface;  
5 - if (appInterface) {  
6 - appInterface.triggerEvent(obj.success || function () { 4 + if (window.yohoInterface) {
  5 + window.yohoInterface.triggerEvent(obj.success || function () {
7 }, obj.fail || function () { 6 }, obj.fail || function () {
8 }, { 7 }, {
9 method: obj.method, 8 method: obj.method,
10 arguments: obj.args 9 arguments: obj.args
11 }); 10 });
12 } else { 11 } else {
13 - console.log('暂不支持,请在YOHO!BUY应用中打开'); 12 + obj.fail && obj.fail();
14 } 13 }
15 } 14 }
16 15