添加文件

This commit is contained in:
Strange 2024-06-17 07:47:03 +08:00
parent 7d972a7d99
commit 4e0b37ffb0
67 changed files with 4160 additions and 2420 deletions

128
components/cardVideo.vue Normal file
View File

@ -0,0 +1,128 @@
<template>
<view class="container">
<view class="video-box">
<video class="video" ref="videoStatus" @play="propsPlay" :src="Videos.src"></video>
<view class="box-bottom">
<view class="user-info">
<u-avatar class="avatar" :src="Videos.avatar"></u-avatar>
<text class="username">{{Videos.username}}</text>
</view>
<u-tag class="tag" :text="Videos.tagName" bg-color="#6c757d" type="info" mode="plain" shape="circle"
size="medium"></u-tag>
</view>
<view class="bottom-title">
<text class="title">{{Videos.titleName}}</text>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
VideoId: {
type: Number,
default: null
},
Videos: {
type: Object,
default: {
src: "",
avatar: '',
username: 'sdsd',
titleName: 'asdsdas',
tagName: 'sdasd'
}
}
},
name: "cardVideo",
data() {
return {
videoContent: ''
};
},
mounted() {
this.videoContent = uni.createVideoContext("video", this)
},
onLoad() {
},
methods: {
propsPlay(e) {
const videoContext = this.videoContent
const videoStatus = this.$refs.videoStatus
this.$emit("onplay", {
e,
videoStatus,
videoContext
})
}
}
};
</script>
<style lang="scss">
$videoBoxradius: 30rpx;
$backColor: rgba(170, 85, 255, 0.6);
.container {
padding: 20rpx;
.video-box {
overflow: hidden;
border-radius: $videoBoxradius;
background-color: $backColor;
width: 100%;
.video {
width: 100%;
}
.box-bottom {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 4%;
.user-info {
display: inline-flex;
align-items: center;
// width: 26%;
justify-content: space-around;
}
.avatar {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.username {
color: #fff;
font-size: $uni-font-size-base;
margin-right: 10rpx;
}
.tag {
font-size: $uni-font-size-sm;
}
}
.bottom-title {
text-align: center;
color: #fff;
font-size: $uni-font-size-subtitle;
height: 80rpx;
.title {
line-height: 80rpx;
}
}
}
}
</style>

93
components/photosInfo.vue Normal file
View File

@ -0,0 +1,93 @@
<template>
<view class="container">
<view class="card-box">
<image class="background-image" :src="cardData.imageUrl" mode="aspectFill"></image>
<view class="content-box">
<div class="avatar-box">
<div class="user-info">
<u-avatar class="avatar" :src="cardData.avatarUrl"></u-avatar>
<text class="username">{{cardData.nikName}}</text>
</div>
<u-tag :text="cardData.tagName" bg-color="#6c757d" type="info" mode="plain" shape="circle" size="medium" />
</div>
<div class="description">{{cardData.footName}}</div>
</view>
</view>
</view>
</template>
<script>
export default {
props:{
cardData:{
type:Object,
default:{
imageUrl:'',
avatarUrl:"",
nikName:'',
tagName:'',
footName:''
}
}
},
name: "photosInfo",
data() {
return {};
},
};
</script>
<style>
.container {
padding: 20px;
background-color: #282c34;
}
.card-box {
background-color: rgba(65, 114, 159, 0.8);
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.background-image {
width: 100%;
height: 200px;
}
.content-box {
padding: 16px;
}
.avatar-box {
display: flex;
align-items: center;
justify-content: space-between;
}
.user-info {
display: flex;
align-items: center;
}
.avatar {
width: 60px;
height: 60px;
border-radius: 50%;
margin-right: 12px;
}
.username {
font-size: 16px;
font-weight: bold;
color: #fff;
}
.description {
color: #fff;
font-weight: 600;
margin-top: 8px;
font-size: 18px;
}
</style>

View File

@ -0,0 +1,175 @@
<template>
<div class="comment-card">
<div class="comment">
<img :src="comment.avatar" class="avatar" />
<div class="comment-content">
<div class="username">{{ comment.username }}</div>
<div class="text">{{ comment.text }}</div>
<div class="actions">
<span class="like" @click="likeComment">
<img src="https://img.icons8.com/ios-glyphs/30/000000/facebook-like.png" class="like-icon" />
{{ comment.likes }}
</span>
<span class="reply" @click="toggleReplyForm">回复</span>
<span class="share" @click="shareComment">
<img src="https://img.icons8.com/ios-filled/30/000000/share.png" class="share-icon" />
分享
</span>
</div>
<div v-if="comment.showReplyForm" class="reply-form">
<input v-model="newComment" placeholder="发表评论" class="comment-input" />
<!-- <button class="comment-button">发表</button> -->
<view class="" style="display: flex;align-items: center;width: 200rpx;">
<up-button size="large" @click="addComment" type="primary" shape="circle" text="发表"></up-button>
</view>
</div>
<div class="replies">
<CommentItem v-for="reply in comment.replies" :key="reply.id" :comment="reply" @reply="handleReply"
@like="handleLike" @share="handleShare" />
</div>
</div>
</div>
</div>
</template>
<script setup>
import {
defineProps,
defineEmits
} from 'vue';
const props = defineProps({
comment: Object,
});
const emit = defineEmits(['reply', 'like', 'share']);
const toggleReplyForm = () => {
props.comment.showReplyForm = !props.comment.showReplyForm;
};
const replyToComment = () => {
emit('reply', props.comment.id, props.comment.replyText);
props.comment.replyText = '';
props.comment.showReplyForm = false;
};
const likeComment = () => {
emit('like', props.comment.id);
};
const shareComment = () => {
emit('share', props.comment.id);
};
const handleReply = (commentId, replyText) => {
emit('reply', commentId, replyText);
};
const handleLike = (commentId) => {
emit('like', commentId);
};
const handleShare = (commentId) => {
emit('share', commentId);
};
</script>
<style scoped>
.comment-card {
background-color: #fff;
padding: 15px;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 15px;
display: flex;
flex-direction: column;
}
.comment {
display: flex;
flex-direction: row;
}
.avatar {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 10px;
}
.comment-content {
flex: 1;
}
.username {
font-weight: bold;
color: #007aff;
margin-bottom: 5px;
}
.text {
color: #333;
}
.actions {
margin-top: 10px;
}
.like,
.reply,
.share {
color: #007aff;
cursor: pointer;
margin-right: 15px;
}
.like:hover,
.reply:hover,
.share:hover {
text-decoration: underline;
}
.like-icon,
.share-icon {
width: 16px;
height: 16px;
margin-right: 5px;
vertical-align: middle;
}
.reply-form {
display: flex;
margin-top: 10px;
}
.reply-input {
flex-grow: 1;
margin-right: 10px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 14px;
}
.reply-button {
padding: 10px 20px;
background-color: #007aff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 14px;
}
.reply-button:hover {
background-color: #005bb5;
}
.replies {
margin-top: 10px;
padding-left: 20px;
border-left: 2px solid #f0f0f0;
}
</style>

View File

@ -1,67 +1,111 @@
<template> <template>
<view class="container"> <view class="container">
<view class="header">{{ post.title }}</view> <view class="header">{{ post.title }}</view>
<view class="content">{{ post.content }}</view> <view class="content">{{ post.content }}</view>
<view class="comments"> <view class="comments">
<view v-for="comment in comments" :key="comment.id" class="comment"> <CommentItem v-for="comment in comments" :key="comment.id" :comment="comment" @reply="handleReply"/>
<view class="username">{{ comment.username }}</view>
<view class="text">{{ comment.text }}</view>
</view>
</view> </view>
<view class="add-comment"> <view class="add-comment">
<input v-model="newComment" placeholder="发表评论" />
<button @click="addComment">发表</button> <input v-model="newComment" placeholder="发表评论" class="comment-input" />
<!-- <button class="comment-button">发表</button> -->
<view class="" style="display: flex;align-items: center;width: 200rpx;">
<up-button size="large" @click="addComment" type="primary" shape="circle" text="发表"></up-button>
</view>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { ref } from 'vue';
reactive,ref import CommentItem from './CommentItem.vue';
} from 'vue';
const post = ref({
const post = ref({ title: "这是一个讨论帖子",
title: "这是一个讨论帖子", content: "这是帖子的内容,大家可以在评论区讨论。",
content: "这是帖子的内容,大家可以在评论区讨论。", });
} )
const comments = ref([
{ id: 1, username: "Alice", text: "非常好的帖子!" },
{ id: 2, username: "Bob", text: "同意楼上的观点!" },
])
const newComment = ref("")
const comments = ref([
{ id: 1, username: "Alice", avatar: "https://via.placeholder.com/50", text: "非常好的帖子!", replies: [], showReplyForm: false, replyText: '' },
{ id: 2, username: "Bob", avatar: "https://via.placeholder.com/50", text: "同意楼上的观点!", replies: [], showReplyForm: false, replyText: '' },
]);
const addComment = () => { const newComment = ref("");
const newId = comments.value.length + 1;
comments.value.push({ const addComment = () => {
id: newId, const newId = comments.value.length + 1;
username: "匿名用户", comments.value.push({
text: this.newComment, id: newId,
}); username: "匿名用户",
newComment.value = ""; avatar: "https://via.placeholder.com/50",
text: newComment.value,
replies: [],
showReplyForm: false,
replyText: '',
});
newComment.value = "";
};
const handleReply = (commentId, replyText) => {
const comment = findCommentById(comments.value, commentId);
if (comment) {
const newReplyId = comment.replies.length + 1;
comment.replies.push({
id: newReplyId,
username: "匿名用户",
avatar: "https://via.placeholder.com/50",
text: replyText,
replies: [],
showReplyForm: false,
replyText: '',
});
}
};
const findCommentById = (comments, id) => {
for (const comment of comments) {
if (comment.id === id) {
return comment;
}
const reply = findCommentById(comment.replies, id);
if (reply) {
return reply;
}
}
return null;
}; };
</script> </script>
<style scoped> <style scoped>
/* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); */
.container { .container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-top: 20px; margin-top: 20px;
padding: 20px;
font-family: 'Roboto', sans-serif;
background-color: #f9f9f9;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
.header { .header {
font-size: 24px; font-size: 28px;
font-weight: bold; font-weight: bold;
color: #333;
text-align: center;
margin-bottom: 20px;
border-bottom: 2px solid #007aff;
padding-bottom: 10px;
} }
.content { .content {
margin-top: 20px; margin-top: 20px;
line-height: 1.5; line-height: 1.6;
color: #666;
} }
.comments { .comments {
@ -69,35 +113,33 @@
width: 100%; width: 100%;
} }
.comment {
display: flex;
flex-direction: column;
margin-bottom: 10px;
}
.username {
font-weight: bold;
}
.add-comment { .add-comment {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
width: 100%;
align-items: center;
} }
input { .comment-input {
flex-grow: 1; flex-grow: 1;
margin-right: 10px; margin-right: 10px;
padding: 10px; padding: 10px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 5px; border-radius: 5px;
font-size: 14px;
} }
button { .comment-button {
padding: 10px; padding: 10px 20px;
background-color: #007aff; background-color: #007aff;
color: #fff; color: #fff;
border: none; border: none;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
font-size: 14px;
}
.comment-button:hover {
background-color: #005bb5;
} }
</style> </style>

View File

@ -1,56 +1,390 @@
<!-- 薪资排行 -->
<template> <template>
<view class="container"> <view>
<view class="score-title">积分</view> <view class="contaier" style="background-color: #FFFFFF;">
<view class="score-content"> <view class="top_bg">
<view class="score-item"> <view class="one_box">
<text class="score-label">我的积分</text> <!-- 第二名 -->
<text class="score-value">1234</text> <view class="top3">
</view> <view class="num_two">
<view class="score-item"> <image class="huangguan2" src="../../static/rank/two.png"></image>
<text class="score-label">可用积分</text> <image class="top3_head"
<text class="score-value">100</text> :src="rankList[1].user.avatar?baseUrl+ rankList[1].user.avatar:'/static/hands.png'">
</view> </image>
<view class="score-item"> <!-- <view class="top_name">{{twoName}}</view> -->
<text class="score-label">积分使用规则</text> <view class="top_name">{{rankList[1].user.nickName}}</view>
</view> <view class="top_sy">{{rankList[1].integral}}<span></span></view>
<!-- 更多积分规则和说明 --> </view>
</view> </view>
</view>
<!-- 第一名 -->
<view class="top3">
<view class="num_one">
<image class="huangguan1" src="../../static/rank/one.png"></image>
<image class="top3_head"
:src="rankList[0].user.avatar?baseUrl+ rankList[0].user.avatar:'/static/hands.png'">
</image>
<!-- <view class="top_name" style="font-size: 30rpx;">{{oneName}}</view> -->
<view class="top_name text-bold" style="font-size: 30rpx;">{{rankList[0].user.nickName}}
</view>
<view class="top_sy">{{rankList[0].integral}}<span></span></view>
</view>
</view>
<!-- 第三名 -->
<view class="top3">
<view class="num_three">
<image class="huangguan2" src="../../static/rank/three.png"></image>
<image class="top3_head"
:src="rankList[2].user.avatar?baseUrl+ rankList[2].user.avatar:'/static/hands.png'">
</image>
<view class="top_name">{{rankList[1].user.nickName}}</view>
<view class="top_sy">{{rankList[1].integral}}</view>
</view>
</view>
</view>
<view class="number_sy_box">
<view class="number_sy_box_title">
<text>分数·统计</text>
<text style="position: absolute; right: 20rpx;z-index: 9999; font-size: 24rpx;color: #c3c3c3;">
截止{{nowTime}}
</text>
</view>
<view class="number_sy_main">
<view style="width: 50%; text-align: center; border-right: 1px solid #eee;">
<view class="number_num1">{{new Number(scocre/rankList.length).toFixed(2)}}</view>
<view class="danwei">平均积分</view>
</view>
<!-- <view style="width: 50%; text-align: center; z-index: 9999;">
<view class="number_num2">96.8%</view>
<view class="danwei">就业率</view>
</view> -->
<image mode="widthFix" class="xiaoding_bg" src="../../static/rank/Intersect.png"></image>
</view>
</view>
</view>
<view class="rankList_box">
<view class="rankItem" v-if="index<100" v-for="(item,index) in rankList" :key="index">
<view class="rankIndex">
<text>{{ index + 4 }}</text>
</view>
<view class="HeardBox">
<image class="rankHeard" :src="item.user.avatar?baseUrl+ item.user.avatar:'/static/hands.png'">
</image>
</view>
<view class="NameBox">
<view class="userName text-bold">{{item.user.nickName}}</view>
<view class="userPost text-gray">{{item.post}}</view>
<view class="color_ccc"><text class="text-blue">{{item.integral}}</text></view>
</view>
<view class="download_box">
<image mode="widthFix" src="../../static/rank/download.png"></image>
</view>
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
export default {
data() {
return { export default {
// data() {
}; return {
}, nowTime: '',
// baseUrl,
}; scocre: null,
rankList: []
}
},
onLoad() {
this.getTime();
this.getRanking()
},
methods: {
async getRanking() {
const resp = await getUserIntegral();
console.log(resp)
this.rankList = resp.data
this.rankList.forEach(e => {
this.scocre += e.integral
})
},
getTime: function() {
var date = new Date(),
year = date.getFullYear(),
month = date.getMonth() + 1,
day = date.getDate(),
hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(),
minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(),
second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? (month = "0" + month) : "";
day >= 0 && day <= 9 ? (day = "0" + day) : "";
var timer = year + '-' + month + '-' + day + ' ' + hour + ':00';
this.nowTime = timer
console.log(this.nowTime);
},
},
filters: {
}
}
</script> </script>
<style scoped> <style lang="scss">
.container { .top_bg {
padding: 20px; width: 750rpx;
} height: 650rpx;
.score-title { background: url(http://cdn.zhoukaiwen.com/rank_bg.png) no-repeat;
font-size: 18px; background-size: 750rpx;
font-weight: bold; position: relative;
margin-bottom: 20px; }
}
.score-item { .one_box {
display: flex; width: 750rpx;
align-items: center; height: 260rpx;
margin-bottom: 10px; position: absolute;
} left: 0;
.score-label { bottom: 110rpx;
flex: 1; display: flex;
text-align: right; justify-content: space-around;
} }
.score-value {
flex: 1; .one_box .top3 {
text-align: left; width: 210rpx;
font-weight: bold; height: 280rpx;
color: #5677fc; }
}
.top_name {
width: 100%;
height: 55rpx;
line-height: 60rpx;
color: #f2f2f2;
font-size: 26rpx;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.top_sy {
width: 100%;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, .7);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.top_sy span {
font-size: 20rpx !important;
}
.num_one {
position: relative;
}
.huangguan1 {
width: 60px;
height: 60px;
position: absolute;
right: -10rpx;
top: -18*2rpx;
}
.num_one .top3_head {
width: 150rpx;
height: 150rpx;
border-radius: 100%;
margin: 15rpx 0 0 30rpx;
border: 4rpx solid #ffdd3c;
}
.num_two {
position: relative;
}
.huangguan2 {
width: 100rpx;
height: 100rpx;
position: absolute;
right: 15rpx;
}
.num_two .top3_head {
width: 120rpx;
height: 120rpx;
border-radius: 100%;
margin: 45rpx 0 0 45rpx;
border: 4rpx solid #bcdcdf;
}
.num_three {
position: relative;
}
.huangguan2 {
width: 100rpx;
height: 100rpx;
position: absolute;
right: 15rpx;
}
.num_three .top3_head {
width: 120rpx;
height: 120rpx;
border-radius: 100%;
margin: 45rpx 0 0 45rpx;
border: 4rpx solid #e29d85;
}
//
.number_sy_box {
width: 700rpx;
height: 210rpx;
background-color: #FFFFFF;
position: absolute;
left: 25rpx;
border-radius: 20rpx;
bottom: -115rpx;
z-index: 999;
padding: 22rpx;
box-shadow: 3px 3px 15px 3px rgba(0, 0, 0, 0.1)
}
.number_sy_box_title {
color: #888888;
// font-weight: 500;
font-size: 28rpx;
display: flex;
z-index: 9999;
justify-content: space-between;
}
.number_sy_main {
width: 100%;
height: 124rpx;
padding-top: 20rpx;
line-height: 52rpx;
// background: red;
display: flex;
justify-content: space-around;
position: relative;
}
.xiaoding_bg {
position: absolute;
right: -22rpx;
bottom: -30rpx;
width: 180rpx;
}
.number_num1 {
font-size: 40rpx;
font-weight: 500;
color: #2fc04f;
}
.number_num2 {
font-size: 40rpx;
font-weight: 500;
color: #4bac7f;
}
.danwei {
height: 60rpx;
line-height: 60rpx;
font-size: 26rpx;
color: #c9c9c9;
}
//
.rankList_box {
width: 750rpx;
min-height: 200rpx;
margin-top: 130rpx;
}
.rankItem:last-child {
border: none;
}
.rankItem {
width: 700rpx;
height: 140rpx;
margin: 0px auto;
border-bottom: 1px solid #e9e9e9;
}
.rankIndex {
width: 60rpx;
height: 140rpx;
line-height: 140rpx;
text-align: center;
color: #CCCCCC;
font-size: 40rpx;
float: left;
}
.HeardBox {
width: 100rpx;
height: 100rpx;
margin: 20rpx;
border-radius: 100%;
overflow: hidden;
float: left;
margin-right: 25rpx;
margin-left: 10rpx !important;
}
.HeardBox image {
width: 100%;
height: 100%;
}
.NameBox {
width: 400rpx;
height: 140rpx;
float: left;
padding-top: 10rpx;
box-sizing: border-box;
}
.NameBox view {
height: 50rpx;
line-height: 70rpx;
}
.userName {
min-width: 90rpx;
font-size: 30rpx;
float: left;
margin-right: 20rpx;
}
.download_box {
width: 80rpx;
height: 140rpx;
// background-color: red;
float: right;
}
.download_box image {
width: 45rpx;
margin: 50rpx auto;
display: block;
}
</style> </style>

View File

@ -1,187 +1,156 @@
<template> <template>
<view> <view class="content">
<!--swiper实现整屏划动播放视频--> <view class="swiper-item">
<swiper circular vertical duration="200" @transition="transition" @change="changed" <card-video style="margin-bottom: 20px;" @onplay="getVideo" :VideoId="index" :key="index"
:style="{height: screenHeight-navBarHeight +'px'}"> v-for="(item,index) in videoList" :Videos="item"></card-video>
<block v-for="(item,index) in displaySwiperList" :key="index"> </view>
<swiper-item> <!-- <u-loadmore :status="status" @loadmore="onReachLoad" /> -->
<!-- v-if="index==changeIndex" 只渲染当前页的视频能够有效解决数组不断追加后引起黑屏的问题 -->
<video v-if="index==changeIndex" :src="item.src" autoplay="true" controls="true"
custom-cache="false" loop="false" enable-play-gesture="true" enable-progress-gesture="true"
show-center-play-btn="true">
</video>
<!-- 文本标题 -->
<view class="video-text">
<view class="tips"> {{item.title}} </view>
</view>
</swiper-item>
</block>
</swiper>
</view> </view>
</template> </template>
<script> <script>
import cardVideo from "@/components/cardVideo.vue"
// import {
// UserVideo
// } from "../../../api/videoApi.js"
// import {userImage} from "../../../api/image.js"
import potoInfo from "@/components/photosInfo.vue"
// import api from "../../../api/api.js"
export default { export default {
components: {
cardVideo,
potoInfo
},
data() { data() {
return { return {
screenHeight: 0, status: "loadmore",
statusBarHeight: 0, list: [{
navBarHeight: 0, name: '视频'
originList: [], // }, {
displaySwiperList: [], // swiper name: '图片'
displayIndex: 0, // swiper012 }],
originIndex: 0, // current: 0,
changeIndex: 0, //video imageList: [],
page: 0, // swpper: {
num: 0, index: 0
flag: true },
page: {
pageNum: 1,
pageSize: 10,
total: 0
},
videoList: [{
src: "",
avatar: 'dsfs',
username: 'sdsd',
titleName: 'asdsdas',
tagName: 'sdasd'
}],
videoContext: null
} }
}, },
onLoad() { onLoad() {
/* 获取系统信息 */ // this.ISstatusInit()
wx.getSystemInfo({
success: (res) => {
//
this.screenHeight = res.screenHeight
//
this.statusBarHeight = res.statusBarHeight
//
if (res.system.substring(0, 3) == "iOS") {
this.navBarHeight = 42
} else {
this.navBarHeight = 40
}
}
})
//
this.getPageID()
}, },
methods: { methods: {
/* 生成随机的 pageID */ getVideo(e) {
getPageID() { console.log(e)
let pageID = parseInt(Math.random() * (0 - 100 + 1) + 100) // [min,max] if (this.videoContext) {
this.getVideoList(pageID) console.log("test")
}, this.videoContext.pause()
/* 获取视频数据 */
getVideoList(pageID) {
uni.request({
url: 'https://api.apiopen.top/api/getMiniVideo?page=' + pageID +
'&size=10&pageSize=10', //
data: {},
success: (res) => {
if (res.data.code == 200) {
res.data.result.list.forEach(item => {
//
let obj = {}
obj.src = item.playurl
obj.title = item.title
this.originList.push(obj)
})
}
//
if (this.flag) {
this.flag = false
this.initSwiperData(0)
}
}
})
},
changed(event) {
let {
current
} = event.detail;
let originListLength = this.originList.length;
this.changeIndex = current;
// console.log(this.displayIndex,current)
// 2-1
if (this.displayIndex - current == 2 || this.displayIndex - current == -1) {
this.originIndex = this.originIndex + 1 == originListLength ? 0 : this.originIndex + 1;
this.displayIndex = this.displayIndex + 1 == 3 ? 0 : this.displayIndex + 1;
this.initSwiperData(this.originIndex);
//
this.num++
console.log('num', this.num, this.originList.length)
if (this.num + 5 >= this.originList.length) {
this.getPageID()
}
} }
// -21 this.videoContext = e.videoContext
else if (this.displayIndex - current == -2 || this.displayIndex - current == 1) { },
this.originIndex = this.originIndex - 1 == -1 ? originListLength - 1 : this.originIndex - 1; ISstatusInit() {
this.displayIndex = this.displayIndex - 1 == -1 ? 2 : this.displayIndex - 1; switch (this.swpper.index) { //
this.initSwiperData(this.originIndex); case 0: {
this.getVideoList()
if (this.num > 0) { break
this.num-- }
case 1: {
this.getImageList()
} }
} }
}, },
onReachLoad() {
initSwiperData(originIndex = this.originIndex) { this.status = 'loading';
// console.log(this.displayIndex,originIndex) this.page.pageSize += 10
// 0 0 this.ISstatusInit()
// 1 1 console.log(this.swpper.index)
// 2 2 if (this.list.length >= this.page.total) {
// 0 3
// 1 4 console.log(this.list.length)
// this.status = 'nomore'
let originListLength = this.originList.length; } else {
let displayList = []; this.status = "loadmore"
displayList[this.displayIndex] = this.originList[originIndex]; }
displayList[this.displayIndex - 1 == -1 ? 2 : this.displayIndex - 1] = this.originList[originIndex - 1 == -
1 ? originListLength - 1 : originIndex - 1];
displayList[this.displayIndex + 1 == 3 ? 0 : this.displayIndex + 1] = this.originList[originIndex + 1 ==
originListLength ? 0 : originIndex + 1];
// console.log(originIndex, (originIndex - 1 == -1 ? originListLength - 1 : originIndex - 1), (originIndex +
// 1 == originListLength ? 0 : originIndex + 1))
// 0 9 1
// 1 0 2
// 2 1 3
// 3 2 4
// 4 3 5
//
this.displaySwiperList = displayList;
// console.log(this.displaySwiperList,this.originList)
}, },
async getVideoList() {
const __this = this
// UserVideo(this.page).then(res => {
// console.log(res)
// __this.page.total = res.total
// const list = res.data
// if (list.length == 0) {
// return uni.showToast({
// icon: "none",
// title: res.msg
// })
// }
// for (let i of list) {
// __this.videoList.push({
// src: `${api.qiNiuUrl}/${i.VideoUrl}`,
// avatar: i.user_pic,
// username: i.nikename,
// titleName: i.filename,
// tagName: i.type
// })
// }
// })
},
change(e) {
console.log(e)
this.swpper.index = e.index
this.page = {
pageNum: 1,
pageSize: 10,
total: 0
}
this.ISstatusInit()
}
} }
} }
</script> </script>
<style> <style lang="scss">
swiper { .content {
.nav {
display: flex;
width: 100%;
position: fixed;
top: 0%;
justify-content: center;
z-index: 2;
}
// background-color: $w-BgColor;
position: relative;
swiper {
position: relative;
top: 90rpx;
swiper-item {
overflow: scroll;
}
}
width: 100%; width: 100%;
background: #000 height: 100vh;
} padding-bottom: 10%;
swiper-item {
height: 100%;
width: 100%
}
video {
height: 96%;
width: 100%
}
.video-text {
position: absolute;
margin-left: 32rpx;
width: 580rpx;
bottom: 200rpx;
z-index: 9999;
}
.tips {
width: 560rpx;
font-size: 26rpx;
color: #ffffff;
} }
</style> </style>

View File

@ -21,7 +21,7 @@ const _sfc_main = {
console.log("App Hide"); console.log("App Hide");
} }
}; };
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/App.vue"]]); const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/App.vue"]]);
function createApp() { function createApp() {
const app = common_vendor.createSSRApp(App); const app = common_vendor.createSSRApp(App);
return { return {

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const _sfc_main = {
props: {
VideoId: {
type: Number,
default: null
},
Videos: {
type: Object,
default: {
src: "",
avatar: "",
username: "sdsd",
titleName: "asdsdas",
tagName: "sdasd"
}
}
},
name: "cardVideo",
data() {
return {
videoContent: ""
};
},
mounted() {
this.videoContent = common_vendor.index.createVideoContext("video", this);
},
onLoad() {
},
methods: {
propsPlay(e) {
const videoContext = this.videoContent;
const videoStatus = this.$refs.videoStatus;
this.$emit("onplay", {
e,
videoStatus,
videoContext
});
}
}
};
if (!Array) {
const _easycom_u_avatar2 = common_vendor.resolveComponent("u-avatar");
const _easycom_u_tag2 = common_vendor.resolveComponent("u-tag");
(_easycom_u_avatar2 + _easycom_u_tag2)();
}
const _easycom_u_avatar = () => "../node-modules/uview-plus/components/u-avatar/u-avatar.js";
const _easycom_u_tag = () => "../node-modules/uview-plus/components/u-tag/u-tag.js";
if (!Math) {
(_easycom_u_avatar + _easycom_u_tag)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o((...args) => $options.propsPlay && $options.propsPlay(...args)),
b: $props.Videos.src,
c: common_vendor.p({
src: $props.Videos.avatar
}),
d: common_vendor.t($props.Videos.username),
e: common_vendor.p({
text: $props.Videos.tagName,
["bg-color"]: "#6c757d",
type: "info",
mode: "plain",
shape: "circle",
size: "medium"
}),
f: common_vendor.t($props.Videos.titleName)
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/components/cardVideo.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"u-avatar": "../node-modules/uview-plus/components/u-avatar/u-avatar",
"u-tag": "../node-modules/uview-plus/components/u-tag/u-tag"
}
}

View File

@ -0,0 +1 @@
<view class="container"><view class="video-box"><video class="video" ref="videoStatus" bindplay="{{a}}" src="{{b}}"></video><view class="box-bottom"><view class="user-info"><u-avatar wx:if="{{c}}" class="avatar" u-i="2f388469-0" bind:__l="__l" u-p="{{c}}"></u-avatar><text class="username">{{d}}</text></view><u-tag wx:if="{{e}}" class="tag" u-i="2f388469-1" bind:__l="__l" u-p="{{e}}"></u-tag></view><view class="bottom-title"><text class="title">{{f}}</text></view></view></view>

View File

@ -0,0 +1,72 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.container {
padding: 20rpx;
}
.container .video-box {
overflow: hidden;
border-radius: 30rpx;
background-color: rgba(170, 85, 255, 0.6);
width: 100%;
}
.container .video-box .video {
width: 100%;
}
.container .video-box .box-bottom {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 4%;
}
.container .video-box .box-bottom .user-info {
display: inline-flex;
align-items: center;
justify-content: space-around;
}
.container .video-box .box-bottom .avatar {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 10rpx;
}
.container .video-box .box-bottom .username {
color: #fff;
font-size: 14px;
margin-right: 10rpx;
}
.container .video-box .box-bottom .tag {
font-size: 12px;
}
.container .video-box .bottom-title {
text-align: center;
color: #fff;
font-size: 26px;
height: 80rpx;
}
.container .video-box .bottom-title .title {
line-height: 80rpx;
}

View File

@ -16,5 +16,5 @@ const _sfc_main = {
}; };
} }
}; };
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/components/newsCard.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/components/newsCard.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -0,0 +1,50 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const _sfc_main = {
props: {
cardData: {
type: Object,
default: {
imageUrl: "",
avatarUrl: "",
nikName: "",
tagName: "",
footName: ""
}
}
},
name: "photosInfo",
data() {
return {};
}
};
if (!Array) {
const _easycom_u_avatar2 = common_vendor.resolveComponent("u-avatar");
const _easycom_u_tag2 = common_vendor.resolveComponent("u-tag");
(_easycom_u_avatar2 + _easycom_u_tag2)();
}
const _easycom_u_avatar = () => "../node-modules/uview-plus/components/u-avatar/u-avatar.js";
const _easycom_u_tag = () => "../node-modules/uview-plus/components/u-tag/u-tag.js";
if (!Math) {
(_easycom_u_avatar + _easycom_u_tag)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: $props.cardData.imageUrl,
b: common_vendor.p({
src: $props.cardData.avatarUrl
}),
c: common_vendor.t($props.cardData.nikName),
d: common_vendor.p({
text: $props.cardData.tagName,
["bg-color"]: "#6c757d",
type: "info",
mode: "plain",
shape: "circle",
size: "medium"
}),
e: common_vendor.t($props.cardData.footName)
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/components/photosInfo.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"u-avatar": "../node-modules/uview-plus/components/u-avatar/u-avatar",
"u-tag": "../node-modules/uview-plus/components/u-tag/u-tag"
}
}

