(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/shopping/paymentOrder"],{319:function(e,n,r){"use strict";(function(e,n){var t=r(4);r(26);t(r(25));var o=t(r(320));e.__webpack_require_UNI_MP_PLUGIN__=r,n(o.default)}).call(this,r(1)["default"],r(2)["createPage"])},320:function(e,n,r){"use strict";r.r(n);var t=r(321),o=r(323);for(var i in o)["default"].indexOf(i)<0&&function(e){r.d(n,e,(function(){return o[e]}))}(i);r(325);var a,d=r(34),s=Object(d["default"])(o["default"],t["render"],t["staticRenderFns"],!1,null,null,null,!1,t["components"],a);s.options.__file="pages/shopping/paymentOrder.vue",n["default"]=s.exports},321:function(e,n,r){"use strict";r.r(n);var t=r(322);r.d(n,"render",(function(){return t["render"]})),r.d(n,"staticRenderFns",(function(){return t["staticRenderFns"]})),r.d(n,"recyclableRender",(function(){return t["recyclableRender"]})),r.d(n,"components",(function(){return t["components"]}))},322:function(e,n,r){"use strict";var t;r.r(n),r.d(n,"render",(function(){return o})),r.d(n,"staticRenderFns",(function(){return a})),r.d(n,"recyclableRender",(function(){return i})),r.d(n,"components",(function(){return t}));var o=function(){var e=this,n=e.$createElement,r=(e._self._c,e.payMoney.toFixed(2)),t=2==e.payType?e.payDelivery.toFixed(2):null,o=3==e.payType?e.payDelivery.toFixed(2):null,i=null!=e.order?e.order.payPrice.toFixed(2):null;e.$mp.data=Object.assign({},{$root:{g0:r,g1:t,g2:o,g3:i}})},i=!1,a=[];o._withStripped=!0},323:function(e,n,r){"use strict";r.r(n);var t=r(324),o=r.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){r.d(n,e,(function(){return t[e]}))}(i);n["default"]=o.a},324:function(e,n,r){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=r(163),o=r(197),i=r(273),a={data:function(){return{orderId:null,payDelivery:0,payMoney:0,config:null,payType:1,payLimitTime:null,order:null,user:null}},onLoad:function(n){this.orderId=JSON.parse(n.orderId),this.getStoreOrderById(),this.getStoreConfig(),this.getUserInfo(),e.showShareMenu({withShareTicket:!0,menus:["shareAppMessage"]})},onShareAppMessage:function(e){return{title:"帮TA支付",path:"/pages_user/user/otherPaymentOrder?orderId="+this.orderId,imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20250814/d64ef5a6ebdb410a84a31dbbac47a942.png"}},methods:{getUserInfo:function(){var n=this;(0,t.getUserInfo)().then((function(r){200==r.code?null!=r.user&&(n.user=r.user):e.showToast({icon:"none",title:"请求失败"})}),(function(e){}))},getStoreConfig:function(){var e=this;(0,o.getStoreConfig)().then((function(n){200==n.code&&(e.config=n.data,console.log(e.config))}),(function(e){}))},payTypeChange:function(e){this.editPayType(e.detail.value)},copyOrderSn:function(n){e.setClipboardData({data:n,success:function(){e.showToast({title:"内容已成功复制到剪切板",icon:"none"})}})},getStoreOrderById:function(){var n=this,r={orderId:this.orderId},t=this;e.showLoading(),(0,i.getStoreOrderById)(r).then((function(r){200==r.code?(console.log(r),e.hideLoading(),t.order=r.order,t.payLimitTime=r.payLimitTime,null!=r.productPackage&&(n.payType=r.productPackage.payType,console.log(n.payType),4==n.order.payType&&(n.order.payType=1)),n.editPayType(n.order.payType)):e.showToast({icon:"none",title:r.msg})}),(function(e){}))},editPayType:function(n){var r=this,t={orderId:this.orderId,payType:n},o=this;e.showLoading(),(0,i.editPayType)(t).then((function(n){200==n.code?(console.log(n),e.hideLoading(),o.order=n.order,r.payMoney=r.order.payMoney,r.payDelivery=r.order.payDelivery):e.showToast({icon:"none",title:n.msg})}),(function(e){}))},otherPayOrder:function(){e.navigateTo({url:"/pages_user/user/otherPaymentOrder?orderId="+this.orderId})},payOrder:function(){var n={orderId:this.order.id,payType:this.order.payType},r=this;e.showLoading(),(0,i.pay)(n).then((function(n){if(200==n.code)if(console.log(n),1==n.payType||2==n.payType){var t=JSON.parse(n.result);e.requestPayment({provider:"wxpay",timeStamp:t.timeStamp,nonceStr:t.nonceStr,package:t.package,signType:t.signType,paySign:t.paySign,success:function(n){e.hideLoading(),e.redirectTo({url:"success?order="+JSON.stringify(r.order)})},fail:function(n){e.showToast({icon:"none",title:"fail:"+JSON.stringify(n)}),console.log("fail:"+JSON.stringify(n)),r.getcanle(),e.hideLoading()}})}else 3==n.payType&&(e.hideLoading(),r.order.isPrescribe?e.redirectTo({url:"prescribe?orderId="+r.order.id}):e.redirectTo({url:"success?order="+JSON.stringify(r.order)}));else e.showToast({icon:"none",title:n.msg})}),(function(e){}))},getcanle:function(){var e={orderId:this.order.id,payType:this.order.payType};(0,i.userCancelPay)(e).then((function(e){200==e.code&&console.log(e)}))}}};n.default=a}).call(this,r(2)["default"])},325:function(e,n,r){"use strict";r.r(n);var t=r(326),o=r.n(t);for(var i in t)["default"].indexOf(i)<0&&function(e){r.d(n,e,(function(){return t[e]}))}(i);n["default"]=o.a},326:function(e,n,r){}},[[319,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/shopping/paymentOrder.js.map