BindOnAccountCtrl.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. angular.module('push')
  2. .controller('BindOnAccountCtrl', function ($scope, $ionicPopup, $ionicActionSheet) {
  3. $scope.settingsList= [
  4. { id: 0,
  5. text:"微信",
  6. checked: true
  7. },
  8. { id: 1 ,
  9. text:"新浪微博",
  10. checked: false
  11. },
  12. { id: 2 ,
  13. text:"腾讯QQ",
  14. checked: false
  15. }
  16. ];
  17. // 编辑头像
  18. $scope.show_header = function () {
  19. // 弹出头像选择框
  20. $ionicActionSheet.show({
  21. cancelOnStateChange: true,
  22. cssClass: 'action_s',
  23. buttons: [
  24. {text: "拍照"},
  25. {text: "从相册上传"}
  26. ],
  27. buttonClicked: function (index) {
  28. return true;
  29. },
  30. destructiveText: "取消",
  31. destructiveButtonClicked: function () {
  32. return true;
  33. }
  34. });
  35. };
  36. // 编辑用户名
  37. $scope.showPopup = function () {
  38. $scope.data = {};
  39. // 调用$ionicPopup弹出编辑用户名
  40. var myShow = $ionicPopup.show({
  41. template: "<div style='position: relative;top: -11px;'>" +
  42. "<span class='BindOnAccount_div' style='position: relative;top: 1px;'>" +
  43. "<span class='BindOnAccount_span'>输入密码&nbsp;:</span>" +
  44. "</span>" +
  45. "<input type='text' ng-model='data.name' class='BindOnAccount_input' style='top:0;background-color: transparent;'>" +
  46. "<span class='BindOnAccount_div' style='position: relative;top: 5px;'>" +
  47. "<span class='BindOnAccount_span'>新手机号:" + "</span>" +
  48. "</span>" +
  49. "<input type='tel' ng-model='data.name' class='BindOnAccount_input' style='top:42px;height: 31px;'>" +
  50. "</div>",
  51. title: "修改手机号",
  52. scope: $scope,
  53. buttons: [
  54. {
  55. text: "取消"
  56. },
  57. {
  58. text: '<span class="pop_right_button">确认</span>',
  59. type: "button-positive",
  60. onTap: function (e) {
  61. return $scope.data.name;
  62. }
  63. }
  64. ]
  65. })
  66. .then(function (res) {
  67. $scope.organizationName = [res].join(" ");
  68. });
  69. };
  70. // 编辑个性签名
  71. $scope.showSignature = function () {
  72. $scope.data = {};
  73. // 调用$ionicPopup弹出编辑个性签名
  74. $ionicPopup.show({
  75. template: "<div style='position: relative;top: -10px;'>" +
  76. "<span class='BindOnAccount_div'>" +
  77. "<span class='BindOnAccount_span'>旧密码&nbsp;:</span>" +
  78. "</span>" +
  79. "<input type='password' ng-model='data.name'class='BindOnAccount_input' style='top:0;background-color: transparent;'>" +
  80. "<span class='BindOnAccount_div' style='position: relative;top: 5px;'>" +
  81. "<span class='BindOnAccount_span'>新密码&nbsp;:" + "</span>" +
  82. "</span>" +
  83. "<input type='password' ng-model='data.name' class='BindOnAccount_input' style='top:42px;height: 31px;'>" +
  84. "<span class='BindOnAccount_div' style='position: relative;top:10px;'>" +
  85. "<span class='BindOnAccount_span'>重复密码:" + "</span>" +
  86. "</span>" +
  87. "<input type='password' ng-model='data.name' class='BindOnAccount_input' style='top:83px;height: 31px;'>" +
  88. "</div>",
  89. title: "修改密码",
  90. scope: $scope,
  91. buttons: [
  92. {
  93. text: "取消"
  94. },
  95. {
  96. text: '<span class="pop_right_button">确认</span>',
  97. type: "button-positive",
  98. onTap: function (e) {
  99. return $scope.data.Signature;
  100. }
  101. }
  102. ]
  103. })
  104. .then(function (res) {
  105. $scope.organizationBrief = [res].join(" ");
  106. });
  107. };
  108. $scope.TelNumber = "13656219414";
  109. $scope.publisher_Data = "浙江大学成立于1897年,前身求是书院,是中国人最早自己创办的新式高等学府之一是首批进入国家211工程和985工程建设的重点大学之一浙江大学技术转移中心在2008年被科技部认定为首批76家国家技术转移示范机构之一";
  110. $scope.organizationName = "浙江大学";
  111. $scope.organizationType = "高校";
  112. $scope.organizationArea = "浙江 杭州";
  113. $scope.organizationPeople = "刘春华";
  114. $scope.organizationPhone = "13868786880";
  115. $scope.organizationBrief = "中国211工程,985工程重点大学";
  116. });