fix(视频SIP): 产品无独立配置时回落默认SIP配置

打开国标产品SIP配置页时,若该产品在 sip_config 无记录则回落到后端默认
(sip.*)配置预填;修正 GetDefaultSipConfig 误将 null 写入缓存的问题。
This commit is contained in:
gx_ma
2026-11-03 16:10:52 +08:00
parent 85273f84e7
commit 527f996872
2 changed files with 22 additions and 2 deletions

View File

@@ -121,10 +121,23 @@ export default {
created() {
this.productInfo = this.product;
if (this.productInfo && this.productInfo.productId != 0) {
this.getSipconfig(false);
this.loadSipconfig();
}
},
methods: {
/** 加载产品SIP配置:没有独立配置时回落到后端默认(sip.*)配置预填 */
loadSipconfig() {
getSipconfig(this.productInfo.productId, false).then(response => {
if (response.data) {
this.form = response.data;
return;
}
// 该产品还没有独立配置,取默认配置预填,由用户确认后保存
getSipconfig(this.productInfo.productId, true).then(res => {
this.form = res.data || {};
});
});
},
/** 获取产品下第一条SIP配置 */
getSipconfig(isDefault) {
getSipconfig(this.productInfo.productId, isDefault).then(response => {