Commit e1da66910d77cbce2012afd594d78a9c45476e76
1 parent
4536ab8f
[年会抽奖]处理取消唤起摄像头问题
Showing
2 changed files
with
8 additions
and
3 deletions
mobile.html
... | ... | @@ -150,10 +150,9 @@ |
150 | 150 | <div class="pic wrap hide" id="pic"> |
151 | 151 | <img class="pic-title" src="./img/mobile/pic_text1.png"> |
152 | 152 | <img class="pic-title hide" src="./img/mobile/pic_text2.png"> |
153 | - <div class="pic-img-wrap" onclick="action.openCamera()"> | |
154 | - <img class="pic-avatar" src="./img/mobile/default_avatar.png"> | |
153 | + <div class="pic-img-wrap"> | |
154 | + <img class="pic-avatar" onclick="action.openCamera()" src="./img/mobile/default_avatar.png"> | |
155 | 155 | <div class="pic-img-bg"></div> |
156 | - <input type="hidden" class="data-img" /> | |
157 | 156 | </div> |
158 | 157 | <div class="pic-btn-wrap" id="upload_unavailable"> |
159 | 158 | <!-- 自拍出境 --> | ... | ... |
mobile.js
... | ... | @@ -134,6 +134,12 @@ var action = { |
134 | 134 | alert('图片上传失败,请重试'); |
135 | 135 | } |
136 | 136 | }); |
137 | + }, | |
138 | + cancel: function() { | |
139 | + var userAgent = navigator.userAgent.toLowerCase(); | |
140 | + if (/android/.test(userAgent)) { | |
141 | + window.location.reload(); | |
142 | + } | |
137 | 143 | } |
138 | 144 | }); |
139 | 145 | }, | ... | ... |