This commit is contained in:
2025-11-06 00:13:06 +08:00
parent c6fa3d0018
commit 9ed12b9248
3 changed files with 53 additions and 16 deletions

View File

@@ -44,6 +44,7 @@
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="warning" size="small" icon="el-icon-download" @click="handleExport" v-hasPermi="['system:jdorder:export']">导出</el-button>
<el-button type="info" size="small" icon="el-icon-user" @click="handleTestUserInfo" title="测试腾讯文档用户信息接口">测试用户信息</el-button>
</el-form-item>
</el-form>
</template>
@@ -351,7 +352,7 @@
<script>
import { listJDOrders, updateJDOrder, delJDOrder, fetchLogisticsManually } from '@/api/system/jdorder'
import { fillLogisticsByOrderNo, getTokenStatus, getTencentDocAuthUrl } from '@/api/jarvis/tendoc'
import { fillLogisticsByOrderNo, getTokenStatus, getTencentDocAuthUrl, testUserInfo } from '@/api/jarvis/tendoc'
import ListLayout from '@/components/ListLayout'
export default {
@@ -755,6 +756,34 @@ export default {
}
},
/** 测试获取用户信息接口 */
async handleTestUserInfo() {
try {
this.$message.info('正在测试用户信息接口...')
const res = await testUserInfo()
if (res.code === 200) {
this.$message.success('测试成功!用户信息:' + JSON.stringify(res.data, null, 2))
// 显示详细信息
this.$alert(
'<pre style="text-align: left; max-height: 400px; overflow: auto;">' +
JSON.stringify(res.data, null, 2) +
'</pre>',
'用户信息测试结果',
{
dangerouslyUseHTMLString: true,
confirmButtonText: '确定',
type: 'success'
}
)
} else {
this.$message.error('测试失败:' + (res.msg || '未知错误'))
}
} catch (e) {
this.$message.error('测试失败:' + (e.message || '未知错误'))
console.error('测试用户信息失败', e)
}
},
/** 同步物流链接 */
async handleSyncLogisticsSubmit() {
if (!this.syncLogisticsForm.fileId || !this.syncLogisticsForm.sheetId) {