MCPcopy Create free account
hub / github.com/GrowthEase/GameSentry / sendFunctionValue

Function sendFunctionValue

res/static/js/function.js:121–191  ·  view source on GitHub ↗
(is_resend)

Source from the content-addressed store, hash-verified

119}
120
121function sendFunctionValue(is_resend) {
122 let put_function_value = []
123 let function_return_value
124 for (let [key, value] of audit_function_value) {
125 if (key == -1) {
126 continue
127 }
128 if (key == select_function_value.parameters.length) {
129 function_return_value = value
130 continue
131 }
132 put_function_value.push({
133 "name": key,
134 "value": value,
135 })
136 }
137
138 if (!is_resend) {
139 if (put_function_value.length < 1 && function_return_value == null) {
140 alert("请输入要修改的值")
141 return
142 }
143 }
144
145 function chargeArgsParam() {
146 let args = []
147 for (let index in put_function_value) {
148 const param = put_function_value[index]
149 args.push({
150 'index': param.name,
151 'value': param.value
152 })
153 }
154 return args
155 }
156
157 if (is_resend) {
158 $.ajax({
159 url: '/resend_function',
160 type: 'POST',
161 data: {
162 "addr": select_function_value.addr,
163 "args_param": chargeArgsParam(),
164 },
165 dataType: 'json',
166 success: function (res) {
167 alert("配置成功")
168 },
169 error: function (res) {
170 alert("配置失败")
171 }
172 });
173 } else {
174 $.ajax({
175 url: '/send_function',
176 type: 'POST',
177 data: {
178 "addr": select_function_value.addr,

Callers

nothing calls this directly

Calls 1

chargeArgsParamFunction · 0.85

Tested by

no test coverage detected