feat:初始提交uni-app项目

This commit is contained in:
2026-01-14 18:19:33 +08:00
commit 0dcbd340e6
515 changed files with 38560 additions and 0 deletions

View File

@@ -0,0 +1 @@
"use strict";const e=require("../../common/vendor.js"),a=require("../../utils/system.js"),l=require("../../api/apis.js");if(!Array){(e.resolveComponent("uni-icons")+e.resolveComponent("uni-dateformat")+e.resolveComponent("uni-rate")+e.resolveComponent("uni-popup"))()}Math||((()=>"../../uni_modules/uni-icons/components/uni-icons/uni-icons.js")+(()=>"../../uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.js")+(()=>"../../uni_modules/uni-rate/components/uni-rate/uni-rate.js")+(()=>"../../uni_modules/uni-popup/components/uni-popup/uni-popup.js"))();const o={__name:"preview",setup(o){const i=e.ref(!0),t=e.ref(null),u=e.ref({}),n=e.ref(null),s=e.ref(0),r=e.ref(!1),c=e.ref([]),p=e.ref(null),d=e.ref(0),v=e.ref([]),m=e.index.getStorageSync("storgClassList")||[];c.value=m.map((e=>({...e,picurl:e.smallPicurl.replace("_small.webp",".jpg")}))),e.onLoad((async e=>{if(p.value=e.id,"share"==e.type){let e=await l.apiDetailWall({id:p.value});c.value=e.data.map((e=>({...e,picurl:e.smallPicurl.replace("_small.webp",".jpg")})))}d.value=c.value.findIndex((e=>e._id==p.value)),h(),u.value=c.value[d.value]}));const f=e=>{d.value=e.detail.current,h(),u.value=c.value[d.value]},h=()=>{v.value.push(d.value<=0?c.value.length-1:d.value-1,d.value,d.value>=c.value.length-1?0:d.value+1),v.value=[...new Set(v.value)]},g=()=>{t.value.open()},w=()=>{t.value.close()},x=()=>{u.value.userScore&&(r.value=!0,s.value=u.value.userScore),n.value.open()},y=()=>{n.value.close(),s.value=0,r.value=!1},b=async()=>{e.index.showLoading({title:"加载中..."});let{classid:a,_id:o}=u.value,i=await l.apiGetSetScore({classid:a,wallId:o,userScore:s.value});e.index.hideLoading(),0===i.errCode&&e.index.showToast({title:"评分成功",icon:"none"}),c.value[d.value].userScore=s.value,e.index.setStorageSync("storgClassList",c.value),y()},_=()=>{i.value=!i.value},S=()=>{e.index.navigateBack({success:()=>{},fail:a=>{e.index.reLaunch({url:"/pages/index/index"})}})},C=async()=>{try{e.index.showLoading({title:"下载中...",mask:!0});let{classid:a,_id:o}=u.value,i=await l.apiWriteDownload({classid:a,wallId:o});if(0!=i.errCode)throw i;e.index.getImageInfo({src:u.value.picurl,success:a=>{e.index.saveImageToPhotosAlbum({filePath:a.path,success:a=>{e.index.showToast({title:"保存成功,请到相册查看",icon:"none"})},fail:a=>{"saveImagePhotoAlbum:fail cancel"!=a.errMsg?e.index.showModal({title:"授权提示",content:"需要授权保存相册",success:a=>{a.confirm&&e.index.openSetting({success:a=>{console.log(a),a.authSetting["scope.writePhotosAlbum"]?e.index.showToast({title:"获取授权成功",icon:"none"}):e.index.showToast({title:"获取权限失败",icon:"none"})}})}}):e.index.showToast({title:"保存失败,请重新点击下载",icon:"none"})},complete:()=>{e.index.hideLoading()}})}})}catch(a){e.index.hideLoading()}};return e.onShareAppMessage((e=>({title:"hzb壁纸-",path:"/pages/preview/preview?id="+p.value+"&type=share"}))),e.onShareTimeline((()=>({title:"hzb壁纸~~~",query:"id="+p.value+"&type=share"}))),(l,o)=>({a:e.f(c.value,((a,l,o)=>e.e({a:v.value.includes(l)},v.value.includes(l)?{b:e.o(_,a._id),c:a.picurl}:{},{d:a._id}))),b:d.value,c:e.o(f),d:e.p({type:"back",color:"#fff",size:"20"}),e:e.o(S),f:e.unref(a.getPreviewBarHeight)()+"px",g:e.t(d.value+1),h:e.t(c.value.length),i:e.p({date:Date.now(),format:"hh:mm"}),j:e.p({date:Date.now(),format:"MM月dd日"}),k:e.p({type:"info",size:"23"}),l:e.o(g),m:e.p({type:"star",size:"23"}),n:e.t(u.value.score),o:e.o(x),p:e.p({type:"download",size:"23"}),q:e.o(C),r:i.value,s:e.p({type:"closeempty",size:"18",color:"#999"}),t:e.o(w),v:e.t(u.value._id),w:e.t(u.value.nickname),x:e.p({readonly:!0,touchable:!1,value:u.value.score,size:"16"}),y:e.t(u.value.score),z:e.t(u.value.description),A:e.f(u.value.tabs,((a,l,o)=>({a:e.t(a),b:a}))),B:e.sr(t,"d9b78fb0-6",{k:"infoPopup"}),C:e.p({type:"bottom"}),D:e.t(r.value?"已经评分过了~":"壁纸评分"),E:e.p({type:"closeempty",size:"18",color:"#999"}),F:e.o(y),G:e.o(l.onChange),H:e.o((e=>s.value=e)),I:e.p({disabled:r.value,"disabled-color":"#FFCA3E",allowHalf:!0,modelValue:s.value}),J:e.t(s.value),K:e.o(b),L:!s.value||r.value,M:e.sr(n,"d9b78fb0-9",{k:"scorePopup"}),N:e.p({"is-mask-click":!1})})}},i=e._export_sfc(o,[["__scopeId","data-v-d9b78fb0"]]);o.__runtimeHooks=6,wx.createPage(i);

