完成账号密码登录功能,优化部分页面样式

This commit is contained in:
weipengfei 2023-07-18 15:10:11 +08:00
parent 41d51bbdc2
commit fe007797ad
9 changed files with 123 additions and 59 deletions

View File

@ -1,7 +1,9 @@
let httpApiThree;
let httpApi
httpApi = 'https://shop.lihaink.cn' //生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
// httpApi = 'https://shop.lihaink.cn' //生产
httpApi = 'https://worker-task.lihaink.cn' //生产
httpApiThree = 'https://worker-task.lihaink.cn' //生产
// httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
// #ifdef H5
httpApiThree = 'baseUrlTest' //生产
// #endif

View File

@ -2,7 +2,9 @@ import App from './App'
import store from './store'
import uView from '@/uni_modules/uview-ui'
import taskCard from "@/components/taskCard/taskCard.vue"
Vue.use(uView)
Vue.use(taskCard)
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false

View File

@ -48,6 +48,20 @@
},
/* */
"quickapp": {},
"h5": {
"devServer": {
"proxy": {
"baseUrlTest/api": {
"target": "https://worker-task.lihaink.cn",
"changeOrigin": true,
"pathRewrite": {
"^/baseUrlTest/api": "/api"
}
}
}
}
},
/* */
"mp-weixin": {
"appid": "wx6e14cb98394e36bc",
@ -69,4 +83,4 @@
"enable": false
},
"vueVersion": "2"
}
}

View File

@ -36,13 +36,7 @@
"path" : "pages/oaLogin/oaLogin",
"style" :
{
"navigationBarTitleText": "",
"app-plus": {
"titleNView": false
},
"mp-weixin": {
"titleNView": false
}
"navigationBarTitleText": "登录"
}
}
@ -50,8 +44,7 @@
"path" : "pages/oaManager/oaManager",
"style" :
{
"navigationBarTitleText": "片区经理",
"enablePullDownRefresh": false
"navigationBarTitleText": "片区经理"
}
}

View File

