This commit is contained in:
王鹏
2025-08-14 14:49:25 +08:00
commit 87b1e850ae
344 changed files with 50287 additions and 0 deletions

577
pages/index.vue Normal file
View File

@@ -0,0 +1,577 @@
<template>
<view style="background-color: white;">
<!-- 通知 -->
<!-- 轮播图 -->
<uni-swiper-dot class="uni-swiper-dot-box" :info="swiperData" :current="current" field="content">
<swiper autoplay :circular="true" interval="2000" class="swiper-box" :current="swiperDotIndex"
@change="changeSwiper">
<swiper-item v-for="(item, index) in swiperData" :key="index">
<view class="swiper-item">
<image :src="item" mode="aspectFill" :draggable="false" />
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
<view class="notice-box">
<image class="notice-svg" src="/static/images/tz.svg" mode=""></image>
<view class="inform">
<view class="inform-info">
<view class="info">
<swiper class="swiper" :circular="true" :vertical="true" :indicator-dots="false"
:autoplay="true" :interval="5000" :duration="1000">
<swiper-item>
<view class="notice-text">
<p>已查询到 {{number}} 个资源 -- 复制链接后浏览器打开</p>
</view>
</swiper-item>
<swiper-item>
<view class="notice-text">
<p>点击右上角 ... 添加小程序到我的找资源更方便!</p>
</view>
</swiper-item>
</swiper>
</view>
</view>
</view>
</view>
<view style="height: 100rpx;" class="search">
<uni-search-bar v-model="searchValue" radius="190" placeholder="请输入要查询的资源名" @confirm="search"
cancelButton="none" bgColor="#fff" />
</view>
<view @click="search" class="select">
查询
</view>
<view class="solids-bottom info-top">
<image class="info-top-svg" src="/static/images/new.svg"></image>
<text style="">最新更新</text>
<text style="float: right;margin-right: 30rpx;">资源链接</text>
</view>
<view v-if="dataList.length != 0">
<view v-for="(item,index) in dataList" :key="index" class="solids-bottom info-list">
<view class="info-name">{{item.resourceName}}</view>
<!-- #ifdef H5 -->
<text @click="toUrl(item)" class="info-copy">开始观看</text>
<!-- #endif -->
<!-- #ifndef H5 -->
<text @click="copy(item)" class="info-copy">复制链接</text>
<!-- #endif -->
</view>
</view>
<view style="text-align: center;" v-else>
<image style="width: 400rpx;height: 200rpx;" src="/static/images/nodata.svg"></image>
<view style="color: #adadad;">无数据</view>
</view>
<!-- 加载动图 -->
<view class="artileload" v-if="showTotal">
<image style="width: 100%;height: 100%;" src="https://img.yidaima.cn/feast/articleload.gif" mode="aspectFit"></image>
</view>
<!-- 文章列表没有数据 -->
<view @click="toMy()" class="no-list-data" v-else>
-- 没有搜索到 点击反馈客服添加 --
</view>
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
<view style="border-radius: 30rpx;" class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view style="color: black;font-size: 38rpx;margin-top: 50rpx;" class="content">提示</view>
</view>
<view class=" bg-white">
<view style="font-size: 33rpx;color: #6a6a6a;padding: 40rpx 60rpx 60rpx 60rpx;">
观看链接已复制到您的粘贴板中请复制到浏览器中获取链接中的资源可能存在排序混乱画质模糊和观看时长限制建议您转存至自己的网盘中使用即可解决此等问题<!-- (链接有效期为30分钟) -->
</view>
<button @tap="hideModal" style="margin-bottom: 50rpx;width: 55%;height: 90rpx;font-size: 38rpx;"
class="cu-btn bg-green">知道了</button>
</view>
</view>
</view>
<!--广告确认弹窗-->
<view class="cu-modal" :class="modalName=='adModal'?'show':''">
<view style="border-radius: 30rpx;" class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view style="color: black;font-size: 38rpx;margin-top: 40rpx;" class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class=" bg-white">
<view style="font-size: 33rpx;color: #6a6a6a;padding: 30rpx 60rpx 60rpx 60rpx;">
观看 <text
style="color: #3C9CFF;margin: 0 10rpx;">视频广告</text> 之后自动生成链接
</view>
<button @tap="lookAd" style="margin-bottom: 40rpx;width: 35%;height: 70rpx;font-size: 30rpx;"
class="cu-btn bg-blue"><text style="font-size: 30rpx;margin-right: 15rpx;"
class="cuIcon-recordfill"></text> 观看广告</button>
</view>
</view>
</view>
</view>
</template>
<script>
let videoAd = null;
import {
listDuanju,duanjuNumber,getConfigKey,updateDuanju
} from "@/api/app/index.js"
export default {
data() {
return {
adUnitId: "",
current: 0,
swiperDotIndex: 0,
swiperData: [],
queryParams: {
pageNum: 1,
pageSize: 20,
resourceName:null,
isShow: 1,
orderByDesc: 'create_time'
},
dataList: [],
testList: [],
total: 0,
showTotal: false,
searchValue: null,
modalName:null,
number:0,
urls:"",
modalName: null,
isDuanJu:false
}
},
onShow() {
var that = this
if(uni.getStorageSync("searchValue")){
that.searchValue = uni.getStorageSync("searchValue")
that.queryParams.resourceName = that.searchValue;
uni.removeStorageSync('searchValue');
}
getConfigKey("miniapp.duanju.is").then(response => {
if(response.msg == 'true'){
that.isDuanJu = response.msg
that.dataList = that.testList
that.number = that.dataList.length
}else{
that.getDataList()
}
console.log(response)
})
},
onLoad() {
var that = this
this.adUnitId = uni.getStorageSync("sysSet").downVideoAd
getConfigKey("miniapp.duanju.swiper").then(response => {
//轮播图
console.log(response.msg)
that.swiperData = []
var swiperStr = response.msg
var swiper = swiperStr.split(",")
for(var i=0; i < swiper.length; i++){
that.swiperData.push(swiper[i])
}
})
//初始化激励广告
this.CreateAd()
},
// 下拉刷新
onPullDownRefresh() {
this.queryParams = {
pageNum: 1,
pageSize: 20,
orderByDesc: 'create_time'
}
this.searchValue = null
this.getDataList()
},
// 上拉分页
onReachBottom() {
var that = this;
var allTotal = this.queryParams.pageNum * this.queryParams.pageSize
//this.page为加载次数this.pageSize为每一次加载的数据条数
if (allTotal < this.total) {
//this.total为请求数据的总条数。只要现有条数小于总条数就执行一下代码
this.showTotal = true;
this.queryParams.pageNum++;
//加载次数递加
//请求更多数据列表
listDuanju(this.queryParams).then(response => {
that.dataList = that.dataList.concat(response.rows)
var allTotal2 = this.queryParams.pageNum * this.queryParams.pageSize
if (allTotal2 < this.total) {
//this.total为请求数据的总条数。只要现有条数小于总条数就执行一下代码
this.showTotal = true;
} else {
this.showTotal = false;
}
})
} else {
this.showTotal = false;
}
},
onShareAppMessage() {
return {
title: "南音资源库,有你想要的 !",
imageUrl: "https://img.yidaima.cn/dj-share.png",
path: 'pages/index',
}
},
onShareTimeline(){
return {
title: "南音资源库,有你想要的 !",
query:{
},
imageUrl:'https://img.yidaima.cn/dj-share.png'
}
},
methods: {
toMy(){
uni.switchTab({
url: '/pages/mine/index'
});
},
lookAd() {
if (videoAd) {
videoAd.show().catch(() => {
// 失败重试
videoAd.load()
.then(() => videoAd.show())
.catch(err => {
console.error('激励视频 广告显示失败', err)
})
})
}
},
openAd(val){
this.urls = val
this.modalName = "adModal"
},
copy(val){
var that = this;
uni.setClipboardData({
data: val.resourceUrl,
showToast: false,
success: function () {
// 调用后端接口更新复制次数
updateDuanju({id: val.id}).then(response => {
console.log('复制次数更新成功');
}).catch(error => {
console.log('复制次数更新失败', error);
});
that.modalName = "Modal"
}
});
},
toUrl(val){
uni.showModal({
title: '提示',
content: '保存到网盘,可无限制看 !',
showCancel: false,
success: function(res) {
if (res.confirm) {
// 执行确认后的操作
window.location.href = val.resourceUrl
}
else {
// 执行取消后的操作
}
}
})
},
hideModal() {
this.modalName = null
},
// 搜索触发
search() {
if(this.isDuanJu == "true" && this.searchValue ==null){
this.$refs.uToast.show({
type: 'success',
title: '',
message: "请输入内容",
icon: false
})
return ;
}
if(this.isDuanJu == "true" && this.searchValue ==""){
this.$refs.uToast.show({
type: 'success',
title: '',
message: "请输入内容",
icon: false
})
return ;
}
this.queryParams.pageNum = 1
this.queryParams.resourceName = this.searchValue;
this.getDataList()
},
getDataList() {
var that = this;
listDuanju(this.queryParams).then(response => {
that.number = response.total
that.dataList = response.rows
var allTotal = this.queryParams.pageNum * this.queryParams.pageSize
that.total = response.total
if (allTotal < this.total) {
this.showTotal = true;
} else {
this.showTotal = false;
}
uni.stopPullDownRefresh(); //停止刷新
})
},
changeSwiper(e) {
this.current = e.detail.current
},
CreateAd() {
var that = this;
if (this.adUnitId != '') {
if (wx.createRewardedVideoAd) {
videoAd = wx.createRewardedVideoAd({
adUnitId: this.adUnitId
})
videoAd.onLoad(() => {})
videoAd.onError((err) => {
that.$refs.uToast.show({
type: 'error',
title: '',
message: "请使用移动端设备访问",
icon: false
})
})
videoAd.onClose((res) => {
if (res && res.isEnded) {
this.modalName = null
that.copy()
} else {
this.modalName = null
that.$refs.uToast.show({
type: 'success',
title: '',
message: "看完才能获取哟 !",
icon: false
})
//that.copy()
}
})
}
}
},
}
}
</script>
<style scoped lang="scss">
page {
background-color: #fff !important;
}
/* 通知 */
.inform {
// padding: 0 25rpx;
// height: 130rpx;
// margin: 30rpx auto;
.inform-info {
display: flex;
// padding: 0 20rpx;
height: 70rpx;
border-radius: 10rpx;
.picture {
width: 20%;
height: 100%;
image {
width: 93rpx;
height: 84rpx;
margin-top: -20rpx;
}
}
.info {
width: 100%;
height: 100%;
.swiper {
width: 100%;
height: 100%;
.swiper-item {
display: flex;
align-items: center;
width: 100%;
height: 100%;
text {
}
}
}
}
}
}
.search {
border: 3rpx solid #89B9D8;
margin: 20rpx;
border-radius: 15rpx;
margin-top: 40rpx;
}
.info-top {
background: #F8F8F8;
height: 100rpx;
line-height: 100rpx;
margin-top: 30rpx;
font-size: 31rpx;
font-weight: 600;
}
.info-top-svg {
height: 70upx;
width: 70upx;
margin: 15rpx;
float: left;
margin-top: 12rpx;
}
.info-list {
height: 100rpx;
line-height: 100rpx;
font-size: 29rpx;
}
.info-copy {
float: right;
margin-right: 30rpx;
color: #1E90FF;
}
.info-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 530rpx;
display: inline-block;
color: #636363;
margin-left: 22rpx;
}
.select {
width: 60%;
margin-left: 20%;
height: 100rpx;
line-height: 100rpx;
text-align: center;
background-color: #78B7E0;
color: white;
border-radius: 15rpx;
font-size: 35rpx;
font-weight: 600;
margin-top: 40rpx;
}
.notice-box {
width: 100%;
margin-bottom: 20rpx;
height: 80rpx;
line-height: 80rpx;
box-shadow: 0 -5px 13px -1px rgba(0, 0, 0, 0.6);
}
.notice-svg {
height: 80upx;
width: 80upx;
display: inline-block;
float: left;
margin-top: -1rpx;
margin-left: 10rpx;
}
.notice-text {
display: inline-block;
margin-left: 20rpx;
// width: 590upx;
overflow: hidden;
white-space: nowrap;
box-sizing: border-box;
color: #DE9C10;
}
.notice-text p {
display: inline-block;
font-weight: 600;
/* padding-left: 100%;
animation: marquee 15s linear infinite; */
}
@keyframes marquee {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-100%);
}
}
/* 列表没有数据 */
.no-list-data {
text-align: center;
margin: 30rpx 0px;
color: #0081ff;
font-size: 24upx;
height: 60rpx;
}
/* 加载动图 */
.artileload {
height: 80rpx;
width: 80rpx;
margin: 20rpx auto;
overflow: hidden;
}
.swiper {
height: 400rpx;
}
.swiper-box {
height: 200px;
overflow: hidden;
transform: translateY(0);
}
.swiper-item {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
height: 400rpx;
line-height: 400rpx;
}
@media screen and (min-width: 500px) {
.uni-swiper-dot-box {
width: 400px;
/* #ifndef APP-NVUE */
margin: 0 auto;
/* #endif */
margin-top: 8px;
}
.image {
width: 100%;
}
}
</style>

