648540858
2022-04-12 3955e6ed53d450f8faf488d4b74ba0c0c83c5aaa
web_src/src/components/dialog/platformEdit.vue
@@ -116,6 +116,7 @@
      showDialog: false,
      isLoging: false,
      onSubmit_text: "立即创建",
      saveUrl: "/api/platform/save",
      platform: {
        id: null,
@@ -163,6 +164,7 @@
      var that = this;
      if (platform == null) {
        this.onSubmit_text = "立即创建";
        this.saveUrl = "/api/platform/add";
        this.$axios({
          method: 'get',
          url:`/api/platform/server_config`
@@ -196,7 +198,9 @@
        this.platform.transport = platform.transport;
        this.platform.characterSet = platform.characterSet;
        this.platform.shareAllLiveStream = platform.shareAllLiveStream;
        this.platform.catalogId = platform.catalogId;
        this.onSubmit_text = "保存";
        this.saveUrl = "/api/platform/save";
      }
      this.showDialog = true;
      this.listChangeCallback = callback;
@@ -211,14 +215,13 @@
      this.platform.username = this.platform.deviceGBId ;
    },
    onSubmit: function () {
      console.log("onSubmit");
      var that = this;
      that.$axios({
        method: 'post',
        url:`/api/platform/save`,
        url: this.saveUrl,
        data: that.platform
      }).then(function (res) {
          if (res.data == "success") {
          if (res.data.code === 0) {
            that.$message({
              showClose: true,
              message: "保存成功",
@@ -228,6 +231,12 @@
            if (that.listChangeCallback != null) {
              that.listChangeCallback();
            }
          }else {
            that.$message({
              showClose: true,
              message: res.data.msg,
              type: "error",
            });
          }
        }).catch(function (error) {
          console.log(error);