heyang 2 anni fa
parent
commit
eefa0790ac
3 ha cambiato i file con 1 aggiunte e 199 eliminazioni
  1. 0 6
      pages.json
  2. 1 15
      pages/mine.vue
  3. 0 178
      pages_student/mine/upStudentCard.vue

+ 0 - 6
pages.json

@@ -325,12 +325,6 @@
 					}
 				},
 				{
-					"path": "mine/upStudentCard",//学生卡上传
-					"style": {
-						"navigationBarTitleText": "学生卡上传"
-					}
-				},
-				{
 					"path": "mine/pointsRecord",//积分记录
 					"style": {
 						"navigationBarTitleText": "积分记录"

+ 1 - 15
pages/mine.vue

@@ -88,14 +88,6 @@
           <view class="view-three-type" :class="!isUpload?'colorA':'marginType'">{{!isUpload?'未上传':'已上传'}}</view>
           <img class="right-img" src="@/images/icon_04.png">
         </view>
-        <view class="button-max-box" @click="goPage('upStudentCard')" v-if="userType==2&&certification.auditStatus">
-          <img class="left-img" src="@/images/icon_03.png">
-          <view>学生卡绑定</view>
-          <view class="view-three-type" :class="certification.auditStatus.code == 2 || certification.auditStatus.code == 3?'colorA':'marginType'">
-            {{certification.auditStatus.code == 0?'待审核':(certification.auditStatus.code == 1?'已绑定':(certification.auditStatus.code == 2?'未通过':(certification.auditStatus.code == 3?'去绑定':'')))}}
-          </view>
-          <img class="right-img" v-if="certification.auditStatus.code == 2 || certification.auditStatus.code == 3" src="@/images/icon_04.png">
-        </view>
         <view class="button-max-box" @click="fingerprintClick()">
           <img class="left-img" src="@/images/icon_wd_zw.png">
           <view>指纹</view>
@@ -310,13 +302,7 @@ export default {
     },
     //页面跳转
     goPage(type){
-      if(type == 'upStudentCard'){//学生卡上传
-        // if(this.certification.auditStatus.code  == 2||this.certification.auditStatus.code  == 3){
-        uni.navigateTo({
-          url: '/pages_student/mine/upStudentCard',
-        });
-        // }
-      }else if(type == 'pointsRecord'){//积分记录
+      if(type == 'pointsRecord'){//积分记录
         uni.navigateTo({
           url: '/pages_student/mine/pointsRecord',
         });

+ 0 - 178
pages_student/mine/upStudentCard.vue

@@ -1,178 +0,0 @@
-<!-- 学生卡上传 -->
-<template>
-    <view id="upStudentCard">
-        <view class="max-box">
-            <view>添加照片</view>
-            <img src="@/pages_student/images/icon_05.png" v-if="!imgUrl" @click="selectImage">
-            <img :src="imgUrl" v-else @click="selectImage">
-        </view>
-        <view class="up-data-button" @click="upDataButton">上传</view>
-    </view>
-</template>
-
-<script>
-    import { config } from '@/api/request/config.js'
-    export default {
-        data() {
-            return {
-                imgUrl:"",
-                imgData:{},
-            }
-        },
-        onLoad() {
-
-        },
-        methods: {
-            // 图片上传
-            selectImage() {
-                let self = this;
-                wx.chooseImage({
-                    count: 1,
-                    sizeType: ["original", "compressed"],
-                    sourceType: ["album", "camera"],
-                    success: function(res) {
-                        let tempFilePaths = res.tempFilePaths[0];
-                        self.imgData = res.tempFilePaths[0];
-                        self.uploadImg(tempFilePaths);
-                    }
-                });
-            },
-            async uploadImg(tempFilePaths){
-                var self = this;
-                uni.showLoading({
-                    title: '上传中',
-                    mask: true
-                });
-                uni.uploadFile({
-                    url: config.base_url+'/base/file/upload', //仅为示例,非真实的接口地址
-                    header:{'Authorization':uni.getStorageSync('token')},
-                    filePath: tempFilePaths,
-                    name: 'file',
-                    formData: {
-                        'user': 'test'
-                    },
-                    success: (uploadFileRes) => {
-                        let res = JSON.parse(uploadFileRes.data);
-						if(res.code == 200){
-							self.imgUrl = config.base_url+res.data.url;
-                            self.realImgUrl = res.data.url;
-						}else{
-							uni.showToast({
-								title: res.msg,
-								icon:"none",
-								mask:true,
-								duration: 2000
-							});
-						}
-                    },
-                    fail: err => {},
-                    complete: () => {
-                        uni.hideLoading()
-                    }
-                });
-            },
-            upDataButton(){
-                let self = this;
-				if(!this.imgUrl){
-					uni.showToast({
-						title: "请选择上传图片",
-						icon:"none",
-						mask:true,
-						duration: 2000
-					});
-					return
-				}
-                uni.showModal({
-                    // title: '确认要退出吗?',
-                    content: '确认上传吗?',
-                    cancelColor:"#999",
-                    confirmColor:"#0183FA",
-                    success: function (res) {
-                        if (res.confirm) {
-                            self.commitCrad();
-                            console.log('用户点击确定');
-                        } else if (res.cancel) {
-                            console.log('用户点击取消');
-                        }
-                    }
-                });
-            },
-            async commitCrad(){
-				
-                var self = this;
-                uni.showLoading({
-                    title: '上传中',
-                    mask: true
-                });
-                uni.uploadFile({
-                    url: config.base_url+'/base/app/lab/api/commit/crad', //仅为示例,非真实的接口地址
-                    header:{'Authorization':uni.getStorageSync('token')},
-                    filePath: self.imgData,
-                    name: 'file',
-                    formData: {
-                        'file': 'test'
-                    },
-                    success: (uploadFileRes) => {
-                        let res = JSON.parse(uploadFileRes.data);
-                        if(res.code == 200){
-                            uni.showToast({
-                                title: "提交成功",
-                                icon:"none",
-                                mask:true,
-                                duration: 2000
-                            });
-                            setTimeout(function(){
-                                uni.navigateBack();
-                            },2000);
-                        }else{
-                            uni.showToast({
-                                title: res.msg,
-                                icon:"none",
-                                mask:true,
-                                duration: 2000
-                            });
-                        }
-                    },
-                    fail: err => {},
-                    complete: () => {
-                        uni.hideLoading()
-                    }
-                });
-            },
-        }
-    }
-</script>
-
-<style lang="stylus" scoped>
-    #upStudentCard{
-        height:100%;
-        width:100%;
-        .max-box{
-            height:350rpx;
-            background #fff
-            view{
-                line-height :95rpx;
-                font-size:28rpx;
-                color:#333333;
-                margin-left:20rpx;
-            }
-            img{
-                height:180rpx;
-                width:180rpx;
-                margin:5rpx 0 0 30rpx;
-            }
-        }
-        .up-data-button{
-            position absolute
-            bottom:0;
-            left:0;
-            width: 750rpx;
-            height: 120rpx;
-            background: #0183FA;
-            line-height:120rpx;
-            text-align center
-            color:#fff;
-            font-size: 30rpx;
-        }
-    }
-</style>