Browse Source

上传修改

master
前端-胡立永 2 months ago
parent
commit
ab41af5264
14 changed files with 442 additions and 105 deletions
  1. +1
    -19
      api/model/boss.js
  2. +1
    -9
      api/model/index-lzx.js
  3. +1
    -1
      config.js
  4. +3
    -0
      pages.json
  5. +7
    -4
      pages/index/center.vue
  6. +7
    -5
      pages_order/auth/certification.vue
  7. +58
    -49
      pages_order/auth/certificationEnterprise.vue
  8. +11
    -7
      pages_order/mine/MemberRecharge.vue
  9. +319
    -0
      pages_order/mine/updateUser.vue
  10. +2
    -5
      pages_order/work/addResume.vue
  11. +23
    -2
      pages_order/work/bossDetail.vue
  12. +3
    -3
      pages_order/work/jobPosting.vue
  13. +1
    -1
      store/store.js
  14. +5
    -0
      utils/oss-upload/oss/index.js

+ 1
- 19
api/model/boss.js View File

@ -1,25 +1,7 @@
// 积分相关接口
// boss相关接口
const api = {
//会员中心-我的收藏(数量统计)
bossQueryCollectionCount: {
url: '/api/boss/queryCollectionCount',
method: 'GET',
auth: true,
},
//会员中心-联系记录-谁看过我(数量统计)
bossQueryWatchMeCount: {
url: '/api/boss/queryWatchMeCount',
method: 'GET',
auth: true,
},
//会员中心-联系记录-我看过谁(数量统计)
bossQueryWatchWhoCount: {
url: '/api/boss/queryWatchWhoCount',
method: 'GET',
auth: true,
},
}
export default api

+ 1
- 9
api/model/index-lzx.js View File

@ -84,17 +84,9 @@ const api = {
//我的服务-企业实名认证
addAuthenticationCompany: {
url: '/employ/authentication/addAuthenticationCompany',
method: 'GET',
method: 'POST',
auth: true
},
}
export default api

+ 1
- 1
config.js View File

@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'dev'
const type = 'prod'
// 环境配置


+ 3
- 0
pages.json View File

@ -183,6 +183,9 @@
},
{
"path": "auth/certificationEnterprise"
},
{
"path": "mine/updateUser"
}
]
}],


+ 7
- 4
pages/index/center.vue View File

@ -8,7 +8,8 @@
<image :src="headImage" mode=""></image>
</view>
<view class="info">
<view class="name">
<view class="name"
@click="$utils.navigateTo('/pages_order/mine/updateUser')">
{{username}}
<view>
<uv-icon name="edit-pen" size="40rpx" color="#fff"></uv-icon>
@ -32,7 +33,8 @@
<view class="user">
<!-- 实名认证 -->
<view class="auth" v-if="UserExtensionInfo.status != '1'" @click="$utils.navigateTo('/pages_order/auth/certification')">
<view class="auth" v-if="UserExtensionInfo.personAuthenticationStatus != '1'"
@click="$utils.navigateTo('/pages_order/auth/certification')">
<uv-cell
icon="setting-fill"
title="完成实名认证,信息优先推荐!"
@ -40,10 +42,11 @@
isLink></uv-cell>
</view>
<view class="auth" v-else @click="$utils.navigateTo('/pages_order/auth/certification')">
<view class="auth" v-else
@click="$utils.navigateTo('/pages_order/auth/certification')">
<uv-cell
icon="setting-fill"
title="您已完成认证!"
title="您已完成实名认证!"
value="去查看"
isLink></uv-cell>
</view>


+ 7
- 5
pages_order/auth/certification.vue View File

@ -136,7 +136,7 @@
//
getAuthenticationPerson(){
this.$api('getAuthenticationPerson',{}, res =>{
if(res.code == 200){
if(res.code == 200 && res.result){
this.form = res.result || {};
@ -162,10 +162,15 @@
})
})
})
},
// :lzx
sumbit(){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意个人实名认证服务协议',
icon:'none'
})
}
this.form.image = this.fileList.map((item) => item.url).join(",")
if(this.$utils.verificationAll(this.form,{
name:'请输入姓名',
@ -194,9 +199,6 @@
})
}
}
}
</script>


