From dde6528455b91d992b252195a6f44ed7aa93e7b4 Mon Sep 17 00:00:00 2001
From: Double-_-Z <2492419643@qq.com>
Date: Mon, 30 Dec 2024 19:01:03 +0800
Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8Dapp=E7=AB=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 3 +-
common/config.service.js | 7 ++
common/ossutil/ossWebUpload.js | 5 ++
manifest.json | 73 ++++++++++---------
pages/index/rich-detail.vue | 8 ++
pages/index/webview.vue | 4 +-
pages/mobile_web/home/home.vue | 34 ++++++++-
pages/mobile_web/my/child_pages/contact.vue | 8 ++
pages/mobile_web/my/child_pages/create.vue | 30 +++++---
pages/mobile_web/my/child_pages/login.vue | 8 ++
pages/mobile_web/my/child_pages/recharge.vue | 8 ++
pages/mobile_web/my/child_pages/setting.vue | 8 ++
pages/mobile_web/my/child_pages/share.vue | 71 ++++++++++++++----
pages/mobile_web/work/work.vue | 4 +-
.../workshops/components/dress_select.vue | 6 +-
pages/mobile_web/workshops/index.vue | 48 ++++++++++--
16 files changed, 252 insertions(+), 73 deletions(-)
create mode 100644 pages/mobile_web/my/child_pages/recharge.vue
diff --git a/.gitignore b/.gitignore
index d20465a..b086004 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,7 @@
.DS_Store
# 忽略项目编译后的文件
-unpackage/dist
-unpackage/cache
+unpackage
node_modules/
dist/
diff --git a/common/config.service.js b/common/config.service.js
index 3c4d437..7c2d62a 100644
--- a/common/config.service.js
+++ b/common/config.service.js
@@ -1,5 +1,12 @@
// 接口环境
+
+// #ifdef H5
let BASE_URL = '/pixelApi';
+// #endif
+// #ifdef APP-PLUS ||MP
+let BASE_URL = 'http://8.138.171.103/pixelApi';
+// #endif
+
let IP = 'http://8.138.171.103/';// 测试环境
// let IP = 'http://1.12.224.227/';// 正式环境
let FILE_URL = IP+'static/';
diff --git a/common/ossutil/ossWebUpload.js b/common/ossutil/ossWebUpload.js
index e2078b5..fbe2753 100644
--- a/common/ossutil/ossWebUpload.js
+++ b/common/ossutil/ossWebUpload.js
@@ -44,7 +44,12 @@ const ossUpload = async(vm,filePath,success) => {
let res = await vm.$api.getOssSignal();
if(res?.success){
resultPath = res.data.substring(0, res.data.indexOf("?"));
+ // #ifdef H5
clientPath = res.data.replace(configService.aliUrl, "/ossUpload");
+ // #endif
+ // #ifndef H5
+ clientPath = res.data;
+ // #endif
// clientPath = res.data.replace(configService.aliAsyncUrl, "/asyncOssUpload");
}
getImageBase64(vm,filePath,success);
diff --git a/manifest.json b/manifest.json
index 479261d..598f3d7 100644
--- a/manifest.json
+++ b/manifest.json
@@ -102,51 +102,54 @@
"devServer" : {
"disableHostCheck" : true,
"proxy" : {
- "/pixelApi" : {
- "target" : "http://8.138.171.103/pixelApi",// 测试环境
- // "target" : "http://1.12.224.227/pixelApi",// 正式环境
- "changeOrigin" : true,
- "secure" : true,
- "ws" : false,
- "pathRewrite" : {
- "^/pixelApi" : ""
- }
- },
+ "/pixelApi" : {
+ "target" : "http://8.138.171.103/pixelApi", // 测试环境
+
+ // "target" : "http://1.12.224.227/pixelApi",// 正式环境
+ "changeOrigin" : true,
+ "secure" : true,
+ "ws" : false,
+ "pathRewrite" : {
+ "^/pixelApi" : ""
+ }
+ },
"/upload" : {
- "target" : "http://8.138.171.103",// 测试环境
- // "target" : "http://1.12.224.227",// 正式环境
+ "target" : "http://8.138.171.103", // 测试环境
+
+ // "target" : "http://1.12.224.227",// 正式环境
"changeOrigin" : true,
"secure" : true,
"ws" : false
},
"/aiupload" : {
- "target" : "http://8.138.171.103/upload",// 测试环境
- // "target" : "http://1.12.224.227",// 正式环境
+ "target" : "http://8.138.171.103/upload", // 测试环境
+
+ // "target" : "http://1.12.224.227",// 正式环境
"changeOrigin" : true,
"secure" : true,
"ws" : false,
- "pathRewrite" : {
- "^/aiupload" : ""
- }
+ "pathRewrite" : {
+ "^/aiupload" : ""
+ }
},
- "/ossUpload" : {
- "target" : "http://guojunjie.oss-cn-hangzhou.aliyuncs.com",
- "changeOrigin" : true,
- "secure" : true,
- "ws" : false,
- "pathRewrite" : {
- "^/ossUpload/" : ""
- }
- },
- "/asyncOssUpload" : {
- "target" : "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com",
- "changeOrigin" : true,
- "secure" : true,
- "ws" : false,
- "pathRewrite" : {
- "^/asyncOssUpload/" : ""
- }
- }
+ "/ossUpload" : {
+ "target" : "http://guojunjie.oss-cn-hangzhou.aliyuncs.com",
+ "changeOrigin" : true,
+ "secure" : true,
+ "ws" : false,
+ "pathRewrite" : {
+ "^/ossUpload/" : ""
+ }
+ },
+ "/asyncOssUpload" : {
+ "target" : "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com",
+ "changeOrigin" : true,
+ "secure" : true,
+ "ws" : false,
+ "pathRewrite" : {
+ "^/asyncOssUpload/" : ""
+ }
+ }
}
}
},
diff --git a/pages/index/rich-detail.vue b/pages/index/rich-detail.vue
index 7beb8b8..bbd8736 100644
--- a/pages/index/rich-detail.vue
+++ b/pages/index/rich-detail.vue
@@ -92,6 +92,14 @@
flex-direction: column;
min-height: 100vh;
background-size: cover;
+ // #ifdef APP
+ .app-top{
+ width: 100%;
+ position: fixed;
+ z-index: 81;
+ top: 0;
+ }
+ // #endif
.rdt-top{
// #ifdef APP
.app-top{
diff --git a/pages/index/webview.vue b/pages/index/webview.vue
index 74619d3..7ef5ac9 100644
--- a/pages/index/webview.vue
+++ b/pages/index/webview.vue
@@ -18,14 +18,14 @@ export default {
src: '',
wbStyles: {
width: '100%',
- height: '100vh',
+ height: '100%',
},
}
},
onLoad(option) {
this.title = option?.title
this.src = option.src ? decodeURI(option.src) : '';
- console.log(this.src);
+ console.log('this.src',this.src);
},
}
\ No newline at end of file
diff --git a/pages/mobile_web/home/home.vue b/pages/mobile_web/home/home.vue
index 0024213..52932cf 100644
--- a/pages/mobile_web/home/home.vue
+++ b/pages/mobile_web/home/home.vue
@@ -69,6 +69,10 @@
{{ siftList[item.serviceId] ? siftList[item.serviceId].name : '暂无' }}
+
+
+ 做同款
+
@@ -149,6 +153,8 @@ export default {
touchNum : 0,
// 轮播功能列表单组功能数
group: 10,
+ // 魔术棒
+ magicWand: 'magic-wand.png'
}
},
methods:{
@@ -238,7 +244,7 @@ export default {
},
// 前往工作室
toDeal(id = null){
- if(id!==null)
+ if(id!==null&&id!=='')
uni.navigateTo({url: `/pages/mobile_web/workshops/index?id=${id}`});
else this.$refs.uToast.show({type:'error',title: "暂未开放对应功能!"});
},
@@ -472,6 +478,32 @@ export default {
left: 0.9em;
z-index: 1;
}
+ .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;
+ }
+ }
.compare-sign{
position: absolute;
left: 0;
diff --git a/pages/mobile_web/my/child_pages/contact.vue b/pages/mobile_web/my/child_pages/contact.vue
index 3388f09..c121bea 100644
--- a/pages/mobile_web/my/child_pages/contact.vue
+++ b/pages/mobile_web/my/child_pages/contact.vue
@@ -169,6 +169,14 @@ export default {
background-size: cover;
opacity: 0.9;
+ // #ifdef APP
+ .app-top{
+ width: 100%;
+ position: fixed;
+ z-index: 81;
+ top: 0;
+ }
+ // #endif
.ct-top {
// #ifdef APP
.app-top {
diff --git a/pages/mobile_web/my/child_pages/create.vue b/pages/mobile_web/my/child_pages/create.vue
index 1021150..15327b3 100644
--- a/pages/mobile_web/my/child_pages/create.vue
+++ b/pages/mobile_web/my/child_pages/create.vue
@@ -23,14 +23,14 @@
-
+
-
+
{{ index+1 }}. {{ item.type }}
@@ -51,7 +51,7 @@
-
@@ -79,6 +79,7 @@
},
// 滚动顶部
scrollTop: 0,
+ oldScrollTop: 0,
// 生成/消费记录
createList: [],
// 总数
@@ -126,13 +127,16 @@
back(){
uni.navigateBack();
},
- // 滚动
- scroll(e){
- this.scrollTop = e.detail.scrollTop
- },
// 滚动回顶部
goTop() {
- this.scrollTop = 0;
+ this.scrollTop = this.oldScrollTop;
+ this.$nextTick(()=>{
+ this.scrollTop = 0;
+ });
+ },
+ // 滚动监听
+ scroll(e){
+ this.oldScrollTop = e.detail.scrollTop;
},
// 时间格式化
dateFormat(time){
@@ -180,6 +184,14 @@
flex-direction: column;
min-height: 100vh;
background-size: cover;
+ // #ifdef APP
+ .app-top{
+ width: 100%;
+ position: fixed;
+ z-index: 81;
+ top: 0;
+ }
+ // #endif
.cdt-top{
// #ifdef APP
.app-top{
diff --git a/pages/mobile_web/my/child_pages/login.vue b/pages/mobile_web/my/child_pages/login.vue
index 5800d13..e6c229f 100644
--- a/pages/mobile_web/my/child_pages/login.vue
+++ b/pages/mobile_web/my/child_pages/login.vue
@@ -319,6 +319,14 @@
flex-direction: column;
min-height: 100vh;
background-size: cover;
+ // #ifdef APP
+ .app-top{
+ width: 100%;
+ position: fixed;
+ z-index: 81;
+ top: 0;
+ }
+ // #endif
.lg-top{
// #ifdef APP
.app-top{
diff --git a/pages/mobile_web/my/child_pages/recharge.vue b/pages/mobile_web/my/child_pages/recharge.vue
new file mode 100644
index 0000000..02409e3
--- /dev/null
+++ b/pages/mobile_web/my/child_pages/recharge.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/mobile_web/my/child_pages/setting.vue b/pages/mobile_web/my/child_pages/setting.vue
index 26a798f..f5327d8 100644
--- a/pages/mobile_web/my/child_pages/setting.vue
+++ b/pages/mobile_web/my/child_pages/setting.vue
@@ -243,6 +243,14 @@ export default {
background-size: cover;
opacity: 0.9;
+ // #ifdef APP
+ .app-top{
+ width: 100%;
+ position: fixed;
+ z-index: 81;
+ top: 0;
+ }
+ // #endif
.st-top {
// #ifdef APP
.app-top {
diff --git a/pages/mobile_web/my/child_pages/share.vue b/pages/mobile_web/my/child_pages/share.vue
index d9605d8..7e11656 100644
--- a/pages/mobile_web/my/child_pages/share.vue
+++ b/pages/mobile_web/my/child_pages/share.vue
@@ -23,19 +23,19 @@
-
+
-
+
-
+
-
+
@@ -50,7 +50,7 @@
-
{
+ this.scrollTop = 0;
+ });
+ },
+ // 滚动监听
+ scroll(e){
+ this.oldScrollTop = e.detail.scrollTop;
},
// 时间格式化
dateFormat(time){
@@ -169,6 +174,7 @@
if (res.confirm) {
let res = await that.$api.deleteReleases(that.shareList[itemIndex].id);
if(res?.success){
+ that.currentClickIndex = '';
that.shareList.splice(itemIndex, 1);
that.$refs.uToast.show({type:'success',title: "发布记录删除成功!"});
}else{
@@ -179,6 +185,10 @@
});
}
},
+ // 内容点击
+ contentClick(index){
+ this.currentClickIndex = this.currentClickIndex===index ? '' : index;
+ },
// 预览图片
previewImage(path){
tools.methods.lookImage(0,[path]);
@@ -213,6 +223,7 @@
const value = e[0].value;
this.siftIndex = value === '' ? 0 : value;
this.form = {size: 10, current: 1, reviewStatus: value};
+ this.currentClickIndex = '';
this.getShareList();
},
}
@@ -225,6 +236,14 @@
flex-direction: column;
min-height: 100vh;
background-size: cover;
+ // #ifdef APP
+ .app-top{
+ width: 100%;
+ position: fixed;
+ z-index: 81;
+ top: 0;
+ }
+ // #endif
.sdt-top{
// #ifdef APP
.app-top{
@@ -271,17 +290,21 @@
display: flex;
justify-content: space-between;
align-items: center;
+ flex-wrap: wrap;
margin: 20rpx;
.si-left{
+ transition: 0.3s;
width: 140rpx;
height: 140rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
.sil-image{
width: 140rpx;
height: 140rpx;
}
}
.si-right{
- flex: 1;
display: flex;
flex-direction: column;
align-items: flex-end;
@@ -293,6 +316,26 @@
}
}
}
+ .change-morphology{
+ .si-left{
+ width: 100%;
+ height: 100%;
+ transition: 0.5s;
+ .sil-image{
+ width: 200rpx;
+ height: 200rpx;
+ }
+ }
+ .si-right{
+ width: 100%;
+ align-items: center;
+ justify-content: center;
+ text{
+ margin-bottom: 10rpx;
+ margin-right: 0rpx;
+ }
+ }
+ }
}
.dc-sift{
width: 50rpx;
diff --git a/pages/mobile_web/work/work.vue b/pages/mobile_web/work/work.vue
index 4d48a72..7474600 100644
--- a/pages/mobile_web/work/work.vue
+++ b/pages/mobile_web/work/work.vue
@@ -92,14 +92,14 @@ export default {
workForm: {
current: 1,
size: 10,
- isFinish: false,
+ isFinish: true,
total: 0
},
// 我的收藏Form
collectForm: {
current: 1,
size: 10,
- isFinish: false,
+ isFinish: true,
total: 0
},
// 标签图标
diff --git a/pages/mobile_web/workshops/components/dress_select.vue b/pages/mobile_web/workshops/components/dress_select.vue
index 12e1331..cd9395a 100644
--- a/pages/mobile_web/workshops/components/dress_select.vue
+++ b/pages/mobile_web/workshops/components/dress_select.vue
@@ -5,7 +5,7 @@
-
+
预设模特
自定义
@@ -43,7 +43,7 @@
-
+
预设衣服
自定义
@@ -197,7 +197,7 @@ export default {
}
},
// 点击预设/自定义按钮
- handleClickSelect(index){
+ handleClickSelect(index,event){
if(index!==null){
this.selectOptions[index] = Boolean(event.target.dataset.select);
this.$forceUpdate();
diff --git a/pages/mobile_web/workshops/index.vue b/pages/mobile_web/workshops/index.vue
index 43063a9..7e95694 100644
--- a/pages/mobile_web/workshops/index.vue
+++ b/pages/mobile_web/workshops/index.vue
@@ -93,7 +93,7 @@
-
+
{{ item.optionName }}