216
pages/mine/guanzhu.vue Normal file
View File

@@ -0,0 +1,216 @@
<template>
<div class="app-page">
<!-- 个人信息部分 -->
<div class="profile">
<!-- 头像 -->
<div class="avatar">
<img src="https://img.yidaima.cn/%E5%A4%B4%E5%83%8F/9b889964f97e4d0c8f52f7b9ec0d04da.jpg" alt="Avatar" class="avatar-img">
</div>
<!-- 昵称 -->
<div class="nickname">Nan Yin</div>
<!-- 个人简介 -->
<div class="bio">如果爱意难平那就把它藏在心底吧</div>
</div>
<!-- 联系人部分 -->
<div class="contact">
<!-- 循环渲染联系人列表 -->
<div class="item" v-for="item in contacts" :key="item.id"
@click="copyInfo(item.info, item.name, item.name1, item.id)">
<!-- 联系人条目 -->
<div class="icon-info">
<!-- 自定义图标 -->
<img :src="item.icon" alt="Custom Icon" class="custom-icon">
<!-- 联系人名称 -->
<div class="name">{{ item.name }}</div>
<!-- 联系人名称 -->
<div class="name1">{{ item.name1 }}</div>
<!-- 联系人信息 -->
<div class="info">{{ item.info }}</div>
<div v-if="item.id ==1 || item.id ==2" class="copy"><text class="cuIcon-qrcode"></text></div>
<div v-if="item.id ==3 || item.id ==4" class="copy"><text class="cuIcon-copy"></text></div>
</div>
</div>
</div>
<!--弹窗-->
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
<view style="border-radius: 30rpx; background-color: white;" class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view style="color: black;font-size: 38rpx;margin-top: 40rpx;" class="content">{{modelTip}}</view>
<view class="action" @tap="modalName = null">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class=" bg-white">
<image style="width: 75%;" mode="widthFix" show-menu-by-longpress="true"
:src="modelSrc"></image>
<view class="tipinfo">Tip长按图片识别 / 保存</view>
</view>
</view>
</view>
</div>
</template>
<script>
export default {
data() {
return {
modelSrc:"",
modelTip:"",
contacts: [{
id: 1,
icon: "http://cun.mywl.top/mybk/xtb/qq.png",
name: "企鹅",
name1: ":",
info: "594458910"
},
{
id: 2,
icon: "http://cun.mywl.top/mybk/xtb/wechat.png",
name: "微信",
name1: ":",
info: "forfeastcoding"
},
{
id: 3,
icon: "http://cun.mywl.top/mybk/xtb/email.png",
name: "邮箱",
name1: ":",
info: "594458910@qq.com"
},
{
id: 4,
icon: "http://cun.mywl.top/mybk/xtb/blog.png",
name: "博客",
name1: ":",
info: "http://www.yidaima.cn/"
},
],
modalName: null
};
},
methods: {
copyInfo(info, name, name1, id) {
if(id == 1){
this.modelTip = "我的企鹅码"
this.modelSrc = "https://img.yidaima.cn/feast/qq_qrcode.jpg"
this.modalName = "Modal"
}else if(id == 2){
this.modelTip = "我的微信码"
this.modelSrc = "https://img.yidaima.cn/feast/wx_qrcode.jpg"
this.modalName = "Modal"
}
uni.setClipboardData({
data: info,
success() {
uni.showToast({
title: `${name}已复制`,
icon: 'success'
});
}
});
}
}
};
</script>
<style scoped>
.tipinfo {
width: 60%;
height: 80rpx;
border-radius: 60rpx;
text-align: center;
/* border: 3rpx solid #ae67d6; */
margin-left: 20%;
line-height: 80rpx;
margin-bottom: 40rpx;
color: #ae67d6;
font-size: 30rpx;
font-weight: 600;
}
.app-page {
width: 100vw;
min-height: 100vh;
box-sizing: border-box;
padding-top: 0rpx;
}
.profile {
display: flex;
flex-direction: column;
align-items: center;
background-image: url('https://v2.api-m.com/api/wallpaper?return=302');
background-size: cover;
background-position: center;
height: 33vh;
}
.avatar {
width: 100px;
height: 100px;
position: relative;
box-sizing: border-box;
border-radius: 50%;
border: 1px solid #fff;
box-shadow: 0 2px 24px rgba(0, 0, 0, 0.07);
overflow: hidden;
position: relative;
top: 55px;
left: 0px;
}
.avatar-img {
width: 100%;
height: 100%;
}
.nickname {
font-size: 20px;
position: relative;
top: 60px;
}
.bio {
margin-top: 10px;
position: relative;
top: 62px;
font-size: 16px;
color: #666;
}
.contact {
border-top: 2px solid #f2f2f2;
padding: 20px;
}
.item {
border-radius: 12px;
background-color: #fafafa;
padding: 16px;
margin-bottom: 10px;
}
.icon-info {
display: flex;
align-items: center;
}
.custom-icon {
width: 30px;
height: 30px;
margin-right: 10px;
}
.name,
.name1,
.info {
margin-right: 5px;
}
.copy {
margin-left: auto;
color: #1E90FF;
}
</style>