+ 58
- 49
pages_order/auth/certificationEnterprise.vue View File

@ -11,7 +11,7 @@
您将获得企业认证平台特权
</text>
</view>
<view style="color: red;" v-if="sub ==2">
<view style="color: red;" v-if="status == 2">
已驳回原因{{form.remark}}
</view>
@ -22,16 +22,18 @@
</view>
<input type="text" class="form-input"
placeholder="请输入企业名称"
v-model="form.name"/>
v-model="form.companyName"/>
</view>
<view class="form-item">
<view class="form-item"
@click="selectAddr">
<view class="label">
企业地址
</view>
<input type="text" class="form-input"
placeholder="请输入企业地址"
v-model="form.name"/>
disabled
v-model="form.companyAddress"/>
</view>
<view class="form-item">
@ -40,7 +42,7 @@
</view>
<input type="text" class="form-input"
placeholder="请输入法定代表人"
v-model="form.name"/>
v-model="form.legalPerson"/>
</view>
<view class="form-item">
@ -49,25 +51,7 @@
</view>
<input type="text" class="form-input"
placeholder="请输入社会统一新信用代码"
v-model="form.cerNo"/>
</view>
<view class="form-item">
<view class="label">
联系人姓名
</view>
<input type="text" class="form-input"
placeholder="请输入联系人姓名"
v-model="form.phone"/>
</view>
<view class="form-item">
<view class="label">
联系电话
</view>
<input type="text" class="form-input"
placeholder="请输入联系电话"
v-model="form.phone"/>
v-model="form.socialCode"/>
</view>
<view class="form-item">
@ -108,21 +92,19 @@
<view v-if="sub==0" class="uni-color-btn" @click="sumbit">
<view v-if="status==0" class="uni-color-btn" @click="sumbit">
认证
</view>
<view v-if="sub==1" class="uni-uncolor-btn" @click="sumbit">
<view v-if="status==1" class="uni-uncolor-btn" @click="sumbit">
已审核通过
</view>
<view v-if="sub==2" class="uni-redcolor-btn" @click="sumbit">
<view v-if="status==2" class="uni-redcolor-btn" @click="sumbit">
已驳回,请重新提交
</view>
<view class="config">
<uv-checkbox-group
v-model="checkboxValue"
@ -154,9 +136,11 @@
data() {
return {
checkboxValue : [],
form : {},
form : {
companyAddress : '',
},
fileList: [],
sub:0
status : 0,
}
},
onLoad() {
@ -165,14 +149,15 @@
methods: {
//-
getAuthenticationCompany(){
this.$api('getAuthenticationCompany',{}, res =>{
if(res.code == 200){
this.$api('getAuthenticationCompany', {}, res =>{
if(res.code == 200 && res.result){
this.form = res.result || {};
this.form = res.result;
this.sub = this.form.status || 0;
this.status = this.form.status || 0;
this.fileList = this.form.image ? this.form.image.split(',').map(url => {
this.fileList = this.form.businessLicense ? this.form.businessLicense
.split(',').map(url => {
return {
url
}
@ -192,16 +177,22 @@
})
})
})
},
// :lzx
// :lzx
sumbit(){
this.form.image = this.fileList.map((item) => item.url).join(",")
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意企业认证服务协议',
icon:'none'
})
}
this.form.businessLicense = this.fileList.map((item) => item.url).join(",")
if(this.$utils.verificationAll(this.form,{
name:'请输入姓名',
cerNo:'请输入身份证号码',
phone:'请输入电话号码',
image:'身份证照片不能为空',
companyName : '请输入企业名称',
companyAddress : '请选择企业地址',
legalPerson : '请输入企业法人',
socialCode : '请输入社会统一信用代码',
businessLicense : '工商营业执照不能为空',
})) {
return
}
@ -213,19 +204,37 @@
delete this.form.updateTime
delete this.form.userId
this.$api('addAuthenticationPerson',this.form, res =>{
this.$api('addAuthenticationCompany', this.form, res =>{
if(res.code == 200){
uni.showToast({
title:'提交成功!等待审核',
icon: 'none'
})
})
setTimeout(uni.navigateBack,1000,-1)
}
})
}
},
//
selectAddr() {
uni.chooseLocation({
success: (res) => {
//
this.form.latitude = res.latitude
this.form.longitude = res.longitude
// if (res.name) { //
if (!res.address && res.name) { //
return this.form.companyAddress = res.name
}
if (res.address || res.name) {
return this.form.companyAddress = res.address + res.name
}
this.form.companyAddress = '' //
this.form.latitude = ''
this.form.longitude = ''
}
});
},
}
}


