order.min.js 1.2 KB

1
  1. window.dx={},function(){var r=String.prototype.toString;Array.isArray||(Array.isArray=function(d){return"[object Array]"===r.call(d)})}(),dx,window,function(dx,window){dx.flow={init:function(){dx.user.productName="今日头条定向流量9元10G月包",dx.user.productPrice="9.00元",dx.user.productId="8434545",dx.funs.postInit(),dx.flow.bindEvent()},bindEvent:function(){$("#btn-order").unbind("click").on("click",function(){dx.handler.openCap=function(r){dx.flow.order(r.SERVICE_ID,r.RSP.DATA[0].TOKEN)},dx.funs.openCap(dx.query.phone||dx.user.phone,dx.user.cpid,"1")})},order:function(usermob,token){dx.user.order="1",dx.handler.order=function(data){var resCode=eval(data.resultCode);switch(resCode){case 0:dx.utils.showToast("订购成功!"),dx.user.order=0;break;case 11:dx.utils.showToast("该号码归属省分2/3G暂未开通此产品!");break;case 6611:dx.utils.showToast("订购失败,请重试!"),dx.user.order=0;break;case 6615:dx.utils.showToast("订购失败,请确定用户套餐!"),dx.user.order=0;break;case 6622:dx.utils.showToast("用户已订购过此产品!"),dx.user.order=0;break;case 7777:break;default:dx.utils.showToast(msg.errorInfo),dx.user.order=0}},dx.funs.order(usermob,token)}},dx.flow.init()}(dx,window);