(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/shopping/paymentOrder"],{3147:function(e,o,n){"use strict";n.r(o);var r=n("546e"),t=n("e9e7");for(var i in t)["default"].indexOf(i)<0&&function(e){n.d(o,e,(function(){return t[e]}))}(i);n("bbc7");var a=n("828b"),d=Object(a["a"])(t["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);o["default"]=d.exports},"546e":function(e,o,n){"use strict";n.d(o,"b",(function(){return r})),n.d(o,"c",(function(){return t})),n.d(o,"a",(function(){}));var r=function(){var e=this,o=e.$createElement,n=(e._self._c,e.payMoney.toFixed(2)),r=2==e.payType?e.payDelivery.toFixed(2):null,t=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:n,g1:r,g2:t,g3:i}})},t=[]},bbc7:function(e,o,n){"use strict";var r=n("e9df"),t=n.n(r);t.a},cb38:function(e,o,n){"use strict";(function(e){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var r=n("41e9"),t=n("caff"),i=n("98ea"),a={data:function(){return{orderId:null,payDelivery:0,payMoney:0,config:null,payType:1,payLimitTime:null,order:null,user:null}},onLoad:function(o){this.orderId=JSON.parse(o.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/20230106/6b459adfb1004c1a96219bcdf07e337c.png"}},methods:{getUserInfo:function(){var o=this;(0,r.getUserInfo)().then((function(n){200==n.code?null!=n.user&&(o.user=n.user):e.showToast({icon:"none",title:"请求失败"})}),(function(e){}))},getStoreConfig:function(){var e=this;(0,t.getStoreConfig)().then((function(o){200==o.code&&(e.config=o.data,console.log(e.config))}),(function(e){}))},payTypeChange:function(e){this.editPayType(e.detail.value)},copyOrderSn:function(o){e.setClipboardData({data:o,success:function(){e.showToast({title:"内容已成功复制到剪切板",icon:"none"})}})},getStoreOrderById:function(){var o=this,n={orderId:this.orderId},r=this;e.showLoading(),(0,i.getStoreOrderById)(n).then((function(n){200==n.code?(console.log(n),e.hideLoading(),r.order=n.order,r.payLimitTime=n.payLimitTime,null!=n.productPackage&&(o.payType=n.productPackage.payType,console.log(o.payType),4==o.order.payType&&(o.order.payType=1)),o.editPayType(o.order.payType)):e.showToast({icon:"none",title:n.msg})}),(function(e){}))},editPayType:function(o){var n=this,r={orderId:this.orderId,payType:o},t=this;e.showLoading(),(0,i.editPayType)(r).then((function(o){200==o.code?(console.log(o),e.hideLoading(),t.order=o.order,n.payMoney=n.order.payMoney,n.payDelivery=n.order.payDelivery):e.showToast({icon:"none",title:o.msg})}),(function(e){}))},otherPayOrder:function(){e.navigateTo({url:"/pages_user/user/otherPaymentOrder?orderId="+this.orderId})},payOrder:function(){var o={orderId:this.order.id,payType:this.order.payType},n=this;e.showLoading(),(0,i.pay)(o).then((function(o){if(200==o.code)if(console.log(o),1==o.payType||2==o.payType){var r=JSON.parse(o.result);e.requestPayment({provider:"wxpay",timeStamp:r.timeStamp,nonceStr:r.nonceStr,package:r.package,signType:r.signType,paySign:r.paySign,success:function(o){e.hideLoading(),e.redirectTo({url:"success?order="+JSON.stringify(n.order)})},fail:function(o){e.showToast({icon:"none",title:"fail:"+JSON.stringify(o)}),console.log("fail:"+JSON.stringify(o)),e.hideLoading()}})}else 3==o.payType&&(e.hideLoading(),n.order.isPrescribe?e.redirectTo({url:"prescribe?orderId="+n.order.id}):e.redirectTo({url:"success?order="+JSON.stringify(n.order)}));else e.showToast({icon:"none",title:o.msg})}),(function(e){}))}}};o.default=a}).call(this,n("df3c")["default"])},e9df:function(e,o,n){},e9e7:function(e,o,n){"use strict";n.r(o);var r=n("cb38"),t=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(o,e,(function(){return r[e]}))}(i);o["default"]=t.a},fb24:function(e,o,n){"use strict";(function(e,o){var r=n("47a9");n("584a");r(n("3240"));var t=r(n("3147"));e.__webpack_require_UNI_MP_PLUGIN__=n,o(t.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["fb24","common/runtime","common/vendor"]]]);