update 修改样式问题
This commit is contained in:
parent
c1e88872bf
commit
b5b4d3c90d
18
java-mall-app-shop-admin/api/store.js
Normal file
18
java-mall-app-shop-admin/api/store.js
Normal file
@ -0,0 +1,18 @@
|
||||
import http from "../utils/http";
|
||||
import config from "../config/config";
|
||||
|
||||
/** 更新商店营业状态
|
||||
* @author Seven
|
||||
* @data 2025-6-25
|
||||
* @returns { }
|
||||
* @see https://mall.gpxscs.cn/api/admin/shop/shop-store-base/update/storeBizState
|
||||
*/
|
||||
|
||||
export function UpdateStoreBizState(params) {
|
||||
return http({
|
||||
url: "shop/shop-store-base/update/storeBizState",
|
||||
method: "post",
|
||||
baseURL: config.adminApi,
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
@ -143,6 +143,12 @@
|
||||
"navigationBarTitleText": "设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/businessStatus",
|
||||
"style": {
|
||||
"navigationBarTitleText": "营业状态"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/my/contract",
|
||||
"style": {
|
||||
|
||||
@ -559,9 +559,8 @@ export default {
|
||||
approval_remark: "",
|
||||
approval_invalid_col: [],
|
||||
};
|
||||
// this.auditInfo.has_apply_mer = 2;
|
||||
|
||||
if (!res.data) {
|
||||
if (!res.data || res.data.approval_status == 4) {
|
||||
this.showLoading = false;
|
||||
return;
|
||||
}
|
||||
|
||||
152
java-mall-app-shop-admin/pages/my/businessStatus.vue
Normal file
152
java-mall-app-shop-admin/pages/my/businessStatus.vue
Normal file
@ -0,0 +1,152 @@
|
||||
<template>
|
||||
<view class="businessStatus-container">
|
||||
<view class="business-contetn">
|
||||
<view class="title">营业状态</view>
|
||||
<view class="business-box">
|
||||
<view class="business-status">
|
||||
<view class="status-name">店铺正常营业中</view>
|
||||
<view class="business-time">
|
||||
营业时间:{{ dashboardInfo.store_info.info.store_opening_hours }} -
|
||||
{{ dashboardInfo.store_info.info.store_close_hours }}
|
||||
</view>
|
||||
</view>
|
||||
<u-switch
|
||||
v-model="dashboardInfo.store_info.store_biz_state"
|
||||
activeColor="#5ac725"
|
||||
inactiveColor="#f56c6c"
|
||||
:activeValue="1"
|
||||
:inactiveValue="2"
|
||||
@change="handerUpdateStoreBizState"
|
||||
></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { GetAccountDashboard } from "../../api/user";
|
||||
import { UpdateStoreBizState } from "../../api/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dashboardInfo: {
|
||||
data: {},
|
||||
notice: {},
|
||||
order: {
|
||||
yestoday_num: 0,
|
||||
},
|
||||
product: {
|
||||
illegal_num: 0,
|
||||
normal_num: 0,
|
||||
off_num: 0,
|
||||
total_num: 0,
|
||||
verify_passed_off_num: 0,
|
||||
verify_refused_num: 0,
|
||||
verify_waiting_num: 0,
|
||||
},
|
||||
return: {
|
||||
fin_num: 0,
|
||||
review_num: 0,
|
||||
total_num: 0,
|
||||
un_fin_num: 0,
|
||||
},
|
||||
store_info: {
|
||||
store_id: 1,
|
||||
store_name: "",
|
||||
store_biz_state: 1,
|
||||
info: {
|
||||
store_opening_hours: "",
|
||||
store_close_hours: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getAccountDashboard();
|
||||
},
|
||||
methods: {
|
||||
async getAccountDashboard() {
|
||||
let res = await GetAccountDashboard();
|
||||
if (res && res.status == 200) {
|
||||
uni.setStorageSync("accountDashboard", res.data);
|
||||
this.dashboardInfo = res.data;
|
||||
}
|
||||
},
|
||||
async handerUpdateStoreBizState(e) {
|
||||
let params = {
|
||||
store_id: this.dashboardInfo.store_info.store_id,
|
||||
store_biz_state: e,
|
||||
};
|
||||
|
||||
if (e == 2) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "你确定要暂时关闭店铺营业?",
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
let res = await UpdateStoreBizState(params);
|
||||
if (res && res.status == 200) {
|
||||
uni.showToast({
|
||||
title: `关闭成功`,
|
||||
icon: "error",
|
||||
duration: 1000,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
} else {
|
||||
let res = await UpdateStoreBizState(params);
|
||||
if (res && res.status == 200) {
|
||||
uni.showToast({
|
||||
title: `打开成功`,
|
||||
icon: "error",
|
||||
duration: 1000,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.businessStatus-container {
|
||||
.business-contetn {
|
||||
margin: 40rpx 20rpx;
|
||||
background: #fff;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
.title {
|
||||
padding: 20rpx 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.business-status {
|
||||
.status-name {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background-color: #5ac725;
|
||||
position: absolute;
|
||||
right: 25%;
|
||||
top: 36%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.business-box {
|
||||
padding: 20rpx 32rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="my-container">
|
||||
<status-bar
|
||||
:backgroundColor="'#fff'"
|
||||
:background="'linear-gradient(-90deg, #e4effe, #fff)'"
|
||||
:background="'linear-gradient(to left, #ff3000, #a70300)'"
|
||||
v-if="true"
|
||||
></status-bar>
|
||||
<view class="hander">
|
||||
@ -10,7 +10,7 @@
|
||||
<view class="user-img">
|
||||
<u--image
|
||||
:src="
|
||||
accountInfo.store_info.store_logo || '../../static/user-img.png'
|
||||
dashboardInfo.store_info.store_logo || '../../static/user-img.png'
|
||||
"
|
||||
shape="circle"
|
||||
width="60"
|
||||
@ -20,17 +20,17 @@
|
||||
<view class="user-info">
|
||||
<view class="user-name-block" @click="skipu()">
|
||||
<view class="user-name">
|
||||
{{ accountInfo.store_info.store_name }}
|
||||
{{ dashboardInfo.store_info.store_name }}
|
||||
</view>
|
||||
<u-icon
|
||||
style="display: inline-block; margin-left: 8rpx"
|
||||
name="arrow-right"
|
||||
size="12"
|
||||
color="#aaaaaa"
|
||||
color="#fff"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="user-store-name">
|
||||
{{ accountInfo.store_info.store_grade_name }}
|
||||
{{ dashboardInfo.store_info.store_grade_name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -40,7 +40,7 @@
|
||||
class="icon-shezhi"
|
||||
custom-prefix="custom-icon-kefu custom-icon"
|
||||
size="25"
|
||||
color="#000"
|
||||
color="#fff"
|
||||
></u-icon>
|
||||
<view class="icon-label">平台客服</view>
|
||||
</view>
|
||||
@ -49,52 +49,41 @@
|
||||
class="icon-shezhi"
|
||||
custom-prefix="custom-icon-shezhi custom-icon"
|
||||
size="22"
|
||||
color="#000"
|
||||
color="#fff"
|
||||
></u-icon>
|
||||
<view class="icon-label">设置</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop-info">
|
||||
<view class="shop-info-item">
|
||||
<u-count-to
|
||||
class="item-value turnover-item turnover-item-num"
|
||||
:start-val="0"
|
||||
:end-val="accountInfo.order.yestoday_num"
|
||||
></u-count-to>
|
||||
<view class="item-label">昨日订单数</view>
|
||||
</view>
|
||||
<view class="shop-info-item">
|
||||
<u-count-to
|
||||
class="item-value turnover-item turnover-item-num"
|
||||
:start-val="0"
|
||||
:end-val="accountInfo.order.month_num"
|
||||
></u-count-to>
|
||||
<view class="item-label">当月订单数</view>
|
||||
</view>
|
||||
<view class="shop-info-item">
|
||||
<u-count-to
|
||||
class="item-value turnover-item turnover-item-num"
|
||||
:start-val="0"
|
||||
:end-val="accountInfo.order.pay_amount"
|
||||
:decimals="2"
|
||||
separator=","
|
||||
></u-count-to>
|
||||
<view class="item-label">成交总金额</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="business-contetn">
|
||||
<view class="title">营业状态</view>
|
||||
<view class="business-box">
|
||||
<view class="business-status">
|
||||
<view class="status-name">店铺正常营业中</view>
|
||||
<view class="business-time">营业时间:07:00 - 22:30</view>
|
||||
<view class="shop-info">
|
||||
<view class="shop-info-item">
|
||||
<u-count-to
|
||||
class="item-value turnover-item turnover-item-num"
|
||||
:start-val="0"
|
||||
:end-val="dashboardInfo.order.yestoday_num"
|
||||
color="#fff"
|
||||
></u-count-to>
|
||||
<view class="item-label">昨日订单数</view>
|
||||
</view>
|
||||
<view class="shop-info-item">
|
||||
<u-count-to
|
||||
class="item-value turnover-item turnover-item-num"
|
||||
:start-val="0"
|
||||
:end-val="dashboardInfo.order.month_num"
|
||||
color="#fff"
|
||||
></u-count-to>
|
||||
<view class="item-label">当月订单数</view>
|
||||
</view>
|
||||
<view class="shop-info-item">
|
||||
<u-count-to
|
||||
class="item-value turnover-item turnover-item-num"
|
||||
:start-val="0"
|
||||
:end-val="dashboardInfo.order.pay_amount"
|
||||
:decimals="2"
|
||||
color="#fff"
|
||||
separator=","
|
||||
></u-count-to>
|
||||
<view class="item-label">成交总金额</view>
|
||||
</view>
|
||||
<u-switch
|
||||
v-model="isBusiness"
|
||||
activeColor="#5ac725"
|
||||
inactiveColor="#f56c6c"
|
||||
></u-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fm-content">
|
||||
@ -105,19 +94,28 @@
|
||||
class="fm-icon"
|
||||
custom-prefix="custom-icon-dayinji custom-icon"
|
||||
size="25"
|
||||
color="#000"
|
||||
color="#e62300"
|
||||
></u-icon>
|
||||
打印机
|
||||
</view>
|
||||
<view class="fm-item" @click="shipuQrCode">
|
||||
<view class="fm-item" @click="skipuOrCode">
|
||||
<u-icon
|
||||
class="fm-icon"
|
||||
custom-prefix="custom-icon-erweima custom-icon"
|
||||
size="25"
|
||||
color="#000"
|
||||
color="#e62300"
|
||||
></u-icon>
|
||||
店铺二维码
|
||||
</view>
|
||||
<view class="fm-item" @click="skipuBusinessStatus">
|
||||
<u-icon
|
||||
class="fm-icon"
|
||||
custom-prefix="custom-icon-erweima custom-icon"
|
||||
size="25"
|
||||
color="#e62300"
|
||||
></u-icon>
|
||||
营业状态
|
||||
</view>
|
||||
<!-- <view class="fm-item">
|
||||
<u-icon
|
||||
class="fm-icon"
|
||||
@ -145,7 +143,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
isBusiness: true,
|
||||
accountInfo: {
|
||||
dashboardInfo: {
|
||||
data: {},
|
||||
notice: {},
|
||||
order: {
|
||||
@ -181,7 +179,7 @@ export default {
|
||||
let res = await GetAccountDashboard();
|
||||
if (res && res.status == 200) {
|
||||
uni.setStorageSync("accountDashboard", res.data);
|
||||
this.accountInfo = res.data;
|
||||
this.dashboardInfo = res.data;
|
||||
}
|
||||
},
|
||||
skipu() {
|
||||
@ -199,11 +197,16 @@ export default {
|
||||
url: "/pages/my/printer/printerList",
|
||||
});
|
||||
},
|
||||
shipuQrCode() {
|
||||
skipuOrCode() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/my/shopQRcode/shopQRcode",
|
||||
});
|
||||
},
|
||||
skipuBusinessStatus() {
|
||||
uni.navigateTo({
|
||||
url: "/pages/my/businessStatus",
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -214,12 +217,27 @@ export default {
|
||||
height: calc(100vh - 100rpx);
|
||||
|
||||
.hander {
|
||||
position: relative;
|
||||
padding: 20rpx 30rpx 40rpx 40rpx;
|
||||
padding-top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: linear-gradient(-45deg, #e4effe, #fff);
|
||||
height: 200rpx;
|
||||
background: linear-gradient(to left, #ff3000 0%, #a70300 100%);
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: -200rpx;
|
||||
z-index: 1;
|
||||
content: " ";
|
||||
height: 200rpx;
|
||||
width: 100%;
|
||||
border-radius: 0 0 50% 50%;
|
||||
background: linear-gradient(to left, #ff3000 0%, #a70300 100%);
|
||||
}
|
||||
|
||||
.hander-left {
|
||||
display: flex;
|
||||
@ -234,6 +252,8 @@ export default {
|
||||
}
|
||||
|
||||
.user-info {
|
||||
color: #fff;
|
||||
|
||||
.user-name-block {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -258,7 +278,7 @@ export default {
|
||||
border-radius: 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #fff;
|
||||
background: #ccc;
|
||||
background: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -268,6 +288,7 @@ export default {
|
||||
font-size: 24rpx;
|
||||
color: #000;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
|
||||
.right-item {
|
||||
display: flex;
|
||||
@ -284,23 +305,30 @@ export default {
|
||||
align-items: end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.shop-info {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin: 40rpx 0;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
|
||||
.shop-info-item {
|
||||
.shop-info {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: -156rpx;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: space-around;
|
||||
margin: 40rpx 0;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
|
||||
.item-value {
|
||||
margin-bottom: 20rpx;
|
||||
.shop-info-item {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
|
||||
.item-value {
|
||||
margin-bottom: 20rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -326,7 +354,7 @@ export default {
|
||||
height: 6px;
|
||||
background-color: #5ac725;
|
||||
position: absolute;
|
||||
right: 68px;
|
||||
right: 25%;
|
||||
top: 36%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
@ -342,6 +370,7 @@ export default {
|
||||
|
||||
.fm-content {
|
||||
margin: 20rpx;
|
||||
margin-top: 240rpx;
|
||||
|
||||
.title {
|
||||
padding: 20rpx 32rpx;
|
||||
@ -362,6 +391,7 @@ export default {
|
||||
text-align: center;
|
||||
height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
|
||||
.fm-icon {
|
||||
height: 60rpx;
|
||||
|
||||
@ -159,15 +159,17 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@/styles/variables.scss";
|
||||
.view-container {
|
||||
padding: 40rpx;
|
||||
padding: 40rpx 32rpx;
|
||||
height: calc(100vh - 116rpx);
|
||||
background: #f6f6f6;
|
||||
background: #fff;
|
||||
|
||||
.item-content {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
.item-list {
|
||||
display: flex;
|
||||
@ -196,6 +198,7 @@ export default {
|
||||
padding-left: 20rpx; /* 给条状留出空间 */
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
|
||||
/* 通过伪元素添加左侧条状 */
|
||||
&::before {
|
||||
@ -206,7 +209,7 @@ export default {
|
||||
transform: translateY(-50%);
|
||||
width: 8rpx; /* 条状宽度 */
|
||||
height: 32rpx; /* 条状高度 */
|
||||
background-color: #007aff; /* 条状颜色 */
|
||||
background-color: $base-color; /* 条状颜色 */
|
||||
border-radius: 4rpx; /* 可选圆角 */
|
||||
}
|
||||
}
|
||||
@ -224,6 +227,7 @@ export default {
|
||||
min-width: 26%;
|
||||
border-radius: 12rpx;
|
||||
background: #41e6f9;
|
||||
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.4);
|
||||
color: #fff;
|
||||
|
||||
.order-title {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user