Skip to content

Commit

Permalink
fix: #843 授权方式改为只读,防止引起误解或者误配置
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Oct 31, 2023
1 parent 5976607 commit ec6b7ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/set/publish/PlatformAddForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ initPage()
<!-- 授权方式 -->
<el-form-item label="授权方式" prop="authMode">
<span v-if="formData.isPre">{{ formData.dynCfg.authMode === AuthMode.API ? "API授权" : "网页授权" }}</span>
<el-select v-else v-model="formData.dynCfg.authMode" placeholder="请选择">
<el-select v-else v-model="formData.dynCfg.authMode" placeholder="请选择" :disabled="true">
<el-option :value="AuthMode.API" label="API授权" />
<el-option :value="AuthMode.WEBSITE" label="网页授权" />
</el-select>
Expand Down
3 changes: 3 additions & 0 deletions src/platforms/dynamicConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ export class DynamicConfig {
this.isAuth = false
this.isEnabled = false
this.authMode = AuthMode.API
if (platformKey.toLowerCase().includes(PlatformType.Custom.toString().toLowerCase())) {
this.authMode = AuthMode.WEBSITE
}
this.cookieLimit = false
this.isSys = false

Expand Down

0 comments on commit ec6b7ac

Please sign in to comment.