创建商品转跳店铺状态维护

This commit is contained in:
唐明明
2021-11-04 16:15:24 +08:00
10 changed files with 2102 additions and 1926 deletions

View File

@@ -10,8 +10,8 @@ import router from '../router'
// 基础配置
const config = {
// apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境
apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
// apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境
apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式)
timeout : 60000
}

View File

@@ -279,7 +279,6 @@
padding-left: 200rpx;
line-height: 90rpx;
min-height: 90rpx;
label {
position: absolute;
top: 0;
@@ -287,18 +286,15 @@
width: 200rpx;
font-size: $title-size;
}
input {
width: 100%;
height: 90rpx;
line-height: 90rpx;
font-size: $title-size;
}
.picker-text {
position: relative;
padding-right: 90rpx;
.picker-icon {
position: absolute;
right: 0;

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,12 @@
return this.percent * this.skus_price
}
},
beforeRouteLeave(to, from, next){
console.log(to)
console.log(from)
console.log(next)
next()
},
created() {
// 编辑状态信息
if(this.$Route.query.type && this.$Route.query.type === 'edit'){
@@ -258,7 +278,7 @@
this.services = services
this.stores = stores
this.percent = Number(res.percent)
this.storePer = res.storePer
}).catch(err => {
uni.showToast({
@@ -291,6 +311,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 +654,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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long