1 /** 2 * 绑定账号到手机群 3 * @type {Object} 4 */ 5 define( 6 "bind_account_to_mobile_group", 7 [ 8 "component/process_ui", 9 "business/bind_mobile", 10 "business/bind_account_to_mobile_group", 11 "business/safety_verification", 12 "business/modify_password" 13 ], 14 function() { 15 $we.process.config.bind_account_to_mobile_group = { 16 processes: [{ 17 name: "验证账号信息", 18 widget: "bind_account_to_mobile_group", 19 beforeAction: function() { 20 var data = $we.process.getData("group_check_bind_account"); 21 if (data && data.errno) { 22 $we.widget.add("bind_account_to_mobile_group.limit").open(); 23 this.notify("abort"); 24 return false; 25 } else { 26 return true; 27 } 28 } 29 },{ 30 widget: "bind_mobile", 31 params: { 32 verifyName: "phone" 33 }, 34 beforeAction: function() { 35 this.params.tips = "更换账号" +$we.process.getData("alias")+'的手机<span class="we_yellow">'+$we.process.getData("phone")+'</span>为<span class="we_yellow">'+$we.process.getData("group")+'</span>'; 36 return $we.process.getData("change_mobile"); 37 } 38 },{ 39 name: "安全验证", 40 widget: "safety_verification", 41 beforeAction: function() { 42 this.params.tips_ecard = '账号'+$we.process.getData("alias")+'已经绑定了安全卡,为了确保账号不被他人恶意绑定,请验证安全卡'; 43 this.params.tips_ekey = '账号'+$we.process.getData("alias")+'已经绑定了密宝,为了确保账号不被他人恶意绑定,请验证密宝'; 44 return $we.process.getData("safety_verify"); 45 } 46 },{ 47 widget: "modify_password", 48 hidden: true, 49 beforeAction: function() { 50 return !$we.process.getData("safety_verify") && $we.process.getData("need_pwd"); 51 } 52 },{ 53 name: '绑定成功', 54 widget: "bind_account_to_mobile_group.end" 55 }], 56 config: { 57 flow: "bindAccount", 58 title: "绑定账号", 59 prev: false 60 }, 61 data: ["group", "group_check_bind_account", "captcha_key"], 62 init: function(conf) { 63 $we.process.setData("need_pwd", true); 64 } 65 }; 66 67 return $we.process.use; 68 } 69 );