tanyanfei 4 years ago
parent
commit
7d2b008c19
4 changed files with 9 additions and 9 deletions
  1. 1 1
      pages/subject/subject.js
  2. 2 3
      pages/upload/upload.js
  3. 5 5
      pages/upload/upload.wxml
  4. 1 0
      pages/upload/upload.wxss

+ 1 - 1
pages/subject/subject.js

@@ -96,7 +96,7 @@ Page({
             method: 'POST',
             success: res => {
               console.log(res.data)
-              if (res.data.status == 'suc') {
+              if (res.data.code == 0) {
                 wx.showModal({
                   title: res.data.data.score+'分',
                   content: '您本次考试得分',

+ 2 - 3
pages/upload/upload.js

@@ -110,7 +110,7 @@ Page({
       },
       data: formData,
       success:res=>{
-        if(res.data.status == 'suc'){
+        if(res.data.code == 0){
           wx.hideLoading()
           wx.showToast({
             title: '提交成功',
@@ -163,7 +163,7 @@ Page({
             wx.hideLoading()
             var data=JSON.parse(res.data)
             wx.showToast({
-              title: '上传成功' + data.data.url,
+              title: '上传成功',
               icon: 'none',
               duration: 2000
             })
@@ -195,7 +195,6 @@ Page({
           },
           fail: res => {
             wx.hideLoading()
-            wx.hideLoading()
             wx.showToast({
               title: res,
               icon: 'none',

+ 5 - 5
pages/upload/upload.wxml

@@ -1,7 +1,7 @@
 <view class="content">
 <!-- <camera device-position="front" flash="off" frame-size='medium'></camera> -->
   <view class="item">
-      <image wx:if='{{idnoimg_face}}' data-id='1' bindtap="takePhoto" src="{{idnoimg_face}}" mode="widthFix"></image>
+      <image wx:if='{{idnoimg_face}}' data-id='1' bindtap="takePhoto" src="{{idnoimg_face}}" mode="scaleToFill"></image>
       <image wx:else data-id='1' bindtap="takePhoto" src="../../images/upload.png" mode="widthFix"></image>
       <view class="title">身份证正面照,务必保持清晰</view>
       <text>注意:拍完整不能斜着拍,和复印效果一样!</text>
@@ -9,7 +9,7 @@
   </view>
 
   <view class="item">
-      <image wx:if='{{idnoimg_back}}' data-id='2' bindtap="takePhoto" src="{{idnoimg_back}}" mode="widthFix"></image>
+      <image wx:if='{{idnoimg_back}}' data-id='2' bindtap="takePhoto" src="{{idnoimg_back}}" mode="scaleToFill"></image>
       <image wx:else data-id='2' bindtap="takePhoto" src="../../images/upload.png" mode="widthFix"></image>
       <view class="title">身份证反面照,务必保持清晰</view>
       <text>注意:拍完整不能斜着拍,和复印效果一样!</text>
@@ -17,7 +17,7 @@
   </view>
 
   <view class="item">
-      <image wx:if='{{halfbody_img}}' data-id='3' bindtap="takePhoto" src="{{halfbody_img}}" mode="widthFix"></image>
+      <image wx:if='{{halfbody_img}}' data-id='3' bindtap="takePhoto" src="{{halfbody_img}}" mode="scaleToFill"></image>
       <image wx:else data-id='3' bindtap="takePhoto" src="../../images/upload.png" mode="widthFix"></image>
       <view class="title">上半身照,务必保持清晰</view>
       <text>注意:头像大小与1寸照片相近,纯色背景,不能穿红色衣服!</text>
@@ -25,7 +25,7 @@
   </view>
 
   <view class="item">
-      <image wx:if='{{education_img}}' data-id='4' bindtap="takePhoto" src="{{education_img}}" mode="widthFix"></image>
+      <image wx:if='{{education_img}}' data-id='4' bindtap="takePhoto" src="{{education_img}}" mode="scaleToFill"></image>
       <image wx:else data-id='4' bindtap="takePhoto" src="../../images/upload.png" mode="widthFix"></image>
       <view class="title">毕业证书照或户口本个人现实学历页,务必保持清晰!</view>
       <text>注意:拍完整不能斜着拍,和复印效果一样!</text>
@@ -33,7 +33,7 @@
   </view>
 
     <view class="item" wx:if="{{train_type == '换证'}}">
-      <image wx:if='{{data.oldcard_img}}' data-id='5' bindtap="takePhoto" src="{{data.education_img}}" mode="widthFix"></image>
+      <image wx:if='{{data.oldcard_img}}' data-id='5' bindtap="takePhoto" src="{{data.education_img}}" mode="scaleToFill"></image>
       <image wx:else data-id='5' bindtap="takePhoto" src="../../images/upload.png" mode="widthFix"></image>
       <view class="title">复审/换证证件照,务必保持清晰</view>
       <text>注意:拍完整不能斜着拍,和复印效果一样!</text>

+ 1 - 0
pages/upload/upload.wxss

@@ -14,6 +14,7 @@ page{
 }
 .item image{
   width: 160rpx;
+  height: 160rpx;
   position: absolute;
   left: 20rpx;
   top: 0;