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

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 = { const config = {
// apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境 apiUrl : 'https://oapi.lianshang.vip/api/', // 正式环境
apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境 // apiUrl : 'http://api.ahxh.shangkelian.cn/api/', // 测试环境
apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式) apiUrls : 'https://storage.lianshang.vip/', // 图片路径(测试/正式)
timeout : 60000 timeout : 60000
} }

View File

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

View File

@@ -20,7 +20,7 @@
</view> </view>
<view class="info-item" v-if="details.type.value === 2"> <view class="info-item" v-if="details.type.value === 2">
<view class="info-item-title">满减</view> <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>
<view class="info-item"> <view class="info-item">
<view class="info-item-title">券发放量</view> <view class="info-item-title">券发放量</view>

View File

@@ -149,6 +149,7 @@
<!-- 选择店铺 --> <!-- 选择店铺 -->
<uni-popup ref="storePopup"> <uni-popup ref="storePopup">
<view class="category-popup"> <view class="category-popup">
<block v-if="storesArr.length <0">
<view class="header"> <view class="header">
<view class="title">选择店铺</view> <view class="title">选择店铺</view>
</view> </view>
@@ -161,6 +162,18 @@
<view class="btns"> <view class="btns">
<button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button> <button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button>
</view> </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> </view>
</uni-popup> </uni-popup>
<!-- 安全区 --> <!-- 安全区 -->
@@ -207,6 +220,7 @@
tagsIndex : 0, // 选择标签的下标 tagsIndex : 0, // 选择标签的下标
servicesArr : [], // 可选服务 servicesArr : [], // 可选服务
type : 1, // 1为商品2为服务 type : 1, // 1为商品2为服务
storePer : true,// 默认可以创建门店
}; };
}, },
computed:{ computed:{
@@ -214,6 +228,12 @@
return this.percent * this.skus_price return this.percent * this.skus_price
} }
}, },
beforeRouteLeave(to, from, next){
console.log(to)
console.log(from)
console.log(next)
next()
},
created() { created() {
// 编辑状态信息 // 编辑状态信息
if(this.$Route.query.type && this.$Route.query.type === 'edit'){ if(this.$Route.query.type && this.$Route.query.type === 'edit'){
@@ -258,7 +278,7 @@
this.services = services this.services = services
this.stores = stores this.stores = stores
this.percent = Number(res.percent) this.percent = Number(res.percent)
this.storePer = res.storePer
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
@@ -291,6 +311,7 @@
this.categoryId = this.$Route.query.id this.categoryId = this.$Route.query.id
this.categoryCid= this.$Route.query.cid this.categoryCid= this.$Route.query.cid
this.percent = Number(res.percent) this.percent = Number(res.percent)
this.storePer = res.storePer
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: err.message, title: err.message,
@@ -633,7 +654,7 @@
.btns{ .btns{
padding-top: $padding * 2; padding-top: $padding * 2;
button{ button{
background: $text-price; background: $mian-color;
border-radius: 0; border-radius: 0;
height: 90rpx; height: 90rpx;
line-height: 90rpx; line-height: 90rpx;

View File

@@ -173,11 +173,7 @@
</view> </view>
<!-- 企业工具 --> <!-- 企业工具 -->
<view class="userPartner" v-if="userData.is_company"> <view class="userPartner" v-if="userData.is_company">
<view class="partner-title"> <view class="partner-title">企业工具</view>
企业工具
</view>
<!-- orderShipment -->
<!-- orderRefund -->
<view class="tool-list"> <view class="tool-list">
<view class="tool-label" v-if="permission.manageGoods" @click="$Router.push({name: 'goodsManagement'})"> <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> <image class="tool-label-img" src="/static/user/userTool-00.png" mode=""></image>
@@ -209,6 +205,12 @@
</view> </view>
</view> </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="userPartner">
<view class="partner-title"> <view class="partner-title">
@@ -268,6 +270,7 @@
userNotice, userNotice,
userCustomer userCustomer
} from '@/apis/interfaces/user' } 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' import h5Copy from '@/js_sdk/junyi-h5-copy/junyi-h5-copy/junyi-h5-copy'
export default { export default {
data() { data() {
@@ -298,7 +301,8 @@
}, },
// 是否为企业主 // 是否为企业主
isOwnCompany: false, isOwnCompany: false,
shoeCardType: false shoeCardType: false,
companyCreateInfo:{},
} }
}, },
onShow() { onShow() {
@@ -313,6 +317,8 @@
// 获取公告列表 // 获取公告列表
this.newInfo(); this.newInfo();
this.companyStatus()
}, },
onHide() { onHide() {
// 移除vip模块跳动样式 // 移除vip模块跳动样式
@@ -338,6 +344,53 @@
} }
}, },
methods: { 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 // 开通VIP
openVip(identityId) { openVip(identityId) {
// if (!this.userData.certification) { // if (!this.userData.certification) {
@@ -924,7 +977,6 @@
} }
} }
} }
// 我的伙伴 // 我的伙伴
.userPartner { .userPartner {
margin-bottom: 30rpx; margin-bottom: 30rpx;
@@ -934,6 +986,20 @@
box-sizing: border-box; box-sizing: border-box;
border-radius: 15rpx; 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 { .partner-title {
font-size: 32rpx; font-size: 32rpx;
position: relative; 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