From 6cb6b9806701e77456ba3d82477afab3e600367e Mon Sep 17 00:00:00 2001
From: Double-_-Z <2492419643@qq.com>
Date: Fri, 7 Feb 2025 18:25:56 +0800
Subject: [PATCH] =?UTF-8?q?=E5=86=8D=E6=9B=B4=E6=96=B0=E5=B0=8F=E7=A8=8B?=
=?UTF-8?q?=E5=BA=8F=E5=85=BC=E5=AE=B9=E8=B0=83=E8=8A=82=EF=BC=8C=E5=89=A9?=
=?UTF-8?q?=E4=B8=8B=E4=B8=BB=E8=A6=81=E6=98=AF=E7=80=91=E5=B8=83=E6=B5=81?=
=?UTF-8?q?=E5=9B=BE=E7=89=87=E4=BA=A4=E4=BA=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mobile_web/home/home.vue | 28 ++++++
pages/mobile_web/index/index.vue | 17 +++-
pages/mobile_web/wall/detail.vue | 155 +++++++++++++++++++++++++++++--
pages/mobile_web/work/work.vue | 34 ++++++-
4 files changed, 221 insertions(+), 13 deletions(-)
diff --git a/pages/mobile_web/home/home.vue b/pages/mobile_web/home/home.vue
index 5d94df0..035be45 100644
--- a/pages/mobile_web/home/home.vue
+++ b/pages/mobile_web/home/home.vue
@@ -80,9 +80,19 @@
:image="item.path">
{{ item.serviceName || '暂无' }}
+
+
+
+
+
+
+
+
+
+
做同款
@@ -95,9 +105,19 @@
:image="item.path">
{{ item.serviceName || '暂无' }}
+
+
+
+
+
+
+
+
+
+
做同款
@@ -259,12 +279,20 @@ export default {
this.workList = result.map((item)=>{
let nowResult = {...item,path: that.getWorkPath(item.path)};
if(nowResult.sourcePath) nowResult.sourcePath = that.getWorkPath(item.sourcePath);
+ // #ifdef MP
+ nowResult.magicWand = that.fileUrl+that.magicWand;
+ nowResult.signIcon = that.fileUrl+that.sign;
+ // #endif
return nowResult;
});
}else{
this.workList.push(...result.map((item)=>{
let nowResult = {...item,path: that.getWorkPath(item.path)};
if(nowResult.sourcePath) nowResult.sourcePath = that.getWorkPath(item.sourcePath);
+ // #ifdef MP
+ nowResult.magicWand = that.fileUrl+that.magicWand;
+ nowResult.signIcon = that.fileUrl+that.sign;
+ // #endif
return nowResult;
}));
}
diff --git a/pages/mobile_web/index/index.vue b/pages/mobile_web/index/index.vue
index 41910b7..84e62c4 100644
--- a/pages/mobile_web/index/index.vue
+++ b/pages/mobile_web/index/index.vue
@@ -75,8 +75,8 @@ export default {
// #endif
this.scrollTop = e.scrollTop;
},
-
- onShow(){
+ // #ifdef MP
+ onLoad(){
let index = uni.getStorageSync('current');
this.current = index?index:0;
this.isLogin = this.$store.state.vuex_token;
@@ -84,6 +84,19 @@ export default {
uni.pageScrollTo({scrollTop: 0});
}
this.changeCurrent(this.current);
+ },
+ // #endif
+ onShow(){
+ // 小程序不要刷新
+ // #ifndef MP
+ let index = uni.getStorageSync('current');
+ this.current = index?index:0;
+ this.isLogin = this.$store.state.vuex_token;
+ if(this.current === 1){
+ uni.pageScrollTo({scrollTop: 0});
+ }
+ this.changeCurrent(this.current);
+ // #endif
// #ifndef H5
},
// #endif
diff --git a/pages/mobile_web/wall/detail.vue b/pages/mobile_web/wall/detail.vue
index b6f51c2..db5d04e 100644
--- a/pages/mobile_web/wall/detail.vue
+++ b/pages/mobile_web/wall/detail.vue
@@ -41,16 +41,26 @@
-
+
+ :image="item.watermarkPath">
{{ item.serviceName || '暂无' }}
+
+
+
+
+
+
+
+
+
+
做同款
-
+
@@ -58,16 +68,26 @@
-
+
+ :image="item.watermarkPath">
{{ item.serviceName || '暂无' }}
+
+
+
+
+
+
+
+
+
+
做同款
-
+
@@ -316,9 +336,17 @@ export default {
// 获取作品墙
async getPhotos(){
try{
+ let that = this;
let res = await this.$api.allPictureWall({labelId: this.labelId});
if(res?.success){
- this.photos = res.data;
+ this.photos = res.data.map((item)=>{
+ let nowResult = {...item,watermarkPath: that.getPhotoPath(item.watermarkPath)};
+ // #ifdef MP
+ nowResult.magicWand = that.fileUrl+that.magicWand;
+ nowResult.signIcon = that.fileUrl+that.sign;
+ // #endif
+ return nowResult;
+ });
// this.$forceUpdate();
}else{
this.$refs.uToast.show({type:'error',title: "作品墙内容获取失败!"});
@@ -715,4 +743,117 @@ export default {
opacity: 0;
}
}
+// #ifdef MP
+.work-item-odd{
+ margin-right: 0.5em;
+ margin-left: 1em;
+}
+.work-item-even{
+ margin-left: 0.5em;
+ margin-right: 1em;
+}
+.photo-lam{
+ -webkit-column-break-inside: avoid;
+ break-inside: avoid; /*防止断点*/
+ margin-bottom: 1em;
+ position: relative;
+ padding-top: 12rpx;
+ .display-photo{
+ border-radius: 30rpx;
+ // 骗系统开启硬件加速
+ transform: transition3d(0, 0, 0);
+ // 防止图片加载“闪一下”
+ will-change: transform;
+ box-shadow: 0 0 20rpx #696969;
+ }
+ .work-todo{
+ position: absolute;
+ bottom: 0.85em;
+ right: 0.7em;
+ z-index: 1;
+ border-radius: 12rpx;
+ padding: 14rpx 30rpx;
+ background-color: rgba(0, 0, 0, 0.3);
+ display: flex;
+ align-items: center;
+ text{
+ font-weight: bold;
+ background-image: linear-gradient(to right, #cdfbf2 0%, #a3d4ff 100%);
+ background-clip: text;
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+ image{
+ margin-right: 10rpx;
+ width: 34rpx;
+ height: 34rpx;
+ }
+ &:active{
+ opacity: 0.8;
+ }
+ }
+ .sign-text{
+ width: 140rpx;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ color: #ffffff;
+ font-size: 28rpx;
+ position: absolute;
+ top: 0.85em;
+ left: 0.9em;
+ z-index: 1;
+ }
+ .sign{
+ border: none;
+ border-radius: 0;
+ position: absolute;
+ top: 0.8em;
+ left: 0.6em;
+ width: 170rpx;
+ height: 47rpx;
+ }
+ .compare-sign{
+ position: absolute;
+ left: 0;
+ bottom: 0.2em;
+ width: 120rpx;
+ height: 50%;
+ border: 0.1em solid #d5ff00;
+ border-radius: 20rpx;
+ box-shadow: 0 0 20rpx #eee;
+ // box-shadow: rgba(213, 255, 0, 0.3) 0px 4px 12px;
+ }
+ .hideMask {
+ animation-duration: calc(1s * 0.75);
+ animation-fill-mode: both;
+ animation-name: hideMask !important;
+ }
+ .item-mask{
+ z-index: 1;
+ position: absolute;
+ top: 0;
+ margin-top: 12rpx;
+ width: 100%;
+ height: calc(100% - 12rpx);
+ display: flex;
+ flex-wrap: wrap;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-color: rgba(0, 0, 0, 0.6);
+ border-radius: 30rpx;
+ animation-duration: 0.8s;
+ animation-name: showMask;
+ button{
+ border-radius: 56rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 24rpx;
+ color: #f9f9f9;
+ }
+ }
+}
+// #endif
\ No newline at end of file
diff --git a/pages/mobile_web/work/work.vue b/pages/mobile_web/work/work.vue
index a21b6ae..3e88151 100644
--- a/pages/mobile_web/work/work.vue
+++ b/pages/mobile_web/work/work.vue
@@ -42,7 +42,12 @@
{{ item.type || '暂无' }}
+
+
+
+
+
@@ -56,7 +61,12 @@
{{ item.type || '暂无' }}
+
+
+
+
+
@@ -189,11 +199,19 @@ export default {
const result = records;
if(current === 1){
this.workList = result.map((item)=>{
- return {...item,path: that.getImagePath(item.path),display:0,mask:0};
+ let nowResult = {...item,path: that.getImagePath(item.path),display:0,mask:0};
+ // #ifdef MP
+ nowResult.signIcon = that.fileUrl+that.sign;
+ // #endif
+ return nowResult;
});
}else{
this.workList.push(...result.map((item)=>{
- return {...item,path: that.getImagePath(item.path),display:0,mask:0};
+ let nowResult = {...item,path: that.getImagePath(item.path),display:0,mask:0};
+ // #ifdef MP
+ nowResult.signIcon = that.fileUrl+that.sign;
+ // #endif
+ return nowResult;
}));
}
this.workForm.total = total;
@@ -213,11 +231,19 @@ export default {
const result = records;
if(current === 1){
this.collectList = result.map((item)=>{
- return {...item,path: that.getImagePath(item.path)};
+ let nowResult = {...item,path: that.getImagePath(item.path),display:0,mask:0};
+ // #ifdef MP
+ nowResult.signIcon = that.fileUrl+that.sign;
+ // #endif
+ return nowResult;
});
}else{
this.collectList.push(...result.map((item)=>{
- return {...item,path: that.getImagePath(item.path)};
+ let nowResult = {...item,path: that.getImagePath(item.path),display:0,mask:0};
+ // #ifdef MP
+ nowResult.signIcon = that.fileUrl+that.sign;
+ // #endif
+ return nowResult;
}));
}
this.collectForm.total = total;