帮扶
This commit is contained in:
301
packageB/login2.vue
Normal file
301
packageB/login2.vue
Normal file
@@ -0,0 +1,301 @@
|
||||
<template>
|
||||
<AppLayout title="" :use-scroll-view="false">
|
||||
<view class="wrap">
|
||||
<view class="login_index">
|
||||
<input class="input" placeholder="请输入账号" placeholder-class="inputplace" v-model="form.username" />
|
||||
<view class="login_yzm">
|
||||
<input class="input" type="password" placeholder="请输入密码" placeholder-class="inputplace"
|
||||
v-model="form.password" />
|
||||
</view>
|
||||
<view class="login_yzm">
|
||||
<input class="input" placeholder="请输入验证码" placeholder-class="inputplace" v-model="form.code" />
|
||||
<image class="yzm" :src="codeUrl" @click="getCodeImg"></image>
|
||||
</view>
|
||||
|
||||
<button class="com-btn" @click="register">登 录</button>
|
||||
</view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
inject,
|
||||
watch,
|
||||
ref,
|
||||
onMounted,
|
||||
onUnmounted
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
onShow
|
||||
} from '@dcloudio/uni-app';
|
||||
const {
|
||||
$api,
|
||||
navTo,
|
||||
vacanciesTo,
|
||||
navBack
|
||||
} = inject("globalFunction");
|
||||
const placeholderStyle = 'font-size:30rpx'
|
||||
const checked = ref(true)
|
||||
const codeUrl = ref('')
|
||||
const flag=ref('nw')
|
||||
|
||||
const form = reactive({
|
||||
username: '',
|
||||
password: '',
|
||||
rememberMe: false,
|
||||
code: '',
|
||||
uuid: ''
|
||||
})
|
||||
|
||||
onLoad((option) => {
|
||||
console.log("111")
|
||||
if(option.flag){
|
||||
flag.value=option.flag
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
getCodeImg()
|
||||
// let form={}
|
||||
// if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||
// form={
|
||||
// usertype: '1',
|
||||
// idno: uni.getStorageSync('userInfo').idCard,
|
||||
// name: uni.getStorageSync('userInfo').name,
|
||||
// enterprisecode:"",
|
||||
// enterprisename: "",
|
||||
// contactperson: "",
|
||||
// contactphone: "",
|
||||
// }
|
||||
// }else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||
// form={
|
||||
// usertype: "2",
|
||||
// enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||
// enterprisename: uni.getStorageSync('userInfo').name,
|
||||
// contactperson: "",
|
||||
// contactphone: "",
|
||||
// idno: "",
|
||||
// name: ""
|
||||
// }
|
||||
// }
|
||||
// $api.myRequest('/auth/login2/ks',form,'post',10100).then((res) => {
|
||||
// if (res.code=='200') {
|
||||
// uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||
// uni.navigateBack({
|
||||
// delta:2
|
||||
// })
|
||||
// }
|
||||
// }).catch(() => {
|
||||
// uni.hideLoading()
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: '登录失败,请重试'
|
||||
// })
|
||||
// })
|
||||
})
|
||||
|
||||
function register() {
|
||||
if (!form.username) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入用户名'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!form.password) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入密码'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!form.uuid) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入验证码'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '登录中...',
|
||||
mask: true
|
||||
})
|
||||
if(flag.value=='hlw'){
|
||||
$api.myRequest('/auth/login',form,'post',10100).then((res) => {
|
||||
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
codeUrl.value = 'data:image/gif;base64,' + res.img
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登录失败,请重试'
|
||||
})
|
||||
})
|
||||
}else if(flag.value=='nw'){
|
||||
$api.myRequest('/auth/login',form,'post',9100).then((res) => {
|
||||
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||
uni.reLaunch({
|
||||
url: '/packageB/priority/helpFilter'
|
||||
})
|
||||
codeUrl.value = 'data:image/gif;base64,' + res.img
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '登录失败,请重试'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getCodeImg() {
|
||||
if(flag.value=='hlw'){
|
||||
$api.myRequest('/code',{},'get',10100).then((resData) => {
|
||||
codeUrl.value = 'data:image/gif;base64,' + resData.img
|
||||
form.uuid = resData.uuid
|
||||
});
|
||||
}else if(flag.value=='nw'){
|
||||
$api.myRequest('/code',{},'get',9100).then((resData) => {
|
||||
codeUrl.value = 'data:image/gif;base64,' + resData.img
|
||||
form.uuid = resData.uuid
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="stylus">
|
||||
.wrap {
|
||||
background-color: #ffffff;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
.lg-head {
|
||||
height: 480rpx;
|
||||
background: #46ca98;
|
||||
position: relative;
|
||||
|
||||
.view_logo {
|
||||
text-align: center;
|
||||
|
||||
.login_logo {
|
||||
width: 300rpx;
|
||||
height: 300rpx;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.bg-cover {
|
||||
position: absolute;
|
||||
bottom: -4rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 30rpx;
|
||||
background-size: 100% 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.login_index {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
width: 596rpx;
|
||||
margin: 0 auto;
|
||||
|
||||
::v-deep .is-input-border {
|
||||
border: 0;
|
||||
border-bottom: 1px solid #dcdfe6 !important;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
::v-deep .uni-input-input {
|
||||
font-size: 32rpx;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
|
||||
::v-deep .uniui-contact-filled:before {
|
||||
color: #46ca98;
|
||||
font-size: 50rpx;
|
||||
}
|
||||
|
||||
::v-deep .uniui-locked-filled:before {
|
||||
color: #46ca98;
|
||||
font-size: 50rpx;
|
||||
}
|
||||
|
||||
.login_yzm {
|
||||
margin-top: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.yzm {
|
||||
width: 200rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.com-btn {
|
||||
height: 100rpx;
|
||||
background: #46ca98;
|
||||
border-radius: 50rpx;
|
||||
color: #fff;
|
||||
margin-top: 100rpx;
|
||||
}
|
||||
|
||||
.login_wt {
|
||||
margin: 0 auto;
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: rgba(134, 134, 136, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.lg-bottom {
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
|
||||
.bottom-svg {
|
||||
position: absolute;
|
||||
bottom: -3px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.login_tongyi {
|
||||
|
||||
font-size: 26rpx;
|
||||
color: rgba(196, 196, 196, 1);
|
||||
width: 620rpx;
|
||||
margin: 32rpx auto;
|
||||
text-align: center;
|
||||
|
||||
text {
|
||||
color: rgba(86, 176, 236, 1);
|
||||
}
|
||||
}
|
||||
|
||||
.input {
|
||||
padding: 0 30rpx 0 80rpx;
|
||||
height: 80rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.inputplace {
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #B5B5B5;
|
||||
}
|
||||
</style>
|
||||
@@ -226,12 +226,31 @@ const handleReset = () =>{
|
||||
getDataList('refresh')
|
||||
}
|
||||
onMounted(async () => {
|
||||
await loadLevelData('201');
|
||||
// await loadLevelData('201');
|
||||
});
|
||||
onLoad(() => {
|
||||
getDictionary()
|
||||
// getDeptOptions()
|
||||
getDataList('refresh');
|
||||
onLoad(async () => {
|
||||
let token=uni.getStorageSync('Padmin-Token')
|
||||
console.log("token",token)
|
||||
if(token){
|
||||
await loadLevelData('201');
|
||||
getDictionary()
|
||||
getDataList('refresh');
|
||||
}else{
|
||||
navTo('/packageB/login2');
|
||||
}
|
||||
// if (resLogin.code=='200') {
|
||||
// uni.setStorageSync('Padmin-Token', resLogin.data.access_token)
|
||||
// return true;
|
||||
// }else{
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: '单点异常'
|
||||
// })
|
||||
// return false;
|
||||
// }
|
||||
// getDictionary()
|
||||
// // getDeptOptions()
|
||||
// getDataList('refresh');
|
||||
});
|
||||
function getDictionary(){
|
||||
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
||||
|
||||
@@ -322,6 +322,12 @@
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "login2",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "train/index",
|
||||
"style": {
|
||||
|
||||
@@ -154,12 +154,18 @@
|
||||
</view>
|
||||
<view class="service-title">薪酬信息</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="handleJobFairClick">
|
||||
<view class="service-item press-button" @click="handleJobFairClick">
|
||||
<view class="service-icon service-icon-1">
|
||||
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
|
||||
</view>
|
||||
<view class="service-title">招聘会</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="helpClick">
|
||||
<view class="service-icon service-icon-1">
|
||||
<uni-icons type="shop" size="32" color="#FFFFFF"></uni-icons>
|
||||
</view>
|
||||
<view class="service-title">帮扶</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
@@ -773,7 +779,10 @@ const handleH5SalaryClick = () => {
|
||||
const salaryUrl = "https://www.mohrss.gov.cn/SYrlzyhshbzb/laodongguanxi_/fwyd/202506/t20250627_544623.html";
|
||||
window.location.assign(salaryUrl);
|
||||
};
|
||||
|
||||
// 处理帮扶
|
||||
const helpClick = () => {
|
||||
navTo('/packageB/priority/helpFilter');
|
||||
};
|
||||
async function loadData() {
|
||||
try {
|
||||
if (isLoaded.value) return;
|
||||
|
||||
Reference in New Issue
Block a user