SeanChenTaipei 2 years ago
parent 404e829709
commit a4f01c76db
  1. 2
      main.py
  2. 3
      static/js/addStock.js
  3. 6
      templates/result.html
  4. 6
      templates/strategy_tw.html

@ -353,7 +353,7 @@ def buildPort():
curs.execute(sql, data) curs.execute(sql, data)
conn.close() conn.close()
print("\n------Write in Success--------\n") print("\n------Write in Success--------\n")
return jsonify({'mes': '投資組合已完成建立,請至<a href"/">gooooooo</a>查詢分析結果。'}) return '''<span>投資組合已完成建立,請至<a class="badge rounded-pill text-bg-primary" href="/">#TODO:insert link</a>查詢分析結果。</span>'''

@ -101,7 +101,8 @@ $sendPort.click(function(event) {
console.log(response); console.log(response);
// var res = JSON.parse(response); // var res = JSON.parse(response);
event.preventDefault(); event.preventDefault();
$('#confirmMes').text(response.mes) // $('#confirmMes').text('')
$('#confirmMes').replaceWith(response);
if (stockList.length > 0){ if (stockList.length > 0){
$('#confirmModal').modal('show'); $('#confirmModal').modal('show');
} }

@ -72,7 +72,7 @@ body {
<tr> <tr>
<th scope="col" role="alert"> <th scope="col" role="alert">
<a href="" class="alert-link"> <a href="" class="alert-link">
{{ info[0] }} <span class="badge rounded-pill text-bg-info">{{ info[0] }}</span>
</a> </a>
</th> </th>
<td>{{ info[2] }}</td> <td>{{ info[2] }}</td>
@ -93,3 +93,7 @@ body {
</div> </div>
{% endblock %} {% endblock %}
{% block script %}
{% endblock script %}

@ -156,7 +156,11 @@ body {
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<span id="confirmMes">投資組合已開始建立,請1分鐘後至結果分析查詢。</span> <span id="confirmMes">
<div id="sucMes">
<span>投資組合已開始建立,請1分鐘後至結果分析查詢。</span>
</div>
</span>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">確認</button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">確認</button>

Loading…
Cancel
Save