MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / dynamicParams

Function dynamicParams

public/iframe/lib/js/commonFun.js:350–366  ·  view source on GitHub ↗
(method, config, params, dynamicParams)

Source from the content-addressed store, hash-verified

348 })
349 },
350 dynamicParams(method, config, params, dynamicParams) {
351 // 蓝图编辑器动态参数
352 Object.entries(dynamicParams).forEach(([key, value]) => {
353 if (method === 'get') {
354 // 获取url中type对应的值
355 const type = this.GetQueryString(key, config.url)
356 if (key !== '') {
357 config.url = config.url.replace(`${key}=${type}`, `${key}=${value}`)
358 }
359 } else if (params.toString() !== '{}') {
360 if (key !== '') {
361 this.objectUrlEval(params, key, true, value)
362 }
363 }
364 })
365
366 },
367 guid() {
368 return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
369 const r = Math.random() * 16 | 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected