Files
peko-h5/view/peko/modules/myincome/static/js/11.5d316356ba01de644f13.js
2024-03-20 21:15:55 +08:00

2 lines
3.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

webpackJsonp([11],{Mdy7:function(t,s){},RpvA:function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=e("hff3"),i=e("+EAh"),n=e("X2Oc"),r=e("Fd2+"),o=e("KTi7"),c=e("QLzJ"),d=e("Z4iZ"),u={data:function(){return{number:"",gold:0,purse:{},info:{},showKeyboard:!1,password:""}},components:{navigation:a.a},created:function(){document.title="金幣兌換鉆石",this.getInfo(),this.getPurse(),n.a.initNav({type:4,data:{msg:"",link:"",title:"",showUrl:"",imgUrl:"",desc:""}})},methods:{back:function(){this.$router.go(-1)},sure:function(){if(this.number<=0)return this.$toast("兌換數量不可為0");this.showKeyboard=!0},exchange:function(){var t=this;r.b.loading({message:"加載中...",forbidClick:!0});var s="";s=Object(d.b)().app?Object(o.a)(this.password,"1ea53d260ecf11e7b56e00163e046a26"):Object(c.a)(this.password+"");var e={uid:window.sessionStorage.getItem("uid"),changeNum:this.number,paymentPwd:s,changeType:2};Object(i.d)(e).then(function(s){null!=s.data.data?(r.b.clear,Object(r.b)("兌換成功"),t.getPurse()):(r.b.clear,Object(r.b)(s.data.message),t.$message.error(s.data.message))})},getPurse:function(){var t=this;Object(i.q)({uid:window.sessionStorage.getItem("uid")}).then(function(s){null!=s.data?(t.purse=s.data.data,window.console.log(t.purse)):t.$message.error(s.data.message)})},getInfo:function(){this.info.uid=n.a.tools.nativeUtils.getUid(),this.info.ticket=n.a.tools.nativeUtils.getTicket()},onInput:function(t){this.password=(this.password+t).slice(0,6),6==this.password.length&&(this.showKeyboard=!1,this.exchange(),this.password="")},onDelete:function(){this.password=this.password.slice(0,this.password.length-1)}}},l={render:function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"box-all"},[this.$store.state.isApp?t._e():e("navigation",{attrs:{title:"金幣兌換鉆石",rightTitle:""}}),t._v(" "),e("div",{staticClass:"crystal-father"},[t._m(0),t._v(" "),e("span",{staticClass:"crystal-text"},[t._v("余額:")]),t._v(" "),e("span",{staticClass:"crystal-number"},[t._v(t._s(t.purse.golds))])]),t._v(" "),e("div",{staticClass:"input-number"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.number,expression:"number"}],staticClass:"number",attrs:{placeholder:"請輸入兌換的金幣數量"},domProps:{value:t.number},on:{input:function(s){s.target.composing||(t.number=s.target.value)}}})]),t._v(" "),e("div",{staticClass:"diamond"},[t._m(1),t._v(" "),e("span",{staticClass:"crystal-text"},[t._v("余額:")]),t._v(" "),e("span",{staticClass:"crystal-number"},[t._v(t._s(t.purse.diamonds))])]),t._v(" "),e("div",{staticClass:"sure",on:{click:t.sure}},[t._v("確認兌換")]),t._v(" "),e("div",{staticClass:"bottom-text"},[t._v("金幣可兌換鉆石兌換比率1金幣=1鉆石金幣數量必須為10的整數倍。")]),t._v(" "),e("van-password-input",{directives:[{name:"show",rawName:"v-show",value:t.showKeyboard,expression:"showKeyboard"}],staticClass:"passwrod-input",attrs:{value:t.password,focused:t.showKeyboard},on:{focus:function(s){t.showKeyboard=!0}}}),t._v(" "),e("van-number-keyboard",{attrs:{show:t.showKeyboard},on:{blur:function(s){t.showKeyboard=!1},input:t.onInput,delete:t.onDelete}})],1)},staticRenderFns:[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"crystal"},[s("img",{attrs:{src:e("Yxsz")}})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"crystal"},[s("img",{attrs:{src:e("QCm6")}})])}]};var h=e("VU/8")(u,l,!1,function(t){e("Mdy7")},"data-v-9cfce14a",null);s.default=h.exports}});
//# sourceMappingURL=11.5d316356ba01de644f13.js.map