Commit 365ca490 by yuzhenWang

Merge branch 'feature-20250614-首页菜单优化' into 'dev'

Feature 20250614 首页菜单优化

See merge request !44
parents beb93bee 2431cf9b
...@@ -291,7 +291,7 @@ ...@@ -291,7 +291,7 @@
} */ } */
/* iPad横屏 */ /* iPad横屏 */
@media (orientation: landscape) { @media (orientation: landscape) {
.container { .container {
max-width: 1024px; max-width: 1024px;
display: flex; display: flex;
......
...@@ -76,6 +76,10 @@ export default { ...@@ -76,6 +76,10 @@ export default {
maskClick: { maskClick: {
type: Boolean, type: Boolean,
default: true default: true
},
showCanel: {
type: Boolean,
default: false
} }
}, },
methods: { methods: {
......
...@@ -450,7 +450,7 @@ ...@@ -450,7 +450,7 @@
}; };
</script> </script>
<style lang="less" scoped> <style lang="scss" scoped>
.signature-box { .signature-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
<everyJoinPopup <everyJoinPopup
ref="everyJoinPopup" ref="everyJoinPopup"
@continue="jumpPage" @continue="jumpPage"
:showCanel="false"
/> />
<!-- 成功加盟为合伙人提示弹窗组件 --> <!-- 成功加盟为合伙人提示弹窗组件 -->
<everyJoinPopup <everyJoinPopup
...@@ -106,6 +107,7 @@ ...@@ -106,6 +107,7 @@
:maskClick="false" :maskClick="false"
icon="icon-dianzan" icon="icon-dianzan"
iconSize='80rpx' iconSize='80rpx'
:showCanel="true"
/> />
</view> </view>
</template> </template>
......
...@@ -34,34 +34,25 @@ ...@@ -34,34 +34,25 @@
"node_modules/crypto-js": { "node_modules/crypto-js": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz", "resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
"license": "MIT"
}, },
"node_modules/dayjs": { "node_modules/dayjs": {
"version": "1.11.13", "version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz", "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==",
"license": "MIT"
}, },
"node_modules/echarts": { "node_modules/echarts": {
"version": "5.6.0", "version": "5.6.0",
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==", "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
"license": "Apache-2.0",
"dependencies": { "dependencies": {
"tslib": "2.3.0", "tslib": "2.3.0",
"zrender": "5.6.1" "zrender": "5.6.1"
} }
}, },
"node_modules/echarts/node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"node_modules/echarts/node_modules/zrender": {
"version": "5.6.1",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
"dependencies": {
"tslib": "2.3.0"
}
},
"node_modules/errno": { "node_modules/errno": {
"version": "0.1.8", "version": "0.1.8",
"resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz", "resolved": "https://registry.npmmirror.com/errno/-/errno-0.1.8.tgz",
...@@ -122,7 +113,8 @@ ...@@ -122,7 +113,8 @@
"node_modules/js-sha256": { "node_modules/js-sha256": {
"version": "0.11.1", "version": "0.11.1",
"resolved": "https://registry.npmmirror.com/js-sha256/-/js-sha256-0.11.1.tgz", "resolved": "https://registry.npmmirror.com/js-sha256/-/js-sha256-0.11.1.tgz",
"integrity": "sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg==" "integrity": "sha512-o6WSo/LUvY2uC4j7mO50a2ms7E/EAdbP0swigLV+nzHKTTaYnaLIWJ02VdXrsJX0vGedDESQnLsOekr94ryfjg==",
"license": "MIT"
}, },
"node_modules/less": { "node_modules/less": {
"version": "4.3.0", "version": "4.3.0",
...@@ -182,6 +174,7 @@ ...@@ -182,6 +174,7 @@
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-4.0.2.tgz",
"integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==", "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==",
"funding": [ "funding": [
{ {
...@@ -189,6 +182,7 @@ ...@@ -189,6 +182,7 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"license": "MIT",
"bin": { "bin": {
"nanoid": "bin/nanoid.js" "nanoid": "bin/nanoid.js"
}, },
...@@ -282,11 +276,19 @@ ...@@ -282,11 +276,19 @@
} }
}, },
"node_modules/tslib": { "node_modules/tslib": {
"version": "2.8.1", "version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
"dev": true,
"license": "0BSD" "license": "0BSD"
},
"node_modules/zrender": {
"version": "5.6.1",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
"license": "BSD-3-Clause",
"dependencies": {
"tslib": "2.3.0"
}
} }
} }
} }
<template> <template>
<view class="container" :style="{paddingTop: showFlag ? '0' : '60rpx'}"> <!-- :style="{paddingTop: showFlag ? '0' : '60rpx'}" -->
<view class="container" >
<view class="homeHeader" v-if="showFlag"> <view class="homeHeader" v-if="showFlag">
<view class="one"> <view class="one">
<text style="font-size: 80rpx;">01</text> <text style="font-size: 80rpx;">01</text>
...@@ -25,7 +26,7 @@ ...@@ -25,7 +26,7 @@
</view> </view>
<view class="productBox"> <view class="productBox">
<view class="productList" :style="{marginTop}"> <view class="productList" :style="{marginTop}">
<view class="productItem" v-for="item in cffpCourseInfos" :key="item.fileId" > <view class="productItem" v-for="item in localCourseInfos" :key="item.fileId" >
<view class="top" @click="goDetail(item)"> <view class="top" @click="goDetail(item)">
<view class="left"> <view class="left">
<image class="productImg" :src="item.displayImage" alt="" mode="widthFix"></image> <image class="productImg" :src="item.displayImage" alt="" mode="widthFix"></image>
...@@ -119,7 +120,11 @@ ...@@ -119,7 +120,11 @@
showFlag:{ showFlag:{
type:Boolean, type:Boolean,
default:true default:true
} },
cffpCourseInfos: {
type: Array,
default: () => []
}
}, },
components:{ components:{
courseItem, courseItem,
...@@ -130,9 +135,18 @@ ...@@ -130,9 +135,18 @@
BootPage, BootPage,
PartnerTipPopup PartnerTipPopup
}, },
watch: {
// 监听 prop 变化,更新本地副本
cffpCourseInfos: {
immediate: true, // 立即执行一次
handler(newVal) {
this.localCourseInfos = [...newVal]; // 深拷贝(如果是简单数组,浅拷贝也行)
},
},
},
data(){ data(){
return{ return{
cffpCourseInfos:[], localCourseInfos: [], // 本地副本
currentPage:'courselist', currentPage:'courselist',
fileUploadItemCFFPList:[], fileUploadItemCFFPList:[],
queryName:null, queryName:null,
...@@ -164,6 +178,8 @@ ...@@ -164,6 +178,8 @@
created(){ created(){
this.queryName = uni.getStorageSync('queryName') || ''; this.queryName = uni.getStorageSync('queryName') || '';
this.courseList(); this.courseList();
// 初始化本地副本
this.localCourseInfos = [...this.cffpCourseInfos];
this.sourceType = uni.getStorageSync('addSystemType') || '1'; this.sourceType = uni.getStorageSync('addSystemType') || '1';
if(uni.getStorageSync('cffp_userInfo')){ if(uni.getStorageSync('cffp_userInfo')){
this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo')) this.userInfo = JSON.parse(uni.getStorageSync('cffp_userInfo'))
...@@ -371,7 +387,7 @@ ...@@ -371,7 +387,7 @@
} }
api.courseList(param).then(res=>{ api.courseList(param).then(res=>{
if(res['success']){ if(res['success']){
this.cffpCourseInfos = res['data']['data']; this.localCourseInfos = res['data']['data']; // 修改本地副本
} }
}) })
}, },
...@@ -471,7 +487,6 @@ ...@@ -471,7 +487,6 @@
.productList{ .productList{
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
// margin-top: -2%;
background-color: #fff; background-color: #fff;
padding: 20rpx; padding: 20rpx;
border-radius: 10rpx; border-radius: 10rpx;
...@@ -557,6 +572,12 @@ ...@@ -557,6 +572,12 @@
border: none; border: none;
} }
} }
/* 电脑端 */
@media (min-width: 768px) {
.productList{
// padding-top: 60rpx;
}
}
} }
.descriptionBox { .descriptionBox {
width: 510rpx; width: 510rpx;
...@@ -678,5 +699,46 @@ ...@@ -678,5 +699,46 @@
} }
} }
} }
.container {
padding-top: 60rpx;
.homeHeader {
padding-bottom: 100rpx;
position: relative;
z-index: 1;
}
.productBox {
position: relative;
z-index: 2;
.productList {
padding-top: 30rpx; // 改用padding-top
margin-top: 0;
.productItem {
&:first-child {
margin-top: 0;
}
}
}
}
}
/* iPad横屏特定适配 */
@media only screen
and (min-device-width: 768px)
and (max-device-width: 1024px)
and (orientation: landscape) {
.container {
.homeHeader {
padding-bottom: 120rpx;
}
.productBox {
.productList {
padding-top: 50rpx;
}
}
}
}
</style> </style>
\ No newline at end of file
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</view> </view>
</view> --> </view> -->
<view class="productList" v-if="cffpCourseInfos.length>0"> <view class="productList" v-if="cffpCourseInfos.length>0">
<courselist :showFlag="false"></courselist> <courselist :showFlag="false" :cffpCourseInfos="cffpCourseInfos"></courselist>
<view class="productListBox"> <view class="productListBox">
<!-- <view class="productListItem" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> --> <!-- <view class="productListItem" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)"> -->
......
...@@ -535,9 +535,10 @@ ...@@ -535,9 +535,10 @@
.sendInvite { .sendInvite {
position: absolute; position: absolute;
left: 20vw; left: 0;
top: 80%; top: 80%;
width: 60vw; width: 60%;
transform: translateX(30%);
border-radius: 80rpx; border-radius: 80rpx;
background-color: #20269B; background-color: #20269B;
color: #fff; color: #fff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment