This commit is contained in:
18500206848
2024-02-02 14:44:30 +08:00
parent 6647042acb
commit 91172a730c
255 changed files with 24805 additions and 0 deletions

View File

@@ -0,0 +1,108 @@
<template>
<view class="application-body">
<view class="application-content" v-if="applicatinList.length!=0">
<view class="application-item" v-for="(item,index) in applicatinList" :key="index" @click="goApplyPage(item.type,item.content)">
<view class="apply_boldText">{{item.type | type}}</view>
<view class="apply_normalText">{{item.applTime}}</view>
</view>
</view>
<view class="noData" v-else>暂无申请信息</view>
</view>
</template>
<script>
import {getApplContentList} from '@/api/newIndex.js'
import {mapGetters} from 'vuex'
export default {
data() {
return {
applicatinList:[],
}
},
computed:{
...mapGetters(['authInfo','auth'])
},
onPullDownRefresh() {
this.applicatinList=[];
this.getList();
},
filters:{
type(type){
switch (type){
case 1:
return '法律咨询';
break;
case 2:
return '技能提升';
break;
}
}
},
methods: {
getList(){
if(this.auth.realNameState){
getApplContentList().then(res=>{
this.applicatinList=res.data.data.records;
uni.stopPullDownRefresh();
})
}
else{
this.applicatinList=[];
uni.stopPullDownRefresh();
}
},
goApplyPage(type,comment){
var data=encodeURIComponent(comment)
if(type==1){
uni.navigateTo({
url:`/pageMy/apply/rights?type=${type}&data=${data}`
})
}
else if(type==2){
uni.navigateTo({
url:`/pageMy/my/resume/setWskill?type=${type}&data=${data}`
})
}
}
},
onShow() {
this.getList();
}
}
</script>
<style>
.application-body{
width: 690rpx;
margin: 20rpx auto;
}
.application-item{
width: 100%;
height: 120rpx;
border-bottom:1px solid #eaeaea;
padding: 40rpx 30rpx 0 0rpx;
}
.apply_boldText{
font-size: 32rpx;
font-weight: bold;
color: #333333;
line-height: 36rpx;
margin-bottom: 14rpx;
}
.apply_normalText{
font-size: 28rpx;
font-weight: 400;
color: #CCCCCC;
line-height: 36rpx;
}
.noData{
text-align: center;
height: 100px;
line-height: 100px;
}
</style>

138
pageMy/apply/rights.vue Normal file
View File

@@ -0,0 +1,138 @@
<template>
<view>
<!-- <apply-template placeholder="请描述你遇到的法律问题" @submit="handel"></apply-template> -->
<textarea :auto-height="true" style="padding: 20px;" v-model="inputValue" placeholder="请描述你遇到的法律问题" maxlength="200" placeholder-class="textClass"/>
<view class="errTips" v-if="errShow && btnShow">抱歉您输入的内容已超出字数限制</view>
<view class="" v-if="btnShow">
<view class="submitBtn" v-if="validate" @click="handleSubmit">提交</view>
<view class="submitBtn" v-if="loading">提交中</view>
<view class="submitBtn disabledBtn" v-if="!validate">提交</view>
</view>
</view>
</template>
<script>
import {
labourUnionDetail
} from '@/api/federation.js'
import {mapGetters} from 'vuex'
import {showUniModal} from '@/untils/uniModal.js'
import {submitApplication} from '@/api/newIndex.js'
export default {
data() {
return {
inputValue:'',
validate:false,
applyType:1,
btnShow:true,
pageTitle:'',
placeholder:'',
loading:false,
errShow:false,
submitType:1,//申请类型1 法律咨询 2技能提升
}
},
onShow() {
if (!this.$store.state.user.token){
//modalTitle, content, whetherCancel, confirmText, pageUrl, cancelUrl
showUniModal('提示','您还未登录,点击确认去登录',true,'确定','/pages/login/login','/pages/index/index')
}else{
if (!this.auth.realNameState) { //未实名需要提示
showUniModal('提示', '检查到您还未实名认证,实名认证之后才可加入工会', true, '立即认证', '/pageMy/setUserBase/index','/pages/index/index')
} else {
labourUnionDetail(this.authInfo.idNumber).then(res => { //判断是否加入工会
const data = res.data.data.records;
if (data.length == 0) { //未查到数据,代表未加入工会
showUniModal('提示', '加入工会后可使用此服务', true, '加入工会', '/pageMy/federation/forMembership/Notice','/pages/index/index')
}
})
}
}
},
watch: {
inputValue(value) {
if(value.length!=0){
this.validate=true;
}
else{
this.validate=false;
}
if(value.length>=200){
this.errShow=true;
}
else{
this.errShow=false;
}
},
},
onLoad(option) {
this.applyType=option.type;
if(option.data && option.type){
this.inputValue=decodeURIComponent(option.data);
this.btnShow=false;
}
},
methods: {
handleSubmit(){
this.loading=true;
uni.showLoading({
title:'请求中'
})
let uid=this.authInfo.userId;
let uname=this.authInfo.realName;
let tel=this.authInfo.telphone;
submitApplication(uid,uname,tel,this.submitType,this.inputValue).then(res=>{
this.loading=false;
uni.hideLoading()
setTimeout(() => {
uni.showToast({
title: '提交成功',
icon: 'none'
});
}, 1000)
uni.switchTab({
url:'/pages/index/index'
})
})
},
},
computed:{
...mapGetters(['authInfo','auth'])
}
}
</script>
<style>
.textClass{
color: #cccccc;
}
.submitBtn{
width: 60%;
height: 80rpx;
line-height: 80rpx;
border-radius: 10px;
text-align: center;
background-color: #1b66ff;
color: #f1f1f1;
position: absolute;
bottom: 100px;
left: 20%;
}
.disabledBtn{
background-color: #7f7f7f;
}
.teset{
width: 100px;
height: 100px;
border: 1px solid;
}
.errTips{
color: red;
padding-left: 40rpx;
}
</style>