Files
Arbitrate-FrontendH5/node_modules/.cache/babel-loader/27a1538e9ca22376e399af500ab6b71cee1c02b1b5dbee5b53a12dce01515892.json
T

1 line
5.1 KiB
JSON
Raw Normal View History

2024-01-18 10:46:33 +08:00
{"ast":null,"code":"// 判断房间人数对应的样式\nexport function getWidth(data) {\n if (data.length == 1) {\n return 'userVideo';\n } else if (data.length == 2) {\n return \"userVideo1\";\n } else if (data.length == 3) {\n return \"userVideo2\";\n } else if (data.length > 3) {\n return \"userVideo3\";\n } else if (data.length == 0) {\n return 'userVideo4';\n }\n}\nexport function getHeight(data) {\n let userRow = Math.ceil((data.length + 1) / 3);\n if (userRow == 1) {\n return \"100%\";\n } else {\n return 1 / userRow * 100 + \"%\";\n }\n}\n// 判断移动端进入房间样式\nexport function getWidthPhone(data) {\n if (data.length == 0) {\n return \"userVideoPhone\";\n } else {\n return \"userVideoPhone1\";\n }\n}\n// 判断移动端访问还是pc端访问\nexport function getModile() {\n var sUserAgent = navigator.userAgent.toLowerCase();\n var bIsIpad = sUserAgent.match(/ipad/i) == \"ipad\";\n var bIsIphoneOs = sUserAgent.match(/iphone os/i) == \"iphone os\";\n var bIsMidp = sUserAgent.match(/midp/i) == \"midp\";\n var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == \"rv:1.2.3.4\";\n var bIsUc = sUserAgent.match(/ucweb/i) == \"ucweb\";\n var bIsAndroid = sUserAgent.match(/android/i) == \"android\";\n var bIsCE = sUserAgent.match(/windows ce/i) == \"windows ce\";\n var bIsWM = sUserAgent.match(/windows mobile/i) == \"windows mobile\";\n if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {\n return false;\n } else {\n return true;\n }\n}","map":{"version":3,"names":["getWidth","data","length","getHeight","userRow","Math","ceil","getWidthPhone","getModile","sUserAgent","navigator","userAgent","toLowerCase","bIsIpad","match","bIsIphoneOs","bIsMidp","bIsUc7","bIsUc","bIsAndroid","bIsCE","bIsWM"],"sources":["/Users/Guest/nouiroom/src/utils/utils.js"],"sourcesContent":["// 判断房间人数对应的样式\nexport function getWidth(data) {\n if (data.length == 1) {\n return 'userVideo'\n } else if (data.length == 2) {\n return \"userVideo1\"\n } else if (data.length == 3) {\n return \"userVideo2\"\n } else if (data.length > 3) {\n return \"userVideo3\"\n } else if (data.length == 0) {\n return 'userVideo4'\n }\n\n}\nexport function getHeight(data) {\n let userRow = Math.ceil((data.length + 1) / 3);\n if (userRow == 1) {\n return \"100%\"\n }\n else {\n return (1 / userRow) * 100 + \"%\"\n }\n}\n// 判断移动端进入房间样式\nexport function getWidthPhone(data) {\n if (data.length == 0) {\n return \"userVideoPhone\"\n } else {\n return \"userVideoPhone1\"\n }\n}\n// 判断移动端访问还是pc端访问\nexport function getModile() {\n var sUserAgent = navigator.userAgent.toLowerCase();\n var bIsIpad = sUserAgent.match(/ipad/i) == \"ipad\";\n var bIsIphoneOs = sUserAgent.match(/iphone os/i) == \"iphone os\";\n var bIsMidp = sUserAgent.match(/midp/i) == \"midp\";\n var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == \"rv:1.2.3.4\";\n var bIsUc = sUserAgent.match(/ucweb/i) == \"ucweb\";\n var bIsAndroid = sUserAgent.match(/android/i) == \"android\";\n var bIsCE = sUserAgent.match(/windows ce/i) == \"windows ce\";\n var bIsWM = sUserAgent.match(/windows mobile/i) == \"windows mobile\";\n if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {\n return false;\n } else {\n return true;\n }\n}\n"],"mappings":"AAAA;AACA,OAAO,SAASA,QAAQA,CAACC,IAAI,EAAE;EAC3B,IAAIA,IAAI,CAACC,MAAM,IAAI,CAAC,EAAE;IAClB,OAAO,WAAW;EACtB,CAAC,MAAM,IAAID,IAAI,CAACC,MAAM,IAAI,CAAC,EAAE;IACzB,OAAO,YAAY;EACvB,CAAC,MAAM,IAAID,IAAI,CAACC,MAAM,IAAI,CAAC,EAAE;IACzB,OAAO,YAAY;EACvB,CAAC,MAAM,IAAID,IAAI,CAACC,MAAM,GAAG,CAAC,EAAE;IACxB,OAAO,YAAY;EACvB,CAAC,MAAM,IAAID,IAAI,CAACC,MAAM,IAAI,CAAC,EAAE;IACzB,OAAO,YAAY;EACvB;AAEJ;AACA,OAAO,SAASC,SAASA,CAACF,IAAI,EAAE;EAC5B,IAAIG,OAAO,GAAGC,IAAI,CAACC,IAAI,CAAC,CAACL,IAAI,CAACC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC;EAC9C,IAAIE,OAAO,IAAI,