绑定账号到手机群
$we.biz.use("bind_account_to_mobile_group",{ // group: '136****093', // captcha_key: '1234567890123456', // group_check_bind_account: {errno:1, msg:"这个手机已经绑定了超过20个账号啦,不能再绑了!", data:''}, // safety_verify: 0 // 是否绑定安全卡 });
/** * 声明processes * @type {Array} * 每个item包含 * @param {string} name 流程名称 * @param {string} widget widget名称 * @param {object} params widget需要的参数 */ var processes = [{ name: "验证账号信息", widget: "bind_account_to_mobile_group", beforeAction: function() { var data = $we.process.getData("group_check_bind_account"); if (data && data.errno) { $we.widget.add("bind_account_to_mobile_group.limit").open(); this.notify("abort"); return false; } else { return true; } } },{ widget: "modify_password", hidden: true, beforeAction: function() { return !$we.process.getData("safety_verify") && $we.process.getData("need_pwd"); } },{ widget: "bind_mobile", params: { verifyName: "phone" }, beforeAction: function() { this.params.tips = "更换账号" +$we.process.getData("alias")+'的手机
'+$we.process.getData("phone")+'
为
'+$we.process.getData("group")+'
'; return $we.process.getData("change_mobile"); } },{ name: "安全验证", widget: "safety_verification", beforeAction: function() { this.params.tips_ecard = '账号'+$we.process.getData("alias")+'已经绑定了安全卡,为了确保账号不被他人恶意绑定,请验证安全卡'; this.params.tips_ekey = '账号'+$we.process.getData("alias")+'已经绑定了密宝,为了确保账号不被他人恶意绑定,请验证密宝'; return $we.process.getData("safety_verify"); } },{ name: '绑定成功', widget: "bind_account_to_mobile_group.end", params: { success: function() {} } }]; /** * 业务流组件的配置 * @type {Object} */ var pConfig = { flow: "bindAccount", title: "绑定账号" }; $we.process.setData("need_pwd", true); $we.process.setData("safety_verify", 0); $we.process.setData("group", '136****093'); // $we.process.setData("binded_mobile", {isTrue:true, msg:'该账号已经绑定其他手机
139****8988
,是否确认更换手机为
136****9963
确认点击下一步,否则点击取消放弃绑定.'}); $we.process.setData("group_check_bind_account", {errno:0, msg:"这个手机已经绑定了超过20个账号啦,不能再绑了!", data:''}); var pro = $we.widget.add("process.ui", processes, pConfig); /** * 业务流组件的start接口 */ pro.start();
var _html = [ '
', '
$name$
', '
'].join(""); $we.widget.reg("AA", { interfaces: { render: function() { this.append(this.el, _html, { name: "AA", }); }, }, init: function(el) { this.el = el; }, process: { start: function() { this.render(); }, end: function() { $(this.node.root).remove(); }, checkSucc: function() { $we.process.setData("alias", "yqtt02"); this.notify("goNext"); } } }); var abc = $we.widget.add("process.ui", [{ name: "开始", widget: "AA" }, { name: "结束", widget: "bind_account_to_mobile_group.end", params: { success: function() {alert(1)} } }], { title:"绑定账号", prev:false }); $we.process.setData("group", "136****93"); /** * 业务流组件的start接口 */ abc.start();