Commit f6e1e7070d856985077e38ef1dd81c8e83666b95

Authored by 郭伟龙
1 parent 1256c82b
Exists in develop

fix: 样式调整

locale/en.json
... ... @@ -3,24 +3,9 @@
3 3 "locale.en": "English",
4 4 "locale.zh-hans": "简体中文",
5 5 "locale.zh-hant": "繁体中文",
6   - "locale.ja": "日语",
7   - "index.title": "Hello i18n",
8   - "index.home": "Home",
9   - "index.component": "Component",
10   - "index.api": "API",
11   - "index.schema": "Schema",
12   - "index.demo": "uni-app globalization",
13   - "index.demo-description": "Include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API, Schema",
14   - "index.detail": "Detail",
15 6 "index.language": "Language",
16 7 "index.language-info": "Settings",
17 8 "index.system-language": "System language",
18   - "index.application-language": "Application language",
19   - "index.language-change-confirm": "Applying this setting will restart the app",
20   - "api.message": "Message",
21   - "schema.name": "Name",
22   - "schema.add": "Add",
23   - "schema.add-success": "Add success",
24 9 "hdk.productInformation":"ProductInformation",
25 10 "hdk.inspectionInformation":"InspectionInformation",
26 11 "hdk.attachmentInformation":"AttachmentInformation",
... ... @@ -31,7 +16,7 @@
31 16 "hdk.gohome":"Click back to Home",
32 17 "hdk.ProductInformation":"productInformation",
33 18 "hdk.SnCode":"SNcode",
34   - "hdk.ProductName":"productName",
  19 + "hdk.ProductName":"ProductName",
35 20 "hdk.Model":"Model",
36 21 "hdk.DateOfProduction":"DateOfProduction",
37 22 "hdk.ProductionPersonnel":"ProductionPersonnel",
... ... @@ -60,5 +45,25 @@
60 45 "hdk.Email":"Email",
61 46 "hdk.DetailedAddress":"DetailedAddress(e.g.**Street**)",
62 47 "hdk.ConfirmAndReport":"ConfirmAndReport",
63   - "hdk.Repair":"Repair"
  48 + "hdk.Repair":"Repair",
  49 + "hdk.noFile":"NoFiles",
  50 + "hdk.Check":"Check",
  51 + "hdk.Reminder":"WarmReminder",
  52 + "hdk.Confirm":"Confirm",
  53 + "hdk.PromptContent":"Confirm submission of this content",
  54 + "hdk.Cancel":"Cancel",
  55 + "hdk.QRCodeContent":"Two-dimensional code content",
  56 + "hdk.ErrorPrompt1":"The current SN code does not exist, please scan the correct QR code",
  57 + "hdk.ErrorPrompt2":"The current SN code format is incorrect. Please scan the correct QR code",
  58 + "hdk.Rescan":"Rescan",
  59 + "hdk.FillSNCode":"Please enter the SN code",
  60 + "hdk.FillProductName":"Please fill in the product name",
  61 + "hdk.FillName":"Please fill in the name",
  62 + "hdk.FillEmail":"Please fill in the correct email address",
  63 + "hdk.FillDescription":"Please fill in the description or upload a picture",
  64 + "hdk.FillAirportName":"Please fill in the airport name",
  65 + "hdk.Uploading":"Uploading",
  66 + "hdk.SuccessfullyReported":"Report successfully",
  67 + "hdk.CheckSN":"Check whether the SN code is correct",
  68 + "hdk.CheckForUnfilledItems":"Check the blanks"
