['发布商品必须企业店铺处理']

This commit is contained in:
2021-11-04 15:56:04 +08:00
parent c011538220
commit a1c05786c7
4 changed files with 372 additions and 182 deletions

View File

@@ -173,11 +173,7 @@
</view>
<!-- 企业工具 -->
<view class="userPartner" v-if="userData.is_company">
<view class="partner-title">
企业工具
</view>
<!-- orderShipment -->
<!-- orderRefund -->
<view class="partner-title">企业工具</view>
<view class="tool-list">
<view class="tool-label" v-if="permission.manageGoods" @click="$Router.push({name: 'goodsManagement'})">
<image class="tool-label-img" src="/static/user/userTool-00.png" mode=""></image>
@@ -209,6 +205,12 @@
</view>
</view>
</view>
<view class="userPartner" style="display: flex;flex-direction: column;" v-else>
<block v-if="companyCreateInfo.code !== 1" >
<view class="partner-title"> 企业工具</view>
<view class="onOpen" @click="company(companyCreateInfo.code)">{{companyCreateInfo.code === -1?'立即开通企业认证':companyCreateInfo.code === 0?'企业认证审核中':companyCreateInfo.code === 2?'企业认证被已驳回':''}}</view>
</block>
</view>
<!-- 我的权证 -->
<view class="userPartner">
<view class="partner-title">
@@ -268,6 +270,7 @@
userNotice,
userCustomer
} from '@/apis/interfaces/user'
import {companyStatus,companyIsallow} from '@/apis/interfaces/setting.js'
import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
export default {
data() {
@@ -298,7 +301,8 @@
},
// 是否为企业主
isOwnCompany: false,
shoeCardType: false
shoeCardType: false,
companyCreateInfo:{},
}
},
onShow() {
@@ -313,6 +317,8 @@
// 获取公告列表
this.newInfo();
this.companyStatus()
},
onHide() {
// 移除vip模块跳动样式
@@ -338,6 +344,53 @@
}
},
methods: {
// 获取企业认证状态
companyStatus(){
companyStatus().then(res=>{
console.log(res)
this.companyCreateInfo = res
})
},
// 是否展示企业信息 企业认证 -1.未认证0.审核中1.审核通过2.驳回
company(code) {
console.log(code)
if (code === -1) {
// 跳转到企业认证页面
companyIsallow().then(res=>{
this.$Router.push({
name:'companyApprove'
})
}).catch(err=>{
this.$refs.uToast.show({
title: err.message,
type: 'primary',
duration: 3000
})
})
} else if (code === 2) {
// 跳转到企业认证页面
this.$Router.push({
name:'companyApprove',
params:{
form_type:'put'
}
})
} else if (code === 0) {
this.$refs.uToast.show({
title: '审核中',
type: 'primary',
duration: 3000
})
} else if (code === 1) {
// 跳转到企业认证页面
this.$refs.uToast.show({
title: '认证通过!',
type: 'primary',
duration: 3000
})
}
},
// 开通VIP
openVip(identityId) {
// if (!this.userData.certification) {
@@ -924,7 +977,6 @@
}
}
}
// 我的伙伴
.userPartner {
margin-bottom: 30rpx;
@@ -933,6 +985,20 @@
padding: 30rpx 0;
box-sizing: border-box;
border-radius: 15rpx;
.onOpen{
background-color: #ee4c47;
color: #FFFFFF;
padding: 10rpx 40rpx;
width:400rpx;
border-radius: 30rpx;
display: inline-block;
text-align: center;
margin-top: 30rpx;
position: relative;
margin-left: -200rpx;
left: 50%;
}
.partner-title {
font-size: 32rpx;