12345678910111213141516 |
- ;(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="._colProtocol_12n7o_1{font-size:.32rem;padding:.4rem .37333rem;color:#999;background:#f7f8f9}._colProtocol_12n7o_1 ._protocolText_12n7o_7{color:var(--van-primary);line-height:.4rem}._colProtocol_12n7o_1 ._boxStyle_12n7o_11{background:transparent!important;width:.4rem;height:.4rem;border:transparent!important}._colProtocol_12n7o_1 .van-checkbox{display:inline-block;align-items:inherit;overflow:inherit}._colProtocol_12n7o_1 .van-checkbox__icon{height:.4rem;line-height:.4rem;display:inline-block;vertical-align:middle}._colProtocol_12n7o_1 .van-checkbox__label{line-height:.4rem}._payment_mcc4r_1 .van-cell__title{font-size:.42667rem;padding-left:.26667rem}._payment_mcc4r_1 .van-icon-cross{position:absolute;z-index:1;top:.34667rem;left:.34667rem;color:#ccc;cursor:pointer}._payment_mcc4r_1 ._title_mcc4r_13{background-color:#fff;font-size:.42667rem;font-weight:400;color:#1a1a1a;padding:.37333rem 0 .32rem;text-align:center}._payment_mcc4r_1 ._payAmount_mcc4r_21{background-color:#fff;padding:.53333rem 0;text-align:center}._payment_mcc4r_1 ._payAmount_mcc4r_21 p{font-size:.37333rem;color:#666;padding-bottom:.26667rem}._payment_mcc4r_1 ._payAmount_mcc4r_21 ._amount_mcc4r_31{font-size:.74667rem;color:#000}._payment_mcc4r_1 ._payAmount_mcc4r_21 ._amount_mcc4r_31 span{font-size:.48rem;padding-left:.08rem}._payment_mcc4r_1 ._blank_mcc4r_39{height:1.73333rem}._payment_mcc4r_1 ._blank_mcc4r_39 ._message_mcc4r_42{padding:.26667rem .32rem;color:red;font-size:.37333rem;text-align:center}._payment_mcc4r_1 ._payBtn_mcc4r_48{width:6.13333rem!important;margin:0 auto;font-size:.42667rem;font-weight:600;margin-bottom:.53333rem}\n";document.head.appendChild(__vite_style__);System.register(['./vendor-legacy.73abbe39.js','./index-legacy.f25f109a7.js','./index-legacy.f25f109a8.js','./index-legacy.372e7f90.js','./index-legacy.890d473e.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a.js','./index-legacy.637f35563.js'],function(exports){'use strict';var defineComponent,createVNode,Fragment,Checkbox,createTextVNode,Icon,Popup,Dialog,Toast,RadioGroup,CellGroup,Cell,Radio,Button,ColHeader,request,state,validStudentUrl;return{setters:[function(module){defineComponent=module.d;createVNode=module.b;Fragment=module.F;Checkbox=module.G;createTextVNode=module.j;Icon=module.q;Popup=module.P;Dialog=module.D;Toast=module.T;RadioGroup=module.H;CellGroup=module.m;Cell=module.p;Radio=module.J;Button=module.B;},function(){},function(){},function(module){ColHeader=module.C;},function(module){request=module.r;state=module.s;validStudentUrl=module.v;},function(){},function(){},function(){}],execute:function execute(){var colProtocol="_colProtocol_12n7o_1";var protocolText="_protocolText_12n7o_7";var boxStyle="_boxStyle_12n7o_11";var styles$1={colProtocol:colProtocol,protocolText:protocolText,boxStyle:boxStyle};var activeButtonIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAEEElEQVRYR82Yf2xTVRTHv+e161o6hp1sKqSLbhMoW0eCOpiUuSWG/cF/JKsYE38kZkKCERP5wz/0Lwn+RTBDRFHBRCK8auIfGgMxmZaxbpnO2DJW3IC5ykTGdFJn96vvmPfeumxd2/feNsy7f728e+45n3vPPefcewkGW3Wn+BBJQqME9gHsYUIpMa2U1TBxnBiDAPUKoDYWpHPhLf7rRkyQLmFRtFSXUhOY9zHwOAB942RGoB1ER8ODHIDfn9Syp6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uYM0zzHzEtkZnqwSs+wcu0TbLxDkjSe9ARqYxh/0vsPHFjHaPamf34AAAAASUVORK5CYII=";var inactiveButtonIcon="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAAXNSR0IArs4c6QAAAGxQTFRFAAAAqqqq39/fzs7O2NjY0tLS1tbW1NTU09PT1dXV09PT09PT1NTU1NTU09PT09PT1NTU1NTU09PT1NTU09PT1NTU1dXV19fX2dnZ29vb4uLi6+vr7e3t7u7u9fX1+vr6+/v7/f39/v7+////BlEhtwAAABR0Uk5TAAMIFSEiRFhoaJikxMrN1+v4/v5B0+PEAAAA8klEQVQ4y42UyZKDMAxEG0KAsJmlWcJiwP7/f5zLDMUk4NI7vyrZklrAiSBOi7KqyiKNA1ziRVnNgzqLvG8nVGQ3znozZtPz2JEq/FD8pOGw7PZgXwY2iX92Hjnbydh/mKll/jg5ir22X+ie6rD8nO/VXrC+mf9VTNhfOtauPZPffzWttjfotgkBwFOc7C0TlQcg4mDuJTMwApBxsQ4WZsCz7naXtHd1gJijdTIyRsrZLc1MUVC7Jc0CJTe3tLFEReOWDCuZJConerioBaJmisYiGrBsVURLJ1pfWRBkkRKFUxZz2cGQnR7hEQOA5+v6HP4AJCt9udWWhiIAAAAASUVORK5CYII=";var ColProtocol=exports('C',defineComponent({name:'protocol',props:{showHeader:{type:Boolean,default:false},modelValue:{type:Boolean,default:false},userId:{type:String,default:''},musicGroupId:{type:String,default:''},courseView:{type:String,default:''},protocolTitle:{type:String,default:'产品及服务协议'}},data:function data(){return{exists:true,checked:this.modelValue,popupStatus:false,protocolHTML:'',protocolPopup:null,isProtocol:true};},mounted:function mounted(){var _this=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){var res;return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;console.log('getContractDetail');// 判断是否有协议内容
- if(_this.protocolHTML){_context.next=11;break;}_context.next=5;return request.get(state.platformApi+'/contracts/queryProduceContract',{params:{userId:_this.userId?_this.userId:null,musicGroupId:_this.musicGroupId?_this.musicGroupId:null,courseViewType:_this.courseView}});case 5:res=_context.sent;_this.protocolHTML=res.data.productContract||'';console.log(res);_this.exists=res.data.exists;_this.checked=_this.checked||_this.exists;_this.$emit('update:modelValue',_this.checked||_this.exists);case 11:// 如果没有协议内容则不 显示协议
- if(!_this.protocolHTML){_this.isProtocol=_this.protocolHTML?true:false;_this.checked=true;// 默认选中,学生端则不用默认选中
- _this.$emit('input',_this.checked||_this.exists);}_context.next=16;break;case 14:_context.prev=14;_context.t0=_context["catch"](0);case 16:_this.checked=_this.modelValue;window.addEventListener('hashchange',_this.onHash,false);case 18:case"end":return _context.stop();}}},_callee,null,[[0,14]]);}))();},unmounted:function unmounted(){window.removeEventListener('hashchange',this.onHash,false);},watch:{checked:function checked(val){this.$emit('update:modelValue',val);}},methods:{getContractDetail:function getContractDetail(){var _this2=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var res;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.prev=0;console.log('getContractDetail');// 判断是否有协议内容
- if(_this2.protocolHTML){_context2.next=8;break;}_context2.next=5;return request.get(state.platformApi+'/contracts/queryProduceContract',{params:{contractType:'BUY_ORDER'}});case 5:res=_context2.sent;_this2.protocolHTML=res.data;console.log(res);case 8:_this2.onPopupClose();_context2.next=13;break;case 11:_context2.prev=11;_context2.t0=_context2["catch"](0);case 13:case"end":return _context2.stop();}}},_callee2,null,[[0,11]]);}))();},onHash:function onHash(){this.popupStatus=false;},onPopupClose:function onPopupClose(){this.popupStatus=!this.popupStatus;// 打开弹窗
- if(this.popupStatus){var route=this.$route;var times=0;for(var i in route.query){times+=1;}var origin=window.location.href;var url=times>0?'&pto='+ +new Date():'?pto='+ +new Date();history.pushState('','',"".concat(origin).concat(url));}else{window.history.go(-1);}if(this.protocolPopup){this.protocolPopup.scrollTop=0;}}},render:function render(){var _this3=this;return createVNode("div",{"class":this.isProtocol&&styles$1.colProtocol},[this.isProtocol&&createVNode(Fragment,null,[!this.exists&&createVNode(Checkbox,{"modelValue":this.checked,"onUpdate:modelValue":function onUpdateModelValue($event){return _this3.checked=$event;}},{default:function _default(){return[createTextVNode("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")];},icon:function icon(props){return createVNode(Icon,{"class":styles$1.boxStyle,"name":props.checked?activeButtonIcon:inactiveButtonIcon,"size":"15"},null);}}),this.exists&&createVNode(Fragment,null,[createTextVNode("\u67E5\u770B")]),createVNode("span",{"onClick":this.onPopupClose,"class":styles$1.protocolText},[createTextVNode("\u300A"),this.protocolTitle,createTextVNode("\u300B")])]),createVNode(Popup,{"ref":this.protocolPopup,"show":this.popupStatus,"position":"bottom","style":{height:'100%'}},{default:function _default(){return[_this3.showHeader&&createVNode(ColHeader,{"title":_this3.protocolTitle},null),_this3.popupStatus&&createVNode("div",{"class":styles$1.protocolContent,"id":"mProtocol"},[createVNode("div",{"class":styles$1.protocolContent,"innerHTML":_this3.protocolHTML},null)])];}})]);}}));var payment="_payment_mcc4r_1";var title="_title_mcc4r_13";var payAmount="_payAmount_mcc4r_21";var amount="_amount_mcc4r_31";var blank="_blank_mcc4r_39";var message="_message_mcc4r_42";var payBtn="_payBtn_mcc4r_48";var styles={payment:payment,title:title,payAmount:payAmount,amount:amount,blank:blank,message:message,payBtn:payBtn};var Payment=exports('P',defineComponent({name:'payment',props:{modelValue:{type:Boolean,default:false},/** 可以使用支付方式 */paymentWay:{type:Array,default:function _default(){return['wx','alipay'];}},orderInfo:{type:Object,default:function _default(){return{};}},onBackOut:{type:Function,default:function _default(){}},paymentType:{type:String,default:'orderPay'}},data:function data(){return{payType:'ali_app',pay_channel:'',message:'',isWx:true,isAlipay:true};},mounted:function mounted(){if(this.paymentWay.length>0){this.isWx=this.paymentWay.indexOf('wx')!=-1;this.isAlipay=this.paymentWay.indexOf('alipay')!=-1;if(this.isAlipay){this.payType='ali_app';}if(this.isWx&&!this.isAlipay){this.payType='wx_app';}if(!this.isAlipay){this.message='温馨提示:由于支付宝支付升级,临时暂停支付通道';}else if(!this.isWx){this.message='温馨提示:由于微信支付升级,临时暂停支付通道';}console.log({isWx:this.isWx,isAlipay:this.isAlipay});}},methods:{onClose:function onClose(){var _this4=this;Dialog.confirm({message:'是否放弃本次付款',confirmButtonText:'继续付款',cancelButtonText:'放弃'}).then(function(){}).catch(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:_this4.onCancel();case 1:case"end":return _context3.stop();}}},_callee3);})));},onCancel:function onCancel(noBack){var _this5=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee4(){return regeneratorRuntime.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:// 不管接口是否报错,都返回
- _this5.$emit('update:modelValue',false);!noBack&&_this5.$router.go(-1);_this5.onBackOut&&_this5.onBackOut();case 3:case"end":return _context4.stop();}}},_callee4);}))();},onSubmit:function onSubmit(){var _this6=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee5(){var pt,ua;return regeneratorRuntime.wrap(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:// 支付...
- try{console.log(_this6.orderInfo,'orderInfo payment');Toast.loading({message:'支付中...',forbidClick:true,duration:3000,loadingType:'spinner'});pt=_this6.payType,ua=window.navigator.userAgent.toLowerCase();// 判断当前浏览器
- if(ua.match(/MicroMessenger/i)+''=='micromessenger'){// 微信浏览器
- if(pt=='ali_app'){_this6.pay_channel='alipay_qr';_this6.getCodePay('qrCode');}else if(pt=='wx_app'){_this6.pay_channel='wx_pub';_this6.getCodePay('pay');}}else if(ua.match(/AlipayClient/i)+''=='alipayclient'){// 支付宝浏览器
- if(pt=='ali_app'){_this6.pay_channel='alipay_wap';// 支付宝 H5 支付
- _this6.getCodePay('pay');}else if(pt=='wx_app'){_this6.pay_channel='wx_pub';_this6.getCodePay('qrCode');}}else{if(pt=='ali_app'){_this6.pay_channel='alipay_qr';}else if(pt=='wx_app'){_this6.pay_channel='wx_pub';}_this6.getCodePay('qrCode');}_this6.$emit('update:modelValue',false);setTimeout(function(){Toast.clear();},1000);}catch(e){console.log(e);}case 1:case"end":return _context5.stop();}}},_callee5);}))();},getCodePay:function getCodePay(code){// 二维码页面, 唤起支付页面
- var url=validStudentUrl();if(code=='qrCode'){url+="/#/payQRCode";}else{url+="/#/payResult";}var orderInfo=this.orderInfo;orderInfo.payMap.returnUrl=orderInfo.payMap.returnUrl.replace(/&/gi,'^^');var navHeight=sessionStorage.getItem('navHeight')||0;// p 表示是商品购买,需要单独去学生端处理
- url+="?payType=".concat(this.pay_channel,"&payment=").concat(JSON.stringify(this.orderInfo),"&navHeight=").concat(navHeight,"'&platform=goods");window.location.replace(url);}},render:function render(){var _this7=this;return createVNode("div",{"class":styles.payment},[createVNode(Icon,{"onClick":this.onClose,"name":"cross","size":20},null),createVNode("div",{"class":[styles.title,'van-hairline--bottom']},[createTextVNode("\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F")]),createVNode("div",{"class":styles.payAmount},[createVNode("p",null,[createTextVNode("\u5E94\u4ED8\u91D1\u989D")]),createVNode("div",{"class":styles.amount},[this.$filters.moneyFormat(this.orderInfo.payMap.amount||0),createVNode("span",null,[createTextVNode("\u5143")])])]),createVNode(RadioGroup,{"modelValue":this.payType,"onUpdate:modelValue":function onUpdateModelValue($event){return _this7.payType=$event;}},{default:function _default(){return[createVNode(CellGroup,{"border":false},{default:function _default(){return[createVNode(Cell,{"title":"支付宝支付","border":false,"center":true,"onClick":function onClick(){if(!_this7.isAlipay)return;// alipay
- _this7.payType='ali_app';}},{icon:function icon(){return createVNode(Icon,{"name":"alipay","color":"#009fe9","size":22},null);},'right-icon':function rightIcon(){return createVNode(Radio,{"name":"ali_app","disabled":!_this7.isAlipay},null);}}),createVNode(Cell,{"title":"微信支付","border":false,"center":true,"onClick":function onClick(){if(!_this7.isWx)return;// wx_lite
- _this7.payType='wx_app';}},{icon:function icon(){return createVNode(Icon,{"name":"wechat-pay","color":"#15c434","size":22},null);},'right-icon':function rightIcon(){return createVNode(Radio,{"name":"wx_app","disabled":!_this7.isWx},null);}})];}})];}}),createVNode("div",{"class":styles.blank},[this.message&&createVNode("p",{"class":styles.message},[this.message])]),createVNode(Button,{"type":"primary","class":styles.payBtn,"block":true,"round":true,"onClick":this.onSubmit},{default:function _default(){return[createTextVNode("\u786E\u8BA4\u652F\u4ED8")];}})]);}}));}};});})();
|