index.js
950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const navStyle = "background-color: transparent;box-shadow:none;";
import commonApi from "~/api/api";
Page({
data: {
navStyle,
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
onShow() {
this.selectComponent(`#materails`)?.onLoad && this.selectComponent(`#materails`).onLoad()
this.closeRemind()
},
closeRemind() {
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId: userInfo?.shopMerchantId,
staffUuid: userInfo?.uuid,
scene: 1,
taskId: 6,
};
commonApi.shutDownTaskApi(params);
},
// 处理滚动事件
onPageScroll(e) {
const {
navBarHeight
} = this.data
this.setData({
navStyle: e.scrollTop >= navBarHeight ? '' : navStyle,
scrollTop: e.scrollTop
})
},
onHide() {
this.selectComponent(`#materails`)?.onHide && this.selectComponent(`#materails`).onHide()
}
})