| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/pay/index"],{"0244":function(t,e,n){"use strict";(function(t){n("6cdc"),n("921b");o(n("66fd"));var e=o(n("15fc"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},"15fc":function(t,e,n){"use strict";n.r(e);var o=n("40ca"),a=n("bae4");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("9cf4");var r,s=n("f0c5"),c=Object(s["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],r);e["default"]=c.exports},"2b62":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("2f62"),a=f(n("3bff")),i=n("ca00"),r=n("cf45"),s=n("1b62"),c=n("0377"),u=n("5315"),p=n("5f87"),l=n("01ea");function f(t){return t&&t.__esModule?t:{default:t}}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var m=function(){return n.e("components/plugin/tabs").then(n.bind(null,"f58d"))},b=function(){return n.e("pages/pay/components/pay-input").then(n.bind(null,"2c53"))},g=function(){return n.e("components/app-delivery").then(n.bind(null,"c7ce"))},v=function(){return n.e("components/plugin/modal").then(n.bind(null,"3a8f"))},O=function(){return Promise.all([n.e("common/vendor"),n.e("components/app-coupon-sel")]).then(n.bind(null,"3c3e"))},P={name:"pay",components:{AppTabs:m,PayInputModule:b,AppDeliveryModule:g,ModalModule:v,AppCouponSel:O},mixins:[s.share],data:function(){return{constant:this.$constant,inpFocus:!1,tabIndex:0,tabs:[{name:"直接付款"},{name:"我要配送"}],amount:"",form:{payWay:0},aliPayHtml:"",passwordModal:!1,modalForm:{payPassword:""},appendFrm:{sendDistance:"",receiveLat:"",receiveLong:""},payCallData:null,discountArr:!1}},computed:h({},(0,o.mapGetters)({orderShop:"getOrderShop"}),{},(0,o.mapGetters)({shopUser:"getShopUser"})),onLoad:function(t){this.specialInit()},mounted:function(){},methods:{isWxBrowser:r.isWxBrowser,specialInit:function(){var e=this;this.option.pageType&&(this.tabIndex=parseInt(this.option.pageType)),(0,l.getOrderShop)().then((function(n){e.inpFocus=!0,console.log(n),t.setNavigationBarTitle({title:"您正在向【".concat(n.shop.merchantName,"】付款")}),e.$refs.couponSel._getUserDiscount().then((function(t){e.discountArr=t}))})),(0,i.isLogin)()&&(0,p.getShopUser)().then((function(t){console.log("shopUser",t);var n={title:"点我付款",desc:"享随机优惠,最高20元",imgUrl:"".concat(e.$constant.imgUrl,"/retail/pay.jpg"),pagePath:"/pages/pay/index?account=".concat(t.merchantId,"&store=1")};e.jweixinFn(n)}))},_pay:function(){var t=this;if(!this.amount)return this.$msg("请先输入金额!"),!1;var e={},n=null;if("recharge"==this.option.pageStatus)e={amount:this.amount},n=u.recharge;else{if(e={needSend:0==this.tabIndex?"0":"1",prePrice:this.amount,payWay:this.form.payWay},1==this.tabIndex){var o=this.$refs.appDelivery.form?this.$refs.appDelivery.form:{},i=this.$refs.appDelivery.region?this.$refs.appDelivery.region:{};e=h({},e,{},o,{},i)}this.option.store&&(e.store=this.option.store),this.$util.isEmpty(this.discountArr)||(e.couponId=this.$refs.couponSel.couponId),n=c.fastPay}n(e).then((function(e){t.payCallData=e.data,0==t.form.payWay?(0,a.default)(e.data,t.paySuccess,t.payFail):1==t.form.payWay&&(t.aliPayHtml=e,t.$nextTick((function(){t.$refs.alipayWap.children[0].submit()})))}))},tabChange:function(t){this.tabIndex=t.index,this.inpFocus=!0},focusFn:function(){this.inpFocus=!0},blurFn:function(){this.inpFocus=!1},clickKeyFn:function(t){this.amount=t},aliPayFn:function(){this.form.payWay=1,this._pay()},wexinPayFn:function(){this.form.payWay=0,this._pay()},balancePayFn:function(){this.form.payWay=2,this.passwordModal=!0},passwordModalClick:function(t){0===t.index?this.modalCancel():this._pay()},modalCancel:function(){this.passwordModal=!1,this.modalForm.payPassword=""},paySuccess:function(){this.$util.pageTo({url:"/pages/callback/index",type:2,query:h({pagestatus:3,id:this.payCallData.orderId},this.params)})},payFail:function(){alert("支付失败!")}}};e.default=P}).call(this,n("543d")["default"])},"40ca":function(t,e,n){"use strict";var o,a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.$util.isEmpty(t.orderShop)),o=t.$util.isEmpty(t.orderShop),a=t._f("default_img")(t.orderShop.merchant.smallLogoUrl),i=t.$util.isEmpty(t.shopUser),r=t.$util.isEmpty(t.discountArr),s=t.$util.isEmpty(t.shopUser),c=t.isWxBrowser();t._isMounted||(t.e0=function(e){t.tabIndex=0==t.tabIndex?1:0}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:o,f0:a,g2:i,g3:r,g4:s,m0:c}})},i=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}))},"9cf4":function(t,e,n){"use strict";var o=n("f8e9"),a=n.n(o);a.a},bae4:function(t,e,n){"use strict";n.r(e);var o=n("2b62"),a=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a},f8e9:function(t,e,n){}},[["0244","common/runtime","common/vendor"]]]);
|