+ 11
- 7
pages_order/mine/MemberRecharge.vue View File

@ -26,7 +26,9 @@
<view class="openvip">{{numInfo.vipType}}</view>
<view class="options">
<view @click="vipId = item.id" :class="{option : true, act : vipId == item.id}" v-for="(item,index) in list"
<view @click="vipId = item.id"
:class="{option : true, act : vipId == item.id}"
v-for="(item,index) in list"
:key="index">
<view style="font-weight: 600;">{{ item.name }}</view>
<view style="color: #FF2E2E;">
@ -40,11 +42,13 @@
<view class="block" v-if="vip.id">
<view class="privilege">{{ vip.name }}</view>
<view class="cells">
<view class="cell" v-for="(item, index) in vip.keys">
<view class="cell"
:key="item.id"
v-for="(item, index) in vip.keys">
<image src="../static/mine/characteristic.png" mode="aspectFill" />
<view class="text">
<view>{{ item[0] }}</view>
<view style="font-size: 24rpx;">{{ item[1] }}</view>
<view style="font-size: 24rpx;">{{ item[1] }}</view>
</view>
</view>
<!-- <view class="cell">
@ -242,10 +246,10 @@
border-radius: 16rpx;
box-sizing: border-box;
margin: 12rpx;
view {
margin-top: 15rpx;
font-size: 28rpx;
font-size: 26rpx;
}
}
@ -260,7 +264,7 @@
margin-left: 5%;
.privilege {
font-size: 34rpx;
font-size: 30rpx;
padding: 60rpx 0rpx 40rpx;
}
@ -276,7 +280,7 @@
.text {
margin-left: 20rpx;
color: #707070;
font-size: 28rpx;
font-size: 26rpx;
}


+ 319
- 0
pages_order/mine/updateUser.vue View File

