从手机群解绑账号
$we.biz.use("unbind_account_from_mobile_group",{ sdid: '3151061966' });
/** * 声明processes * @type {Array} * 每个item包含 * @param {string} name 流程名称 * @param {string} widget widget名称 * @param {object} params widget需要的参数 */ var processes = [{ name: "确认解绑", widget: "unbind_account_from_mobile_group.confirm", beforeAction: function() { return $we.process.getData("is_last_account"); } }, { widget: "unbind_account_from_mobile_group.start", beforeAction: function() { if ($we.process.getData("is_mobile_acc")) { this.params.tips = "解绑手机后,该账号将不能使用手机号码"+$we.process.getData("group")+"作为账号名登录,同时失去G家提供的安全服务,请谨慎操作"; } return true; } }, { name: "验证账号信息", widget: "bind_mobile", params: { verifyName: "group" }, beforeAction: function() { this.params.tips = '账号 '+$we.process.getData("display_name")+' 将与手机号码'+$we.process.getData("group")+'解除绑定'; this.params.extraData = {sdid: $we.process.getData("sdid")}; return true; } }, { widget: "set_login_name", params: { title: "", btmTips: "" }, beforeAction: function() { if (!$we.process.getData("need_alias")) { return false; } else { this.params.tips = "解绑手机后,将不能再使用手机号码"+$we.process.getData("group")+"作为账号名登录,请设置新的登录名"; return true; } } }, { name: "解绑成功", widget: "process.end", params: { title: "解绑手机成功!", content: function() { if ($we.process.getData("is_mobile_acc")) return "现在您可以用新的账号名 "+$we.process.getData("alias")+" 登录了"; else return ""; }, success: function() {} } }]; /** * 业务流组件的配置 * @type {Object} */ var pConfig = { flow: "unbindAccount", title: "解绑账号" }; $we.process.setData("sdid", "3151061968"); $we.process.setData("group", "136****93"); $we.process.setData("is_mobile_acc", 1); $we.process.setData("is_last_account", false); $we.process.setData("display_name", "yq**02"); $we.process.setData("alias", "yq**02"); // 实际应该夔叔返回 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("tmp_bind_account", "yqtt02"); this.notify("goNext"); } } }); var abc = $we.widget.add("process.ui", [{ name: "开始", widget: "AA" }, { name: "结束", widget: "unbind_account_from_mobile_group.end", params: { success: function() {alert(1)} } }], { title:"绑定账号", prev:false }); $we.process.setData("group", "136****93"); /** * 业务流组件的start接口 */ abc.start();