Browse Source

'完成三个页面'

hfll
hflllll 3 months ago
parent
commit
5291fa11c4
10 changed files with 1205 additions and 271 deletions
  1. +23
    -10
      pages.json
  2. +234
    -0
      pages/index/desk.vue
  3. +575
    -254
      pages/index/home.vue
  4. +5
    -6
      rule.txt
  5. BIN
      static/播放图标.png
  6. BIN
      static/闹钟图标.png
  7. BIN
      static/默认图片.png
  8. +164
    -0
      subPages/home/plan.vue
  9. +203
    -0
      subPages/home/submit.vue
  10. +1
    -1
      uni.scss

+ 23
- 10
pages.json View File

@ -3,21 +3,20 @@
{
"path": "pages/index/home",
"style": {
"navigationStyle": "custom",
"enablePullDownRefresh": true
"navigationStyle": "custom"
}
},
{
"path": "pages/index/member",
"path": "pages/index/desk",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "书桌",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/maintain",
"path": "pages/index/member",
"style": {
"navigationBarTitleText": "维修",
"navigationBarTitleText": "custom",
"enablePullDownRefresh": true
}
},
@ -45,6 +44,21 @@
"navigationBarTitleText": "补充信息"
}
},
{
"path": "home/plan",
"style": {
"navigationBarTitleText": "个人语境方案定制",
"navigationBarTextStyle": "white",
"navigationBarBackgroundColor": "#06DADC"
}
},
{
"path": "home/submit",
"style": {
"navigationBarTitleText": "报名个人语境定制"
}
},
{
"path": "home/repairSubmit",
"style": {
@ -87,10 +101,9 @@
}
},
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#c70019",
"backgroundColor": "#c70019"
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
},
"tabBar": {
"color": "#999",
@ -105,7 +118,7 @@
"selectedIconPath": "static/主页图标-点击.png"
},
{
"pagePath": "pages/index/maintain",
"pagePath": "pages/index/desk",
"text": "书桌",
"iconPath": "static/书桌图标.png",
"selectedIconPath": "static/书桌图标-点击.png"


+ 234
- 0
pages/index/desk.vue View File

@ -0,0 +1,234 @@
<template>
<view class="desk-container">
<!-- 顶部搜索栏 -->
<view class="header">
<view class="search-container">
<uv-search
placeholder="请输入要查询的内容"
:show-action="true"
:action-style="{color: '#fff', backgroundColor: '#06DADC', borderRadius:'8rpx', width:'100rpx', height: '64rpx', lineHeight: '64rpx', borderRadius: '198rpx', text:'white', fontSize:'26rpx'}"
shape="round"
bg-color="#F3F3F3"
color="#C6C6C6"
height="32"
margin="0"
searchIconColor="#8B8B8B"
placeholderColor="#c6c6c6"
></uv-search>
</view>
</view>
<!-- 书籍网格 -->
<view class="book-grid-container">
<view class="book-grid">
<view
v-for="(book, index) in bookList"
:key="index"
class="book-grid-item"
>
<view class="book-grid-cover">
<image :src="book.cover" mode="aspectFill"></image>
</view>
<view class="book-grid-info">
<text class="book-grid-title">{{ book.title }}</text>
<view class="book-grid-meta">
<text class="book-grid-grade">{{ book.grade }}/</text>
<image src="/static/播放图标.png" class="book-grid-duration-icon" />
<text class="book-grid-duration">{{ book.duration }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
//
bookList: [
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '六级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '六级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '六级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '考研',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '考研',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '考研',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '六级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '六级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '考研',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '考研',
duration: '03:24'
}
]
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.desk-container {
background: #fff;
min-height: 100vh;
}
//
.header {
display: flex;
align-items: center;
padding: 20rpx 32rpx;
background: #fff;
.search-container {
flex: 1;
}
}
//
.book-grid-container {
padding: 20rpx 30rpx;
}
//
.book-grid {
display: flex;
flex-wrap: wrap;
gap: 32rpx;
.book-grid-item {
width: 208rpx;
display: flex;
flex-direction: column;
.book-grid-cover {
box-shadow: 0px 4px 4px 0px #C0BCBA75;
width: 100%;
height: 278rpx;
border-radius: 16rpx;
overflow: hidden;
margin-bottom: 16rpx;
image {
width: 100%;
height: 100%;
}
}
.book-grid-info {
padding: 6rpx;
box-sizing: border-box;
.book-grid-title {
font-size: 28rpx;
font-weight: 700;
color: $primary-text-color;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.book-grid-meta {
display: flex;
align-items: center;
margin-top: 8rpx;
.book-grid-duration-icon {
width: 24rpx;
height: 24rpx;
margin-right: 12rpx;
}
.book-grid-grade {
font-size: 24rpx;
color: $secondary-text-color;
margin-right: 8rpx;
}
.book-grid-duration {
font-size: 24rpx;
color: $secondary-text-color;
}
}
}
}
}
</style>

+ 575
- 254
pages/index/home.vue View File

@ -1,331 +1,652 @@
<template>
<view class="home-container">
<!-- 顶部横幅图片 -->
<view class="banner-section">
<!-- <image class="banner-image" src="@/static/首页背景图.png" mode="aspectFill"></image> -->
<uv-swiper :list="bannerList" :loading="!bannerList.length" height="250"></uv-swiper>
</view>
<!-- 搜索区域 -->
<SearchInput
v-model="searchValue"
placeholder="请输入展品名称"
search-button-text="搜索"
@search="handleSearch"
/>
<!-- 状态栏安全区域 -->
<uv-status-bar></uv-status-bar>
<!-- 展品分类 -->
<view class="category-section" @click="openPicker">
<view class="category-label">{{ selectedCategory.label ||'展品分类' }}</view>
<uv-icon name="arrow-down-fill" size="14" color="#C70019"></uv-icon>
<!-- 顶部搜索栏 -->
<view class="header">
<view class="search-container">
<uv-search
placeholder="请输入要查询的内容"
:show-action="false"
shape="round"
bg-color="#f5f5f5"
color="#666"
height="38"
margin="0 200rpx 0 0"
placeholderColor="#c6c6c6"
></uv-search>
</view>
<uv-picker ref="picker" confirmColor="#C70019" :columns="[columns[0], columns[1][0]]" keyName="label" @confirm="onCategoryConfirm" @change="onCategoryChange"></uv-picker>
</view>
<!-- 展品列表 -->
<view class="exhibit-list">
<view class="exhibit-item" v-for="(item, index) in list" :key="index" @click="handleItemClick(item)">
<view class="item-header">
<text class="item-id">{{ item.id }}</text>
<img src="@/static/copy.png" alt="我是复制黏贴" class="item-icon" @click="copyId(item.id)">
</view>
<view class="item-border" />
<view class="item-content">
<view class="content-row">
<text class="name">{{ item.title }}</text>
<!-- Tab栏 -->
<view class="tab-container">
<scroll-view show-scrollbar="false" class="tab-scroll" scroll-x="true" >
<view class="tab-list">
<view
v-for="(tab, index) in tabs"
:key="index"
class="tab-item"
:class="{ active: activeTab === index }"
@click="switchTab(index)"
>
{{ tab }}
</view>
</view>
</scroll-view>
</view>
<!-- 轮播图 -->
<view class="swiper-container">
<uv-swiper
:list="bannerList"
keyName="image"
height="121"
radius="12"
indicator
ndicatorInactiveColor="#fff"
:loading="false"
indicatorMode="dot"
indicatorActiveColor="#F95A01"
@click="onBannerClick"
></uv-swiper>
</view>
<view class="content-row">
<text class="label">展品编号</text>
<text class="value">{{ item.id }}</text>
<!-- 今日更新 -->
<view class="section">
<view class="section-header">
<text class="section-title">今日更新</text>
<view class="section-more">
<text>更多</text>
<uv-icon name="arrow-right" size="14" color="#888"></uv-icon>
</view>
</view>
<scroll-view show-scrollbar="false" class="content-scroll" scroll-x="true" >
<view class="content-list">
<view
v-for="(item, index) in todayUpdates"
:key="index"
class="content-item"
>
<view class="item-cover">
<image :src="item.cover" mode="aspectFill"></image>
</view>
<view class="item-info">
<text class="item-title">{{ item.title }}</text>
<text class="item-author">{{ item.author }}</text>
<view class="item-duration"><image src="/static/播放图标.png" class="item-icon" /><text>{{ item.duration }}</text></view>
</view>
</view>
<view class="content-row">
<text class="label">展品位置</text>
<text class="value">{{ item.position }}</text>
</view>
</scroll-view>
</view>
<!-- 推荐书籍 -->
<view class="section">
<view class="section-header">
<text class="section-title">推荐书籍</text>
<view class="section-more">
<text>更多</text>
<uv-icon name="arrow-right" size="14" color="#999"></uv-icon>
</view>
</view>
<scroll-view show-scrollbar="false" class="content-scroll" scroll-x="true" >
<view class="book-list">
<view
v-for="(book, index) in recommendBooks"
:key="index"
class="book-item"
>
<view class="book-cover">
<image :src="book.cover" mode="aspectFill"></image>
<!-- <view class="book-duration">
<uv-icon name="time" size="10" color="#fff"></uv-icon>
<text>{{ book.duration }}</text>
</view> -->
<view class="book-overlay">
<view class="book-duration">
<image src="/static/闹钟图标.png" class="book-duration-icon" />
<text class="book-duration-text">{{ book.duration }}</text>
</view>
<view class="book-title">{{ book.title }}</view>
</view>
</view>
</view>
<view class="content-row">
<text class="label">展品类型</text>
<text class="value">{{ item.categoryId_dictText }}</text>
</view>
</scroll-view>
</view>
<!-- 四级精讲短文合集书 -->
<view class="section">
<view class="section-header">
<text class="section-title">四级精讲短文合集书</text>
<view class="section-more">
<text>更多</text>
<uv-icon name="arrow-right" size="14" color="#999"></uv-icon>
</view>
</view>
<view class="book-grid">
<view
v-for="(book, index) in bookGridList"
:key="index"
class="book-grid-item"
>
<view class="book-grid-cover">
<image :src="book.cover" mode="aspectFill"></image>
</view>
<view class="content-row">
<text class="label">下次保养日期</text>
<text class="value">{{ item.maintenanceDate }}</text>
<view v-if="item.maintenanceProject" class="project">
{{ item.maintenanceProject }}
<view class="book-grid-info">
<text class="book-grid-title">{{ book.title }}</text>
<view class="book-grid-meta">
<text class="book-grid-grade">{{ book.grade }}/</text>
<image src="/static/播放图标.png" class="book-grid-duration-icon" />
<text class="book-grid-duration">{{ book.duration }}</text>
</view>
</view>
</view>
<view class="item-actions">
<uv-button
size="small"
color="#c70019"
shape="circle"
text="申请报修"
@click.stop="handleRepair(item)"
></uv-button>
<uv-button
size="small"
text="保养提交"
color="#c70019"
shape="circle"
plain
@click.stop="handleMaintenance(item)"
></uv-button>
<uv-button
color="#c70019"
shape="circle"
size="small"
text="维修/保养记录"
plain
@click.stop="handleRecord(item)"
></uv-button>
</view>
</view>
</view>
<!-- 空状态 -->
<uv-empty v-if="!list.length" icon="/static/暂无搜索结果.png" />
<!-- 推荐内容列表 -->
<view class="section">
<view class="recommend-list">
<view
@click="goPlan()"
v-for="(item, index) in recommendList"
:key="index"
class="recommend-item"
>
<image :src="item.image" mode="aspectFill" class="recommend-image"></image>
</view>
</view>
</view>
</view>
</template>
<script>
import SearchInput from '@/pages/components/SearchInput.vue'
import ListMixin from '@/mixins/list'
export default {
mixins: [ListMixin],
components: {
SearchInput
},
data() {
return {
mixinListApi: 'exhibit.queryShowpieceList',
searchValue: '',
selectedCategory: {
label: '',
value: ''
},
// Tab
tabs: ['为你推荐', '精选', '短文', '专栏', '初中', '四六级'],
activeTab: 0,
//
bannerList: [],
}
},
computed: {
//
columns() {
return this.$store.state.categoryList
bannerList: [
{
image: '/static/首页背景图.png',
title: '轮播图1'
},
{
image: '/static/默认图片.png',
title: '轮播图2'
},
{
image: '/static/logo.png',
title: '轮播图3'
}
],
//
todayUpdates: [
{
cover: '/static/默认图片.png',
title: '全脑孩子:12项革命性策略...',
author: 'Daniel J. Siegel / Tina Payne Bryso...',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '全脑孩子:12项革命性策略...',
author: 'Daniel J. Siegel / Tina Payne Bryso...',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '全脑孩子:12项革命性策略...',
author: 'Daniel J. Siegel / Tina Payne Bryso...',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '全脑孩子:12项革命性策略...',
author: 'Daniel J. Siegel / Tina Payne Bryso...',
duration: '03:24'
},
],
//
recommendBooks: [
{
cover: '/static/默认图片.png',
title: 'The Power of Now 擦拭才:The Power of Now :The Power of Now :',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: 'Dealing in Desire 擦擦:The Power of Now :The Power of Now :',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: 'A New Earth擦超2 :The Power of Now :The Power of Now :',
duration: '03:24'
}
],
//
bookGridList: [
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
},
{
cover: '/static/默认图片.png',
title: '精讲短文',
grade: '四级',
duration: '03:24'
}
],
//
recommendList: [
{
image: '/static/默认图片.png'
},
{
image: '/static/默认图片.png'
},
{
image: '/static/默认图片.png'
},
{
image: '/static/默认图片.png'
}
]
}
},
methods: {
handleSearch() {
console.log('搜索的数值为', this.searchValue);
this.initPage()
this.getList(true)
},
mixinSetParams() {
const params = { }
if (this.selectedCategory.value) {
params.categoryId = this.selectedCategory.value
}
return {
title: this.searchValue,
...params
}
},
openPicker() {
this.$refs.picker.open()
},
onCategoryConfirm(e) {
this.selectedCategory = e.value[1]
console.log('选择分类:', e)
this.initPage()
this.getList(true)
// TODO:
},
onCategoryChange(e) {
const { columnIndex , index} = e
if (columnIndex === 0) {
this.$refs.picker.setColumnValues(1, this.columns[1][index])
}
},
copyId(id) {
uni.setClipboardData({
data: id,
success: () => {
uni.showToast({
title: '已复制到剪贴板',
icon: 'success'
})
}
})
// Tab
switchTab(index) {
this.activeTab = index
},
handleItemClick(item) {
console.log('点击展品:', item)
// TODO:
},
handleRepair(item) {
uni.navigateTo({
url: '/subPages/home/repairSubmit?id=' + item.id
})
// TODO:
},
handleMaintenance(item) {
console.log('保养提交:', item)
uni.navigateTo({
url: '/subPages/home/maintainanceSubmit?id=' + item.id
})
// TODO:
//
onBannerClick(index) {
console.log('点击轮播图:', index)
//
},
handleRecord(item) {
console.log('查看记录:', item)
//
goPlan() {
uni.navigateTo({
url: '/subPages/home/RAArecord?id=' + item.id
url: '/subPages/home/plan'
})
},
async getBannerList() {
const bannerRes = await this.$api.config.queryBannerList()
if (bannerRes.code === 200) {
this.bannerList = bannerRes.result.records.map(item => item.image)
}
},
},
onLoad(){
this.getBannerList()
},
}
}
}
</script>
<style lang="scss" scoped>
.home-container {
background-color: #fff;
background: #fff;
min-height: 100vh;
}
.banner-section {
width: 100%;
height: 500rpx;
//
.header {
display: flex;
align-items: center;
padding: 6rpx 32rpx;
background: #fff;
.banner-image {
width: 100%;
height: 100%;
.search-container {
flex: 1;
}
}
// Tab
.tab-container {
background: #fff;
// border-bottom: 1px solid #f0f0f0;
.tab-scroll {
white-space: nowrap;
.tab-list {
display: flex;
padding: 0 20rpx;
.tab-item {
flex-shrink: 0;
padding: 20rpx 20rpx;
font-size: 32rpx;
color: #666;
position: relative;
&.active {
color: $primary-text-color;
font-weight: 700;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 22rpx;
height: 4rpx;
background: $primary-text-color;
border-radius: 2rpx;
}
}
}
}
}
}
//
.swiper-container {
margin: 20rpx;
border-radius: 12rpx;
overflow: hidden;
}
.category-section {
padding: 20rpx 48rpx;
display: flex;
align-items: center;
justify-content: start;
gap: 9rpx;
.category-label {
font-size: 28rpx;
color: $primary-color;
}
//
.section {
margin-top: 40rpx;
.category-picker {
.section-header {
display: flex;
align-items: center;
padding: 10rpx 20rpx;
border: 1rpx solid #ddd;
border-radius: 8rpx;
background-color: #fafafa;
justify-content: space-between;
padding: 0 30rpx ;
margin-bottom: 24rpx;
.section-title {
font-size: 36rpx;
// font-weight: 600;
color: $primary-text-color;
}
.category-text {
font-size: 28rpx;
color: #666;
margin-right: 10rpx;
.section-more {
display: flex;
align-items: center;
gap: 4rpx;
text {
font-size: 24rpx;
color: $secondary-text-color;
}
}
}
.content-scroll {
white-space: nowrap;
}
}
.exhibit-list {
padding: 20rpx 30rpx;
//
.content-list {
display: flex;
padding: 0 30rpx;
gap: 32rpx;
.exhibit-item {
background-color: #fff;
.content-item {
flex-shrink: 0;
width: 602rpx;
height: 212rpx;
display: flex;
align-items: center;
background: #F8F8F8;
padding: 16rpx;
border-radius: 16rpx;
padding: 30rpx 30rpx 45rpx;
margin-bottom: 20rpx;
border-radius: 15rpx;
box-shadow: 0rpx 3rpx 6rpx 0rpx rgba(0,0,0,0.16);
.item-header {
display: flex;
align-items: center;
justify-content: start;
gap: 20rpx;
padding-bottom: 14rpx;
gap: 16rpx;
.item-cover {
width: 136rpx;
height: 200rpx;
border-radius: 16rpx;
// overflow: hidden;
image {
width: 136rpx;
height: 200rpx;
}
}
.item-info {
// padding-top: 20rpx;
gap: 16rpx;
display: flex;
flex-direction: column;
.item-title {
font-size: 32rpx;
font-weight: 700;
color: $primary-text-color;
letter-spacing: 0;
line-height: 48rpx;
// margin-bottom: 12rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-id {
font-size: 28rpx;
.item-author {
font-size: 24rpx;
color: $secondary-text-color;
// margin-bottom: 8rpx;
letter-spacing: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-icon {
width: 25.5rpx;
height: 25.5rpx;
}
}
.item-border {
border-bottom: 1rpx solid $secondary-text-color;
opacity: 0.22;
}
.item-content {
margin-top: 26.5rpx;
margin-bottom: 57rpx;
.content-row {
.item-duration {
gap: 12rpx;
display: flex;
align-items: center;
margin-bottom: 25rpx;
.name{
font-size: 30rpx;
color: $primary-text-color;
font-weight: bold;
font-size: 22rpx;
letter-spacing: 0;
color: $secondary-text-color;
.item-icon{
width: 22rpx;
height: 25rpx;
}
}
}
}
}
&:last-child {
margin-bottom: 0;
//
.book-list {
display: flex;
padding: 0 30rpx;
gap: 32rpx;
.book-item {
flex-shrink: 0;
width: 270rpx;
// border-radius: 16rpx;
.book-cover {
width: 100%;
height: 360rpx;
border-radius: 16rpx;
overflow: hidden;
position: relative;
image {
width: 100%;
height: 100%;
}
.book-overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
height: 140rpx;
padding-top: 4rpx;
padding-right: 16rpx;
padding-bottom: 8rpx;
padding-left: 16rpx;
backdrop-filter: blur(5px);
box-sizing: border-box;
background: #00000066;
padding: 20rpx 16rpx 8rpx;
// gap: 26rpx;
.book-duration{
display: flex;
gap: 8rpx;
&-icon{
width: 24rpx;
height: 24rpx;
}
&-text{
font-size: 20rpx;
color: #DCDCDC;
}
}
&:first-child {
margin-bottom: 37rpx;
.book-title {
margin-top: 10rpx;
max-width: 220rpx;
font-size: 24rpx;
line-height: 1.4;
color: #fff;
// max-height: 68rpx; /* = line-height * 234rpx * 2 */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 关键:显示两行,超过两行才省略 */
overflow: hidden;
word-break: break-word; /* 长单词也能断行 */
white-space: normal; /* 允许换行 */
}
.label {
font-size: 22rpx;
}
}
}
}
//
.book-grid {
display: flex;
flex-wrap: wrap;
padding: 0 30rpx;
gap: 32rpx;
.book-grid-item {
width: 208rpx;
display: flex;
flex-direction: column;
.book-grid-cover {
box-shadow: 0px 4px 4px 0px #C0BCBA75;
width: 100%;
height: 278rpx;
border-radius: 16rpx;
overflow: hidden;
margin-bottom: 16rpx;
image {
width: 100%;
height: 100%;
}
}
.book-grid-info {
padding: 6rpx;
.book-grid-title {
font-size: 28rpx;
font-weight: 700;
color: $primary-text-color;
margin-bottom: 14rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.book-grid-meta {
display: flex;
align-items: center;
// gap: 16rpx;
.book-grid-duration-icon {
width: 24rpx;
height: 24rpx;
margin-right: 12rpx;
}
.book-grid-grade {
font-size: 24rpx;
color: $secondary-text-color;
// width: 200rpx;
margin-right: 19rpx;
flex-shrink: 0;
margin-right: 8rpx;
}
.value {
font-size: 22rpx;
color: $primary-text-color;
margin-right: 40rpx;
}
.project {
// flex: 1;
background: $primary-color;
// border: 1px solid #707070;
border-radius: 11rpx;
color: #fff;
font-size: 22rpx;
padding: 6rpx 12rpx;
.book-grid-duration {
font-size: 24rpx;
color: $secondary-text-color;
}
}
}
}
}
//
.recommend-list {
padding: 0 30rpx;
.recommend-item {
width: 100%;
height: 200rpx;
margin-bottom: 48rpx;
border-radius: 32rpx;
overflow: hidden;
.item-actions {
margin-left: -10rpx;
display: flex;
gap: 55rpx;
flex-wrap: wrap;
&:last-child {
margin-bottom: 0;
}
.recommend-image {
width: 100%;
height: 100%;
}
}
}


+ 5
- 6
rule.txt View File

@ -1,6 +1,5 @@
1,优先使用uvUI组件库的组件 我已经导入
2,使用uni.scss设置好的SCSS变量$primary-color和其他三个还有动画变量
3,图片在@/static,主包图片在static 分包在对应subPages/assets
4,优先组件分化页面,主包页面的组件放在@/pages/components/对应的components文件下面
5,电脑系统配置Window 11
6,阿里云上传工具封装在@utils/oss-upload,api相关封装在@api,后台动态配置参数的获取 封装在@stores/index
1,优先使用uvUI
2,优先使用uni.scss文件的SCSS变量$primary-color和其他三个还有动画变量
3,图片在/static
4,电脑系统配置Window 11
5,阿里云上传工具封装在@utils/oss-upload,api相关封装在@api,后台动态配置参数的获取 封装在@stores/index

BIN
static/播放图标.png View File

Before After
Width: 18  |  Height: 19  |  Size: 428 B

BIN
static/闹钟图标.png View File

Before After
Width: 20  |  Height: 20  |  Size: 486 B

BIN
static/默认图片.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.4 KiB Width: 208  |  Height: 278  |  Size: 87 KiB

+ 164
- 0
subPages/home/plan.vue View File

@ -0,0 +1,164 @@
<template>
<view class="plan-container">
<!-- 主体内容 -->
<view class="main-content">
<!-- 内容卡片 -->
<view class="content-card">
<!-- 富文本内容 -->
<view class="rich-text-container">
<!-- <rich-text :nodes="richTextContent"></rich-text> -->
<uv-parse :content="richTextContent" :tagStyle="style" :lazyLoad="true" ></uv-parse>
</view>
</view>
</view>
<!-- 底部固定报名栏 -->
<view class="bottom-bar">
<uv-button
type="primary"
text="报名"
:custom-style="{
width: '100%',
height: '82rpx',
borderRadius: '44rpx',
backgroundColor: '#06DADC',
fontSize: '36rpx',
fontWeight: '500',
border: '1px solid #06DADC'
}"
@click="handleSignUp"
></uv-button>
<uv-safe-bottom></uv-safe-bottom>
</view>
<!-- 底部安全区域 -->
</view>
</template>
<script>
export default {
data() {
return {
richTextContent: `
<div style="padding: 0;">
<div style="margin-bottom: 40rpx; padding: 40rpx; background: #f8f9fa; ">
<h3 style="font-size: 36rpx; font-weight: bold; color: #333; margin: 0 0 20rpx 0;">灵活设置</h3>
<p style="font-size: 28rpx; color: #666; line-height: 1.6; margin: 0 0 30rpx 0;">语音合成支持中文英文粤语四川话也可以合成中英混读语音</p>
<div style="width: 100%; height: 300rpx; overflow: hidden; background: #eee;">
<img src="/static/默认图片.png" style="width: 100%; height: 100%; object-fit: cover; " />
</div>
</div>
<div style="padding: 40rpx; background: #f8f9fa; ">
<h3 style="font-size: 36rpx; font-weight: bold; color: #333; margin: 0 0 20rpx 0;">高拟真度</h3>
<p style="font-size: 28rpx; color: #666; line-height: 1.6; margin: 0 0 30rpx 0;">基于业界领先技术构建的语音合成系统具备合成速度快合成语音自然流畅等特点合成语音拟真度高能够符合多样化的应用场景让设备和应用轻松发声人机语音交互效果更加逼真</p>
<div style="width: 100%; height: 300rpx; overflow: hidden; background: #eee;">
<img src="/static/默认图片.png" style="width: 100%; height: 100%; object-fit: cover; " />
</div>
</div>
</div>
`,
style: {
img: 'borderRadius: 24rpx'
}
}
},
methods: {
handleSignUp() {
console.log('点击报名')
//
uni.navigateTo({
url: '/subPages/home/submit'
})
}
}
}
</script>
<style scoped lang="scss">
.plan-container {
background: #fff;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.main-content {
flex: 1;
padding: 40rpx 32rpx 120rpx;
}
.title-section {
margin-bottom: 40rpx;
.main-title {
font-size: 48rpx;
font-weight: 700;
color: $primary-text-color;
line-height: 1.3;
}
}
.content-card {
background: #F8F8F8;
border-radius: 32rpx;
// padding: 48rpx 32rpx;
// .feature-section {
// margin-bottom: 60rpx;
// &:last-child {
// margin-bottom: 0;
// }
// .feature-title {
// display: block;
// font-size: 36rpx;
// font-weight: 700;
// color: $primary-text-color;
// margin-bottom: 24rpx;
// }
// .feature-desc {
// display: block;
// font-size: 28rpx;
// color: $secondary-text-color;
// line-height: 1.6;
// margin-bottom: 32rpx;
// }
// .feature-image {
// width: 100%;
// height: 320rpx;
// border-radius: 24rpx;
// overflow: hidden;
// image {
// width: 100%;
// height: 100%;
// }
// }
// }
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
padding: 24rpx 50rpx;
// border-top: 1rpx solid #f0f0f0;
z-index: 999;
}
//
.rich-text-container {
width: 100%;
border-radius: 36rpx;
// img {
// border-radius: 24rpx;
// }
}
</style>

+ 203
- 0
subPages/home/submit.vue View File

@ -0,0 +1,203 @@
<template>
<view class="submit-container">
<!-- 主体内容 -->
<view class="main-content">
<!-- 表单卡片 -->
<view class="form-card">
<!-- 标题 -->
<view class="title-section">
<text class="main-title">信息填写</text>
</view>
<!-- 姓名 -->
<view class="form-item">
<text class="form-label">姓名</text>
<uv-input
v-model="formData.name"
placeholder="请输入"
border="bottom"
:custom-style="{
backgroundColor: '#fff',
borderRadius: '12rpx',
paddingLeft: '-24rpx',
fontSize: '32rpx'
}"
></uv-input>
</view>
<!-- 联系方式 -->
<view class="form-item">
<text class="form-label">联系方式</text>
<uv-input
v-model="formData.phone"
placeholder="请输入"
border="bottom"
:custom-style="{
backgroundColor: '#fff',
paddingLeft: '-24rpx',
fontSize: '32rpx'
}"
></uv-input>
</view>
<!-- 个人期待 -->
<view class="form-item">
<text class="form-label">个人期待</text>
<uv-textarea
v-model="formData.expectation"
placeholder="请输入"
border="bottom"
:auto-height="true"
:custom-style="{
backgroundColor: '#fff',
paddingLeft: '-24rpx',
fontSize: '32rpx',
}"
></uv-textarea>
</view>
<!-- 文化背景 -->
<view class="form-item">
<text class="form-label">文化背景</text>
<uv-textarea
v-model="formData.background"
placeholder="请输入"
border="none"
:auto-height="true"
:custom-style="{
backgroundColor: '#fff',
paddingLeft: '-24rpx',
fontSize: '32rpx',
}"
></uv-textarea>
</view>
</view>
</view>
<!-- 底部固定提交栏 -->
<view class="bottom-bar">
<uv-button
type="primary"
text="提交"
:custom-style="{
width: '100%',
height: '82rpx',
borderRadius: '44rpx',
backgroundColor: '#06DADC',
fontSize: '36rpx',
fontWeight: '500',
border: '1px solid #06DADC'
}"
@click="handleSubmit"
></uv-button>
<uv-safe-bottom></uv-safe-bottom>
</view>
</view>
</template>
<script>
export default {
data() {
return {
formData: {
name: '',
phone: '',
expectation: '',
background: ''
}
}
},
methods: {
handleSubmit() {
console.log('提交表单', this.formData)
//
if (!this.formData.name) {
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
return
}
if (!this.formData.phone) {
uni.showToast({
title: '请输入联系方式',
icon: 'none'
})
return
}
uni.showToast({
title: '提交成功',
icon: 'success'
})
}
}
}
</script>
<style scoped lang="scss">
.submit-container {
background: #F2F2F2;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.main-content {
flex: 1;
padding: 40rpx 32rpx 120rpx;
}
.form-card {
display: flex;
flex-direction: column;
background: #fff;
margin: 0 18rpx;
height: 732rpx;
border-radius: 32rpx;
padding-top: 40rpx;
padding-right: 32rpx;
padding-bottom: 40rpx;
padding-left: 32rpx;
gap: 44rpx;
// box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
.title-section {
// margin-bottom: 40rpx;
.main-title {
font-size: 32rpx;
font-weight: 500;
color: $primary-text-color;
line-height: 1.4;
}
}
}
.form-item {
// margin-bottom: 48rpx;
&:last-child {
margin-bottom: 0;
}
.form-label {
display: block;
font-size: 26rpx;
line-height: 1.4;
color: $primary-text-color;
margin-bottom: 10rpx;
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
padding: 24rpx 50rpx;
z-index: 999;
}
</style>

+ 1
- 1
uni.scss View File

@ -17,7 +17,7 @@
/* 颜色变量 */
// 自定义颜色
$primary-color: #06DADC;
$secondary-color: #E8FBFB;
$secondary-color: #8B8B8B;
$primary-text-color: #000;
$secondary-text-color: #999;


Loading…
Cancel
Save