@ -0,0 +1,319 @@
<template>
<view class="login">
<view class="bg1"></view>
<view class="title">
定制自己的形象
</view>
<view
v-if="back"
@click="$utils.navigateBack"
style="position: absolute;top: 120rpx;left: 20rpx;">
<uv-icon
size="30rpx"
color="#000"
name="arrow-left"></uv-icon>
</view>
<button class="chooseAvatar"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar">
<image :src="form.headImage"
mode="aspectFill"></image>
</button>
<input type="nickname"
placeholder="给自己起一个响亮的名字"
class="nickname" id="nickName"
v-model="form.nickName" />
<!-- <view class="sexSelect">
<view
@click="sexClick(item)"
v-for="(item, index) in sexList"
:key="index"
:style="{color : form.sex == item.value ? item.actColor : '#333'}">
<uv-icon
size="30rpx"
:color="form.sex == item.value ? item.actColor : '#333'"
:name="item.icon"></uv-icon>
{{ item.value }}
</view>
</view> -->
<!-- <view class="address"
@click="$refs.datetimePicker.open()">
您出生于{{ $dayjs(form.yearDate).format("YYYY") }}
</view>
<view class="address"
@click="$refs.picker.open()">
{{ form.address || '请选择居住地址'}}
</view> -->
<uv-datetime-picker
ref="datetimePicker"
v-model="form.yearDate"
mode="year"
:minDate="minDate"
:maxDate="maxDate">
</uv-datetime-picker>
<uv-picker ref="picker"
:columns="columns"
keyName="name"
@confirm="confirmAddress"></uv-picker>
<view class="btn" @click="submit">
确认
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
form: {
headImage: '',
nickName: '',
sex : '男',
yearDate : this.$dayjs().add(-18, 'y').valueOf(),//18
address : '',
},
maxDate : this.$dayjs().valueOf(),
minDate : this.$dayjs().add(-100, 'y').valueOf(),
sex : {
: {
name : 'man',
color : '#5baaff',
},
: {
name : 'woman',
color : '#ff50b3',
},
},
sexList : [
{
value : '男',
icon : 'man',
actColor : '#5baaff',
},
{
value : '女',
icon : 'woman',
actColor : '#ff50b3',
},
],
columns : [],
back : '',
};
},
computed: {
...mapState(['cityList', 'userInfo']),
},
onLoad({back}) {
this.back = back
// this.$nextTick(() => {
// this.form.headImage = this.userInfo.headImage || this.form.headImage
// this.form.nickName = this.userInfo.nickName || this.form.nickName
// this.form.sex = this.userInfo.sex || this.form.sex
// this.form.yearDate = this.userInfo.yearDate || this.form.yearDate
// this.form.address = this.userInfo.address || this.form.address
// })
},
onShow() {
this.getCityList()
this.getUserInfo()
},
computed: {},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
.then(url => {
self.form.headImage = url
})
},
sexClick(item){
this.form.sex = item.value
},
confirmAddress(e){
this.form.address = e.value[0].name
},
//
getCityList(){
this.$api('getCityList', res => {
if(res.code == 200){
this.columns = [
res.result
]
}
})
},
getUserInfo(){
this.$api('getInfo', res => {
if(res.code == 200){
this.form.headImage = res.result.headImage || this.form.headImage
this.form.nickName = res.result.nickName || this.form.nickName
this.form.sex = res.result.sex || this.form.sex
this.form.yearDate = res.result.yearDate &&
this.$dayjs(res.result.yearDate + '-01-01').valueOf() || this.form.yearDate
this.form.address = res.result.address || this.form.address
}
})
},
submit() {
let self = this
uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.form.nickName = nickName
if (self.$utils.verificationAll(self.form, {
headImage: '请选择头像',
nickName: '请填写昵称',
// address: '',
})) {
return
}
let data = {
...self.form,
// yearDate : this.$dayjs(self.form.yearDate).format("YYYY")
}
self.$api('updateInfo', data, res => {
if (res.code == 200) {
uni.reLaunch({
url:'/pages/index/index'
})
}
})
})
},
}
}
</script>
<style lang="scss" scoped>
.login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #fff;
overflow: hidden;
.bg1{
width: 700rpx;
height: 700rpx;
border-radius: 50%;
background-color: #ffc0b333;
position: absolute;
right: -300rpx;
top: -300rpx;
}
.title {
line-height: 45rpx;
font-weight: 900;
padding-bottom: 100rpx;
font-size: 40rpx;
}
.chooseAvatar {
width: 100%;
padding: 0 !important;
margin: 0 !important;
border: none;
background-color: #fff !important;
width: 220rpx;
height: 220rpx;
border-radius: 50%;
image{
width: 200rpx;
height: 200rpx;
border-radius: 50%;
box-shadow: 0 0 10rpx 10rpx #00000012;
margin: 10rpx;
}
}
.chooseAvatar::after{
border: none;
padding: 0 !important;
margin: 0 !important;
}
.nickname{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
}
.sexSelect{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
display: flex;
align-items: center;
font-size: 26rpx;
line-height: 80rpx;
overflow: hidden;
&>view{
flex: 1;
display: flex;
justify-content: center;
align-content: center;
height: 100%;
}
&>view:nth-child(1){
border-right: 1px solid #000;
}
}
.address{
background-color: #f7f7f7;
width: 600rpx;
height: 80rpx;
text-align: center;
border-radius: 40rpx;
margin-top: 30rpx;
line-height: 80rpx;
color: #555;
}
.btn {
// background: $uni-linear-gradient-btn-color;
background: $uni-color;
color: #fff;
width: 80%;
padding: 20rpx 0;
text-align: center;
border-radius: 15rpx;
margin-top: 10vh;
}
}
</style>