53
pages/mine/imgShow.vue Normal file
View File

@@ -0,0 +1,53 @@
<template>
<view>
<!-- #ifdef H5 -->
<text @click="back()" class="cuIcon-back backbut"></text>
<!-- #endif -->
<view style="text-align: center;">
<image v-if="type == 1" show-menu-by-longpress="true" style="width: 70%;margin-top: 200rpx;" mode="widthFix" src="http://imgs.emoboy.vip/appimg/gongzhonghao.png"></image>
<image v-if="type == 2" show-menu-by-longpress="true" style="width: 70%;margin-top: 200rpx;" mode="widthFix" src="http://imgs.emoboy.vip/appimg/mywxcode.jpg"></image>
<view style="font-size: 40rpx;font-weight: bold;margin-top: 40rpx;">长按识别二维码</view>
<view v-if="type == 1" style="font-size: 30rpx;color: #adadad;margin-top: 40rpx;">最新动态资源抢先看精彩永不断</view>
<view v-if="type == AbortSignal" style="font-size: 30rpx;color: #adadad;margin-top: 40rpx;">最新动态资源抢先看精彩永不断</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
type: null
}
},
onLoad(option) {
this.type = option.type
},
methods: {
back(val) {
uni.navigateBack()
},
}
}
</script>
<style>
page {
display: flex;
flex-direction: column;
box-sizing: border-box;
background-color: #fff;
min-height: 100%;
height: auto;
}
.backbut {
position: absolute;
left: 20rpx;
top: 50rpx;
font-size: 50rpx;
color: #909090;
}
</style>

