meituan-beibuwan-h5/unpackage/dist/build/web/static/js/pages-mt-index.e432dfa4.js

1 line
7.6 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-mt-index"],{"09db":function(t,e,n){var i=n("24fb"),o=n("1de5"),a=n("595b"),u=n("79d5"),s=n("a664"),r=n("280a");e=i(!1);var c=o(a),d=o(u),l=o(s),f=o(r);e.push([t.i,".content[data-v-dc427744]{display:flex;flex-direction:column;align-items:center;justify-content:start;\n\t/* height: calc(100vh - 240rpx); */background-image:url("+c+");background-repeat:no-repeat;background-size:100% auto;height:100%}.header[data-v-dc427744]{width:100%}.banklogo[data-v-dc427744]{background-image:url("+d+");background-repeat:no-repeat;background-size:100% auto;width:%?400?%;height:%?54?%;margin-top:%?46?%;margin-left:%?58?%}.logo[data-v-dc427744]{height:%?633?%;width:%?672?%;\n\t/* margin-top: 22rpx; */background-image:url("+l+");background-repeat:no-repeat;background-size:contain;background-position:50%;margin-right:%?50?%}.title[data-v-dc427744]{font-size:%?176?%;font-weight:700;color:#333;margin-top:%?128?%}.second-title[data-v-dc427744]{font-weight:400;font-size:%?36?%;color:#4d4d4d;line-height:%?64?%;text-align:center;font-style:normal;text-transform:none}.bottom-text[data-v-dc427744]{font-weight:400;font-size:%?24?%;color:#4d4d4d;line-height:%?36?%;text-align:center;font-style:normal;text-transform:none;margin-top:%?76?%}.buttons[data-v-dc427744]{margin-top:%?-54?%;display:flex;flex-direction:column;gap:%?40?%}.button[data-v-dc427744]{width:%?488?%;height:%?146?%;background-image:url("+f+");background-repeat:no-repeat;background-size:100% auto;font-weight:400;font-size:%?36?%;color:#ff8300;line-height:%?64?%;text-align:center;font-style:normal;text-transform:none;display:flex;justify-content:center;align-items:center}",""]),t.exports=e},"1de5":function(t,e,n){"use strict";t.exports=function(t,e){return e||(e={}),t=t&&t.__esModule?t.default:t,"string"!==typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},"280a":function(t,e,n){t.exports=n.p+"static/images/button.png"},"2e90":function(t,e,n){"use strict";n.r(e);var i=n("6912"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"33bb":function(t,e,n){"use strict";var i=n("7930"),o=n.n(i);o.a},"595b":function(t,e,n){t.exports=n.p+"static/images/background.png"},6912:function(t,e,n){"use strict";n("7a82");var i=n("ee27").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("bbc8")),a=n("d29d"),u=n("fa89"),s={data:function(){return{title:"Hello",token:"",userinfo:{}}},onLoad:function(){this.token=this.$route.query.token,this.token&&this.beibuwanLogin(this.$route.query.token)},onShow:function(){u.payState.setIsPay(!1)},methods:{beibuwanLogin:function(t){var e=this;o.default.beibuwanLogin({token:t}).then((function(t){if(200==t.data.code){var n=t.data.data;e.userinfo=n,a.authState.login({phone:n.phone,token:n.token})}else uni.showToast({title:t.data.message,icon:"none"})}))},meituanLogin:function(t){o.default.meituanLogin({phone:this.userinfo.phone,type:t}).then((function(t){if(200==t.data.code){var e=t.data;window.location.href=e.url}else uni.showToast({title:t.data.message,icon:"none"})}))}}};e.default=s},"6c74":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"header"},[n("v-uni-view",{staticClass:"banklogo"})],1),n("v-uni-text",{staticClass:"title"},[t._v("美团")]),n("v-uni-text",{staticClass:"second-title"},[t._v("美食一键送达 让生活更有滋味")]),n("v-uni-view",{staticClass:"logo"}),n("v-uni-view",{staticClass:"buttons"},[n("v-uni-view",{staticClass:"button",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),function(){t.meituanLogin(1)}.apply(void 0,arguments)}}},[t._v("我要点外卖")]),n("v-uni-view",{staticClass:"button",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),function(){t.meituanLogin(2)}.apply(void 0,arguments)}}},[t._v("我要到店吃")])],1),n("v-uni-text",{staticClass:"bottom-text"},[t._v("本页面内的服务由成都蓝色兄弟网络科技有限公司提供")])],1)},o=[]},7930:function(t,e,n){var i=n("09db");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("cd0f8fb8",i,!0,{sourceMap:!1,shadowMode:!1})},"79d5":function(t,e,n){t.exports=n.p+"static/images/banklogo.png"},"9e4e":function(t,e,n){"use strict";n.r(e);var i=n("6c74"),o=n("2e90");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("33bb");var u=n("f0c5"),s=Object(u["a"])(o["default"],i["b"],i["c"],!1,null,"dc427744",null,!1,i["a"],void 0);e["default"]=s.exports},a226:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("d3b7");var i=n("d29d"),o={request:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return new Promise((function(a,u){var s="",r="/api"+t;i.authState.isLogin()&&(s=i.authState.state.token),o&&uni.showLoading({title:""}),uni.request({url:r,data:n,method:e,header:{"content-type":"application/json",token:s},success:function(t){401==t.data.code?(i.authState.logout(),uni.reLaunch({url:i.loginPage})):a(t)},fail:function(t){u(t)},complete:function(){uni.hideLoading()}})}))}};e.default=o},a664:function(t,e,n){t.exports=n.p+"static/images/meituan-ip.png"},bbc8:function(t,e,n){"use strict";n("7a82");var i=n("ee27").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("a226")),a=o.default,u={imgUrl:"http://47.109.21.59/",beibuwanLogin:function(t){return a.request("/api/login/gulf","POST",t)},meituanLogin:function(t){return a.request("/api/login","GET",t)},payInfo:function(t){return a.request("/api/order/payInfo","GET",t)},payQuery:function(t){return a.request("/api/pay/gulf/query","GET",t)},pays:function(t){return a.request("/api/pay/pays","POST",t)}};e.default=u},d29d:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.authState=void 0,e.checkPage=u,e.initAuth=function(){["navigateTo","redirectTo","reLaunch","switchTab"].forEach((function(t){uni.addInterceptor(t,{invoke:function(t){return u(t.url)},success:function(t){},fail:function(t){},complete:function(t){}})}))},e.whitelist=e.loginPage=void 0,n("e9c4"),n("c740"),n("d3b7");var i={state:{phone:void 0,token:void 0},login:function(t){this.state.phone=t.phone,this.state.token=t.token,localStorage.setItem("auth",JSON.stringify({phone:this.state.phone,token:this.state.token}))},logout:function(){this.state.phone=void 0,this.state.token=void 0,localStorage.removeItem("auth")},isLogin:function(){if(void 0==this.state.phone){var t=localStorage.getItem("auth");return!!t&&(this.login(JSON.parse(t)),!0)}return!0}};e.authState=i;var o="/pages/coupons/index/index";e.loginPage=o;var a=["pages/coupons/coupon/index","/pages/coupons/coupon/index","pages/coupons/finish/index","/pages/coupons/finish/index"];function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(void 0==t){var e=getCurrentPages(),n=e[e.length-1];t=n.route}return!(t!=o&&-1==a.findIndex((function(e){return t==e}))&&!i.isLogin())||(uni.redirectTo({url:o}),uni.showToast({title:"请登录",icon:"none"}),!1)}e.whitelist=a},fa89:function(t,e,n){"use strict";n("7a82"),Object.defineProperty(e,"__esModule",{value:!0}),e.payState=void 0;e.payState={state:{ispay:!1},setIsPay:function(t){this.state.ispay=t},getIsPay:function(){return 1==this.state.ispay}}}}]);