This commit is contained in:
gyq 2025-01-06 18:27:42 +08:00
parent 6b3451bcc2
commit fb23d878de
5 changed files with 230 additions and 225 deletions

236
App.vue
View File

@ -1,124 +1,122 @@
<script> <script>
import http from '@/http/http.js' import http from '@/http/http.js';
export default { export default {
onLaunch: function() { onLaunch: function () {
console.log('App Launch') console.log('App Launch');
// const systemInfo = uni.getSystemInfoSync(); // const systemInfo = uni.getSystemInfoSync();
// const isA = systemInfo.platform === 'android' // const isA = systemInfo.platform === 'android'
// if (isA) { // if (isA) {
// uni.setStorageSync('isAI', true) // uni.setStorageSync('isAI', true)
// } else { // } else {
// uni.setStorageSync('isAI', false) // uni.setStorageSync('isAI', false)
// } // }
},
}, onShow: function () {
onShow: function() { // ios
// ios http.request({
http.request({ url: 'app/common/type/919'
url: 'app/common/type/919', }).then((res) => {
}).then(res => { if (res.code == 0) {
if (res.code == 0) { uni.setStorageSync('isExamine', res.data.value);
uni.setStorageSync('isExamine', res.data.value) }
} });
}) },
}, onHide: function () {
onHide: function() { console.log('App Hide');
console.log('App Hide')
}
} }
};
</script> </script>
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "uview-plus/index.scss"; @import 'uview-plus/index.scss';
ul, ul,
li { li {
list-style: none; list-style: none;
} }
.show { .show {
display: none !important; display: none !important;
} }
.hidden { .hidden {
display: block !important; display: block !important;
} }
page, page,
view, view,
scroll-view, scroll-view,
swiper, swiper,
swiper-item, swiper-item,
match-media, match-media,
movable-area, movable-area,
movable-view, movable-view,
cover-view, cover-view,
cover-image, cover-image,
icon, icon,
text, text,
rich-text, rich-text,
progress, progress,
button, button,
checkbox-group, checkbox-group,
editor, editor,
form, form,
input, input,
label, label,
picker, picker,
picker-view, picker-view,
radio-group, radio-group,
slider, slider,
switch, switch,
textarea, textarea,
navigator, navigator,
audio, audio,
camera, camera,
image, image,
video, video,
live-player, live-player,
live-pusher, live-pusher,
map, map,
canvas, canvas,
web-view { web-view {
box-sizing: border-box; box-sizing: border-box;
padding: 0; padding: 0;
margin: 0; margin: 0;
text-decoration: none; text-decoration: none;
outline: none; outline: none;
}
} image {
display: block;
.initStyle { }
padding: 20rpx;
background-color: #2a2a2a; .initStyle {
height: 100vh; padding: 20rpx;
color: #fff; background-color: #2a2a2a;
} height: 100vh;
color: #fff;
.fc { }
color: #f4f693;
} .fc {
color: #f4f693;
.inputClass { }
line-height: 80rpx;
} .inputClass {
line-height: 80rpx;
.inputClass input { }
background-color: #fff;
height: 80rpx; .inputClass input {
padding: 10rpx; background-color: #fff;
color: #000; height: 80rpx;
} padding: 10rpx;
color: #000;
.result { }
position: absolute;
font-size: 100rpx; .result {
left: 50%; position: absolute;
top: 800rpx; font-size: 100rpx;
transform: translateX(-50%); left: 50%;
} top: 800rpx;
transform: translateX(-50%);
}
</style>
</style>

View File

@ -6,6 +6,7 @@ import http from '@/http/http.js'
export const selectByUserId = (data) => { export const selectByUserId = (data) => {
return http.request({ return http.request({
url: '/courseCollect/selectByUserId', url: '/courseCollect/selectByUserId',
data: data data: data,
method: 'GET'
}) })
} }

View File

