新增验证码登录,优化未登录首页
This commit is contained in:
parent
2298da062a
commit
fa91ae3a63
@ -197,6 +197,15 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "personnelDetails/personnelDetails",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "人员详细信息",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}],
|
}],
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<view class="oa_home" style="oaColor">
|
<view class="oa_home" style="oaColor">
|
||||||
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
<!-- <image class="header_bg" src="../../static/img/home/head-bg.png"></image> -->
|
||||||
|
|
||||||
<view class="home_header">
|
<view class="home_header" :class="!ApproveList.length>0?'home_header_no_data':''">
|
||||||
<!-- #ifdef APP-PLUS||H5 -->
|
<!-- #ifdef APP-PLUS||H5 -->
|
||||||
<view style="height: var(--status-bar-height);"></view>
|
<view style="height: var(--status-bar-height);"></view>
|
||||||
<view style="height: 100rpx"></view>
|
<view style="height: 100rpx"></view>
|
||||||
@ -32,16 +32,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="backlog">
|
<view class="backlog" :class="!ApproveList.length>0?'backlog_no_data':''">
|
||||||
<view class="">待办事项</view>
|
|
||||||
<block v-for="(item,index) in ApproveList.slice(0,2)" :key="index">
|
|
||||||
<view class="backlog_item flex_a_c_j_sb" @click="backlogDetails">
|
|
||||||
<view class="text">{{ item.content }}</view>
|
|
||||||
<i class="iconfont icon-you"></i>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
</view> -->
|
|
||||||
<view class="backlog">
|
|
||||||
<view class="head_title flex_a_c_j_sb">
|
<view class="head_title flex_a_c_j_sb">
|
||||||
<view class="title">公告列表</view>
|
<view class="title">公告列表</view>
|
||||||
<view class="flex_a_c" @click="navTo('')">更多 <view class="iconfont icon-you">
|
<view class="flex_a_c" @click="navTo('')">更多 <view class="iconfont icon-you">
|
||||||
@ -49,12 +40,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-for="(item,index) in ApproveList.slice(0,2)" :key="index">
|
<block v-if="ApproveList.length>0">
|
||||||
<view class="backlog_item flex_a_c_j_sb" @click="clickNotice(item.id)">
|
<view class="backlog_item flex_a_c_j_sb" v-for="(item,index) in ApproveList.slice(0,2)" :key="index" @click="clickNotice(item.id)">
|
||||||
<view class="text">{{ item.title }}</view>
|
<view class="text">{{ item.title }}</view>
|
||||||
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<view v-else class="backlog_no flex_a_c_j_sb">
|
||||||
|
<view class="text">暂无更多消息</view>
|
||||||
|
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -75,7 +70,14 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <taskCard></taskCard> -->
|
|
||||||
|
<block v-if="myTaskList.length>0">
|
||||||
|
<taskCard></taskCard>
|
||||||
|
</block>
|
||||||
|
<view v-else class="no_task">
|
||||||
|
<view class="title">暂无任务</view>
|
||||||
|
<view class="tips" v-if="!$store.state.app.token">登录后查看任务详情</view>
|
||||||
|
</view>
|
||||||
<!-- <view class="head_title flex_a_c_j_sb">
|
<!-- <view class="head_title flex_a_c_j_sb">
|
||||||
<view class="">我的任务</view>
|
<view class="">我的任务</view>
|
||||||
<view class="flex_a_c" @click="test">更多 <view class="iconfont icon-you"></view>
|
<view class="flex_a_c" @click="test">更多 <view class="iconfont icon-you"></view>
|
||||||
@ -102,6 +104,12 @@
|
|||||||
</block> -->
|
</block> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="no_login" v-if="!$store.state.app.token">
|
||||||
|
<view class="view">
|
||||||
|
<view class="text">登录里海OA,开启线上便捷办公</view>
|
||||||
|
<button class="btn" @click="login">立即登录</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<!-- <tabbar></tabbar> -->
|
<!-- <tabbar></tabbar> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -326,7 +334,6 @@
|
|||||||
bottom: -121.75rpx;
|
bottom: -121.75rpx;
|
||||||
transform: translate(-50%);
|
transform: translate(-50%);
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
min-height: 221.05rpx;
|
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 28.07rpx;
|
padding: 28.07rpx;
|
||||||
@ -363,8 +370,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&_no{
|
||||||
|
margin-top: 19.3rpx;
|
||||||
|
color: #666666;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-size: 28.04rpx;
|
||||||
|
white-space: nowrap; /* 禁止换行 */
|
||||||
|
overflow: hidden; /* 溢出隐藏 */
|
||||||
|
text-overflow: ellipsis; /* 使用省略号代表被截断的文本 */
|
||||||
|
width: 580rpx; /* 设置元素宽度,根据需要进行调整 */
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.backlog_no_data{
|
||||||
|
bottom: -70rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.home_header_no_data{
|
||||||
|
margin-bottom: 93.33rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.fast_track {
|
.fast_track {
|
||||||
width: 694.74rpx;
|
width: 694.74rpx;
|
||||||
@ -399,6 +429,29 @@
|
|||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
// padding: 28.07rpx;
|
// padding: 28.07rpx;
|
||||||
|
|
||||||
|
.no_task{
|
||||||
|
width: 694rpx;
|
||||||
|
height: 140rpx;
|
||||||
|
padding: 28rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
.title{
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000000CC;
|
||||||
|
line-height: 35rpx;
|
||||||
|
}
|
||||||
|
.tips{
|
||||||
|
font-size: 25rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #333333FF;
|
||||||
|
line-height: 35rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.task_title{
|
.task_title{
|
||||||
font-size: 25rpx;
|
font-size: 25rpx;
|
||||||
@ -482,4 +535,40 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no_login{
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 112rpx;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
height: 200rpx;
|
||||||
|
/* #endif */
|
||||||
|
background: rgba(#333333, 0.4);
|
||||||
|
border-radius: 14rpx 14rpx 0rpx 0rpx;
|
||||||
|
padding: 28rpx 28rpx;
|
||||||
|
.view{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
.text{
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.btn{
|
||||||
|
width: 158rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background: #3274F9;
|
||||||
|
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #FFFFFF;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -18,10 +18,12 @@
|
|||||||
<input v-if="current==1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
<input v-if="current==1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
|
||||||
<view v-if="current==1" class="code item">
|
<view v-if="current==1" class="code item">
|
||||||
<input placeholder="输入验证码" v-model="formData.code" />
|
<input placeholder="输入验证码" v-model="formData.code" />
|
||||||
<view class="get-code">获取验证码</view>
|
<u-code :seconds="seconds" @end="end" @start="start" ref="uCode"
|
||||||
|
@change="codeChange"></u-code>
|
||||||
|
<view class="get-code" @click="getCode">{{tips}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn">
|
<view class="btn">
|
||||||
<view>新用户注册</view>
|
<!-- <view>新用户注册</view> -->
|
||||||
<view>忘记密码?</view>
|
<view>忘记密码?</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -33,6 +35,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { loginAccount, userInfo, test } from "@/api/oaUser.js"
|
import { loginAccount, userInfo, test } from "@/api/oaUser.js"
|
||||||
|
import { Toast } from "../../libs/uniApi";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -43,7 +46,10 @@
|
|||||||
code: '',
|
code: '',
|
||||||
terminal: 6, //6是APP端
|
terminal: 6, //6是APP端
|
||||||
scene: 1
|
scene: 1
|
||||||
}
|
},
|
||||||
|
tips: '获取验证码',
|
||||||
|
// refCode: null,
|
||||||
|
seconds: 60,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -52,6 +58,9 @@
|
|||||||
this.formData.scene = e.index + 1;
|
this.formData.scene = e.index + 1;
|
||||||
},
|
},
|
||||||
async login() {
|
async login() {
|
||||||
|
if(!this.formData.account)return Toast('账号不能为空');
|
||||||
|
if(this.formData.scene==1&&!this.formData.password)return Toast('密码不能为空');
|
||||||
|
if(this.formData.scene==2&&!this.formData.code)return Toast('验证码不能为空');
|
||||||
let that = this;
|
let that = this;
|
||||||
// let res = await test();
|
// let res = await test();
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
@ -103,6 +112,32 @@
|
|||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
this.formData.terminal = 1;
|
this.formData.terminal = 1;
|
||||||
// #endif
|
// #endif
|
||||||
|
},
|
||||||
|
codeChange(text) {
|
||||||
|
this.tips = text;
|
||||||
|
},
|
||||||
|
getCode() {
|
||||||
|
if(this.$refs.uCode.canGetCode) {
|
||||||
|
// 模拟向后端请求验证码
|
||||||
|
uni.showLoading({
|
||||||
|
title: '正在获取验证码'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.hideLoading();
|
||||||
|
// 这里此提示会被this.start()方法中的提示覆盖
|
||||||
|
uni.$u.toast('验证码已发送');
|
||||||
|
// 通知验证码组件内部开始倒计时
|
||||||
|
this.$refs.uCode.start();
|
||||||
|
}, 2000);
|
||||||
|
} else {
|
||||||
|
uni.$u.toast('倒计时结束后再发送');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
end() {
|
||||||
|
// uni.$u.toast('倒计时结束');
|
||||||
|
},
|
||||||
|
start() {
|
||||||
|
// uni.$u.toast('倒计时开始');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-line color="#999999FF"></u-line>
|
<u-line color="#999999FF"></u-line>
|
||||||
<view class="bottom" style="margin-top: 28rpx;">
|
<view class="bottom" style="margin-top: 28rpx;">
|
||||||
<button class="look">查看</button>
|
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails')">查看</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="personnel_item">
|
<view class="personnel_item">
|
||||||
@ -78,7 +78,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-line color="#999999FF"></u-line>
|
<u-line color="#999999FF"></u-line>
|
||||||
<view class="bottom" style="margin-top: 28rpx;">
|
<view class="bottom" style="margin-top: 28rpx;">
|
||||||
<button class="look">查看</button>
|
<button class="look" @click="navTo('/subpkg/personnelDetails/personnelDetails')">查看</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -86,6 +86,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { Toast } from '@/libs/uniApi.js'
|
||||||
export default {
|
export default {
|
||||||
onReady() {
|
onReady() {
|
||||||
uni.setNavigationBarColor({
|
uni.setNavigationBarColor({
|
||||||
@ -100,7 +101,14 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {},
|
methods: {
|
||||||
|
navTo(url) {
|
||||||
|
url ?
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url,
|
||||||
|
}) : Toast('暂未开放')
|
||||||
|
},
|
||||||
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
}
|
}
|
||||||
|
37
subpkg/personnelDetails/personnelDetails.vue
Normal file
37
subpkg/personnelDetails/personnelDetails.vue
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<view class=""></view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { Toast } from '@/libs/uniApi.js'
|
||||||
|
export default {
|
||||||
|
onReady() {
|
||||||
|
uni.setNavigationBarColor({
|
||||||
|
frontColor: '#ffffff',
|
||||||
|
backgroundColor: '#3175f9'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {},
|
||||||
|
onShow() {},
|
||||||
|
methods: {
|
||||||
|
navTo(url) {
|
||||||
|
url ?
|
||||||
|
uni.navigateTo({
|
||||||
|
url: url,
|
||||||
|
}) : Toast('暂未开放')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user