日照项目的居民端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
1.7 KiB

const app = getApp();
Component({
properties: {},
data: {
customerId: "",
iniLoaded: false,
menuList: [
{
name: "收集中",
value: 0,
},
{
name: "已结束",
value: 1,
},
],
current: 0, // 表决中voting 已转项目turned 已关闭closed
listUrl: "data/aggregator/questionnaire/list",
currentTab: 0, // 表决中voting 已转项目turned 已关闭closed
listParams1: {
client: "resi",
orgId: "",
status: 2
},
listParams2: {
client: "resi",
orgId: "",
status: 3
},
listIsMock: false,
},
lifetimes: {
attached() {
this.init();
},
},
methods: {
async refreshData() {
await this.init();
await this.selectComponent("#voting").refreshData();
await this.selectComponent("#turned").refreshData();
},
async init() {
await app.doAfterLogin();
const { gridId } = app.globalData;
this.setData({
'listParams1.orgId': gridId,
'listParams2.orgId': gridId,
});
this.setData({
iniLoaded: true,
});
},
handleSwiperChange(e) {
const {
detail: { current, source },
} = e;
if (source == "touch") {
this.setData({ current });
}
},
// 点击顶部菜单
handleShiftMenu(e) {
const {
detail: { value },
} = e;
this.setData({ current: value });
},
handleTapTab(e) {
console.log(e);
const {
currentTarget: {
dataset: { index },
},
} = e;
this.setData({ currentTab: index });
},
},
});