64 69 }
... ...
locale/zh-Hans.json
... ... @@ -3,24 +3,9 @@
3 3 "locale.en": "English",
4 4 "locale.zh-hans": "简体中文",
5 5 "locale.zh-hant": "繁体中文",
6   - "locale.ja": "日语",
7   - "index.title": "Hello i18n",
8   - "index.home": "主页",
9   - "index.component": "组件",
10   - "index.api": "API",
11   - "index.schema": "Schema",
12   - "index.demo": "uni-app 国际化演示",
13   - "index.demo-description": "包含 uni-framework、manifest.json、pages.json、tabbar、页面、组件、API、Schema",
14   - "index.detail": "详情",
15 6 "index.language": "语言",
16 7 "index.language-info": "语言信息",
17 8 "index.system-language": "系统语言",
18   - "index.application-language": "应用语言",
19   - "index.language-change-confirm": "应用此设置将重启App",
20   - "api.message": "提示",
21   - "schema.name": "姓名",
22   - "schema.add": "新增",
23   - "schema.add-success": "新增成功",
24 9 "hdk.productInformation":"产品信息",
25 10 "hdk.inspectionInformation":"检验信息",
26 11 "hdk.attachmentInformation":"附件信息",
... ... @@ -54,12 +39,31 @@
54 39 "hdk.Basicinformation":"基本信息",
55 40 "hdk.ProblemDescription":"问题描述",
56 41 "hdk.DescriptionPlaceholder":"请将所遇问题情况和具体位置描述准确,更有利于解决。",
57   - "hdk.ContactInformation":"联系方式",
58 42 "hdk.AirportName":"机场名",
59 43 "hdk.Name":"姓名",
60 44 "hdk.ContactInformations":"联系方式",
61 45 "hdk.Email":"邮箱",
62 46 "hdk.DetailedAddress":"详细地址(例如**街**号)",
63 47 "hdk.ConfirmAndReport":"确认并上报",
64   - "hdk.Repair":"维护报修"
  48 + "hdk.Repair":"维护报修",
  49 + "hdk.noFile":"无文件",
  50 + "hdk.Check":"查看",
  51 + "hdk.Reminder":"温馨提示",
  52 + "hdk.Confirm":"确认",
  53 + "hdk.PromptContent":"确定提交此内容",
  54 + "hdk.Cancel":"取消",
  55 + "hdk.QRCodeContent":"二维码内容",
  56 + "hdk.ErrorPrompt1":"当前SN码不存在,请扫描正确的二维码",
  57 + "hdk.ErrorPrompt2":"当前SN码格式不正确,请扫描正确的二维码",
  58 + "hdk.Rescan":"重新扫描",
  59 + "hdk.FillSNCode":"请填写SN码",
  60 + "hdk.FillProductName":"请填写产品名称",
  61 + "hdk.FillName":"请填写名称",
  62 + "hdk.FillEmail":"请填写正确的邮箱",
  63 + "hdk.FillDescription":"请填写描述或上传图片",
  64 + "hdk.FillAirportName":"请填写机场名",
  65 + "hdk.Uploading":"上传中",
  66 + "hdk.SuccessfullyReported":"上报成功",
  67 + "hdk.CheckSN":"请检查SN码是否正确",
  68 + "hdk.CheckForUnfilledItems":"检查未填项"
