소스 검색

修改替换规则

zy1125 1 년 전
부모
커밋
9d5db431a4
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      src/components/home.vue

+ 5 - 1
src/components/home.vue

@@ -264,7 +264,11 @@ export default ({
264 264
                
265 265
               
266 266
                 console.log('sadasd',json.deviceCode);
267
-                let replacedStr = json.deviceCode.replace("/", "A");
267
+              
268
+                let replacedStr = json.deviceCode.replace(/\//g, 'A');
269
+                // let replacedStr = replacedStr2.replace("/", "A");
270
+
271
+                console.log('replacedStr',replacedStr);
268 272
                 getClassDetail(replacedStr).then(res => {
269 273
                     console.log('sad21312',res);
270 274
                     classDeviceInfo.value = res.data;