Browse Source

app端优化

gaoxiong 1 năm trước cách đây
mục cha
commit
2f12c39e32

+ 1 - 1
src/assets/svg/NFC.svg

@@ -5,7 +5,7 @@
 <title>无线电波</title>
 <style>
 .st0{
-  fill:orange;
+  fill:green;
 }
 </style>
 <g id="icon">

+ 4 - 1
src/components/nfcPopup/alone.vue

@@ -73,6 +73,9 @@ export default {
           content: img.content
         }
       } catch (e) {
+        if(data.errorCode === 1 || data.errorCode === '1'){
+          throw  new Error("ios取消相机操作")
+        }
         params = {
           extension: data.extension,
           content: data.content
@@ -106,7 +109,7 @@ export default {
       try {
         nfc = JSON.parse(data)
       } catch (e) {
-        nfc = data  
+        nfc = data
       }
       this.objNfc = nfc
       if (this.objNfc.errorCode == 0) {

+ 4 - 1
src/components/nfcPopup/gxmore.vue

@@ -22,7 +22,7 @@
 
           </div>
           <div v-else>
-            <select-cell title="需要拍照的NFC" @change="changeNFC" v-model="selectNFC" :prop="prop" :dataList="dataList"/>
+            <select-cell title="选择NFC点位" @change="changeNFC" v-model="selectNFC" :prop="prop" :dataList="dataList"/>
             <van-button v-if="showBtn" type="info"  size="small" block @click="onConfirm">确认该照片</van-button>
           </div>
         </div>
@@ -84,6 +84,9 @@ export default {
           content: img.content,
         }
       }catch (e) {
+        if(data.errorCode === 1 || data.errorCode === '1'){
+          throw  new Error("ios取消相机操作")
+        }
         params = {
           extension: data.extension,
           content: data.content,

+ 3 - 0
src/components/nfcPopup/more.vue

@@ -86,6 +86,9 @@ export default {
           content: img.content,
         }
       }catch (e) {
+        if(data.errorCode === 1 || data.errorCode === '1'){
+          throw  new Error("ios取消相机操作")
+        }
         params = {
           extension: data.extension,
           content: data.content,

+ 3 - 0
src/components/upload/gxuploader.vue

@@ -102,6 +102,9 @@ export default {
           content: img.content,
         }
       }catch (e) {
+        if(data.errorCode === 1 || data.errorCode === '1'){
+          throw  new Error("ios取消相机操作")
+        }
         params = {
           extension: data.extension,
           content: data.content,

+ 3 - 0
src/components/upload/index.vue

@@ -145,6 +145,9 @@ export default {
           content: img.content
         }
       } catch (e) {
+        if(data.errorCode === 1 || data.errorCode === '1'){
+          throw  new Error("ios取消相机操作")
+        }
         params = {
           extension: data.extension,
           content: data.content

+ 20 - 3
src/views/menu/resumption/detail.vue

@@ -371,20 +371,37 @@ export default {
           areaId = v.areaId;
           this.switchArea(areaId);
           if(v.status === 1){
-            this.$toast.fail('NFC点位:' + v.nfcName + '已扫描,请勿重复扫描!');
+            // this.$toast.fail('NFC点位:' + v.nfcName + '已扫描,请勿重复扫描!');
+            this.$toast({
+              type:"fail",
+              message:'NFC点位:' + v.nfcName + '已扫描,请勿重复扫描!',
+              position:"top"
+            })
+
             throw new Error('NFC点位:' + v.nfcName + '已扫描,请勿重复扫描!');
           }
           v.status = 1
           v.scanMethod = 2
           v.submitTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
           v.submitBy = this.id
-          this.$toast.success('NFC点位:' + v.nfcName + '扫描成功!');
+          // this.$toast.success('NFC点位:' + v.nfcName + '扫描成功!');
+          this.$toast({
+            type:"success",
+            message:'NFC点位:' + v.nfcName + '扫描成功!',
+            position:"top"
+          })
+
           checkOk = true;
         }
       });
       this.updateNFC(1,nfcCode);
       if(!checkOk){
-        this.$toast.fail(nfcCode + ",不在本次履职范围内!");
+        // this.$toast.fail(nfcCode + ",不在本次履职范围内!");
+        this.$toast({
+          type:"fail",
+          message:nfcCode + ",不在本次履职范围内!",
+          position:"top"
+        })
       }
       this.validateArea(areaId)
     },