Browse Source

底部导航栏页面

master
Bobi 15 hours ago
parent
commit
b662c24449
10 changed files with 907 additions and 733 deletions
  1. +11
    -11
      components/base/tabbar.vue
  2. +181
    -199
      pages/index/cart.vue
  3. +252
    -137
      pages/index/category.vue
  4. +294
    -182
      pages/index/index.vue
  5. +169
    -204
      pages/index/order.vue
  6. +0
    -0
      static/image/novel/cover1.jpg
  7. +0
    -0
      static/image/novel/cover2.jpg
  8. +0
    -0
      static/image/novel/cover3.jpg
  9. +0
    -0
      static/image/novel/cover4.jpg
  10. +0
    -0
      static/image/novel/cover5.jpg

+ 11
- 11
components/base/tabbar.vue View File

@ -32,37 +32,37 @@
"selectedIconPath": "/static/image/tabbar/home-a.png",
"iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index",
"title": "首页",
"title": "精品推荐",
key: 'home',
},
{
"selectedIconPath": "/static/image/tabbar/category-a.png",
"iconPath": "/static/image/tabbar/category.png",
"pagePath": "/pages/index/category",
"title": "商品列表",
"title": "书城",
key: 'category',
},
{
"selectedIconPath": "/static/image/tabbar/order-a.png",
"iconPath": "/static/image/tabbar/order.png",
"pagePath": "/pages/index/order",
"title": "订单",
"title": "书架",
key: 'order',
},
{
"selectedIconPath": "/static/image/tabbar/cart-a.png",
"iconPath": "/static/image/tabbar/cart.png",
"pagePath": "/pages/index/cart",
"title": "购物车",
"title": "我的",
key: 'cart',
},
{
"selectedIconPath": "/static/image/tabbar/center-a.png",
"iconPath": "/static/image/tabbar/center.png",
"pagePath": "/pages/index/center",
"title": "我的",
key: 'center',
}
// {
// "selectedIconPath": "/static/image/tabbar/center-a.png",
// "iconPath": "/static/image/tabbar/center.png",
// "pagePath": "/pages/index/center",
// "title": "",
// key: 'center',
// }
]
};
},


+ 181
- 199
pages/index/cart.vue View File

