exports.ids = [85];
exports.modules = {

/***/ 300:
/***/ (function(module, exports) {

// Exports
module.exports = {

};


/***/ }),

/***/ 374:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_newsName_vue_vue_type_style_index_0_id_c169e2c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(300);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_newsName_vue_vue_type_style_index_0_id_c169e2c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_newsName_vue_vue_type_style_index_0_id_c169e2c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_newsName_vue_vue_type_style_index_0_id_c169e2c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_0_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_sass_loader_dist_cjs_js_ref_7_oneOf_1_2_node_modules_nuxt_components_dist_loader_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_newsName_vue_vue_type_style_index_0_id_c169e2c2_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));


/***/ }),

/***/ 418:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/news/_newsName.vue?vue&type=template&id=c169e2c2&scoped=true
var render = function render() {
  var _vm = this,
    _c = _vm._self._c;
  return _c('div', {
    staticClass: "com-main com-width-1400 com-margin-auto"
  }, [_vm._ssrNode("<div class=\"content\" data-v-c169e2c2>" + _vm._s(_vm.articleDetails) + "</div> <div id=\"formTag\"" + _vm._ssrStyle(null, null, {
    display: _vm.showMargin ? '' : 'none'
  }) + " data-v-c169e2c2></div> <iframe frameborder=\"0\" id=\"formFrame\" src" + _vm._ssrStyle({
    "height": "1100px",
    "width": "100%",
    "border": "none"
  }, null, {
    display: _vm.$route.params.newsName === 'indent-ideas' ? '' : 'none'
  }) + " data-v-c169e2c2></iframe>")]);
};
var staticRenderFns = [];

// CONCATENATED MODULE: ./pages/news/_newsName.vue?vue&type=template&id=c169e2c2&scoped=true

// CONCATENATED MODULE: ./node_modules/babel-loader/lib??ref--2-0!./node_modules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/news/_newsName.vue?vue&type=script&lang=js
/* harmony default export */ var _newsNamevue_type_script_lang_js = ({
  data() {
    return {
      showMargin: true,
      articleDetails: '',
      routerParams: {},
      profileform: {},
      defaultURL: 'https://forms.zohopublic.com/promocollectionau/form/PCIndentSourcingForm/formperma/I8RpkeF104QfGCw2oK_PUZtj5lCwdwZEY5QJJpvllVI'
    };
  },
  computed: {
    userInfo() {
      return this.$store.state.userInfo || {};
    },
    computedURL() {
      if (this.userInfo.email) {
        const config = {
          name: this.userInfo.contacts,
          phone: this.userInfo.phone,
          email: this.userInfo.email,
          company: this.userInfo.company
        };
        let query = '';
        for (const key in config) {
          if (config[key]) {
            query += `&${key}=${encodeURIComponent(config[key])}`;
          }
        }
        query = query.slice(1);
        return this.defaultURL + '?' + query;
      } else {
        return this.defaultURL;
      }
    }
  },
  watch: {
    userInfo() {
      if (this.$route.params.newsName === 'indent-ideas') {
        setTimeout(() => {
          const target = document.getElementById('formFrame');
          target.src = this.computedURL;
        }, 1000);
      }
    }
  },
  async created() {
    const paramsData = this.$cookies.get('paramsData');
    if (paramsData) {
      this.routerParams = paramsData;
    } else {
      this.routerParams = this.$route.params;
      this.$cookies.set('paramsData', this.$route.params);
    }
    await this.getArticleDetails();
    this.showMargin = true;
  },
  mounted() {
    if (this.$route.params.newsName === 'indent-ideas') {
      setTimeout(() => {
        const target = document.getElementById('formFrame');
        target.src = this.computedURL;
      }, 1000);
    }
    setTimeout(() => {
      this.showMargin = false;
    }, 2000);
  },
  // 这个路由在设计的时候就不对劲, 结构层级只有1层, 但是跳转和传参传了两个params, 导致只有一个参数体现在了url上, 改动页面刷新的时候就会丢失参数id.
  beforeDestroy() {
    this.$cookies.remove('paramsData');
  },
  methods: {
    getArticleDetails() {
      let title = this.$route.params.newsName || '';
      title = decodeURIComponent(title);
      this.$axios.post('home/articleDetails', {
        title: title.replaceAll('-', ' '),
        state: 'au'
      }).then(res => {
        if (res.code === 1) {
          this.articleDetails = res.result.content.replace(/&nbsp;/gi, '');
        }
      }).catch(() => {});
    }
  }
});
// CONCATENATED MODULE: ./pages/news/_newsName.vue?vue&type=script&lang=js
 /* harmony default export */ var news_newsNamevue_type_script_lang_js = (_newsNamevue_type_script_lang_js); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(2);

// CONCATENATED MODULE: ./pages/news/_newsName.vue



function injectStyles (context) {
  
  var style0 = __webpack_require__(374)
if (style0.__inject__) style0.__inject__(context)

}

/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  news_newsNamevue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  injectStyles,
  "c169e2c2",
  "637d1ff2"
  
)

/* harmony default export */ var _newsName = __webpack_exports__["default"] = (component.exports);

/***/ })

};;
//# sourceMappingURL=_newsName.js.map