feat:修改登录

This commit is contained in:
2026-07-23 14:03:35 +08:00
parent b5d42d871d
commit 39d0dcea86
4 changed files with 201 additions and 132 deletions
+74 -11
View File
@@ -81,6 +81,18 @@
</up-checkbox>
</view>
<up-toast ref="uToastRef"></up-toast>
<!-- 自定义协议弹窗 -->
<view v-if="showPolicyModal" class="modal-overlay" @click="showPolicyModal = false">
<view class="modal-content" @click.stop>
<view class="modal-title">温馨提示</view>
<view class="modal-message">请您阅读并同意《服务协议》与《隐私政策》</view>
<view class="modal-buttons">
<view class="modal-btn modal-btn-cancel" @click="showPolicyModal = false">取消</view>
<view class="modal-btn modal-btn-confirm" @click="handlePolicyConfirm">同意并登录</view>
</view>
</view>
</view>
</view>
</template>
@@ -149,6 +161,7 @@ export default {
isPolicy: false, // 是否同意
countdown: false, // 清空倒计时
loading: false,
showPolicyModal: false,
};
},
methods: {
@@ -187,17 +200,7 @@ export default {
const form = this.form;
const params = {};
if (!this.isPolicy) {
uni.showModal({
title: '温馨提示',
content: '请您阅读并同意《服务协议》与《隐私政策》',
confirmText: "同意并登录",
success: (res) => {
if (res.confirm) {
this.isPolicy = true;
this.loginFun(val);
}
}
});
this.showPolicyModal = true;
return;
}
let response = val;
@@ -453,6 +456,11 @@ export default {
}
);
},
handlePolicyConfirm() {
this.showPolicyModal = false;
this.isPolicy = true;
this.loginFun();
},
},
computed: {
isIOS() {
@@ -538,4 +546,59 @@ export default {
margin-bottom: 80rpx;
}
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
width: 500rpx;
background: #fff;
border-radius: 20rpx;
padding: 24rpx;
text-align: center;
}
.modal-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
margin-bottom: 30rpx;
}
.modal-message {
font-size: 28rpx;
color: #666;
line-height: 1.6;
margin-bottom: 40rpx;
}
.modal-buttons {
display: flex;
}
.modal-btn {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
}
.modal-btn-cancel {
color: #999;
border-right: 1rpx solid #eee;
}
.modal-btn-confirm {
color: #7934F6;
}
</style>