| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- // module/health/components/field-ruler/field-ruler.ts
- import { getCareRecordMethod } from "../../request";
- Component({
- behaviors: ["wx://form-field-group"],
- lifetimes: {
- attached() {
- this.getCareRecordList();
- },
- },
- /**
- * 组件的初始数据
- */
- data: {
- loading: false,
- careRecordList: [],
- },
- methods: {
- // 获取调养记录列表
- async getCareRecordList(e: any) {
- const data = await getCareRecordMethod();
- if(data && data.length > 0) {
- this.setData({
- careRecordList: data,
- });
- } else {
- this.setData({
- careRecordList: [],
- });
- }
- // console.log(this.data.careRecordList,'调理中的调养记录列表11');
- },
- // 跳转调养方案详情
- goDetail(e: any) {
- const id = e.currentTarget.dataset.id;
- if(id) {
- wx.navigateTo({
- url: `/module/care/pages/careDetail/careDetail?id=${id}`,
- });
- }
- },
- },
- properties: {},
- observers: {},
-
- });
|