Skip to content

Commit

Permalink
wu
Browse files Browse the repository at this point in the history
  • Loading branch information
xx502003587 committed Jun 19, 2016
1 parent 4abe709 commit 01f82a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion app/Http/Controllers/Order/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ public function deleteOrder(){
public function getTemplates(){
if(!isset($_SESSION)){
session_start();
}
}
$curName = $_SESSION['userName'];
$resSet = \DB::table('templates')->where('author_name', $curName)->get();
return $resSet;
//return $curName;
}

public function displayOrder(){
Expand Down
23 changes: 15 additions & 8 deletions public/js/create_records/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,17 @@ yinjiApp.controller('orderController',
})
.success(function(data) {
if(data != null){
console.log(data);
console.log(data.length);
imgList = data;
for(var i = 0; i < data.length; i++){
var ele = "<img src = '" + data[i].saving_path + "' id = 'img" + data[i].id + "' title = '" + data[i].description + "' onclick = 'selectTemplate(this.id)' class = 'noBorder'>";
$("div.order_text").append(ele);
var ele = "<img src = '" + data[i].saving_path + "' id = 'img" + data[i].id + "' title = '" + data[i].description + "' onclick = 'selectTemplate(this.id)' class = 'noBorder'>";
$("div.order_text").append(ele);
}
if(data.length != 0){
temId = "img" + data[0].id;
document.getElementById(temId).className = "hasBorder";
}
//var tt = "img" + data[0].id;
//console.log(tt);
temId = "img" + data[0].id;
document.getElementById(temId).className = "hasBorder";

}
else{
console.log("false");
Expand All @@ -83,7 +84,13 @@ yinjiApp.controller('orderController',
commentText = "无";
}

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

}

$http({
method: 'GET',//注意,这里必须要用GET方法
Expand Down

0 comments on commit 01f82a3

Please sign in to comment.