index-legacy.b17f14dc.js 9.1 KB

123456789101112
  1. ;(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);});};}System.register(['./vendor-legacy.73abbe39.js','./index-legacy.f25f109a4.js','./index-legacy.f25f109a10.js','./index-legacy.f25f109a13.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./index-legacy.f25f109a12.js','./cart-legacy.e8d257f5.js','./index.module-legacy.f5231e7e.js','./index-legacy.e06a4f89.js','./index-legacy.890d473e.js','./index-legacy.fef83bdf.js','./index-legacy.372e7f90.js','./index-legacy.f25f109a7.js','./index-legacy.f25f109a8.js','./index-legacy.637f35563.js'],function(exports){'use strict';var defineComponent,ref,onMounted,watch,useRouter,createVNode,Card,CellGroup,Cell,SubmitBar,createTextVNode,Popup,Fragment,Toast,cartConfirm,formateAttr,styles,Address,request,moneyFormat,ColResult,ColProtocol,Payment,ColHeader;return{setters:[function(module){defineComponent=module.d;ref=module.M;onMounted=module.a5;watch=module.a8;useRouter=module.a6;createVNode=module.b;Card=module.a3;CellGroup=module.m;Cell=module.p;SubmitBar=module.a0;createTextVNode=module.j;Popup=module.P;Fragment=module.F;Toast=module.T;},function(){},function(){},function(){},function(){},function(){},function(){},function(module){cartConfirm=module.c;formateAttr=module.f;},function(module){styles=module.s;},function(module){Address=module.A;},function(module){request=module.r;moneyFormat=module.m;ColResult=module.C;},function(module){ColProtocol=module.C;Payment=module.P;},function(module){ColHeader=module.C;},function(){},function(){},function(){}],execute:function execute(){var index=exports('default',defineComponent({name:'cartConfirmAgin',setup:function setup(){var _cartConfirm$orderInf,_cartConfirm$orderInf2,_cartConfirm$orderInf3,_cartConfirm$orderInf4,_cartConfirm$orderInf5,_cartConfirm$orderInf6,_cartConfirm$orderInf7,_cartConfirm$orderInf8,_cartConfirm$orderInf9,_cartConfirm$orderInf10,_cartConfirm$orderInf11,_cartConfirm$orderInf12,_cartConfirm$orderInf13;var list=((_cartConfirm$orderInf=cartConfirm.orderInfo)===null||_cartConfirm$orderInf===void 0?void 0:_cartConfirm$orderInf.orderItemList)||[];var calcAmount={integrationAmount:((_cartConfirm$orderInf2=cartConfirm.orderInfo)===null||_cartConfirm$orderInf2===void 0?void 0:_cartConfirm$orderInf2.integrationAmount)||0,totalAmount:((_cartConfirm$orderInf3=cartConfirm.orderInfo)===null||_cartConfirm$orderInf3===void 0?void 0:_cartConfirm$orderInf3.totalAmount)||0,payAmount:((_cartConfirm$orderInf4=cartConfirm.orderInfo)===null||_cartConfirm$orderInf4===void 0?void 0:_cartConfirm$orderInf4.payAmount)||0,freightAmount:((_cartConfirm$orderInf5=cartConfirm.orderInfo)===null||_cartConfirm$orderInf5===void 0?void 0:_cartConfirm$orderInf5.freightAmount)||0,couponAmount:(_cartConfirm$orderInf6=cartConfirm.orderInfo)===null||_cartConfirm$orderInf6===void 0?void 0:_cartConfirm$orderInf6.couponAmount};ref(0);// 0->未支付;1->支付宝;2->微信
  2. var address={city:(_cartConfirm$orderInf7=cartConfirm.orderInfo)===null||_cartConfirm$orderInf7===void 0?void 0:_cartConfirm$orderInf7.receiverCity,detailAddress:(_cartConfirm$orderInf8=cartConfirm.orderInfo)===null||_cartConfirm$orderInf8===void 0?void 0:_cartConfirm$orderInf8.receiverDetailAddress,name:(_cartConfirm$orderInf9=cartConfirm.orderInfo)===null||_cartConfirm$orderInf9===void 0?void 0:_cartConfirm$orderInf9.receiverName,phoneNumber:(_cartConfirm$orderInf10=cartConfirm.orderInfo)===null||_cartConfirm$orderInf10===void 0?void 0:_cartConfirm$orderInf10.receiverPhone,postCode:(_cartConfirm$orderInf11=cartConfirm.orderInfo)===null||_cartConfirm$orderInf11===void 0?void 0:_cartConfirm$orderInf11.receiverPostCode,province:(_cartConfirm$orderInf12=cartConfirm.orderInfo)===null||_cartConfirm$orderInf12===void 0?void 0:_cartConfirm$orderInf12.receiverProvince,region:(_cartConfirm$orderInf13=cartConfirm.orderInfo)===null||_cartConfirm$orderInf13===void 0?void 0:_cartConfirm$orderInf13.receiverRegion};var agreeStatus=ref(false);var paymentPopup=ref(false);var authPopup=ref(false);var orderInfo=ref();var paymentWay=ref([]);onMounted(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res,paranValue;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.get('/api-student/sysConfig/queryByParamName',{params:{paramName:'payment_channel_action'}});case 3:res=_context.sent;paranValue=res.data.paranValue;paymentWay.value=paranValue?JSON.parse(paranValue):[];_context.next=10;break;case 8:_context.prev=8;_context.t0=_context["catch"](0);case 10:case"end":return _context.stop();}}},_callee,null,[[0,8]]);})));//修复实名认证头部问题
  3. watch(authPopup,function(value,oldValue){if(authPopup.value){// 设置是否显示导航栏 0 显示 1 不显示
  4. postMessage({api:'setBarStatus',content:{status:0}});}else{postMessage({api:'setBarStatus',content:{status:1}});}});// 提交
  5. var _onSubmit=function onSubmit(){if(!agreeStatus.value){Toast('请先阅读并同意《产品及服务协议》');return;}// const users = state.user.data
  6. // 判断是否需要实名认证
  7. // if (!users?.student.realName || !users?.student.idCardNo) {
  8. // authPopup.value = true
  9. // return
  10. // }
  11. // 判断是否有订单号
  12. createOrder();};var router=useRouter();var createOrder=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var body,_yield$request$post,code,data;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:console.log(cartConfirm);body={orderNo:cartConfirm.orderInfo.orderSn};_context2.prev=2;_context2.next=5;return request.post('/api-mall-portal/order/generateOrder',{data:body});case 5:_yield$request$post=_context2.sent;code=_yield$request$post.code;data=_yield$request$post.data;if(code===200){paymentPopup.value=true;orderInfo.value=data;}_context2.next=13;break;case 11:_context2.prev=11;_context2.t0=_context2["catch"](2);case 13:case"end":return _context2.stop();}}},_callee2,null,[[2,11]]);}));return function createOrder(){return _ref2.apply(this,arguments);};}();return function(){return createVNode(Fragment,null,[createVNode(ColHeader,null,null),list.length?createVNode("div",{"class":styles.cartConfirm},[createVNode("div",{"class":styles.cartConfirmBox},[createVNode(Address,{"item":address,"isLink":false},null)]),createVNode("div",{"style":{marginTop:'20px'},"class":[styles.cartBox,styles.cartConfirmBox]},[createVNode("div",{"class":styles.shopBox},[list.map(function(item){return createVNode("div",{"class":[styles.cartItem],"style":{marginBottom:'10px'}},[createVNode(Card,{"price":moneyFormat(item.productPrice),"desc":formateAttr(item.productAttr),"title":item.productName,"thumb":item.productPic,"num":item.productQuantity},null)]);})]),createVNode(CellGroup,{"border":true},{default:function _default(){return[createVNode(Cell,{"border":false,"title":"优惠券"},{value:function value(){return createVNode("span",{"style":{fontSize:'0.42667rem',color:'#ff3535',fontWeight:'bold'}},['-¥ '+calcAmount.couponAmount]);}}),createVNode(Cell,{"border":false,"title":"余额"},{value:function value(){return createVNode("span",{"style":{fontSize:'0.42667rem',color:'#ff3535',fontWeight:'bold'}},['-¥ '+calcAmount.integrationAmount]);}}),createVNode(Cell,{"border":false,"title":"总额","value":'¥ '+calcAmount.totalAmount},null)];}})]),createVNode("div",{"class":styles.payProtocol},[createVNode(ColProtocol,{"modelValue":agreeStatus.value,"onUpdate:modelValue":function onUpdateModelValue($event){return agreeStatus.value=$event;}},null),createVNode(SubmitBar,{"buttonText":"\u7ED3\u7B97(".concat(list.length,")"),"buttonColor":"var(--van-primary)","disabled":list.length===0,"onSubmit":function onSubmit(){return _onSubmit();}},{default:function _default(){return[createVNode("div",{"class":styles.confirmBottom},[createTextVNode("\u5408\u8BA1"),' ',createVNode("span",{"class":styles['price-des']},[createTextVNode("\xA5"),moneyFormat(calcAmount.payAmount)])])];}})]),createVNode("div",{"style":{height:'var(--van-submit-bar-height)'}},null),createVNode(Popup,{"show":paymentPopup.value,"closeOnClickOverlay":false,"position":"bottom","round":true,"closeOnPopstate":true,"safeAreaInsetBottom":true,"style":{minHeight:'30%'}},{default:function _default(){return[createVNode(Payment,{"paymentWay":paymentWay.value,"modelValue":paymentPopup.value,"onUpdate:modelValue":function onUpdateModelValue($event){return paymentPopup.value=$event;},"orderInfo":orderInfo.value,"paymentType":"goodsPay","onBackOut":function onBackOut(){return paymentPopup.value=false;}},null)];}})]):createVNode(ColResult,{"buttonText":"去购物车","onClick":function onClick(){router.push({path:'/cart'});}},null)]);};}}));}};});})();