@ -2,7 +2,7 @@
<view class="all_box">
<!-- 审批选项 -->
<view class="examine_box">
<u-tabs :list="list1" @click="click" lineColor='#3274F9' lineWidth='77rpx' inactiveStyle='color:#666'
<u-tabs :list="list1" @click="click" lineColor='#3274F9' :scrollable="false" lineWidth='20' inactiveStyle='color:#666'
activeStyle="color:#3274F9"></u-tabs>
</view>
<!-- 事项 -->
@ -41,12 +41,14 @@
data() {
return {
list1: [{
name: '我发起的',
name: '全部',
}, {
name: '我处理的',
name: '审核中',
}, {
name: '抄送给我的'
}, ],
name: '审核完成'
}, {
name: '未通过'
},],
myEventList: [],
params: {
limit: '8', //

View File

@ -1,5 +1,6 @@
<template>
<view class="oa_home" style="oaColor">
<image class="header_bg" src="../../static/img/home/head-bg.png"></image>
<view class="home_header">
<view class="my_info flex_a_c">
<view class="">
@ -29,14 +30,16 @@
</view> -->
<view class="backlog">
<view class="head_title flex_a_c_j_sb">
<view class="">公告列表</view>
<view class="flex_a_c" @click="test">更多 <view class="iconfont icon-you"></view>
<view class="title">公告列表</view>
<view class="flex_a_c" @click="test">更多 <view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons>
</view>
</view>
</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>
<i class="iconfont icon-you"><uni-icons type="forward"></uni-icons></i>
</view>
</block>
</view>
@ -52,7 +55,15 @@
</view>
<view class="my_task">
<view class="head_title flex_a_c_j_sb">
<view class="task_title flex_a_c_j_sb">
<view class="title">我的任务</view>
<view class="flex_a_c" @click="test">更多 <view class="iconfont icon-you">
<uni-icons type="forward"></uni-icons>
</view>
</view>
</view>
<taskCard></taskCard>
<!-- <view class="head_title flex_a_c_j_sb">
<view class="">我的任务</view>
<view class="flex_a_c" @click="test">更多 <view class="iconfont icon-you"></view>
</view>
@ -75,7 +86,7 @@
<view class="">计划完成日期{{ item.end_time }}</view>
</view>
</view>
</block>
</block> -->
</view>
<!-- <tabbar></tabbar> -->
@ -97,7 +108,7 @@
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
assessData: [{
num: '8',
name: '部门计划'
name: '岗位任务'
},
{
num: '8',
@ -111,22 +122,22 @@
num: '100%',
name: '完成率'
},
{
num: '10',
name: '岗位任务'
},
{
num: '10',
name: '岗位任务'
},
{
num: '0',
name: '未完成'
},
{
num: '100%',
name: '完成率'
}
// {
// num: '10',
// name: ''
// },
// {
// num: '10',
// name: ''
// },
// {
// num: '0',
// name: ''
// },
// {
// num: '100%',
// name: ''
// }
],
project: {},
task: {},
@ -225,12 +236,19 @@
padding-bottom: 120rpx;
}
.header_bg {
position: absolute;
width: 100%;
// z-index: -1;
}
.home_header {
position: relative;
padding: 28.07rpx;
height: 607.02rpx;
// height: 607.02rpx;
height: 440.02rpx;
width: 100%;
background-color: $theme-oa-color;
// background-color: $theme-oa-color;
margin-bottom: 133.33rpx;
.my_info {
@ -276,12 +294,21 @@
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 25rpx;
font-weight: 400;
.title {
font-size: 32rpx;
font-weight: 500;
}
&_item {
margin-top: 19.3rpx;
color: #666666;
.text {
font-size: 28.04rpx;
&::before {
content: '提醒';
display: inline-block;
@ -324,10 +351,23 @@
.my_task {
width: 694.74rpx;
margin: 0 auto;
margin-top: 31.58rpx;
background-color: #fff;
// margin-top: 31.58rpx;
// background-color: #fff;
border-radius: 12px;
padding: 28.07rpx;
// padding: 28.07rpx;
.task_title{
font-size: 25rpx;
font-weight: 400;
padding: 28rpx;
.title {
font-size: 32rpx;
font-weight: 500;
}
}
.task_list {
height: 196.49rpx;

View File

@ -54,7 +54,7 @@
</view>
</block>
</view>
<view class="log_out">退出登录</view>
<view class="log_out" @click="naviTo('/pages/oaLogin/oaLogin')">退出登录</view>
<!-- <tabbar></tabbar> -->
</view>
</template>

View File

@ -22,6 +22,13 @@ const mutations = {
state.token = data.result.token
Cache.set("USER_INFO", data.result.user, time)
Cache.set("TOKEN", data.result.token, time)
},
SET_USERINFO(state, data){
let time = Cache.time();
state.userInfo = data.user
state.token = data.token
Cache.set("USER_INFO", data.user, time)
Cache.set("TOKEN", data.token, time)
}
};

View File

@ -22,23 +22,25 @@ function baseRequestTwo(url, method, data, {
let Url = HTTP_REQUEST_URL_THREE,
header = HEADER;
if (!noAuth) {
//登录过期自动登录
if (!store.state.app.token) {
toLogin();
return Promise.reject({
msg: '未登录'
});
}
}
// if (!noAuth) {
// //登录过期自动登录
// if (!store.state.app.token) {
// toLogin();
// return Promise.reject({
// msg: '未登录'
// });
// }
// }
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
// header[TOKENNAME] = 'Bearer sdjflidshjgfkbdasgjmasbgvhauuiavhkesvndkaesbvkjsdbv';
return new Promise((reslove, reject) => {
// uni.showLoading({
// title: '加载中'
// })
uni.request({
url: Url + '/api/v1' + url,
// url: Url + '/api/v1' + url,
url: Url + '/api' + url,
method: method || 'GET',
header: header,
data: data || {},
@ -47,7 +49,9 @@ function baseRequestTwo(url, method, data, {
if (noVerify)
// reslove(res.data, res);
reslove(res.data);
else if (res.data.code == 0)
// else if (res.data.code == 0)
// reject(res.data);
else if (res.data.code == 1)
reslove(res.data);
else if (res.data.code == 200)
reslove(res.data.data);
@ -61,10 +65,10 @@ function baseRequestTwo(url, method, data, {
reject(res.data);
} else {
uni.showToast({
title: res.data.message || '请检查网络',
title: res.data.msg || '请检查网络',
icon: 'none'
})
// reject(res.data.message || '请检查网络');
reject(res.data.msg || '请检查网络');
}
},
fail: (message) => {
@ -81,4 +85,4 @@ const oahttp = {};
oahttp[method] = (api, data, opt) => baseRequestTwo(api, method, data, opt || {})
});
export default oahttp;
export default oahttp;