feat: 网店管理-按钮文案从「停用/启用」改为「休息/营业」
This commit is contained in:
@@ -296,6 +296,10 @@
|
|||||||
const next = uni.getStorageSync(HOME_DEFAULT_TAB_STORAGE_KEY);
|
const next = uni.getStorageSync(HOME_DEFAULT_TAB_STORAGE_KEY);
|
||||||
defaultTabName.value = next ? String(next) : '';
|
defaultTabName.value = next ? String(next) : '';
|
||||||
if (next) uni.removeStorageSync(HOME_DEFAULT_TAB_STORAGE_KEY);
|
if (next) uni.removeStorageSync(HOME_DEFAULT_TAB_STORAGE_KEY);
|
||||||
|
const userStore = sheep.$store('user');
|
||||||
|
if (userStore?.isLogin) {
|
||||||
|
userStore.getInfo();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
//跳转浏览器
|
//跳转浏览器
|
||||||
const openExternal = (url) => {
|
const openExternal = (url) => {
|
||||||
|
|||||||
@@ -628,11 +628,11 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 6rpx;
|
gap: 2rpx;
|
||||||
min-width: 80rpx;
|
min-width: 60rpx;
|
||||||
padding: 14rpx 24rpx;
|
padding: 10rpx 20rpx;
|
||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
background: #f6f7fb;
|
background: #f1f2f5;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
v-if="row.toggleActionText"
|
v-if="row.toggleActionText"
|
||||||
class="op"
|
class="op"
|
||||||
:class="[
|
:class="[
|
||||||
row.toggleActionText === '停用' ? 'opDanger' : 'opSuccess',
|
row.toggleActionText === '休息' ? 'opDanger' : 'opSuccess',
|
||||||
{ opDisabled: updatingStoreId === row.id },
|
{ opDisabled: updatingStoreId === row.id },
|
||||||
]"
|
]"
|
||||||
@tap="toggle(row)"
|
@tap="toggle(row)"
|
||||||
@@ -234,7 +234,7 @@
|
|||||||
const normalizeRow = (store) => {
|
const normalizeRow = (store) => {
|
||||||
const status = getStoreStatus(store);
|
const status = getStoreStatus(store);
|
||||||
const statusConfig = statusMap[status] || { text: '--', className: '' };
|
const statusConfig = statusMap[status] || { text: '--', className: '' };
|
||||||
const toggleActionText = status === 1 ? '停用' : status === 2 || status === 3 ? '启用' : '';
|
const toggleActionText = status === 1 ? '休息' : status === 2 || status === 3 ? '营业' : '';
|
||||||
const progressInfo = getStoreProgressInfo(store);
|
const progressInfo = getStoreProgressInfo(store);
|
||||||
return {
|
return {
|
||||||
id: Number(store?.id || 0),
|
id: Number(store?.id || 0),
|
||||||
@@ -336,7 +336,7 @@
|
|||||||
const toggle = (row) => {
|
const toggle = (row) => {
|
||||||
const storeId = Number(row?.id || 0);
|
const storeId = Number(row?.id || 0);
|
||||||
const nextStatus = row?.status === 1 ? 2 : row?.status === 2 || row?.status === 3 ? 1 : 0;
|
const nextStatus = row?.status === 1 ? 2 : row?.status === 2 || row?.status === 3 ? 1 : 0;
|
||||||
const actionText = nextStatus === 1 ? '启用' : '停用';
|
const actionText = nextStatus === 1 ? '营业' : '休息';
|
||||||
if (!(storeId > 0) || !(nextStatus === 1 || nextStatus === 2) || updatingStoreId.value === storeId) return;
|
if (!(storeId > 0) || !(nextStatus === 1 || nextStatus === 2) || updatingStoreId.value === storeId) return;
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user