update: 我的主页UI设计
This commit is contained in:
parent
9418a64604
commit
4fa74a8363
@ -5,7 +5,8 @@
|
|||||||
:background="'linear-gradient(to left, #ff3000, #a70300)'"
|
:background="'linear-gradient(to left, #ff3000, #a70300)'"
|
||||||
v-if="true"
|
v-if="true"
|
||||||
></status-bar>
|
></status-bar>
|
||||||
<view class="hander">
|
|
||||||
|
<view class="hander" @click="skipu()">
|
||||||
<view class="hander-left">
|
<view class="hander-left">
|
||||||
<view class="user-img">
|
<view class="user-img">
|
||||||
<u--image
|
<u--image
|
||||||
@ -13,21 +14,15 @@
|
|||||||
dashboardInfo.store_info.store_logo || '../../static/user-img.png'
|
dashboardInfo.store_info.store_logo || '../../static/user-img.png'
|
||||||
"
|
"
|
||||||
shape="circle"
|
shape="circle"
|
||||||
width="60"
|
width="64"
|
||||||
height="60"
|
height="64"
|
||||||
></u--image>
|
></u--image>
|
||||||
</view>
|
</view>
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<view class="user-name-block" @click="skipu()">
|
<view class="user-name-block">
|
||||||
<view class="user-name">
|
<view class="user-name">
|
||||||
{{ dashboardInfo.store_info.store_name }}
|
{{ dashboardInfo.store_info.store_name }}
|
||||||
</view>
|
</view>
|
||||||
<u-icon
|
|
||||||
style="display: inline-block; margin-left: 8rpx"
|
|
||||||
name="arrow-right"
|
|
||||||
size="12"
|
|
||||||
color="#fff"
|
|
||||||
></u-icon>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="user-store-name">
|
<view class="user-store-name">
|
||||||
{{ dashboardInfo.store_info.store_grade_name }}
|
{{ dashboardInfo.store_info.store_grade_name }}
|
||||||
@ -35,113 +30,172 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="hander-right">
|
<view class="hander-right">
|
||||||
<view class="right-item">
|
<view class="right-item kf_item">
|
||||||
<u-icon
|
<u-icon
|
||||||
class="icon-shezhi"
|
class="icon-shezhi"
|
||||||
custom-prefix="custom-icon-kefu custom-icon"
|
custom-prefix="custom-icon-kefu custom-icon"
|
||||||
size="25"
|
size="20"
|
||||||
color="#fff"
|
color="#fff"
|
||||||
></u-icon>
|
></u-icon>
|
||||||
<view class="icon-label">平台客服</view>
|
<view class="icon-label">官方客服</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-item" @click="shipuSetting()">
|
<view class="right-item">
|
||||||
<u-icon
|
<u-icon name="arrow-right" size="18" color="#fff"></u-icon>
|
||||||
class="icon-shezhi"
|
|
||||||
custom-prefix="custom-icon-shezhi custom-icon"
|
|
||||||
size="22"
|
|
||||||
color="#fff"
|
|
||||||
></u-icon>
|
|
||||||
<view class="icon-label">设置</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="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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fm-content">
|
|
||||||
<view class="title">常用功能</view>
|
<view class="shop_status" :style="{background: shopStatus==1 ? '#D8F1EC' : shopStatus==2 ? '#ffecf2': '#eee'}">
|
||||||
<view class="fm-list">
|
<u-cell-group :border="false">
|
||||||
<view class="fm-item" @click="skipuPrinter">
|
<u-cell
|
||||||
<u-icon
|
@click="handleShowTime"
|
||||||
class="fm-icon"
|
iconStyle="marginRight:6px; color: #279B8B;"
|
||||||
custom-prefix="custom-icon-dayinji custom-icon"
|
:border="false"
|
||||||
size="25"
|
isLink
|
||||||
color="#e62300"
|
icon="hourglass-half-fill"
|
||||||
></u-icon>
|
title="营业中"
|
||||||
打印机
|
v-if="shopStatus==1"
|
||||||
</view>
|
></u-cell>
|
||||||
<view class="fm-item" @click="skipuOrCode">
|
<u-cell
|
||||||
<u-icon
|
iconStyle="marginRight:6px; color: #fe411b"
|
||||||
class="fm-icon"
|
:border="false"
|
||||||
custom-prefix="custom-icon-erweima custom-icon"
|
isLink
|
||||||
size="25"
|
url="/pages/my/shopQRcode/shopQRcode"
|
||||||
color="#e62300"
|
icon="hourglass-half-fill"
|
||||||
></u-icon>
|
title="已停业"
|
||||||
店铺二维码
|
v-if="shopStatus==2"
|
||||||
</view>
|
></u-cell>
|
||||||
<view class="fm-item" @click="skipuBusinessStatus">
|
<u-cell
|
||||||
<u-icon
|
iconStyle="marginRight:6px; color: #666"
|
||||||
class="fm-icon"
|
:border="false"
|
||||||
custom-prefix="custom-icon-erweima custom-icon"
|
isLink
|
||||||
size="25"
|
url="/pages/my/shopQRcode/shopQRcode"
|
||||||
color="#e62300"
|
icon="hourglass-half-fill"
|
||||||
></u-icon>
|
title="已打烊"
|
||||||
营业状态
|
v-if="shopStatus==3"
|
||||||
</view>
|
></u-cell>
|
||||||
<!-- <view class="fm-item">
|
</u-cell-group>
|
||||||
<u-icon
|
</view>
|
||||||
class="fm-icon"
|
|
||||||
custom-prefix="custom-icon-yunfei custom-icon"
|
<view class="myui_card shop-info">
|
||||||
size="30"
|
<view class="shop-info-item">
|
||||||
color="#000"
|
<u-count-to
|
||||||
></u-icon>
|
class="item-value turnover-item turnover-item-num"
|
||||||
运费设置
|
:start-val="0"
|
||||||
</view> -->
|
:end-val="dashboardInfo.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="dashboardInfo.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="dashboardInfo.order.pay_amount"
|
||||||
|
:decimals="2"
|
||||||
|
separator=","
|
||||||
|
></u-count-to>
|
||||||
|
<view class="item-label">成交总金额</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="myui_card tool">
|
||||||
|
<u-cell-group :border="false">
|
||||||
|
<u-cell
|
||||||
|
iconStyle="marginRight:6px; color: #62BBAE"
|
||||||
|
:border="false"
|
||||||
|
isLink
|
||||||
|
url="/pages/my/shopQRcode/shopQRcode"
|
||||||
|
icon="scan"
|
||||||
|
title="店铺二维码"
|
||||||
|
></u-cell>
|
||||||
|
<u-cell
|
||||||
|
iconStyle="marginRight:6px; color: #62BBAE"
|
||||||
|
:border="false"
|
||||||
|
isLink
|
||||||
|
url="/pages/my/userInfo"
|
||||||
|
icon="man-add-fill"
|
||||||
|
title="账号设置"
|
||||||
|
></u-cell>
|
||||||
|
<u-cell
|
||||||
|
iconStyle="marginRight:6px; color: #62BBAE"
|
||||||
|
:border="false"
|
||||||
|
isLink
|
||||||
|
url="/pages/my/printer/printerList"
|
||||||
|
icon="bookmark-fill"
|
||||||
|
title="打印设置"
|
||||||
|
></u-cell>
|
||||||
|
<u-cell
|
||||||
|
iconStyle="marginRight:6px; color: #62BBAE"
|
||||||
|
:border="false"
|
||||||
|
isLink
|
||||||
|
url="/pages/my/printer/printerList"
|
||||||
|
icon="bell-fill"
|
||||||
|
title="铃声设置"
|
||||||
|
></u-cell>
|
||||||
|
<u-cell
|
||||||
|
iconStyle="marginRight:6px; color: #026bff"
|
||||||
|
:border="false"
|
||||||
|
isLink
|
||||||
|
url="/pages/my/versions"
|
||||||
|
icon="error-circle-fill"
|
||||||
|
title="版本信息"
|
||||||
|
></u-cell>
|
||||||
|
<u-cell
|
||||||
|
iconStyle="marginRight:6px; color: #ff695b"
|
||||||
|
:border="false"
|
||||||
|
isLink
|
||||||
|
url="/pages/my/protocol/protocol"
|
||||||
|
icon="file-text-fill"
|
||||||
|
title="隐私协议"
|
||||||
|
></u-cell>
|
||||||
|
<u-cell
|
||||||
|
iconStyle="marginRight:6px; color: #fd4d40"
|
||||||
|
:border="false"
|
||||||
|
isLink
|
||||||
|
url="/pages/my/aboutUs/aboutUs"
|
||||||
|
icon="account-fill"
|
||||||
|
title="关于小发"
|
||||||
|
></u-cell>
|
||||||
|
</u-cell-group>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="btn_logout">退出登录</view>
|
||||||
|
|
||||||
|
<tpfTimeRange
|
||||||
|
ref="time"
|
||||||
|
:startDefaultTime="form.info.store_opening_hours"
|
||||||
|
:endDefaultTime="form.info.store_close_hours"
|
||||||
|
@timeRange="handleTimeRange"
|
||||||
|
></tpfTimeRange>
|
||||||
|
|
||||||
<tabbar tabbarName="my"></tabbar>
|
<tabbar tabbarName="my"></tabbar>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { GetAccountDashboard } from "../../api/user";
|
import { GetAccountDashboard } from "@/api/user";
|
||||||
import statusBar from "../../components/status-bar.vue";
|
import { GetShopBaseInfo } from "@/api/shop";
|
||||||
|
import statusBar from "@/components/status-bar.vue";
|
||||||
import tabbar from "@/components/tabbar/tabbar.vue";
|
import tabbar from "@/components/tabbar/tabbar.vue";
|
||||||
|
import tpfTimeRange from "@/components/tpf-time-range/tpf-time-range.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
statusBar,
|
statusBar,
|
||||||
tabbar,
|
tabbar,
|
||||||
|
tpfTimeRange,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
shopStatus: 1,
|
||||||
isBusiness: true,
|
isBusiness: true,
|
||||||
dashboardInfo: {
|
dashboardInfo: {
|
||||||
data: {},
|
data: {},
|
||||||
@ -169,12 +223,41 @@ export default {
|
|||||||
store_name: "",
|
store_name: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
form: {
|
||||||
|
info: {
|
||||||
|
store_opening_hours: "00:00",
|
||||||
|
store_close_hours: "00:00",
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getAccountDashboard();
|
this.getAccountDashboard();
|
||||||
|
this.getShopBaseInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async getShopBaseInfo() {
|
||||||
|
let res = await GetShopBaseInfo();
|
||||||
|
if (res && res.status == 200) {
|
||||||
|
this.form = res.data;
|
||||||
|
this.form.businessTime =
|
||||||
|
res.data.info.store_opening_hours +
|
||||||
|
"-" +
|
||||||
|
res.data.info.store_close_hours;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
handleTimeRange(e) {
|
||||||
|
this.form.businessTime = e[0] + e[1];
|
||||||
|
this.form.store_opening_hours = e[0];
|
||||||
|
this.form.store_close_hours = e[1];
|
||||||
|
},
|
||||||
|
|
||||||
|
handleShowTime() {
|
||||||
|
this.$refs["time"].open();
|
||||||
|
},
|
||||||
|
|
||||||
async getAccountDashboard() {
|
async getAccountDashboard() {
|
||||||
let res = await GetAccountDashboard();
|
let res = await GetAccountDashboard();
|
||||||
if (res && res.status == 200) {
|
if (res && res.status == 200) {
|
||||||
@ -182,67 +265,33 @@ export default {
|
|||||||
this.dashboardInfo = res.data;
|
this.dashboardInfo = res.data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
skipu() {
|
skipu() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/my/shopInfo",
|
url: "/pages/my/shopInfo",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
shipuSetting() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/my/setting",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
skipuPrinter() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/my/printer/printerList",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
skipuOrCode() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/my/shopQRcode/shopQRcode",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
skipuBusinessStatus() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/my/storeBusinessStatus/businessStatus",
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.my-container {
|
.my-container {
|
||||||
background: #f8f8f8;
|
padding-bottom: 178rpx;
|
||||||
height: calc(100vh - 100rpx);
|
|
||||||
|
|
||||||
.hander {
|
.hander {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 20rpx 30rpx 40rpx 40rpx;
|
padding: 40rpx;
|
||||||
padding-top: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
height: 200rpx;
|
height: 186rpx;
|
||||||
background: linear-gradient(to left, #ff3000 0%, #a70300 100%);
|
// background: #FE411B;
|
||||||
|
background: linear-gradient(to bottom, #ff695b, #fd4d40);
|
||||||
&::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 {
|
.hander-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 40rpx;
|
|
||||||
|
|
||||||
.user-img {
|
.user-img {
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
@ -269,16 +318,13 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-store-name {
|
.user-store-name {
|
||||||
width: 100rpx;
|
|
||||||
margin-top: 12rpx;
|
margin-top: 12rpx;
|
||||||
padding: 4rpx 18rpx;
|
padding: 4rpx 20rpx;
|
||||||
height: 36rpx;
|
|
||||||
line-height: 36rpx;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
border-radius: 24rpx;
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #fff;
|
color: #ffecf2;
|
||||||
background: red;
|
border-radius: 100rpx;
|
||||||
|
border: 2rpx solid #ffecf2;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -289,46 +335,42 @@ export default {
|
|||||||
color: #000;
|
color: #000;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
||||||
|
|
||||||
|
.kf_item{
|
||||||
|
position: absolute;
|
||||||
|
right: 48rpx;
|
||||||
|
top: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.right-item {
|
.right-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-left: 48rpx;
|
gap: 10rpx;
|
||||||
height: 90rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-shezhi {
|
|
||||||
flex-direction: column;
|
|
||||||
margin-bottom: 6rpx;
|
|
||||||
align-items: end;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.shop-info {
|
.shop-info {
|
||||||
position: absolute;
|
display: flex;
|
||||||
left: 0;
|
justify-content: space-around;
|
||||||
bottom: -156rpx;
|
font-size: 28rpx;
|
||||||
width: 100%;
|
margin: 32rpx 24rpx;
|
||||||
z-index: 2;
|
|
||||||
|
.shop-info-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
flex-flow: column;
|
||||||
margin: 40rpx 0;
|
align-items: center;
|
||||||
font-weight: bold;
|
text-align: center;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
.shop-info-item {
|
.item-value {
|
||||||
display: flex;
|
color: #222 !important;
|
||||||
flex-flow: column;
|
margin-bottom: 20rpx;
|
||||||
align-items: center;
|
}
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.item-value {
|
.item-label {
|
||||||
margin-bottom: 20rpx;
|
color: #999;
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -368,9 +410,33 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.shop_status{
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool {
|
||||||
|
margin: 32rpx 24rpx;
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
::v-deep .u-cell__body {
|
||||||
|
padding: 30rpx 16rpx 30rpx 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_logout {
|
||||||
|
margin: 0 24rpx;
|
||||||
|
border-radius: 60rpx;
|
||||||
|
text-align: center;
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #fe411b;
|
||||||
|
border: 2rpx solid #fe411b;
|
||||||
|
// background: #FE411B;
|
||||||
|
// background: linear-gradient(to right, #fd826f, #FE411B);
|
||||||
|
}
|
||||||
|
|
||||||
.fm-content {
|
.fm-content {
|
||||||
margin: 20rpx;
|
margin: 0 24rpx;
|
||||||
margin-top: 240rpx;
|
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
padding: 20rpx 32rpx;
|
padding: 20rpx 32rpx;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user