程志平 5 anos atrás
pai
commit
6ad1036c63
5 arquivos alterados com 59 adições e 38 exclusões
  1. 1 0
      .gitignore
  2. 38 27
      pages.json
  3. 6 0
      pages/confirm/confirm.css
  4. 1 1
      pages/confirm/confirm.vue
  5. 13 10
      pages/index/index.vue

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/unpackage/

+ 38 - 27
pages.json

@@ -1,39 +1,50 @@
 {
 {
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
 		{
+			"path": "pages/show/show",
+			"style": {
+				"navigationBarTitleText": "迎新首页",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/confirm/confirm",
+			"style": {
+				"navigationBarTitleText": "确认信息",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
 			"path": "pages/index/index",
 			"path": "pages/index/index",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "人脸采集",
 				"navigationBarTitleText": "人脸采集",
 				"enablePullDownRefresh": true
 				"enablePullDownRefresh": true
 			}
 			}
+		}, {
+			"path": "pages/test/test",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
 		}
 		}
-		,{
-		    "path" : "pages/show/show",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "迎新首页",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},{
-		    "path" : "pages/confirm/confirm",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "确认信息",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		},{
-		    "path" : "pages/test/test",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-        
-    ],
+	],
+	"condition": {
+		"current": 1,
+		"list": [{
+			"name":"显示页面",
+			"path": "pages/show/show"
+		}, {
+			"name":"确认页面",
+			"path": "pages/confirm/confirm"
+		}, {
+			"name":"首页",
+			"path": "pages/index/index"
+		}, {
+			"name":"测试",
+			"path": "pages/test/test"
+		}]
+	},
 	"globalStyle": {
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
 		"navigationBarTitleText": "uni-app",

+ 6 - 0
pages/confirm/confirm.css

@@ -30,15 +30,21 @@
 	.info_list_left{
 	.info_list_left{
 		width: 600rpx;
 		width: 600rpx;
 		margin-top: 14.5rpx;
 		margin-top: 14.5rpx;
+		text-indent: 2em;
+		white-space: nowrap;
 	}
 	}
 	
 	
 	.info_list_right{
 	.info_list_right{
 		width: 350rpx;
 		width: 350rpx;
 		margin-top: 14.5rpx;
 		margin-top: 14.5rpx;
+		text-indent: 2em;
+		white-space: nowrap;
 	}
 	}
 	
 	
 	.info_list_long{
 	.info_list_long{
 		width: 500rpx;
 		width: 500rpx;
+		text-indent: 2em;
+		white-space: nowrap;
 		margin-top: 14.5rpx;
 		margin-top: 14.5rpx;
 	}
 	}
 	
 	

+ 1 - 1
pages/confirm/confirm.vue

@@ -20,7 +20,7 @@
 				准考证号:<text>{{ticket_id}}</text>
 				准考证号:<text>{{ticket_id}}</text>
 			</view>
 			</view>
 			
 			
-			<view class="info_list_long ">
+			<view class="info_list_long">
 				身份证号:<text>{{id_card}}</text>
 				身份证号:<text>{{id_card}}</text>
 			</view>
 			</view>
 		</view>
 		</view>

+ 13 - 10
pages/index/index.vue

@@ -321,7 +321,7 @@
 			},
 			},
 			//确定使用图片
 			//确定使用图片
 			checkImage() {
 			checkImage() {
-				console.log(this.image)
+				// console.log(this.image)
 				uni.showLoading({
 				uni.showLoading({
 					title: '图片正在上传中'
 					title: '图片正在上传中'
 				});
 				});
@@ -331,21 +331,22 @@
 			//上传图片
 			//上传图片
 			uploadTheImg() {
 			uploadTheImg() {
 				uni.uploadFile({
 				uni.uploadFile({
-					url: 'http://58bybm.natappfree.cc', //后端用于处理图片并返回图片地址的接口
-					header: {
-						"Content-Type": "multipart/form-data", // formdata提交格式
-					},
+					url: 'http://pwawgw.natappfree.cc', //后端用于处理图片并返回图片地址的接口
+					// header: {
+					// 	"Content-Type": "multipart/form-data" // formdata提交格式
+					// },
 					filePath: this.image,
 					filePath: this.image,
-					name: 'uploadfile', // 默认
+					name: 'uploadFile', // 默认
+					fileType: 'image',
 					formData: { // 其他的formdata参数
 					formData: { // 其他的formdata参数
 						card_number: this.card_number,
 						card_number: this.card_number,
 					},
 					},
-					success: res => {
+					success: (res) => {
+						console.log(res)
 						// let data = JSON.parse(res.data) //返回的是字符串,需要转成对象格式,打印data如下图
 						// let data = JSON.parse(res.data) //返回的是字符串,需要转成对象格式,打印data如下图
 						// if (data.code == 200) {
 						// if (data.code == 200) {
-						// 	console.log(data.msg) //图片地址
+							// console.log(data.msg) //图片地址
 						// }
 						// }
-						console.log(res)
 						uni.hideLoading();
 						uni.hideLoading();
 						// var code = '200'
 						// var code = '200'
 						// if (code == 200) {
 						// if (code == 200) {
@@ -380,7 +381,9 @@
 							});
 							});
 						}
 						}
 					},
 					},
-					fail: res => {}
+					fail: (res) => {
+						console.log(res)
+					}
 				})
 				})
 			},
 			},
 		},
 		},