+ 2
- 5
pages_order/work/addResume.vue View File

@ -278,11 +278,8 @@
},
queryResumeByUserId(){
this.$api('queryResumeByUserId', res => {
if(res.code == 200){
this.form = res.result.records[0] || {
sex : '男',
qulification : '',
}
if(res.code == 200 && res.result){
this.form = res.result.records[0]
if(res.result.records[0]!=null){
this.form.id=res.result.records[0].id


+ 23
- 2
pages_order/work/bossDetail.vue View File

@ -4,6 +4,15 @@
<image src="/static/image/home/banner.png" mode="aspectFill"
class="bgImage"></image>
<view class="close"
@click="$utils.navigateBack">
<uv-icon
name="arrow-left"
color="#fff"
size="30rpx"
></uv-icon>
</view>
<view class="box">
<view class="boss-box">
<image :src="hanHaiMember.headImage"
@ -43,7 +52,8 @@
</view>
<view class="album">
<uv-album :urls="urls"></uv-album>
<uv-album :urls="companyInfo.image
&& companyInfo.image.split(',')"></uv-album>
</view>
</view>
@ -85,7 +95,6 @@
hanHaiMember:{},
collectionFlag : false,
mixinsListApi : 'employeeQueryJobList',
urls: ['https://via.placeholder.com/400x200.png/3c9cff/fff'],
}
},
onLoad({id}) {
@ -127,6 +136,18 @@
width: 100%;
height: 500rpx;
}
.close{
position: absolute;
left: 30rpx;
width: 60rpx;
height: 60rpx;
border-radius: 50%;
top: 100rpx;
background-color: #00000033;
display: flex;
justify-content: center;
align-items: center;
}
.box{
margin-top: -100rpx;
.boss-box{


+ 3
- 3
pages_order/work/jobPosting.vue View File

@ -321,11 +321,11 @@
this.form.longitude = res.longitude
// if (res.name) { //
if (!res.workAddress && res.name) { //
if (!res.address && res.name) { //
return this.form.workAddress = res.name
}
if (res.workAddress || res.name) {
return this.form.workAddress = res.workAddress + res.name
if (res.address || res.name) {
return this.form.workAddress = res.address + res.name
}
this.form.workAddress = '' //
this.form.latitude = ''


+ 1
- 1
store/store.js View File

@ -10,7 +10,7 @@ const store = new Vuex.Store({
state: {
configList: {}, //配置列表
// 角色 true为老板 false为工人
role : false,
role : true,
userInfo : {}, //用户信息
banner : [],//轮播图
jobTypeList : [],//工种


+ 5
- 0
utils/oss-upload/oss/index.js View File

@ -43,6 +43,9 @@ function storeFolder() {
* @param folder 存储桶中的目标文件夹
*/
export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
uni.showLoading({
title: '上传中...'
})
return new Promise((resolve, reject) => {
if (folder && folder?.length > 0) {
if (folder[0] == "/") folder = folder.slice(1, folder.length)
@ -63,6 +66,7 @@ export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
signature: OSSConfig.signature,
},
success(res) {
uni.hideLoading()
if (res.errMsg.includes("uploadFile:ok")) {
resolve(ossConfig.aliOss.url + key)
} else {
@ -70,6 +74,7 @@ export function ossUpload(filePath, key = storeKey(), folder = storeFolder()) {
}
},
fail(err) {
uni.hideLoading()
reject(err)
}
}


Loading…
Cancel
Save