@ -3,76 +3,95 @@
<navbar/>
<view class="user">
<uv-checkbox-group
shape="circle"
v-model="checkboxValue">
<uv-swipe-action>
<view
v-for="(item, index) in list"
:key="index">
<view style="margin-top: 20rpx;"></view>
<uv-swipe-action-item
:options="options">
<view class="item">
<view class="checkbox">
<uv-checkbox
:name="item.id"
activeColor="#FA5A0A"
size="40rpx"
icon-size="35rpx"
></uv-checkbox>
</view>
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
mode=""></image>
<view class="info">
<view class="title">
<view class="">
{{ item.title }}
</view>
<view class="">
<uv-number-box v-model="item.num"
@change="valChange"></uv-number-box>
</view>
</view>
<view class="unit">
规格{{ item.unit }}
<uv-icon name="arrow-down"></uv-icon>
</view>
<view class="price">
<text>{{ item.price }}</text>
</view>
</view>
</view>
</uv-swipe-action-item>
</view>
</uv-swipe-action>
</uv-checkbox-group>
<!-- 用户信息区域 -->
<view class="user-info">
<image class="avatar" src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode=""></image>
<view class="info">
<view class="name">战斗世界 <text class="id">(ID: 50523541)</text></view>
<view class="desc">世界达人小说控</view>
<view class="phone">手机号19898474531</view>
</view>
<view class="more">
<uv-icon name="more-dot-fill" size="46rpx" color="#999"></uv-icon>
</view>
</view>
<view class="action">
<view class="icon">
<image src="/static/image/cart/1.png" mode=""></image>
<view class="num">
{{ checkboxValue.length }}
<!-- 图片区域 -->
<view class="section">
<view class="section-title">图片</view>
<view class="section-list">
<view class="section-item" @click="navigateTo('/pages/wallet')">
<view class="section-item-left">
<uv-icon name="photo" size="40rpx" color="#333"></uv-icon>
<text>钱包提现</text>
</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
<view class="section-item" @click="navigateTo('/pages/gift')">
<view class="section-item-left">
<uv-icon name="gift" size="40rpx" color="#333"></uv-icon>
<text>礼物盒</text>
</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
</view>
<view class="price">
<view class="count">
合计
<view class="">
<text>{{ totalPrice }}</text>
</view>
<!-- 日常区域 -->
<view class="section">
<view class="section-title">日常</view>
<view class="section-list">
<view class="section-item" @click="navigateTo('/pages/comments')">
<view class="section-item-left">
<uv-icon name="chat" size="40rpx" color="#333"></uv-icon>
<text>我的评论</text>
</view>
<view class="badge">294</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
<view class="text">
{{ checkboxValue.length }}已享受更低优惠
<view class="section-item" @click="navigateTo('/pages/tasks')">
<view class="section-item-left">
<uv-icon name="list" size="40rpx" color="#333"></uv-icon>
<text>任务中心</text>
</view>
<view class="badge">5</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
</view>
<view class="btn">
去结算
</view>
<!-- 设置区域 -->
<view class="section">
<view class="section-title">设置</view>
<view class="section-list">
<view class="section-item" @click="navigateTo('/pages/author')">
<view class="section-item-left">
<uv-icon name="star" size="40rpx" color="#333"></uv-icon>
<text>申请成为作者</text>
</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
<view class="section-item" @click="navigateTo('/pages/customer-service')">
<view class="section-item-left">
<text>联系客服</text>
</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
<view class="section-item" @click="navigateTo('/pages/edit-info')">
<view class="section-item-left">
<uv-icon name="edit-pen" size="40rpx" color="#333"></uv-icon>
<text>修改信息</text>
</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
<view class="section-item" @click="logout">
<view class="section-item-left">
<text>退出登录</text>
</view>
<uv-icon name="arrow-right" size="36rpx" color="#999"></uv-icon>
</view>
</view>
</view>
</view>
@ -89,52 +108,30 @@
},
data() {
return {
value : 0,
checkboxValue : [],
options: [
{
text: '删除',
style: {
backgroundColor: '#FA5A0A'
}
},
],
list : [
{
id : 1,
title : '桌布租赁',
num : 1,
price : 299,
unit : '120*40*75【桌子尺寸】',
},
{
id : 2,
title : '桌布租赁',
num : 1,
price : 299,
unit : '120*40*75【桌子尺寸】',
},
],
}
},
computed: {
totalPrice(){
if (!this.checkboxValue.length) {
return 0
}
let price = 0
this.list.forEach(n => {
if(this.checkboxValue.includes(n.id)){
price += n.price * n.num
}
})
return price
},
},
methods: {
valChange(){
navigateToPage(url) {
uni.navigateTo({
url
})
},
logout() {
// 退
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
// 退
uni.showToast({
title: '已退出登录'
})
}
}
})
}
}
}
</script>
@ -142,118 +139,103 @@
<style scoped lang="scss">
.page {
padding-bottom: 200rpx;
/deep/ .uv-swipe-action{
width: 100%;
}
background-color: #f5f5f5;
}
.user {
.item{
background-color: #fff;
padding: 20rpx 30rpx;
.user-info {
display: flex;
padding: 30rpx;
.checkbox{
display: flex;
justify-content: center;
align-items: center;
}
.image{
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
align-items: center;
padding: 30rpx 20rpx;
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 20rpx;
.avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.info{
.info {
flex: 1;
.title{
display: flex;
padding: 10rpx 20rpx;
justify-content: space-between;
.name {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 10rpx;
.id {
font-size: 24rpx;
font-weight: normal;
color: #999;
}
}
.unit{
font-size: 24rpx;
padding: 10rpx 20rpx;
color: #717171;
display: flex;
align-items: center;
.desc {
font-size: 26rpx;
color: #666;
margin-bottom: 10rpx;
}
.price{
color: $uni-color;
font-size: 28rpx;
padding: 10rpx 20rpx;
text{
font-size: 36rpx;
font-weight: 900;
}
.phone {
font-size: 26rpx;
color: #666;
}
}
.more {
padding: 10rpx;
}
}
.action{
width: 700rpx;
position: fixed;
bottom: 220rpx;
left: 25rpx;
background-color: #fff;
height: 100rpx;
border-radius: 50rpx;
box-shadow: 0 0 6rpx 6rpx #00000010;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
z-index: 999;
.icon{
position: relative;
width: 80rpx;
height: 80rpx;
margin: 0 20rpx;
image{
width: 80rpx;
height: 80rpx;
}
.num{
position: absolute;
right: 10rpx;
top: 0rpx;
background-color: $uni-color;
color: #fff;
font-size: 18rpx;
border-radius: 50%;
height: 30rpx;
width: 30rpx;
display: flex;
justify-content: center;
align-items: center;
}
.section {
margin-bottom: 20rpx;
.section-title {
font-size: 28rpx;
color: #999;
padding: 20rpx 10rpx 10rpx;
}
.price{
.count{
.section-list {
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.section-item {
display: flex;
font-size: 26rpx;
align-items: center;
view{
color: $uni-color;
margin-left: 10rpx;
text{
font-size: 32rpx;
font-weight: 900;
justify-content: space-between;
padding: 30rpx 20rpx;
border-bottom: 1px solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.section-item-left {
display: flex;
align-items: center;
text {
margin-left: 20rpx;
font-size: 28rpx;
}
}
.badge {
background-color: #FA5A0A;
color: #fff;
font-size: 22rpx;
padding: 2rpx 12rpx;
border-radius: 20rpx;
margin-right: 10rpx;
}
}
.text{
font-size: 20rpx;
color: #717171;
}
}
.btn{
margin-left: auto;
background-color: $uni-color;
height: 100%;
padding: 0 50rpx;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
}
}

+ 252
- 137
pages/index/category.vue View File

@ -1,33 +1,76 @@
<template>
<view class="page">
<navbar/>
<navbar title="书城"/>
<view class="category">
<uv-vtabs
:chain="chain"
:list="category"
height="1000px"
:barItemBadgeStyle="{right:'20px',top:'12px'}"
@change="change">
<uv-vtabs-item>
<view class="category-title">
租赁
<view class="tabs-container">
<scroll-view scroll-x class="tabs-scroll" show-scrollbar="false">
<view class="tabs">
<view class="tab-item" :class="{active: activeTab === 'ranking'}">
<text>排行榜</text>
</view>
<view class="list">
<view class="item" v-for="(item,index) in list" :key="index"
@click="$utils.navigateTo('/pages_order/product/productDetail?id=123')">
<view class="item-image">
<image
:src="item.image"
mode="aspectFill"></image>
</view>
<view class="item-unit">
<text class="text">{{item.unit}}</text>
<view class="tab-item">
<text>历史</text>
</view>
<view class="tab-item">
<text>科幻</text>
</view>
<view class="tab-item">
<text>异能</text>
</view>
<view class="tab-item">
<text>逆袭</text>
</view>
<view class="tab-item">
<text>娱乐圈</text>
</view>
</view>
</scroll-view>
</view>
<view class="category">
<view class="left-menu">
<view class="menu-item active">
<text>推荐榜</text>
</view>
<view class="menu-item">
<text>完本榜</text>
</view>
<view class="menu-item">
<text>阅读榜</text>
</view>
<view class="menu-item">
<text>口碑榜</text>
</view>
<view class="menu-item">
<text>新书榜</text>
</view>
<view class="menu-item">
<text>高分榜</text>
</view>
</view>
<view class="right-content">
<view class="novel-list">
<view class="novel-item" v-for="(item, index) in novelList" :key="index">
<view class="rank-number" :class="{'top-rank': index < 3}">
{{index + 1}}
</view>
<view class="novel-cover">
<image :src="item.cover" mode="aspectFill"></image>
</view>
<view class="novel-info">
<view class="novel-title">{{item.title}}</view>
<view class="novel-tags">
<text class="tag" v-for="(tag, tagIndex) in item.tags" :key="tagIndex">{{tag}}</text>
</view>
<view class="novel-author">{{item.author}}</view>
</view>
<view class="novel-status">
<text>{{item.status}}</text>
</view>
</view>
</uv-vtabs-item>
</uv-vtabs>
</view>
</view>
</view>
<tabber select="category" />
@ -43,149 +86,221 @@
},
data() {
return {
category: [
activeTab: 'ranking',
novelList: [
{
name : '桌布'
title: '网游之绝世萧尊',
author: '星梦辰缘',
cover: '/static/image/novel/cover1.jpg',
tags: ['玄幻', '校园', '热血'],
status: '完结'
},
{
name : '桌布'
title: '网游:1级的我,偷窃神明',
author: '我是解药猫',
cover: '/static/image/novel/cover2.jpg',
tags: ['玄幻', '校园', '热血'],
status: '连载中'
},
{
name : '桌布'
title: '全民网游:我有神级造物主',
author: '我吃西红柿',
cover: '/static/image/novel/cover3.jpg',
tags: ['玄幻', '校园', '热血'],
status: '完结'
},
],
list : [
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
title: '潜伏传说的我,携西罗摩修',
author: '清风明月',
cover: '/static/image/novel/cover4.jpg',
tags: ['玄幻', '校园', '热血'],
status: '完结'
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
title: '网游之一杆定乾坤',
author: '香蕉流文',
cover: '/static/image/novel/cover5.jpg',
tags: ['玄幻', '校园', '热血'],
status: '连载中'
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
{
unit : '100*50*60',
image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
},
],
chain: false,
value: 0
}
},
computed: {
list2() {
const _list = this.list[this.value]?.childrens;
return _list ? _list : [];
title: '网游之一杆定乾坤',
author: '香蕉流文',
cover: '/static/image/novel/cover5.jpg',
tags: ['玄幻', '校园', '热血'],
status: '连载中'
}
]
}
},
onReady() {
},
methods: {
change(index) {
console.log('选项改变:', index)
this.value = index;
changeTab(tab) {
this.activeTab = tab;
}
}
}
</script>
<style scoped lang="scss">
.page{
/deep/ .uv-vtabs{
height: calc(100vh - 360rpx) !important;
}
/deep/ .uv-vtabs__bar{
height: calc(100vh - 360rpx) !important;
}
/deep/ .uv-vtabs__content{
height: calc(100vh - 360rpx) !important;
}
.page {
background-color: #f5f5f5;
}
.category {
font-size: 30rpx;
color: #333;
.category-title{
position: relative;
display: flex;
justify-content: center;
align-items: center;
height: 120rpx;
&::before,
&::after {
position: absolute;
top: 50%;
content: '';
width: 10%;
border-top: 2rpx solid black;
}
&::before {
left: 25%;
}
.tabs-container {
background-color: #fff;
position: sticky;
top: 0;
z-index: 10;
}
.tabs-scroll {
white-space: nowrap;
width: 100%;
}
.tabs {
display: flex;
height: 80rpx;
line-height: 80rpx;
padding: 0 20rpx;
.tab-item {
padding: 0 20rpx;
font-size: 28rpx;
color: #666;
&::after {
right: 25%;
&.active {
color: #2b5cff;
font-weight: bold;
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40rpx;
height: 4rpx;
background-color: #2b5cff;
}
}
}
.list{
display: flex;
flex-wrap: wrap;
margin: 0 auto;
width: 490rpx;
.item {
padding: 10rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-bottom: 20rpx;
.item-image {
width: 120rpx;
height: 120rpx;
image{
height: 100%;
width: 100%;
border-radius: 50%;
}
}
}
.category {
display: flex;
height: calc(100vh - 240rpx);
.left-menu {
width: 180rpx;
background-color: #f5f5f5;
.item-unit {
font-size: 24rpx;
margin-top: 15rpx;
color: #555;
.menu-item {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 28rpx;
color: #666;
&.active {
background-color: #fff;
color: #2b5cff;
font-weight: bold;
position: relative;
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 6rpx;
height: 36rpx;
background-color: #2b5cff;
}
}
}
}
.right-content {
flex: 1;
background-color: #fff;
padding: 20rpx;
overflow-y: auto;
.gap {
padding: 0 30rpx;
.novel-list {
.novel-item {
display: flex;
align-items: center;
padding: 20rpx 0;
border-bottom: 1px solid #eee;
.rank-number {
width: 40rpx;
text-align: center;
font-size: 32rpx;
color: #999;
font-weight: bold;
&.top-rank {
color: #ff6b00;
}
}
.novel-cover {
width: 120rpx;
height: 160rpx;
margin: 0 20rpx;
image {
width: 100%;
height: 100%;
border-radius: 8rpx;
}
}
.novel-info {
flex: 1;
.novel-title {
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
}
.novel-tags {
display: flex;
margin-bottom: 10rpx;
.tag {
font-size: 22rpx;
color: #999;
margin-right: 10rpx;
&::before {
content: '[';
}
&::after {
content: ']';
}
}
}
.novel-author {
font-size: 24rpx;
color: #999;
}
}
.novel-status {
font-size: 24rpx;
color: #67c23a;
}
}
}
}
}
</style>

+ 294
- 182
pages/index/index.vue View File

@ -1,12 +1,59 @@
<template>
<view class="page">
<navbar/>
<view class="uni-color-btn"
@click="$utils.navigateTo('/pages_order/author/editor')">
章节编辑器
<view class="content">
<!-- 顶部横幅广告 -->
<view class="banner">
<image src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="widthFix"></image>
</view>
<!-- 通知区域 -->
<view class="notice">
<view class="notice-icon">
<image src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="widthFix"></image>
</view>
<view class="notice-text">
2025年2月平台福利活动截稿作品公示
</view>
<view class="notice-more">
<uv-icon name="arrow-right" color="#999" size="24rpx"></uv-icon>
</view>
</view>
<!-- 最近更新 -->
<view class="section">
<view class="section-header">
<text class="section-title">最近更新</text>
</view>
<view class="recommend-list">
<view class="recommend-item" v-for="(item, index) in recommendList" :key="index" @click="$utils.navigateTo('/pages_order/product/productDetail?id='+index)">
<image class="recommend-cover" :src="item.cover" mode="aspectFill"></image>
<view class="recommend-title">{{item.title}}</view>
</view>
</view>
</view>
</view>
<!-- 精品推荐 -->
<view class="section1">
<view class="section-header">
<text class="section-title">精品推荐</text>
<text class="section-more" @click="$utils.navigateTo('/pages/index/category')">查看更多 ></text>
</view>
<view class="novel-list">
<view class="novel-item" v-for="(item, index) in 5" :key="index" @click="$utils.navigateTo('/pages_order/product/productDetail?id='+index)">
<image class="novel-cover" :src="novelCovers[index]" mode="aspectFill"></image>
<view class="novel-info">
<view class="novel-title">{{novelTitles[index]}}</view>
<view class="novel-desc">{{novelDescs[index]}}</view>
</view>
</view>
</view>
</view>
<PrivacyAgreementPoup/>
@ -30,7 +77,7 @@
data() {
return {
area: '长沙',
text : '长沙市刘师傅在服务过程中客户投诉“服务过程中有不文明的行为”.....',
text : '长沙市刘师傅在服务过程中客户投诉"服务过程中有不文明的行为".....',
queryParams: {
pageNo: 1,
pageSize: 10,
@ -48,6 +95,45 @@
},
],
productList: [],
//
novelCovers: [
'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain',
'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
],
//
novelTitles: [
'我是半妖',
'兽王进化',
'魔法少女纯爷们',
'我是一条小青龙',
'女帝归来'
],
//
novelDescs: [
'都市玄幻小说,主角获得半妖化能力,通过吸收妖气不断变强...',
'一场意外让主角获得兽王血脉,开始了进化之路...',
'一个普通男孩意外获得魔法少女的力量,开始了奇妙冒险...',
'重生为一条小青龙,主角在修仙世界中成长的故事...',
'曾经的女帝重生归来,开始了复仇之路...'
],
//
recommendList: [
{
title: '重生后,我给妹妹假装动漫女主角',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
title: '我在亮剑提前帮助',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
title: '斗罗:开局魂师测试99级',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
}
]
}
},
computed : {
@ -98,215 +184,241 @@
</script>
<style scoped lang="scss">
.search {
height: 82rpx;
width: 710rpx;
background: #FFFFFF;
margin: 20rpx auto;
border-radius: 41rpx;
box-sizing: border-box;
padding: 0 15rpx;
display: flex;
align-items: center;
// justify-content: space-between;
.left-area,
.center-area {
display: flex;
align-items: center;
.page {
background-color: #f5f5f5;
// min-height: 100vh;
.content {
padding-bottom: 75rpx;
}
.left-area {
max-width: 160rpx;
.banner {
padding: 0;
image {
flex-shrink: 0;
width: 26rpx;
height: 26rpx;
}
.area {
font-size: 24rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
/* 限制显示两行 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
color: #292929;
}
.parting-line {
flex-shrink: 0;
font-size: 26rpx;
color: #ccc;
margin: 0rpx 5rpx;
width: 100%;
height: 250rpx;
border-radius: 0;
}
}
.center-area {
.notice {
display: flex;
flex-wrap: nowrap;
align-items: center;
width: calc(100% - 290rpx);
margin-left: 30rpx;
image {
width: 26rpx;
height: 26rpx;
}
.van-field {
background-color: transparent;
box-sizing: border-box;
height: 82rpx;
line-height: 82rpx;
width: calc(100% - 30rpx);
padding: 0rpx 10rpx 0rpx 0rpx;
input {
height: 82rpx;
font-size: 60rpx;
background-color: #fff;
margin: 0;
padding: 20rpx 30rpx;
border-radius: 0;
.notice-icon {
margin-right: 20rpx;
image {
width: 80rpx;
height: 80rpx;
}
}
}
.right-area {
.search-button {
background: #60BDA2;
height: 60rpx;
width: 130rpx;
font-size: 26rpx;
border-radius: 35rpx;
color: white;
display: flex;
align-items: center;
justify-content: center;
.notice-text {
flex: 1;
font-size: 28rpx;
color: #333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.notice-more {
margin-left: 20rpx;
}
}
}
.swipe{
overflow: hidden;
border-radius: 20rpx;
margin: 20rpx;
}
.page{
& /deep/ .uv-icon__icon{
font-size: 30rpx !important;
}
//
.userShop{
.list{
.section {
background-color: #fff;
margin: 30rpx 0 0 0;
padding: 10rpx 30rpx;
border-radius: 0;
.section-header {
display: flex;
flex-wrap: wrap;
.item{
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.section-more {
font-size: 24rpx;
color: #999;
}
}
.novel-list {
.novel-item {
display: flex;
justify-content: center;
align-items: center;
width: 330rpx;
margin: 20rpx;
padding: 30rpx 0;
color: #FFFFFF;
line-height: 50rpx;
border-radius: 20rpx;
font-size: 28rpx;
.num{
font-size: 38rpx;
font-weight: 900;
}
image{
width: 110rpx;
height: 110rpx;
margin-left: 20rpx;
padding: 20rpx 0;
border-bottom: 1px solid #eee;
&:last-child {
border-bottom: none;
}
&:nth-child(1){
background: #F07A77;
.novel-cover {
width: 160rpx;
height: 200rpx;
border-radius: 8rpx;
margin-right: 20rpx;
}
&:nth-child(2){
background: #F48B4E;
.novel-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.novel-title {
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
}
.novel-desc {
font-size: 24rpx;
color: #999;
line-height: 1.5;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
&:nth-child(3){
background: #6487E1;
}
}
.recommend-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.recommend-item {
width: 30%;
margin-bottom: 20rpx;
.recommend-cover {
width: 100%;
height: 200rpx;
border-radius: 8rpx;
margin-bottom: 10rpx;
}
&:nth-child(4){
background: #61B7E6;
.recommend-title {
font-size: 24rpx;
color: #333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
//
.user{
padding: 20rpx;
.shop{
position: relative;
.section1 {
background-color: #fff;
margin: 0rpx 0 0 0;
padding: 20rpx 30rpx;
border-radius: 0;
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
justify-content: center;
background-color: #fff;
margin-top: 20rpx;
border-radius: 20rpx;
padding: 20rpx;
overflow: hidden;
.image{
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
border-radius: 20rpx;
margin-bottom: 20rpx;
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
}
.shopInfo{
font-size: 22rpx;
.title{
font-size: 30rpx;
}
.tags{
display: flex;
.tag{
padding: 4rpx 6rpx;
border: 1rpx solid #FFAC6E;
color: #FFAC6E;
margin-right: 10rpx;
margin-top: 10rpx;
font-size: 18rpx;
}
.section-more {
font-size: 24rpx;
color: #999;
}
}
.novel-list {
.novel-item {
display: flex;
padding: 20rpx 0;
border-bottom: 1px solid #eee;
&:last-child {
border-bottom: none;
}
.time{
margin-top: 10rpx;
display: flex;
.novel-cover {
width: 160rpx;
height: 200rpx;
border-radius: 8rpx;
margin-right: 20rpx;
}
.address{
margin-top: 10rpx;
.novel-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
.novel-title {
font-size: 28rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
}
.novel-desc {
font-size: 24rpx;
color: #999;
line-height: 1.5;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
}
}
.btns{
margin-left: auto;
display: flex;
align-items: center;
justify-content: center;
.btn{
background-color: $uni-color;
color: #fff;
box-shadow: 0 0 5rpx 5rpx #FFAC6E;
padding: 10rpx 20rpx;
flex-shrink: 0;
border-radius: 35rpx;
}
.recommend-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.recommend-item {
width: 30%;
margin-bottom: 20rpx;
.recommend-cover {
width: 100%;
height: 200rpx;
border-radius: 8rpx;
margin-bottom: 10rpx;
}
.recommend-title {
font-size: 24rpx;
color: #333;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.tips{
position: absolute;
top: 0;
right: 0;
font-size: 24rpx;
color: #FFAC6E;
background-color: #FEF5EE;
padding: 10rpx 20rpx;
border-radius: 10rpx;
}
}
}
}
</style>

+ 169
- 204
pages/index/order.vue View File

@ -1,82 +1,80 @@
<template>
<view class="page">
<navbar
title="订单中心"
/>
<uv-tabs :list="tabs"
:activeStyle="{color : '#FD5100', fontWeight : 600}"
lineColor="#FD5100"
lineHeight="8rpx"
lineWidth="50rpx"
@click="clickTabs"></uv-tabs>
<view class="header">
<view class="tab-container">
<view class="tab active">阅读</view>
<view class="tab">作品</view>
</view>
</view>
<view v-if="orderList.length > 0" class="list">
<view class="item"
v-for="(item, index) in orderList.records"
@click="toOrderDetail(item.id)"
:key="index">
<view class="top">
<view class="service">
<text>{{item.projectId_dictText}}</text>
<text>{{item.type_dictText}}</text>
</view>
<view class="status">
<text> {{item.state_dictText}}</text>
</view>
<view class="novel-grid">
<!-- 第一行小说 -->
<view class="novel-row">
<!-- 小说1 -->
<view class="novel-item" @click="toNovelDetail('1')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
<view class="novel-title">我是半妖</view>
</view>
<view class="content">
<view class="left">
<image mode="aspectFill" :src="item.image"></image>
</view>
<view class="right">
<view class="text-hidden-1">
客户姓名{{item.name}}
</view>
<view class="text-hidden-1">
产品规格{{item.unit}}
</view>
<view class="text-hidden-1">
租赁地址{{item.address}}
</view>
<!-- <view class="text-hidden-1">
总计时间{{item.useTime}}分钟
</view> -->
</view>
<!-- 小说2 -->
<view class="novel-item" @click="toNovelDetail('2')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
<view class="novel-title">兽王进化从被小萝莉召唤开始</view>
</view>
<view class="bottom">
<view class="price">
总价格<text class="num">{{item.money}}</text>
</view>
<view class="b1">
查看物流
</view>
<!-- <view @click.stop="toPayOrder(item)" class="b2" v-if="item.state == 0">
立即付款
</view>
<view class="b1" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 3">
再来一单
</view>
<view class="b2" @click.stop="toEvaluate(item.id,item.projectId,item.technicianId)" v-if="item.state == 3">
立即评价
</view>
<view class="b2" @click.stop="moreOrder(item.projectId,toPlaceorder)" v-if="item.state == 4">
再来一单
</view> -->
<!-- 小说3 -->
<view class="novel-item" @click="toNovelDetail('3')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
<view class="novel-title">魔法少女纯爷们</view>
</view>
</view>
<!-- 第二行小说 -->
<view class="novel-row">
<!-- 小说4 -->
<view class="novel-item" @click="toNovelDetail('4')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain"></image>
<view class="novel-title">我是一条小青龙</view>
</view>
<!-- 小说5 -->
<view class="novel-item" @click="toNovelDetail('5')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain"></image>
<view class="novel-title">女帝别闹朕怀孕了</view>
</view>
<!-- 小说6 -->
<view class="novel-item" @click="toNovelDetail('6')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
<view class="novel-title">中国式应酬应酬是门技术活</view>
</view>
</view>
<!-- 第三行小说 -->
<view class="novel-row">
<!-- 小说7 -->
<view class="novel-item" @click="toNovelDetail('7')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
<view class="novel-title">苏世民我的经验与教训</view>
</view>
<!-- 小说8 -->
<view class="novel-item" @click="toNovelDetail('8')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
<view class="novel-title">认知觉醒开启自我改变的原动力</view>
</view>
<!-- 小说9 -->
<view class="novel-item" @click="toNovelDetail('9')">
<image class="novel-cover" src="https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain" mode="aspectFill"></image>
<view class="novel-title">纳瓦尔宝典</view>
</view>
</view>
</view>
<tabber select="order"/>
<tabber select="book"/>
</view>
</template>
@ -92,170 +90,137 @@
},
data() {
return {
tabs: [{
name: '全部'
novels: [
{
id: '1',
title: '我是半妖',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
id: '2',
title: '兽王进化:从被小萝莉召唤开始',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
name: '租赁押金'
id: '3',
title: '魔法少女纯爷们',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
name: '水洗租赁'
id: '4',
title: '我是一条小青龙',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
name: '破损换货'
id: '5',
title: '女帝:别闹,朕怀孕了!',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
name: '退货退款'
id: '6',
title: '中国式应酬——应酬是门技术活',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
id: '7',
title: '苏世民:我的经验与教训',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
id: '8',
title: '认知觉醒:开启自我改变的原动力',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
},
{
id: '9',
title: '纳瓦尔宝典',
cover: 'https://tse4-mm.cn.bing.net/th/id/OIP-C.iUyxJ_fxLjjX3kEBjteXWwAAAA?rs=1&pid=ImgDetMain'
}
],
queryParams: {
pageNo: 1,
pageSize: 10
},
// orderList: [
// {
// money : 99.99,
// address : '广广C32802',
// name : '**',
// phone : '150*****091',
// unit : '120*40*75',
// image : 'https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg',
// state_dictText : '',
// }
// ], //
orderList : {
records : [],
total : 0,
},
state : -1,
]
}
},
onShow() {
this.orderPage()
},
//
onReachBottom() {
if(this.queryParams.pageSize < this.orderList.total){
this.queryParams.pageSize += 10
this.orderPage()
}
//
},
methods: {
orderPage(){
let queryParams = {
...this.queryParams,
}
if(this.state != -1){
queryParams.state = this.state
}
this.$api('orderPage', queryParams, res => {
if(res.code == 200){
this.orderList = res.result
}
})
},
//tab
clickTabs(index) {
if (index == 0) {
this.state = -1;
} else {
this.state = index - 1;
}
this.queryParams.pageSize = 10
this.orderPage()
},
//
toOrderDetail(id) {
//
toNovelDetail(id) {
uni.navigateTo({
url: '/pages_order/order/orderDetail?id=' + id
url: '/pages_order/novel/novelDetail?id=' + id
})
},
getOrderList(){
},
}
}
</script>
<style scoped lang="scss">
.page{
.page {
background-color: #ffffff;
min-height: 100vh;
}
.list {
.item {
width: calc(100% - 40rpx);
background-color: #fff;
margin: 20rpx;
box-sizing: border-box;
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.status {
font-size: 26rpx;
font-weight: 600;
.header {
display: flex;
justify-content: center;
align-items: center;
padding: 20rpx 30rpx;
.tab-container {
display: flex;
align-items: center;
font-size: 34rpx;
.tab {
margin-right: 30rpx;
color: #999;
&.active {
color: #000;
font-weight: bold;
font-size: 36rpx;
}
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
}
.icons {
display: flex;
align-items: center;
.icon {
margin-right: 20rpx;
}
}
}
.bottom {
display: flex;
justify-content: space-between;
font-size: 25rpx;
.price {
font-weight: 900;
text {
color: #ff780099;
font-size: 30rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: linear-gradient(178deg, #4FD3BC, #60C285);
color: #fff;
.novel-grid {
padding: 10rpx 30rpx;
.novel-row {
display: flex;
justify-content: space-between;
margin-bottom: 40rpx;
.novel-item {
width: 31%;
.novel-cover {
width: 100%;
height: 240rpx;
border-radius: 16rpx;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.1);
}
view {
margin: 12rpx;
border-radius: 28rpx;
padding: 8rpx 28rpx;
margin-bottom: 0;
.novel-title {
font-size: 24rpx;
margin-top: 16rpx;
line-height: 1.4;
height: 64rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
color: #333;
}
}
}


+ 0
- 0
static/image/novel/cover1.jpg View File


+ 0
- 0
static/image/novel/cover2.jpg View File


+ 0
- 0
static/image/novel/cover3.jpg View File


+ 0
- 0
static/image/novel/cover4.jpg View File


+ 0
- 0
static/image/novel/cover5.jpg View File


Loading…
Cancel
Save