;(function(){function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="body{--van-cart: #ff4e19}._item_2zuar_4 .van-card{background:#fff;flex:1;margin:0;padding:.37333rem .32rem}._item_2zuar_4 .van-card__title{font-size:.42667rem;color:#333;font-weight:400;line-height:.58667rem;max-height:1.17333rem}._item_2zuar_4 .van-card__desc{font-size:.37333rem;color:#999;font-weight:400;line-height:.53333rem;max-height:1.06667rem;white-space:break-spaces}._item_2zuar_4 .van-card__thumb{width:auto;height:auto}._item_2zuar_4 .van-image{width:2.66667rem!important;height:2.66667rem!important;border-radius:.21333rem;overflow:hidden}._item_2zuar_4 .van-card__price{color:var(--van-cart)}._shopOrderDetail_ahtdt_1{padding:.32rem .37333rem}._shopOrderDetail_ahtdt_1 .van-cell__title{font-size:.37333rem;color:#999}._shopOrderDetail_ahtdt_1 .van-cell__value{font-size:.37333rem;color:#333}body{background:#f7f8f9}._box_ahtdt_15{background:#fff;border-radius:.26667rem;overflow:hidden;margin-bottom:.32rem;padding:.37333rem}._box_ahtdt_15 .van-card{background:transparent;padding:0}._box_ahtdt_15 .van-cell-group__title{font-size:.42667rem;color:#333;font-weight:500}._addressDetail_ahtdt_31 .van-cell__title{flex:none}._copyWrap_ahtdt_34{display:flex;align-items:center;justify-content:flex-end}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.5deccbb1.js','./vendor-legacy.73abbe39.js','./index-legacy.f25f109a10.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./cart-legacy.e8d257f5.js','./index-legacy.f25f109a4.js','./index-legacy.f25f109a9.js','./index-legacy.f25f109a12.js','./shop-mall-legacy.da9e3584.js'],function(exports){'use strict';var moneyFormat,request,defineComponent,createVNode,Card,useRoute,ref,onMounted,Divider,Cell,CellGroup,Button,createTextVNode,Fragment,Toast,formateAttr,orderState;return{setters:[function(module){moneyFormat=module.m;request=module.r;},function(module){defineComponent=module.d;createVNode=module.b;Card=module.a3;useRoute=module.a4;ref=module.M;onMounted=module.a5;Divider=module.Z;Cell=module.p;CellGroup=module.m;Button=module.B;createTextVNode=module.j;Fragment=module.F;Toast=module.T;},function(){},function(){},function(){},function(module){formateAttr=module.f;},function(){},function(){},function(){},function(module){orderState=module.o;}],execute:function execute(){var item="_item_2zuar_4";var styles$1={item:item};var ShopItem=defineComponent({name:'shop-item',props:{item:{type:Object,default:{productPic:'',productName:'',productAttr:'',productPrice:0,productQuantity:0}}},setup:function setup(_ref){var item=_ref.item;return function(){return createVNode(Card,{"class":styles$1.item,"thumb":item.productPic,"title":item.productName,"desc":formateAttr(item.productAttr),"price":moneyFormat(item.productPrice),"num":item.productQuantity},null);};}});var shopOrderDetail="_shopOrderDetail_ahtdt_1";var box="_box_ahtdt_15";var addressDetail="_addressDetail_ahtdt_31";var copyWrap="_copyWrap_ahtdt_34";var styles={shopOrderDetail:shopOrderDetail,box:box,addressDetail:addressDetail,copyWrap:copyWrap};var index=exports('default',defineComponent({name:'shop-order-detail',setup:function setup(){var route=useRoute();var items=ref([]);var order=ref({});var getOrderInfo=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var id,_yield$request$get,code,data;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:id=route.query.id;if(id){_context.next=3;break;}return _context.abrupt("return");case 3:_context.prev=3;_context.next=6;return request.get("/api-mall-portal/order/detail/".concat(id));case 6:_yield$request$get=_context.sent;code=_yield$request$get.code;data=_yield$request$get.data;if(code===200){items.value=data.orderItemList;delete data.orderItemList;order.value=data;order.value.address_data=[data.receiverProvince,data.receiverCity,data.receiverRegion,data.receiverDetailAddress].join('');}_context.next=14;break;case 12:_context.prev=12;_context.t0=_context["catch"](3);case 14:case"end":return _context.stop();}}},_callee,null,[[3,12]]);}));return function getOrderInfo(){return _ref2.apply(this,arguments);};}();onMounted(function(){getOrderInfo();});var copyText=function copyText(text){// 数字没有 .length 不能执行selectText 需要转化成字符串 var textString=text.toString();var input=document.querySelector('#copy-input');if(!input){input=document.createElement('input');input.id='copy-input';input.readOnly=true;// 防止ios聚焦触发键盘事件 input.style.position='absolute';input.style.left='-1000px';input.style.zIndex='-1000';document.body.appendChild(input);}input.value=textString;// ios必须先选中文字且不支持 input.select(); selectText(input,0,textString.length);console.log(document.execCommand('copy'),'execCommand');if(document.execCommand('copy')){document.execCommand('copy');Toast('复制成功');}input.blur();// input自带的select()方法在苹果端无法进行选择,所以需要自己去写一个类似的方法 // 选择文本。createTextRange(setSelectionRange)是input方法 function selectText(textbox,startIndex,stopIndex){if(textbox.createTextRange){//ie var range=textbox.createTextRange();range.collapse(true);range.moveStart('character',startIndex);//起始光标 range.moveEnd('character',stopIndex-startIndex);//结束光标 range.select();//不兼容苹果 }else{//firefox/chrome textbox.setSelectionRange(startIndex,stopIndex);textbox.focus();}}};return function(){var _order$value,_order$value2,_order$value3,_order$value4,_order$value5,_order$value6,_order$value7,_order$value8,_order$value9,_order$value10,_order$value11;return createVNode(Fragment,null,[items.value.length?createVNode("div",{"class":styles.shopOrderDetail},[createVNode("div",{"class":styles.box},[items.value.map(function(item,index){return createVNode("div",null,[createVNode(ShopItem,{"item":item},null),index===items.value.length-1?null:createVNode(Divider,null,null)]);})]),createVNode("div",{"class":styles.box,"style":{padding:0}},[createVNode(Cell,{"border":false,"title":"商品价格:","value":'¥ '+moneyFormat((_order$value=order.value)===null||_order$value===void 0?void 0:_order$value.totalAmount)},null),createVNode(Cell,{"border":false,"title":"订单金额:","value":'¥ '+moneyFormat(((_order$value2=order.value)===null||_order$value2===void 0?void 0:_order$value2.payAmount)+((_order$value3=order.value)===null||_order$value3===void 0?void 0:_order$value3.integrationAmount))},null),createVNode(Cell,{"border":false,"title":"优惠价格:","value":'-¥ '+moneyFormat((_order$value4=order.value)===null||_order$value4===void 0?void 0:_order$value4.couponAmount)},null),createVNode(Cell,{"border":false,"title":"余额支付:","value":moneyFormat((_order$value5=order.value)===null||_order$value5===void 0?void 0:_order$value5.integrationAmount)},null),createVNode(Cell,{"border":false,"title":"现金支付:","value":moneyFormat((_order$value6=order.value)===null||_order$value6===void 0?void 0:_order$value6.payAmount)},null),createVNode(Cell,{"border":false,"title":"订单状态:","value":orderState[(_order$value7=order.value)===null||_order$value7===void 0?void 0:_order$value7.status]},null),createVNode(Cell,{"border":false,"title":"收货状态:","value":(_order$value8=order.value)!==null&&_order$value8!==void 0&&_order$value8.confirmStatus?'已确认收货':'未确认收货'},null),createVNode(Divider,{"style":{margin:0}},null),createVNode(Cell,{"border":false,"title":"订单号:","value":(_order$value9=order.value)===null||_order$value9===void 0?void 0:_order$value9.orderSn},null),createVNode(Cell,{"border":false,"title":"创建时间:","value":(_order$value10=order.value)===null||_order$value10===void 0?void 0:_order$value10.createTime},null),createVNode(Cell,{"border":false,"title":"付款时间:","value":(_order$value11=order.value)===null||_order$value11===void 0?void 0:_order$value11.paymentTime},null)]),createVNode("div",{"class":styles.box,"style":{padding:0}},[createVNode(CellGroup,{"title":"收货信息","border":false},{default:function _default(){var _order$value12,_order$value13,_order$value14,_order$value15;return[createVNode(Cell,{"border":false,"title":"姓名:","value":(_order$value12=order.value)===null||_order$value12===void 0?void 0:_order$value12.receiverName},null),createVNode(Cell,{"border":false,"title":"手机号:","value":(_order$value13=order.value)===null||_order$value13===void 0?void 0:_order$value13.receiverPhone},null),createVNode(Cell,{"class":styles.addressDetail,"border":false,"title":"地址:","value":(_order$value14=order.value)===null||_order$value14===void 0?void 0:_order$value14.address_data},null),createVNode(Cell,{"class":styles.addressDetail,"border":false,"title":"物流公司(配送方式):","value":(_order$value15=order.value)===null||_order$value15===void 0?void 0:_order$value15.deliveryCompany},null),createVNode(Cell,{"class":styles.addressDetail,"border":false,"title":"运单编号:"},{value:function value(){var _order$value16,_order$value17;return createVNode("div",{"class":styles.copyWrap},[createVNode("span",{"style":{marginRight:'8px'}},[(_order$value16=order.value)===null||_order$value16===void 0?void 0:_order$value16.deliverySn]),((_order$value17=order.value)===null||_order$value17===void 0?void 0:_order$value17.deliverySn)&&createVNode(Button,{"size":"mini","onClick":function onClick(evt){var _order$value18;copyText((_order$value18=order.value)===null||_order$value18===void 0?void 0:_order$value18.deliverySn);}},{default:function _default(){return[createTextVNode("\u70B9\u51FB\u590D\u5236")];}})]);}})];}})])]):null]);};}}));}};});})();