|
@@ -444,14 +444,15 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}]);
|
|
}]);
|
|
- app.controller('my_account_addCtrl', ["$scope","common","$ionicTabsDelegate", "$state", "myService", "msg"
|
|
|
|
- , function ($scope,common,$ionicTabsDelegate, $state, myService, msg) {
|
|
|
|
|
|
+ app.controller('my_account_addCtrl', ["$scope","config","common","$ionicTabsDelegate", "$state", "myService", "msg"
|
|
|
|
+ , function ($scope,config,common,$ionicTabsDelegate, $state, myService, msg) {
|
|
$scope.addpict = function () {
|
|
$scope.addpict = function () {
|
|
common.chooseImage().then(function (img) {
|
|
common.chooseImage().then(function (img) {
|
|
common.uploadFiles(img,1).then(function (result) {
|
|
common.uploadFiles(img,1).then(function (result) {
|
|
var response = JSON.parse(result.response);
|
|
var response = JSON.parse(result.response);
|
|
- var file = response.data.file;
|
|
|
|
- $scope.imgs.push(config.imgServer+file);
|
|
|
|
|
|
+ var file = config.imgServer+response.data.file;
|
|
|
|
+ $scope.vm.file = file;
|
|
|
|
+ $scope.imgs.push(file);
|
|
}, function (error) {
|
|
}, function (error) {
|
|
msg.error('图片上传失败');
|
|
msg.error('图片上传失败');
|
|
});
|
|
});
|
|
@@ -493,16 +494,14 @@
|
|
$scope.addQrcode = function(){
|
|
$scope.addQrcode = function(){
|
|
var data = {
|
|
var data = {
|
|
data:{
|
|
data:{
|
|
- bank_name:$scope.vm.bank_name,
|
|
|
|
|
|
+ type:$scope.vm.bank_name,
|
|
//bank_number:$scope.imgs
|
|
//bank_number:$scope.imgs
|
|
- bank_number:"https://www.baidu.com/img/bd_logo1.png"
|
|
|
|
|
|
+ url:$scope.vm.file
|
|
}
|
|
}
|
|
};
|
|
};
|
|
myService.addQrcode(data).then(function(result){
|
|
myService.addQrcode(data).then(function(result){
|
|
msg.text("添加成功",true);
|
|
msg.text("添加成功",true);
|
|
- $timeout(function () {
|
|
|
|
- $state.go("app.my_account");
|
|
|
|
- }, 1000);
|
|
|
|
|
|
+ $state.go("app.my_account");
|
|
},function(error){
|
|
},function(error){
|
|
msg.error(error.data.message);
|
|
msg.error(error.data.message);
|
|
})
|
|
})
|