Procházet zdrojové kódy

新增龙游对接

wanglaoye před 8 měsíci
rodič
revize
a0bbea563d

+ 13 - 1
api/userinfo.js

@@ -1,7 +1,7 @@
 import request from './request.js';
 
 export default {
-	//获取token
+	//获取token 兰溪
 	decrypt: function(data) {
 		return request({
 			url: '/decrypt',
@@ -13,6 +13,18 @@ export default {
 			isDataAll: true
 		})
 	},
+	// 获取身份证  龙游
+	findIdCard: function(params) {
+		return request({
+			url: '/findIdCard',
+			method: 'get',
+			headers: {
+				'Content-type': 'multipart/form-data;charset=UTF-8'
+			},
+			params,
+			isDataAll: true
+		})
+	},
 	//获取用户信息
 	getUserInfo: function(data) {
 		return request({

+ 4 - 0
config/servernet.config.js

@@ -15,6 +15,10 @@ module.exports = [{
 		ip: 'https://lxh5api.xklr.net'
 	},
 	{
+		name: '龙游',
+		ip: 'http://220.191.237.238:10066'
+	},
+	{
 		name: '附海',
 		ip: 'http://192.26.1.242:10066'
 	}

+ 6 - 1
main.js

@@ -1,6 +1,8 @@
 import App from './App'
 import mf from '@/static/js/mf.js';
 import api from 'api/index.js'
+import './static/js/sdk/ydool-jssdk.4.0.0.js'
+
 import {
 	md, //
 	regExp, //验证规则
@@ -9,6 +11,9 @@ import {
 } from '@/static/js/public.js'
 // #ifndef VUE3
 import Vue from 'vue'
+
+
+
 Vue.config.productionTip = false
 App.mpType = 'app'
 const app = new Vue({
@@ -33,4 +38,4 @@ export function createApp() {
 		app
 	}
 }
-// #endif
+// #endif

+ 104 - 2
pages/index/index.vue

@@ -4,11 +4,12 @@
 			<view class="header p-3">
 				<view class="centerY">
 					<span class="d-inline-block fs-18 text-white font-bold">个人档案</span>
-					<span v-if="ipArr.find(item => item.ip == prodIp) && ipArr.find(item => item.ip == prodIp).name !== '兰溪'"
+					<span
+						v-if="ipArr.find(item => item.ip == prodIp) && (ipArr.find(item => item.ip == prodIp).name !== '兰溪'&&ipArr.find(item => item.ip == prodIp).name !== '龙游')"
 						class="d-inline-block py-1 d-inline-block ml-auto text-white1" @click="closet">
 						[ 退出 ]
 					</span>
-					<span v-if="ipArr.find(item => item.ip == prodIp) && ipArr.find(item => item.ip == prodIp).name == '兰溪'"
+					<span v-if="ipArr.find(item => item.ip == prodIp) && (ipArr.find(item => item.ip == prodIp).name == '兰溪')"
 						class="d-inline-block py-1 d-inline-block ml-auto text-white1" @click="operation">
 						[ 切换 ]
 					</span>
@@ -272,6 +273,102 @@
 				function errordata() {
 					if (!uni.getStorageSync('idCard')) {
 						t.$refs.popup1.open();
+						// uni.showModal({
+						// 	title: '提示',
+						// 	content: '您还未绑定身份证!',
+						// 	showCancel: false,
+						// 	success: function(res3) {
+						// 		if (res3.confirm) {
+						// 			console.log('用户点击确定');
+						// 			uni.navigateBack({
+						// 				delta: 1 //返回层数,2则上上页
+						// 			});
+						// 		}
+						// 	}
+						// });
+						// return;
+						uni.hideLoading();
+					} else {
+						t.getuserinfo(uni.getStorageSync('idCard'));
+					}
+				}
+			},
+			//龙游
+			longyou() {
+				let t = this;
+				// s({
+				// 	userId: '1232131',
+				// 	idCard: '330122195011081823'
+				// })
+				// async function s(res) {
+				// 	if (!res.userId) {
+				// 		uni.showModal({
+				// 			title: '提示',
+				// 			content: '您还未登录请先去登录!',
+				// 			showCancel: false,
+				// 			success: function(res2) {
+				// 				if (res2.confirm) {
+				// 					console.log('用户点击确定');
+				// 					uni.navigateBack({
+				// 						delta: 1 //返回层数,2则上上页
+				// 					});
+				// 				}
+				// 			}
+				// 		});
+				// 		return;
+				// 	}
+				// 	t.valueId = res.idCard;
+				// 	t.search()
+				// 	uni.hideLoading();
+				// }
+				// return
+				try {
+					window.yt.getUserInfo({
+						async success(res) {
+							if (!res.userId) {
+								uni.showModal({
+									title: '提示',
+									content: '您还未登录请先去登录!',
+									showCancel: false,
+									success: function(res2) {
+										if (res2.confirm) {
+											console.log('用户点击确定');
+											uni.navigateBack({
+												delta: 1 //返回层数,2则上上页
+											});
+										}
+									}
+								});
+								return;
+							}
+							t.valueId = res.idCard;
+							t.search()
+							uni.hideLoading();
+						},
+						error() {
+							errordata();
+						}
+					});
+				} catch (e) {
+					// console.log(e)
+					uni.showModal({
+						title: '提示',
+						content: '环境异常',
+						showCancel: false,
+						success: function(res3) {
+							if (res3.confirm) {
+								console.log('用户点击确定');
+								uni.navigateBack({
+									delta: 1 //返回层数,2则上上页
+								});
+							}
+						}
+					});
+				}
+
+				function errordata() {
+					if (!uni.getStorageSync('idCard')) {
+						t.$refs.popup1.open();
 						uni.hideLoading();
 					} else {
 						t.getuserinfo(uni.getStorageSync('idCard'));
@@ -291,6 +388,11 @@
 						clearInterval(timer);
 					}
 					ipArr.map(async item => {
+						console.log(item.ip, globalData.configData.prodIp)
+						if (item.ip == globalData.configData.prodIp && item.name == '龙游') {
+							t.longyou();
+							return;
+						}
 						if (item.ip == globalData.configData.prodIp && item.name == '兰溪') {
 							t.lanxi();
 							return;

+ 3 - 4
static/.config.json

@@ -1,10 +1,9 @@
 {
-	"prodIp": "http://192.168.1.103:10066",
+	"prodIp": "http://220.191.237.238:10066",
 	"img_prod_host": "http://img.xklr.net/",
 	"devIp": "http://192.168.1.103:10066",
 	"testIp": "http://testapi.xklr.net:8601",
 	"appConfig": {
-		"jj_service_url": "http://118.31.70.1:8601",
 		"jt_service_url": "http://118.31.70.1:8601",
 		"OrgCode": "jtapi.xklr.net:8601",
 		"type": "none",
@@ -13,9 +12,9 @@
 	},
 	"notes": {
 		"devIp1": "http://192.168.3.77:10066",
-		"prodIp": "正式ip/线下图片地址 http://apiv3.xklr.net",
+		"prodIp": "正式ip/线下图片地址 http://apiv3.xklr.net   //兰溪 https://lxh5api.xklr.net  //龙游 http://220.191.237.238:10066",
 		"testIp": "正式测试服ip",
 		"devIp/devip1": "开发ip",
 		"img_prod_host": "线上图片地址"
 	}
-}
+}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1292 - 0
static/js/sdk/ydool-jssdk.4.0.0.js