Files
peko-h5/view/peko/modules/myincome/static/js/11.f8ecccc4eb9cb0200cba.js
2022-09-27 15:34:30 +08:00

2 lines
3.8 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],{"3IW4":function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var a=e("+EAh"),i=e("X2Oc"),n=e("Fd2+"),r=e("KTi7"),o=e("hff3"),c=e("QLzJ"),d=e("Z4iZ"),u={data:function(){return{number:"",crystal:0,diamonds:0,purse:{},info:{},showKeyboard:!1,password:"",hasPaymentPwd:!1}},components:{navigation:o.a},created:function(){document.title="水晶兑换钻石",this.getInfo(),this.getPurse(),i.a.initNav({type:4,data:{msg:"",link:"",title:"",showUrl:"",imgUrl:"",desc:""}})},methods:{back:function(){this.$router.go(-1)},sure:function(){if(this.hasPaymentPwd)return this.number<=0?this.$toast("兑换数量不可为0"):void(this.showKeyboard=!0);Object(n.b)("未设置支付密码,请前往我的-设置支付密码")},exchange:function(){var t=this;n.b.loading({message:"加载中...",forbidClick:!0});var s="";s=Object(d.b)().app?Object(r.a)(this.password,"1ea53d260ecf11e7b56e00163e046a26"):Object(c.a)(this.password+"");var e={uid:window.sessionStorage.getItem("uid"),changeNum:this.number,paymentPwd:s,changeType:1};Object(a.d)(e).then(function(s){null!=s.data.data?(n.b.clear,Object(n.b)("兑换成功"),t.getPurse()):(n.b.clear,Object(n.b)(s.data.message),t.$message.error(s.data.message))})},getPurse:function(){var t=this;Object(a.q)({uid:window.sessionStorage.getItem("uid")||info.uid}).then(function(s){null!=s.data?(t.purse=s.data.data,t.hasPaymentPwd=s.data.data.hasPaymentPwd,window.console.log(t.purse)):t.$message.error(s.data.message)})},getInfo:function(){this.info.uid=i.a.tools.nativeUtils.getUid(),this.info.ticket=i.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.crystals))])]),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,gutter:"15"},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("ujUd")}})])},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("qUg1")},"data-v-6dff4946",null);s.default=h.exports},qUg1:function(t,s){}});
//# sourceMappingURL=11.f8ecccc4eb9cb0200cba.js.map