View File

@@ -0,0 +1,10 @@
{
"navigationBarTitleText": "预览",
"navigationStyle": "custom",
"usingComponents": {
"uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons",
"uni-dateformat": "../../uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat",
"uni-rate": "../../uni_modules/uni-rate/components/uni-rate/uni-rate",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

View File

@@ -0,0 +1 @@
<view class="preview data-v-d9b78fb0"><swiper class="data-v-d9b78fb0" circular="{{true}}" current="{{b}}" bindchange="{{c}}"><swiper-item wx:for="{{a}}" wx:for-item="item" wx:key="d" class="data-v-d9b78fb0"><image wx:if="{{item.a}}" class="data-v-d9b78fb0" bindtap="{{item.b}}" src="{{item.c}}" mode="aspectFill"></image></swiper-item></swiper><view class="mask data-v-d9b78fb0" hidden="{{!r}}"><view class="goBack data-v-d9b78fb0" bindtap="{{e}}" style="{{'top:' + f}}"><uni-icons wx:if="{{d}}" class="data-v-d9b78fb0" u-i="d9b78fb0-0" bind:__l="__l" u-p="{{d}}"></uni-icons></view><view class="count data-v-d9b78fb0">{{g}} / {{h}}</view><view class="time data-v-d9b78fb0"><uni-dateformat wx:if="{{i}}" class="data-v-d9b78fb0" u-i="d9b78fb0-1" bind:__l="__l" u-p="{{i}}"></uni-dateformat></view><view class="date data-v-d9b78fb0"><uni-dateformat wx:if="{{j}}" class="data-v-d9b78fb0" u-i="d9b78fb0-2" bind:__l="__l" u-p="{{j}}"></uni-dateformat></view><view class="footer data-v-d9b78fb0"><view class="box data-v-d9b78fb0" bindtap="{{l}}"><uni-icons wx:if="{{k}}" class="data-v-d9b78fb0" u-i="d9b78fb0-3" bind:__l="__l" u-p="{{k}}"></uni-icons><view class="text data-v-d9b78fb0">信息</view></view><view class="box data-v-d9b78fb0" bindtap="{{o}}"><uni-icons wx:if="{{m}}" class="data-v-d9b78fb0" u-i="d9b78fb0-4" bind:__l="__l" u-p="{{m}}"></uni-icons><view class="text data-v-d9b78fb0">{{n}}分</view></view><view class="box data-v-d9b78fb0" bindtap="{{q}}"><uni-icons wx:if="{{p}}" class="data-v-d9b78fb0" u-i="d9b78fb0-5" bind:__l="__l" u-p="{{p}}"></uni-icons><view class="text data-v-d9b78fb0">下载</view></view></view></view><uni-popup wx:if="{{C}}" class="r data-v-d9b78fb0" u-s="{{['d']}}" u-r="infoPopup" u-i="d9b78fb0-6" bind:__l="__l" u-p="{{C}}"><view class="infoPopup data-v-d9b78fb0"><view class="popHeader data-v-d9b78fb0"><view class="data-v-d9b78fb0"></view><view class="title data-v-d9b78fb0">壁纸信息</view><view class="close data-v-d9b78fb0" bindtap="{{t}}"><uni-icons wx:if="{{s}}" class="data-v-d9b78fb0" u-i="d9b78fb0-7,d9b78fb0-6" bind:__l="__l" u-p="{{s}}"></uni-icons></view></view><scroll-view class="data-v-d9b78fb0" scroll-y="{{true}}"><view class="content data-v-d9b78fb0"><view class="row data-v-d9b78fb0"><view class="label data-v-d9b78fb0">壁纸ID</view><text selectable class="value data-v-d9b78fb0">{{v}}</text></view><view class="row data-v-d9b78fb0"><view class="label data-v-d9b78fb0">发布者:</view><text class="value data-v-d9b78fb0">{{w}}</text></view><view class="row data-v-d9b78fb0"><text class="label data-v-d9b78fb0">评分:</text><view class="value roteBox data-v-d9b78fb0"><uni-rate wx:if="{{x}}" class="data-v-d9b78fb0" u-i="d9b78fb0-8,d9b78fb0-6" bind:__l="__l" u-p="{{x}}"/><text class="score data-v-d9b78fb0">{{y}}</text></view></view><view class="row data-v-d9b78fb0"><text class="label data-v-d9b78fb0">摘要:</text><view class="value data-v-d9b78fb0">{{z}}</view></view><view class="row data-v-d9b78fb0"><text class="label data-v-d9b78fb0">标签:</text><view class="value tabs data-v-d9b78fb0"><view wx:for="{{A}}" wx:for-item="tab" wx:key="b" class="tab data-v-d9b78fb0">{{tab.a}}</view></view></view><view class="copyright data-v-d9b78fb0"> 声明本图片来用户投稿非商业使用用于免费学习交流如侵犯了您的权益您可以拷贝壁纸ID举报至平台邮箱513894357@qq.com管理将删除侵权壁纸维护您的权益。 </view><view class="safe-area-inset-bottom data-v-d9b78fb0"></view></view></scroll-view></view></uni-popup><uni-popup wx:if="{{N}}" class="r data-v-d9b78fb0" u-s="{{['d']}}" u-r="scorePopup" u-i="d9b78fb0-9" bind:__l="__l" u-p="{{N}}"><view class="scorePopup data-v-d9b78fb0"><view class="popHeader data-v-d9b78fb0"><view class="data-v-d9b78fb0"></view><view class="title data-v-d9b78fb0">{{D}}</view><view class="close data-v-d9b78fb0" bindtap="{{F}}"><uni-icons wx:if="{{E}}" class="data-v-d9b78fb0" u-i="d9b78fb0-10,d9b78fb0-9" bind:__l="__l" u-p="{{E}}"></uni-icons></view></view><view class="content data-v-d9b78fb0"><uni-rate wx:if="{{I}}" class="data-v-d9b78fb0" bindchange="{{G}}" u-i="d9b78fb0-11,d9b78fb0-9" bind:__l="__l" bindupdateModelValue="{{H}}" u-p="{{I}}"/><text class="text data-v-d9b78fb0">{{J}}分</text></view><view class="footer data-v-d9b78fb0"><button class="data-v-d9b78fb0" bindtap="{{K}}" disabled="{{L}}" type="default" size="mini" plain>确认评分</button></view></view></uni-popup></view>

View File

@@ -0,0 +1 @@
.preview.data-v-d9b78fb0{width:100%;height:100vh;position:relative}.preview swiper.data-v-d9b78fb0{width:100%;height:100%}.preview swiper image.data-v-d9b78fb0{width:100%;height:100%}.preview .mask .goBack.data-v-d9b78fb0{position:absolute;left:0;right:0;width:-webkit-fit-content;width:fit-content;color:#fff;width:38px;height:38px;background:rgba(0,0,0,.5);left:30rpx;top:0;margin:auto auto auto 0;border-radius:100px;-webkit-backdrop-filter:blur(10rpx);backdrop-filter:blur(10rpx);border:1px solid rbga(255,255,255,.3);display:flex;justify-content:center;align-items:center}.preview .mask .count.data-v-d9b78fb0{position:absolute;top:10vh;left:0;right:0;margin:auto;width:-webkit-fit-content;width:fit-content;background:rgba(0,0,0,.3);font-size:28rpx;color:#fff;border-radius:40rpx;padding:8rpx 28rpx;-webkit-backdrop-filter:blur(20rpx);backdrop-filter:blur(20rpx)}.preview .mask .time.data-v-d9b78fb0{position:absolute;left:0;right:0;margin:auto;width:-webkit-fit-content;width:fit-content;color:#fff;top:calc(10vh + 80rpx);font-size:140rpx;font-weight:100rpx;line-height:1em;text-shadow:0 4rpx rgba(0,0,0,.3)}.preview .mask .date.data-v-d9b78fb0{position:absolute;left:0;right:0;margin:auto;width:-webkit-fit-content;width:fit-content;color:#fff;top:calc(10vh + 230rpx);font-size:34rpx;text-shadow:0 2rpx rgba(0,0,0,.3)}.preview .mask .footer.data-v-d9b78fb0{position:absolute;left:0;right:0;margin:auto;width:-webkit-fit-content;width:fit-content;color:#fff;background:rgba(255,255,255,.8);bottom:10vh;width:65vw;height:120rpx;border-radius:120rpx;color:#000;display:flex;justify-content:space-around;align-items:center;box-shadow:0 2rpx rgba(0,0,0,.1);-webkit-backdrop-filter:blur(20rpx);backdrop-filter:blur(20rpx)}.preview .mask .footer .box.data-v-d9b78fb0{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:2rpx 12rpx}.preview .mask .footer .box .text.data-v-d9b78fb0{font-size:26rpx;color:#676767}.preview .popHeader.data-v-d9b78fb0{display:flex;justify-content:space-between;align-items:center}.preview .popHeader .title.data-v-d9b78fb0{color:#676767;font-size:26rpx}.preview .popHeader .close.data-v-d9b78fb0{padding:6rpx}.preview .infoPopup.data-v-d9b78fb0{background:#fff;padding:30rpx;border-radius:30rpx 30rpx 0 0;overflow:hidden}.preview .infoPopup scroll-view.data-v-d9b78fb0{max-height:60vh}.preview .infoPopup scroll-view .content .row.data-v-d9b78fb0{display:flex;padding:16rpx 0;font-size:32rpx;line-height:1.7em}.preview .infoPopup scroll-view .content .row .label.data-v-d9b78fb0{color:#a7a7a7;width:140rpx;text-align:right;font-size:30rpx}.preview .infoPopup scroll-view .content .row .value.data-v-d9b78fb0{flex:1;width:0;font-size:30rpx}.preview .infoPopup scroll-view .content .row .roteBox.data-v-d9b78fb0{display:flex;align-items:center}.preview .infoPopup scroll-view .content .row .roteBox .score.data-v-d9b78fb0{font-size:26rpx;color:#676767;padding-left:10rpx}.preview .infoPopup scroll-view .content .row .tabs.data-v-d9b78fb0{display:flex;white-space:wrap}.preview .infoPopup scroll-view .content .row .tabs .tab.data-v-d9b78fb0{border:1px solid #28B389;color:#28b389;font-size:22rpx;padding:10rpx 30rpx;border-radius:40rpx;line-height:1em;margin:0 10rpx 10rpx 0}.preview .infoPopup scroll-view .content .row .class.data-v-d9b78fb0{color:#28b389}.preview .infoPopup scroll-view .content .copyright.data-v-d9b78fb0{font-size:28rpx;padding:20rpx;background:#f6f6f6;color:#666;border-radius:10rpx;margin:20rpx 0;line-height:1.5em}.preview .scorePopup.data-v-d9b78fb0{background:#fff;padding:30rpx;width:70vw;border-radius:30rpx;overflow:hidden}.preview .scorePopup .content.data-v-d9b78fb0{padding:30rpx 0;display:flex;justify-content:center;align-items:center}.preview .scorePopup .content .text.data-v-d9b78fb0{color:#ffca3e;padding-left:10rpx;width:80rpx;line-height:1em;text-align:right}.preview .scorePopup .footer.data-v-d9b78fb0{display:flex;justify-content:center;align-items:center}