init
This commit is contained in:
43
miniprogram/pages/network-test/index.wxml
Normal file
43
miniprogram/pages/network-test/index.wxml
Normal file
@@ -0,0 +1,43 @@
|
||||
<!--pages/network-test/index.wxml-->
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">网络连接测试</text>
|
||||
<text class="subtitle">API Base: {{apiBase}}</text>
|
||||
</view>
|
||||
|
||||
<view class="test-buttons">
|
||||
<button class="test-btn" bindtap="testBasicConnection" disabled="{{isLoading}}">
|
||||
测试健康检查
|
||||
</button>
|
||||
<button class="test-btn" bindtap="testCategoriesAPI" disabled="{{isLoading}}">
|
||||
测试分类接口
|
||||
</button>
|
||||
<button class="test-btn primary" bindtap="testAll" disabled="{{isLoading}}">
|
||||
测试所有接口
|
||||
</button>
|
||||
<button class="test-btn secondary" bindtap="clearResults">
|
||||
清除结果
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="loading" wx:if="{{isLoading}}">
|
||||
<text>测试中...</text>
|
||||
</view>
|
||||
|
||||
<view class="results" wx:if="{{testResults.length > 0}}">
|
||||
<text class="results-title">测试结果:</text>
|
||||
<view class="result-item" wx:for="{{testResults}}" wx:key="index">
|
||||
<view class="result-header">
|
||||
<text class="test-name">{{item.testName}}</text>
|
||||
<text class="status {{item.status === 'SUCCESS' ? 'success' : 'failed'}}">
|
||||
{{item.status}}
|
||||
</text>
|
||||
<text class="timestamp">{{item.timestamp}}</text>
|
||||
</view>
|
||||
<view class="result-details">
|
||||
<text class="status-code">状态码: {{item.statusCode}}</text>
|
||||
<text class="message">{{item.message}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user