438
pages/mine/index.vue Normal file
View File

@@ -0,0 +1,438 @@
<template>
<view class="my">
<image src="https://v2.api-m.com/api/wallpaper?return=302" mode="aspectFill" class="my_bg"></image>
<view class="header_cell">
<view style="margin-top: 40rpx;" class="user_info">
<view class="flex justify-center align-center">
<image src="https://v2.api-m.com/api/head?return=302" mode="aspectFill" class="user_photo"></image>
<view>
<view class="text-black text-bold">
<text class="text-xl" style="font-weight: bold;">微信用户</text>
</view>
</view>
</view>
</view>
<view style="margin-top: 90rpx;border-radius: 26rpx;" class="vip_cell flex justify-between align-center">
<view>
<view class="text-xl" style="font-weight: bold;color: rgb(241, 198, 142);">
邀请朋友一起来搜索吧 !
</view>
</view>
<button open-type="share" class="cu-btn round invate_btn"> </button>
</view>
</view>
<view class="cell_2 flex align-center mt30">
<button @click="guanzhu(1)" class="kefu">
<text style="color: #1382ff;font-size: 60rpx;" class=" cuIcon-appreciatefill"></text>
<text style="display: block;margin-top: -60rpx;margin-bottom: 15rpx;font-size: 30rpx;">关于我们</text>
</button>
<!-- #ifdef H5 -->
<button @click="imgShow(2)" class="kefu">
<text style="color: #1382ff;font-size: 60rpx;" class=" cuIcon-servicefill"></text>
<text style="display: block;margin-top: -60rpx;margin-bottom: 15rpx;font-size: 30rpx;">联系我们</text>
</button>
<!-- #endif -->
<!-- #ifndef H5 -->
<button open-type="contact" class="kefu">
<text style="color: #1382ff;font-size: 60rpx;" class=" cuIcon-servicefill"></text>
<text style="display: block;margin-top: -60rpx;margin-bottom: 15rpx;font-size: 30rpx;">联系我们</text>
</button>
<!-- #endif -->
</view>
<!-- <view style="width: 100%; margin-top: 30rpx;">
<ad-custom unit-id="adunit-ff28399b17818338" ad-intervals="30" ></ad-custom>
</view> -->
<view class="mt30 grid text-center col-4 bg-white"
style="padding: 30rpx 0; border-radius: 15rpx;row-gap: 30rpx;">
<!-- #ifdef H5 -->
<view @click="modeImgShow(1)">
<!-- #endif -->
<!-- #ifndef H5 -->
<view @click="myBlog()">
<!-- #endif -->
<view class="cell_3_icon flex justify-center align-center"><text
class="text-olive cuIcon-choiceness"></text></view>
<view>我的博客</view>
</view>
<!-- #ifdef H5 -->
<view @click="modeImgShow(2)">
<!-- #endif -->
<!-- #ifndef H5 -->
<view @click="shuiyin()">
<!-- #endif -->
<view class="cell_3_icon flex justify-center align-center"><text
class="text-cyan cuIcon-selection"></text></view>
<view>水印去除</view>
</view>
<!-- <view @click="imgShow(1)">
<view class="cell_3_icon flex justify-center align-center"><text class="text-cyan cuIcon-copy"></text>
</view>
<view>最新动态</view>
</view> -->
<view @click="mzModalShow()">
<view class="cell_3_icon flex justify-center align-center"><text
class="text-olive cuIcon-creative"></text></view>
<view>免责声明</view>
</view>
</view>
<!-- 功能列表 -->
<view class="metergasis">
<!-- #ifdef H5 -->
<view style="line-height: 60rpx;width: 90%;height: 150rpx;background-color: #fff;color: #666666;margin: 20rpx;text-align: center;">
<!-- #endif -->
<!-- #ifndef H5 -->
<view style="width: 90%;height: 300rpx;background-color: #fff;color: #666666;margin: 20rpx;text-align: center;">
<!-- #endif -->
求资源的搜索不到的点击下面反馈客服 !
</view>
</view>
<button @click="guanzhu(1)" class="select">
反馈客服
</button>
<!--免责声明弹窗-->
<view class="cu-modal" :class="modalName=='mzModal'?'show':''">
<view style="border-radius: 30rpx;" class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view style="color: black;font-size: 38rpx;margin-top: 50rpx;" class="content">声明</view>
</view>
<view class=" bg-white">
<view style="font-size: 33rpx;color: #6a6a6a;padding: 40rpx 60rpx 60rpx 60rpx;">
创作者上传至南音资源库小程序的素材内容由创作者负责部分来源于网络和他处购买如有侵权请在界面中的联系我们进行删除处理 !
</view>
<button @tap="hideModal" style="margin-bottom: 50rpx;width: 55%;height: 90rpx;font-size: 38rpx;"
class="cu-btn bg-green">确认</button>
</view>
</view>
</view>
<!--弹窗-->
<view class="cu-modal" :class="modalName=='imgModal'?'show':''">
<view style="border-radius: 30rpx; background-color: white;" class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view style="color: black;font-size: 38rpx;margin-top: 40rpx;" class="content">{{modelTip}}</view>
<view class="action" @tap="modalName = null">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class=" bg-white">
<image style="width: 75%;margin-top: 20rpx;" mode="widthFix" show-menu-by-longpress="true"
:src="modelSrc"></image>
<view class="tipinfo">Tip长按图片识别 / 保存</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
} from "@/api/app/index.js"
let videoAd = null;
export default {
data() {
return {
modalName: null,
modelTip: "",
modelSrc: ""
};
},
onShareAppMessage() {
return {
title: "南音资源库,有你想要的 !",
imageUrl: "https://img.yidaima.cn/dj-share.png",
path: 'pages/index',
}
},
onShareTimeline(){
return {
title: "南音资源库,有你想要的 !",
query:{
},
imageUrl:'https://img.yidaima.cn/dj-share.png'
}
},
onShow() {
},
onLoad() {
},
methods: {
imgShow(type) {
this.$tab.navigateTo('/pages/mine/imgShow?type='+type)
},
modeImgShow(val){
if(val == 1){
this.modelTip="我的博客"
this.modelSrc="http://imgs.emoboy.vip/appimg/%E5%B0%8F%E7%A8%8B%E5%BA%8F%E7%A0%81.jpg"
}else{
this.modelTip="去水印"
this.modelSrc="http://imgs.emoboy.vip/appimg/%E6%B0%B4%E5%8D%B0.jpg"
}
this.modalName = 'imgModal'
},
shuiyin() {
uni.navigateToMiniProgram({
appId: 'wx17b46f75e762c184',
path: 'pages/tool/shuiyin', //需要打开的目标路径
extraData: {
},
envVersion: 'release', //小程序版本develop开发版trial体验版release正式版
success(res) {
// 打开成功
}
})
},
myBlog(){
uni.navigateToMiniProgram({
appId: 'wx17b46f75e762c184',
path: '', //需要打开的目标路径
extraData: {
},
envVersion: 'release', //小程序版本develop开发版trial体验版release正式版
success(res) {
// 打开成功
}
})
},
copy(){
uni.showToast({
title: '敬请期待',
//将值设置为 success 或者直接不用写icon这个参数 error none
icon: 'none',
//显示持续时间为 2秒
duration: 2000
})
},
mzModalShow() {
this.modalName = "mzModal"
},
hideModal() {
this.modalName = null
},
guanzhu(type) {
this.$tab.navigateTo('/pages/mine/guanzhu?type=' + type)
},
}
};
</script>
<style lang="less" scoped>
.tipinfo {
width: 60%;
height: 80rpx;
border-radius: 60rpx;
text-align: center;
/* border: 3rpx solid #ae67d6; */
margin-left: 20%;
line-height: 80rpx;
margin-bottom: 40rpx;
color: #ae67d6;
font-size: 30rpx;
font-weight: 600;
}
.select {
width: 60%;
margin-left: 20%;
height: 100rpx;
line-height: 100rpx;
text-align: center;
background-color: #78B7E0;
color: white;
border-radius: 15rpx;
font-size: 35rpx;
font-weight: 600;
margin-top: 40rpx;
}
.kefu {
width: 49%;
background-color: white;
}
/* 列表没有数据 */
.no-list-data {
text-align: center;
margin-bottom: 100rpx;
color: #b3b3b3;
font-size: 24upx;
margin: 40rpx 40rpx 0rpx 40rpx;
}
.no-list-data2 {
text-align: center;
margin-bottom: 100rpx;
color: #b3b3b3;
font-size: 24upx;
margin: 10rpx 40rpx 40rpx 40rpx;
}
button::after {
border: none;
}
.blogui-img {
height: 100%;
width: 100%;
}
/* 功能列表 */
.metergasis-li-rgth {
width: 50upx;
height: 50upx;
overflow: hidden;
flex-shrink: 0;
position: absolute;
right: 0upx;
top: 50%;
transform: translate(0%, -50%);
}
.metergasis-li-h {
grid-row: 1;
margin-left: 30upx;
font-size: 30upx;
}
.metergasis-li-h2 {
grid-row: 1;
margin-left: 30upx;
font-size: 25upx;
color: #ADADAD;
margin-left: auto;
margin-right: 10rpx;
}
.metergasis-li-img {
height: 52upx;
width: 52upx;
border-radius: 100upx;
flex-shrink: 0;
}
.metergasis-li {
padding: 24upx 32upx;
display: flex;
justify-content: flex-start;
align-items: center;
position: relative;
}
.metergasis {
background-color: #FFFFFF;
border-radius: 16upx;
margin: 2upx 0upx;
padding: 2upx;
margin-top: 30rpx;
}
.my {
padding: 30rpx;
.mt30 {
margin-top: 30rpx;
}
.my_bg {
position: absolute;
left: 0;
top: 0;
z-index: -1;
width: 100%;
}
.header_cell {
margin-top: 100rpx;
.user_info {
display: flex;
justify-content: space-between;
align-items: center;
.user_photo {
width: 120rpx;
height: 120rpx;
box-shadow: 0px 0px 10rpx 1px rgba(0, 0, 0, 0.1);
border-radius: 50%;
background-color: white;
margin-right: 20rpx;
}
}
.auth_btn {
margin: 50rpx auto;
text-align: center;
&>button {
box-shadow: 3px 3px 10rpx 1px rgba(0, 0, 0, 0.2);
padding-left: 50rpx;
padding-right: 50rpx;
}
}
.vip_cell {
margin-top: 40rpx;
width: 690rpx;
height: 150rpx;
background-image: url('https://img.yidaima.cn/feast/bolang.gif');
background-size: 100% 100%;
color: white;
padding: 0 30rpx;
.invate_btn {
background-color: rgb(241, 198, 142);
box-shadow: 3px 3px 10rpx 1px rgba(241, 198, 142, 0.5);
width: 150rpx;
color: rgb(99, 71, 56);
font-weight: bold;
}
}
}
.cell_1_icon {
width: 100rpx;
height: 100rpx;
background-color: #f4f2f7;
border-radius: 50%;
font-size: 50rpx;
margin: 0 auto;
margin-bottom: 15rpx;
}
.cell_2 {
&>view {
background-color: white;
border-radius: 15rpx;
text-align: center;
width: 48%;
padding: 30rpx 0;
}
.cell_2_icon {
font-size: 60rpx;
margin-bottom: 15rpx;
}
}
.cell_3_icon {
font-size: 50rpx;
margin-bottom: 20rpx;
}
.cell_4 {
&>view,
navigator {
padding: 20rpx 0;
}
}
}
</style>

