1 /** 2 * 绑定邮箱 3 * @type {Object} 4 */ 5 define( 6 "bind_email", 7 [ 8 "component/process_ui", 9 "business/bind_email", 10 "business/safety_verification", 11 "business/modify_password", 12 "business/verify_email" 13 ], 14 function() { 15 $we.process.config.bind_email = { 16 processes: [{ 17 name: "输入邮箱", 18 widget: "bind_email.start" 19 }, { 20 name: "安全验证", 21 widget: "safety_verification", 22 beforeAction: function() { 23 return $we.process.getData("safety_verify"); 24 } 25 }, { 26 widget: "modify_password", 27 hidden: true, 28 beforeAction: function() { 29 return !$we.process.getData("safety_verify") && !$we.process.getData("new_comer"); 30 } 31 }, { 32 name: '绑定邮箱', 33 widget: "verify_email", 34 params: { 35 verifyName: "bind_email", 36 saveVerifyName: "email" 37 } 38 }, { 39 widget: "bind_email.end" 40 }], 41 config: { 42 flow: "bindEmail", 43 title: "邮箱绑定", 44 prev: false 45 }, 46 data: ["safety_verify", "new_comer"], 47 init: function(conf) { 48 if($we.process.getData("new_comer")) { 49 conf.processes[1].hidden = true; 50 } else { 51 conf.processes[1].hidden = false; 52 } 53 } 54 }; 55 56 return $we.process.use; 57 } 58 );