lsc 2 months ago
parent
commit
2494265731

File diff suppressed because it is too large
+ 0 - 0
dist/css/app.4fbcdfc8.css


+ 1 - 1
dist/index.html

@@ -36,7 +36,7 @@
         width: 100%;
         background: #e6eaf0;
         font-family: '黑体';
-      }</style><script defer="defer" src="/js/chunk-vendors.fba309d8.js"></script><script defer="defer" src="/js/app.773c87fc.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.dddbeb50.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
+      }</style><script defer="defer" src="/js/chunk-vendors.fba309d8.js"></script><script defer="defer" src="/js/app.89f8c322.js"></script><link href="/css/chunk-vendors.7cfe4581.css" rel="stylesheet"><link href="/css/app.4fbcdfc8.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but pblAdminTable doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/js/app.773c87fc.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.773c87fc.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.89f8c322.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.89f8c322.js.map


+ 1 - 0
src/common/apiConfig.js

@@ -3,6 +3,7 @@ import { baseApi } from "@/config";
 export const API_CONFIG = {
   // baseUrl: "http://10.3.16.166:7003/api/pbl/localPost", // 基础 API URL
   baseUrl: `${baseApi}onlinePost`, // 基础 API URL
+  baseUrl2: `${baseApi}`, // 基础 API URL
   weixinUrl: `https://pbl.cocorobo.cn/api/weixin/`, // 基础 API URL
   ////////////// 以下是账号列表的数据接口
   // 账户启用的接口

+ 41 - 2
src/views/login/loginPage.vue

@@ -159,6 +159,7 @@ export default {
 			form: {},
 			showName: "",
 			oloading: false,
+			openid: "",
 		};
 	},
 	watch: {
@@ -172,7 +173,7 @@ export default {
 		...mapActions({
 			login: "user/login",
 		}),
-		loginFn() {
+		async loginFn() {
 			if (this.loading) return;
 
 			if (this.account.length <= 0) {
@@ -233,7 +234,44 @@ export default {
 						this.loading = false;
 					});
 			} else if (this.loginType == "bind") {
-				this.$message.info("绑定账号");
+				// this.$message.info("绑定账号");
+				let data = await this.$ajax.post(API_CONFIG.baseUrl2 + 'checkOpenId', [{email: email}])
+				console.log(data);
+				
+				// let params = {
+				// 	geetest_challenge: "",
+				// 	geetest_validate: "",
+				// 	geetest_seccode: "",
+				// 	loginUsername: email.trim(),
+				// 	loginPassword: window.btoa(this.password.trim()),
+				// };
+				// this.loading = true;
+				// axios.defaults.withCredentials = true;
+				// console.log("👇");
+				// axios
+				// .post("https://beta.api.cocorobo.cn/api/user", qs.stringify(params))
+				// .then(async (res) => {
+				// 	console.log("res", res);
+				// 	let _data = res.data[0][0];
+				// 	if (_data.active === 1) {
+				// 		await this.$ajax.post(API_CONFIG.baseUrl2 + 'UpdateOpenId', [{openid: this.openid}])
+				// 		window.localStorage["identity"] = JSON.stringify(_data.identity);
+				// 		this.$message.success("绑定成功");
+				// 		await this.login();
+				// 		this.$router.push({ path: this.redirect || "/" });
+				// 	} else {
+				// 		this.$message.error("绑定失败");
+				// 	}
+				// 	this.loading = false;
+				// })
+				// .catch((e) => {
+				// 	if (e.response && e.response.data == "Wrong email or password") {
+				// 		this.$message.error("账号或密码错误");
+				// 	} else {
+				// 		this.$message.error("绑定失败");
+				// 	}
+				// 	this.loading = false;
+				// });
 			}
 		},
 		async getLoading() {
@@ -330,6 +368,7 @@ export default {
 			let params = {
 				openid: openid
 			}
+			this.openid = openid
 			axios.defaults.withCredentials = true;
 			axios.post(`https://beta.api.cocorobo.cn/api/user`, qs.stringify(params)).then(async res => {
 				console.log("res", res);

Some files were not shown because too many files changed in this diff