cyywl_shop_app/dist/static/js/pages-goods_cashier-index.e...

1 line
21 KiB
JavaScript
Raw Normal View History

2023-06-21 12:00:02 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods_cashier-index"],{"0a0f":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return n}));var n={uModal:a("98f3").default},i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",[a("v-uni-button",{class:t.triggerName,staticStyle:{cursor:"pointer",display:"none"},attrs:{"data-clipboard-text":t.alipayLink}}),a("u-modal",{attrs:{show:t.show,title:"支付宝支付"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.handleConfirm.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"slot-content"},[t._v("链接已复制,请到外部浏览器完成支付")])],1)],1)},o=[]},"10ce":function(t,e,a){"use strict";a.r(e);var n=a("7873"),i=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=i.a},2580:function(t,e,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("d3b7"),a("acd8");var i=n(a("a4cd")),o=n(a("2cfd")),r=n(a("8007")),s=a("b68d"),c=n(a("f136")),u={components:{countDown:i.default,numberScroll:o.default,AlipayLinkCopy:r.default},data:function(){return{cancelPayModalShow:!1,backPayModalShow:!0,alipayShow:!1,alipayLink:"",checked:!1,isClickGiveUpBtn:!0,cartArr:[{name:"微信支付",icon:"icon-weixin2",value:"WXPAY",title:"使用微信快捷支付",payStatus:1},{name:"支付宝支付",icon:"icon-zhifubao",value:"ALIPAY",title:"使用支付宝支付",payStatus:1}],paytype:"WXPAY",orderId:0,active:0,payPrice:10,payPriceShow:10,invalidTime:1684836534,jumpData:{orderId:"",msg:""},formContent:""}},onLoad:function(t){t.order_id&&(this.orderId=t.order_id),this.getCashierOrder()},onShow:function(){wx.getEnterOptionsSync();window.history.pushState(null,null,document.url),window.addEventListener("popstate",this.backShowPayModal)},onHide:function(){window.removeEventListener("popstate",this.backShowPayModal)},onUnload:function(){window.removeEventListener("popstate",this.backShowPayModal)},methods:{backShowPayModal:function(){this.isClickGiveUpBtn=!1,this.cancelPayModalShow=this.backPayModalShow},onGiveUpPay:function(){this.isClickGiveUpBtn&&window.history.back(),this.cancelPayModalShow=!1,uni.navigateBack({delta:1})},getCashierOrder:function(){var t=this;uni.showLoading({title:"加载中"}),(0,s.getOrderDetail)(this.orderId).then((function(e){var a=e.data;t.invalidTime=new Date(e.data.endTime).getTime(),t.payPrice=parseFloat(a.proTotalPrice).toFixed(2),t.payPriceShow=parseFloat(a.proTotalPrice).toFixed(2)})).catch((function(e){return t.$util.Tips({title:e})})).finally(uni.hideLoading)},payType:function(t,e){this.active=e,this.paytype=t},onConfirm:function(){var t=this;uni.showModal({title:"提示",content:"您是否已支付?",cancelText:"未支付",confirmText:"已支付",success:function(e){e.confirm?(t.backPayModalShow=!1,window.history.back(),setTimeout((function(){uni.redirectTo({url:"/pages/users/order_list/index"})}),200)):e.cancel}})},goPay:function(){var t=this;if(!t.orderId)return t.$util.Tips({title:"请选择要支付的订单"});uni.showLoading({title:"支付中"}),(0,c.default)({payInfo:{orderNo:t.orderId},payType:t.paytype,createOrderFun:s.wechatOrderPay,payResultHandle:function(t){return{jsapiResult:t.jsapiConfig,body:t.body}},wxPaySuccess:function(){uni.redirectTo({url:"/pages/users/order_list/index"})},aliPaySuccess:function(e){t.alipayLink=e,setTimeout((function(){document.querySelector(".clipboard").click(),t.alipayShow=!0}),500)}})}}};e.default=u},"2a9f":function(t,e,a){var n=a("87ef");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("419a9ddd",n,!0,{sourceMap:!1,shadowMode:!1})},"2cfd":function(t,e,a){"use strict";a.r(e);var n=a("6530"),i=a("10ce");for(var o in i)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(o);a("f504");var r=a("f0c5"),s=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"e3248744",null,!1,n["a"],v