1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-goods_cashier-index"],{"10ce":function(t,e,a){"use strict";a.r(e);var i=a("7873"),n=a.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},2580:function(t,e,a){"use strict";(function(t){a("7a82");var i=a("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("d3b7"),a("159b"),a("14d9"),a("99af");var n=i(a("a4cd")),o=i(a("2cfd")),r=a("b68d"),s={components:{countDown:n.default,numberScroll:o.default},data:function(){return{cancelPayModalShow:!1,checked:!1,cartArr:[{name:"微信支付",icon:"icon-weixin2",value:"weixin",title:"使用微信快捷支付",payStatus:1},{name:"支付宝支付",icon:"icon-zhifubao",value:"alipay",title:"使用支付宝支付",payStatus:1}],orderId:0,fromType:"",active:0,payPrice:10,payPriceShow:10,payPostage:0,offlinePostage:!1,invalidTime:1684836534,initIn:!1,jumpData:{orderId:"",msg:""},formContent:""}},watch:{cartArr:{handler:function(t,e){var a=[];t.forEach((function(t,e){t.payStatus&&(t.index=e,a.push(t))})),this.active=a[0].index,this.paytype=a[0].value,this.number=a[0].number||0},immediate:!0,deep:!0}},onLoad:function(t){t.order_id&&(this.orderId=t.order_id),t.from_type&&(this.fromType=t.from_type)},onShow:function(){var e=wx.getEnterOptionsSync();if(t("log",e," at pages/goods_cashier/index.vue:132"),"1038"==e.scene&&"wxef277996acc166c3"==e.referrerInfo.appId&&this.initIn){var a=e.referrerInfo.extraData;this.initIn=!1,a?"success"==a.code?this.$util.Tips({title:"支付成功",icon:"success"},{tab:5,url:"/pages/goods/order_pay_status/index?order_id=".concat(this.orderId,"&msg=").concat(this.jumpData.msg,"&type=3&totalPrice=").concat(this.payPriceShow)}):"cancel"==a.code?this.$util.Tips({title:"取消支付"},{tab:5,url:"/pages/goods/order_pay_status/index?order_id=".concat(this.orderId,"&msg=取消支付&type=3&totalPrice=").concat(this.payPriceShow,"&status=2")}):uni.reLaunch({url:"/pages/goods/order_pay_status/index?order_id=".concat(this.orderId,"&msg=支付失败&totalPrice=").concat(this.payPriceShow)}):this.$util.Tips({title:"取消支付"},{tab:5,url:"/pages/goods/order_pay_status/index?order_id=".concat(this.orderId,"&msg=取消支付&type=3&totalPrice=").concat(this.payPriceShow,"&status=2")})}},methods:{onGiveUpPay:function(){this.cancelPayModalShow=!1},getCashierOrder:function(){var e=this;uni.showLoading({title:"创建订单中"}),(0,r.getCashierOrder)(this.orderId,this.fromType).then((function(a){t("log",a," at pages/goods_cashier/index.vue:181"),e.payPrice=e.payPriceShow=a.data.pay_price,e.payPostage=a.data.pay_postage,e.offlinePostage=a.data.offline_postage,e.invalidTime=a.data.invalid_time,e.cartArr[0].payStatus=a.data.wechat_pay_status||0,e.cartArr[1].payStatus=a.data.ali_pay_status||0,e.cartArr[2].number=a.data.now_money,e.cartArr[2].payStatus=a.data.yue_pay_status,a.data.offline_pay_status?e.cartArr[3].payStatus=1:e.cartArr[3].payStatus=0,e.cartArr[4].payStatus=a.data.friend_pay_status||0,uni.hideLoading()})).catch((function(t){return uni.hideLoading(),e.$util.Tips({title:t})}))},payType:function(t,e,a){this.active=a,this.paytype=e,this.number=t,this.offlinePostage&&(this.payPriceShow="offline"==e?this.$util.$h.Sub(this.payPrice,this.payPostage):this.payPrice)},formpost:function(t,e){var a=document.createElement("form");for(var i in a.action=t,a.method="post",a.target="_self",a.style.display="none",e){var n=document.createElement("input");n.name=i,n.value=e[i],a.appendChild(n)}document.body.appendChild(a),this.$nextTick((function(t){a.submit()}))},waitPay:function(){this.cancelPayModalShow=!0},goPay:function(t,e){var a=this,i=this;if(!i.orderId)return i.$util.Tips({title:"请选择要支付的订单"});uni.showLoading({title:"支付中"}),(0,r.orderPay)({uni:i.orderId,paytype:e,type:i.friendPay?1:0,quitUrl:location.port?location.protocol+"//"+location.hostname+":"+location.port+"/pages/goods/order_details/index?order_id="+this.orderId:location.protocol+"//"+location.hostname+"/pages/goods/order_details/index?order_id=
|