You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.7 KiB
1 lines
4.7 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/chongzhi"],{3118:function(n,t,e){"use strict";e.r(t);var o=e("8d62"),i=e("4406");for(var u in i)"default"!==u&&function(n){e.d(t,n,(function(){return i[n]}))}(u);e("3b54");var a,s=e("f0c5"),r=Object(s["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=r.exports},"3b54":function(n,t,e){"use strict";var o=e("4aa4"),i=e.n(o);i.a},4406:function(n,t,e){"use strict";e.r(t);var o=e("902d"),i=e.n(o);for(var u in o)"default"!==u&&function(n){e.d(t,n,(function(){return o[n]}))}(u);t["default"]=i.a},"4aa4":function(n,t,e){},"8d62":function(n,t,e){"use strict";e.d(t,"b",(function(){return i})),e.d(t,"c",(function(){return u})),e.d(t,"a",(function(){return o}));var o={uniPopup:function(){return e.e("components/uni-popup/uni-popup").then(e.bind(null,"a728"))}},i=function(){var n=this,t=n.$createElement,e=(n._self._c,Number(n.inputAmount)),o=Number(n.gitmoney);n._isMounted||(n.e0=function(t){n.paytype="wxpay"}),n.$mp.data=Object.assign({},{$root:{m0:e,m1:o}})},u=[]},"902d":function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(e("a34a"));function i(n){return n&&n.__esModule?n:{default:n}}function u(n,t,e,o,i,u,a){try{var s=n[u](a),r=s.value}catch(c){return void e(c)}s.done?t(r):Promise.resolve(r).then(o,i)}function a(n){return function(){var t=this,e=arguments;return new Promise((function(o,i){var a=n.apply(t,e);function s(n){u(a,o,i,s,r,"next",n)}function r(n){u(a,o,i,s,r,"throw",n)}s(void 0)}))}}var s=function(){e.e("components/uni-popup/uni-popup").then(function(){return resolve(e("a728"))}.bind(null,e)).catch(e.oe)},r={components:{uniPopup:s},data:function(){return{maskclose:!1,custom:!0,inputAmount:"",amountList:[10,50,100],giftamountList:[],paytype:"wxpay",yue:0,seleteindex:-1,gitmoney:"0",timerId:null,lessmoney:1,lessdesc:"不低于1元",userinfo:[]}},onLoad:function(n){},onShow:function(){var t=n.getStorageSync("userinfo");this.getbaseinfo("defaultmoney"),this.getbaseinfo("lessczje"),this.getuserinfo(t.uid)},methods:{getuserinfo:function(n){var t=this;return a(o.default.mark((function e(){var i;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.userinfo({action:"userinfo",uid:n});case 2:i=e.sent,t.yue=i.data.yue,t.userinfo=i.data;case 5:case"end":return e.stop()}}),e)})))()},getbaseinfo:function(n){var t=this;return a(o.default.mark((function e(){var i;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.baseinfo({action:"baseinfo",key:n});case 2:i=e.sent,""!=i.data.info&&("defaultmoney"==n?t.amountList=i.data.info:"lessczje"==n&&(t.lessdesc="不低于"+i.data.info+"元",t.lessmoney=parseFloat(i.data.info)));case 4:case"end":return e.stop()}}),e)})))()},wxpay:function(t,e,i){var u=this;return a(o.default.mark((function a(){var s;return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,u.$api.czwxpay({action:"czwxpay",openid:e,addmoney:t,uid:i});case 2:s=o.sent,console.log(s,"返回"),u,n.requestPayment({provider:"wxpay",timeStamp:s.data.timeStamp,nonceStr:s.data.nonceStr,package:s.data.package,signType:"MD5",paySign:s.data.paySign,success:function(t){n.showToast({title:"充值成功"}),setTimeout((function(t){n.reLaunch({url:"/pages/user/user"})}),1e3)},fail:function(t){n.showToast({title:"支付失败"+s.msg,icon:"fail"})}});case 6:case"end":return o.stop()}}),a)})))()},select:function(n,t){this.inputAmount=n,this.seleteindex=t},inputamountchange:function(n){console.log(n.target.value,"输入")},doDeposit:function(){var t=n.getStorageSync("userinfo");if(""==t.openid||null==t.openid)n.navigateTo({url:"/pages/user/login"});else{if(console.log(this.lessmoney,"最低金额"),this.inputAmount<this.lessmoney)return void n.showToast({title:"充值金额不低于"+this.lessmoney+"元",icon:"none"});if("NaN"==parseFloat(this.inputAmount).toString())return void n.showToast({title:"请输入正确金额",icon:"none"});if(parseFloat(this.inputAmount).toFixed(2)!=parseFloat(this.inputAmount))return void n.showToast({title:"最多只能输入两位小数哦~",icon:"none"});this.$refs.popup.open()}},doclose:function(){this.btstatus=!1,this.$refs.popup.close()},doaddmoney:function(){var t=this.inputAmount,e=this.gitmoney,o=n.getStorageSync("userinfo");this.wxpay(t,o.openid,o.uid),console.log(e+"--"+this.inputAmount,"金额")},totx:function(){n.navigateTo({url:"/pages/user/tixian"})}}};t.default=r}).call(this,e("543d")["default"])},f9dc:function(n,t,e){"use strict";(function(n){e("8d0c");o(e("66fd"));var t=o(e("3118"));function o(n){return n&&n.__esModule?n:{default:n}}wx.__webpack_require_UNI_MP_PLUGIN__=e,n(t.default)}).call(this,e("543d")["createPage"])}},[["f9dc","common/runtime","common/vendor"]]]);
|