调整金额
This commit is contained in:
@@ -279,7 +279,8 @@ async function handleLogin() {
|
||||
// 调用登录API
|
||||
const response = await axios.post(loginApiUrl, {
|
||||
username: loginForm.value.username,
|
||||
password: loginForm.value.password
|
||||
password: loginForm.value.password,
|
||||
loginUrl: loginForm.value.loginUrl
|
||||
});
|
||||
|
||||
// 处理登录结果
|
||||
@@ -291,14 +292,6 @@ async function handleLogin() {
|
||||
|
||||
// 更新用户名
|
||||
username.value = loginForm.value.username;
|
||||
|
||||
// 重置表单
|
||||
loginForm.value = {
|
||||
username: '',
|
||||
password: '',
|
||||
loginUrl: 'https://4701268539-esh.qdk63ayw8g.com'
|
||||
};
|
||||
|
||||
console.log('登录成功:', response.data);
|
||||
} else {
|
||||
// 登录失败
|
||||
@@ -390,6 +383,31 @@ async function handleStop() {
|
||||
}
|
||||
}
|
||||
|
||||
// 处理开始按钮点击
|
||||
async function handleStart() {
|
||||
console.log('开始按钮点击');
|
||||
|
||||
try {
|
||||
// 调用后端开始API
|
||||
const response = await axios.post('http://localhost:8080/api/ocr/saveUserInfo', {
|
||||
onOff: 1
|
||||
});
|
||||
|
||||
// 处理响应结果
|
||||
if (response.data && response.code !== 500) {
|
||||
console.log('开始成功:', response.data);
|
||||
alert('开始成功');
|
||||
} else {
|
||||
console.error('开始失败:', response.data);
|
||||
alert('开始失败: ' + (response.data.message || '未知错误'));
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
console.error('开始失败:', err);
|
||||
alert('开始操作失败,请检查网络连接');
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
// 销毁图表
|
||||
chart1.value?.dispose();
|
||||
@@ -411,6 +429,8 @@ onUnmounted(() => {
|
||||
</div>
|
||||
<div class="account-actions">
|
||||
<button type="button" class="login-button" @click="loginDialogVisible = true">账号信息</button>
|
||||
<button type="button" class="start-button" @click="handleStart">开始</button>
|
||||
<button type="button" class="stop-button" @click="handleStop">停止</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -418,7 +438,7 @@ onUnmounted(() => {
|
||||
<div v-if="loginDialogVisible" class="modal-overlay">
|
||||
<div class="modal-content" @click.stop>
|
||||
<div class="modal-header">
|
||||
<h3>登录</h3>
|
||||
<h3>账号信息</h3>
|
||||
<button type="button" class="modal-close" @click="loginDialogVisible = false">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@@ -453,16 +473,17 @@ onUnmounted(() => {
|
||||
<!-- 顶部输入框区域 -->
|
||||
<div class="top-inputs">
|
||||
<div class="input-group">
|
||||
<label for="input1">止盈点:</label>
|
||||
<div class="input-with-button">
|
||||
<input type="text" id="input1" v-model="input1" placeholder="请输入止盈点">
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label for="input2">止亏点:</label>
|
||||
<div class="input-with-button">
|
||||
<input type="text" id="input2" v-model="input2" placeholder="请输入止亏点">
|
||||
<div class="button-group">
|
||||
<button type="button" class="confirm-button" @click="handleConfirm">确认</button>
|
||||
<button type="button" class="stop-button" @click="handleStop">停止</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -483,17 +504,19 @@ onUnmounted(() => {
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>期数</th>
|
||||
<th>开奖时间</th>
|
||||
<th>开奖号码</th>
|
||||
<th>投注金额</th>
|
||||
<th>结果</th>
|
||||
<th>金额</th>
|
||||
<th>投注时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in tableData" :key="item.id">
|
||||
<td>{{ item.id }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.time }}</td>
|
||||
<td>{{ item.betId }}</td>
|
||||
<td>{{ item.betAmount }}</td>
|
||||
<td>{{ item.result }}</td>
|
||||
<td>{{ item.resultAmount }}</td>
|
||||
<td>{{ item.time }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -600,6 +623,13 @@ onUnmounted(() => {
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
/* 账号操作中的开始和停止按钮 */
|
||||
.account-actions .start-button,
|
||||
.account-actions .stop-button {
|
||||
padding: 6px 12px;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.logout-button {
|
||||
padding: 6px 12px;
|
||||
background-color: #6c757d;
|
||||
@@ -686,6 +716,29 @@ onUnmounted(() => {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* 开始按钮 */
|
||||
.start-button {
|
||||
padding: 8px 14px;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.start-button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
.start-button:active {
|
||||
background-color: #3d8b40;
|
||||
transform: translateY(1px);
|
||||
}
|
||||
|
||||
/* 停止按钮 */
|
||||
.stop-button {
|
||||
padding: 10px 16px;
|
||||
|
||||
Reference in New Issue
Block a user