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

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

@@ -20,7 +20,7 @@
</view>
<view class="info-item" v-if="details.type.value === 2">
<view class="info-item-title">满减</view>
<view class="info-item-text">{{details.price}}{{details.full}}</view>
<view class="info-item-text">{{details.full}}{{details.price}}</view>
</view>
<view class="info-item">
<view class="info-item-title">券发放量</view>

View File

@@ -149,6 +149,7 @@
<!-- 选择店铺 -->
<uni-popup ref="storePopup">
<view class="category-popup">
<block v-if="storesArr.length <0">
<view class="header">
<view class="title">选择店铺</view>
</view>
@@ -161,6 +162,18 @@
<view class="btns">
<button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button>
</view>
</block>
<block v-else>
<no-list name="no-shop" txt='您还没有创建店铺~' />
<view class="btns" v-if="storePer">
<button type="default" size="default" @click="$Router.push({name:'shopCreate'})">新建店铺</button>
</view>
<view class=""v-else>
<view class="btns" v-if="storePer">
<button type="default" size="default">当前没有创建店铺的权限</button>
</view>
</view>
</block>
</view>
</uni-popup>
<!-- 安全区 -->
@@ -207,6 +220,7 @@
tagsIndex : 0, // 选择标签的下标
servicesArr : [], // 可选服务
type : 1, // 1为商品2为服务
storePer : true,// 默认可以创建门店
};
},
computed:{
@@ -214,6 +228,9 @@
return this.percent * this.skus_price
}
},
onShow() {
console.log(this.$route)
},
created() {
// 编辑状态信息
if(this.$Route.query.type && this.$Route.query.type === 'edit'){
@@ -258,7 +275,7 @@
this.services = services
this.stores = stores
this.percent = Number(res.percent)
this.storePer = res.storePer
}).catch(err => {
uni.showToast({
@@ -291,6 +308,7 @@
this.categoryId = this.$Route.query.id
this.categoryCid= this.$Route.query.cid
this.percent = Number(res.percent)
this.storePer = res.storePer
}).catch(err => {
uni.showToast({
title: err.message,
@@ -633,7 +651,7 @@
.btns{
padding-top: $padding * 2;
button{
background: $text-price;
background: $mian-color;
border-radius: 0;
height: 90rpx;
line-height: 90rpx;

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;
@@ -934,6 +986,20 @@
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;
position: relative;

File diff suppressed because one or more lines are too long