@ -31,7 +31,8 @@
"path": "pages/chasingDrama/index", "path": "pages/chasingDrama/index",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom",
"enablePullDownRefresh": true
} }
},{ },{
"path": "pages/me/index", "path": "pages/me/index",

View File

@ -8,76 +8,54 @@
</view> </view>
<view class="list"> <view class="list">
<view class="item"> <view class="item">
<div class="item-content"> <view class="cover">
<view class="cover"> <image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image> <view class="num">第三集</view>
<view class="num">第三集</view> </view>
</view> <view class="intro-wrap">
<view class="intro-wrap"> <view class="name">我在八十年代当后妈</view>
<view class="name">我在八十年代当后妈</view> <view class="t">言情</view>
<view class="t">言情</view> </view>
</view>
</div>
</view> </view>
<view class="item"> <view class="item">
<div class="item-content"> <view class="cover">
<view class="cover"> <image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image> <view class="num">第三集</view>
<view class="num">第三集</view> </view>
</view> <view class="intro-wrap">
<view class="intro-wrap"> <view class="name">我在八十年代当后妈</view>
<view class="name">我在八十年代当后妈</view> <view class="t">言情</view>
<view class="t">言情</view> </view>
</view>
</div>
</view> </view>
<view class="item"> <view class="item">
<div class="item-content"> <view class="cover">
<view class="cover"> <image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image> <view class="num">第三集</view>
<view class="num">第三集</view> </view>
</view> <view class="intro-wrap">
<view class="intro-wrap"> <view class="name">我在八十年代当后妈</view>
<view class="name">我在八十年代当后妈</view> <view class="t">言情</view>
<view class="t">言情</view> </view>
</view>
</div>
</view> </view>
<view class="item"> <view class="item">
<div class="item-content"> <view class="cover">
<view class="cover"> <image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image> <view class="num">第三集</view>
<view class="num">第三集</view> </view>
</view> <view class="intro-wrap">
<view class="intro-wrap"> <view class="name">我在八十年代当后妈</view>
<view class="name">我在八十年代当后妈</view> <view class="t">言情</view>
<view class="t">言情</view> </view>
</view>
</div>
</view> </view>
<view class="item"> <view class="item">
<div class="item-content"> <view class="cover">
<view class="cover"> <image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image> <view class="num">第三集</view>
<view class="num">第三集</view> </view>
</view> <view class="intro-wrap">
<view class="intro-wrap"> <view class="name">我在八十年代当后妈</view>
<view class="name">我在八十年代当后妈</view> <view class="t">言情</view>
<view class="t">言情</view> </view>
</view>
</div>
</view>
<view class="item">
<div class="item-content">
<view class="cover">
<image class="img" src="https://img0.baidu.com/it/u=966333451,3199467079&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=714" mode="aspectFill"></image>
<view class="num">第三集</view>
</view>
<view class="intro-wrap">
<view class="name">我在八十年代当后妈</view>
<view class="t">言情</view>
</view>
</div>
</view> </view>
</view> </view>
</view> </view>
@ -105,20 +83,37 @@
</template> </template>
<script setup> <script setup>
import { reactive } from 'vue';
import { selectByUserId } from '@/api/me/me.js'; import { selectByUserId } from '@/api/me/me.js';
import { onLoad } from '@dcloudio/uni-app'; import { onLoad, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
async function selectByUserIdAjax() { async function selectByUserIdAjax() {
try { try {
const res = await selectByUserId(); const res1 = await selectByUserId({ page: 1, limit: 6, classify: 3 });
console.log(res); const res2 = await selectByUserId({ page: 1, limit: 6, classify: 6 });
console.log(res1);
console.log(res2);
} catch (error) { } catch (error) {
console.log(error); console.log(error);
} }
} }
const data = reactive({
list1: [], //
list2: [] //
});
//
onReachBottom(() => {});
//
onPullDownRefresh(() => {
selectByUserIdAjax();
});
//
onLoad(() => { onLoad(() => {
selectByUserId(); selectByUserIdAjax();
}); });
</script> </script>
@ -155,44 +150,43 @@ page {
grid-row-gap: 28upx; grid-row-gap: 28upx;
padding: 0 28upx; padding: 0 28upx;
.item { .item {
.item-content { width: 100%;
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
border-radius: 30upx; border-radius: 20upx;
.cover { .cover {
height: 200upx; height: 200upx;
position: relative; position: relative;
.img { .img {
width: 100%; width: 100%;
height: 100%; height: 100%;
}
.num {
padding: 4upx 16upx;
border-radius: 8upx;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(5px);
position: absolute;
right: 8upx;
bottom: 8upx;
color: #fff;
font-size: 24upx;
}
} }
.intro-wrap { .num {
padding: 20upx; padding: 4upx 16upx;
.name { border-radius: 8upx;
width: 180upx; background: rgba(0, 0, 0, 0.3);
overflow: hidden; backdrop-filter: blur(5px);
text-overflow: ellipsis; position: absolute;
white-space: nowrap; right: 8upx;
line-height: 32upx; bottom: 8upx;
font-weight: bold; color: #fff;
} font-size: 24upx;
.t { }
color: #999; }
font-size: 24upx; .intro-wrap {
margin-top: 8upx; padding: 20upx;
} .name {
width: 180upx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
line-height: 32upx;
font-weight: bold;
}
.t {
color: #999;
font-size: 24upx;
margin-top: 8upx;
} }
} }
} }

View File

@ -5,7 +5,9 @@
<view class="content"> <view class="content">
<view class="user-info"> <view class="user-info">
<view class="logo-wrap"> <view class="logo-wrap">
<view class="logo"></view> <view class="logo">
<image class="img" src="/static/logo.png" mode="widthFix"></image>
</view>
<view class="quick-menu"> <view class="quick-menu">
<image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit"></image> <image class="icon" src="/static/me/logo_btn1.png" mode="aspectFit"></image>
<image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit"></image> <image class="icon" src="/static/me/logo_btn2.png" mode="aspectFit"></image>
@ -137,7 +139,15 @@ page {
.user-info { .user-info {
.logo-wrap { .logo-wrap {
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
.logo {
width: 160upx;
.img {
width: 100%;
display: block;
}
}
.quick-menu { .quick-menu {
display: flex; display: flex;
gap: 20upx; gap: 20upx;
@ -151,6 +161,7 @@ page {
.top { .top {
display: flex; display: flex;
align-items: center; align-items: center;
padding-top: 40upx;
.avatar { .avatar {
$size: 94upx; $size: 94upx;
width: $size; width: $size;