|
@@ -1,13 +1,13 @@
|
|
(function (app) {
|
|
(function (app) {
|
|
- app.controller('wechatLoginCtrl', ["$scope","userService","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","common",
|
|
|
|
- function ($scope,userService,$ionicNavBarDelegate, storage, $state, msg, $http, util,common) {
|
|
|
|
|
|
+ app.controller('wechatLoginCtrl', ["$scope","userService","$ionicNavBarDelegate", "storage", "$state", "msg", "$http", "util","common","config",
|
|
|
|
+ function ($scope, userService, $ionicNavBarDelegate, storage, $state, msg, $http, util, common, config) {
|
|
//$ionicNavBarDelegate.showBackButton(false);
|
|
//$ionicNavBarDelegate.showBackButton(false);
|
|
$scope.addvideo = function () {
|
|
$scope.addvideo = function () {
|
|
common.chooseVideo().then(function (file) {
|
|
common.chooseVideo().then(function (file) {
|
|
msg.loading();
|
|
msg.loading();
|
|
common.uploadFiles(file, 2).then(function (result) {
|
|
common.uploadFiles(file, 2).then(function (result) {
|
|
msg.hide();
|
|
msg.hide();
|
|
- console.log(result);
|
|
|
|
|
|
+ console.log(result.respons);
|
|
var response = JSON.parse(result.response);
|
|
var response = JSON.parse(result.response);
|
|
$scope.video.server = response.data.file;
|
|
$scope.video.server = response.data.file;
|
|
var file = config.imgServer + response.data.file;
|
|
var file = config.imgServer + response.data.file;
|