| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-455a570e"],{"1dab":function(e,t,n){var o=n("1de2"),i=n("e4e4"),s=n("70d4"),c=s("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[c])?!!t:"RegExp"==i(e))}},3917:function(e,t,n){},"523b":function(e,t,n){e.exports=n.p+"img/icon_charge_title.f126a76f.png"},5816:function(e,t,n){var o=n("02ba"),i=n("0294"),s=n("82f7"),c=n("91ad"),a=n("3f48"),r=n("40ac").f,h=n("6876").f,l=n("1dab"),d=n("0bdd"),u=n("6115"),f=n("7e31"),p=n("d03a"),g=n("bde6"),v=n("6cc4"),m=n("38e1").enforce,S=n("8d0d"),_=n("70d4"),I=n("acc8"),C=n("509f"),y=_("match"),P=i.RegExp,b=P.prototype,R=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,x=/a/g,T=/a/g,M=new P(x)!==x,w=f.UNSUPPORTED_Y,k=o&&(!M||w||I||C||g((function(){return T[y]=!1,P(x)!=x||P(T)==T||"/a/i"!=P(x,"i")}))),O=function(e){for(var t,n=e.length,o=0,i="",s=!1;o<=n;o++)t=e.charAt(o),"\\"!==t?s||"."!==t?("["===t?s=!0:"]"===t&&(s=!1),i+=t):i+="[\\s\\S]":i+=t+e.charAt(++o);return i},E=function(e){for(var t,n=e.length,o=0,i="",s=[],c={},a=!1,r=!1,h=0,l="";o<=n;o++){if(t=e.charAt(o),"\\"===t)t+=e.charAt(++o);else if("]"===t)a=!1;else if(!a)switch(!0){case"["===t:a=!0;break;case"("===t:R.test(e.slice(o+1))&&(o+=2,r=!0),i+=t,h++;continue;case">"===t&&r:if(""===l||v(c,l))throw new SyntaxError("Invalid capture group name");c[l]=!0,s.push([l,h]),r=!1,l="";continue}r?l+=t:i+=t}return[i,s]};if(s("RegExp",k)){for(var L=function(e,t){var n,o,i,s,r,h,f=this instanceof L,p=l(e),g=void 0===t,v=[],S=e;if(!f&&p&&g&&e.constructor===L)return e;if((p||e instanceof L)&&(e=e.source,g&&(t="flags"in S?S.flags:u.call(S))),e=void 0===e?"":d(e),t=void 0===t?"":d(t),S=e,I&&"dotAll"in x&&(o=!!t&&t.indexOf("s")>-1,o&&(t=t.replace(/s/g,""))),n=t,w&&"sticky"in x&&(i=!!t&&t.indexOf("y")>-1,i&&(t=t.replace(/y/g,""))),C&&(s=E(e),e=s[0],v=s[1]),r=c(P(e,t),f?this:b,L),(o||i||v.length)&&(h=m(r),o&&(h.dotAll=!0,h.raw=L(O(e),n)),i&&(h.sticky=!0),v.length&&(h.groups=v)),e!==S)try{a(r,"source",""===S?"(?:)":S)}catch(_){}return r},H=function(e){e in L||r(L,e,{configurable:!0,get:function(){return P[e]},set:function(t){P[e]=t}})},B=h(P),G=0;B.length>G;)H(B[G++]);b.constructor=L,L.prototype=b,p(i,"RegExp",L)}S("RegExp")},7888:function(e,t,n){"use strict";n("3917")},"91ad":function(e,t,n){var o=n("1de2"),i=n("9c8e");e.exports=function(e,t,n){var s,c;return i&&"function"==typeof(s=t.constructor)&&s!==n&&o(c=s.prototype)&&c!==n.prototype&&i(e,c),e}},dc65:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"mainPage"}},[o("div",{staticClass:"topBC"},[o("img",{attrs:{src:n("523b"),width:"55%",height:"25px"}}),o("div",{staticClass:"title"},[o("span",[e._v("用户充值")]),o("img",{attrs:{src:n("8b19"),width:"69px",height:"86px"}}),e._e()])]),o("div",{staticClass:"context"},[o("div",{staticClass:"area_search"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.phone,expression:"phone"}],staticClass:"phone",attrs:{type:"text",pattern:"[0-9]*",maxlength:"11",onchange:e.getUserList(),placeholder:"请输入手机号查询所属商家"},domProps:{value:e.phone},on:{input:function(t){t.target.composing||(e.phone=t.target.value)}}}),o("ul",{staticClass:"memberList"},e._l(e.userList,(function(t){return o("li",{on:{click:function(n){return e.selectUser(t)}}},[o("input",{attrs:{type:"checkbox"},domProps:{checked:t.ShopId==e.userSelect.ShopId}}),o("span",[e._v(e._s(t.ShopName.slice(5)))]),o("em",[e._v(e._s(t.UserName))])])})),0)]),o("div",{staticClass:"area_member"},[e._m(0),o("ul",{staticClass:"chargeOption"},e._l(e.RsMonth,(function(t){return o("li",{class:[{activeLi:e.monthSelect.PdId==t.PdId}],on:{click:function(n){return e.selectMonth(t)}}},[o("em",{staticClass:"month"},[e._v(e._s(t.EffectiveMonths)+"个月")]),o("div",{staticClass:"cash",class:[{cashActive:e.monthSelect.PdId==t.PdId}]},[e._v(" ¥"),o("em",{class:[{emActive:e.monthSelect.PdId==t.PdId}]},[e._v(e._s(t.Price/100))])]),o("div",{staticClass:"gift",class:[{giftActive:e.monthSelect.PdId==t.PdId}]},[t.GiftMonths>0?o("div",[e._v("赠送"+e._s(t.GiftMonths)+"个月")]):o("div",[e._v("无赠送")])])])})),0)]),o("div",{staticClass:"area_member"},[e._m(1),o("ul",{staticClass:"chargeOption"},e._l(e.RsHour,(function(t){return o("li",{class:[{activeLi:e.hourSelect.PdId==t.PdId}],on:{click:function(n){return e.selectHour(t)}}},[o("em",{staticClass:"month"},[e._v(e._s(t.NormalHour)+"课时")]),o("div",{staticClass:"cash",class:[{cashActive:e.hourSelect.PdId==t.PdId}]},[e._v(" ¥"),o("em",{class:[{emActive:e.hourSelect.PdId==t.PdId}]},[e._v(e._s(t.Price/100))])]),o("div",{staticClass:"gift",class:[{giftActive:e.hourSelect.PdId==t.PdId}]},[t.GiftHour>0?o("div",[e._v("赠送"+e._s(t.GiftHour)+"课时")]):o("div",[e._v("无赠送")])])])})),0)]),o("div",{staticClass:"area_account"},[o("div",{staticClass:"title"},[e._v("充值金额")]),o("div",{staticClass:"right_cash"},[e._v(" ¥"),o("em",{staticClass:"money"},[e._v(e._s(e.cashTotal))]),o("em",{staticClass:"memo"},[e._v(e._s(e.giftTips))])]),o("div",{staticClass:"button",on:{click:function(t){return e.doBought()}}},[e._v(" 充值 ")])])]),o("alert",{ref:"alertPart"})],1)},i=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"banner"},[n("span",[e._v("会籍")]),n("em",[e._v("请选择入会月数")])])},function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"banner_hour"},[n("span",[e._v("课时")]),n("em",[e._v("请选择课时数")])])}],s=(n("2bd2"),n("a717"),n("d7f0"),n("5816"),n("7d8f"),n("c505"),n("b8a1")),c=n("a8da"),a=n("2dc0"),r=n("b66f"),h=(n("64da"),n("21a7"),n("fed1")),l={data:function(){return{openId:"08133dHa14e8nE05zHGa1eMmOK333dH3",phone:"",phoneQuery:"",userList:[],userSelect:"",monthSelect:"",hourSelect:"",giftTips:"无赠送",cashTotal:"0",RsMonth:[],RsHour:[],RsMix:[]}},mounted:function(){this.checkCode()},destroyed:function(){},watch:{$route:function(e){"membershipCharge"==e.name&&this.checkCode()},active:function(){this.getList()}},methods:{onChange:function(e){console.log(e.format("YY-MM-DD"))},alertInfo:function(e){this.$refs.alertPart.openSimpleDialog(e)},confirmDay:function(e){console.log(globaltime2StringNoMin(e))},selectUser:function(e){e.ShopId==this.userSelect.ShopId?this.userSelect="":this.userSelect=e},selectMonth:function(e){e.PdId==this.monthSelect.PdId?this.monthSelect="":this.monthSelect=e,this.calcCash()},selectHour:function(e){e.PdId==this.hourSelect.PdId?this.hourSelect="":this.hourSelect=e,this.calcCash()},checkCode:function(){if(localStorage.openId)this.getOpenId(localStorage.openId),this.getChargeList();else if(123==this.getUrlKey("state")){var e=this.getUrlKey("code");this.getOpenId(e),this.getChargeList()}else this.getOpenCode()},getOpenCode:function(){console.log("获取公众号ID");var e=location.href,t=encodeURIComponent(e),n="snsapi_userinfo",o="wx36cb8b6661d71811",i="123",s="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+o+"&redirect_uri="+t+"&response_type=code&scope="+n+"&state="+i+"#wechat_redirect";self.location=s},getUrlKey:function(e){return decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.href)||[,""])[1].replace(/\+/g,"%20"))||null},getOpenId:function(e){var t=this,n=this,o={code:e},i=h.stringify(o);Object(s["i"])(i).then((function(e){var o=e;0==o.Code?(""!=o.OpenId?localStorage.openId=o.OpenId:localStorage.removeItem("openId"),""!=o.Phone?localStorage.phone=o.Phone:localStorage.removeItem("phone")):(localStorage.removeItem("phone"),localStorage.removeItem("openId")),null!=localStorage.phone&&(n.phone=localStorage.phone,t.getUserList())}))},getUserList:function(){var e=this;if(11==e.phone.toString().length){if(e.phoneQuery==e.phone)return;var t={phone:e.phone},n=h.stringify(t);Object(s["L"])(n).then((function(t){e.phoneQuery=e.phone;var n=t;e.userList=[],0==n.Code&&n.Rs&&(e.userList=n.Rs)}))}},calcCash:function(){this.cashTotal=0,this.monthSelect&&(this.cashTotal+=this.monthSelect.Price),this.hourSelect&&(this.cashTotal+=this.hourSelect.Price),this.cashTotal/=100,this.monthSelect.GiftMonths>0||this.hourSelect.GiftHour>0?(this.giftTips="含赠送",this.monthSelect.GiftMonths>0&&(this.giftTips+=this.monthSelect.GiftMonths+"个月"),this.monthSelect.GiftMonths>0&&this.hourSelect.GiftHour>0&&(this.giftTips+="+"),this.hourSelect.GiftHour>0&&(this.giftTips+=this.hourSelect.GiftHour+"课时")):this.giftTips="无赠送"},getChargeList:function(){var e=this,t=this,n={},o=h.stringify(n);Object(s["d"])(o).then((function(n){var o=n;0==o.Code?(o.RsClassHour.length>0&&(t.RsHour=o.RsClassHour),o.RsMonth.length>0&&(t.RsMonth=o.RsMonth),o.RsMix.length>0&&(t.RsMix=o.RsMix)):e.getChargeList()}))},doBought:function(){var e=this;if(e.userSelect)if(e.monthSelect||e.hourSelect){var t=[];e.monthSelect&&t.push(e.monthSelect.PdId),e.hourSelect&&t.push(e.hourSelect.PdId);var n={phone:e.phone,openId:e.openId,shopId:e.userSelect.ShopId,pdIdStr:t.toString(),amount:100*e.cashTotal},o=h.stringify(n);Object(s["m"])(o).then((function(t){var n=t;if(console.log(n),0==n.Code){var o=n.Rs;"undefined"===typeof WeixinJSBridge?document.addEventListener?document.addEventListener("WeixinJSBridgeReady",e.onBridgeReady(o),!1):document.attachEvent&&(document.attachEvent("WeixinJSBridgeReady",e.onBridgeReady(o)),document.attachEvent("onWeixinJSBridgeReady",e.onBridgeReady(o))):(console.log("准备调用微信支付"),e.onBridgeReady(o))}}))}else e.Toast("请选择充值选项");else e.Toast("请选择充值会员")},onBridgeReady:function(e){console.log("onBridgeReady");var t=this;WeixinJSBridge.invoke("getBrandWCPayRequest",{appId:e.AppId,timeStamp:e.TimeStamp,nonceStr:e.NonceStr,package:e.Package,signType:e.SignType,paySign:e.PaySign},(function(n){if("get_brand_wcpay_request:ok"==n.err_msg){var o=e.OutTradeNo;this.$router.push({path:"membershipChargeResult",query:{OutTradeNo:o}})}else t.Toast("支付失败")}))},onGoNewPage:function(e){this.$router.push({path:"/"+e})}},beforeDestroy:function(){},beforeRouteEnter:function(e,t,n){n((function(t){""==e.name&&t.getList()}))},components:{bottomTab:c["a"],alert:a["a"],DatePicker:r["default"]}},d=l,u=(n("7888"),n("cba8")),f=Object(u["a"])(d,o,i,!1,null,"29cd62ac",null);t["default"]=f.exports}}]);
- //# sourceMappingURL=chunk-455a570e.undefined.1670318567531.js.map
|