From a8ea0a75b5353d7bb97ba7825e3db261f85bcff7 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期一, 16 十月 2023 12:30:57 +0800 Subject: [PATCH] # --- pages/api/addMat.js | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/api/addMat.js b/pages/api/addMat.js index 31055b8..bc6b2ff 100644 --- a/pages/api/addMat.js +++ b/pages/api/addMat.js @@ -1,7 +1,7 @@ async function addMat() { let that = this,item = {}; var ress = await uni.request({ - url: 'http://127.0.0.1:8089/bfwms/mat/auth', + url: 'http://192.168.4.188:8089/bfwms/mat/auth', data: {matnr: '3CPPJ.B.GMB.LZ.QBY4-10/15P316LLZ'}, }).then((result)=> { let mat = result.data.data @@ -9,7 +9,8 @@ {key: '鍟嗗搧鐮�',value: mat.matnr}, {key: '鍟嗗搧鍚嶇О',value: mat.maktx}, {key: '瑙勬牸',value: mat.specs}, - {key: '鏁伴噺',value: 100}, + {key: '鎵瑰彿',value: '',type: 'input'}, + {key: '鏁伴噺',value: 0,type: 'number-box'}, ] },(res)=>{ console.log(res); @@ -18,7 +19,10 @@ } function isEmpty(obj) { - return typeof obj == "undefined" || obj == null || obj === ""; + if (JSON.stringify(obj) === '{}') { + return true + } + return obj == "undefined" || obj == null || obj === "" || obj == {}; } module.exports = { -- Gitblit v1.9.1