Quellcode durchsuchen

接口对接完成

wangxin vor 2 Jahren
Ursprung
Commit
7767253f44

+ 1 - 10
miniprogram/pages/my-order/my-order.ts

@@ -76,18 +76,9 @@ Page({
 					orderId: id
 				}).then(res => {
 					if (res.errCode === 0) {
-						// 跳转webview
-						// wx.reLaunch({
-						// 	url: `/pages/web-view/web-view?url=${encodeURIComponent(res.data.url)}`,
-						// 	success: () => {
-						// 		// 存入缓存方便跳回
-						// 		app.globalData.webview = `/${this.route}`;
-						// 		// wx.setStorageSync('web_view', `/${this.route}`)
-						// 	}
-						// })
 						wx.openEmbeddedMiniProgram({
 							appId: 'wxa023b292fd19d41d',
-							// path: "/" + data
+							path: "/" + res.data.url
 						});
 					}
 				})

BIN
miniprogram/pages/realNameAuthentication/images/logo.png


+ 7 - 2
miniprogram/pages/realNameAuthentication/realNameAuthentication.ts

@@ -31,20 +31,25 @@ Page({
 				idcardBack: string
 				name: string
 				idcardNumber: string
+				setIdcardFront: string
+				setIdcardBack: string
 			} = {
 				id: wx.getStorageSync("userId"),
 				idcardFront: this.data.headPortraitImg,
 				idcardBack: this.data.nationalEmblemImg,
 				name: this.data.name,
 				idcardNumber: this.data.idCard,
+				setIdcardFront: '',
+				setIdcardBack: '',
 			};
 			upLoadImage({ url: '/api/hwUser/imgUpload', files: [data.idcardFront], name: 'file', formData: { upType: 1, } }).then(res => {
 				console.log(res);
-				data.idcardFront = res[0].imgUrl
+				data.setIdcardFront = res[0].imgUrl
 				upLoadImage({ url: '/api/hwUser/imgUpload', files: [data.idcardBack], name: 'file', formData: { upType: 2, } }).then(res => {
 					console.log(res);
-					data.idcardBack = res[0].imgUrl
+					data.setIdcardBack = res[0].imgUrl
 					authenticateApi({ ...data }).then(res => {
+						console.log(res);
 						wx.redirectTo({
 							url: "/pages/realNameAuthentication/success",
 						});

+ 1 - 0
miniprogram/pages/realNameAuthentication/success.json

@@ -1,3 +1,4 @@
 {
+	"navigationStyle": "custom",
 	"usingComponents": {}
 }

+ 3 - 3
miniprogram/pages/realNameAuthentication/success.scss

@@ -14,14 +14,14 @@
     width: 100%;
     position: fixed;
     left: 0;
-    bottom: 64rpx;
+    bottom: 35rpx;
     display: flex;
     align-items: center;
     justify-content: center;
 
     .logo {
-      width: 245rpx;
-      height: 90rpx;
+      width: 409.2rpx;
+      height: 125.1rpx;
     }
   }
 

+ 7 - 3
miniprogram/pages/success/success.wxss

@@ -5,13 +5,17 @@ page {
 }
 
 .container {
+	width: 100%;
+	display: flex;
   align-items: center;
-  justify-content: center;
-  padding: 0 47rpx;
+	justify-content: center;
+	flex-direction: column;
+	/* padding: 0 47rpx; */
+	box-sizing: border-box;
 }
 
 .hint-pic {
-  width: 750rpx;
+  width: 100%;
   /* background: #eee; */
 }
 

+ 2 - 1
miniprogram/service/hwUser.ts

@@ -67,7 +67,8 @@ export const getOcrKeyApi = (): Promise<responseOptions> => {
 export const authenticateApi = (data: authenticateDataType): Promise<responseOptions> => {
   const options: requestOptionsType<any> = {
     url: api.hwUser.authenticate,
-    data,
+		data,
+		type: 'post'
   }
   return $request(options)
 }

+ 8 - 5
miniprogram/utils/util.ts

@@ -118,6 +118,9 @@ export function getUserId(data: any) {
 		const userId = wx.getStorageSync('userId');
 		const userToken = wx.getStorageSync('userToken');
 		data.user_id = userId;
+		data.userId = userId;
+		data.userid = userId;
+		data.userToken = userToken;
 		data.user_token = userToken;
 		reslove(data)
 	})
@@ -139,6 +142,9 @@ export function upLoadImage(options: { files: string[]; formData?: {}; url: stri
 	const formData = {
 		user_id: wx.getStorageSync('userId'),
 		user_token: wx.getStorageSync('userToken'),
+		userId: wx.getStorageSync('userId'),
+		userid: wx.getStorageSync('userId'),
+		userToken: wx.getStorageSync('userToken'),
 		...options.formData
 	};
 	console.log('upLoadImage=>', formData);
@@ -157,14 +163,11 @@ export function upLoadImage(options: { files: string[]; formData?: {}; url: stri
 					url: _url,
 					filePath: val,
 					name: options.name,
-					header: {
-						user_id: wx.getStorageSync('userId'),
-						user_token: wx.getStorageSync('userToken'),
-					},
 					formData,
 					success: res => {
 						if (res.statusCode === 200) {
 							const data = JSON.parse(res.data);
+							console.log(data);
 							if (data.errcode === 0) {
 								_arr.push(data.data);
 								if (_len === key) {
@@ -173,7 +176,7 @@ export function upLoadImage(options: { files: string[]; formData?: {}; url: stri
 								}
 							} else {
 								wx.showToast({
-									title: data.message,
+									title: data.message || data.errmsg,
 									icon: 'none'
 								})
 								reject({

+ 14 - 0
project.private.config.json

@@ -12,6 +12,20 @@
 					"query": "",
 					"launchMode": "default",
 					"scene": null
+				},
+				{
+					"name": "",
+					"pathName": "pages/realNameAuthentication/success",
+					"query": "",
+					"launchMode": "default",
+					"scene": null
+				},
+				{
+					"name": "",
+					"pathName": "pages/success/success",
+					"query": "",
+					"launchMode": "default",
+					"scene": null
 				}
 			]
 		}