View File

@ -0,0 +1 @@
<view class="container"><view class="card-box"><image class="background-image" src="{{a}}" mode="aspectFill"></image><view class="content-box"><view class="avatar-box"><view class="user-info"><u-avatar wx:if="{{b}}" class="avatar" u-i="6e2f10a1-0" bind:__l="__l" u-p="{{b}}"></u-avatar><text class="username">{{c}}</text></view><u-tag wx:if="{{d}}" u-i="6e2f10a1-1" bind:__l="__l" u-p="{{d}}"/></view><view class="description">{{e}}</view></view></view></view>

View File

@ -0,0 +1,44 @@
.container {
padding: 20px;
background-color: #282c34;
}
.card-box {
background-color: rgba(65, 114, 159, 0.8);
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.background-image {
width: 100%;
height: 200px;
}
.content-box {
padding: 16px;
}
.avatar-box {
display: flex;
align-items: center;
justify-content: space-between;
}
.user-info {
display: flex;
align-items: center;
}
.avatar {
width: 60px;
height: 60px;
border-radius: 50%;
margin-right: 12px;
}
.username {
font-size: 16px;
font-weight: bold;
color: #fff;
}
.description {
color: #fff;
font-weight: 600;
margin-top: 8px;
font-size: 18px;
}

View File

@ -132,5 +132,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
p: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)) p: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args))
}); });
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-14a988f2"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-avatar/u-avatar.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-14a988f2"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-avatar/u-avatar.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -195,5 +195,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
G: common_vendor.n($options.bemClass) G: common_vendor.n($options.bemClass)
}); });
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-461e713c"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-button/u-button.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-461e713c"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-button/u-button.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -95,5 +95,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
D: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)) D: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args))
}); });
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b4243719"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-cell/u-cell.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b4243719"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-cell/u-cell.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -107,5 +107,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.s($options.itemStyle) d: common_vendor.s($options.itemStyle)
} : {}); } : {});
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d5274fb5"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-grid-item/u-grid-item.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-d5274fb5"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-grid-item/u-grid-item.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -64,5 +64,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
a: common_vendor.s($options.gridStyle) a: common_vendor.s($options.gridStyle)
}; };
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-85602471"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-grid/u-grid.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-85602471"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-grid/u-grid.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -88,5 +88,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
t: common_vendor.n("u-icon--" + _ctx.labelPos) t: common_vendor.n("u-icon--" + _ctx.labelPos)
}); });
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1c933a9a"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-icon/u-icon.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-1c933a9a"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-icon/u-icon.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -0,0 +1,213 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-input",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$10],
data() {
return {
// 清除操作
clearInput: false,
// 输入框的值
innerValue: "",
// 是否处于获得焦点状态
focused: false,
// value是否第一次变化在watch中由于加入immediate属性会在第一次触发此时不应该认为value发生了变化
firstChange: true,
// value绑定值的变化是由内部还是外部引起的
changeFromInner: false,
// 过滤处理方法
innerFormatter: (value) => value
};
},
watch: {
modelValue: {
immediate: true,
handler(newVal, oldVal) {
this.innerValue = newVal;
this.firstChange = false;
this.changeFromInner = false;
}
}
},
computed: {
// 是否显示清除控件
isShowClear() {
const { clearable, readonly, focused, innerValue } = this;
return !!clearable && !readonly && !!focused && innerValue !== "";
},
// 组件的类名
inputClass() {
let classes = [], { border, disabled, shape } = this;
border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"]));
classes.push(`u-input--${shape}`);
border === "bottom" && (classes = classes.concat([
"u-border-bottom",
"u-input--no-radius"
]));
return classes.join(" ");
},
// 组件的样式
wrapperStyle() {
const style = {};
if (this.disabled) {
style.backgroundColor = this.disabledColor;
}
if (this.border === "none") {
style.padding = "0";
} else {
style.paddingTop = "6px";
style.paddingBottom = "6px";
style.paddingLeft = "9px";
style.paddingRight = "9px";
}
return common_vendor.deepMerge(style, common_vendor.addStyle(this.customStyle));
},
// 输入框的样式
inputStyle() {
const style = {
color: this.color,
fontSize: common_vendor.addUnit(this.fontSize),
textAlign: this.inputAlign
};
return style;
}
},
emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange"],
methods: {
// 在微信小程序中不支持将函数当做props参数故只能通过ref形式调用
setFormatter(e) {
this.innerFormatter = e;
},
// 当键盘输入时触发input事件
onInput(e) {
let { value = "" } = e.detail || {};
const formatter = this.formatter || this.innerFormatter;
const formatValue = formatter(value);
this.innerValue = value;
this.$nextTick(() => {
this.innerValue = formatValue;
this.valueChange();
});
},
// 输入框失去焦点时触发
onBlur(event) {
this.$emit("blur", event.detail.value);
common_vendor.sleep(150).then(() => {
this.focused = false;
});
common_vendor.formValidate(this, "blur");
},
// 输入框聚焦时触发
onFocus(event) {
this.focused = true;
this.$emit("focus");
},
// 点击完成按钮时触发
onConfirm(event) {
this.$emit("confirm", this.innerValue);
},
// 键盘高度发生变化的时候触发此事件
// 兼容性微信小程序2.7.0+、App 3.1.0+
onkeyboardheightchange(event) {
this.$emit("keyboardheightchange", event);
},
// 内容发生变化,进行处理
valueChange() {
if (this.clearInput) {
this.innerValue = "";
this.clearInput = false;
}
const value = this.innerValue;
this.$nextTick(() => {
this.$emit("update:modelValue", value);
this.changeFromInner = true;
this.$emit("change", value);
common_vendor.formValidate(this, "change");
});
},
// 点击清除控件
onClear() {
this.clearInput = true;
this.innerValue = "";
this.$nextTick(() => {
this.valueChange();
this.$emit("clear");
});
},
/**
* 在安卓nvue上事件无法冒泡
* 在某些时间我们希望监听u-from-item的点击事件此时会导致点击u-form-item内的u-input后
* 无法触发u-form-item的点击事件这里通过手动调用u-form-item的方法进行触发
*/
clickHandler() {
}
}
};
if (!Array) {
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
_easycom_u_icon2();
}
const _easycom_u_icon = () => "../u-icon/u-icon.js";
if (!Math) {
_easycom_u_icon();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.prefixIcon || _ctx.$slots.prefix
}, _ctx.prefixIcon || _ctx.$slots.prefix ? {
b: common_vendor.p({
name: _ctx.prefixIcon,
size: "18",
customStyle: _ctx.prefixIconStyle
})
} : {}, {
c: common_vendor.s($options.inputStyle),
d: _ctx.type,
e: _ctx.focus,
f: _ctx.cursor,
g: $data.innerValue,
h: _ctx.autoBlur,
i: _ctx.disabled || _ctx.readonly,
j: _ctx.maxlength,
k: _ctx.placeholder,
l: _ctx.placeholderStyle,
m: _ctx.placeholderClass,
n: _ctx.confirmType,
o: _ctx.confirmHold,
p: _ctx.holdKeyboard,
q: _ctx.cursorSpacing,
r: _ctx.adjustPosition,
s: _ctx.selectionEnd,
t: _ctx.selectionStart,
v: _ctx.password || _ctx.type === "password" || false,
w: _ctx.ignoreCompositionEvent,
x: common_vendor.o((...args) => $options.onInput && $options.onInput(...args)),
y: common_vendor.o((...args) => $options.onBlur && $options.onBlur(...args)),
z: common_vendor.o((...args) => $options.onFocus && $options.onFocus(...args)),
A: common_vendor.o((...args) => $options.onConfirm && $options.onConfirm(...args)),
B: common_vendor.o((...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)),
C: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
D: $options.isShowClear
}, $options.isShowClear ? {
E: common_vendor.p({
name: "close",
size: "11",
color: "#ffffff",
customStyle: "line-height: 12px"
}),
F: common_vendor.o((...args) => $options.onClear && $options.onClear(...args))
} : {}, {
G: _ctx.suffixIcon || _ctx.$slots.suffix
}, _ctx.suffixIcon || _ctx.$slots.suffix ? {
H: common_vendor.p({
name: _ctx.suffixIcon,
size: "18",
customStyle: _ctx.suffixIconStyle
})
} : {}, {
I: common_vendor.n($options.inputClass),
J: common_vendor.s($options.wrapperStyle)
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5904192e"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-input/u-input.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"u-icon": "../u-icon/u-icon"
}
}

