修改本地生活提交状态

This commit is contained in:
wangxiaowei 2024-06-21 16:10:16 +08:00
parent f765c1dbbd
commit a78070baf2

@ -1,6 +1,14 @@
<template> <template>
<view class="store-settled" :style="{'backgroundColor': storeState == -1 || storeState == 2 ? '#FA844C' : '#ffffff'}"> <view class="store-settled" :style="{'backgroundColor': bgColor}">
<view class="content"> <view class="content login" v-if="!isLogin">
<router-link to="/pages/login/login">
<view class="white br60 flex row-center btn">
<image class="mr10" src="https://zjeloong.oss-cn-hangzhou.aliyuncs.com/uniapp/icon_wechat.png"></image>
<text>去登录</text>
</view>
</router-link>
</view>
<view v-else class="content">
<view class="apply-form bg-white" v-if="storeState == 0"> <view class="apply-form bg-white" v-if="storeState == 0">
<view class="text-center wait-pass"> <view class="text-center wait-pass">
<view> <view>
@ -340,21 +348,33 @@
shopCategory: [], shopCategory: [],
action: baseURL + '/api/file/formimage', action: baseURL + '/api/file/formimage',
fileList: [], fileList: [],
storeState: -1 storeState: -1,
bgColor: '#FA844C'
} }
}, },
onLoad() { onLoad() {
if (!this.isLogin) return this.$Router.push('/pages/login/login') if (!this.isLogin) {
getLocalStore().then((res) => { this.bgColor = '#ffffff';
if (res.data.local) { }
this.storeState = -1 this.getLocalStore()
}
})
}, },
methods: { methods: {
...mapActions(['initLocationFunc']), ...mapActions(['initLocationFunc']),
...mapMutations(['setCityInfo']), ...mapMutations(['setCityInfo']),
async getLocalStore() {
getLocalStore().then((res) => {
if (res.data.local) {
this.storeState = res.data.local.store_state
if (this.storeState == -1 || this.storeState == 2) {
this.bgColor = '#FA844C'
} else {
this.bgColor = '#ffffff';
}
}
})
},
// 证件类型 // 证件类型
confirmCrftType1(e) { confirmCrftType1(e) {
const {value, label} = e[0] const {value, label} = e[0]
@ -459,6 +479,7 @@
}) })
setTimeout(() => { setTimeout(() => {
this.storeState = 0; this.storeState = 0;
this.bgColor = '#ffffff';
}, 500) }, 500)
} }
} }
@ -483,7 +504,7 @@
}, },
}, },
computed: { computed: {
...mapGetters(['cityInfo']) ...mapGetters(['cityInfo', 'isLogin'])
}, },
watch: { watch: {
cityInfo: { cityInfo: {
@ -587,5 +608,26 @@
} }
} }
} }
.login {
background: #fff;
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.btn {
background-color: #09BB07;
width: 280rpx;
line-height: 70rpx;
margin: 40rpx auto 0;
image {
width: 50rpx;
height: 50rpx;
}
}
}
} }
</style> </style>