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

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 httpApiThree;
let httpApi let httpApi
httpApi = 'https://shop.lihaink.cn' //生产 // httpApi = 'https://shop.lihaink.cn' //生产
httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产 httpApi = 'https://worker-task.lihaink.cn' //生产
httpApiThree = 'https://worker-task.lihaink.cn' //生产
// httpApiThree = 'http://ceshi-oa.lihaink.cn' //生产
// #ifdef H5 // #ifdef H5
httpApiThree = 'baseUrlTest' //生产 httpApiThree = 'baseUrlTest' //生产
// #endif // #endif

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
<view class="all_box"> <view class="all_box">
<!-- 审批选项 --> <!-- 审批选项 -->
<view class="examine_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> activeStyle="color:#3274F9"></u-tabs>
</view> </view>
<!-- 事项 --> <!-- 事项 -->
@ -41,12 +41,14 @@
data() { data() {
return { return {
list1: [{ list1: [{
name: '我发起的', name: '全部',
}, { }, {
name: '我处理的', name: '审核中',
}, { }, {
name: '抄送给我的' name: '审核完成'
}, ], }, {
name: '未通过'
},],
myEventList: [], myEventList: [],
params: { params: {
limit: '8', // limit: '8', //

View File

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

View File

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

View File

@ -22,6 +22,13 @@ const mutations = {
state.token = data.result.token state.token = data.result.token
Cache.set("USER_INFO", data.result.user, time) Cache.set("USER_INFO", data.result.user, time)
Cache.set("TOKEN", data.result.token, 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, let Url = HTTP_REQUEST_URL_THREE,
header = HEADER; header = HEADER;
if (!noAuth) { // if (!noAuth) {
//登录过期自动登录 // //登录过期自动登录
if (!store.state.app.token) { // if (!store.state.app.token) {
toLogin(); // toLogin();
return Promise.reject({ // return Promise.reject({
msg: '未登录' // msg: '未登录'
}); // });
} // }
} // }
if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token; if (store.state.app.token) header[TOKENNAME] = 'Bearer ' + store.state.app.token;
// header[TOKENNAME] = 'Bearer sdjflidshjgfkbdasgjmasbgvhauuiavhkesvndkaesbvkjsdbv';
return new Promise((reslove, reject) => { return new Promise((reslove, reject) => {
// uni.showLoading({ // uni.showLoading({
// title: '加载中' // title: '加载中'
// }) // })
uni.request({ uni.request({
url: Url + '/api/v1' + url, // url: Url + '/api/v1' + url,
url: Url + '/api' + url,
method: method || 'GET', method: method || 'GET',
header: header, header: header,
data: data || {}, data: data || {},
@ -47,7 +49,9 @@ function baseRequestTwo(url, method, data, {
if (noVerify) if (noVerify)
// reslove(res.data, res); // reslove(res.data, res);
reslove(res.data); 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); reslove(res.data);
else if (res.data.code == 200) else if (res.data.code == 200)
reslove(res.data.data); reslove(res.data.data);
@ -61,10 +65,10 @@ function baseRequestTwo(url, method, data, {
reject(res.data); reject(res.data);
} else { } else {
uni.showToast({ uni.showToast({
title: res.data.message || '请检查网络', title: res.data.msg || '请检查网络',
icon: 'none' icon: 'none'
}) })
// reject(res.data.message || '请检查网络'); reject(res.data.msg || '请检查网络');
} }
}, },
fail: (message) => { fail: (message) => {