Files
peko-h5/view/peko/modules/myincome/static/js/9.13c87d6f964112c86413.js

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([9],{"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("cAtB")},"data-v-b59c778a",null);s.default=h.exports},cAtB:function(t,s){}});
//# sourceMappingURL=9.13c87d6f964112c86413.js.map