(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-login-login"],{"0871":function(n,e,t){"use strict";(function(n){t("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,t("99af"),t("a9e3"),t("4d63"),t("c607"),t("ac1f"),t("2c3e"),t("25f0"),t("466d"),t("841c"),t("c975"),t("d81d");var o=t("8391"),i={data:function(){return{}},onLoad:function(n){var e=this;uni.setStorageSync("scanInfo",{store_id:"",goods_id:""});var t=this.getUrlParam("code"),i=void 0==n.store_id||"undefined"==n.store_id?"":n.store_id,r=void 0==n.goods_id||"undefined"==n.goods_id?"":n.goods_id,a={store_id:i,goods_id:r};if(uni.setStorageSync("scanInfo",a),i||(a=this.getData(),uni.setStorageSync("scanInfo",a)),uni.getStorageSync("userToken")&&i)return uni.switchTab({url:"../index/index"}),!1;if(uni.getStorageSync("userToken")&&!i)return uni.switchTab({url:"../my-order/my-order"}),!1;if(!t){var c=encodeURIComponent("".concat(this.$config.redirect_uri,"/web/user#/pages/login/login?store_id=").concat(i,"&goods_id=").concat(r)),s="".concat(this.$config.wxURL,"?appid=").concat(this.$config.appid,"&redirect_uri=").concat(c,"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect");return window.location.href=s,!1}(0,o.wxLogin)({wxcode:t,store_id:a.store_id}).then((function(n){if(450016==Number(n.code))return uni.showModal({content:n.msg,showCancel:!1,success:function(n){n.confirm&&e.closePage()}}),!1;if(200==n.code){uni.setStorageSync("userToken",n.data.token);var t=uni.getStorageSync("scanInfo");t.store_id?uni.switchTab({url:"../index/index"}):uni.switchTab({url:"../my-order/my-order"})}else uni.showToast({title:n.msg||"登录失败",icon:"none"})}))},methods:{closePage:function(){setTimeout((function(){document.addEventListener("WeixinJSBridgeReady",(function(){WeixinJSBridge.call("closeWindow")}),!1),WeixinJSBridge.call("closeWindow")}),100)},getUrlParam:function(e){n("log",window.location,"location"," at pages/login/login.vue:112"),n("log",window.location.href,"href"," at pages/login/login.vue:113");var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),o=window.location.search.substr(1).match(t);return null!=o?decodeURIComponent(o[2]):""},getData:function(){n("log",window.location.hash,"hash"," at pages/login/login.vue:122");var e=window.location.hash;if(-1!=e.indexOf("?")){var t=e.split("?")[1].split("&"),o={};return t.map((function(n){return o[n.split("=")[0]]=n.split("=")[1]})),o}return""}}};e.default=i}).call(this,t("0de9")["log"])},2814:function(n,e,t){"use strict";t.r(e);var o=t("0871"),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(r);e["default"]=i.a},"505a":function(n,e,t){var o=t("24fb");e=o(!1),e.push([n.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场（https://ext.dcloud.net.cn）上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者，建议你使用scss预处理，并在插件代码中直接使用这些变量（无需 import 这个文件），方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者（插件使用者），你可以通过修改这些变量来定制自己的插件主题，实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理，你也可以直接在你的 scss 代码中使用如下变量，同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */\r\n/*主题色及按钮渐变背景*/\r\n/*字体大小*/.loginBtn[data-v-6da081b2]{width:%?530?%;height:%?88?%;line-height:%?88?%;text-align:center;margin:0 auto;background:linear-gradient(93deg,#ff232c,#ff571b);opacity:1;border-radius:%?44?%;font-size:%?30?%;color:#fff;position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}',""]),n.exports=e},"565f":function(n,e,t){"use strict";t.d(e,"b",(function(){return o})),t.d(e,"c",(function(){return i})),t.d(e,"a",(function(){}));var o=function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("v-uni-view",[t("v-uni-view",{staticClass:"loginBtn",on:{click:function(e){arguments[0]=e=n.$handleEvent(e),n.login.apply(void 0,arguments)}}},[n._v("登录")])],1)},i=[]},8412:function(n,e,t){"use strict";t.r(e);var o=t("565f"),i=t("2814");for(var r in i)["default"].indexOf(r)<0&&function(n){t.d(e,n,(function(){return i[n]}))}(r);t("be76");var a=t("f0c5"),c=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,"6da081b2",null,!1,o["a"],void 0);e["default"]=c.exports},b75d:function(n,e,t){var o=t("505a");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[n.i,o,""]]),o.locals&&(n.exports=o.locals);var i=t("4f06").default;i("004b4e14",o,!0,{sourceMap:!1,shadowMode:!1})},be76:function(n,e,t){"use strict";var o=t("b75d"),i=t.n(o);i.a}}]);