notice.js
930 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
43
44
45
46
47
48
49
50
import util from '../../../utils/util';
import App from '../../../utils/api';
let systeminfo=wx.getSystemInfoSync();
let ratio=750/systeminfo.windowWidth,distance=systeminfo.windowHeight*ratio*0.3-78;
Component({
properties:{
pos:{
type:Object,
value:{
left:0,
top:distance,
right:0
}
},
},
data:{
shownotice:false,
},
pageLifetimes: {
show: function() {
// 页面被展示
this.getautomenu();
},
attached(){
this.getautomenu();
},
},
methods:{
gotoList(e){
getApp().meListType=util.attr(e,'type')
wx.switchTab({
url:'/pages/me/list?type='+util.attr(e,'type')
})
},
getautomenu(){
console.log('tttttttt')
App.Foodset.GetUserFoodOrders({
status:2,//tabType,
openid: getApp().openid,
offset:1,
limit:1,
size:1,
}).then(res=>{
this.setData({
shownotice:res.data.length ? true : false
})
})
},
}
})