浏览代码

feat: 修改

TIANYONG 7 月之前
父节点
当前提交
afb57135bb
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/views/creation/edit/index.tsx

+ 4 - 3
src/views/creation/edit/index.tsx

@@ -13,7 +13,7 @@ import { browser } from '@/helpers/utils'
 export default defineComponent({
   name: 'creation-edit',
   setup() {
-    const {isTablet} = browser()
+    const { isTablet, ios, iPhone } = browser()
     const route = useRoute()
     const router = useRouter()
     const state = reactive({
@@ -23,7 +23,7 @@ export default defineComponent({
       desc: '',
       videoImg: '', // 视频封面
       img: '',
-      needCheckDevice: true,
+      needCheckDevice: (ios || iPhone) ? true : false,
       hasDeviceAuth: false, // 有设备相机权限
     })
 
@@ -135,13 +135,14 @@ export default defineComponent({
           <MHeader background={'#F1F1F1'} border={false} />
         </MSticky>
         <div class={[styles.section, styles.sectionFile]}>
-          <div class={styles.uploadImg}>
+          <div class={styles.uploadImg} onClick={checkDeviceAuth}>
             <MUploader
               class={styles.muploader}
               // native
               cropper
               tips={''}
               deletable={false}
+              hasDeviceAuth={state.hasDeviceAuth}
               v-model:modelValue={state.img}
             />
             {/* <div class={styles.tip}>选封面</div> */}