View File

@ -0,0 +1 @@
<view class="{{['u-input', 'data-v-5904192e', I]}}" style="{{J}}"><view class="u-input__content data-v-5904192e"><view wx:if="{{a}}" class="u-input__content__prefix-icon data-v-5904192e"><block wx:if="{{$slots.prefix}}"><slot name="prefix"></slot></block><block wx:else><u-icon wx:if="{{b}}" class="data-v-5904192e" u-i="5904192e-0" bind:__l="__l" u-p="{{b}}"></u-icon></block></view><view class="u-input__content__field-wrapper data-v-5904192e" bindtap="{{C}}"><block wx:if="{{r0}}"><input class="u-input__content__field-wrapper__field data-v-5904192e" style="{{c}}" type="{{d}}" focus="{{e}}" cursor="{{f}}" value="{{g}}" auto-blur="{{h}}" disabled="{{i}}" maxlength="{{j}}" placeholder="{{k}}" placeholder-style="{{l}}" placeholder-class="{{m}}" confirm-type="{{n}}" confirm-hold="{{o}}" hold-keyboard="{{p}}" cursor-spacing="{{q}}" adjust-position="{{r}}" selection-end="{{s}}" selection-start="{{t}}" password="{{v}}" ignoreCompositionEvent="{{w}}" bindinput="{{x}}" bindblur="{{y}}" bindfocus="{{z}}" bindconfirm="{{A}}" bindkeyboardheightchange="{{B}}"/></block></view><view wx:if="{{D}}" class="u-input__content__clear data-v-5904192e" bindtap="{{F}}"><u-icon wx:if="{{E}}" class="data-v-5904192e" u-i="5904192e-1" bind:__l="__l" u-p="{{E}}"></u-icon></view><view wx:if="{{G}}" class="u-input__content__subfix-icon data-v-5904192e"><block wx:if="{{$slots.suffix}}"><slot name="suffix"></slot></block><block wx:else><u-icon wx:if="{{H}}" class="data-v-5904192e" u-i="5904192e-2" bind:__l="__l" u-p="{{H}}"></u-icon></block></view></view></view>

