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/mobile/pages/homePage/index.vue b/mobile/pages/homePage/index.vue
index f2f1581..a13ab95 100644
--- a/mobile/pages/homePage/index.vue
+++ b/mobile/pages/homePage/index.vue
@@ -27,7 +27,7 @@
import {
getProductFind
} from '@/api/scan'
- import topWindow from "@/mobile/pages/component/topWindow.vue"
+ import topWindow from "@/pages/component/topWindow.vue"
export default {
data() {
return {
@@ -112,7 +112,7 @@
console.log("sn查询结果", res)
const data = res.data;
uni.navigateTo({
- url: "/mobile/pages/product/index?sn=" + this.SNcode
+ url: "/pages/product/index?sn=" + this.SNcode
})
} else {
this.isError = true
@@ -121,7 +121,7 @@
},
scanClick() {
uni.navigateTo({
- url: "/mobile/pages/product/scan"
+ url: "/pages/product/scan"
})
},
getResult(res) {
diff --git a/mobile/pages/product/index.vue b/mobile/pages/product/index.vue
index ac1bc3d..66101f3 100644
--- a/mobile/pages/product/index.vue
+++ b/mobile/pages/product/index.vue
@@ -28,11 +28,11 @@
import {
getProductFind
} from '@/api/scan'
- import topWindow from "@/mobile/pages/component/topWindow.vue"
- import goback from "@/mobile/pages/component/goback.vue"
- import InformationModule from '@/mobile/pages/component/InformationModule.vue'
- import InspectionModule from '@/mobile/pages/component/InspectionModule.vue'
- import AuxiliaryModule from '@/mobile/pages/component/AuxiliaryModule.vue'
+ import topWindow from "@/pages/component/topWindow.vue"
+ import goback from "@/pages/component/goback.vue"
+ import InformationModule from '@/pages/component/InformationModule.vue'
+ import InspectionModule from '@/pages/component/InspectionModule.vue'
+ import AuxiliaryModule from '@/pages/component/AuxiliaryModule.vue'
export default {
components: {
InformationModule,
@@ -182,7 +182,7 @@
jumpService() {
console.log(this.repairInformation);
uni.navigateTo({
- url: "/mobile/pages/product/repairReport?repairpObject=" + encodeURIComponent(JSON.stringify(
+ url: "/pages/product/repairReport?repairpObject=" + encodeURIComponent(JSON.stringify(
this.repairInformation)),
})
},
diff --git a/mobile/pages/product/invalidCode.vue b/mobile/pages/product/invalidCode.vue
index 53180d2..f98206a 100644
--- a/mobile/pages/product/invalidCode.vue
+++ b/mobile/pages/product/invalidCode.vue
@@ -28,7 +28,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 @@
+
+
+
+
+
+
+ {{$t('hdk.AttachmentModel')}}:{{item.type}}
+
+ currents[index] = e.current"
+ :indicatorStyle="{bottom:'20px',right:'5px'}">
+
+ {{$t('hdk.OrderCode')}}:{{item.orderCode}}
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+ {{$t('hdk.productInformation')}}
+
+
+ {{$t('hdk.SnCode')}}
+ {{informationData.sn || ""}}
+
+
+ {{$t('hdk.ProductName')}}
+ {{informationData.productName || ""}}
+
+
+ {{$t('hdk.Model')}}
+ {{informationData.type || ""}}
+
+
+ {{$t('hdk.DateOfProduction')}}
+ {{$u.timeFormat(informationData.productionTime, 'yyyy-mm-dd') || ""}}
+
+
+ {{$t('hdk.ProductionPersonnel')}}
+ {{informationData.productionUserName || ""}}
+
+
+
+
+ {{$t('hdk.ProductSpecification')}}
+
+
+
+
+
+
+ {{$t('hdk.ProductManual')}}
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+ {{$t('hdk.inspectionInformation')}}
+
+
+ {{$t('hdk.SoftwareVersion')}}
+ {{inspectionData.softwareVersion || ''}}
+
+
+ {{$t('hdk.HardwareVersion')}}
+ {{inspectionData.hardwareVersion || ''}}
+
+
+ {{$t('hdk.TestDate')}}
+ {{$u.timeFormat(inspectionData.checkTime, 'yyyy年mm月dd日') || ''}}
+
+
+
+
+
+ {{$t('hdk.ElectricalParameters')}}
+
+
+ {{$t('hdk.Power')}}
+ {{inspectionData.power || ''}}
+
+
+ {{$t('hdk.PowerFactor')}}
+ {{inspectionData.powerFactor || ''}}
+
+
+
+
+
+ {{$t('hdk.LightIntensityDistribution')}}
+
+
+
+
+
+
+
+
+
+ {{$t('hdk.AirTightnessInspectionDocuments')}}
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+ {{downloadFileName ? downloadFileName.substring(downloadFileName.lastIndexOf('/') + 1) : $t('hdk.noFile')}}
+
+
+ {{$t('hdk.Check')}}
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+ {{$t('hdk.productInformation')}}
+
+
+ {{$t('hdk.inspectionInformation')}}
+
+
+ {{$t('hdk.attachmentInformation')}}
+
+
+
+
+ {{selectedLanguage}}
+
+ {{$t('locale.en')}}
+
+ {{$t('locale.zh-hans')}}
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+ {{$t('hdk.tips')}}
+
+
+ {{$t('hdk.search')}}
+
+
+
+ {{$t('hdk.sninexistence')}}
+
+
+
+ {{$t('hdk.scan')}}
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$t("hdk.Repair")}}
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+ {{$t('hdk.QRCodeContent')}}:{{snCode}}
+
+
+
+
+
+
+ {{isSNCode(snCode)?error1:error2}}
+
+
+
+
+ {{$t('hdk.Rescan')}}
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+ {{$t('hdk.Basicinformation')}}{{$t('hdk.Required')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$t('hdk.ProblemDescription')}}{{$t('hdk.Required')}}
+
+
+
+
+
+
+
+
+ {{$t('hdk.ContactInformation')}}{{$t('hdk.Required')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$t('hdk.ConfirmAndReport')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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