334
pages/ranking/index.vue Normal file
View File

@@ -0,0 +1,334 @@
<template>
<view class="page">
<!-- #ifndef H5 -->
<view :style="{height:pageHeight+'px'}"></view>
<view class="tab">
<text v-for="v in tabs" :key="v.key" :class="{'tab-active' : v.key === current}" @click="tabChange(v)">
{{v.name}}
</text>
</view>
<!-- #endif -->
<view class="ranking">
<view class="rangking-title">
<text>排名</text>
<text>资源名称</text>
<text style="margin-right: 17rpx;">热度</text>
</view>
<view class="ranking-list">
<view @click="toSearch(item)" class="ranking-list-item" v-for="(item, key) in filteredDataList" :key="key">
<view v-if="key < 3" class="ranking-list-number">
<image :src="'/static/page6/' + (key + 1) + '.png'"></image>
</view>
<view v-else class="ranking-list-number">
<text>{{key + 1}}</text>
</view>
<view class="ranking-list-nickname">
<!-- <image :src="'/static/avatar/' + (key % 7) + '.png'"></image> -->
<text class="name">{{item.resourceName}}</text>
</view>
<text class="ranking-list-score">{{million(item.copyNumber)}}</text>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
<view style="border-radius: 30rpx;" class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view style="color: black;font-size: 38rpx;margin-top: 50rpx;" class="content">提示</view>
</view>
<view class=" bg-white">
<view style="font-size: 33rpx;color: #6a6a6a;padding: 40rpx 60rpx 60rpx 60rpx;">
观看链接已复制到您的粘贴板中请复制到浏览器中获取链接中的资源可能存在排序混乱画质模糊和观看时长限制建议您转存至自己的网盘中使用即可解决此等问题<!-- (链接有效期为30分钟) -->
</view>
<button @tap="hideModal" style="margin-bottom: 50rpx;width: 55%;height: 90rpx;font-size: 38rpx;"
class="cu-btn bg-green">知道了</button>
</view>
</view>
</view>
<view class="no-list-data">
-- 温馨提示 --
</view>
<view class="no-list-data2">
点击排行榜内容可快速跳转此热门资源
</view>
</view>
</template>
<script>
import {
listDuanju,
duanjuNumber,
getConfigKey,
updateDuanju,
getNotice,
getRanking
} from "@/api/app/index.js"
export default {
data() {
return {
current: 1,
tabs: [
// {
// name: '日榜',
// key: 1
// },
// {
// name: '周榜',
// key: 2
// },
{
name: '排行榜',
key: 1
}
],
pageHeight: null,
queryParams: {
pageNum: 1,
pageSize: 10,
resourceName: null,
isShow: 1,
orderByDesc: 'copy_number'
},
dataList: [],
modalName: ""
}
},
computed: {
filteredDataList() {
return this.dataList.slice(0, 10);
}
},
onShow() {
uni.getSystemInfo({
success: (res) => {
// 状态栏的高度
this.pageHeight = res.statusBarHeight;
}
});
this.getDataList()
},
methods: {
toSearch(val){
uni.setStorageSync("searchValue",val.resourceName)
uni.switchTab({
url: '/pages/index'
});
},
copy(val) {
var that = this;
uni.setClipboardData({
data: val.resourceUrl,
showToast: false,
success: function() {
that.modalName = "Modal"
}
});
},
toUrl(val) {
uni.showModal({
title: '提示',
content: '保存到网盘,可无限制看 !',
showCancel: false,
success: function(res) {
if (res.confirm) {
// 执行确认后的操作
window.location.href = val.resourceUrl
} else {
// 执行取消后的操作
}
}
})
},
hideModal() {
this.modalName = null
},
getDataList() {
var that = this;
getRanking().then(response => {
that.dataList = response.data || []
}).catch(err => {
console.error('获取排行榜失败', err);
that.dataList = []
});
},
tabChange(e) {
this.current = e.key;
console.log(e);
},
million(value){//过万处理
let num;
if(value > 9999){//大于9999显示x.xx万
num=(Math.floor(value/1000)/10) + ' w';
}else if( value < 9999 && value>-9999){
num=value
}else if(value<-9999){//小于-9999显示-x.xx万
num = -(Math.floor(Math.abs(value)/1000)/10)+' w'
}
return num;
}
}
}
</script>
<style lang="scss">
page {
background: #5471f4;
}
.no-list-data {
text-align: center;
margin-bottom: 100rpx;
color: #b3b3b3;
font-size: 24upx;
margin: 0rpx 40rpx 0rpx 40rpx;
}
.no-list-data2 {
text-align: center;
margin-bottom: 100rpx;
color: #b3b3b3;
font-size: 24upx;
margin: 10rpx 40rpx 20rpx 40rpx;
}
.name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 60%;
}
.page {
padding-bottom: 20rpx;
.tab {
width: 700rpx;
margin: auto;
display: flex;
justify-content: center;
align-items: flex-end;
padding: 25rpx;
text {
display: block;
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
text-align: center;
color: #fff;
font-size: 14px;
}
.tab-active {
font-size: 16px;
font-weight: bold;
position: relative;
&::after {
content: '';
width: 40rpx;
height: 6rpx;
border-radius: 4rpx;
background: #fff;
position: absolute;
left: 40rpx;
bottom: 0;
}
}
}
.ranking {
width: 700rpx;
border-radius: 30rpx;
margin: auto;
box-sizing: border-box;
padding: 20rpx;
.rangking-title {
display: flex;
font-size: 12px;
color: #f0f0f0;
height: 50rpx;
line-height: 50rpx;
text {
display: block;
width: 100rpx;
text-align: center;
&:nth-child(2) {
box-sizing: border-box;
padding-left: 20rpx;
text-align: left;
width: calc(100% - 200rpx);
}
}
}
.ranking-list-item {
height: 110rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
font-size: 14px;
background: rgba(255, 255, 255, 0.7);
margin: 16rpx 0;
&:nth-child(1) {
background: #efb300;
}
&:nth-child(2) {
background: #b4b0b0;
}
&:nth-child(3) {
background: #e37d19;
}
.ranking-list-number {
width: 100rpx;
color: #777;
display: flex;
justify-content: center;
image {
width: 50rpx;
height: 50rpx;
}
}
.ranking-list-score {
display: block;
width: 23%;
color: #555;
font-size: 16px;
text-align: right;
}
.ranking-list-nickname {
display: flex;
align-items: center;
width: 58%;
box-sizing: border-box;
padding-left: 20rpx;
image {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 20rpx;
}
text {
width: auto;
}
}
}
}
}
</style>