View File

@ -0,0 +1,97 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-empty.data-v-5904192e,
.u-empty__wrap.data-v-5904192e,
.u-tabs.data-v-5904192e,
.u-tabs__wrapper.data-v-5904192e,
.u-tabs__wrapper__scroll-view-wrapper.data-v-5904192e,
.u-tabs__wrapper__scroll-view.data-v-5904192e,
.u-tabs__wrapper__nav.data-v-5904192e,
.u-tabs__wrapper__nav__line.data-v-5904192e {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
.u-input.data-v-5904192e {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
flex: 1;
}
.u-input--radius.data-v-5904192e, .u-input--square.data-v-5904192e {
border-radius: 4px;
}
.u-input--no-radius.data-v-5904192e {
border-radius: 0;
}
.u-input--circle.data-v-5904192e {
border-radius: 100px;
}
.u-input__content.data-v-5904192e {
flex: 1;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.u-input__content__field-wrapper.data-v-5904192e {
position: relative;
display: flex;
flex-direction: row;
margin: 0;
flex: 1;
}
.u-input__content__field-wrapper__field.data-v-5904192e {
line-height: 26px;
text-align: left;
color: #303133;
height: 24px;
font-size: 15px;
flex: 1;
}
.u-input__content__clear.data-v-5904192e {
width: 20px;
height: 20px;
border-radius: 100px;
background-color: #c6c7cb;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
transform: scale(0.82);
margin-left: 4px;
}
.u-input__content__subfix-icon.data-v-5904192e {
margin-left: 4px;
}
.u-input__content__prefix-icon.data-v-5904192e {
margin-right: 4px;
}

View File

@ -30,5 +30,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
a: common_vendor.s($options.lineStyle) a: common_vendor.s($options.lineStyle)
}; };
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-bbd9963c"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-line/u-line.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-bbd9963c"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-line/u-line.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -40,5 +40,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
d: common_vendor.s($options.addStyle(_ctx.customStyle)) d: common_vendor.s($options.addStyle(_ctx.customStyle))
}; };
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-dedad317"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-link/u-link.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-dedad317"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-link/u-link.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -70,5 +70,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
c: common_vendor.n(`u-list-item-${_ctx.anchor}`) c: common_vendor.n(`u-list-item-${_ctx.anchor}`)
}; };
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-32197ac9"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-list-item/u-list-item.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-32197ac9"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-list-item/u-list-item.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -114,5 +114,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
v: common_vendor.o((...args) => $options.refresherabort && $options.refresherabort(...args)) v: common_vendor.o((...args) => $options.refresherabort && $options.refresherabort(...args))
}; };
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9ad03670"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-list/u-list.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9ad03670"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-list/u-list.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -96,5 +96,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
t: common_vendor.n(_ctx.vertical && "u-loading-icon--vertical") t: common_vendor.n(_ctx.vertical && "u-loading-icon--vertical")
}) : {}); }) : {});
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00752c6d"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-00752c6d"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -157,5 +157,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
F: common_vendor.s($options.addStyle(_ctx.customStyle)) F: common_vendor.s($options.addStyle(_ctx.customStyle))
}); });
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ed789780"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-search/u-search.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ed789780"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-search/u-search.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -50,5 +50,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
}) })
} : {}); } : {});
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-23112adb"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-23112adb"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -159,5 +159,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
w: $options.addUnit(_ctx.radius) w: $options.addUnit(_ctx.radius)
}); });
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-eda42115"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-swiper/u-swiper.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-eda42115"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-swiper/u-swiper.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -0,0 +1,125 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-tag",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$15],
data() {
return {};
},
computed: {
style() {
const style = {};
if (this.bgColor) {
style.backgroundColor = this.bgColor;
}
if (this.color) {
style.color = this.color;
}
if (this.borderColor) {
style.borderColor = this.borderColor;
}
return style;
},
// nvue下文本颜色无法继承父元素
textColor() {
const style = {};
if (this.color) {
style.color = this.color;
}
return style;
},
imgStyle() {
const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px";
return {
width,
height: width
};
},
// 文本的样式
closeSize() {
const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12;
return size;
},
// 图标大小
iconSize() {
const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16;
return size;
},
// 图标颜色
elIconColor() {
return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff";
}
},
emits: ["click", "close"],
methods: {
testImage: common_vendor.test.image,
// 点击关闭按钮
closeHandler() {
this.$emit("close", this.name);
},
// 点击标签
clickHandler() {
this.$emit("click", this.name);
}
}
};
if (!Array) {
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
const _easycom_u_transition2 = common_vendor.resolveComponent("u-transition");
(_easycom_u_icon2 + _easycom_u_transition2)();
}
const _easycom_u_icon = () => "../u-icon/u-icon.js";
const _easycom_u_transition = () => "../u-transition/u-transition.js";
if (!Math) {
(_easycom_u_icon + _easycom_u_transition)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: _ctx.icon
}, _ctx.icon ? common_vendor.e({
b: $options.testImage(_ctx.icon)
}, $options.testImage(_ctx.icon) ? {
c: _ctx.icon,
d: common_vendor.s($options.imgStyle)
} : {
e: common_vendor.p({
color: $options.elIconColor,
name: _ctx.icon,
size: $options.iconSize
})
}) : {}, {
f: common_vendor.t(_ctx.text),
g: common_vendor.s($options.textColor),
h: common_vendor.n(`u-tag__text--${_ctx.type}`),
i: common_vendor.n(_ctx.plain && `u-tag__text--${_ctx.type}--plain`),
j: common_vendor.n(`u-tag__text--${_ctx.size}`),
k: common_vendor.n(`u-tag--${_ctx.shape}`),
l: common_vendor.n(!_ctx.plain && `u-tag--${_ctx.type}`),
m: common_vendor.n(_ctx.plain && `u-tag--${_ctx.type}--plain`),
n: common_vendor.n(`u-tag--${_ctx.size}`),
o: common_vendor.n(_ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`),
p: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)),
q: common_vendor.s({
marginRight: _ctx.closable ? "10px" : 0,
marginTop: _ctx.closable ? "10px" : 0
}),
r: common_vendor.s($options.style),
s: _ctx.closable
}, _ctx.closable ? {
t: common_vendor.p({
name: "close",
size: $options.closeSize,
color: "#ffffff"
}),
v: common_vendor.n(`u-tag__close--${_ctx.size}`),
w: common_vendor.o((...args) => $options.closeHandler && $options.closeHandler(...args)),
x: _ctx.closeColor
} : {}, {
y: common_vendor.p({
mode: "fade",
show: _ctx.show
})
});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-23de980f"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-tag/u-tag.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"u-icon": "../u-icon/u-icon",
"u-transition": "../u-transition/u-transition"
}
}

View File

@ -0,0 +1 @@
<u-transition wx:if="{{y}}" class="data-v-23de980f" u-s="{{['d']}}" style="display:inline-flex" u-i="23de980f-0" bind:__l="__l" u-p="{{y}}"><view class="u-tag-wrapper cursor-pointer data-v-23de980f"><view class="{{['u-tag', 'data-v-23de980f', k, l, m, n, o]}}" catchtap="{{p}}" style="{{q + ';' + r}}"><block wx:if="{{$slots.icon}}"><slot name="icon"></slot></block><block wx:else><view wx:if="{{a}}" class="u-tag__icon data-v-23de980f"><image wx:if="{{b}}" class="data-v-23de980f" src="{{c}}" style="{{d}}"></image><u-icon wx:else class="data-v-23de980f" u-i="23de980f-1,23de980f-0" bind:__l="__l" u-p="{{e||''}}"></u-icon></view></block><text style="{{g}}" class="{{['u-tag__text', 'data-v-23de980f', h, i, j]}}">{{f}}</text></view><view wx:if="{{s}}" class="{{['u-tag__close', 'data-v-23de980f', v]}}" catchtap="{{w}}" style="{{'background-color:' + x}}"><u-icon wx:if="{{t}}" class="data-v-23de980f" u-i="23de980f-2,23de980f-0" bind:__l="__l" u-p="{{t}}"></u-icon></view></view></u-transition>

View File

@ -0,0 +1,201 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-empty.data-v-23de980f,
.u-empty__wrap.data-v-23de980f,
.u-tabs.data-v-23de980f,
.u-tabs__wrapper.data-v-23de980f,
.u-tabs__wrapper__scroll-view-wrapper.data-v-23de980f,
.u-tabs__wrapper__scroll-view.data-v-23de980f,
.u-tabs__wrapper__nav.data-v-23de980f,
.u-tabs__wrapper__nav__line.data-v-23de980f {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
.u-tag-wrapper.data-v-23de980f {
position: relative;
}
.u-tag.data-v-23de980f {
display: flex;
flex-direction: row;
align-items: center;
border-style: solid;
}
.u-tag--circle.data-v-23de980f {
border-radius: 100px;
}
.u-tag--square.data-v-23de980f {
border-radius: 3px;
}
.u-tag__icon.data-v-23de980f {
margin-right: 4px;
}
.u-tag__text--mini.data-v-23de980f {
font-size: 12px;
line-height: 12px;
}
.u-tag__text--medium.data-v-23de980f {
font-size: 13px;
line-height: 13px;
}
.u-tag__text--large.data-v-23de980f {
font-size: 15px;
line-height: 15px;
}
.u-tag--mini.data-v-23de980f {
height: 22px;
line-height: 22px;
padding: 0 5px;
}
.u-tag--medium.data-v-23de980f {
height: 26px;
line-height: 22px;
padding: 0 10px;
}
.u-tag--large.data-v-23de980f {
height: 32px;
line-height: 32px;
padding: 0 15px;
}
.u-tag--primary.data-v-23de980f {
background-color: #3c9cff;
border-width: 1px;
border-color: #3c9cff;
}
.u-tag--primary--plain.data-v-23de980f {
border-width: 1px;
border-color: #3c9cff;
}
.u-tag--primary--plain--fill.data-v-23de980f {
background-color: #ecf5ff;
}
.u-tag__text--primary.data-v-23de980f {
color: #FFFFFF;
}
.u-tag__text--primary--plain.data-v-23de980f {
color: #3c9cff;
}
.u-tag--error.data-v-23de980f {
background-color: #f56c6c;
border-width: 1px;
border-color: #f56c6c;
}
.u-tag--error--plain.data-v-23de980f {
border-width: 1px;
border-color: #f56c6c;
}
.u-tag--error--plain--fill.data-v-23de980f {
background-color: #fef0f0;
}
.u-tag__text--error.data-v-23de980f {
color: #FFFFFF;
}
.u-tag__text--error--plain.data-v-23de980f {
color: #f56c6c;
}
.u-tag--warning.data-v-23de980f {
background-color: #f9ae3d;
border-width: 1px;
border-color: #f9ae3d;
}
.u-tag--warning--plain.data-v-23de980f {
border-width: 1px;
border-color: #f9ae3d;
}
.u-tag--warning--plain--fill.data-v-23de980f {
background-color: #fdf6ec;
}
.u-tag__text--warning.data-v-23de980f {
color: #FFFFFF;
}
.u-tag__text--warning--plain.data-v-23de980f {
color: #f9ae3d;
}
.u-tag--success.data-v-23de980f {
background-color: #5ac725;
border-width: 1px;
border-color: #5ac725;
}
.u-tag--success--plain.data-v-23de980f {
border-width: 1px;
border-color: #5ac725;
}
.u-tag--success--plain--fill.data-v-23de980f {
background-color: #f5fff0;
}
.u-tag__text--success.data-v-23de980f {
color: #FFFFFF;
}
.u-tag__text--success--plain.data-v-23de980f {
color: #5ac725;
}
.u-tag--info.data-v-23de980f {
background-color: #909399;
border-width: 1px;
border-color: #909399;
}
.u-tag--info--plain.data-v-23de980f {
border-width: 1px;
border-color: #909399;
}
.u-tag--info--plain--fill.data-v-23de980f {
background-color: #f4f4f5;
}
.u-tag__text--info.data-v-23de980f {
color: #FFFFFF;
}
.u-tag__text--info--plain.data-v-23de980f {
color: #909399;
}
.u-tag__close.data-v-23de980f {
position: absolute;
z-index: 999;
top: 10px;
right: 10px;
border-radius: 100px;
background-color: #C6C7CB;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
transform: scale(0.6) translate(80%, -80%);
}
.u-tag__close--mini.data-v-23de980f {
width: 18px;
height: 18px;
}
.u-tag__close--medium.data-v-23de980f {
width: 22px;
height: 22px;
}
.u-tag__close--large.data-v-23de980f {
width: 25px;
height: 25px;
}

View File

@ -118,5 +118,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
O: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args)) O: common_vendor.o((...args) => $options.clickHandler && $options.clickHandler(...args))
}) : {}); }) : {});
} }
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5fec1d8b"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/node_modules/uview-plus/components/u-text/u-text.vue"]]); const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5fec1d8b"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-text/u-text.vue"]]);
wx.createComponent(Component); wx.createComponent(Component);

View File

@ -0,0 +1,58 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-transition",
data() {
return {
inited: false,
// 是否显示/隐藏组件
viewStyle: {},
// 组件内部的样式
status: "",
// 记录组件动画的状态
transitionEnded: false,
// 组件是否结束的标记
display: false,
// 组件是否展示
classes: ""
// 应用的类名
};
},
emits: ["click", "beforeEnter", "enter", "afterEnter", "beforeLeave", "leave", "afterLeave"],
computed: {
mergeStyle() {
const { viewStyle, customStyle } = this;
return {
transitionDuration: `${this.duration}ms`,
// display: `${this.display ? '' : 'none'}`,
transitionTimingFunction: this.timingFunction,
// 避免自定义样式影响到动画属性所以写在viewStyle前面
...common_vendor.addStyle(customStyle),
...viewStyle
};
}
},
// 将mixin挂在到组件中实际上为一个vue格式对象。
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.transition, common_vendor.props$16],
watch: {
show: {
handler(newVal) {
newVal ? this.vueEnter() : this.vueLeave();
},
// 表示同时监听初始化时的props的show的意思
immediate: true
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.inited
}, $data.inited ? {
b: common_vendor.o((...args) => _ctx.clickHandler && _ctx.clickHandler(...args)),
c: common_vendor.n($data.classes),
d: common_vendor.s($options.mergeStyle),
e: common_vendor.o((...args) => _ctx.noop && _ctx.noop(...args))
} : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0573594d"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/node_modules/uview-plus/components/u-transition/u-transition.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view wx:if="{{a}}" ref="u-transition" bindtap="{{b}}" class="{{['u-transition', 'data-v-0573594d', c]}}" style="{{d}}" bindtouchmove="{{e}}"><slot/></view>

View File

@ -0,0 +1,136 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-empty.data-v-0573594d,
.u-empty__wrap.data-v-0573594d,
.u-tabs.data-v-0573594d,
.u-tabs__wrapper.data-v-0573594d,
.u-tabs__wrapper__scroll-view-wrapper.data-v-0573594d,
.u-tabs__wrapper__scroll-view.data-v-0573594d,
.u-tabs__wrapper__nav.data-v-0573594d,
.u-tabs__wrapper__nav__line.data-v-0573594d {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
/**
* vue版本动画内置的动画模式有如下
* fade淡入
* zoom缩放
* fade-zoom缩放淡入
* fade-up上滑淡入
* fade-down下滑淡入
* fade-left左滑淡入
* fade-right右滑淡入
* slide-up上滑进入
* slide-down下滑进入
* slide-left左滑进入
* slide-right右滑进入
*/
.u-fade-enter-active.data-v-0573594d,
.u-fade-leave-active.data-v-0573594d {
transition-property: opacity;
}
.u-fade-enter.data-v-0573594d,
.u-fade-leave-to.data-v-0573594d {
opacity: 0;
}
.u-fade-zoom-enter.data-v-0573594d,
.u-fade-zoom-leave-to.data-v-0573594d {
transform: scale(0.95);
opacity: 0;
}
.u-fade-zoom-enter-active.data-v-0573594d,
.u-fade-zoom-leave-active.data-v-0573594d {
transition-property: transform, opacity;
}
.u-fade-down-enter-active.data-v-0573594d,
.u-fade-down-leave-active.data-v-0573594d,
.u-fade-left-enter-active.data-v-0573594d,
.u-fade-left-leave-active.data-v-0573594d,
.u-fade-right-enter-active.data-v-0573594d,
.u-fade-right-leave-active.data-v-0573594d,
.u-fade-up-enter-active.data-v-0573594d,
.u-fade-up-leave-active.data-v-0573594d {
transition-property: opacity, transform;
}
.u-fade-up-enter.data-v-0573594d,
.u-fade-up-leave-to.data-v-0573594d {
transform: translate3d(0, 100%, 0);
opacity: 0;
}
.u-fade-down-enter.data-v-0573594d,
.u-fade-down-leave-to.data-v-0573594d {
transform: translate3d(0, -100%, 0);
opacity: 0;
}
.u-fade-left-enter.data-v-0573594d,
.u-fade-left-leave-to.data-v-0573594d {
transform: translate3d(-100%, 0, 0);
opacity: 0;
}
.u-fade-right-enter.data-v-0573594d,
.u-fade-right-leave-to.data-v-0573594d {
transform: translate3d(100%, 0, 0);
opacity: 0;
}
.u-slide-down-enter-active.data-v-0573594d,
.u-slide-down-leave-active.data-v-0573594d,
.u-slide-left-enter-active.data-v-0573594d,
.u-slide-left-leave-active.data-v-0573594d,
.u-slide-right-enter-active.data-v-0573594d,
.u-slide-right-leave-active.data-v-0573594d,
.u-slide-up-enter-active.data-v-0573594d,
.u-slide-up-leave-active.data-v-0573594d {
transition-property: transform;
}
.u-slide-up-enter.data-v-0573594d,
.u-slide-up-leave-to.data-v-0573594d {
transform: translate3d(0, 100%, 0);
}
.u-slide-down-enter.data-v-0573594d,
.u-slide-down-leave-to.data-v-0573594d {
transform: translate3d(0, -100%, 0);
}
.u-slide-left-enter.data-v-0573594d,
.u-slide-left-leave-to.data-v-0573594d {
transform: translate3d(-100%, 0, 0);
}
.u-slide-right-enter.data-v-0573594d,
.u-slide-right-leave-to.data-v-0573594d {
transform: translate3d(100%, 0, 0);
}
.u-zoom-enter-active.data-v-0573594d,
.u-zoom-leave-active.data-v-0573594d {
transition-property: transform;
}
.u-zoom-enter.data-v-0573594d,
.u-zoom-leave-to.data-v-0573594d {
transform: scale(0.95);
}

View File

@ -0,0 +1,77 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
const _component_CommentItem = common_vendor.resolveComponent("CommentItem");
(_easycom_up_button2 + _component_CommentItem)();
}
const _easycom_up_button = () => "../../node-modules/uview-plus/components/u-button/u-button.js";
if (!Math) {
_easycom_up_button();
}
const _sfc_main = {
__name: "CommentItem",
props: {
comment: Object
},
emits: ["reply", "like", "share"],
setup(__props, { emit: __emit }) {
const props = __props;
const emit = __emit;
const toggleReplyForm = () => {
props.comment.showReplyForm = !props.comment.showReplyForm;
};
const likeComment = () => {
emit("like", props.comment.id);
};
const shareComment = () => {
emit("share", props.comment.id);
};
const handleReply = (commentId, replyText) => {
emit("reply", commentId, replyText);
};
const handleLike = (commentId) => {
emit("like", commentId);
};
const handleShare = (commentId) => {
emit("share", commentId);
};
return (_ctx, _cache) => {
return common_vendor.e({
a: __props.comment.avatar,
b: common_vendor.t(__props.comment.username),
c: common_vendor.t(__props.comment.text),
d: common_vendor.t(__props.comment.likes),
e: common_vendor.o(likeComment),
f: common_vendor.o(toggleReplyForm),
g: common_vendor.o(shareComment),
h: __props.comment.showReplyForm
}, __props.comment.showReplyForm ? {
i: _ctx.newComment,
j: common_vendor.o(($event) => _ctx.newComment = $event.detail.value),
k: common_vendor.o(_ctx.addComment),
l: common_vendor.p({
size: "large",
type: "primary",
shape: "circle",
text: "发表"
})
} : {}, {
m: common_vendor.f(__props.comment.replies, (reply, k0, i0) => {
return {
a: reply.id,
b: common_vendor.o(handleReply, reply.id),
c: common_vendor.o(handleLike, reply.id),
d: common_vendor.o(handleShare, reply.id),
e: "ed332cbd-1-" + i0,
f: common_vendor.p({
comment: reply
})
};
})
});
};
}
};
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ed332cbd"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/discuss/CommentItem.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"up-button": "../../node-modules/uview-plus/components/u-button/u-button"
}
}

View File

@ -0,0 +1 @@
<view class="comment-card data-v-ed332cbd"><view class="comment data-v-ed332cbd"><image src="{{a}}" class="avatar data-v-ed332cbd"/><view class="comment-content data-v-ed332cbd"><view class="username data-v-ed332cbd">{{b}}</view><view class="text data-v-ed332cbd">{{c}}</view><view class="actions data-v-ed332cbd"><label class="like data-v-ed332cbd" bindtap="{{e}}"><image src="https://img.icons8.com/ios-glyphs/30/000000/facebook-like.png" class="like-icon data-v-ed332cbd"/> {{d}} 赞 </label><label class="reply data-v-ed332cbd" bindtap="{{f}}">回复</label><label class="share data-v-ed332cbd" bindtap="{{g}}"><image src="https://img.icons8.com/ios-filled/30/000000/share.png" class="share-icon data-v-ed332cbd"/> 分享 </label></view><view wx:if="{{h}}" class="reply-form data-v-ed332cbd"><input placeholder="发表评论" class="comment-input data-v-ed332cbd" value="{{i}}" bindinput="{{j}}"/><view class=" data-v-ed332cbd" style="display:flex;align-items:center;width:200rpx"><up-button wx:if="{{l}}" class="data-v-ed332cbd" bindclick="{{k}}" u-i="ed332cbd-0" bind:__l="__l" u-p="{{l}}"></up-button></view></view><view class="replies data-v-ed332cbd"><comment-item wx:for="{{m}}" wx:for-item="reply" wx:key="a" class="data-v-ed332cbd" bindreply="{{reply.b}}" bindlike="{{reply.c}}" bindshare="{{reply.d}}" u-i="{{reply.e}}" bind:__l="__l" u-p="{{reply.f}}"/></view></view></view></view>

View File

@ -0,0 +1,82 @@
.comment-card.data-v-ed332cbd {
background-color: #fff;
padding: 15px;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin-bottom: 15px;
display: flex;
flex-direction: column;
}
.comment.data-v-ed332cbd {
display: flex;
flex-direction: row;
}
.avatar.data-v-ed332cbd {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 10px;
}
.comment-content.data-v-ed332cbd {
flex: 1;
}
.username.data-v-ed332cbd {
font-weight: bold;
color: #007aff;
margin-bottom: 5px;
}
.text.data-v-ed332cbd {
color: #333;
}
.actions.data-v-ed332cbd {
margin-top: 10px;
}
.like.data-v-ed332cbd,
.reply.data-v-ed332cbd,
.share.data-v-ed332cbd {
color: #007aff;
cursor: pointer;
margin-right: 15px;
}
.like.data-v-ed332cbd:hover,
.reply.data-v-ed332cbd:hover,
.share.data-v-ed332cbd:hover {
text-decoration: underline;
}
.like-icon.data-v-ed332cbd,
.share-icon.data-v-ed332cbd {
width: 16px;
height: 16px;
margin-right: 5px;
vertical-align: middle;
}
.reply-form.data-v-ed332cbd {
display: flex;
margin-top: 10px;
}
.reply-input.data-v-ed332cbd {
flex-grow: 1;
margin-right: 10px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 14px;
}
.reply-button.data-v-ed332cbd {
padding: 10px 20px;
background-color: #007aff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 14px;
}
.reply-button.data-v-ed332cbd:hover {
background-color: #005bb5;
}
.replies.data-v-ed332cbd {
margin-top: 10px;
padding-left: 20px;
border-left: 2px solid #f0f0f0;
}

View File

@ -1,5 +1,14 @@
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
if (!Array) {
const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
_easycom_up_button2();
}
const _easycom_up_button = () => "../../node-modules/uview-plus/components/u-button/u-button.js";
if (!Math) {
(CommentItem + _easycom_up_button)();
}
const CommentItem = () => "./CommentItem.js";
const _sfc_main = { const _sfc_main = {
__name: "discuss", __name: "discuss",
setup(__props) { setup(__props) {
@ -8,8 +17,8 @@ const _sfc_main = {
content: "这是帖子的内容,大家可以在评论区讨论。" content: "这是帖子的内容,大家可以在评论区讨论。"
}); });
const comments = common_vendor.ref([ const comments = common_vendor.ref([
{ id: 1, username: "Alice", text: "非常好的帖子!" }, { id: 1, username: "Alice", avatar: "https://via.placeholder.com/50", text: "非常好的帖子!", replies: [], showReplyForm: false, replyText: "" },
{ id: 2, username: "Bob", text: "同意楼上的观点!" } { id: 2, username: "Bob", avatar: "https://via.placeholder.com/50", text: "同意楼上的观点!", replies: [], showReplyForm: false, replyText: "" }
]); ]);
const newComment = common_vendor.ref(""); const newComment = common_vendor.ref("");
const addComment = () => { const addComment = () => {
@ -17,27 +26,67 @@ const _sfc_main = {
comments.value.push({ comments.value.push({
id: newId, id: newId,
username: "匿名用户", username: "匿名用户",
text: this.newComment avatar: "https://via.placeholder.com/50",
text: newComment.value,
replies: [],
showReplyForm: false,
replyText: ""
}); });
newComment.value = ""; newComment.value = "";
}; };
const handleReply = (commentId, replyText) => {
const comment = findCommentById(comments.value, commentId);
if (comment) {
const newReplyId = comment.replies.length + 1;
comment.replies.push({
id: newReplyId,
username: "匿名用户",
avatar: "https://via.placeholder.com/50",
text: replyText,
replies: [],
showReplyForm: false,
replyText: ""
});
}
};
const findCommentById = (comments2, id) => {
for (const comment of comments2) {
if (comment.id === id) {
return comment;
}
const reply = findCommentById(comment.replies, id);
if (reply) {
return reply;
}
}
return null;
};
return (_ctx, _cache) => { return (_ctx, _cache) => {
return { return {
a: common_vendor.t(post.value.title), a: common_vendor.t(post.value.title),
b: common_vendor.t(post.value.content), b: common_vendor.t(post.value.content),
c: common_vendor.f(comments.value, (comment, k0, i0) => { c: common_vendor.f(comments.value, (comment, k0, i0) => {
return { return {
a: common_vendor.t(comment.username), a: comment.id,
b: common_vendor.t(comment.text), b: common_vendor.o(handleReply, comment.id),
c: comment.id c: "9635802b-0-" + i0,
d: common_vendor.p({
comment
})
}; };
}), }),
d: newComment.value, d: newComment.value,
e: common_vendor.o(($event) => newComment.value = $event.detail.value), e: common_vendor.o(($event) => newComment.value = $event.detail.value),
f: common_vendor.o(addComment) f: common_vendor.o(addComment),
g: common_vendor.p({
size: "large",
type: "primary",
shape: "circle",
text: "发表"
})
}; };
}; };
} }
}; };
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9635802b"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/pages/discuss/discuss.vue"]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9635802b"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/discuss/discuss.vue"]]);
wx.createPage(MiniProgramPage); wx.createPage(MiniProgramPage);

View File

@ -1,5 +1,8 @@
{ {
"navigationBarTitleText": "评论", "navigationBarTitleText": "评论",
"navigationStyle": "default", "navigationStyle": "default",
"usingComponents": {} "usingComponents": {
"up-button": "../../node-modules/uview-plus/components/u-button/u-button",
"comment-item": "./CommentItem"
}
} }

View File

@ -1 +1 @@
<view class="container data-v-9635802b"><view class="header data-v-9635802b">{{a}}</view><view class="content data-v-9635802b">{{b}}</view><view class="comments data-v-9635802b"><view wx:for="{{c}}" wx:for-item="comment" wx:key="c" class="comment data-v-9635802b"><view class="username data-v-9635802b">{{comment.a}}</view><view class="text data-v-9635802b">{{comment.b}}</view></view></view><view class="add-comment data-v-9635802b"><input class="data-v-9635802b" placeholder="发表评论" value="{{d}}" bindinput="{{e}}"/><button class="data-v-9635802b" bindtap="{{f}}">发表</button></view></view> <view class="container data-v-9635802b"><view class="header data-v-9635802b">{{a}}</view><view class="content data-v-9635802b">{{b}}</view><view class="comments data-v-9635802b"><comment-item wx:for="{{c}}" wx:for-item="comment" wx:key="a" class="data-v-9635802b" bindreply="{{comment.b}}" u-i="{{comment.c}}" bind:__l="__l" u-p="{{comment.d}}"/></view><view class="add-comment data-v-9635802b"><input placeholder="发表评论" class="comment-input data-v-9635802b" value="{{d}}" bindinput="{{e}}"/><view class=" data-v-9635802b" style="display:flex;align-items:center;width:200rpx"><up-button wx:if="{{g}}" class="data-v-9635802b" bindclick="{{f}}" u-i="9635802b-1" bind:__l="__l" u-p="{{g}}"></up-button></view></view></view>

View File

@ -1,46 +1,58 @@
/* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); */
.container.data-v-9635802b { .container.data-v-9635802b {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-top: 20px; margin-top: 20px;
padding: 20px;
font-family: 'Roboto', sans-serif;
background-color: #f9f9f9;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
.header.data-v-9635802b { .header.data-v-9635802b {
font-size: 24px; font-size: 28px;
font-weight: bold; font-weight: bold;
color: #333;
text-align: center;
margin-bottom: 20px;
border-bottom: 2px solid #007aff;
padding-bottom: 10px;
} }
.content.data-v-9635802b { .content.data-v-9635802b {
margin-top: 20px; margin-top: 20px;
line-height: 1.5; line-height: 1.6;
color: #666;
} }
.comments.data-v-9635802b { .comments.data-v-9635802b {
margin-top: 20px; margin-top: 20px;
width: 100%; width: 100%;
} }
.comment.data-v-9635802b {
display: flex;
flex-direction: column;
margin-bottom: 10px;
}
.username.data-v-9635802b {
font-weight: bold;
}
.add-comment.data-v-9635802b { .add-comment.data-v-9635802b {
margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
width: 100%;
align-items: center;
} }
input.data-v-9635802b { .comment-input.data-v-9635802b {
flex-grow: 1; flex-grow: 1;
margin-right: 10px; margin-right: 10px;
padding: 10px; padding: 10px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 5px; border-radius: 5px;
font-size: 14px;
} }
button.data-v-9635802b { .comment-button.data-v-9635802b {
padding: 10px; padding: 10px 20px;
background-color: #007aff; background-color: #007aff;
color: #fff; color: #fff;
border: none; border: none;
border-radius: 5px; border-radius: 5px;
cursor: pointer; cursor: pointer;
font-size: 14px;
}
.comment-button.data-v-9635802b:hover {
background-color: #005bb5;
} }

View File

@ -74,7 +74,7 @@ const _sfc_main = {
b: common_vendor.t(baseListItem.title), b: common_vendor.t(baseListItem.title),
c: baseListIndex, c: baseListIndex,
d: common_vendor.o(($event) => NavicatToBaseItems(baseListItem), baseListIndex), d: common_vendor.o(($event) => NavicatToBaseItems(baseListItem), baseListIndex),
e: "6b80012b-3-" + i0 + ",6b80012b-2" e: "5cad4243-3-" + i0 + ",5cad4243-2"
}; };
}), }),
e: common_vendor.p({ e: common_vendor.p({
@ -88,7 +88,7 @@ const _sfc_main = {
}), }),
g: common_vendor.f(newsList, (i, k0, i0) => { g: common_vendor.f(newsList, (i, k0, i0) => {
return { return {
a: "6b80012b-5-" + i0, a: "5cad4243-5-" + i0,
b: common_vendor.p({ b: common_vendor.p({
info: i info: i
}) })
@ -98,5 +98,5 @@ const _sfc_main = {
}; };
} }
}; };
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/pages/index/index.vue"]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage); wx.createPage(MiniProgramPage);

View File

@ -1 +1 @@
<view class="content"><view class="nav"><view class="tit-box"> 学习平台 </view><view class="search-box" style="width:80%;margin:0 auto"><up-search wx:if="{{b}}" class="search" u-i="6b80012b-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-search></view></view><view class="hand"><up-swiper wx:if="{{c}}" u-i="6b80012b-1" bind:__l="__l" u-p="{{c}}"></up-swiper></view><view class="seton"><up-grid wx:if="{{e}}" u-s="{{['d']}}" u-i="6b80012b-2" bind:__l="__l" u-p="{{e}}"><up-grid-item wx:for="{{d}}" wx:for-item="baseListItem" wx:key="c" u-s="{{['d']}}" bindclick="{{baseListItem.d}}" u-i="{{baseListItem.e}}" bind:__l="__l"><image src="{{baseListItem.a}}" style="width:60rpx" mode="widthFix"></image><text class="grid-text" style="margin:10rpx">{{baseListItem.b}}</text></up-grid-item></up-grid></view><view class="newlist"><up-text wx:if="{{f}}" u-i="6b80012b-4" bind:__l="__l" u-p="{{f}}"></up-text><view class=""><news-card wx:for="{{g}}" wx:for-item="i" u-i="{{i.a}}" bind:__l="__l" u-p="{{i.b}}"></news-card></view></view></view> <view class="content"><view class="nav"><view class="tit-box"> 学习平台 </view><view class="search-box" style="width:80%;margin:0 auto"><up-search wx:if="{{b}}" class="search" u-i="5cad4243-0" bind:__l="__l" bindupdateModelValue="{{a}}" u-p="{{b}}"></up-search></view></view><view class="hand"><up-swiper wx:if="{{c}}" u-i="5cad4243-1" bind:__l="__l" u-p="{{c}}"></up-swiper></view><view class="seton"><up-grid wx:if="{{e}}" u-s="{{['d']}}" u-i="5cad4243-2" bind:__l="__l" u-p="{{e}}"><up-grid-item wx:for="{{d}}" wx:for-item="baseListItem" wx:key="c" u-s="{{['d']}}" bindclick="{{baseListItem.d}}" u-i="{{baseListItem.e}}" bind:__l="__l"><image src="{{baseListItem.a}}" style="width:60rpx" mode="widthFix"></image><text class="grid-text" style="margin:10rpx">{{baseListItem.b}}</text></up-grid-item></up-grid></view><view class="newlist"><up-text wx:if="{{f}}" u-i="5cad4243-4" bind:__l="__l" u-p="{{f}}"></up-text><view class=""><news-card wx:for="{{g}}" wx:for-item="i" u-i="{{i.a}}" bind:__l="__l" u-p="{{i.b}}"></news-card></view></view></view>

View File

@ -3,13 +3,64 @@ const common_vendor = require("../../common/vendor.js");
const _sfc_main = { const _sfc_main = {
data() { data() {
return { return {
// 数据部分可以根据实际需求添加,比如用户积分、可用积分等 nowTime: "",
baseUrl,
scocre: null,
rankList: []
}; };
} },
// 方法部分可以根据需要添加,比如用户积分可用于兑换商品等 onLoad() {
this.getTime();
this.getRanking();
},
methods: {
async getRanking() {
const resp = await getUserIntegral();
console.log(resp);
this.rankList = resp.data;
this.rankList.forEach((e) => {
this.scocre += e.integral;
});
},
getTime: function() {
var date = /* @__PURE__ */ new Date(), year = date.getFullYear(), month = date.getMonth() + 1, day = date.getDate(), hour = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
month >= 1 && month <= 9 ? month = "0" + month : "";
day >= 0 && day <= 9 ? day = "0" + day : "";
var timer = year + "-" + month + "-" + day + " " + hour + ":00";
this.nowTime = timer;
console.log(this.nowTime);
}
},
filters: {}
}; };
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {}; return common_vendor.e({
a: $data.rankList[1].user.avatar ? $data.baseUrl + $data.rankList[1].user.avatar : "/static/hands.png",
b: common_vendor.t($data.rankList[1].user.nickName),
c: common_vendor.t($data.rankList[1].integral),
d: $data.rankList[0].user.avatar ? $data.baseUrl + $data.rankList[0].user.avatar : "/static/hands.png",
e: common_vendor.t($data.rankList[0].user.nickName),
f: common_vendor.t($data.rankList[0].integral),
g: $data.rankList[2].user.avatar ? $data.baseUrl + $data.rankList[2].user.avatar : "/static/hands.png",
h: common_vendor.t($data.rankList[1].user.nickName),
i: common_vendor.t($data.rankList[1].integral),
j: common_vendor.t($data.nowTime),
k: common_vendor.t(new Number($data.scocre / $data.rankList.length).toFixed(2)),
l: _ctx.index < 100
}, _ctx.index < 100 ? {
m: common_vendor.f($data.rankList, (item, index, i0) => {
return {
a: common_vendor.t(index + 4),
b: item.user.avatar ? $data.baseUrl + item.user.avatar : "/static/hands.png",
c: common_vendor.t(item.user.nickName),
d: common_vendor.t(item.post),
e: common_vendor.t(item.integral),
f: index
};
})
} : {});
} }
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e7fd672d"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/pages/intergral/intergral.vue"]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/intergral/intergral.vue"]]);
wx.createPage(MiniProgramPage); wx.createPage(MiniProgramPage);

View File

@ -1 +1 @@
<view class="container data-v-e7fd672d"><view class="score-title data-v-e7fd672d">积分</view><view class="score-content data-v-e7fd672d"><view class="score-item data-v-e7fd672d"><text class="score-label data-v-e7fd672d">我的积分:</text><text class="score-value data-v-e7fd672d">1234</text></view><view class="score-item data-v-e7fd672d"><text class="score-label data-v-e7fd672d">可用积分:</text><text class="score-value data-v-e7fd672d">100</text></view><view class="score-item data-v-e7fd672d"><text class="score-label data-v-e7fd672d">积分使用规则:</text></view></view></view> <view><view class="contaier" style="background-color:#FFFFFF"><view class="top_bg"><view class="one_box"><view class="top3"><view class="num_two"><image class="huangguan2" src="/static/rank/two.png"></image><image class="top3_head" src="{{a}}"></image><view class="top_name">{{b}}</view><view class="top_sy">{{c}}<label>分</label></view></view></view><view class="top3"><view class="num_one"><image class="huangguan1" src="/static/rank/one.png"></image><image class="top3_head" src="{{d}}"></image><view class="top_name text-bold" style="font-size:30rpx">{{e}}</view><view class="top_sy">{{f}}<label>分</label></view></view></view><view class="top3"><view class="num_three"><image class="huangguan2" src="/static/rank/three.png"></image><image class="top3_head" src="{{g}}"></image><view class="top_name">{{h}}</view><view class="top_sy">{{i}}分</view></view></view></view><view class="number_sy_box"><view class="number_sy_box_title"><text>分数·统计</text><text style="position:absolute;right:20rpx;z-index:9999;font-size:24rpx;color:#c3c3c3"> 截止:{{j}}</text></view><view class="number_sy_main"><view style="width:50%;text-align:center;border-right:1px solid #eee"><view class="number_num1">{{k}}分</view><view class="danwei">平均积分</view></view><image mode="widthFix" class="xiaoding_bg" src="/static/rank/Intersect.png"></image></view></view></view><view class="rankList_box"><block wx:if="{{l}}"><view wx:for="{{m}}" wx:for-item="item" wx:key="f" class="rankItem"><view class="rankIndex"><text>{{item.a}}</text></view><view class="HeardBox"><image class="rankHeard" src="{{item.b}}"></image></view><view class="NameBox"><view class="userName text-bold">{{item.c}}</view><view class="userPost text-gray">{{item.d}}</view><view class="color_ccc"><text class="text-blue">{{item.e}}</text>分</view></view><view class="download_box"><image mode="widthFix" src="/static/rank/download.png"></image></view></view></block></view></view></view>

View File

@ -1,24 +1,233 @@
/**
.container.data-v-e7fd672d { * 这里是uni-app内置的常用样式变量
padding: 20px; *
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.top_bg {
width: 750rpx;
height: 650rpx;
background: url(http://cdn.zhoukaiwen.com/rank_bg.png) no-repeat;
background-size: 750rpx;
position: relative;
} }
.score-title.data-v-e7fd672d { .one_box {
font-size: 18px; width: 750rpx;
font-weight: bold; height: 260rpx;
margin-bottom: 20px; position: absolute;
} left: 0;
.score-item.data-v-e7fd672d { bottom: 110rpx;
display: flex; display: flex;
align-items: center; justify-content: space-around;
margin-bottom: 10px;
} }
.score-label.data-v-e7fd672d { .one_box .top3 {
flex: 1; width: 210rpx;
text-align: right; height: 280rpx;
} }
.score-value.data-v-e7fd672d { .top_name {
flex: 1; width: 100%;
text-align: left; height: 55rpx;
font-weight: bold; line-height: 60rpx;
color: #5677fc; color: #f2f2f2;
font-size: 26rpx;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.top_sy {
width: 100%;
height: 40rpx;
line-height: 40rpx;
font-size: 24rpx;
color: rgba(255, 255, 255, 0.7);
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.top_sy span {
font-size: 20rpx !important;
}
.num_one {
position: relative;
}
.huangguan1 {
width: 60px;
height: 60px;
position: absolute;
right: -10rpx;
top: -36rpx;
}
.num_one .top3_head {
width: 150rpx;
height: 150rpx;
border-radius: 100%;
margin: 15rpx 0 0 30rpx;
border: 4rpx solid #ffdd3c;
}
.num_two {
position: relative;
}
.huangguan2 {
width: 100rpx;
height: 100rpx;
position: absolute;
right: 15rpx;
}
.num_two .top3_head {
width: 120rpx;
height: 120rpx;
border-radius: 100%;
margin: 45rpx 0 0 45rpx;
border: 4rpx solid #bcdcdf;
}
.num_three {
position: relative;
}
.huangguan2 {
width: 100rpx;
height: 100rpx;
position: absolute;
right: 15rpx;
}
.num_three .top3_head {
width: 120rpx;
height: 120rpx;
border-radius: 100%;
margin: 45rpx 0 0 45rpx;
border: 4rpx solid #e29d85;
}
.number_sy_box {
width: 700rpx;
height: 210rpx;
background-color: #FFFFFF;
position: absolute;
left: 25rpx;
border-radius: 20rpx;
bottom: -115rpx;
z-index: 999;
padding: 22rpx;
box-shadow: 3px 3px 15px 3px rgba(0, 0, 0, 0.1);
}
.number_sy_box_title {
color: #888888;
font-size: 28rpx;
display: flex;
z-index: 9999;
justify-content: space-between;
}
.number_sy_main {
width: 100%;
height: 124rpx;
padding-top: 20rpx;
line-height: 52rpx;
display: flex;
justify-content: space-around;
position: relative;
}
.xiaoding_bg {
position: absolute;
right: -22rpx;
bottom: -30rpx;
width: 180rpx;
}
.number_num1 {
font-size: 40rpx;
font-weight: 500;
color: #2fc04f;
}
.number_num2 {
font-size: 40rpx;
font-weight: 500;
color: #4bac7f;
}
.danwei {
height: 60rpx;
line-height: 60rpx;
font-size: 26rpx;
color: #c9c9c9;
}
.rankList_box {
width: 750rpx;
min-height: 200rpx;
margin-top: 130rpx;
}
.rankItem:last-child {
border: none;
}
.rankItem {
width: 700rpx;
height: 140rpx;
margin: 0px auto;
border-bottom: 1px solid #e9e9e9;
}
.rankIndex {
width: 60rpx;
height: 140rpx;
line-height: 140rpx;
text-align: center;
color: #CCCCCC;
font-size: 40rpx;
float: left;
}
.HeardBox {
width: 100rpx;
height: 100rpx;
margin: 20rpx;
border-radius: 100%;
overflow: hidden;
float: left;
margin-right: 25rpx;
margin-left: 10rpx !important;
}
.HeardBox image {
width: 100%;
height: 100%;
}
.NameBox {
width: 400rpx;
height: 140rpx;
float: left;
padding-top: 10rpx;
box-sizing: border-box;
}
.NameBox view {
height: 50rpx;
line-height: 70rpx;
}
.userName {
min-width: 90rpx;
font-size: 30rpx;
float: left;
margin-right: 20rpx;
}
.download_box {
width: 80rpx;
height: 140rpx;
float: right;
}
.download_box image {
width: 45rpx;
margin: 50rpx auto;
display: block;
}

View File

@ -17,7 +17,7 @@ const _sfc_main = {
return { return {
a: common_vendor.f(newsList, (i, k0, i0) => { a: common_vendor.f(newsList, (i, k0, i0) => {
return { return {
a: "5399d236-0-" + i0, a: "2b6dbdfd-0-" + i0,
b: common_vendor.p({ b: common_vendor.p({
info: i info: i
}) })
@ -27,5 +27,5 @@ const _sfc_main = {
}; };
} }
}; };
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/pages/news/news.vue"]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/news/news.vue"]]);
wx.createPage(MiniProgramPage); wx.createPage(MiniProgramPage);

View File

@ -2,6 +2,7 @@
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const comm_api = require("../../comm/api.js"); const comm_api = require("../../comm/api.js");
const utils_Auth = require("../../utils/Auth.js"); const utils_Auth = require("../../utils/Auth.js");
require("../../utils/http.js");
if (!Array) { if (!Array) {
const _easycom_up_button2 = common_vendor.resolveComponent("up-button"); const _easycom_up_button2 = common_vendor.resolveComponent("up-button");
_easycom_up_button2(); _easycom_up_button2();
@ -57,5 +58,5 @@ const _sfc_main = {
}; };
} }
}; };
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/pages/user/login.vue"]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/user/login.vue"]]);
wx.createPage(MiniProgramPage); wx.createPage(MiniProgramPage);

View File

@ -1 +1 @@
<view class="main"><view class="" style="width:80%;margin:0 auto"><up-button wx:if="{{b}}" bindclick="{{a}}" u-i="d9879682-0" bind:__l="__l" u-p="{{b}}"></up-button></view></view> <view class="main"><view class="" style="width:80%;margin:0 auto"><up-button wx:if="{{b}}" bindclick="{{a}}" u-i="35531eb2-0" bind:__l="__l" u-p="{{b}}"></up-button></view></view>

View File

@ -2,6 +2,7 @@
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const utils_Auth = require("../../utils/Auth.js"); const utils_Auth = require("../../utils/Auth.js");
const comm_api = require("../../comm/api.js"); const comm_api = require("../../comm/api.js");
require("../../utils/http.js");
if (!Array) { if (!Array) {
const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar"); const _easycom_up_avatar2 = common_vendor.resolveComponent("up-avatar");
const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell"); const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell");
@ -82,5 +83,5 @@ const _sfc_main = {
}; };
} }
}; };
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0f7520f0"], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/pages/user/user.vue"]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-0f7520f0"], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/user/user.vue"]]);
wx.createPage(MiniProgramPage); wx.createPage(MiniProgramPage);

View File

@ -1,119 +1,106 @@
"use strict"; "use strict";
const common_vendor = require("../../common/vendor.js"); const common_vendor = require("../../common/vendor.js");
const cardVideo = () => "../../components/cardVideo.js";
const potoInfo = () => "../../components/photosInfo.js";
const _sfc_main = { const _sfc_main = {
components: {
cardVideo,
potoInfo
},
data() { data() {
return { return {
screenHeight: 0, status: "loadmore",
statusBarHeight: 0, list: [{
navBarHeight: 0, name: "视频"
originList: [], }, {
// 源数据 name: "图片"
displaySwiperList: [], }],
// swiper需要的数据 current: 0,
displayIndex: 0, imageList: [],
// 用于显示swiper的真正的下标数值只有012。 swpper: {
originIndex: 0, index: 0
// 记录源数据的下标 },
changeIndex: 0, page: {
//控制video是否渲染 pageNum: 1,
page: 0, pageSize: 10,
// 视频分页 total: 0
num: 0, },
flag: true videoList: [{
src: "",
avatar: "dsfs",
username: "sdsd",
titleName: "asdsdas",
tagName: "sdasd"
}],
videoContext: null
}; };
}, },
onLoad() { onLoad() {
common_vendor.wx$1.getSystemInfo({
success: (res) => {
this.screenHeight = res.screenHeight;
this.statusBarHeight = res.statusBarHeight;
if (res.system.substring(0, 3) == "iOS") {
this.navBarHeight = 42;
} else {
this.navBarHeight = 40;
}
}
});
this.getPageID();
}, },
methods: { methods: {
/* 生成随机的 pageID */ getVideo(e) {
getPageID() { console.log(e);
let pageID = parseInt(Math.random() * (0 - 100 + 1) + 100); if (this.videoContext) {
this.getVideoList(pageID); console.log("test");
this.videoContext.pause();
}
this.videoContext = e.videoContext;
}, },
/* 获取视频数据 */ ISstatusInit() {
getVideoList(pageID) { switch (this.swpper.index) {
common_vendor.index.request({ case 0: {
url: "https://api.apiopen.top/api/getMiniVideo?page=" + pageID + "&size=10&pageSize=10", this.getVideoList();
// 请求数据接口 break;
data: {},
success: (res) => {
if (res.data.code == 200) {
res.data.result.list.forEach((item) => {
let obj = {};
obj.src = item.playurl;
obj.title = item.title;
this.originList.push(obj);
});
}
if (this.flag) {
this.flag = false;
this.initSwiperData(0);
}
} }
}); case 1: {
}, this.getImageList();
changed(event) {
let {
current
} = event.detail;
let originListLength = this.originList.length;
this.changeIndex = current;
if (this.displayIndex - current == 2 || this.displayIndex - current == -1) {
this.originIndex = this.originIndex + 1 == originListLength ? 0 : this.originIndex + 1;
this.displayIndex = this.displayIndex + 1 == 3 ? 0 : this.displayIndex + 1;
this.initSwiperData(this.originIndex);
this.num++;
console.log("num", this.num, this.originList.length);
if (this.num + 5 >= this.originList.length) {
this.getPageID();
}
} else if (this.displayIndex - current == -2 || this.displayIndex - current == 1) {
this.originIndex = this.originIndex - 1 == -1 ? originListLength - 1 : this.originIndex - 1;
this.displayIndex = this.displayIndex - 1 == -1 ? 2 : this.displayIndex - 1;
this.initSwiperData(this.originIndex);
if (this.num > 0) {
this.num--;
} }
} }
}, },
initSwiperData(originIndex = this.originIndex) { onReachLoad() {
let originListLength = this.originList.length; this.status = "loading";
let displayList = []; this.page.pageSize += 10;
displayList[this.displayIndex] = this.originList[originIndex]; this.ISstatusInit();
displayList[this.displayIndex - 1 == -1 ? 2 : this.displayIndex - 1] = this.originList[originIndex - 1 == -1 ? originListLength - 1 : originIndex - 1]; console.log(this.swpper.index);
displayList[this.displayIndex + 1 == 3 ? 0 : this.displayIndex + 1] = this.originList[originIndex + 1 == originListLength ? 0 : originIndex + 1]; if (this.list.length >= this.page.total) {
this.displaySwiperList = displayList; console.log(this.list.length);
this.status = "nomore";
} else {
this.status = "loadmore";
}
},
async getVideoList() {
},
change(e) {
console.log(e);
this.swpper.index = e.index;
this.page = {
pageNum: 1,
pageSize: 10,
total: 0
};
this.ISstatusInit();
} }
} }
}; };
if (!Array) {
const _component_card_video = common_vendor.resolveComponent("card-video");
_component_card_video();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return { return {
a: common_vendor.f($data.displaySwiperList, (item, index, i0) => { a: common_vendor.f($data.videoList, (item, index, i0) => {
return common_vendor.e({ return {
a: index == $data.changeIndex a: common_vendor.o($options.getVideo, index),
}, index == $data.changeIndex ? { b: index,
b: item.src c: "71f14456-0-" + i0,
} : {}, { d: common_vendor.p({
c: common_vendor.t(item.title), VideoId: index,
d: index Videos: item
}); })
}), };
b: common_vendor.o((...args) => _ctx.transition && _ctx.transition(...args)), })
c: common_vendor.o((...args) => $options.changed && $options.changed(...args)),
d: $data.screenHeight - $data.navBarHeight + "px"
}; };
} }
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/DAN/wexinxiaochengxude/NewCode2/gree_leran/pages/video/video.vue"]]); const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "C:/Users/33043/Desktop/文件/work/newStud学习/greenStu/pages/video/video.vue"]]);
wx.createPage(MiniProgramPage); wx.createPage(MiniProgramPage);

View File

@ -1,5 +1,7 @@
{ {
"navigationBarTitleText": "视频", "navigationBarTitleText": "视频",
"navigationStyle": "default", "navigationStyle": "default",
"usingComponents": {} "usingComponents": {
"card-video": "../../components/cardVideo"
}
} }

View File

@ -1 +1 @@
<view><swiper circular vertical duration="200" bindtransition="{{b}}" bindchange="{{c}}" style="{{'height:' + d}}"><block wx:for="{{a}}" wx:for-item="item" wx:key="d"><swiper-item><video wx:if="{{item.a}}" src="{{item.b}}" autoplay="true" controls="true" custom-cache="false" loop="false" enable-play-gesture="true" enable-progress-gesture="true" show-center-play-btn="true"></video><view class="video-text"><view class="tips">{{item.c}}</view></view></swiper-item></block></swiper></view> <view class="content"><view class="swiper-item"><card-video wx:for="{{a}}" wx:for-item="item" wx:key="b" style="margin-bottom:20px" bindonplay="{{item.a}}" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"></card-video></view></view>

View File

@ -1,25 +1,46 @@
/**
swiper { * 这里是uni-app内置的常用样式变量
width: 100%; *
background: #000 * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content {
position: relative;
width: 100%;
height: 100vh;
padding-bottom: 10%;
} }
swiper-item { .content .nav {
height: 100%; display: flex;
width: 100% width: 100%;
position: fixed;
top: 0%;
justify-content: center;
z-index: 2;
} }
video { .content swiper {
height: 96%; position: relative;
width: 100% top: 90rpx;
}
.video-text {
position: absolute;
margin-left: 32rpx;
width: 580rpx;
bottom: 200rpx;
z-index: 9999;
}
.tips {
width: 560rpx;
font-size: 26rpx;
color: #ffffff;
} }
.content swiper swiper-item {
overflow: scroll;
}

View File

@ -18,7 +18,8 @@
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
} },
"ignoreUploadUnusedFiles": false
}, },
"condition": {}, "condition": {},
"editorSetting": { "editorSetting": {

View File

@ -2,7 +2,6 @@
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "gree_leran", "projectname": "gree_leran",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true
"urlCheck": false
} }
} }