addPrimary.vue
6.0 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<template>
<view class="script_control">
<!-- 吸顶 -->
<u-sticky>
<!-- 顶部模块 -->
<view class="nav_box">
<!-- 搜索框 -->
<u-search
v-model="keyword"
placeholder="搜索本店剧本"
height="72rpx"
:showAction="false"
margin="14rpx 30rpx 28rpx 30rpx"
bgColor="#F7F8FA"
/>
<!-- 筛选列表 -->
<view class="select_list">
<view class="left">
<view v-for="item in 5" :key="item" class="left_item dis-flex flex-y-center">
<text style="margin-right: 6rpx;" class="f-28 l-h-38 col-3d">剧情</text>
<u-icon name="arrow-down" size="12" color="#333"></u-icon>
</view>
</view>
<view class="QRcode">
<image style="width: 32rpx;" src="@/static/homeImg/QRCode.png" mode="widthFix"></image>
</view>
</view>
<!-- 选择主题 -->
<view class="select_primary">
<view v-for="(item, index) in primaryList" :key="index" :class="{active: primaryCurrent === index}" class="item" @click="primaryCurrent = index">
{{ item }}
</view>
</view>
</view>
</u-sticky>
<!-- 内容列表 -->
<view class="script_container">
<view v-for="item in 3" :key="item" class="scritp_item">
<view class="left">
<image class="cover_img" src="@/static/homeImg/bgimg.webp" mode=""></image>
<text class="people_num">6人本</text>
</view>
<view class="right">
<text class="f-32 col-3d f-w-500 l-h-38 mb-10">北宋奇案·汴京</text>
<text class="col-9"><text class="m-r-10">4男2女</text> 古风/推理/悬疑/高阶</text>
<text style="margin-top: 18rpx;margin-bottom: 14rpx;" class="col-9">灰烬工作室</text>
<text class="u-line-1 col-9">一段北宋时期耻辱的历史,两个南宋同朝...</text>
<view class="edit" @click="addPrimary">添加</view>
</view>
</view>
</view>
<!-- 底部模块 -->
<view class="footer" @click="show = true">
<view class="f-24 l-h-32 col-f dis-flex flex-y-center">
<text>没有你想要的本?</text>
<text style="color: #FFD900;">联系平台添加</text>
<u-icon name="arrow-right-double" size="8" color="#FFD900"></u-icon>
</view>
</view>
<!-- 添加新本 -->
<u-popup :show="show" closeable mode="center" round="20" @close="show = false">
<view class="new_script">
<view class="f-32 f-w-500 l-h-42 col-3d t-c">添加新本</view>
<u--input v-model="scriptName" placeholder="请输入内容" :customStyle="{height: '72rpx',width: '540rpx',boxSizing: 'border-box',margin: '60rpx auto'}" border="surround"/>
<view class="col-6 f-24 l-h-32 t-c">输入剧本名称 联系平台运营人员,上传新本信息</view>
<view class="btn">发送</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
navList: ['剧本杀', '密室逃脱'],
current: 0,
keyword: '',
show: false,
scriptName: '',
primaryCurrent: 0,
primaryList: ['全部', '情感', '推理', '机制', '还原', '悬疑']
};
},
methods: {
toggleList(item, index) {
this.current = index;
},
addPrimary(){
uni.showModal({
content: '确定将主题《北宋奇案·汴京》 添加到本店主题库吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
}
}
</script>
<style lang="scss" scoped>
// 顶部模块
.nav_box{
background-color: #fff;
padding: 14rpx 0 20rpx 0;
.select_list{
position: relative;
padding: 0 30rpx;
margin-bottom: 20rpx;
.left{
display: flex;
align-items: center;
gap: 40rpx;
flex-shrink: 0;
}
.QRcode{
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 30rpx;
}
}
.select_primary{
overflow: hidden;
display: flex;
overflow-x: auto;
white-space: nowrap;
gap: 20rpx;
padding: 0 30rpx;
.item{
display: inline-block;
width: 120rpx;
height: 48rpx;
background: #F7F8FA;
border-radius: 200rpx;
color: #999;
flex-shrink: 0;
font-size: 28rpx;
text-align: center;
line-height: 48rpx;
&.active{
background: #FFD900;
color: #3d3d3d;
}
}
}
}
// 内容列表
.script_container{
display: flex;
flex-direction: column;
gap: 20rpx;
padding: 20rpx 30rpx;
background-color: #F6F7FB;
padding-bottom: 150rpx;
.scritp_item{
display: flex;
align-items: center;
padding: 30rpx;
background-color: #fff;
border-radius: 12rpx;
&:last-child{
border-bottom: 0;
}
.left{
position: relative;
width: 140rpx;
height: 180rpx;
border-radius: 8rpx;
overflow: hidden;
margin-right: 20rpx;
.cover_img{
width: 100%;
height: 100%;
}
.people_num{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 32rpx;
background-color: rgba(0, 0, 0, 0.7);
line-height: 32rpx;
color: #fff;
text-align: center;
font-size: 24rpx;
}
}
.right{
position: relative;
display: flex;
flex-direction: column;
flex: 1;
font-size: 24rpx;
line-height: 32rpx;
.edit{
position: absolute;
top: 0;
right: 0;
width: 100rpx;
height: 48rpx;
background: #333333;
border-radius: 8rpx;
color: #fff;
font-size: 24rpx;
text-align: center;
line-height: 48rpx;
}
}
}
}
// 底部模块
.footer{
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 88rpx;
left: 50%;
transform: translateX(-50%);
width: 600rpx;
height: 80rpx;
background: #333333;
border-radius: 200rpx;
}
// 添加新本
.new_script{
position: relative;
width: 690rpx;
height: 800rpx;
background: #FFFFFF;
border-radius: 20rpx;
overflow: hidden;
padding-top: 200rpx;
box-sizing: border-box;
.btn{
position: absolute;
bottom: 0;
left: 0;
height: 100rpx;
width: 100%;
box-sizing: border-box;
text-align: center;
line-height: 100rpx;
color: #333;
font-size: 32rpx;
background-color: #F5F7FA;
}
}
</style>