This commit is contained in:
Vinjor 2025-04-21 13:44:16 +08:00
parent c65b0171eb
commit 278e20a98e
3 changed files with 50 additions and 14 deletions

View File

@ -1,6 +1,6 @@
// 应用全局配置 // 应用全局配置
module.exports = { module.exports = {
baseUrl: 'http://192.168.1.4:8081', baseUrl: 'https://notice.lighting-it.cn',
// baseUrl: 'http://localhost:8080', // baseUrl: 'http://localhost:8080',
// 应用信息 // 应用信息
appInfo: { appInfo: {

View File

@ -1,9 +1,8 @@
<template> <template>
<view class="normal-login-container"> <view class="normal-login-container">
<view class="logo-content align-center justify-center flex"> <view class="logo-content align-center justify-center flex">
<!-- <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">--> <image style="width: 260rpx;height: 260rpx;" src="@/static/logo.png" mode="widthFix">
<!-- </image>--> </image>
<text class="title">请登录</text>
</view> </view>
<view class="login-form-content"> <view class="login-form-content">
<!-- <view class="input-item flex align-center">--> <!-- <view class="input-item flex align-center">-->
@ -23,7 +22,7 @@
<!-- </view>--> <!-- </view>-->
<view class="action-btn"> <view class="action-btn">
<button open-type="getPhoneNumber" @getphonenumber="getPhone" <button open-type="getPhoneNumber" @getphonenumber="getPhone"
class="login-btn cu-btn block bg-blue lg round">手机号快捷登录</button> class="login-btn cu-btn block bg-blue lg round" style="background-color: #FC1F3E;">手机号快捷登录</button>
<!-- <button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>--> <!-- <button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>-->
<!-- <u-button open-type='getPhoneNumber' text="手机号快捷登录" @getphonenumber="wxHandleLogin" class="login-btn cu-btn block bg-green lg round"></u-button>--> <!-- <u-button open-type='getPhoneNumber' text="手机号快捷登录" @getphonenumber="wxHandleLogin" class="login-btn cu-btn block bg-green lg round"></u-button>-->
</view> </view>
@ -32,11 +31,11 @@
<!-- <text @click="handleUserRegister" class="text-blue">立即注册</text>--> <!-- <text @click="handleUserRegister" class="text-blue">立即注册</text>-->
<!-- </view>--> <!-- </view>-->
<view class="xieyi text-center"> <view class="xieyi text-center">
<text class="text-grey1">登录即代表同意</text> <uni-data-checkbox @change="chooseAllFun()" multiple :localdata="chooseAll" />
<text @click="handleUserAgrement(globalConfig.appInfo.agreements[0])" <text @click="handleUserAgrement(globalConfig.appInfo.agreements[0])" class="text-blue"
class="text-blue">{{globalConfig.appInfo.agreements[0].title}}</text> style="color: #FC1F3E;font-size: 14px;">{{globalConfig.appInfo.agreements[0].title}}</text>
<text @click="handleUserAgrement(globalConfig.appInfo.agreements[1])" <text @click="handleUserAgrement(globalConfig.appInfo.agreements[1])" class="text-blue"
class="text-blue">{{ globalConfig.appInfo.agreements[1].title }}</text> style="color: #FC1F3E;font-size: 14px;">{{ globalConfig.appInfo.agreements[1].title }}</text>
</view> </view>
</view> </view>
@ -47,7 +46,9 @@
import { import {
getCodeImg getCodeImg
} from '@/api/login' } from '@/api/login'
import {
toast
} from '@/utils/common'
export default { export default {
data() { data() {
@ -68,7 +69,13 @@
code: "", code: "",
encryptedIv: "", encryptedIv: "",
encryptedData: "" encryptedData: ""
} },
chooseAll: [{
text: '我已阅读并同意',
value: true
}],
//
ifAgree: false,
} }
}, },
created() { created() {
@ -76,6 +83,19 @@
this.wxLogin() this.wxLogin()
}, },
methods: { methods: {
/**
* 同意
* @param {Object} e
*/
chooseAllFun(e) {
if (e.detail.value.length > 0) {
//
this.ifAgree = true
} else {
//
this.ifAgree = false
}
},
// //
handleUserRegister() { handleUserRegister() {
this.$tab.redirectTo(`/pages/register`) this.$tab.redirectTo(`/pages/register`)
@ -110,6 +130,10 @@
}, },
// //
getPhone(e) { getPhone(e) {
if (!this.ifAgree) {
toast("请先阅读并同意《隐私协议》《用户服务协议》")
return
}
console.log("微信小程序发起授权登录") console.log("微信小程序发起授权登录")
this.$modal.loading("登录中...") this.$modal.loading("登录中...")
uni.checkSession({ uni.checkSession({
@ -181,6 +205,10 @@
background-color: #ffffff; background-color: #ffffff;
} }
.checklist-box {
margin-right: 0rpx !important;
}
.dl { .dl {
width: 90%; width: 90%;
height: 44px; height: 44px;
@ -201,7 +229,7 @@
width: 100%; width: 100%;
font-size: 21px; font-size: 21px;
text-align: center; text-align: center;
padding-top: 15%; padding-top: 55%;
image { image {
border-radius: 4px; border-radius: 4px;
@ -212,11 +240,16 @@
} }
} }
.action-btn {
margin: auto;
width: 80%;
}
.login-form-content { .login-form-content {
text-align: center; text-align: center;
margin: 20px auto; margin: 20px auto;
margin-top: 15%; margin-top: 15%;
width: 80%; width: 100%;
.input-item { .input-item {
margin: 20px auto; margin: 20px auto;
@ -250,6 +283,9 @@
} }
.xieyi { .xieyi {
display: flex;
align-items: center;
justify-content: center;
color: #333; color: #333;
margin-top: 20px; margin-top: 20px;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 39 KiB