60 lines
969 B
JavaScript
60 lines
969 B
JavaScript
// pages/workBench/components/reading/index.js
|
|
Component({
|
|
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
|
|
},
|
|
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
onParkFocus(e) {
|
|
this.setData({
|
|
show: true,
|
|
title: "园区",
|
|
type: 'park'
|
|
})
|
|
},
|
|
async init() {
|
|
|
|
},
|
|
onConfirm(e) {
|
|
const { data } = e.detail;
|
|
const that = this;
|
|
this.setData({
|
|
parkName: data.name,
|
|
park: data.id,
|
|
}, () => {
|
|
loadingFunc(async () => {
|
|
await that.init();
|
|
})
|
|
})
|
|
this.onConcal();
|
|
},
|
|
onConcal() {
|
|
this.setData({
|
|
show: false,
|
|
title: "",
|
|
type: "",
|
|
})
|
|
},
|
|
jumpToReading(e) {
|
|
const { id } = e.currentTarget.dataset;
|
|
console.log("id", id, "e", e)
|
|
wx.navigateTo({
|
|
url: '/pages/writeReading/index',
|
|
})
|
|
}
|
|
}
|
|
}) |