feat: add virtual resource payments and optimize images

This commit is contained in:
王鹏
2026-07-28 13:35:23 +08:00
parent ab281be02a
commit d14f005d34
35 changed files with 462 additions and 2125 deletions

View File

@@ -38,7 +38,7 @@
<ad-custom style="height: 337rpx !important;" :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view v-else>
<image class="grid-img" :src="item.compressImgUrl"></image>
<image class="grid-img" :src="$image.original(item.compressImgUrl)" lazy-load mode="aspectFill"></image>
<view class="info-img">
<view class="flex justify-between">
<view v-if="item.isAd != 0" class="img-type"><text class="cuIcon-rechargefill"></text> 免费获取
@@ -621,4 +621,4 @@
margin: 20rpx auto;
overflow: hidden;
}
</style>
</style>

View File

@@ -38,7 +38,7 @@
<ad-custom :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view v-else>
<image class="grid-img" :src="item.compressImgUrl"></image>
<image class="grid-img" :src="$image.original(item.compressImgUrl)" lazy-load mode="aspectFill"></image>
<view class="info-img">
<view class="flex justify-between">
<view v-if="item.isAd != 0" class="img-type"><text class="cuIcon-rechargefill"></text> 免费获取</view>
@@ -434,4 +434,4 @@
margin: 20rpx auto;
overflow: hidden;
}
</style>
</style>

View File

@@ -60,7 +60,7 @@
<view class="goods-list">
<view class="list" v-for="(item, index) in goodsList" @click="onSkip(item)" :key="index">
<view class="pictrue">
<image :src="item.goodsImg"></image>
<image :src="$image.resourceThumbnail(item.goodsImg)" lazy-load mode="aspectFill"></image>
</view>
<view class="title-tag">
<view class="tag">
@@ -701,4 +701,4 @@
}
}
}
</style>
</style>

View File

@@ -3,7 +3,7 @@
<view class="goods-list">
<view class="list">
<view class="pictrue">
<image :src="goodsImg"></image>
<image :src="$image.original(goodsImg)" mode="aspectFill"></image>
</view>
<view class="price-info">
<view class="user-price">
@@ -474,4 +474,4 @@
}
}
}
</style>
</style>

View File

@@ -32,16 +32,18 @@
</view>
</view>
<view style="height: 200rpx;" v-else>
<image class="blog-img" :src="item.showImg"></image>
<image class="blog-img" :src="$image.articleThumbnail(item)" lazy-load mode="aspectFill"></image>
<view class="info-box">
<view class="ellipsis-multiline">
{{item.title}}
</view>
<view class="info-icon">
<image v-if="item.isAd == 0" class="muen-sld-icon" src="https://img.yidaima.cn/feast/guanggao.svg" mode="">
</image>
<image v-if="item.appResourceId" class="muen-sld-icon" src="https://img.yidaima.cn/feast/xiazai.svg" mode="">
</image>
<image v-if="item.appResource.isAd == 0" class="muen-sld-icon" src="https://img.yidaima.cn/mf.svg" mode=""></image>
<image v-if="item.appResource.isAd == 1" class="muen-sld-icon" src="https://img.yidaima.cn/feast/guanggao.svg" mode=""></image>
<image v-if="item.appResource.isAd == 2" class="muen-sld-icon" src="https://img.yidaima.cn/jf.svg" mode=""></image>
<image v-if="item.appResource.isAd == 3" class="muen-sld-icon" src="https://img.yidaima.cn/ff.svg" mode=""></image>
<image v-if="item.appResourceId" class="muen-sld-icon" src="https://img.yidaima.cn/feast/xiazai.svg" mode=""></image>
<image v-if="item.weight == 999" class="muen-sld-icon2" src="https://img.yidaima.cn/feast/top.svg" mode=""></image>
</view>
<view class="muen-sld-time">{{item.createTime}}<text
class="cuIcon-attention look-number"><text>{{item.lookNumber}}</text></text></view>

View File

@@ -32,16 +32,18 @@
</view>
</view>
<view style="height: 200rpx;" v-else>
<image class="blog-img" :src="item.showImg"></image>
<image class="blog-img" :src="$image.articleThumbnail(item)" lazy-load mode="aspectFill"></image>
<view class="info-box">
<view class="ellipsis-multiline">
{{item.title}}
</view>
<view class="info-icon">
<image v-if="item.isAd == 0" class="muen-sld-icon" src="https://img.yidaima.cn/feast/guanggao.svg" mode="">
</image>
<image v-if="item.appResourceId" class="muen-sld-icon" src="https://img.yidaima.cn/feast/xiazai.svg" mode="">
</image>
<image v-if="item.appResource.isAd == 0" class="muen-sld-icon" src="https://img.yidaima.cn/mf.svg" mode=""></image>
<image v-if="item.appResource.isAd == 1" class="muen-sld-icon" src="https://img.yidaima.cn/feast/guanggao.svg" mode=""></image>
<image v-if="item.appResource.isAd == 2" class="muen-sld-icon" src="https://img.yidaima.cn/jf.svg" mode=""></image>
<image v-if="item.appResource.isAd == 3" class="muen-sld-icon" src="https://img.yidaima.cn/ff.svg" mode=""></image>
<image v-if="item.appResourceId" class="muen-sld-icon" src="https://img.yidaima.cn/feast/xiazai.svg" mode=""></image>
<image v-if="item.weight == 999" class="muen-sld-icon2" src="https://img.yidaima.cn/feast/top.svg" mode=""></image>
</view>
<view class="muen-sld-time">{{item.createTime}}<text
class="cuIcon-attention look-number"><text>{{item.lookNumber}}</text></text></view>

View File

@@ -33,36 +33,6 @@
color: 'cyan',
cuIcon: 'https://img.yidaima.cn/zyk.png'
},
{
title: '手机壁纸',
name: 'wallpaper',
color: 'purple',
cuIcon: 'https://img.yidaima.cn/sjbz.png'
},
{
title: '电脑壁纸',
name: 'computer',
color: 'pink',
cuIcon: 'https://img.yidaima.cn/dnbz.png'
},
{
title: '精美头像',
name: 'avatar',
color: 'brown',
cuIcon: 'https://img.yidaima.cn/jmtx.png'
},
{
title: '视频资源',
name: 'video',
color: 'blue',
cuIcon: 'https://img.yidaima.cn/sp.png'
},
{
title: '水印去除',
name: 'shuiyin',
color: 'red',
cuIcon: 'https://img.yidaima.cn/sycc.png'
},
{
title: '手机软件',
name: 'phone',
@@ -74,12 +44,6 @@
name: 'software',
color: 'mauve',
cuIcon: 'https://img.yidaima.cn/dnrj.png'
},
{
title: '积分兑换',
name: 'exchange',
color: 'green',
cuIcon: 'https://img.yidaima.cn/jfdh.png'
}
],
};
@@ -110,4 +74,4 @@
background-color: #FFFFFF;
z-index: 1;
}
</style>
</style>

View File

@@ -26,12 +26,12 @@
</view>
<view v-if="dataList.length != 0" class="bg-white padding">
<view class="grid margin-bottom col-2">
<view @click="info(item.id)" v-for="(item,index) in dataList" :key="index" class="grid-box">
<view v-for="(item,index) in dataList" :key="index" class="grid-box">
<view style="width: 327rpx;height: 377rpx;background-color: white;overflow: hidden;" v-if="item.ad == 1">
<ad-custom style="height: 377rpx !important;" :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view v-else>
<image class="grid-img" :src="item.showImg"></image>
<view v-else @click="info(item.id)">
<image class="grid-img" :src="$image.resourceThumbnail(item)" lazy-load mode="aspectFill"></image>
<view class="grid-name">{{item.resourceTitle}}</view>
<!-- <view v-if="item.isAd == 0" class="ad">激励广告</view> -->
<view class="notad">获取详情</view>
@@ -347,4 +347,4 @@
overflow: hidden;
position: relative;
}
</style>
</style>

View File

@@ -26,12 +26,12 @@
</view>
<view v-if="dataList.length != 0" class="bg-white padding">
<view class="grid margin-bottom col-2">
<view @click="info(item.id)" v-for="(item,index) in dataList" :key="index" class="grid-box">
<view v-for="(item,index) in dataList" :key="index" class="grid-box">
<view style="width: 327rpx;height: 377rpx;background-color: white;overflow: hidden;" v-if="item.ad == 1">
<ad-custom style="height: 377rpx !important;" :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view v-else>
<image class="grid-img" :src="item.showImg"></image>
<view v-else @click="info(item.id)">
<image class="grid-img" :src="$image.resourceThumbnail(item)" lazy-load mode="aspectFill"></image>
<view class="grid-name">{{item.resourceTitle}}</view>
<!-- <view v-if="item.isAd == 0" class="ad">激励广告</view> -->
<view class="notad">获取详情</view>
@@ -348,4 +348,4 @@
overflow: hidden;
position: relative;
}
</style>
</style>

View File

@@ -1,424 +0,0 @@
<template>
<view class="content">
<view class="remove">
<view class="remove-title-clearButton">
<view class="remove-title">
<view class="remove-title-content">
<u--text bold size="18" color="#0081ff" text="快速去水印"></u--text>
</view>
<view class="remove-title-shadow">
<u--text bold color="#0081ff" text="SPEEDY"></u--text>
</view>
</view>
<view class="remove-clearButton">
<u--text @click="clearTextarea" text="清空"></u--text>
</view>
</view>
<view class="remove-textarea">
<u--textarea maxlength="180" border="none" height="140" v-model="input_url"
placeholder="请粘贴需要提取的视频/图集链接,支持抖音,快手,小红书,哔哩哔哩等 100+ 平台"></u--textarea>
</view>
<view class="remove-paste-submit-button">
<view class="remove-paste-button">
<u-button @click="pasteURL" type="primary" plain text="粘贴链接"></u-button>
</view>
<view class="remove-submit-button">
<u-button @click="getAnalysisDate" type="primary" text="立即解析"></u-button>
</view>
</view>
<view style="margin-top: 20rpx;" class="remove-question">
<view class="remove-question-black">
<u--text text="觉得好用点击右上角 “···” 分享给你的朋友吧!"></u--text>
</view>
</view>
<view class="remove-question">
<view class="remove-question-black">
<u--text text="有问题?请看"></u--text>
</view>
<view class="remove-question-blue">
<u--text decoration="underline" @click="jumpPage('/pages/tool/shuiyin/problem')" type="primary"
text="教程和问题"></u--text>
</view>
</view>
</view>
<view v-if="adUnitId" style="width: 96%; margin-top: 30rpx;margin-left: 2%;">
<ad-custom :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</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> 或者看 <text
style="color: #3C9CFF;margin: 0 10rpx;">视频广告</text> 之后自动获取,存储与传输成本很高不得已加入广告回回血
</view>
<button @tap="nowDownJf" style="margin-bottom: 30rpx;width: 35%;height: 70rpx;font-size: 30rpx;"
class="cu-btn bg-blue"><text style="margin-right: 15rpx;font-size: 30rpx;"
class="cuIcon-vip"></text> 消耗积分</button>
<button @tap="nowDownImg" style="margin-bottom: 40rpx;width: 35%;height: 70rpx;font-size: 30rpx;margin-left: 50rpx;"
class="cu-btn bg-blue"><text style="margin-right: 15rpx;font-size: 30rpx;"
class="cuIcon-recordfill"></text> 观看广告</button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
</view>
</template>
<script>
let videoAd = null;
import {
delShuiYin,appGetUserById,exchangeResource,getConfigKey
} from "@/api/app/index.js"
export default {
data() {
return {
adUnitId: "",
adUnitId2: "",
isOpenAd: false,
videoAd_id: "",
interstitialAd_id: "",
input_url: "",
tabbarIndex: 1,
modalName: null,
needJf:6,
userId: null,
}
},
onShareAppMessage() {
return {
title: "图片视频水印快速去除支持抖音快手等100+平台",
imageUrl: "/static/appimg/share/shuiyin.jpg",
path: 'pages/tool/shuiyin',
}
},
onShareTimeline(){
return {
title:'图片视频水印快速去除支持抖音快手等100+平台',
query:{
},
imageUrl:'/static/appimg/share/shuiyin.jpg'
}
},
onLoad() {
this.adUnitId = uni.getStorageSync("sysSet").zyinfoAd
this.adUnitId2 = uni.getStorageSync("sysSet").downVideoAd
let _this = this;
this.userId = uni.getStorageSync("userInfo").userId
//获取公告
getConfigKey("miniapp.shuiyin.delintegral").then(response => {
_this.needJf = response.msg
}),
//初始化激励广告
this.CreateAd()
},
onShow() {
let _this = this;
},
methods: {
nowDownJf() {
let that = this;
this.modalName = null
uni.showModal({
title: '提示',
content: '确认要消耗 ' + that.needJf + " 积分兑换吗?",
success: function(res) {
if (res.confirm) {
// 执行确认后的操作
appGetUserById(that.userId).then(response => {
if (that.needJf > response.user.integral) {
uni.showModal({
title: '积分不足',
content: '您的积分为 '+response.user.integral+' ,签到做任务可获得积分',
cancelText: "取消",
confirmText: "获取积分",
confirmColor:'#ff0000',
cancelColor:'#000000',
success: function(res) {
if (res.confirm) {
// 执行确认后的操作
uni.switchTab({
url: '/pages/mine/index'
});
}
else {
// 执行取消后的操作
}
}
})
} else {
var formData = {
source: '视频/图片水印解析',
isAdd: 1,
integralNumber: that.needJf,
userId: that.userId,
}
exchangeResource(formData).then(response => {
that.openYse()
})
}
})
} else {
// 执行取消后的操作
}
}
})
},
hideModal() {
this.modalName = null
},
nowDownImg() {
if (videoAd) {
videoAd.show().catch(() => {
// 失败重试
videoAd.load()
.then(() => videoAd.show())
.catch(err => {
console.error('激励视频 广告显示失败', err)
})
})
}
},
CreateAd() {
var that = this;
if (this.adUnitId2 != '') {
if (wx.createRewardedVideoAd) {
videoAd = wx.createRewardedVideoAd({
adUnitId: this.adUnitId2
})
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.openYse()
} else {
this.modalName = null
//that.openYse()
}
})
}
}
},
getStrUrl(s) {
var reg = /(http:\/\/|https:\/\/)((\w|=|\?|\.|\/|&|-)+)/g;
var reg = /(https?|http|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g;
s = s.match(reg);
return (s && s.length ? s[0] : null);
},
openYse() {
let _this = this;
uni.showLoading({
title: '解析中...',
mask: true
});
let getUrl = _this.getStrUrl(_this.input_url)
delShuiYin({
url: getUrl
}).then(response => {
var dataMsg = JSON.parse(response.msg)
uni.hideLoading()
if (dataMsg.code != 200) {
uni.showModal({
title: '提示',
content: dataMsg.msg,
showCancel: false,
confirmText: "确定",
success: function(res) {
if (res.confirm) {
// 执行确认后的操作
}
else {
// 执行取消后的操作
}
}
})
} else {
var antoInfo = dataMsg.data.data_info
if (antoInfo.code != 200) {
uni.showToast({
title: antoInfo.msg,
icon: 'none',
duration: 4000
});
}else{
uni.setStorageSync("analysisData", antoInfo)
_this.input_url = ''
if (antoInfo.pics == "") {
_this.jumpPage("/pages/tool/shuiyin/video")
} else {
_this.jumpPage("/pages/tool/shuiyin/image")
}
}
}
})
},
getAnalysisDate() {
let _this = this;
if (_this.input_url == "" || _this.input_url == null) {
uni.showToast({
title: '请填写内容后解析哦!',
icon: 'none',
duration: 2000
});
} else {
let getUrl = _this.getStrUrl(_this.input_url)
if (getUrl == null) {
uni.showToast({
title: '糟糕!您填写的内容找不到解析地址,无法解析!',
icon: 'none',
duration: 2000
});
_this.input_url = ''
return;
}
_this.modalName = 'adModal'
}
},
pasteURL() {
let _this = this;
uni.getClipboardData({
success: function(res) {
// console.log(res.data)
_this.input_url = res.data
},
fail(e) {
console.log(e)
}
})
},
clearTextarea() {
let _this = this;
uni.showModal({
title: '提示',
content: '确定要清空当前输入框吗?',
success: res => {
if (res.confirm) {
_this.input_url = ""
}
}
})
},
jumpPage(url) {
this.$tab.navigateTo(url)
}
}
}
</script>
<style lang="scss">
page {
background-color: $u-bg-color;
}
.remove {
padding: 20rpx 20rpx 20rpx 20rpx;
}
.remove-title-clearButton {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.remove-textarea {
margin-top: 30rpx;
border-radius: 25rpx;
background-color: #f8f8f8;
box-shadow: 0px 5px 5px 0px #EDEDED;
}
.remove-clearButton {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.remove-title {
position: relative;
}
.remove-title-shadow {
position: absolute;
bottom: -20rpx;
font-style: italic;
opacity: 0.4;
padding-left: 10rpx;
}
.u-textarea[data-v-09988a29] {
border-radius: 12px;
background-color: #fff;
position: relative;
display: flex;
flex-direction: row;
flex: 1;
padding: 9px;
}
.remove-paste-submit-button {
padding-top: 35rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.remove-paste-button,
.remove-submit-button {
width: 45%;
box-shadow: 3px 3px 4px rgba(0, 102, 204, 0.2);
}
.remove-question {
width: 100%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding-top: 10rpx;
}
.remove-question-black {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding-right: 10rpx;
}
.remove-question-blue {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.ad-show {
width: 100%;
padding-top: 30rpx;
}
</style>

View File

@@ -1,286 +0,0 @@
<template>
<view class="body">
<view v-if="adUnitId" style="width: 94%; margin-left: 3%;">
<ad-custom :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view class="contents">
<view class="imagesContent">
<view class="titleContent">
<view class="title-content">
<u--text bold size="18" color="#0081ff" text="图集"></u--text>
</view>
<view class="title-shadow">
<u--text bold color="#0081ff" text="IMAGES"></u--text>
</view>
</view>
<view class="imagesContent-images">
<u-swiper @change="imageCurrentChange" imgMode="aspectFit" height="400" :list="imagesList"
previousMargin="30" nextMargin="30" circular :autoplay="false" radius="5" current="imageCurrent"
indicatorMode="dot" indicator indicatorInactiveColor="#3c9cff" indicatorActiveColor="red"
bgColor="#ffffff"></u-swiper>
</view>
<view class="imagesContent-buttonGroup">
<view class="imagesContent-buttonGroup-top">
<view class="imagesContent-buttonGroup-left">
<u-button @click="copyImageUrl" type="primary" plain text="复制链接"></u-button>
</view>
<view class="imagesContent-buttonGroup-right">
<u-button @click="download(imagesList[imageCurrent])" type="primary" text="下载单张"></u-button>
</view>
</view>
<view class="imagesContent-buttonGroup-bottom">
<u-button @click="downloadAll" type="primary" text="下载全部"></u-button>
</view>
</view>
</view>
<view class="copywritingContent">
<view class="titleContent">
<view class="title-content">
<u--text bold size="18" color="#0081ff" text="文案"></u--text>
</view>
<view class="title-shadow">
<u--text bold color="#0081ff" text="TITLE"></u--text>
</view>
</view>
<view class="copywritingContent-textarea">
<u--textarea maxlength="180" height="140" v-model="copywriting" placeholder="文案内容"></u--textarea>
</view>
<view class="copywritingContent-button">
<u-button @click="copyText(copywriting)" type="primary" text="复制文案"></u-button>
</view>
</view>
</view>
</view>
</template>
<script>
import {
addNewDownloadUrl
} from "@/api/app/index.js"
export default {
data() {
return {
adUnitId:"",
imageCurrent: 0,
isOpenAd: false,
videoAd_id: "",
imagesList: [],
copywriting: ""
}
},
onLoad() {
let _this = this;
this.adUnitId = uni.getStorageSync("sysSet").wzinfoAd
uni.getStorage({
key: 'analysisData',
success: function(res) {
_this.imagesList = res.data.pics
_this.copywriting = res.data.title
}
})
},
methods: {
imageCurrentChange(e) {
let _this = this;
_this.imageCurrent = e.current
},
copyImageUrl() {
let _this = this;
// console.log(this.imageCurrent)
_this.copyText(_this.imagesList[_this.imageCurrent])
},
downloadAll() {
let _this = this;
for (let i = 0; i < _this.imagesList.length; i++) {
_this.download(_this.imagesList[i])
}
},
download(url) {
let _this = this;
const downloadTask = uni.downloadFile({
url: url.replace('http://', 'https://'), //仅为示例,并非真实的资源
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
console.log('下载成功');
uni.saveImageToPhotosAlbum({
filePath: downloadRes.tempFilePath,
success() {
uni.hideLoading()
uni.showToast({
icon: "success",
title: "下载成功!"
})
},
fail: function(err) {
uni.hideLoading();
console.log(err)
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" ||
err
.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err
.errMsg ===
"saveImageToPhotosAlbum:fail authorize no response"
) {
// 这边微信做过调整,必须要在按钮中触发,因此需要在弹框回调中进行调用
uni.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: modalSuccess => {
uni.openSetting({
success(settingdata) {
console.log(
"settingdata",
settingdata)
if (settingdata
.authSetting[
'scope.writePhotosAlbum'
]) {
uni.showModal({
title: '提示',
content: '获取权限成功,再次点击图片即可保存',
showCancel: false,
})
} else {
uni.showModal({
title: '提示',
content: '获取权限失败,将无法保存到相册哦~',
showCancel: false,
})
}
},
fail(failData) {
console.log("failData",
failData)
},
complete(finishData) {
console.log(
"finishData",
finishData)
}
})
}
})
}
}
})
}
},
fail: (err) => {
uni.hideLoading()
if (err.errMsg.includes("fail url not in domain list")) {
addNewDownloadUrl(url.replace(/^https?:\/\/(.*?)(:\d+)?\/.*$/, '$1')).then(response => {}),
uni.showModal({
title: '提示',
content: '因为微信限制,下载失败,可以通过浏览器链接下载,是否复制链接自行去浏览器下载?',
success: (modalRes) => {
if (modalRes.confirm) {
_this.copyText(url)
}
}
});
} else {
uni.showModal({
title: '提示',
content: '下载失败了',
showCancel: false,
})
}
// console.log(err)
}
});
downloadTask.onProgressUpdate((downloadTaskRes) => {
uni.showLoading({
title: '下载进度' + downloadTaskRes.progress + '%',
mask:true
})
})
},
copyText(text) {
uni.setClipboardData({
data: text,
success: function(res) {
uni.showToast({
title: '复制成功',
});
},
fail() {
uni.showToast({
icon: "error",
title: '复制失败了'
});
}
});
}
}
}
</script>
<style lang="scss">
page {
background-color: $u-bg-color;
}
.ad-show {
width: 100%;
}
.contents {
padding: 20rpx 20rpx;
}
.imagesContent,
.copywritingContent {
margin-top: 30rpx;
padding: 30rpx 20rpx;
box-shadow: 3px 3px 4px rgba(26, 26, 26, 0.2);
background-color: white;
border-radius: 7px;
}
.titleContent {
position: relative;
}
.title-shadow {
position: absolute;
bottom: -20rpx;
font-style: italic;
opacity: 0.4;
padding-left: 10rpx;
}
.imagesContent-images,
.copywritingContent-textarea {
padding: 0 16rpx;
margin-top: 40rpx;
}
.imagesContent-buttonGroup {
padding-left: 20rpx;
padding-right: 20rpx;
padding-top: 30rpx;
display: flex;
flex-direction: column;
}
.imagesContent-buttonGroup-top {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.imagesContent-buttonGroup-bottom,
.copywritingContent-button {
padding-top: 25rpx;
width: 100%;
box-shadow: 3px 3px 4px rgba(0, 102, 204, 0.2);
}
.imagesContent-buttonGroup-left,
.imagesContent-buttonGroup-right {
width: 45%;
box-shadow: 3px 3px 4px rgba(0, 102, 204, 0.2);
}
</style>

View File

@@ -1,170 +0,0 @@
<template>
<view class="body">
<view class="course">
<view class="course-title">
<view class="title-content">
<u--text bold size="18" color="#0081ff" text="使用教程"></u--text>
</view>
<view class="title-shadow">
<u--text bold color="#0081ff" text="COURSE"></u--text>
</view>
</view>
<view class="course-body">
<view class="course-body-view">
<view class="course-body-view-title">
<u--text size="16" :text="courseTitle1"></u--text>
</view>
<view class="course-body-view-contents">
<view class="introduction-content">
<u--text size="14" :text="courseContent1"></u--text>
</view>
<view class="introduction-content-images">
<view class="introduction-content-image">
<u--image :showLoading="true" :src="showPic1_1" width="160px" height="160px"></u--image>
</view>
<view class="introduction-content-image">
<u--image :showLoading="true" :src="showPic1_2" width="160px" height="160px"></u--image>
</view>
</view>
</view>
</view>
<view class="course-body-view">
<view class="course-body-view-title">
<u--text size="16" :text="courseTitle2"></u--text>
</view>
<view class="course-body-view-contents">
<view class="introduction-content">
<u--text size="14" :text="courseContent2_1"></u--text>
</view>
<view class="introduction-content">
<u--text size="14" :text="courseContent2_2"></u--text>
</view>
<view class="introduction-content">
<u--text size="14" :text="courseContent2_3"></u--text>
</view>
<u--text type="error" size="14" :text="promptTitle"></u--text>
</view>
</view>
</view>
</view>
<view class="problem">
<view class="problem-title">
<view class="title-content">
<u--text bold size="18" color="#0081ff" text="常见问题"></u--text>
</view>
<view class="title-shadow">
<u--text bold color="#0081ff" text="PROBLEM"></u--text>
</view>
</view>
<view class="problem-body">
<view v-for="(item,index) in proContentList" :key="index" class="problem-body-view">
<view class="problem-body-view-title">
<u--text size="16" :text="item.problemTitle"></u--text>
</view>
<view class="problem-body-view-contents">
<view class="introduction-content">
<u--text size="14" :text="item.problemContent"></u--text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
courseTitle1: "01 如何复制视频链接",
courseContent1: "打开您的APP然后点击分享就会出现一个复制链接的选项点击复制链接(注意链接不要超过150字),然后来到小程序,粘贴链接再点解析就可以去水印了。",
showPic1_1: "https://www.myazurepicture.llgulugulu.top/api/picture/getImageByte?pid=075b593ed4c9000d027a9ce83936d815",
showPic1_2: "https://www.myazurepicture.llgulugulu.top/api/picture/getImageByte?pid=8e2e0e22653ab150c40fb1c0a12ecc56",
courseTitle2: "02 为什么下载失败",
courseContent2_1: "由于手机系统及微信的安全机制视频大小不能超过10M左右所以超过这个大小的视频需要解析成功后复制无水印链接到浏览器下载。",
courseContent2_2: "1、如果您是安卓手机直接复制无水印链接然后任意一个浏览器打开即可。",
courseContent2_3: "2、如果您是苹果手机需要下载软件 documents 才能在浏览器中进行下载视频。",
promptTitle: "温馨提示:进入下载界面请及时下载!若退出重新进入需要花费新的积分!",
proContentList: [{
problemTitle: "1、无法下载视频",
problemContent: "请先授权保存到手机相册的权限。由于手机系统及微信的安全机制视频大小不能超过10M左右所以超过这个大小的视频需要解析成功后复制无水印链接到浏览器下载。"
},
{
problemTitle: "2、为什么下载视频那么慢",
problemContent: "有些视频比较长,或者多人同时下载,会导致下载速度缓慢,可以点击旁边的【复制链接】按钮到手机浏览器上打开即可使用手机上的网速下载。"
},
{
problemTitle: "3、提示域名不合法等无法下载视频",
problemContent: "因为微信小程序需要配置download域名没有配置的则不能下载在您遇到不能下载的时候会记录此时的域名后续会手动加上。可以在解析成功后点击下载按钮旁边的【复制链接】按钮粘贴到手机浏览器打开即可下载。"
},
{
problemTitle: "4、为什么视频成功解析了还有水印",
problemContent: "视频自带的无法去除哦如果这个视频在该平台APP直接播放是没有水印的解析后却有水印请联系客服。"
},
{
problemTitle: "5、为什么小程序突然不能使用了显示网络错误",
problemContent: "因为每天的凌晨3点到3点半系统会进行自我维护这段时间暂时不可用其他时间段不能用请联系客服。"
},
]
}
}
}
</script>
<style lang="scss">
page {
background-color: $u-bg-color;
}
.course,
.problem {
padding: 20rpx 20rpx 5rpx 20rpx;
}
.course-title,
.problem-title {
position: relative;
}
.title-shadow {
position: absolute;
bottom: -20rpx;
font-style: italic;
opacity: 0.4;
padding-left: 10rpx;
}
.course-body,
.problem-body {
padding-top: 10rpx;
}
.course-body-view,
.problem-body-view {
padding-top: 20rpx;
}
.course-body-view-title,
.problem-body-view-title {
padding-bottom: 6rpx;
}
.introduction-content {
padding-top: 5rpx;
padding-bottom: 5rpx;
text-indent: 2em;
}
.introduction-content-images {
display: flex;
flex-direction: row;
}
.introduction-content-image {
width: 50%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
</style>

View File

@@ -1,421 +0,0 @@
<template>
<view class="body">
<view v-if="adUnitId" style="width: 94%; margin-left: 3%;">
<ad-custom :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view class="contents">
<view class="videoContent">
<view class="titleContent">
<view class="title-content">
<u--text bold size="18" color="#0081ff" text="视频"></u--text>
</view>
<view class="title-shadow">
<u--text bold color="#0081ff" text="VIDEO"></u--text>
</view>
</view>
<view class="videoContent-video">
<video :src="videoUrl" class="video" @error="videoErrorCallback"></video>
</view>
<view class="videoContent-buttonGroup">
<view class="videoContent-buttonGroup-left">
<u-button @click="copyText(videoUrl)" type="primary" plain text="复制链接"></u-button>
</view>
<view class="videoContent-buttonGroup-right">
<u-button @click="downloadVideo(videoUrl)" type="primary" text="保存视频"></u-button>
</view>
</view>
<view class="videoContent-problem">
<u--text @click="showTips" align="center" type="primary" decoration="underline"
text="下载失败?点我查看解决方案"></u--text>
</view>
</view>
<view class="coverContent">
<view class="titleContent">
<view class="title-content">
<u--text bold size="18" color="#0081ff" text="封面"></u--text>
</view>
<view class="title-shadow">
<u--text bold color="#0081ff" text="COVER"></u--text>
</view>
</view>
<view class="coverContent-image">
<u--image radius="7" mode="widthFix" :src="coverUrl" width="100%" height="auto"></u--image>
</view>
<view class="coverContent-buttonGroup">
<view class="coverContent-buttonGroup-left">
<u-button @click="copyText(coverUrl)" type="primary" plain text="复制链接"></u-button>
</view>
<view class="coverContent-buttonGroup-right">
<u-button @click="downloadImage(coverUrl)" type="primary" text="保存封面"></u-button>
</view>
</view>
</view>
<view class="copywritingContent">
<view class="titleContent">
<view class="title-content">
<u--text bold size="18" color="#0081ff" text="文案"></u--text>
</view>
<view class="title-shadow">
<u--text bold color="#0081ff" text="TITLE"></u--text>
</view>
</view>
<view class="copywritingContent-textarea">
<u--textarea maxlength="180" height="140" v-model="copywriting" placeholder="文案内容"></u--textarea>
</view>
<view class="copywritingContent-button">
<u-button @click="copyText(copywriting)" type="primary" text="复制文案"></u-button>
</view>
</view>
</view>
<u-toast ref="uToast"></u-toast>
</view>
</template>
<script>
// var App = require("@/common.js");
import {
addNewDownloadUrl
} from "@/api/app/index.js"
export default {
data() {
return {
adUnitId:"",
isOpenAd: false,
videoAd_id: "",
videoUrl: "",
audioUrl: "",
coverUrl: "",
copywriting: "",
}
},
onLoad() {
let _this = this;
this.adUnitId = uni.getStorageSync("sysSet").wzinfoAd
uni.getStorage({
key: 'analysisData',
success: function(res) {
console.log(res)
_this.videoUrl = res.data.url
_this.coverUrl = res.data.img
_this.copywriting = res.data.title
}
})
},
methods: {
downloadImage(url) {
let _this = this;
const downloadTask = uni.downloadFile({
url: url.replace('http://', 'https://'), //仅为示例,并非真实的资源
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
console.log('下载成功');
uni.saveImageToPhotosAlbum({
filePath: downloadRes.tempFilePath,
success() {
uni.hideLoading()
uni.showToast({
icon: "success",
title: "下载成功!"
})
},
fail: function(err) {
uni.hideLoading();
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" ||
err
.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err
.errMsg ===
"saveImageToPhotosAlbum:fail authorize no response"
) {
// 这边微信做过调整,必须要在按钮中触发,因此需要在弹框回调中进行调用
uni.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: modalSuccess => {
uni.openSetting({
success(settingdata) {
console.log(
"settingdata",
settingdata)
if (settingdata
.authSetting[
'scope.writePhotosAlbum'
]) {
uni.showModal({
title: '提示',
content: '获取权限成功,再次点击图片即可保存',
showCancel: false,
})
} else {
uni.showModal({
title: '提示',
content: '获取权限失败,将无法保存到相册哦~',
showCancel: false,
})
}
},
fail(failData) {
console.log("failData",
failData)
},
complete(finishData) {
console.log(
"finishData",
finishData)
}
})
}
})
}
}
})
}
},
fail: (err) => {
uni.hideLoading()
if (err.errMsg.includes("fail url not in domain list")) {
// App._get("/api/download/addNewDownloadUrl", {
// url: url.replace(/^https?:\/\/(.*?)(:\d+)?\/.*$/, '$1')
// }, res => {
// })
addNewDownloadUrl(url.replace(/^https?:\/\/(.*?)(:\d+)?\/.*$/, '$1')).then(response => {}),
uni.showModal({
title: '提示',
content: '因为微信限制,下载失败,可以通过浏览器链接下载,是否复制链接自行去浏览器下载?',
success: (modalRes) => {
if (modalRes.confirm) {
_this.copyText(url)
}
}
});
} else {
uni.showModal({
title: '提示',
content: '下载失败了',
showCancel: false,
})
}
// console.log(err)
}
});
downloadTask.onProgressUpdate((downloadTaskRes) => {
uni.showLoading({
title: '下载进度' + downloadTaskRes.progress + '%',
mask: true
})
})
},
downloadVideo(url) {
let _this = this;
this.$refs.uToast.show({
type: 'success',
title: '',
message: "下载中,请稍等 ",
icon: false
})
const downloadTask = uni.downloadFile({
url: url.replace('http://', 'https://'), //仅为示例,并非真实的资源
success: (downloadRes) => {
if (downloadRes.statusCode === 200) {
console.log('下载成功');
uni.saveVideoToPhotosAlbum({
filePath: downloadRes.tempFilePath,
success() {
uni.hideLoading()
uni.showToast({
icon: "success",
title: "下载成功!"
})
},
fail: function(err) {
uni.hideLoading();
if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" ||
err
.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err
.errMsg ===
"saveImageToPhotosAlbum:fail authorize no response"
) {
// 这边微信做过调整,必须要在按钮中触发,因此需要在弹框回调中进行调用
uni.showModal({
title: '提示',
content: '需要您授权保存相册',
showCancel: false,
success: modalSuccess => {
uni.openSetting({
success(settingdata) {
console.log(
"settingdata",
settingdata)
if (settingdata
.authSetting[
'scope.writePhotosAlbum'
]) {
uni.showModal({
title: '提示',
content: '获取权限成功,再次点击图片即可保存',
showCancel: false,
})
} else {
uni.showModal({
title: '提示',
content: '获取权限失败,将无法保存到相册哦~',
showCancel: false,
})
}
},
fail(failData) {
console.log("failData",
failData)
},
complete(finishData) {
console.log(
"finishData",
finishData)
}
})
}
})
}
}
})
}
},
fail: (err) => {
uni.hideLoading()
if (err.errMsg.includes("fail url not in domain list")) {
// App._get("/api/download/addNewDownloadUrl", {
// url: url.replace(/^https?:\/\/(.*?)(:\d+)?\/.*$/, '$1')
// }, res => {
// })
addNewDownloadUrl(url.replace(/^https?:\/\/(.*?)(:\d+)?\/.*$/, '$1')).then(response => {}),
uni.showModal({
title: '提示',
content: '因为微信限制,下载失败,可以通过浏览器链接下载,是否复制链接自行去浏览器下载?',
success: (modalRes) => {
if (modalRes.confirm) {
_this.copyText(url)
}
}
});
} else {
uni.showModal({
title: '提示',
content: '下载失败了',
showCancel: false,
})
}
// console.log(err)
}
});
downloadTask.onProgressUpdate((downloadTaskRes) => {
uni.showLoading({
title: '下载进度' + downloadTaskRes.progress + '%',
mask: true
})
})
},
videoErrorCallback: function(e) {
// console.log(e)
uni.showModal({
content: e.mp["@warning"],
showCancel: false
})
},
showTips() {
uni.showModal({
showCancel: false,
content: '点击“复制链接”到浏览器打开即可下载推荐使用QQ浏览器打开'
})
},
copyText(text) {
uni.setClipboardData({
data: text,
success: function(res) {
uni.showToast({
title: '复制成功',
});
},
fail() {
uni.showToast({
icon: "error",
title: '复制失败了'
});
}
});
}
}
}
</script>
<style lang="scss">
page {
background-color: $u-bg-color;
}
.ad-show {
width: 100%;
}
.contents {
padding: 20rpx 20rpx;
}
.videoContent,
.coverContent,
.copywritingContent {
margin-top: 30rpx;
padding: 30rpx 20rpx;
box-shadow: 3px 3px 4px rgba(26, 26, 26, 0.2);
background-color: white;
border-radius: 7px;
}
.titleContent {
position: relative;
}
.title-shadow {
position: absolute;
bottom: -20rpx;
font-style: italic;
opacity: 0.4;
padding-left: 10rpx;
}
.video {
width: 100%;
border-radius: 8px;
}
.videoContent-video,
.coverContent-image,
.copywritingContent-textarea {
padding: 0 16rpx;
margin-top: 40rpx;
}
.videoContent-buttonGroup,
.coverContent-buttonGroup,
.copywritingContent-button {
padding-left: 20rpx;
padding-right: 20rpx;
padding-top: 30rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.videoContent-buttonGroup-left,
.videoContent-buttonGroup-right,
.coverContent-buttonGroup-left,
.coverContent-buttonGroup-right {
width: 45%;
box-shadow: 3px 3px 4px rgba(0, 102, 204, 0.2);
}
.videoContent-problem {
margin-top: 30rpx;
}
</style>

View File

@@ -26,12 +26,12 @@
</view>
<view v-if="dataList.length != 0" class="bg-white padding">
<view class="grid margin-bottom col-2">
<view @click="info(item.id)" v-for="(item,index) in dataList" :key="index" class="grid-box">
<view v-for="(item,index) in dataList" :key="index" class="grid-box">
<view style="width: 327rpx;height: 377rpx;background-color: white;overflow: hidden;" v-if="item.ad == 1">
<ad-custom style="height: 377rpx !important;" :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view v-else>
<image class="grid-img" :src="item.showImg"></image>
<view v-else @click="info(item.id)">
<image class="grid-img" :src="$image.resourceThumbnail(item)" lazy-load mode="aspectFill"></image>
<view class="grid-name">{{item.resourceTitle}}</view>
<!-- <view v-if="item.isAd == 0" class="ad">激励广告</view> -->
<view class="notad">获取详情</view>
@@ -347,4 +347,4 @@
overflow: hidden;
position: relative;
}
</style>
</style>

View File

@@ -38,7 +38,7 @@
<ad-custom style="height: 655rpx !important;" :unit-id="adUnitId" ad-intervals="30" ></ad-custom>
</view>
<view v-else>
<image class="grid-img" :src="item.compressImgUrl"></image>
<image class="grid-img" :src="$image.original(item.compressImgUrl)" lazy-load mode="aspectFill"></image>
<view class="info-img">
<view class="flex justify-between">
<view v-if="item.isAd != 0" class="img-type"><text class="cuIcon-rechargefill"></text> 免费获取</view>
@@ -440,4 +440,4 @@
margin: 20rpx auto;
overflow: hidden;
}
</style>
</style>