You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

join_project.js 1.9 kB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. app.controller('JoinProjectController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','wx','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,wx,common){
  2. // common.checkLogin();
  3. var vm = $scope;
  4. // vm.current_edit_member = rms.get('current_edit_member');
  5. vm.role_id = 0;
  6. vm.alertService = alertService.create();
  7. vm.invite_code = "";
  8. var tag = $routeParams.tag;
  9. vm.cancel = function(){
  10. if(tag){
  11. // window.history.back();
  12. rms.save('projects',[]);
  13. $location.path("/project_list");
  14. }
  15. else{
  16. wx.closeWindow();
  17. }
  18. };
  19. vm.join_project = function(){
  20. if(vm.role_id == 0){
  21. vm.alertService.showMessage('提示', "请至少选择一个角色");
  22. return;
  23. }
  24. if(vm.invite_code.length == 0)
  25. {
  26. vm.alertService.showMessage('提示', '请输入6位邀请码');
  27. return;
  28. }
  29. if(vm.invite_code.length != 6)
  30. {
  31. vm.alertService.showMessage('提示', '邀请码格式不正确');
  32. return;
  33. }
  34. $http.post(config.apiUrl+'projects/join_project', {
  35. token: auth.token(),
  36. invite_code: vm.invite_code,
  37. role_id:vm.role_id
  38. }).then(function(response){
  39. if(response.data.status == 0){
  40. vm.alertService.showMessage('提示', response.data.message,function(){
  41. rms.save('projects',[]);
  42. $location.path("/project_list");
  43. });
  44. } else {
  45. vm.alertService.showMessage('提示', response.data.message);
  46. }
  47. });
  48. };
  49. vm.selectRole = function(role_id){
  50. vm.role_id = role_id;
  51. }
  52. }] );

软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...