From ff120d19df422dc6aeb7a35e144d726582aef8f8 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期三, 14 八月 2024 17:25:56 +0800
Subject: [PATCH] -

---
 src/pages/login/index.vue |   53 +++++++++++++++--------------------------------------
 1 files changed, 15 insertions(+), 38 deletions(-)

diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 8e484aa..576f13c 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -1,15 +1,14 @@
 <template>
 	<view>
 		<view class="wrap">
-
 			<image src="@/static/logo.png" mode="widthFix" class="tip_img"></image>
 			<view class="login_tip">
 				涓轰簡鎻愪緵鏇翠紭璐ㄧ殑鏈嶅姟锛岄渶瑕佽幏鍙栨偍鐨勫ご鍍忓拰鏄电О銆�
 			</view>
 			<view class="login_btn">
 				<!-- #ifdef MP-WEIXIN || MP-QQ || MP-BAIDU -->
-				<button v-if="canIUseGetUserProfile" type="primary" class="uni-tip-button" @click="login">鎺堟潈骞剁櫥褰�</button>
-				<button v-else type="primary" open-type="getUserInfo" @getuserinfo="login"
+				<!-- <button v-if="canIUseGetUserProfile" type="primary" class="uni-tip-button" @click="login">鎺堟潈骞剁櫥褰�</button> -->
+				<button  type="primary" open-type="getUserInfo" @getuserinfo="login"
 					class="uni-tip-button">鎺堟潈骞剁櫥褰�</button>
 				<view class="no_login" @click="back">
 					鏆備笉鎺堟潈
@@ -17,10 +16,8 @@
 				<!-- #endif  -->
 				<checkbox-group @change="changeAgree">
 					<view class="regisiter-agreement">
-
 						<label>
 							<checkbox value="1" :checked="isChecked" color="#35A6FF" style="transform:scale(0.7)" />
-
 							宸查槄璇诲苟鍚屾剰浠ヤ笅鍗忚
 							<text class="color-base-text" @click.stop="openPopup(1)">銆婄敤鎴锋湇鍔″崗璁��</text>鍜� <text
 								class="color-base-text" @click.stop="openPopup(2)">銆婇殣绉佹斂绛栥��</text>
@@ -103,8 +100,7 @@
 					title: '鍔犺浇涓�',
 					mask: true
 				})
-				this.$api.sendRequest({
-					url: '/api.php/user/info',
+				this.$api.temLogin({
 					data: {
 						uid: uni.getStorageSync('authInfo').id
 					},
@@ -126,8 +122,7 @@
 										uni.removeStorageSync('wx_openid_set');
 										uni.removeStorageSync('source_member');
 										uni.removeStorageSync('authInfo');
-										this.$api.sendRequest({
-											url: "/api.php/user/is_perfect",
+										this.$api.temLogin({
 											data: {
 												uid: res.data.id,
 											},
@@ -238,8 +233,7 @@
 					if (this.isSub) return;
 					this.isSub = true;
 
-					this.$api.sendRequest({
-						url: '/api.php/login/binding_mobile',
+					this.$api.temLogin({
 						data,
 						success: res => {
 							if (res.code == 1) {
@@ -257,8 +251,7 @@
 											uni.removeStorageSync('wx_openid_set');
 											uni.removeStorageSync('source_member');
 											uni.removeStorageSync('authInfo');
-											this.$api.sendRequest({
-												url: "/api.php/user/is_perfect",
+											this.$api.temLogin({
 												data: {
 													uid: res.data.id,
 												},
@@ -326,26 +319,12 @@
 							avatar: userInfo.avatarUrl,
 
 						}
-						if (uni.getStorageSync('source_member')) {
-							data.source_member = uni.getStorageSync('source_member')
-						}
-						if (res.code) {
-							this.$api.sendRequest({
-								url: '/api.php/login/wx_login',
-								data,
-								success: res => {
-									if (res.code >= 0) {
-										// if (res.data.openid) this.authInfo.weapp_openid = res.data.openid;
-										// if (res.data.unionid) this.authInfo.wx_unionid = res.data.unionid;
-										typeof callback == 'function' && callback(res);
-									} else {
-										this.$util.showToast({
-											title: '灏忕▼搴忛厤缃敊璇�'
-										});
-									}
-								}
-							})
-						}
+						// if (uni.getStorageSync('source_member')) {
+						// 	data.source_member = uni.getStorageSync('source_member')
+						// }
+						// if (res.code) {
+						// 	this.$api.temLogin(data)
+						// }
 					},
 					fail: () => {
 						this.$util.showToast({
@@ -356,7 +335,7 @@
 			},
 			login(e) {
 				if (!this.isChecked) {
-					return this.$util.showToast({
+					return this.$common.showToast({
 						title: "璇峰厛鍚屾剰鍗忚"
 					})
 				}
@@ -399,8 +378,7 @@
 														uni.removeStorageSync(
 															'source_member');
 														uni.removeStorageSync('authInfo');
-														this.$api.sendRequest({
-															url: "/api.php/user/is_perfect",
+														this.$api.temLogin({
 															data: {
 																uid: data.data.id,
 															},
@@ -476,8 +454,7 @@
 											uni.removeStorageSync('wx_openid_set');
 											uni.removeStorageSync('source_member');
 											uni.removeStorageSync('authInfo');
-											this.$api.sendRequest({
-												url: "/api.php/user/is_perfect",
+											this.$api.temLogin({
 												data: {
 													uid: data.data.id,
 												},

--
Gitblit v1.9.1