Handy_Cao 4 місяців тому
батько
коміт
39de993926

+ 3 - 0
public/locales/en-US.json

@@ -13,6 +13,9 @@
         "delivery": "Delivery"
     },
     "common": {
+        "uploading": "uploading...",
+        "loaderror": "upload error",
+        "loadtips": "To use this function normally, album permission is required. Do you need to go to the Settings page to enable the permission?",
         "pulling-text": "Pull down to refresh...",
         "loosing-text": "Release to load...",
         "loading-text": "Loading..",

+ 3 - 0
public/locales/th-TH.json

@@ -13,6 +13,9 @@
         "delivery": "ส่งมอบ"
     },
     "common": {
+        "uploading": "กำลังขึ้น...",
+        "loaderror": "ล้มเหลวในการอัปโหลด",
+        "loadtips": "ต้องการสิทธิ์ในอัลบั้มเพื่อใช้งานคุณสมบัติตามปกติคุณต้องไป ที่การเปิดใช้งานหน้าการตั้งค่า หรือไม่?",
         "pulling-text": "เลื่อนลงเพื่อรีเฟรช",
         "loosing-text": "ปล่อยเพื่อเริ่มโหลด",
         "loading-text": "กำลังดำเนินการโหลด...",

+ 3 - 0
public/locales/vi-VN.json

@@ -13,6 +13,9 @@
         "delivery": "Giao nhận"
     },
     "common": {
+        "uploading": "Đi lên...",
+        "loaderror": "Tải lên thất bại",
+        "loadtips": "Cần phải có quyền tập ảnh để sử dụng chức năng này, cho dù đi đến trang thiết lập để mở quyền?",
         "pulling-text": "Kéo xuống để làm mới",
         "loosing-text": "Thả ra để tải",
         "loading-text": "Đang tải...",

+ 3 - 0
public/locales/zh-CN.json

@@ -13,6 +13,9 @@
         "delivery": "交收"
     },
     "common": {
+        "uploading": "上传中...",
+        "loaderror": "上传失败",
+        "loadtips": "需要相册权限才能正常使用该功能,是否前往设置页面开启权限?",
         "pulling-text": "下拉即可加载...",
         "loosing-text": "释放即可加载...",
         "loading-text": "加载中...",

+ 3 - 0
public/locales/zh-TW.json

@@ -13,6 +13,9 @@
         "delivery": "交收"
     },
     "common": {
+        "uploading": "上傳中...",
+        "loaderror": "上傳失敗",
+        "loadtips": "需要相冊權限才能正常使用該功能,是否前往設置頁面開啓權限?",
         "pulling-text": "下拉即可加载...",
         "loosing-text": "釋放即可加载...",
         "loading-text": "加载中...",

+ 4 - 3
src/packages/mobile/components/base/gallery/index.vue

@@ -30,6 +30,7 @@ import { computed, PropType } from 'vue'
 import { Image, Icon, Loading, showFailToast, showDialog } from 'vant'
 import { UploadFile } from './types'
 import h5plus from '@/utils/h5plus'
+import { i18n } from '@/stores'
 
 const props = defineProps({
     modelValue: {
@@ -53,11 +54,11 @@ const props = defineProps({
     },
     loadingText: {
         type: String,
-        default: '上传中...'
+        default: i18n.global.t('common.uploading')
     },
     errorText: {
         type: String,
-        default: '上传失败'
+        default: i18n.global.t('common.loaderror')
     },
     // 是否开启覆盖上传,开启后会关闭图片预览
     reupload: {
@@ -106,7 +107,7 @@ const checkImagesPermission = () => {
                         },
                         onError: (error) => {
                             showDialog({
-                                message: '需要相册权限才能正常使用该功能,是否前往设置页面开启权限?',
+                                message: i18n.global.t('common.loadtips'),
                                 showCancelButton: true,
                                 cancelButtonText: '否',
                                 confirmButtonText: '是'

+ 0 - 1
src/packages/tss/views/order/delivery/components/offline/Index.vue

@@ -76,7 +76,6 @@ import { getGoodsUnitName } from '@/constants/unit'
 const dataList = shallowRef<Model.MineTradeGoodsDeliveryOfflinesRsp[]>([])
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
-const { t } = i18n.global
 
 const { loading, pageIndex, pageCount, run } = useRequest(queryMineTradeGoodsDeliveryOfflines, {
     defaultParams: {