mirror of
https://gitee.com/beecue/fastbee.git
synced 2026-11-06 17:09:11 +08:00
fix(视频SIP): 产品无独立配置时回落默认SIP配置
打开国标产品SIP配置页时,若该产品在 sip_config 无记录则回落到后端默认 (sip.*)配置预填;修正 GetDefaultSipConfig 误将 null 写入缓存的问题。
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user