1 /** 2 * 3 * 解绑手机 4 * 5 * @fileOverView 6 * @author <a href="mailto:zhang.gd@foxmail.com">Zhang Guangda</a> 7 * @date 2012-12-05 8 */ 9 define(["core", "component/process_components"], function() { 10 var _startHtml = [ 11 '<div attr="root" class="we_cell_func_intro">', 12 '<ul class="we_mt15">', 13 '<li class="we_func_item">', 14 '<h3 class="we_func_title"><i class="we_icon_key_login"></i>一键登录</h3>轻滑手机即可登录,安全又便捷', 15 '</li>', 16 '<li class="we_func_item">', 17 '<h3 class="we_func_title"><i class="we_mul_mana"></i>多账号管理</h3>一手掌控,轻松管理,同步保护', 18 '</li>', 19 '<li class="we_func_item">', 20 '<h3 class="we_func_title"><i class="we_dyn_pwd"></i>动态密码</h3>会变的密码,让账户与消费更安心', 21 '</li>', 22 '<li class="we_func_item">', 23 '<h3 class="we_func_title"><i class="we_safe_notice"></i>安全通知</h3>即时的账号、消费安全通知一手掌握', 24 '</li>', 25 '</ul>', 26 '</div>' 27 ].join(""), 28 _startTips = "解绑手机后,该账号将不能使用G家提供的安全服务,请谨慎操作"; 29 30 /** 31 * 绑定手机组件 32 * @lends $we.widget.unbind_mobile.start 33 */ 34 $we.widget.reg("unbind_mobile.start", { 35 /** 36 * @constructs 37 */ 38 init: function(el, params) { 39 this.el = el; 40 this.params = params || {}; 41 42 this.params.tips = $we.utils.setValue(this.params.tips, _startTips); 43 }, 44 /** 45 * interfaces 46 * @memberOf $we.widget.unbind_mobile.start# 47 */ 48 interfaces: { 49 /** 50 * 渲染 51 * @param {Object} params 参数 52 * @memberOf $we.widget.unbind_mobile.start# 53 */ 54 render: function(params) { 55 if (typeof params == "object") { 56 for (var i in params) { 57 this.params[i] = params[i]; 58 } 59 } 60 61 this.tips = $we.widget.add("process.tips.small", this.el, { 62 content: this.params.tips 63 }); 64 65 this.append(this.el, _startHtml); 66 67 this.notify("setButton", {cancel:true, next:"继续"}); 68 } 69 }, 70 /** 71 * process 72 * @memberOf $we.widget.unbind_mobile.start# 73 */ 74 process: { 75 start: function(params) {this.render(params); }, 76 end: function() {$(this.node.root).remove(); this.tips && this.tips.remove(); }, 77 checkSucc: function() {this.notify("goNext"); } 78 } 79 }); 80 81 return { 82 start: $we.widget.amd("unbind_mobile.start") 83 }; 84 });