kk_888
3 years ago
8 changed files with 1117 additions and 869 deletions
File diff suppressed because it is too large
Load Diff
@ -1,332 +1,358 @@ |
|||||||
<template> |
<template> |
||||||
<!--pages/release/index.wxml--> |
<!--pages/release/index.wxml--> |
||||||
<view class="release-page"> |
<view class="release-page"> |
||||||
<view class="auth-btn-box acea-row row-column row-middle"> |
<view class="auth-btn-box acea-row row-column row-middle"> |
||||||
<view class="auth-btn" @tap="toCompanyAuth" v-if="authStatus == 0 || authStatus == 3">企业认证<image src="/static/images/back.png"></image></view> |
<view class="auth-btn" @tap="toCompanyAuth" v-if="authStatus == 0 || authStatus == 3">企业认证<image |
||||||
<view class="auth-btn bgG" @tap="toPersonlAuth" v-if="authStatus == 0 || authStatus == 3">个人认证<image src="/static/images/back.png"></image></view> |
src="/static/images/back.png"></image> |
||||||
</view> |
</view> |
||||||
<view :class="'posi ' + (authStatus == 1 || authStatus == 2 ? 'top30' : '')"> |
<view class="auth-btn bgG" @tap="toPersonlAuth" v-if="authStatus == 0 || authStatus == 3">个人认证<image |
||||||
<view class="tips-box"> |
src="/static/images/back.png"></image> |
||||||
<view class="tips acea-row-nowrap row-middle" v-if="authStatus == 0 || authStatus == 3"> |
</view> |
||||||
<!-- <view class="icon">!</view> --> |
</view> |
||||||
<view>注:完成企业认证后可以发布资源及需求,个人认证后只可发布需求</view> |
<view :class="'posi ' + (authStatus == 1 || authStatus == 2 ? 'top30' : '')"> |
||||||
</view> |
<view class="tips-box"> |
||||||
<view class="tips acea-row row-middle" v-if="authStatus == 0"> |
<view class="tips acea-row-nowrap row-middle" v-if="authStatus == 0 || authStatus == 3"> |
||||||
<view class="icon">!</view> |
<!-- <view class="icon">!</view> --> |
||||||
<view>请先完成认证</view> |
<view>注:完成企业认证后可以发布资源及需求,个人认证后只可发布需求</view> |
||||||
</view> |
</view> |
||||||
<view class="tips acea-row row-middle" v-if="authStatus == 1"> |
<view class="tips acea-row row-middle" v-if="authStatus == 0"> |
||||||
<view class="icon">!</view> |
<view class="icon">!</view> |
||||||
<view>{{authType == 1 ? '企业信息审核中,请耐心等待!' : '个人信息审核中, 请耐心等待'}}</view> |
<view>请先完成认证</view> |
||||||
</view> |
</view> |
||||||
<view class="tips acea-row row-middle" v-if="authStatus == 2"> |
<view class="tips acea-row row-middle" v-if="authStatus == 1"> |
||||||
<view class="icon">!</view> |
<view class="icon">!</view> |
||||||
<view>{{authType == 1 ? '企业信息审核通过,可以发布资源和需求!' : '个人信息审核通过,可以发布需求'}}</view> |
<view>{{authType == 1 ? '企业信息审核中,请耐心等待!' : '个人信息审核中, 请耐心等待'}}</view> |
||||||
</view> |
</view> |
||||||
<view class="tips acea-row row-middle" v-if="authStatus == 3"> |
<view class="tips acea-row row-middle" v-if="authStatus == 2"> |
||||||
<view class="icon">!</view> |
<view class="icon">!</view> |
||||||
<view>{{authType == 1 ? '企业信息未审核通过, 请重新提交审核信息!' : '个人信息未审核通过, 请重新提交审核信息!'}}</view> |
<view>{{authType == 1 ? '企业信息审核通过,可以发布资源和需求!' : '个人信息审核通过,可以发布需求'}}</view> |
||||||
<view>未通过理由:{{reason}}</view> |
</view> |
||||||
</view> |
<view class="tips acea-row row-middle" v-if="authStatus == 3"> |
||||||
</view> |
<view class="icon">!</view> |
||||||
<view class="btn-box acea-row row-between"> |
<view>{{authType == 1 ? '企业信息未审核通过, 请重新提交审核信息!' : '个人信息未审核通过, 请重新提交审核信息!'}}</view> |
||||||
<view :class="'btn ' + (authStatus == 2 && authType == 1 ? 'auth' : '' )" @tap="toResources"> |
<view>未通过理由:{{reason}}</view> |
||||||
<view class="tip">我能提供...</view> |
</view> |
||||||
<image :class="authStatus == 2 && authType == 1 ? '' : 'default'" src="/static/images/yrz1.png"></image> |
</view> |
||||||
</view> |
<view class="btn-box acea-row row-between"> |
||||||
<view :class="'btn ' + (authStatus == 2 ? 'auth' : '' )" @tap="toNeeds"> |
<view :class="'btn ' + (authStatus == 2 && authType == 1 ? 'auth' : '' )" @tap="toResources"> |
||||||
<view class="tip">我有需求...</view> |
<view class="tip">我能提供...</view> |
||||||
<image :class="authStatus == 2 ? '' : 'default'" src="/static/images/yrz2.png"></image> |
<image :class="authStatus == 2 && authType == 1 ? '' : 'default'" src="/static/images/yrz1.png"> |
||||||
</view> |
</image> |
||||||
</view> |
</view> |
||||||
<view class="close" @tap="back"><image src="/static/images/fabu-close.png"></image></view> |
<view :class="'btn ' + (authStatus == 2 ? 'auth' : '' )" @tap="toNeeds"> |
||||||
</view> |
<view class="tip">我有需求...</view> |
||||||
</view> |
<image :class="authStatus == 2 ? '' : 'default'" src="/static/images/yrz2.png"></image> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="close" @tap="back"> |
||||||
|
<image src="/static/images/fabu-close.png"></image> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
// pages/release/index.js |
// pages/release/index.js |
||||||
const app = getApp(); |
const app = getApp(); |
||||||
|
|
||||||
export default { |
export default { |
||||||
data() { |
data() { |
||||||
return { |
return { |
||||||
userInfo: {}, |
userInfo: {}, |
||||||
authStatus: 0, |
authStatus: 0, |
||||||
authType: null, |
authType: null, |
||||||
completeState: null, |
completeState: null, |
||||||
authInfo: {} |
authInfo: {} |
||||||
}; |
}; |
||||||
}, |
}, |
||||||
|
|
||||||
components: {}, |
components: {}, |
||||||
props: {}, |
props: {}, |
||||||
|
|
||||||
/** |
/** |
||||||
* 生命周期函数--监听页面加载 |
* 生命周期函数--监听页面加载 |
||||||
*/ |
*/ |
||||||
onLoad: function (options) {}, |
onLoad: function(options) {}, |
||||||
|
|
||||||
/** |
/** |
||||||
* 生命周期函数--监听页面显示 |
* 生命周期函数--监听页面显示 |
||||||
*/ |
*/ |
||||||
onShow: function () { |
onShow: function() { |
||||||
this.isAuthentication(); |
this.isAuthentication(); |
||||||
}, |
}, |
||||||
|
|
||||||
/** |
/** |
||||||
* 生命周期函数--监听页面隐藏 |
* 生命周期函数--监听页面隐藏 |
||||||
*/ |
*/ |
||||||
onHide: function () {}, |
onHide: function() {}, |
||||||
|
|
||||||
/** |
/** |
||||||
* 生命周期函数--监听页面卸载 |
* 生命周期函数--监听页面卸载 |
||||||
*/ |
*/ |
||||||
onUnload: function () {}, |
onUnload: function() {}, |
||||||
|
|
||||||
/** |
/** |
||||||
* 页面相关事件处理函数--监听用户下拉动作 |
* 页面相关事件处理函数--监听用户下拉动作 |
||||||
*/ |
*/ |
||||||
onPullDownRefresh: function () {}, |
onPullDownRefresh: function() {}, |
||||||
|
|
||||||
/** |
/** |
||||||
* 页面上拉触底事件的处理函数 |
* 页面上拉触底事件的处理函数 |
||||||
*/ |
*/ |
||||||
onReachBottom: function () {}, |
onReachBottom: function() {}, |
||||||
|
|
||||||
/** |
/** |
||||||
* 用户点击右上角分享 |
* 用户点击右上角分享 |
||||||
*/ |
*/ |
||||||
onShareAppMessage: function () {}, |
onShareAppMessage: function() {}, |
||||||
methods: { |
methods: { |
||||||
back() { |
back() { |
||||||
let pages = getCurrentPages(); |
let pages = getCurrentPages(); |
||||||
console.log(pages) |
console.log(pages) |
||||||
// let pagePath = '/' + pages[pages.length - 2].route; |
// let pagePath = '/' + pages[pages.length - 2].route; |
||||||
// if(pagePath){ |
// if(pagePath){ |
||||||
// uni.navigateTo({ |
// uni.navigateTo({ |
||||||
// url: pagePath |
// url: pagePath |
||||||
// }); |
// }); |
||||||
// } else{ |
// } else{ |
||||||
// uni.switchTab({ |
// uni.switchTab({ |
||||||
// url: '/pages/home/index' |
// url: '/pages/home/index' |
||||||
// }); |
// }); |
||||||
// } |
// } |
||||||
uni.switchTab({ |
uni.switchTab({ |
||||||
url: '/pages/user/index' |
url: '/pages/user/index' |
||||||
}); |
}); |
||||||
}, |
}, |
||||||
|
|
||||||
toPersonlAuth() { |
toPersonlAuth() { |
||||||
if (this.authStatus == 0) { |
if (this.authStatus == 0) { |
||||||
uni.navigateTo({ |
uni.navigateTo({ |
||||||
url: '/pages/release/personAuth/index' |
url: '/pages/release/personAuth/index' |
||||||
}); |
}); |
||||||
} else if (this.authStatus == 3) { |
} else if (this.authStatus == 3) { |
||||||
let authInfo = encodeURIComponent(JSON.stringify(this.authInfo)); |
let authInfo = encodeURIComponent(JSON.stringify(this.authInfo)); |
||||||
uni.navigateTo({ |
uni.navigateTo({ |
||||||
url: '/pages/release/personAuth/index?authInfo=' + authInfo |
url: '/pages/release/personAuth/index?authInfo=' + authInfo |
||||||
}); |
}); |
||||||
} else if (this.authStatus == 1) { |
} else if (this.authStatus == 1) { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: '认证申请审核中,请等待!', |
title: '认证申请审核中,请等待!', |
||||||
icon: 'none' |
icon: 'none' |
||||||
}); |
}); |
||||||
} |
} |
||||||
}, |
}, |
||||||
|
|
||||||
toCompanyAuth() { |
toCompanyAuth() { |
||||||
if (this.authStatus == 0) { |
if (this.authStatus == 0) { |
||||||
uni.navigateTo({ |
uni.navigateTo({ |
||||||
url: '/pages/release/companyAuth/index' |
url: '/pages/release/companyAuth/index' |
||||||
}); |
}); |
||||||
} else if (this.authStatus == 3) { |
} else if (this.authStatus == 3) { |
||||||
let authInfo = encodeURIComponent(JSON.stringify(this.authInfo)); |
let authInfo = encodeURIComponent(JSON.stringify(this.authInfo)); |
||||||
uni.navigateTo({ |
uni.navigateTo({ |
||||||
url: '/pages/release/companyAuth/index?authInfo=' + authInfo |
url: '/pages/release/companyAuth/index?authInfo=' + authInfo |
||||||
}); |
}); |
||||||
} else if (this.authStatus == 1) { |
} else if (this.authStatus == 1) { |
||||||
uni.showToast({ |
uni.showToast({ |
||||||
title: '认证申请审核中,请等待!', |
title: '认证申请审核中,请等待!', |
||||||
icon: 'none' |
icon: 'none' |
||||||
}); |
}); |
||||||
} |
} |
||||||
}, |
}, |
||||||
|
|
||||||
isAuthentication() { |
isAuthentication() { |
||||||
app.http('get', 'user/isAuthentication').then(res => { |
app.http('get', 'user/isAuthentication').then(res => { |
||||||
if (res.data.success) { |
if (res.data.success) { |
||||||
this.setData({ |
this.setData({ |
||||||
authStatus: res.data.data.authenticationState, |
authStatus: res.data.data.authenticationState, |
||||||
authType: res.data.data.authorizationType, |
authType: res.data.data.authorizationType, |
||||||
completeState: res.data.data.completeState, |
completeState: res.data.data.completeState, |
||||||
authInfo: res.data.data.authInfo, |
authInfo: res.data.data.authInfo, |
||||||
reason: res.data.data.authInfo.reason |
reason: res.data.data.authInfo.reason |
||||||
}); |
}); |
||||||
} |
} |
||||||
}); |
}); |
||||||
}, |
}, |
||||||
|
|
||||||
toResources() { |
toResources() { |
||||||
let that = this; |
let that = this; |
||||||
console.log(this.authStatus, 'authStatus'); |
console.log(this.authStatus, 'authStatus'); |
||||||
console.log(this.authType, 'authType'); |
console.log(this.authType, 'authType'); |
||||||
console.log(this.completeState, 'completeState'); |
console.log(this.completeState, 'completeState'); |
||||||
|
|
||||||
if (this.authStatus == 2 && this.authType == 1 && this.completeState == true) { |
if (this.authStatus == 2 && this.authType == 1 && this.completeState == true) { |
||||||
uni.navigateTo({ |
uni.navigateTo({ |
||||||
url: '/pages/user/editNeeds/index?type=1' |
url: '/pages/user/editNeeds/index?type=1' |
||||||
}); |
}); |
||||||
} else if (this.authStatus == 2 && this.authType == 1 && this.completeState == false) { |
} else if (this.authStatus == 2 && this.authType == 1 && this.completeState == false) { |
||||||
uni.showModal({ |
uni.showModal({ |
||||||
title: '提示!', |
title: '提示!', |
||||||
content: '您还未完善企业信息,点击确定去完善吧~', |
content: '您还未完善企业信息,点击确定去完善吧~', |
||||||
|
|
||||||
success(res) { |
success(res) { |
||||||
if (res.confirm) { |
if (res.confirm) { |
||||||
uni.navigateTo({ |
uni.navigateTo({ |
||||||
url: '/pages/release/perfectCompanyInfo/index' |
url: '/pages/release/perfectCompanyInfo/index' |
||||||
}); |
}); |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
}); |
}); |
||||||
} else if (this.authStatus == 0 && (this.authType == 1 || this.authType == 0) && this.completeState == false) { |
} else if (this.authStatus == 0 && (this.authType == 1 || this.authType == 0) && this.completeState == |
||||||
uni.showModal({ |
false) { |
||||||
title: '提示!', |
uni.showModal({ |
||||||
content: '您还未完成企业认证,点击确定去认证吧~', |
title: '提示!', |
||||||
|
content: '您还未完成企业认证,点击确定去认证吧~', |
||||||
success(res) { |
|
||||||
if (res.confirm) { |
success(res) { |
||||||
uni.navigateTo({ |
if (res.confirm) { |
||||||
url: '/pages/release/companyAuth/index' |
uni.navigateTo({ |
||||||
}); |
url: '/pages/release/companyAuth/index' |
||||||
} |
}); |
||||||
} |
} |
||||||
|
} |
||||||
}); |
|
||||||
} |
}); |
||||||
}, |
} |
||||||
|
}, |
||||||
toNeeds() { |
|
||||||
if (this.authStatus == 2 && (this.authType == 2 || this.authType == 1) && this.completeState == true) { |
toNeeds() { |
||||||
uni.navigateTo({ |
if (this.authStatus == 2 && (this.authType == 2 || this.authType == 1) && this.completeState == true) { |
||||||
url: '/pages/user/editNeeds/index?type=2' |
uni.navigateTo({ |
||||||
}); |
url: '/pages/user/editNeeds/index?type=2' |
||||||
} else if (this.authStatus == 2 && (this.authType == 2 || this.authType == 0) && this.completeState == false) { |
}); |
||||||
uni.showModal({ |
} else if (this.authStatus == 2 && (this.authType == 2 || this.authType == 0) && this.completeState == |
||||||
title: '提示!', |
false) { |
||||||
content: '您还未完善个人信息,点击确定去完善吧~', |
uni.showModal({ |
||||||
|
title: '提示!', |
||||||
success(res) { |
content: '您还未完善个人信息,点击确定去完善吧~', |
||||||
uni.navigateTo({ |
|
||||||
url: '/pages/release/perfectPersonInfo/index' |
success(res) { |
||||||
}); |
uni.navigateTo({ |
||||||
} |
url: '/pages/release/perfectPersonInfo/index' |
||||||
|
}); |
||||||
}); |
} |
||||||
} else if (this.authStatus == 0 && (this.authType == 2 || this.authType == 0) && this.completeState == false) { |
|
||||||
uni.showModal({ |
}); |
||||||
title: '提示!', |
} else if (this.authStatus == 0 && (this.authType == 2 || this.authType == 0) && this.completeState == |
||||||
content: '您还未完成认证,点击上方按钮去认证吧!' |
false) { |
||||||
}); |
uni.showModal({ |
||||||
} |
title: '提示!', |
||||||
} |
content: '您还未完成认证,点击上方按钮去认证吧!' |
||||||
|
}); |
||||||
} |
} |
||||||
}; |
} |
||||||
|
|
||||||
|
} |
||||||
|
}; |
||||||
</script> |
</script> |
||||||
<style> |
<style> |
||||||
/* pages/release/index.wxss */ |
/* pages/release/index.wxss */ |
||||||
|
|
||||||
.auth-btn-box{ |
.auth-btn-box { |
||||||
width: 100%; |
width: 100%; |
||||||
margin-top: 300rpx; |
margin-top: 300rpx; |
||||||
} |
} |
||||||
.auth-btn{ |
|
||||||
width: 310rpx; |
.auth-btn { |
||||||
height: 101rpx; |
width: 310rpx; |
||||||
background: linear-gradient(137deg, #FFCDB8 0%, #FF9060 100%); |
height: 101rpx; |
||||||
border-radius: 12rpx; |
background: linear-gradient(137deg, #FFCDB8 0%, #FF9060 100%); |
||||||
display: flex; |
border-radius: 12rpx; |
||||||
align-items: center; |
display: flex; |
||||||
justify-content: center; |
align-items: center; |
||||||
color: #fff; |
justify-content: center; |
||||||
margin-bottom: 50rpx; |
color: #fff; |
||||||
} |
margin-bottom: 50rpx; |
||||||
.auth-btn image{ |
} |
||||||
width: 32rpx; |
|
||||||
height: 32rpx; |
.auth-btn image { |
||||||
transform: rotate(180deg); |
width: 32rpx; |
||||||
} |
height: 32rpx; |
||||||
.bgG{ |
transform: rotate(180deg); |
||||||
background: linear-gradient(137deg, #BFD7F9 0%, #A8C8F6 100%); |
} |
||||||
} |
|
||||||
.posi{ |
.bgG { |
||||||
position: absolute; |
background: linear-gradient(137deg, #BFD7F9 0%, #A8C8F6 100%); |
||||||
width: 100%; |
} |
||||||
bottom: 100rpx; |
|
||||||
} |
.posi { |
||||||
.top30{ |
position: absolute; |
||||||
bottom: 30%; |
width: 100%; |
||||||
} |
bottom: 100rpx; |
||||||
.tips-box{ |
} |
||||||
/* margin-top: 15%; */ |
|
||||||
} |
.top30 { |
||||||
.tips{ |
bottom: 30%; |
||||||
color: #FF0000; |
} |
||||||
font-size: 26rpx; |
|
||||||
padding-left: 54rpx; |
.tips-box { |
||||||
margin-bottom: 10rpx; |
/* margin-top: 15%; */ |
||||||
} |
} |
||||||
.icon{ |
|
||||||
width: 26rpx; |
.tips { |
||||||
height: 26rpx; |
color: #FF0000; |
||||||
border: 1rpx solid #FF0000; |
font-size: 26rpx; |
||||||
text-align: center; |
padding-left: 54rpx; |
||||||
line-height: 22rpx; |
margin-bottom: 10rpx; |
||||||
border-radius: 50%; |
} |
||||||
font-size: 20rpx; |
|
||||||
margin-right: 10rpx; |
.icon { |
||||||
} |
width: 26rpx; |
||||||
.btn-box{ |
height: 26rpx; |
||||||
width: 100%; |
border: 1rpx solid #FF0000; |
||||||
padding: 0 36rpx; |
text-align: center; |
||||||
margin-top: 28rpx; |
line-height: 22rpx; |
||||||
} |
border-radius: 50%; |
||||||
.btn{ |
font-size: 20rpx; |
||||||
width: 320rpx; |
margin-right: 10rpx; |
||||||
height: 378rpx; |
} |
||||||
position: relative; |
|
||||||
} |
.btn-box { |
||||||
.btn-box image{ |
width: 100%; |
||||||
width: 320rpx; |
padding: 0 36rpx; |
||||||
height: 378rpx; |
margin-top: 28rpx; |
||||||
position: absolute; |
} |
||||||
left: 0; |
|
||||||
top: 0; |
.btn { |
||||||
} |
width: 320rpx; |
||||||
.btn-box .default{ |
height: 378rpx; |
||||||
filter: grayscale(1); |
position: relative; |
||||||
} |
} |
||||||
.btn .tip{ |
|
||||||
color: #9C9C9C; |
.btn-box image { |
||||||
font-weight: 500; |
width: 320rpx; |
||||||
font-size: 32rpx; |
height: 378rpx; |
||||||
position: relative; |
position: absolute; |
||||||
left: 0; |
left: 0; |
||||||
top: 70rpx; |
top: 0; |
||||||
text-align: center; |
} |
||||||
z-index: 3; |
|
||||||
} |
.btn-box .default { |
||||||
.btn .auth{ |
filter: grayscale(1); |
||||||
color: #1D1D1D; |
} |
||||||
} |
|
||||||
.close { |
.btn .tip { |
||||||
text-align: center; |
color: #9C9C9C; |
||||||
} |
font-weight: 500; |
||||||
.close image{ |
font-size: 32rpx; |
||||||
width: 88rpx; |
position: relative; |
||||||
height: 88rpx; |
left: 0; |
||||||
} |
top: 70rpx; |
||||||
|
text-align: center; |
||||||
|
z-index: 3; |
||||||
|
} |
||||||
|
|
||||||
|
.btn .auth { |
||||||
|
color: #1D1D1D; |
||||||
|
} |
||||||
|
|
||||||
|
.close { |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
|
||||||
|
.close image { |
||||||
|
width: 88rpx; |
||||||
|
height: 88rpx; |
||||||
|
} |
||||||
</style> |
</style> |
Loading…
Reference in new issue