From ba37a90e19a9c606fb3f26563b8d8e6222374740 Mon Sep 17 00:00:00 2001 From: guoweilong Date: Fri, 22 Sep 2023 17:51:21 +0800 Subject: [PATCH] feat: 样式调整 --- .hbuilderx/launch.json | 11 +++++++++-- locale/en.json | 86 +++++++++++++++++++++++++++++++++++++++++++++----------------------------------------- locale/zh-Hans.json | 14 +++++++++----- main.js | 3 ++- manifest.json | 4 ++-- mobile/pages/component/AuxiliaryModule.vue | 2 +- mobile/pages/component/InformationModule.vue | 2 +- mobile/pages/component/InspectionModule.vue | 3 +-- mobile/pages/component/topWindow.vue | 2 +- mobile/pages/homePage/index.vue | 6 +++--- mobile/pages/product/index.vue | 12 ++++++------ mobile/pages/product/invalidCode.vue | 4 ++-- mobile/pages/product/repairReport.vue | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------ mobile/pages/product/scan.vue | 8 ++++---- pages.json | 22 +++++++++++----------- pages/api/api.vue | 27 +++++++++++++++++++++++++++ pages/component/AuxiliaryModule.vue | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/component/InformationModule.vue | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/component/InspectionModule.vue | 224 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/component/QrScan.vue | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/component/UploadFile.vue | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/component/component.vue | 22 ++++++++++++++++++++++ pages/component/goback.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ pages/component/topWindow.vue | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/homePage/index.vue | 263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/product/index.vue | 332 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/product/invalidCode.vue | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/product/repairReport.vue | 467 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pages/product/scan.vue | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ postcss.config.js | 2 +- 30 files changed, 2603 insertions(+), 119 deletions(-) create mode 100644 pages/api/api.vue create mode 100644 pages/component/AuxiliaryModule.vue create mode 100644 pages/component/InformationModule.vue create mode 100644 pages/component/InspectionModule.vue create mode 100644 pages/component/QrScan.vue create mode 100644 pages/component/UploadFile.vue create mode 100644 pages/component/component.vue create mode 100644 pages/component/goback.vue create mode 100644 pages/component/topWindow.vue create mode 100644 pages/homePage/index.vue create mode 100644 pages/product/index.vue create mode 100644 pages/product/invalidCode.vue create mode 100644 pages/product/repairReport.vue create mode 100644 pages/product/scan.vue diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 665a73c..4576c2e 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -2,8 +2,15 @@ "version" : "1.0", "configurations" : [ { - "openVueDevtools" : true, + "openVueDevtools" : false, "type" : "uni-app:h5" - } + }, + { + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } ] } diff --git a/locale/en.json b/locale/en.json index 1abf135..cc9e048 100644 --- a/locale/en.json +++ b/locale/en.json @@ -6,64 +6,68 @@ "index.language": "Language", "index.language-info": "Settings", "index.system-language": "System language", - "hdk.productInformation":"ProductInformation", - "hdk.inspectionInformation":"InspectionInformation", - "hdk.attachmentInformation":"AttachmentInformation", - "hdk.placeholder":"Please enter the SN code on the product", - "hdk.tips":"Please enter the SN code to query the product", - "hdk.sninexistence":"The SN code does not exist. Please enter the correct SN code", + "hdk.productInformation":"Products", + "hdk.inspectionInformation":"Inspections", + "hdk.attachmentInformation":"Accesories", + "hdk.placeholder":"SN Code", + "hdk.tips":"Search by SN Code", + "hdk.sninexistence":"The SN code does not exist, please enter the correct SN code!", "hdk.search":"Search", - "hdk.gohome":"Click back to Home", - "hdk.ProductInformation":"productInformation", - "hdk.SnCode":"SNcode", - "hdk.ProductName":"ProductName", + "hdk.gohome":"Back to Home Page", + "hdk.ProductInformation":"Products", + "hdk.SnCode":"SN Code", + "hdk.ProductName":"Product Name", "hdk.Model":"Model", - "hdk.DateOfProduction":"DateOfProduction", - "hdk.ProductionPersonnel":"ProductionPersonnel", - "hdk.ProductSpecification":"ProductSpecification", - "hdk.ProductManual":"ProductManual", - "hdk.InspectionInformation":"InspectionInformation", - "hdk.SoftwareVersion":"SoftwareVersion", - "hdk.HardwareVersion":"HardwareVersion", - "hdk.TestDate":"TestDate", - "hdk.ElectricalParameters":"ElectricalParameters", + "hdk.DateOfProduction":"Production Date", + "hdk.ProductionPersonnel":"Production Personnel", + "hdk.ProductSpecification":"Data Sheet", + "hdk.ProductManual":"User Manual", + "hdk.InspectionInformation":"Inspections", + "hdk.SoftwareVersion":"Software Version", + "hdk.HardwareVersion":"Hardware Version", + "hdk.TestDate":"Inspection Date", + "hdk.ElectricalParameters":"Electric Spec", "hdk.Power":"Power", - "hdk.PowerFactor":"PowerFactor", - "hdk.LightIntensityDistribution":"LightIntensityDistribution", - "hdk.AirTightnessInspectionDocuments":"AirTightnessInspectionDocuments", - "hdk.AttachmentModel":"AttachmentModel", - "hdk.OrderCode":"OrderCode", - "hdk.AttachmentIsEmpty":"AttachmentIsEmpty", - "hdk.scan":"scan", - "hdk.Required":"(Required)", - "hdk.Basicinformation":"BasicInformation", - "hdk.ProblemDescription":"ProblemDescription", - "hdk.DescriptionPlaceholder":"Please describe the situation and location of the problem accurately, which is more conducive to solution", - "hdk.AirportName":"AirportName", + "hdk.PowerFactor":"Power Factor", + "hdk.LightIntensityDistribution":"Light Intensity Distribution", + "hdk.AirTightnessInspectionDocuments":"Airtightness Inspection Files", + "hdk.AttachmentModel":"Model of Accessories", + "hdk.OrderCode":"Order code", + "hdk.AttachmentIsEmpty":"No Attachment", + "hdk.scan":"Scan", + "hdk.Required":"(Mandatory)", + "hdk.Basicinformation":"Basic Information", + "hdk.ProblemDescription":"Description of Questions", + "hdk.DescriptionPlaceholder":"Please describe the circumstance and location of the problem accurately, which is more conducive to solution", + "hdk.AirportName":"Airport", "hdk.Name":"Name", - "hdk.ContactInformations":"ContactInformation", + "hdk.ContactInformation":"Contact", "hdk.Email":"Email", - "hdk.DetailedAddress":"DetailedAddress(e.g.**Street**)", - "hdk.ConfirmAndReport":"ConfirmAndReport", + "hdk.DetailedAddress":"Detailed Address ( No.xxx,xxx Street)", + "hdk.ConfirmAndReport":"Confirm & Report", "hdk.Repair":"Repair", - "hdk.noFile":"NoFiles", + "hdk.noFile":"No Files", "hdk.Check":"Check", - "hdk.Reminder":"WarmReminder", + "hdk.Reminder":"Friendly Tips", "hdk.Confirm":"Confirm", - "hdk.PromptContent":"Confirm submission of this content", + "hdk.PromptContent":"Are you sure to submit this content?", "hdk.Cancel":"Cancel", - "hdk.QRCodeContent":"Two-dimensional code content", + "hdk.QRCodeContent":"Content of QR Code", "hdk.ErrorPrompt1":"The current SN code does not exist, please scan the correct QR code", "hdk.ErrorPrompt2":"The current SN code format is incorrect. Please scan the correct QR code", "hdk.Rescan":"Rescan", - "hdk.FillSNCode":"Please enter the SN code", + "hdk.FillSNCode":"Please enter SN Code", "hdk.FillProductName":"Please fill in the product name", "hdk.FillName":"Please fill in the name", - "hdk.FillEmail":"Please fill in the correct email address", + "hdk.FillEmail":"Please fill in the correct email ", "hdk.FillDescription":"Please fill in the description or upload a picture", "hdk.FillAirportName":"Please fill in the airport name", "hdk.Uploading":"Uploading", "hdk.SuccessfullyReported":"Report successfully", "hdk.CheckSN":"Check whether the SN code is correct", - "hdk.CheckForUnfilledItems":"Check the blanks" + "hdk.CheckForUnfilledItems":"Check the blanks", + "hdk.networkError":"Network Error", + "hdk.fileNotUploaded":"Unuploaded File", + "hdk.loading":"loading", + "hdk.incorrectImportFormat":"Incorrect import format" } diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json index a24b8e7..9fb2ff5 100644 --- a/locale/zh-Hans.json +++ b/locale/zh-Hans.json @@ -16,7 +16,7 @@ "hdk.gohome":"点击回到主页", "hdk.ProductInformation":"产品信息", "hdk.SnCode":"SN码", - "hdk.ProductName":"产品名", + "hdk.ProductName":"产品名称", "hdk.Model":"型号", "hdk.DateOfProduction":"出厂日期", "hdk.ProductionPersonnel":"生产人员", @@ -31,7 +31,7 @@ "hdk.PowerFactor":"功率因数", "hdk.LightIntensityDistribution":"光强分布", "hdk.AirTightnessInspectionDocuments":"气密检测文件", - "hdk.AttachmentModel":"附件型号", + "hdk.AttachmentModel":"型号名称", "hdk.OrderCode":"订货编码", "hdk.AttachmentIsEmpty":"附件为空", "hdk.scan":"扫一扫", @@ -41,12 +41,12 @@ "hdk.DescriptionPlaceholder":"请将所遇问题情况和具体位置描述准确,更有利于解决。", "hdk.AirportName":"机场名", "hdk.Name":"姓名", - "hdk.ContactInformations":"联系方式", + "hdk.ContactInformation":"联系方式", "hdk.Email":"邮箱", "hdk.DetailedAddress":"详细地址(例如**街**号)", "hdk.ConfirmAndReport":"确认并上报", "hdk.Repair":"维护报修", - "hdk.noFile":"无文件", + "hdk.noFile":"暂无文件", "hdk.Check":"查看", "hdk.Reminder":"温馨提示", "hdk.Confirm":"确认", @@ -65,5 +65,9 @@ "hdk.Uploading":"上传中", "hdk.SuccessfullyReported":"上报成功", "hdk.CheckSN":"请检查SN码是否正确", - "hdk.CheckForUnfilledItems":"检查未填项" + "hdk.CheckForUnfilledItems":"检查未填项", + "hdk.networkError":"网络错误", + "hdk.fileNotUploaded":"未上传文件", + "hdk.loading":"加载中", + "hdk.incorrectImportFormat":"导入格式有误" } \ No newline at end of file diff --git a/main.js b/main.js index 6efe720..20f5f3f 100644 --- a/main.js +++ b/main.js @@ -5,7 +5,8 @@ import uView from '@/uni_modules/uview-ui' import { deviceMixin } from '@/utils/utils'; let i18nConfig = { - locale: uni.getLocale(), + // locale: uni.getLocale(), + locale: 'en', //默认英文 messages } diff --git a/manifest.json b/manifest.json index d9f51fd..1620556 100644 --- a/manifest.json +++ b/manifest.json @@ -72,10 +72,10 @@ "h5" : { "router" : { "mode" : "history", - "base" : "/hdk-web/" + "base" : "mobile" }, "devServer" : { - "https" : false + "https" : true } } } diff --git a/mobile/pages/component/AuxiliaryModule.vue b/mobile/pages/component/AuxiliaryModule.vue index 9042af4..fb195e3 100644 --- a/mobile/pages/component/AuxiliaryModule.vue +++ b/mobile/pages/component/AuxiliaryModule.vue @@ -120,7 +120,7 @@ .photo { - margin: 47px 28px 0 28px; + margin: 30px; } diff --git a/mobile/pages/component/InformationModule.vue b/mobile/pages/component/InformationModule.vue index b029f04..8b2bf4d 100644 --- a/mobile/pages/component/InformationModule.vue +++ b/mobile/pages/component/InformationModule.vue @@ -23,7 +23,7 @@ {{$t('hdk.DateOfProduction')}} - {{$u.timeFormat(informationData.productionTime, 'yyyy年mm月dd日') || ""}} + {{$u.timeFormat(informationData.productionTime, 'yyyy-mm-dd') || ""}} {{$t('hdk.ProductionPersonnel')}} diff --git a/mobile/pages/component/InspectionModule.vue b/mobile/pages/component/InspectionModule.vue index bcd1352..24294ac 100644 --- a/mobile/pages/component/InspectionModule.vue +++ b/mobile/pages/component/InspectionModule.vue @@ -179,7 +179,6 @@ .fileViewingModule { width: 80%; - height: 235px; margin: 20px 24px; padding: 2px 2px 2px 2px; border-radius: 20px; @@ -201,7 +200,7 @@ .photo { - margin: 47px 28px 0 28px; + margin: 30px; } diff --git a/mobile/pages/component/topWindow.vue b/mobile/pages/component/topWindow.vue index 58b7265..1cfe6ad 100644 --- a/mobile/pages/component/topWindow.vue +++ b/mobile/pages/component/topWindow.vue @@ -1,7 +1,7 @@ + + diff --git a/pages/component/AuxiliaryModule.vue b/pages/component/AuxiliaryModule.vue new file mode 100644 index 0000000..fb195e3 --- /dev/null +++ b/pages/component/AuxiliaryModule.vue @@ -0,0 +1,145 @@ + + + + + \ No newline at end of file diff --git a/pages/component/InformationModule.vue b/pages/component/InformationModule.vue new file mode 100644 index 0000000..8b2bf4d --- /dev/null +++ b/pages/component/InformationModule.vue @@ -0,0 +1,196 @@ + + + + + \ No newline at end of file diff --git a/pages/component/InspectionModule.vue b/pages/component/InspectionModule.vue new file mode 100644 index 0000000..24294ac --- /dev/null +++ b/pages/component/InspectionModule.vue @@ -0,0 +1,224 @@ + + + + + \ No newline at end of file diff --git a/pages/component/QrScan.vue b/pages/component/QrScan.vue new file mode 100644 index 0000000..5f9d434 --- /dev/null +++ b/pages/component/QrScan.vue @@ -0,0 +1,100 @@ + + + + + \ No newline at end of file diff --git a/pages/component/UploadFile.vue b/pages/component/UploadFile.vue new file mode 100644 index 0000000..53dac04 --- /dev/null +++ b/pages/component/UploadFile.vue @@ -0,0 +1,222 @@ + + + + + \ No newline at end of file diff --git a/pages/component/component.vue b/pages/component/component.vue new file mode 100644 index 0000000..151b350 --- /dev/null +++ b/pages/component/component.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/component/goback.vue b/pages/component/goback.vue new file mode 100644 index 0000000..8a8f49d --- /dev/null +++ b/pages/component/goback.vue @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/pages/component/topWindow.vue b/pages/component/topWindow.vue new file mode 100644 index 0000000..27d0128 --- /dev/null +++ b/pages/component/topWindow.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/pages/homePage/index.vue b/pages/homePage/index.vue new file mode 100644 index 0000000..5dbe786 --- /dev/null +++ b/pages/homePage/index.vue @@ -0,0 +1,263 @@ + + + + + \ No newline at end of file diff --git a/pages/product/index.vue b/pages/product/index.vue new file mode 100644 index 0000000..aea124d --- /dev/null +++ b/pages/product/index.vue @@ -0,0 +1,332 @@ + + + + + \ No newline at end of file diff --git a/pages/product/invalidCode.vue b/pages/product/invalidCode.vue new file mode 100644 index 0000000..f98206a --- /dev/null +++ b/pages/product/invalidCode.vue @@ -0,0 +1,147 @@ + + + + + \ No newline at end of file diff --git a/pages/product/repairReport.vue b/pages/product/repairReport.vue new file mode 100644 index 0000000..ac6ada8 --- /dev/null +++ b/pages/product/repairReport.vue @@ -0,0 +1,467 @@ + + + + + \ No newline at end of file diff --git a/pages/product/scan.vue b/pages/product/scan.vue new file mode 100644 index 0000000..4b56906 --- /dev/null +++ b/pages/product/scan.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/postcss.config.js b/postcss.config.js index 02c01b1..1fe9ea2 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -9,7 +9,7 @@ module.exports = { fontViewportUnit: 'px', // 字体使用的视口单位 // 需要忽略的CSS选择器,不会转为视口单位,使用原有的px等单位。 // 下面配置表示类名中含有'keep-px'都不会被转换 - selectorBlackList: ['keep-px','u-modal','u-form-item'], + selectorBlackList: ['keep-px','u-modal','u-form-item','u-upload',"uni-input"], minPixelValue: 1, // 设置最小的转换数值,如果为1的话,只有大于1的值会被转换 mediaQuery: false, // 媒体查询里的单位是否需要转换单位 replace: true, // 是否直接更换属性值,而不添加备用属性 -- libgit2 0.21.2