船员公众号
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
3.7 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/question/buyTwo"],{"0b33":function(e,t,n){"use strict";var a=n("71c5"),i=n.n(a);i.a},"1ff1":function(e,t,n){"use strict";n.r(t);var a=n("d0bf"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=i.a},"71c5":function(e,t,n){},"7bfa":function(e,t,n){"use strict";n.r(t);var a=n("da5d"),i=n("1ff1");for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n("0b33");var r=n("828b"),c=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"3da310a6",null,!1,a["a"],void 0);t["default"]=c.exports},aee2:function(e,t,n){"use strict";(function(e,t){var a=n("47a9");n("482e");a(n("3240"));var i=a(n("7bfa"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},d0bf:function(e,t,n){"use strict";(function(e,a){var i=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=i(n("7eb4")),r=i(n("ee10")),c={data:function(){return{tabIndex:0,range:["微信支付","余额支付"],info:{},userInfo:{},isClick:!0}},onReady:function(){this.info=e.getStorageSync("teamInfo"),this.userInfo=e.getStorageSync("userInfo")},methods:{toSubmit:function(){var t=this;return(0,r.default)(o.default.mark((function n(){var a,i,r,c,u;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(-1!=t.tabIndex){n.next=3;break}return e.showToast({icon:"none",title:"请选择支付方式"}),n.abrupt("return");case 3:if(1==t.tabIndex&&(1==t.info.type?t.info.price:2==t.info.type?t.info.children[t.info.idx].price:t.info.children[t.info.idx1].price),0!=t.isClick){n.next=6;break}return n.abrupt("return");case 6:return t.isClick=!1,a=1==t.info.type?t.info.id:2==t.info.type?t.info.children[t.info.idx].id:t.info.children[t.info.idx1].id,console.log(a,t.info),n.next=11,t.$api.createOrder({category_id:a});case 11:i=n.sent,r=i.code,c=i.data,u=i.msg,200==r?(t.isClick=!0,t.toPay(c.order_sn)):(t.isClick=!0,e.showToast({icon:"none",title:u}));case 16:case"end":return n.stop()}}),n)})))()},toPay:function(t){var n=this;return(0,r.default)(o.default.mark((function i(){var r,c,u,s;return o.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,n.$api.payOrder({is_balance:1==n.tabIndex?1:"",order_sn:t});case 2:r=i.sent,c=r.code,u=r.data,s=r.msg,200==c?1==u.is_pay?(e.removeStorageSync("teamInfo"),a.redirectTo({url:"/pages/question/buyThree"})):e.requestPayment({provider:"wxpay",timeStamp:u.pay_data.timeStamp,nonceStr:u.pay_data.nonceStr,package:u.pay_data.package,signType:u.pay_data.signType,paySign:u.pay_data.paySign,success:function(t){e.removeStorageSync("teamInfo"),e.redirectTo({url:"/pages/question/buyThree"})},fail:function(t){e.showToast({icon:"none",title:"支付失败"}),e.removeStorageSync("teamInfo"),setTimeout((function(){e.redirectTo({url:"/pages/question/list"})}),2e3)}}):e.showToast({icon:"none",title:s});case 7:case"end":return i.stop()}}),i)})))()},bindPickerChange:function(e){this.tabIndex=e},openPage:function(){e.navigateTo({url:"/pages/question/buyThree"})}}};t.default=c}).call(this,n("df3c")["default"],n("3223")["default"])},da5d:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var a=function(){var e=this,t=e.$createElement,n=(e._self._c,0==e.tabIndex?e.staticUrl("/static/icon-select-on.png"):null),a=0!=e.tabIndex?e.staticUrl("/static/icon-select.png"):null,i=1==e.tabIndex?e.staticUrl("/static/icon-select-on.png"):null,o=1!=e.tabIndex?e.staticUrl("/static/icon-select.png"):null;e.$mp.data=Object.assign({},{$root:{m0:n,m1:a,m2:i,m3:o}})},i=[]}},[["aee2","common/runtime","common/vendor"]]]);