<script src="js/jquery-1.11.1.js" ></script> <script src="js/template.js"></script> <script type="text/javascript"> template.helper("fromatMoney", function (x,y) { return JSON.stringify(x)+','+y; }); </script> <script id="initData" type="text/html"> <!--{"success":true,"data":[{"Id":412,"Integral":1000,"MemberId":818,"RecordDate":"2019-07-20T14:50:01","ReMark":"積分購買(¥200)","TypeId":14,"UserName":"Sinper"}]}--> {{fromatMoney(data,1)}} {{each data as item i}} {{if item.TypeId == 14}} <li class="mui-table-view-cell integral-details-list"> <ul class="integral-details-left"> <li class="integral-details-record integral-purchase">{{item.ReMark}}</li> <li class="integral-details-time">{{item.RecordDate.replace('T',' ')}}</li> </ul> <span class="mui-pull-right integral-plus-wrap"> +{{item.Integral}} </span> </li> {{/if}} {{if item.TypeId == 15}} <li class="mui-table-view-cell integral-details-list"> <ul class="integral-details-left"> <li class="integral-details-record integral-presentation">{{item.ReMark}}</li> <li class="integral-details-time">{{item.RecordDate.replace('T',' ')}}</li> </ul> <span class="mui-pull-right integral-reduce-wrap">-{{item.Integral}}</span> </li> {{/if}} {{/each}} </script>