lex-xin 5 年之前
父節點
當前提交
63ee40127f
共有 6 個文件被更改,包括 38 次插入18 次删除
  1. 2 2
      src/common/axios.js
  2. 3 3
      src/main.js
  3. 2 2
      src/utils/fileUtil.js
  4. 2 2
      src/views/PaymentResult.vue
  5. 26 9
      src/views/app/AppDetail.vue
  6. 3 0
      src/views/signup/SignUpLevel.vue

+ 2 - 2
src/common/axios.js

@@ -58,11 +58,11 @@ _axios.interceptors.response.use(
       // window.localStorage.removeItem('userInfo') // 删除用户信息
       window.localStorage.removeItem('Authorization') // 删除用户信息
       if (browser().android) {
-        DAYA.postMessage(JSON.stringify({
+        EXAM.postMessage(JSON.stringify({
           api: 'login'
         }))
       } else if (browser().iPhone) {
-        window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({
+        window.webkit.messageHandlers.EXAM.postMessage(JSON.stringify({
           api: 'login'
         }))
       } else {

+ 3 - 3
src/main.js

@@ -24,9 +24,9 @@ Vue.config.productionTip = false
 
 
 //main.js中
-// import Vconsole from 'vconsole'
-// const vconsole = new Vconsole()
-// Vue.use(vconsole)
+import Vconsole from 'vconsole'
+const vconsole = new Vconsole()
+Vue.use(vconsole)
 // import VueAMap from 'vue-amap'
 // Vue.use(VueAMap)
 // VueAMap.initAMapApiLoader({

+ 2 - 2
src/utils/fileUtil.js

@@ -54,9 +54,9 @@ export default {
     getOrientation: (file) => {
         return new Promise((resolve) => {
             EXIF.getData(file, function () {
-                // console.log(EXIF.getAllTags(this))
+                console.log(EXIF.getAllTags(this))
                 const orient = EXIF.getTag(this, 'Orientation')
-                // console.log(orient)
+                console.log(orient)
                 resolve(orient)
             })
         })

+ 2 - 2
src/views/PaymentResult.vue

@@ -168,9 +168,9 @@ export default {
         onAppBack() {
             // app回调页面
             if (browser().android) {
-                DAYA.postMessage(JSON.stringify({ api: "back" }));
+                EXAM.postMessage(JSON.stringify({ api: "back" }));
             } else if (browser().iPhone) {
-                window.webkit.messageHandlers.DAYA.postMessage(
+                window.webkit.messageHandlers.EXAM.postMessage(
                     JSON.stringify({ api: "back" })
                 );
             } else {

+ 26 - 9
src/views/app/AppDetail.vue

@@ -29,8 +29,8 @@
                         :before-delete="beforeDelete"
                         :after-read="afterRead"
                         accept="image/*"
-                        disabled
-                        :deletable="false"
+                        :disabled="!form.editStatus"
+                        :deletable="form.editStatus"
                         v-model="uploadCertificate"
                         :max-count="1" />
                 </template>
@@ -47,6 +47,8 @@
                         :after-read="afterRead"
                         v-model="uploadCertificate2"
                         accept="image/*"
+                        :disabled="!form.editStatus"
+                        :deletable="form.editStatus"
                         :max-count="1" />
                 </template>
             </van-field>
@@ -54,7 +56,7 @@
                         :deletable="false" -->
         </van-cell-group>
 
-        <van-cell-group style="margin-top: 20px">
+        <van-cell-group class="memos">
             <van-cell disabled title="报名审核" >
                 <p class="pass" v-if="form.status === 'AUDIT_PASS'">已通过</p>
                 <p class="noPass" v-else>未通过</p>
@@ -63,15 +65,15 @@
                 {{ form.memo }}
             </van-cell>
         </van-cell-group>
-        <van-button type="primary" round block>重新提交</van-button>
+        <van-button type="primary" v-if="form.editStatus" round block>重新提交</van-button>
 
         <van-popup class="van-popup-song" v-model="songUpload.songStatus" :close-on-click-overlay="false">
             <div class="song-popup">
                 <div class="title">自定义曲目</div>
-                <van-field name="songName" v-model="songUpload.name" label="曲名" placeholder="请输入曲名" >
+                <van-field name="songName" v-model="songUpload.name" :disabled="!form.editStatus" label="曲名" placeholder="请输入曲名" >
                     <template #label><i style="color: #ee0a24">*</i>曲名</template>
                 </van-field>
-                <van-field name="songAuthor" v-model="songUpload.author" label="作者" placeholder="请输入作者" >
+                <van-field name="songAuthor" :disabled="!form.editStatus" v-model="songUpload.author" label="作者" placeholder="请输入作者" >
                     <template #label><i style="color: #ffffff">*</i>作者</template>
                 </van-field>
                 <van-field readonly clearable >
@@ -84,6 +86,8 @@
                         :after-read="afterRead"
                         v-model.trim="practiceUpload[songUpload.index]"
                         multiple
+                        :disabled="!form.editStatus"
+                        :deletable="form.editStatus"
                         accept="image/*"
                         :max-count="5" >
                     </van-uploader>
@@ -95,6 +99,8 @@
                         :after-read="afterRead"
                         v-model.trim="performUpload[songUpload.index]"
                         multiple
+                        :disabled="!form.editStatus"
+                        :deletable="form.editStatus"
                         accept="image/*"
                         :max-count="5" >
                     </van-uploader>
@@ -113,7 +119,7 @@
 <script>
 import MHeader from '@/components/MHeader'
 import { browser } from '@/utils/common'
-import dayjs from 'dayjs'
+// import dayjs from 'dayjs'
 import setLoading from '@/utils/loading'
 import fileUtil from '@/utils/fileUtil'
 import { uploadFile } from '../signup/SignUpApi'
@@ -136,7 +142,8 @@ export default {
                 lastExamCertificateUrl: null,
                 lastMusicTheoryLevel: null,
                 lastMusicTheoryCertificateUrl: null,
-                memo: null
+                memo: null,
+                editStatus: false
             },
             uploadCertificate: [],
             uploadCertificate2: [],
@@ -191,7 +198,10 @@ export default {
                         lastExamCertificateUrl: detail.lastExamCertificateUrl,
                         lastMusicTheoryLevel: detail.lastMusicTheoryLevel,
                         lastMusicTheoryCertificateUrl: detail.lastMusicTheoryCertificateUrl,
-                        memo: detail.memo
+                        memo: detail.memo,
+                        practiceSongIdList: detail.practiceSongIdList,
+                        performSongIdList: detail.performSongIdList,
+                        editStatus: detail.status === "AUDIT_PASS" || detail.status === "AUDIT_WAIT" ? false : true
                     }
                     if(detail.lastExamCertificateUrl) {
                         this.uploadCertificate = [{ url: detail.lastExamCertificateUrl }]
@@ -462,6 +472,13 @@ export default {
 .section {
     margin-top: 10px;
 }
+.memos {
+    margin-top: 20px;
+    margin-bottom: 20px;
+    & + .van-button {
+        margin-top: 0;
+    }
+}
 .van-button--primary {
     margin: .15rem 0 .2rem;
     background-color: @--main-color;

+ 3 - 0
src/views/signup/SignUpLevel.vue

@@ -647,6 +647,9 @@ export default {
                 this.$toast('上传图片大小不能超过 5MB')
                 return false
             }
+            fileUtil.getOrientation(file).then((orient) => {
+                console.log(orient)
+            })
             // return new Promise((resolve) => {
             //     fileUtil.getOrientation(file).then((orient) => {
             //         console.log(orient)