Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
xx502003587 committed Jun 19, 2016
1 parent f29ef70 commit 28ae1c8
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 38 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Album/AlbumController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function addAlbum(){
// echo "#".$tempPath."#";

if($tempPath == "" || $tempPath == null){
$tempPath = "/images/mo.jpg;";
$tempPath = "/images/defaultBack.jpg;";
}


Expand Down
Binary file added public/images/defaultBack.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 42 additions & 37 deletions public/js/create_records/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,49 +72,54 @@ yinjiApp.controller('orderController',


$scope.addOrder = function(){
if($("#text_box2").val() < $("#text_box1").val()){
if($("#text_box2").val() == 0 || $("#text_box1").val() == 0){
alert("页码错误");
}
else{
var pageRange = $("#text_box1").val() + "-" + $("#text_box2").val();
var pagePrice = ($("#text_box2").val() - $("#text_box1").val()) * 10;//单价10块一张。。。
}else{
if($("#text_box2").val() < $("#text_box1").val()){

var commentText = $scope.oComment;
if(commentText == "" || commentText == null){
commentText = "无";
}
else{
var pageRange = $("#text_box1").val() + "-" + $("#text_box2").val();
var pagePrice = ($("#text_box2").val() - $("#text_box1").val()) * 10;//单价10块一张。。。

var commentText = $scope.oComment;
if(commentText == "" || commentText == null){
commentText = "无";
}

if(temId == 0){
console.log("00000");
var oTem = 0;
}else{
var oTem = temId.substring(3,4);
if(temId == 0){
var oTem = 0;
}else{
var oTem = temId.substring(3,4);

}

$http({
method: 'GET',//注意,这里必须要用GET方法
url:'/addOrder',
params:{
'oName': $scope.oName,
'oPhone': $scope.oPhone,
'oAddress' : $scope.oAddress,
'oComment' : commentText,
'oNum' : pageRange,
'oPrice' : pagePrice,
'oTemplate' : oTem
}
})
.success(function(data) {
if(data != null){
console.log(data);
alert("成功!");
window.location.href = "/";
}
else{
console.log("false");
}
});

$http({
method: 'GET',//注意,这里必须要用GET方法
url:'/addOrder',
params:{
'oName': $scope.oName,
'oPhone': $scope.oPhone,
'oAddress' : $scope.oAddress,
'oComment' : commentText,
'oNum' : 1,
'oPrice' : pagePrice,
'oTemplate' : oTem
}
})
.success(function(data) {
if(data != null){
console.log(data);
alert("成功!");
window.location.href = "/";
}
else{
console.log("false");
}
});
}
}


}
});

0 comments on commit 28ae1c8

Please sign in to comment.