var videoPage = { init: function () { this.bindEvent(); }, bindEvent: function () { var self = this; //$('#J_upload_video_btn').click(function () { // $('#J_upload_video_file').click(); //}); $('#J_upload_video_file').change(function () { var fileInput = this; self.fileReaderUpload(fileInput); }); }, fileReaderUpload: function (fileInput) { ShowMsg("视频上传中..."); //$('#J_upload_status_div').html('视频上传中...'); var self = this; var file = fileInput.files[0]; var reader = new FileReader(); reader.readAsDataURL(file); reader.onload = function () { var jsonObj = { VideoData: this.result, UserID: UserID, DemandID: DemandID, DataType: DataType } var json = JSON.stringify(jsonObj); var fileName = file.name; self.uploadVideoToServer(json, fileName); } }, uploadVideoToServer: function (json, fileName) { alert(1); //javaUrl:/serv/upload //onlineUrl:http://interface.pdcc.com.cn:80/UserCenter/UserCenterService.svc/DemandDataUploadVideo //$.ajax({ // type: 'POST', // url: "/h5/serv/upload?fileName=" + fileName, // contentType: "application/json;charset=utf-8", // //dataType: "json", // data: json, // cache: false, // success: function (data) { // //var result = $.parseJSON(data); // //alert(result.Y); // /*if (result.Y == 0) { // var tmpUL = $("#dd" + uploadType).find(".builderPic"); // tmpUL.html('