65 69 }
66 70 \ No newline at end of file
... ...
mobile/pages/component/QrScan.vue
... ... @@ -50,7 +50,11 @@
50 50 }, {
51 51 fps: 10, // 设置每秒多少帧
52 52 aspectRatio: 1,
53   - qrbox: 250 // 设置取景范围
  53 + qrbox: 250, // 设置取景范围
  54 + colorDark: '#0000ff', //加深二维码黑色部分的颜色提高识别度
  55 + colorLight: '#ffffff', //这个应该是提高非黑即白部分的亮度 提高识别度
  56 + visualFeedback: true, //开启视觉反馈 没有体会到
  57 + halfSample: true, //缩小二维码提高识别精度吧
54 58 },
55 59 (decodedText) => {
56 60 this.$emit('ok', decodedText);
... ... @@ -81,9 +85,10 @@
81 85 <style lang="scss" scoped>
82 86 .qrcode {
83 87 position: absolute;
84   - height: 100vh;
85   - width: 100vw;
86   - background: rgba($color: #000000, $alpha: 0.48);
  88 + height: 100%;
  89 + width: 100%;
  90 + // background: rgba($color: #000000, $alpha: 0.48);
  91 + background:rgba(0, 0, 0, 1.48);
87 92 }
88 93  
89 94  
... ...
mobile/pages/component/UploadFile.vue
... ... @@ -6,14 +6,10 @@
6 6 <u-icon name="/static/images/icon/excelIcon.png" size="33px" v-if="fileType == 2"></u-icon>
7 7 <u-icon name="/static/images/icon/csvIcon.png" size="33px" v-if="fileType == 3"></u-icon>
8 8 <text class="iconTitle"
9   - @click="seeFile">{{downloadFileName ? downloadFileName.substring(downloadFileName.lastIndexOf('/') + 1) : '暂无文件'}}</text>
  9 + @click="seeFile">{{downloadFileName ? downloadFileName.substring(downloadFileName.lastIndexOf('/') + 1) : $t('hdk.noFile')}}</text>
10 10 </view>
11   - <!-- <view class="rightText" @click="seeFile('download')" v-if="downloadFileNamePath != ''">
12   - 下载
13   - </view> -->
14 11 <view class="rightText" @click="seeFile('preview')" v-if="downloadFileNamePath != ''">
15   - <!-- {{isCsv?'分享':'查看'}} -->
16   - 查看
  12 + {{$t('hdk.Check')}}
17 13 </view>
18 14 </view>
19 15 </view>
... ...
mobile/pages/component/topWindow.vue
... ... @@ -109,6 +109,7 @@
109 109 }
110 110  
111 111 .b-navbar {
  112 + width: 100vw;
112 113 background-color: #00AEAA;
113 114 display: flex;
114 115 }
... ...
mobile/pages/homePage/index.vue
... ... @@ -12,9 +12,8 @@
12 12 style="background:#00AEAA;">{{$t('hdk.search')}}</b-button>
13 13 </view>
14 14 <view class="errorTipCss" v-if="isError">
15   - <image src="/static/images/icon/warning.png" style="width:16px;height:16px;margin: 2px;" mode="">
16   - </image>
17   - {{$t('hdk.sninexistence')}}
  15 + <image class="errorImageCss" src="/static/images/icon/warning.png" style="width:16px;height:16px;margin: 2px;" mode="widthFix" />
  16 + <text>{{$t('hdk.sninexistence')}}</text>
18 17 </view>
19 18 <view class="btnSNscan" @click="scanClick" v-if="$isMobile">
20 19 <u-icon name="/static/images/icon/scan2.png"></u-icon>
... ... @@ -68,7 +67,7 @@
68 67 },
69 68 methods: {
70 69 getFirstSnFromUrl(url) {
71   - const regex = /[?&]sn=([^&#]*)/i;
  70 + const regex = /sn=([^&]+)/;
72 71 const match = url.match(regex);
73 72 if (match && match.length > 1) {
74 73 const sn = match[1];
... ... @@ -189,10 +188,46 @@
189 188 color: #ffffff;
190 189 text-align: center;
191 190 }
  191 +
  192 + .tipsCss {
  193 + margin: 16px 0 22px 0;
  194 + font-size: 16px;
  195 + color: #ffffff;
  196 + }
  197 +
  198 + .errorTipCss {
  199 + overflow: hidden;
  200 + display: flex;
  201 + align-items: flex-start;
  202 + margin-top: 16px;
  203 + font-size: 16px;
  204 + color: red;
  205 + }
  206 + .errorImageCss{
  207 + margin-top: 4px !important;
  208 + }
  209 +
192 210 }
193 211  
194 212 //PC端样式
195 213 @media screen and (min-width: 768px) {
  214 +
  215 + .tipsCss {
  216 + margin: 16px 0 22px 0;
  217 + font-size: 16px;
  218 + color: #ffffff;
  219 + }
  220 +
  221 + .errorTipCss {
  222 + display: flex;
  223 + align-items: center;
  224 + overflow: hidden;
  225 + margin-top: 16px;
  226 + font-size: 16px;
  227 + color: red;
  228 + }
  229 +
  230 +
196 231 .inputCss {
197 232 width: 566px;
198 233 height: 44px;
... ... @@ -226,18 +261,5 @@
226 261 }
227 262 }
228 263  
229   - .tipsCss {
230   - margin: 16px 0 22px 0;
231   - font-size: 16px;
232   - color: #ffffff;
233   - }
234   -
235   - .errorTipCss {
236   - display: flex;
237   - justify-content: center;
238   - align-items: center;
239   - margin-top: 16px;
240   - font-size: 16px;
241   - color: red;
242   - }
  264 +
243 265 </style>
244 266 \ No newline at end of file
... ...
mobile/pages/product/invalidCode.vue
... ... @@ -5,7 +5,7 @@
5 5 <u-image src="/static/images/icon/invalidPhoto.png" width="400rpx" height="400rpx"></u-image>
6 6 </view>
7 7 <view class="flex-column">
8   - <view class="snCodeText">二维码内容:{{snCode}}</view>
  8 + <view class="snCodeText">{{$t('hdk.QRCodeContent')}}:{{snCode}}</view>
9 9 <!-- <view class="firstLine">
10 10 当前SN码不存在
11 11 </view>
... ... @@ -22,7 +22,7 @@
22 22 </view>
23 23 </view>
24 24 <view class="rescan" @click="rescan">
25   - 重新扫描
  25 + {{$t('hdk.Rescan')}}
26 26 </view>
27 27 </view>
28 28 </template>
... ... @@ -39,8 +39,8 @@
39 39 data() {
40 40 return {
41 41 snCode: "",
42   - error1: '当前SN码不存在,请扫描正确的二维码',
43   - error2: '当前SN码格式不正确,请扫描正确的二维码'
  42 + error1: this.$t('hdk.ErrorPrompt1'),
  43 + error2: this.$t('hdk.ErrorPrompt2')
44 44 }
45 45 },
46 46 computed: {
... ...
mobile/pages/product/repairReport.vue
... ... @@ -27,7 +27,7 @@
27 27 <view class="title">{{$t('hdk.ProblemDescription')}}<text
28 28 style="color:#8B91A4;">{{$t('hdk.Required')}}</text></view>
29 29 <view class="textAreaCss">
30   - <u-textarea v-model="modal.formInfo.repairDescribe" count maxlength="200"
  30 + <u-textarea :placeholderStyle="!$isMobile?'font-size:18px':''" v-model="modal.formInfo.repairDescribe" count maxlength="200"
31 31 :placeholder="$t('hdk.DescriptionPlaceholder')"></u-textarea>
32 32 </view>
33 33 <view class="uploadCss">
... ... @@ -48,7 +48,7 @@
48 48 borderBottom ref="item4">
49 49 <u-input v-model="modal.formInfo.contactPersonName" border="none"></u-input>
50 50 </u-form-item>
51   - <u-form-item :label="$t('hdk.ContactInformation')" labelWidth="50%" prop="formInfo.phone"
  51 + <u-form-item :label="$t('hdk.ContactInformations')" labelWidth="50%" prop="formInfo.phone"
52 52 borderBottom ref="item5">
53 53 <u-input v-model="modal.formInfo.contactPersonPhone" border="none"></u-input>
54 54 </u-form-item>
... ... @@ -66,7 +66,7 @@
66 66 <view class="submitBtn" @click="openModal()">
67 67 {{$t('hdk.ConfirmAndReport')}}
68 68 </view>
69   - <u-modal :show="confirmModal" :title="title" showCancelButton @confirm="submit()"
  69 + <u-modal :show="confirmModal" :title="title" :confirmText="$t('hdk.Confirm')" :cancelText="$t('hdk.Cancel')" showCancelButton @confirm="submit()"
70 70 @cancel="confirmModal = false">
71 71 <view class="slot-content">
72 72 <rich-text class="contentTextCss" :nodes="content"></rich-text>
... ... @@ -116,37 +116,37 @@
116 116 'formInfo.sn': {
117 117 type: 'string',
118 118 required: true,
119   - message: '请填写SN码',
  119 + message: this.$t('hdk.FillSNCode'),
120 120 trigger: ['blur', 'change']
121 121 },
122 122 'formInfo.productName': {
123 123 type: 'string',
124 124 required: true,
125   - message: '请填写产品名称',
  125 + message: this.$t('hdk.FillProductName'),
126 126 trigger: ['blur', 'change']
127 127 },
128 128 'formInfo.contactPersonName': {
129 129 type: 'string',
130 130 required: true,
131   - message: '请填写名称',
  131 + message: this.$t('hdk.FillName'),
132 132 trigger: ['blur', 'change']
133 133 },
134 134 'formInfo.email': {
135 135 type: 'email',
136 136 required: true,
137   - message: '请填写正确的邮箱',
  137 + message: this.$t('hdk.FillEmail'),
138 138 trigger: ['blur', 'change']
139 139 },
140 140 'formInfo.repairDescribe': {
141 141 type: 'string',
142 142 required: true,
143   - message: '请填写描述或上传图片/视频',
  143 + message: this.$t('hdk.FillDescription'),
144 144 trigger: ['blur', 'change']
145 145 },
146 146 'formInfo.airportName': {
147 147 type: 'string',
148 148 required: true,
149   - message: '请填写机场名',
  149 + message: this.$t('hdk.FillAirportName'),
150 150 trigger: ['blur', 'change']
151 151 },
152 152 },
... ... @@ -180,7 +180,7 @@
180 180 data.fileList.push({
181 181 ...item,
182 182 status: 'uploading',
183   - message: '上传中'
  183 + message: this.$t('hdk.Uploading')
184 184 })
185 185 })
186 186 for (let i = 0; i < lists.length; i++) {
... ... @@ -202,16 +202,14 @@
202 202 // return;
203 203 return new Promise((resolve, reject) => {
204 204 let a = uni.uploadFile({
205   - url: config.baseUrl + '/upload-file', // 仅为示例,非真实的接口地址
  205 + url: config.baseUrl + '/upload-file',
206 206 header: {
207 207 'tenant-id': '1',
208   - 'Content-Type': 'multipart/form-data'
  208 + // 'Content-Type': 'multipart/form-data;'
209 209 },
210 210 filePath: url,
211 211 name: "file",
212   - // formData: {
213   - // user: 'test'
214   - // },
  212 +
215 213 success: (res) => {
216 214 console.log(res);
217 215 let data = JSON.parse(res.data);
... ... @@ -228,8 +226,8 @@
228 226 })
229 227 },
230 228 openModal() {
231   - this.title = "温馨提示";
232   - this.content = "确认提交此内容";
  229 + this.title = this.$t('hdk.Reminder');
  230 + this.content = this.$t('hdk.PromptContent');
233 231 this.confirmModal = true
234 232 },
235 233 submit() {
... ... @@ -243,7 +241,7 @@
243 241 if (res.code === 0) {
244 242 this.$refs.uToast.show({
245 243 type: 'success',
246   - message: "上报成功",
  244 + message: this.$t('hdk.SuccessfullyReported'),
247 245 iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png',
248 246 complete() {
249 247 uni.navigateBack(1)
... ... @@ -253,7 +251,7 @@
253 251 this.$refs.uToast.show({
254 252 type: 'error',
255 253 icon: false,
256   - message: "请检查SN码是否正确",
  254 + message: this.$t('hdk.CheckSN'),
257 255 iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
258 256 })
259 257 }
... ... @@ -262,7 +260,7 @@
262 260 this.$refs.uToast.show({
263 261 type: 'error',
264 262 icon: false,
265   - message: "请填写描述或上传图片/视频",
  263 + message: this.$t('hdk.FillDescription'),
266 264 iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
267 265 })
268 266 }
... ... @@ -270,7 +268,7 @@
270 268 this.$refs.uToast.show({
271 269 type: 'error',
272 270 icon: false,
273   - message: "检查未填项",
  271 + message: this.$t('hdk.CheckForUnfilledItems'),
274 272 iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/error.png'
275 273 })
276 274 console.log(errors);
... ... @@ -388,6 +386,18 @@
388 386 width: 80%;
389 387 position: relative;
390 388 }
  389 +
  390 + /deep/.uni-textarea-textarea{
  391 + font-size: 18px;
  392 + }
  393 +
  394 + /deep/.uni-input-input{
  395 + font-size: 20px !important;
  396 + }
  397 +
  398 + /deep/.u-form-item__body__right__message{
  399 + font-size: 18px;
  400 + }
391 401  
392 402 /deep/.u-form-item__body__left__content__label {
393 403 font-size: 22px;
... ...
mobile/pages/product/scan.vue
... ... @@ -44,7 +44,7 @@
44 44 if (browser.versions.webKit || browser.versions.weixin || browser.versions.gecko) {
45 45 this.open = true;
46 46 } else {
47   - Toast('该浏览器不支持,请打开主流浏览器:谷歌、火狐,或微信内打开');
  47 + Toast('Browser not supported');
48 48 }
49 49 },
50 50 onLoad() {
... ... @@ -54,7 +54,10 @@
54 54 getResult(sn) {
55 55 console.log(sn);
56 56 this.open = false;
57   - let sncode = sn.substring(sn.lastIndexOf(":") + 1);
  57 + const regex = /sn=([^&]+)/;
  58 + const match = regex.exec(sn);
  59 + const sncode = match ? match[1] : sn;
  60 + // let sncode = sn.substring(sn.lastIndexOf(":") + 1);
58 61 getProductFind(sncode).then(res => {
59 62 console.log(res);
60 63 if (res.code === 1400001001) {
... ...