Changeset 22562 for branches/version-2_12-dev/data
- Timestamp:
- 2013/02/18 14:13:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/Smarty/templates/sphone/mypage/index.tpl
r22206 r22562 102 102 var url = "<!--{$smarty.const.ROOT_URLPATH}-->mypage/history.php"; 103 103 var statusImagePath = "<!--{$TPL_URLPATH}-->"; 104 var arrPayment = <!--{$arrPayment|@json_encode}--> 105 var arrCustomerOrderStatus = <!--{$arrCustomerOrderStatus|@json_encode}--> 104 106 105 107 function getHistory(limit) { … … 134 136 historyEl = $(historyEl).clone(true).insertAfter(historyEl); 135 137 maxCnt++; 138 139 var regex = new RegExp('([0-9]{2,4}).([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2}).([0-9]{1,2}).'); 140 var matches = history.create_date.match(regex); 141 var formatted_date = history.create_date; 142 if(matches != null){ 143 formatted_date = matches[1]+'/'+matches[2]+'/'+matches[3]+' '+matches[4]+':'+matches[5]; 144 } 145 146 var formatted_payment_total = history.payment_total.toString().replace(/([0-9]+?)(?=(?:[0-9]{3})+$)/g , '$1,'); 136 147 137 148 //注文番号をセット 138 149 $($(".arrowBox span.order_id").get(maxCnt)).text(history.order_id); 139 150 //購入日時をセット 140 $($(".arrowBox span.create_date").get(maxCnt)).text( history.create_date);151 $($(".arrowBox span.create_date").get(maxCnt)).text(formatted_date); 141 152 //支払い方法をセット 142 $($(".arrowBox span.payment_id").get(maxCnt)).text( history.payment_id);153 $($(".arrowBox span.payment_id").get(maxCnt)).text(arrPayment[history.payment_id]); 143 154 //合計金額をセット 144 $($(".arrowBox span.payment_total").get(maxCnt)).text( history.payment_total);155 $($(".arrowBox span.payment_total").get(maxCnt)).text(formatted_payment_total); 145 156 //履歴URLをセット 146 157 $($(".arrowBox a").get(maxCnt)).attr("href", url + "?order_id=" + history.order_id); 158 //注文状況をセット 159 $($(".arrowBox span.order_status").get(maxCnt)).text(arrCustomerOrderStatus[history.status]); 147 160 } 148 161 }
Note: See TracChangeset
for help on using the changeset viewer.