prove.html
11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<script src="../../assets/js/fontsize.js"></script>
<link rel="stylesheet" href="../../assets/css/weui.min.css">
<link rel="stylesheet" href="../../assets/css/api.css"/>
<link rel="stylesheet" href="../../assets/css/style.css">
<link rel="stylesheet" href="../../assets/icon/iconfont.css">
<link rel="stylesheet" href="../../assets/css/index.css">
<link rel="stylesheet" href="../../assets/css/doc.css">
<link rel="stylesheet" href="../../assets/css/pay_form_f.css">
<title></title>
<style>
.auth2_title {
font-size: 14px;
color: #424242;
margin: 0.57rem 0.62rem 0 0.62rem;
}
.photos {
display: flex;
align-items: center;
/*justify-content: space-around;*/
flex-wrap: wrap;
font-size: 14px;
color: #424242;
}
.photo_item {
display: flex;
align-items: center;
flex-direction: column;
margin: 0.84rem 0 0 0;
/*flex: 1;*/
width: 50%;
}
.photo_item_img {
height: 1.92rem;
width: 2.46rem;
border: 1px dashed #dcdcdc;
display: flex;
align-items: center;
justify-content: center;
border-radius: 0.1rem;
overflow: hidden;
margin-bottom: 0.28rem;
}
.photo_item_img .iconfont {
font-size: 33px;
color: #c1c1c1;
}
.photo_item_img img {
width: 100%;
}
.idcard_box input {
padding: 0.28rem 0;
width: 100%;
text-align: right;
}
.idcard_box .iconfont {
color: #E3C88D;
margin-right: 0.1rem;
}
.photo_re {
color: #AAAAAA;
font-size: 14px;
text-align: right;
margin: 0 0 0.47rem 0;
padding-right: 1.3rem;
}
.auth2_tips {
text-align: center;
font-size: 10px;
color: #AAAAAA;
margin-bottom: 0.65rem;
}
.save_btn {
position: relative;
width: 84%;
margin: 0.91rem auto 0.3rem auto;
border-radius: 0.1rem;
font-size: 15px;
}
</style>
</head>
<body>
<div id="app" v-cloak>
<div class="auth2_title">请上传就医证明,以便订单审核(为您保密)</div>
<div class="photos">
<div class="photo_item">
<div class="photo_item_img" @click="popupVisible=true">
<img v-if="img1" :src="img1"/>
<span v-else class="iconfont icon-xiangji"></span>
</div>
<div class="photo_type">诊断证明/医疗处置单</div>
</div>
<div class="photo_item">
<div class="photo_item_img" @click="popupVisible1=true">
<img v-if="img2" :src="img2"/>
<span v-else class="iconfont icon-xiangji"></span>
</div>
<div class="photo_type">药品处方</div>
</div>
<div class="photo_item">
<div class="photo_item_img" @click="popupVisible2=true">
<img v-if="img3" :src="img3"/>
<span v-else class="iconfont icon-xiangji"></span>
</div>
<div class="photo_type">药品照片</div>
</div>
<div class="photo_item">
<div class="photo_item_img" @click="popupVisible3=true">
<img v-if="img4" :src="img4"/>
<span v-else class="iconfont icon-xiangji"></span>
</div>
<div class="photo_type">
<div>病例</div>
</div>
</div>
</div>
<div class="photo_re">(选填)</div>
<!--<mt-popup v-model="popupVisible" position="bottom">-->
<!--<ul class="moreoul">-->
<!--<li @click="auth1('camera')">拍照</li>-->
<!--<li @click="auth1('album')">从相册中选择</li>-->
<!--<li @click="popupVisible=false" style="border-top: 2px solid #f0f0f0">取消</li>-->
<!--</ul>-->
<!--</mt-popup>-->
<!--<mt-popup v-model="popupVisible1" position="bottom">-->
<!--<ul class="moreoul">-->
<!--<li @click="auth2('camera')">拍照</li>-->
<!--<li @click="auth2('album')">从相册中选择</li>-->
<!--<li @click="popupVisible1=false" style="border-top: 2px solid #f0f0f0">取消</li>-->
<!--</ul>-->
<!--</mt-popup>-->
<!--<mt-popup v-model="popupVisible2" position="bottom">-->
<!--<ul class="moreoul">-->
<!--<li @click="auth3('camera')">拍照</li>-->
<!--<li @click="auth3('album')">从相册中选择</li>-->
<!--<li @click="popupVisible2=false" style="border-top: 2px solid #f0f0f0">取消</li>-->
<!--</ul>-->
<!--</mt-popup>-->
<!--<mt-popup v-model="popupVisible3" position="bottom">-->
<!--<ul class="moreoul">-->
<!--<li @click="auth4('camera')">拍照</li>-->
<!--<li @click="auth4('album')">从相册中选择</li>-->
<!--<li @click="popupVisible2=false" style="border-top: 2px solid #f0f0f0">取消</li>-->
<!--</ul>-->
<!--</mt-popup>-->
<div class="save_btn" @click="auth_next">提交</div>
<div class="auth2_tips">为提高审核速度,请最少上传1张清晰的图片</div>
</div>
</body>
</html>
<script type="text/javascript" src="../../assets/js/api.js"></script>
<script type="text/javascript" src="../../assets/js/vue.min.js"></script>
<script type="text/javascript" src="../../assets/js/index.js"></script>
<script type="text/javascript" src="../../assets/js/weui.min.js"></script>
<script type="text/javascript" src="../../assets/js/public.js"></script>
<script type="text/javascript" src="../../assets/js/fastclick.js"></script>
<script>
new FastClick(document.body);
</script>
<script type="text/javascript" src="../../assets/js/axios.min.js"></script>
<script type="text/javascript" src="../../assets/icon/iconfont.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script>
var app = new Vue({
el: "#app",
data: {
img1: '',
img2: '',
img3: '',
img4: '',
popupVisible: false,
popupVisible1: false,
popupVisible2: false,
popupVisible3: false,
configinfo: []
},
created: function () {
apiready = function () {
app.getsdk();
if ($api.getStorage('img1') || ($api.getStorage('img2')) || ($api.getStorage('img3')) || ($api.getStorage('img4'))) {
app.img1 = $api.getStorage('img1');
app.img2 = $api.getStorage('img2');
app.img3 = $api.getStorage('img3');
app.img4 = $api.getStorage('img4')
}
}
},
methods: {
// 获取微信配置
getsdk: function () {
var header = {
"XX-Device-Type": getDevice(),
'XX-Token': getToken(),
};
var post = {
apis: 'chooseImage,uploadImage'
};
getRequest('post', 'user/index/getSingture', post, header).then(function (res) {
// alert(JSON.stringify(res))
if (res.data.code == 1) {
app.configinfo = res.data.data;
wx.config({
debug: debug, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: app.configinfo.appId, // 必填,公众号的唯一标识
timestamp: app.configinfo.timestamp, // 必填,生成签名的时间戳
nonceStr: app.configinfo.nonceStr, // 必填,生成签名的随机串
signature: app.configinfo.signature,// 必填,签名,见附录1
jsApiList: app.configinfo.jsApiList // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
});
}
loadEnd()
})
},
//诊断证明/医疗处置单
auth1: function (type) {
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
wx.uploadImage({
localId: localIds, // 需要上传的图片的本地ID,由chooseImage接口获得
isShowProgressTips: 1, // 默认为1,显示进度提示
success: function (res) {
var serverId = res.serverId; // 返回图片的服务器端ID
app.img1=serverId
}
});
}
});
},
// 药品处方
auth2: function (type) {
app.popupVisible1 = false;
},
// 药品照片
auth3: function (type) {
app.popupVisible2 = false;
},
// 病例
auth4: function (type) {
app.popupVisible3 = false;
},
auth_next: function () {
if (app.img1 == '') {
toastMsg('请上传诊断证明/医疗处置单')
} else if (app.img2 == '') {
toastMsg('请上传药品处方')
} else if (app.img3 == '') {
toastMsg('请上传药品照片')
}
else {
api.sendEvent({
name: 'prove',
extra: {
diagnosis: app.img1,
drug_recipe: app.img2,
drug: app.img3,
ill_case: app.img4
}
});
api.closeWin();
}
},
}
})
</script>