Commit a2e8bcf4 by lijinqi

appid和secret展示处理

parent 74f679c7
...@@ -105,13 +105,34 @@ ...@@ -105,13 +105,34 @@
<span>AppId和AppSecret</span> <span>AppId和AppSecret</span>
</div> </div>
</template> </template>
<el-form-item label="AppId:">
<div>{{ appData.appId }}</div>
</el-form-item>
<el-form-item label="AppSecret:"> <el-form-item label="AppSecret:">
<div>{{ appData.appSecret }} <el-tooltip
</div> effect="dark"
:content="appData.appId || '-'"
placement="top"
v-if="appData.appId"
>
<span class="secret-text">
{{ formatString(appData.appId) }}
</span>
</el-tooltip>
<span v-else>-</span>
</el-form-item> </el-form-item>
<el-form-item label="AppSecret:">
<el-tooltip
effect="dark"
:content="appData.appSecret || '-'"
placement="top"
v-if="appData.appSecret"
>
<span class="secret-text">
{{ formatString(appData.appSecret) }}
</span>
</el-tooltip>
<span v-else>-</span>
</el-form-item>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -176,6 +197,15 @@ function handleViewReason() { ...@@ -176,6 +197,15 @@ function handleViewReason() {
getAuditInfo() getAuditInfo()
getAppInfo() getAppInfo()
// script setup 里加一个方法
function formatString(str) {
if (!str) return '-'
if (str.length <= 10) return secret
// 只显示前 4 位 + ... + 后 4 位
return `${str.slice(0, 4)}****${str.slice(-4)}`
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.remind { .remind {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment