msgSetting.vue
4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<template>
<view class="msg_setting">
<view class="select_list">
<view v-for="(item, index) in navList" :key="index" class="select_item" @click="expertActive = index">
<image class="icon" :src="expertActive === index ? item.iconActive : item.iconName" mode=""></image>
<text class="col-3d f-24 l-h-32 m-top10">{{ item.title }}</text>
</view>
</view>
<view class="expert_content">
<swiper class="swiper" circular :current="expertActive" @animationfinish="toggleSwiper">
<swiper-item>
<view class="swiper-item">
<scroll-view scroll-y="true" class="scroll-history">
<view id="demo1" v-for="item in 10" :key="item" class="scroll-item">
<msgCardVue />
</view>
<view class="col-9 f-24 l-h-32 m-top30 t-c">暂无更多消息</view>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<scroll-view scroll-y="true" class="scroll-history">
<view class="scroll-item">
<msgCardVue />
<view class="col-9 f-24 l-h-32 m-top30 t-c">暂无更多消息</view>
</view>
</scroll-view>
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<scroll-view scroll-y="true" class="scroll-history">
<view class="scroll-item">
<view class="msg_title">订场管理</view>
<!-- 消息列表 -->
<view class="bg-fff">
<u-cell-group :border="false">
<u-cell v-for="(item, index) in bookingMsg" :key="index" :title="item.title">
<u-switch slot="right-icon" v-model="item.isTrue" inactiveColor="#EAEAEA" activeColor="#58BE6B" :loading="isLoading"/>
</u-cell>
</u-cell-group>
</view>
<view class="msg_title">商城管理</view>
<!-- 消息列表 -->
<view class="bg-fff">
<u-cell-group :border="false">
<u-cell v-for="(item, index) in mallMsg" :key="index" :title="item.title">
<u-switch slot="right-icon" v-model="item.isTrue" inactiveColor="#EAEAEA" activeColor="#58BE6B" :loading="isLoading"/>
</u-cell>
</u-cell-group>
</view>
</view>
</scroll-view>
</view>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script>
import Msg from '../static/msg.png'
import storeMsg from '../static/storeMsg.png'
import settingMsg from '../static/settingMsg.png'
import msgActive from '../static/msg_active.png'
import storeMsgActive from '../static/storeMsg_active.png'
import settingMsgActive from '../static/settingMsg_active.png'
import msgCardVue from '../components/msgCard.vue'
export default {
components: { msgCardVue },
data() {
return {
checked: false,
isLoading: false,
expertActive: 0,
navList: [
{ title: '系统消息', iconName: Msg, iconActive: msgActive},
{ title: '店铺消息', iconName: storeMsg, iconActive: storeMsgActive},
{ title: '消息设置', iconName: settingMsg, iconActive: settingMsgActive}
],
bookingMsg: [
{ title: '订场提醒', isTrue: false },
{ title: '订单进行中提醒', isTrue: false },
{ title: '退款提醒', isTrue: true }
],
mallMsg: [
{ title: '自提订单提醒', isTrue: false },
{ title: '配送订单提醒', isTrue: true },
{ title: '退款提醒', isTrue: true },
{ title: '库存不足提醒', isTrue: true }
]
}
},
methods: {
// 检测手机滑动
toggleSwiper(event){
this.expertActive = event.detail?.current
}
}
}
</script>
<style lang="scss" scoped>
.msg_setting{
background-color: #F6F7FB;
min-height: 100vh;
.select_list{
display: flex;
align-items: center;
justify-content: space-around;
padding: 20rpx 0;
background-color: #fff;
.select_item{
display: flex;
flex-direction: column;
align-items: center;
.icon{
width: 100rpx;
height: 100rpx;
border-radius: 32rpx;
}
}
}
.msg_title{
padding: 0 30rpx;
height: 72rpx;
line-height: 72rpx;
font-size: 24rpx;
color: #999;
}
}
.expert_content{
padding: 20rpx 30rpx;
}
.scroll-history {
height: calc(100vh - 182rpx);
}
.swiper {
height: calc(100vh - 182rpx);
}
.swiper-item {
display: block;
}
.scroll-item {
margin-bottom: 10px;
}
</style>