|
|
@ -45,27 +45,29 @@ app.controller('ProjectListController', ['$scope', 'config', 'auth', '$http', '$
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
vm.joinProject = function () {
|
|
|
|
vm.joinProject = function () {
|
|
|
|
vm.alertService_3.showMessage('提示', '请输入6位项目邀请码(不区分大小写)', function(){
|
|
|
|
vm.alertService_1.showMessage('提示', "该功能将在近日开放,敬请期待!");
|
|
|
|
if (vm.alertService_3.invite && vm.alertService_3.invite.length == 6) {
|
|
|
|
|
|
|
|
$http.post(config.apiUrl + "projects/join", {
|
|
|
|
// vm.alertService_3.showMessage('提示', '请输入6位项目邀请码(不区分大小写)', function(){
|
|
|
|
token: auth.token(),
|
|
|
|
// if (vm.alertService_3.invite && vm.alertService_3.invite.length == 6) {
|
|
|
|
invite_code: vm.alertService_3.invite
|
|
|
|
// $http.post(config.apiUrl + "projects/join", {
|
|
|
|
}).then(function (response) {
|
|
|
|
// token: auth.token(),
|
|
|
|
console.log(response.data);
|
|
|
|
// invite_code: vm.alertService_3.invite
|
|
|
|
if (response.data.status != 0) {
|
|
|
|
// }).then(function (response) {
|
|
|
|
vm.alertService_1.showMessage('提示', response.data.message);
|
|
|
|
// console.log(response.data);
|
|
|
|
} else {
|
|
|
|
// if (response.data.status != 0) {
|
|
|
|
vm.alertService_1.showMessage('提示', '加入项目成功');
|
|
|
|
// vm.alertService_1.showMessage('提示', response.data.message);
|
|
|
|
vm.alertService_3.invite = "";
|
|
|
|
// } else {
|
|
|
|
loadProjectList();
|
|
|
|
// vm.alertService_1.showMessage('提示', '加入项目成功');
|
|
|
|
}
|
|
|
|
// vm.alertService_3.invite = "";
|
|
|
|
});
|
|
|
|
// loadProjectList();
|
|
|
|
} else {
|
|
|
|
// }
|
|
|
|
if(vm.alertService_3.invite){
|
|
|
|
// });
|
|
|
|
vm.alertService_1.showMessage('提示', '邀请码格式不正确');
|
|
|
|
// } else {
|
|
|
|
}
|
|
|
|
// if(vm.alertService_3.invite){
|
|
|
|
}
|
|
|
|
// vm.alertService_1.showMessage('提示', '邀请码格式不正确');
|
|
|
|
});
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
vm.onSetting = function (project) {
|
|
|
|
vm.onSetting = function (project) {
|
|
|
|