12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- ;(function(){function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}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);});};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o);},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj;}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;},_typeof(obj);}var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._formTitle_opgdl_1{font-size:.42667rem;color:#000;display:flex;align-items:center;justify-content:space-between}._formTitle_opgdl_1 ._col-left_opgdl_8{display:flex;align-items:center}._formTitle_opgdl_1 ._col-left_opgdl_8 .van-icon{margin-right:.13333rem}._formTitle_opgdl_1 ._col-left_opgdl_8 .van-icon>img{vertical-align:middle}._formTitle_opgdl_1 ._col-left_opgdl_8 ._required_opgdl_18{font-style:normal;color:#ff4e19;font-size:.45333rem}._formTitle_opgdl_1 ._col-icon_opgdl_23{display:flex;align-items:center}._col-field_opgdl_27{margin-bottom:.42667rem}._col-field-group_1vk7j_1{margin:0 .37333rem .32rem;border-radius:.26667rem;overflow:hidden;background-color:#fff;padding:.32rem;padding-bottom:0}._col-field-group_1vk7j_1 .van-field{padding-left:0;padding-right:0}._userAuth_1jf99_1{min-height:100vh;background-color:#f6f8f9;overflow:hidden}._userAuth_1jf99_1 ._btnGroup_1jf99_6{padding:0 .37333rem .4rem}._useCoupon_dzp2v_1{padding-top:.42667rem;padding-bottom:.42667rem}._useCoupon_dzp2v_1 ._couponCount_dzp2v_5{color:#ff3535;font-size:.42667rem;font-weight:600}._useCoupon_dzp2v_1 ._couponCount_dzp2v_5 i{font-style:normal;font-size:.37333rem}._choiceCoupon_dzp2v_14{display:flex;flex-direction:column;overflow:hidden;height:100%}._couponTitle_dzp2v_20{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:0 .45333rem;height:1.6rem;line-height:1.6rem;font-size:.48rem;font-weight:600;color:#1a1a1a}._couponTitle_dzp2v_20 ._iconClose_dzp2v_32{display:inline-block;width:.64rem;height:.64rem;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAG9QTFRFAAAAzMzM8fHx8/Pz6+vr8fHx6urq7Ozs6urq6+vr7Ozs6+vr6+vr6+vr6+vr7Ozs6+vr6+vr6+vr6+vr6+vr6+vr6+vr6+vr6+vr7OzsZmZma2trbGxsgYGBj4+PysrKy8vLzMzMz8/P39/f6+vrszxq/gAAABp0Uk5TAAUSFhkkJVBXZmt1jY+2yM7b6/Hz9Pj8/v60zef/AAABRUlEQVRIx61W2baCMAyMIIvsm6ChgGD+/xvvA4gta+O580TITE+bpEkBljDdMEqzsszSKHRNOIHhxQ+S8Ig944B+De60wj247tAvfkGbKPzLFt9KaBeJteY7OR0gd5b8W0WHqG4L/pNO8FQUTkWnqKRd2TlpILfneCakheQTXZ804U/5LXQFxZjzgLQRAAAYcv28W9EMX3NoRPuW68oAAE9eokXEuvtYXY2Irez3ACCWfwhERPEajddoyf4YwFTqv8GvYuRjo9wPE1zlVEM9KyZ+PSgEF0I1Dt1IE30/fXSqP4RoEblpYSFQPs6MCFLaVmzzKYWM9hVrPmVQrvM5bR9Fv/aVfAF7S+xDs8PKThy7NNjFxy5v/gViX1F2E+C3GXYj47dK3WZs/d7u+QOFP7L4QxHAPhq79n8Mdv7T4YfHic7z5w+yIe8epvSUygAAAABJRU5ErkJggg==) no-repeat center;background-size:contain}._couponContent_dzp2v_39{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:.32rem .37333rem;--coupon-point: #fff}._couponFooter_dzp2v_46{display:flex;align-items:center;justify-content:space-between;line-height:1.49333rem;padding:0 .42667rem}._couponFooter_dzp2v_46 ._couponSelectText_dzp2v_53{font-size:.42667rem;color:#1a1a1a}._couponFooter_dzp2v_46 ._couponSelectText_dzp2v_53 span{padding:0 .24rem;font-weight:600;color:#fc1a19}\n";document.head.appendChild(__vite_style__);System.register(['./vendor-legacy.73abbe39.js','./index-legacy.637f3556.js','./index-legacy.372e7f90.js','./index-legacy.890d473e.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a3.js','./item-legacy.8c78baa8.js'],function(exports){'use strict';var defineComponent,createVNode,Popup,Col,Icon,createTextVNode,Row,Toast,Field,Button,Form,Fragment,Loading,Cell,ColHeader,state,request,ColResult,Item;return{setters:[function(module){defineComponent=module.d;createVNode=module.b;Popup=module.P;Col=module.C;Icon=module.q;createTextVNode=module.j;Row=module.k;Toast=module.T;Field=module.l;Button=module.B;Form=module.K;Fragment=module.F;Loading=module.L;Cell=module.p;},function(){},function(module){ColHeader=module.C;},function(module){state=module.s;request=module.r;ColResult=module.C;},function(){},function(){},function(module){Item=module.I;}],execute:function execute(){var queryString={};var strictUriEncode=function strictUriEncode(str){return encodeURIComponent(str).replace(/[!'()*]/g,function(x){return"%".concat(x.charCodeAt(0).toString(16).toUpperCase());});};var token='%[a-f0-9]{2}';var singleMatcher=new RegExp(token,'gi');var multiMatcher=new RegExp('('+token+')+','gi');function decodeComponents(components,split){try{// Try to decode the entire string first
- return decodeURIComponent(components.join(''));}catch(err){// Do nothing
- }if(components.length===1){return components;}split=split||1;// Split the array in 2 parts
- var left=components.slice(0,split);var right=components.slice(split);return Array.prototype.concat.call([],decodeComponents(left),decodeComponents(right));}function decode(input){try{return decodeURIComponent(input);}catch(err){var tokens=input.match(singleMatcher);for(var i=1;i<tokens.length;i++){input=decodeComponents(tokens,i).join('');tokens=input.match(singleMatcher);}return input;}}function customDecodeURIComponent(input){// Keep track of all the replacements and prefill the map with the `BOM`
- var replaceMap={'%FE%FF':"\uFFFD\uFFFD",'%FF%FE':"\uFFFD\uFFFD"};var match=multiMatcher.exec(input);while(match){try{// Decode as big chunks as possible
- replaceMap[match[0]]=decodeURIComponent(match[0]);}catch(err){var result=decode(match[0]);if(result!==match[0]){replaceMap[match[0]]=result;}}match=multiMatcher.exec(input);}// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
- replaceMap['%C2']="\uFFFD";var entries=Object.keys(replaceMap);for(var i=0;i<entries.length;i++){// Replace all decoded components
- var key=entries[i];input=input.replace(new RegExp(key,'g'),replaceMap[key]);}return input;}var decodeUriComponent=function decodeUriComponent(encodedURI){if(typeof encodedURI!=='string'){throw new TypeError('Expected `encodedURI` to be of type `string`, got `'+_typeof(encodedURI)+'`');}try{encodedURI=encodedURI.replace(/\+/g,' ');// Try the built in decoder first
- return decodeURIComponent(encodedURI);}catch(err){// Fallback to a more advanced decoder
- return customDecodeURIComponent(encodedURI);}};var splitOnFirst=function splitOnFirst(string,separator){if(!(typeof string==='string'&&typeof separator==='string')){throw new TypeError('Expected the arguments to be of type `string`');}if(separator===''){return[string];}var separatorIndex=string.indexOf(separator);if(separatorIndex===-1){return[string];}return[string.slice(0,separatorIndex),string.slice(separatorIndex+separator.length)];};var filterObj=function filterObj(obj,predicate){var ret={};var keys=Object.keys(obj);var isArr=Array.isArray(predicate);for(var i=0;i<keys.length;i++){var key=keys[i];var val=obj[key];if(isArr?predicate.indexOf(key)!==-1:predicate(key,val,obj)){ret[key]=val;}}return ret;};(function(exports){var strictUriEncode$1=strictUriEncode;var decodeComponent=decodeUriComponent;var splitOnFirst$1=splitOnFirst;var filterObject=filterObj;var isNullOrUndefined=function isNullOrUndefined(value){return value===null||value===undefined;};var encodeFragmentIdentifier=Symbol('encodeFragmentIdentifier');function encoderForArrayFormat(options){switch(options.arrayFormat){case'index':return function(key){return function(result,value){var index=result.length;if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===''){return result;}if(value===null){return[].concat(_toConsumableArray(result),[[encode(key,options),'[',index,']'].join('')]);}return[].concat(_toConsumableArray(result),[[encode(key,options),'[',encode(index,options),']=',encode(value,options)].join('')]);};};case'bracket':return function(key){return function(result,value){if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===''){return result;}if(value===null){return[].concat(_toConsumableArray(result),[[encode(key,options),'[]'].join('')]);}return[].concat(_toConsumableArray(result),[[encode(key,options),'[]=',encode(value,options)].join('')]);};};case'colon-list-separator':return function(key){return function(result,value){if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===''){return result;}if(value===null){return[].concat(_toConsumableArray(result),[[encode(key,options),':list='].join('')]);}return[].concat(_toConsumableArray(result),[[encode(key,options),':list=',encode(value,options)].join('')]);};};case'comma':case'separator':case'bracket-separator':{var keyValueSep=options.arrayFormat==='bracket-separator'?'[]=':'=';return function(key){return function(result,value){if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===''){return result;}// Translate null to an empty string so that it doesn't serialize as 'null'
- value=value===null?'':value;if(result.length===0){return[[encode(key,options),keyValueSep,encode(value,options)].join('')];}return[[result,encode(value,options)].join(options.arrayFormatSeparator)];};};}default:return function(key){return function(result,value){if(value===undefined||options.skipNull&&value===null||options.skipEmptyString&&value===''){return result;}if(value===null){return[].concat(_toConsumableArray(result),[encode(key,options)]);}return[].concat(_toConsumableArray(result),[[encode(key,options),'=',encode(value,options)].join('')]);};};}}function parserForArrayFormat(options){var result;switch(options.arrayFormat){case'index':return function(key,value,accumulator){result=/\[(\d*)\]$/.exec(key);key=key.replace(/\[\d*\]$/,'');if(!result){accumulator[key]=value;return;}if(accumulator[key]===undefined){accumulator[key]={};}accumulator[key][result[1]]=value;};case'bracket':return function(key,value,accumulator){result=/(\[\])$/.exec(key);key=key.replace(/\[\]$/,'');if(!result){accumulator[key]=value;return;}if(accumulator[key]===undefined){accumulator[key]=[value];return;}accumulator[key]=[].concat(accumulator[key],value);};case'colon-list-separator':return function(key,value,accumulator){result=/(:list)$/.exec(key);key=key.replace(/:list$/,'');if(!result){accumulator[key]=value;return;}if(accumulator[key]===undefined){accumulator[key]=[value];return;}accumulator[key]=[].concat(accumulator[key],value);};case'comma':case'separator':return function(key,value,accumulator){var isArray=typeof value==='string'&&value.includes(options.arrayFormatSeparator);var isEncodedArray=typeof value==='string'&&!isArray&&decode(value,options).includes(options.arrayFormatSeparator);value=isEncodedArray?decode(value,options):value;var newValue=isArray||isEncodedArray?value.split(options.arrayFormatSeparator).map(function(item){return decode(item,options);}):value===null?value:decode(value,options);accumulator[key]=newValue;};case'bracket-separator':return function(key,value,accumulator){var isArray=/(\[\])$/.test(key);key=key.replace(/\[\]$/,'');if(!isArray){accumulator[key]=value?decode(value,options):value;return;}var arrayValue=value===null?[]:value.split(options.arrayFormatSeparator).map(function(item){return decode(item,options);});if(accumulator[key]===undefined){accumulator[key]=arrayValue;return;}accumulator[key]=[].concat(accumulator[key],arrayValue);};default:return function(key,value,accumulator){if(accumulator[key]===undefined){accumulator[key]=value;return;}accumulator[key]=[].concat(accumulator[key],value);};}}function validateArrayFormatSeparator(value){if(typeof value!=='string'||value.length!==1){throw new TypeError('arrayFormatSeparator must be single character string');}}function encode(value,options){if(options.encode){return options.strict?strictUriEncode$1(value):encodeURIComponent(value);}return value;}function decode(value,options){if(options.decode){return decodeComponent(value);}return value;}function keysSorter(input){if(Array.isArray(input)){return input.sort();}if(_typeof(input)==='object'){return keysSorter(Object.keys(input)).sort(function(a,b){return Number(a)-Number(b);}).map(function(key){return input[key];});}return input;}function removeHash(input){var hashStart=input.indexOf('#');if(hashStart!==-1){input=input.slice(0,hashStart);}return input;}function getHash(url){var hash='';var hashStart=url.indexOf('#');if(hashStart!==-1){hash=url.slice(hashStart);}return hash;}function extract(input){input=removeHash(input);var queryStart=input.indexOf('?');if(queryStart===-1){return'';}return input.slice(queryStart+1);}function parseValue(value,options){if(options.parseNumbers&&!Number.isNaN(Number(value))&&typeof value==='string'&&value.trim()!==''){value=Number(value);}else if(options.parseBooleans&&value!==null&&(value.toLowerCase()==='true'||value.toLowerCase()==='false')){value=value.toLowerCase()==='true';}return value;}function parse(query,options){options=Object.assign({decode:true,sort:true,arrayFormat:'none',arrayFormatSeparator:',',parseNumbers:false,parseBooleans:false},options);validateArrayFormatSeparator(options.arrayFormatSeparator);var formatter=parserForArrayFormat(options);// Create an object with no prototype
- var ret=Object.create(null);if(typeof query!=='string'){return ret;}query=query.trim().replace(/^[?#&]/,'');if(!query){return ret;}var _iterator=_createForOfIteratorHelper(query.split('&')),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var param=_step.value;if(param===''){continue;}var _splitOnFirst$=splitOnFirst$1(options.decode?param.replace(/\+/g,' '):param,'='),_splitOnFirst$2=_slicedToArray(_splitOnFirst$,2),_key=_splitOnFirst$2[0],_value=_splitOnFirst$2[1];// Missing `=` should be `null`:
- // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
- _value=_value===undefined?null:['comma','separator','bracket-separator'].includes(options.arrayFormat)?_value:decode(_value,options);formatter(decode(_key,options),_value,ret);}}catch(err){_iterator.e(err);}finally{_iterator.f();}for(var _i=0,_Object$keys=Object.keys(ret);_i<_Object$keys.length;_i++){var key=_Object$keys[_i];var value=ret[key];if(_typeof(value)==='object'&&value!==null){for(var _i2=0,_Object$keys2=Object.keys(value);_i2<_Object$keys2.length;_i2++){var k=_Object$keys2[_i2];value[k]=parseValue(value[k],options);}}else{ret[key]=parseValue(value,options);}}if(options.sort===false){return ret;}return(options.sort===true?Object.keys(ret).sort():Object.keys(ret).sort(options.sort)).reduce(function(result,key){var value=ret[key];if(Boolean(value)&&_typeof(value)==='object'&&!Array.isArray(value)){// Sort object keys, not values
- result[key]=keysSorter(value);}else{result[key]=value;}return result;},Object.create(null));}exports.extract=extract;exports.parse=parse;exports.stringify=function(object,options){if(!object){return'';}options=Object.assign({encode:true,strict:true,arrayFormat:'none',arrayFormatSeparator:','},options);validateArrayFormatSeparator(options.arrayFormatSeparator);var shouldFilter=function shouldFilter(key){return options.skipNull&&isNullOrUndefined(object[key])||options.skipEmptyString&&object[key]==='';};var formatter=encoderForArrayFormat(options);var objectCopy={};for(var _i3=0,_Object$keys3=Object.keys(object);_i3<_Object$keys3.length;_i3++){var key=_Object$keys3[_i3];if(!shouldFilter(key)){objectCopy[key]=object[key];}}var keys=Object.keys(objectCopy);if(options.sort!==false){keys.sort(options.sort);}return keys.map(function(key){var value=object[key];if(value===undefined){return'';}if(value===null){return encode(key,options);}if(Array.isArray(value)){if(value.length===0&&options.arrayFormat==='bracket-separator'){return encode(key,options)+'[]';}return value.reduce(formatter(key),[]).join('&');}return encode(key,options)+'='+encode(value,options);}).filter(function(x){return x.length>0;}).join('&');};exports.parseUrl=function(url,options){options=Object.assign({decode:true},options);var _splitOnFirst$3=splitOnFirst$1(url,'#'),_splitOnFirst$4=_slicedToArray(_splitOnFirst$3,2),url_=_splitOnFirst$4[0],hash=_splitOnFirst$4[1];return Object.assign({url:url_.split('?')[0]||'',query:parse(extract(url),options)},options&&options.parseFragmentIdentifier&&hash?{fragmentIdentifier:decode(hash,options)}:{});};exports.stringifyUrl=function(object,options){options=Object.assign(_defineProperty({encode:true,strict:true},encodeFragmentIdentifier,true),options);var url=removeHash(object.url).split('?')[0]||'';var queryFromUrl=exports.extract(object.url);var parsedQueryFromUrl=exports.parse(queryFromUrl,{sort:false});var query=Object.assign(parsedQueryFromUrl,object.query);var queryString=exports.stringify(query,options);if(queryString){queryString="?".concat(queryString);}var hash=getHash(object.url);if(object.fragmentIdentifier){hash="#".concat(options[encodeFragmentIdentifier]?encode(object.fragmentIdentifier,options):object.fragmentIdentifier);}return"".concat(url).concat(queryString).concat(hash);};exports.pick=function(input,filter,options){options=Object.assign(_defineProperty({parseFragmentIdentifier:true},encodeFragmentIdentifier,false),options);var _exports$parseUrl=exports.parseUrl(input,options),url=_exports$parseUrl.url,query=_exports$parseUrl.query,fragmentIdentifier=_exports$parseUrl.fragmentIdentifier;return exports.stringifyUrl({url:url,query:filterObject(query,filter),fragmentIdentifier:fragmentIdentifier},options);};exports.exclude=function(input,filter,options){var exclusionFilter=Array.isArray(filter)?function(key){return!filter.includes(key);}:function(key,value){return!filter(key,value);};return exports.pick(input,exclusionFilter,options);};})(queryString);var qs=queryString;var ColPopup=exports('C',defineComponent({name:'col-popup',props:{height:{type:String,default:'100%'},destroy:{type:Boolean,default:false},modelValue:{type:Boolean,default:false},position:{type:String,default:'bottom'}},data:function data(){return{popupShow:false,isDestroy:false};},watch:{modelValue:function modelValue(val){this.hashState();}},mounted:function mounted(){this.destroy&&(this.isDestroy=false);window.addEventListener('hashchange',this.onHash,false);},unmounted:function unmounted(){window.removeEventListener('hashchange',this.onHash,false);},methods:{onHash:function onHash(){this.$emit('update:modelValue',false);this.isDestroy=false;},onPopupClose:function onPopupClose(val){this.$emit('update:modelValue',val);this.hashState();},hashState:function hashState(){// 打开弹窗
- if(this.modelValue){this.isDestroy=false;var splitUrl=window.location.hash.slice(1).split('?');var query=qs.parse(splitUrl[1]);var times=0;for(var key in query){times++;}var origin=window.location.href;var url=times>0?'&cPop='+ +new Date():'?cPop='+ +new Date();history.pushState('','',"".concat(origin).concat(url));}else{var _splitUrl=window.location.hash.slice(1).split('?');var _query=qs.parse(_splitUrl[1]);if(_query.cPop){window.history.go(-1);}}if(this.$refs.protocolPopup){this.$refs.protocolPopup.scrollTop=0;}}},render:function render(){var _this=this;return createVNode(Popup,{"ref":"protocolPopup","show":this.modelValue,"transitionAppear":true,"position":this.position,"style":{height:this.height},"onClosed":function onClosed(){if(_this.destroy){_this.isDestroy=true;}}},{default:function _default(){return[_this.$slots.default&&!_this.isDestroy&&_this.$slots.default()];}});}}));var formTitle="_formTitle_opgdl_1";var required="_required_opgdl_18";var styles$3={formTitle:formTitle,"col-left":"_col-left_opgdl_8",required:required,"col-icon":"_col-icon_opgdl_23","col-field":"_col-field_opgdl_27"};var ColField=defineComponent({name:'col-field',props:{required:{type:Boolean,default:false},title:{type:String},border:{type:Boolean,default:true},iconName:{type:String}},render:function render(){var _this2=this;return createVNode(Row,{"class":styles$3['col-field']},{default:function _default(){return[createVNode(Col,{"span":24,"class":styles$3.formTitle},{default:function _default(){return[createVNode("div",{"class":styles$3['col-left']},[createVNode("div",{"class":styles$3['col-icon']},[_this2.$slots.icon?_this2.$slots.icon():_this2.iconName?createVNode(Icon,{"name":_this2.iconName,"size":"24"},null):null]),_this2.required?createVNode("i",{"class":styles$3.required},[createTextVNode("*")]):null,_this2.$slots.title?_this2.$slots.title():createVNode("div",{"class":styles$3.pdL},[_this2.title])]),createVNode("div",{"class":styles$3['col-right']},[_this2.$slots.right&&_this2.$slots.right()])];}}),createVNode(Col,{"span":24,"class":_this2.border?'van-hairline--bottom':null},{default:function _default(){return[_this2.$slots.default&&_this2.$slots.default()];}})];}});}});var styles$2={"col-field-group":"_col-field-group_1vk7j_1"};var ColFieldGroup=defineComponent({name:"ColFieldGroup",render:function render(){return createVNode("div",{"class":styles$2['col-field-group']},[this.$slots.default&&this.$slots.default()]);}});var userAuth="_userAuth_1jf99_1";var btnGroup="_btnGroup_1jf99_6";var styles$1={userAuth:userAuth,btnGroup:btnGroup};var UserAuth=exports('a',defineComponent({name:'UserAuth',props:{onSuccess:{// 实名成功
- type:Function,default:function _default(){}}},computed:{students:function students(){var _state$user$data;var students=((_state$user$data=state.user.data)===null||_state$user$data===void 0?void 0:_state$user$data.student)||{};return students;}},data:function data(){return{form:{id:state.user.data.id,certificateType:'IDENTITY',realName:'',idCardNo:''}};},mounted:function mounted(){this.form.realName=this.students.realName;this.form.idCardNo=this.students.idCardNo;},methods:{onSubmit:function onSubmit(){var _this3=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee(){return regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return request.post('/api-auth/user/update',{requestType:'form',data:_objectSpread({},_this3.form)});case 3:Toast('实名成功');state.user.data.student.realName=_this3.form.realName;state.user.data.student.idCardNo=_this3.form.idCardNo;setTimeout(function(){_this3.onSuccess();},500);_context.next=11;break;case 9:_context.prev=9;_context.t0=_context["catch"](0);case 11:case"end":return _context.stop();}}},_callee,null,[[0,9]]);}))();}},render:function render(){var _this4=this;return createVNode(Form,{"class":styles$1.userAuth,"onSubmit":this.onSubmit},{default:function _default(){return[createVNode(ColHeader,{"title":"实名认证"},null),createVNode(ColFieldGroup,{"style":{marginTop:'15px'}},{default:function _default(){return[createVNode(ColField,{"title":"姓名","required":true},{default:function _default(){return[createVNode(Field,{"name":"lessonName","maxlength":20,"modelValue":_this4.form.realName,"onUpdate:modelValue":function onUpdateModelValue($event){return _this4.form.realName=$event;},"placeholder":"请输入真实姓名","rules":[{required:true,message:'请输入真实姓名'}]},null)];}}),createVNode(ColField,{"title":"证件号码","required":true},{default:function _default(){return[createVNode(Field,{"name":"lessonSubjectName","modelValue":_this4.form.idCardNo,"onUpdate:modelValue":function onUpdateModelValue($event){return _this4.form.idCardNo=$event;},"rules":[{required:true,message:'请输入身份证号'},{pattern:/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:'请输入正确的身份证号'}],"placeholder":"请输入身份证号"},null)];}})];}}),createVNode("div",{"class":['btnGroup']},[createVNode(Button,{"block":true,"round":true,"type":"primary","native-type":"submit"},{default:function _default(){return[createTextVNode("\u786E\u5B9A")];}})])];}});}}));var useCoupon="_useCoupon_dzp2v_1";var couponCount="_couponCount_dzp2v_5";var choiceCoupon="_choiceCoupon_dzp2v_14";var couponTitle="_couponTitle_dzp2v_20";var iconClose="_iconClose_dzp2v_32";var couponContent="_couponContent_dzp2v_39";var couponFooter="_couponFooter_dzp2v_46";var couponSelectText="_couponSelectText_dzp2v_53";var styles={useCoupon:useCoupon,couponCount:couponCount,choiceCoupon:choiceCoupon,couponTitle:couponTitle,iconClose:iconClose,couponContent:couponContent,couponFooter:couponFooter,couponSelectText:couponSelectText};var ChoiceCoupon=defineComponent({name:'choice-coupon',props:{orderAmount:{type:Number,default:0},useCoupon:{type:Array,default:function _default(){return[];}},couponCategory:{type:String,default:'UNIVERSAL'},couponList:{type:Array,default:function _default(){return[];}}},emits:['close','submit'],data:function data(){return{list:[],// consumeAmount: 0 // 消耗金额
- dataLoading:false};},computed:{// 使用优惠券的数量
- useLength:function useLength(){return this.list.filter(function(list){return list.checked;}).length||0;}},mounted:function mounted(){var _this5=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee2(){var canUsable,canUsed;return regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:// this.getList()
- // 处理显示已选择的优惠券
- // 处理可用优惠券是否支付使用
- _this5.couponList.forEach(function(item){_this5.useCoupon.forEach(function(coupon){if(item.couponCodeId===coupon.couponCodeId){item.checked=true;}});});canUsable=_this5.couponList.filter(function(list){return!list.disabled;});canUsed=_this5.couponList.filter(function(list){return list.disabled;});_this5.list=[].concat(_toConsumableArray(canUsable),_toConsumableArray(canUsed));_this5.calcCoupon();case 5:case"end":return _context2.stop();}}},_callee2);}))();},methods:{// async getList() {
- // if (this.dataLoading) return
- // this.dataLoading = true
- // try {
- // const res = await request.post(`${state.platformApi}/couponInfo/page`, {
- // data: {
- // couponCategory: this.couponCategory,
- // couponType: 'FULL_DISCOUNT',
- // useState: 'USABLE',
- // page: 1,
- // rows: 100
- // }
- // })
- // this.dataLoading = false
- // const result = res.data || {}
- // // 处理重复请求数据
- // if (this.list.length > 0 && result.pageNo === 1) return
- // this.list = result.rows || []
- // // 处理可用优惠券是否支付使用
- // this.list.forEach((item: any) => {
- // item.checked = false
- // // 如果使用金额大于订单金额则优惠券不可用
- // if (item.useLimit > this.orderAmount) {
- // item.disabled = true
- // } else {
- // item.disabled = false
- // }
- // // 处理显示已选择的优惠券
- // this.useCoupon.forEach((coupon: any) => {
- // if (item.couponIssueId === coupon.couponIssueId) {
- // item.checked = true
- // }
- // })
- // })
- // // 初始化排序
- // const canUsable = this.list.filter((list: any) => !list.disabled)
- // const canUsed = this.list.filter((list: any) => list.disabled)
- // this.list = [...canUsable, ...canUsed]
- // this.calcCoupon()
- // } catch {
- // //
- // }
- // },
- onSubmit:function onSubmit(){// 返回选中的优惠券
- this.$emit('submit',this.list.filter(function(list){return list.checked;}));this.list.forEach(function(item){item.checked=false;});},onSelect:function onSelect(item){item.checked=!item.checked;this.calcCoupon();},calcCoupon:function calcCoupon(){// 计算优惠券
- // 已使用的优惠券
- var useList=this.list.filter(function(list){return list.checked;});var limitCount=useList.map(function(list){return Number(list.fullAmount||0);});var usePrice=limitCount.length>0?limitCount.reduce(function(sum,list){return sum+list;}):0;// 使用优惠券后,可判断的金额
- var useLastAmount=this.orderAmount-usePrice;// 判断使用优惠券之后还有没有其它优惠券可用
- this.list.forEach(function(item){if(Number(item.fullAmount)>useLastAmount&&!item.checked){item.disabled=true;}else{item.disabled=false;}});}},render:function render(){var _this6=this;return createVNode("div",{"class":styles.choiceCoupon},[createVNode("div",{"class":styles.couponTitle},[createVNode("span",null,[createTextVNode("\u4F18\u60E0\u5238")]),createVNode("i",{"class":styles.iconClose,"onClick":function onClick(){return _this6.$emit('close');}},null)]),createVNode("div",{"class":styles.couponContent},[!this.dataLoading?createVNode(Fragment,null,[this.list.length>0?createVNode(Fragment,null,[this.list.map(function(item){return createVNode(Item,{"item":item,"isSelect":true,"onClick":_this6.onSelect},null);})]):createVNode(ColResult,{"btnStatus":false,"tips":"暂无优惠券","classImgSize":"SMALL"},null)]):createVNode(Loading,{"size":48,"color":"#01C1B5","vertical":true,"style":{height:'100%',justifyContent:'center'}},{default:function _default(){return[createTextVNode("\u52A0\u8F7D\u4E2D...")];}})]),createVNode("div",{"class":[styles.couponFooter,'van-hairline--top']},[createVNode("div",{"class":styles.couponSelectText},[createTextVNode("\u5DF2\u9009"),createVNode("span",null,[this.useLength]),createTextVNode("\u5F20")]),createVNode(Button,{"type":"primary","round":true,"style":{minWidth:'105px',fontSize:'16px'},"onClick":this.onSubmit},{default:function _default(){return[createTextVNode("\u786E\u5B9A")];}})])]);}});var UseCoupons=exports('U',defineComponent({name:'use-conpon',props:{disabled:{type:Boolean,default:false},orderAmount:{type:Number,default:0},orderType:{type:String,default:''},discountPrice:{// 优惠券使用金额
- type:Number,default:0},useSystem:{type:String,default:'MEC'},typeDetail:{type:String,default:''}},emits:['couponSelect'],data:function data(){return{popupStatus:false,popupLoading:false,useCouponList:[],useCouponLoading:false,useCouponCount:0,dataLoading:false,list:[]};},computed:{couponCount:function couponCount(){var limitCount=this.useCouponList.map(function(list){return Number(list.faceValue||0);});var count=0;if(this.disabled){count=this.discountPrice;}else{count=limitCount.length>0?limitCount.reduce(function(sum,list){return sum+list;}):0;}return count;}},mounted:function mounted(){this.getList();},methods:{getList:function getList(){var _this7=this;return _asyncToGenerator(/*#__PURE__*/regeneratorRuntime.mark(function _callee3(){var res,result,count;return regeneratorRuntime.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:console.log(_this7.orderAmount);if(!_this7.dataLoading){_context3.next=3;break;}return _context3.abrupt("return");case 3:_this7.dataLoading=true;_context3.prev=4;_context3.next=7;return request.get("".concat(state.platformApi,"/sysCouponCode/queryPage"),{params:{useSystem:_this7.useSystem,typeDetail:_this7.typeDetail,usageStatus:0,page:1,rows:100}});case 7:res=_context3.sent;_this7.dataLoading=false;result=res.data||{};// 处理重复请求数据
- if(!(_this7.list.length>0&&result.pageNo===1)){_context3.next=12;break;}return _context3.abrupt("return");case 12:_this7.list=result.rows||[];// 处理可用优惠券是否支付使用
- _this7.list.forEach(function(item){item.checked=false;// 如果使用金额大于订单金额则优惠券不可用
- if(item.fullAmount>_this7.orderAmount){item.disabled=true;}else{item.disabled=false;}});count=0;_this7.list.forEach(function(item){if(!item.disabled){count++;}});console.log(_this7.list,'list');_this7.useCouponCount=count;_context3.next=22;break;case 20:_context3.prev=20;_context3.t0=_context3["catch"](4);case 22:case"end":return _context3.stop();}}},_callee3,null,[[4,20]]);}))();},// async getUseableCoupon() {
- // try {
- // this.useCouponLoading = true
- // // 判断是哪个端
- // const url =
- // state.platformType === 'STUDENT' ? '/api-student' : '/api-teacher'
- // const res = await request.get(`${url}/couponInfo/statInfo`)
- // this.useCouponLoading = false
- // const result = (res.data || []).find(
- // result => result.useState === 'USABLE'
- // )
- // this.useCouponCount = result.total || 0
- // } catch {
- // // TODO: handle
- // }
- // },
- onSubmit:function onSubmit(item){// useCouponList
- this.useCouponList=item;this.$emit('couponSelect',item);this.popupStatus=false;this.popupLoading=false;}},render:function render(){var _this8=this;return createVNode(Fragment,null,[createVNode(Cell,{"title":"优惠券","class":styles.useCoupon,"style":{borderRadius:'8px'},"isLink":!this.disabled,"clickable":false,"onClick":function onClick(){if(_this8.disabled)return;_this8.popupStatus=true;_this8.popupLoading=true;}},{value:function value(){return!_this8.useCouponLoading&&createVNode(Fragment,null,[_this8.couponCount>0?createVNode("span",{"class":styles.couponCount},[createVNode("i",null,[createTextVNode("-\uFFE5")]),_this8.couponCount]):createVNode(Fragment,null,[_this8.useCouponCount>0?"".concat(_this8.useCouponCount,"\u5F20\u53EF\u4F7F\u7528"):'暂无可使用优惠券'])]);}}),createVNode(Popup,{"show":this.popupStatus,"onUpdate:show":function onUpdateShow($event){return _this8.popupStatus=$event;},"position":"bottom","round":true,"safeAreaInsetBottom":true,"style":{height:'75%'},"onClosed":function onClosed(){_this8.popupLoading=false;}},{default:function _default(){return[_this8.popupLoading&&createVNode(ChoiceCoupon,{"useCoupon":_this8.useCouponList,"orderAmount":_this8.orderAmount,"couponList":_this8.list,"onClose":function onClose(){return _this8.popupStatus=false;},"onSubmit":function onSubmit(item){return _this8.onSubmit(item);}},null)];}})]);}}));}};});})();
|