Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ccbc5a7b
authored
Nov 08, 2022
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
other:调整首页刷新
1 parent
301cdcdd
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
68 additions
and
20 deletions
pages/tab/index/components/indexProduct/indexProduct.js
pages/tab/index/components/indexProduct/indexProduct.scss
pages/tab/index/components/indexProduct/indexProduct.wxml
pages/tab/index/components/product/product.js
pages/tab/index/components/product/product.scss
pages/tab/index/components/product/product.wxml
pages/tab/index/index.js
pages/tab/index/index.json
pages/tab/index/index.wxml
pages/tab/index/components/indexProduct/indexProduct.js
View file @
ccbc5a7
...
@@ -14,7 +14,7 @@ Component({
...
@@ -14,7 +14,7 @@ Component({
* 组件的初始数据
* 组件的初始数据
*/
*/
data
:
{
data
:
{
refresherFlag
:
true
,
},
},
/**
/**
...
@@ -27,5 +27,14 @@ Component({
...
@@ -27,5 +27,14 @@ Component({
let
{
num
}
=
e
.
currentTarget
.
dataset
let
{
num
}
=
e
.
currentTarget
.
dataset
this
.
triggerEvent
(
'selectCar'
,
num
)
this
.
triggerEvent
(
'selectCar'
,
num
)
},
},
refresherrefreshFn
(){
this
.
triggerEvent
(
'refresherrefresh'
)
setTimeout
(()
=>
{
this
.
setData
({
refresherFlag
:
false
})
},
1000
)
}
}
}
})
})
pages/tab/index/components/indexProduct/indexProduct.scss
View file @
ccbc5a7
/* pages/tab/index/components/indexProduct/indexProduct.wxss */
/* pages/tab/index/components/indexProduct/indexProduct.wxss */
.content-scroll
{
height
:
100vh
;
// height: calc(100% - 80rpx);
}
.content-product
{
.content-product
{
.scene
{
.scene
{
// margin-top: 32rpx;
// margin-top: 32rpx;
...
...
pages/tab/index/components/indexProduct/indexProduct.wxml
View file @
ccbc5a7
<!--pages/tab/index/components/indexProduct/indexProduct.wxml-->
<!--pages/tab/index/components/indexProduct/indexProduct.wxml-->
<!-- class="content-scroll" -->
<!-- style="height: calc(100vh - {{headerHeight/2}}px)" -->
<!-- <scroll-view
scroll-y="true"
refresher-enabled="{{true}}"
refresher-triggered="{{refresherFlag}}"
bindrefresherrefresh="refresherrefreshFn"> -->
<view
<view
class="content-product"
class="content-product"
hover-class="none"
hover-class="none"
...
@@ -24,6 +31,7 @@
...
@@ -24,6 +31,7 @@
</view>
</view>
</scroll-view>
</scroll-view>
</view>
</view>
<!-- stickyTop="{{headerHeight}}" -->
<product
<product
img_version="{{img_version}}"
img_version="{{img_version}}"
isShow="{{false}}"
isShow="{{false}}"
...
@@ -33,3 +41,4 @@
...
@@ -33,3 +41,4 @@
origin="home"
origin="home"
bindsharehandle="sharehandle" />
bindsharehandle="sharehandle" />
</view>
</view>
<!-- </scroll-view> -->
\ No newline at end of file
\ No newline at end of file
pages/tab/index/components/product/product.js
View file @
ccbc5a7
...
@@ -59,6 +59,7 @@ Component({
...
@@ -59,6 +59,7 @@ Component({
getMoreBtn
:
false
,
getMoreBtn
:
false
,
showVideo
:
true
,
//显示视频列表
showVideo
:
true
,
//显示视频列表
imgTopArr
:
[],
imgTopArr
:
[],
// navFixed:false //步骤条定位
},
},
lifetimes
:
{
lifetimes
:
{
ready
:
function
()
{
ready
:
function
()
{
...
@@ -87,8 +88,21 @@ Component({
...
@@ -87,8 +88,21 @@ Component({
// }
// }
//监听页面滚动的距离
//监听页面滚动的距离
// let {stickyTop} = this.data
// //44 nav的高度
// let top = stickyTop/2 + 44
wx
.
$eventbus
.
on
(
"evt_page_scroll"
,
async
(
e
)
=>
{
wx
.
$eventbus
.
on
(
"evt_page_scroll"
,
async
(
e
)
=>
{
// console.log(e)
// console.log('top: ', e.scrollTop,top);
// if(e.scrollTop>top ){
// this.setData({
// navFixed:true
// })
// }else{
// this.setData({
// navFixed:false
// })
// }
// let heightTop = this.data.stickyTop// 90 场景高度,8 场景margin-bottom
// let heightTop = this.data.stickyTop// 90 场景高度,8 场景margin-bottom
// let prodArr = await this.getHeight('.prod-wrap')
// let prodArr = await this.getHeight('.prod-wrap')
// // console.log('prodArr: ', prodArr);
// // console.log('prodArr: ', prodArr);
...
...
pages/tab/index/components/product/product.scss
View file @
ccbc5a7
...
@@ -206,6 +206,11 @@
...
@@ -206,6 +206,11 @@
z-index
:
2
;
z-index
:
2
;
background-color
:
#f5f7fb
;
background-color
:
#f5f7fb
;
}
}
.stickyTab-fixed
{
position
:
fixed
;
left
:
0
;
top
:
352rpx
;
}
// .out-tab{
// .out-tab{
// .out-text {
// .out-text {
...
...
pages/tab/index/components/product/product.wxml
View file @
ccbc5a7
...
@@ -42,9 +42,14 @@
...
@@ -42,9 +42,14 @@
</view>
</view>
<view class="project-wrap {{isShow ?'check-prod':''}}">
<view class="project-wrap {{isShow ?'check-prod':''}}">
<!-- stickyTop+88 -->
<!-- stickyTop+88 -->
<view class="stickyTab" style="top:{{isShare ? stickyTop : stickyTop}}rpx">
<!-- style="top:{{isShare ? stickyTop : stickyTop}}rpx" -->
<view class="stickyTab" style="top:{{isShare ? stickyTop : stickyTop}}rpx" >
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight />
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight />
</view>
</view>
<!-- wx:if="{{navFixed}}" -->
<!-- <view class="stickyTab stickyTab-fixed">
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight />
</view> -->
<!-- style="{height:{{allHeight}}px}" scroll-y="{{true}}" bindscroll="scrolltoupper"-->
<!-- style="{height:{{allHeight}}px}" scroll-y="{{true}}" bindscroll="scrolltoupper"-->
<!-- <scroll-view class="project-img" scroll-into-view="{{intoViewId}}"> -->
<!-- <scroll-view class="project-img" scroll-into-view="{{intoViewId}}"> -->
...
...
pages/tab/index/index.js
View file @
ccbc5a7
...
@@ -101,6 +101,22 @@ Page({
...
@@ -101,6 +101,22 @@ Page({
readApi
(
param
)
readApi
(
param
)
}
}
},
},
//看产品下拉刷新
refresherrefresh
(){
let
{
tabIndx
}
=
this
.
data
if
(
tabIndx
==
1
){
// 看产品
this
.
getProductByscene
()
// // 看线索
// this.getClueInit()
this
.
getUnreadApi
()
wx
.
pro
.
showToast
({
title
:
"刷新成功"
,
icon
:
"loading"
,
duration
:
1500
,
});
}
},
// 跳转咨询页面
// 跳转咨询页面
goConsult
()
{
goConsult
()
{
console
.
log
(
'跳转到咨询页面'
)
console
.
log
(
'跳转到咨询页面'
)
...
@@ -485,20 +501,6 @@ Page({
...
@@ -485,20 +501,6 @@ Page({
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
// console.log(123546)
let
{
tabIndx
}
=
this
.
data
if
(
tabIndx
==
1
){
// 看产品
this
.
getProductByscene
()
// // 看线索
// this.getClueInit()
this
.
getUnreadApi
()
wx
.
pro
.
showToast
({
title
:
"刷新成功"
,
icon
:
"loading"
,
duration
:
1500
,
});
}
},
},
/**
/**
...
...
pages/tab/index/index.json
View file @
ccbc5a7
...
@@ -7,6 +7,5 @@
...
@@ -7,6 +7,5 @@
"FullscreenVideo"
:
"../../../components/FullscreenVideo/FullscreenVideo"
"FullscreenVideo"
:
"../../../components/FullscreenVideo/FullscreenVideo"
},
},
"navigationStyle"
:
"custom"
,
"navigationStyle"
:
"custom"
,
"onReachBottomDistance"
:
50
,
"onReachBottomDistance"
:
50
"enablePullDownRefresh"
:
true
}
}
pages/tab/index/index.wxml
View file @
ccbc5a7
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
senceData="{{senceData}}"
senceData="{{senceData}}"
actNum="{{actNum}}"
actNum="{{actNum}}"
img_version="{{img_version}}"
img_version="{{img_version}}"
headerHeight="{{headerHeight}}"></indexProduct>
headerHeight="{{headerHeight}}"
bindrefresherrefresh="refresherrefresh"></indexProduct>
<!-- 看线索内容 -->
<!-- 看线索内容 -->
<indexClue
<indexClue
wx:if="{{tabIndx == 0 }}"
wx:if="{{tabIndx == 0 }}"
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment