新增全局颜色变量
This commit is contained in:
parent
96c378c54c
commit
b3f2901e3b
|
|
@ -34,6 +34,8 @@
|
|||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/watching_history/watching_history"
|
||||
}, {
|
||||
"path": "pages/me/index",
|
||||
"style": {
|
||||
|
|
@ -72,8 +74,7 @@
|
|||
},
|
||||
{
|
||||
"path": "pages/index/search/index",
|
||||
"style" :
|
||||
{
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
}
|
||||
|
|
@ -89,8 +90,7 @@
|
|||
"selectedColor": "#FF7581",
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
{
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/tabbar/index.png",
|
||||
"selectedIconPath": "static/tabbar/index_2.png",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="list-wrap">
|
||||
<view class="title-wrap">
|
||||
<view class="title">最近观看</view>
|
||||
<view class="more">更多</view>
|
||||
<navigator class="more" url="/pages/watching_history/watching_history?type=3">更多</navigator>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<view class="list-wrap">
|
||||
<view class="title-wrap">
|
||||
<view class="title">我的追剧</view>
|
||||
<view class="more">更多</view>
|
||||
<navigator class="more" url="/pages/watching_history/watching_history?type=1">更多</navigator>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,126 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<view class="list">
|
||||
<view class="item" v-for="item in listData.list" :key="item.id">
|
||||
<view class="cover">
|
||||
<image class="img" :src="item.titleImg" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="record">看到{{ item.courseDetailsName }}</view>
|
||||
<view class="btm">
|
||||
<view class="num">
|
||||
<view v-if="item.courseDetailsCount">更新{{ item.courseDetailsCount }}</view>
|
||||
</view>
|
||||
<view class="btn">继续观看</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||
|
||||
import { selectByUserId } from '@/api/me/me.js';
|
||||
|
||||
const type = ref(1);
|
||||
const typeList = ref([
|
||||
{
|
||||
type: 1,
|
||||
label: '我的追剧'
|
||||
},
|
||||
{
|
||||
type: 3,
|
||||
label: '最近观看'
|
||||
}
|
||||
]);
|
||||
|
||||
const listData = reactive({
|
||||
list: [],
|
||||
page: 1,
|
||||
size: 10
|
||||
});
|
||||
|
||||
// 获取数据
|
||||
async function selectByUserIdAjax() {
|
||||
try {
|
||||
const res = await selectByUserId({
|
||||
page: listData.page,
|
||||
limit: listData.size,
|
||||
classify: type.value
|
||||
});
|
||||
console.log(res);
|
||||
if (res.code === 0) {
|
||||
listData.list = res.data.records;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
onReachBottom(() => {
|
||||
listData.page++;
|
||||
selectByUserIdAjax();
|
||||
});
|
||||
|
||||
onLoad((e) => {
|
||||
if (e.type) {
|
||||
type.value = e.type;
|
||||
uni.setNavigationBarTitle({
|
||||
title: typeList.value.find((item) => item.type == type.value).label
|
||||
});
|
||||
}
|
||||
selectByUserIdAjax();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
padding: 28upx;
|
||||
color: #333;
|
||||
font-size: 29upx;
|
||||
}
|
||||
.list {
|
||||
.item {
|
||||
padding: 28upx 0;
|
||||
display: flex;
|
||||
.cover {
|
||||
width: 150upx;
|
||||
height: 200upx;
|
||||
margin-right: 28upx;
|
||||
.img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
border-radius: 20upx;
|
||||
}
|
||||
}
|
||||
.info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
.title {
|
||||
font-size: 32upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.record {
|
||||
color: $uni-zj-color-primary;
|
||||
}
|
||||
.btm {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.btn {
|
||||
padding: 4upx 12upx;
|
||||
color: #fff;
|
||||
background: $uni-zj-color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
6
uni.scss
6
uni.scss
|
|
@ -13,6 +13,8 @@
|
|||
*/
|
||||
|
||||
/* 颜色变量 */
|
||||
$uni-zj-color-primary: #ff7581;
|
||||
$uni-zj-color-primary-active: #cb5d68;
|
||||
|
||||
/* 行为相关颜色 */
|
||||
$uni-color-primary: #007aff;
|
||||
|
|
@ -68,10 +70,10 @@ $uni-spacing-col-lg: 12px;
|
|||
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
|
||||
|
||||
/* 文章场景相关 */
|
||||
$uni-color-title: #2C405A; // 文章标题颜色
|
||||
$uni-color-title: #2c405a; // 文章标题颜色
|
||||
$uni-font-size-title: 20px;
|
||||
$uni-color-subtitle: #555555; // 二级标题颜色
|
||||
$uni-font-size-subtitle: 26px;
|
||||
$uni-color-paragraph: #3F536E; // 文章段落颜色
|
||||
$uni-color-paragraph: #3f536e; // 文章段落颜色
|
||||
$uni-font-size-paragraph: 15px;
|
||||
@import 'uview-plus/theme.scss';
|
||||
Loading…
Reference in New Issue