apply.js
3.62 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
"use strict";
const common_vendor = require("../../../common/vendor.js");
const common_train = require("../../../common/train.js");
require("../../../common/request.js");
require("../../../config.js");
require("../../../common/login.js");
require("../../../common/api.js");
if (!Math) {
(trainApply2 + trainApply3)();
}
const trainApply2 = () => "../../../components/train/train-apply/train-apply.js";
const trainApply3 = () => "../../../components/train/train-apply-three/train-apply-three.js";
const _sfc_main = {
__name: "apply",
setup(__props) {
const reactvt = common_vendor.ref(0);
const id = common_vendor.ref();
const trainProjectsList = common_vendor.ref([]);
const examProjectsList = common_vendor.ref([]);
const hotelList = common_vendor.ref();
const birthday = common_vendor.ref();
const projectIdsArray = common_vendor.ref();
const examIdsArry = common_vendor.ref();
const signId = common_vendor.ref();
const data = common_vendor.reactive({
addForm: {},
userList: {}
});
const { addForm, userList } = common_vendor.toRefs(data);
common_vendor.onLoad((option) => {
const arr = option.data.split(",");
id.value = arr[0];
initData();
});
async function initData() {
addForm.value.id = id.value;
let res = await common_train.trainParticulars(addForm.value);
signId.value = res.data.signId;
res.data.examProjectsList.forEach((item) => {
if (item.isNecessary == 1) {
item.check = true;
} else {
item.check = false;
}
examProjectsList.value.push(item);
});
res.data.trainProjectsList.forEach((item) => {
if (item.isNecessary == 1) {
item.check = true;
} else {
item.check = false;
}
trainProjectsList.value.push(item);
});
hotelList.value = res.data.hotelList;
userList.value = res.data.userList[0];
birthday.value = userList.value.birth.slice(0, 10);
}
const nextFN = (e, val, arr) => {
reactvt.value = e;
projectIdsArray.value = val;
examIdsArry.value = arr;
};
return (_ctx, _cache) => {
return common_vendor.e({
a: reactvt.value == 0
}, reactvt.value == 0 ? {
b: common_vendor.unref(userList).picUrl,
c: common_vendor.t(common_vendor.unref(userList).realName),
d: common_vendor.t(common_vendor.unref(userList).sex),
e: common_vendor.t(birthday.value),
f: common_vendor.t(common_vendor.unref(userList).identify),
g: common_vendor.t(common_vendor.unref(userList).identifyCode),
h: common_vendor.t(common_vendor.unref(userList).phone),
i: common_vendor.o(($event) => nextFN(1))
} : {}, {
j: reactvt.value == 1,
k: common_vendor.o(nextFN),
l: id.value,
m: common_vendor.p({
hotelList: hotelList.value,
examProjectsList: examProjectsList.value,
trainProjectsList: trainProjectsList.value,
id: id.value
}),
n: reactvt.value == 2
}, reactvt.value == 2 ? {
o: id.value,
p: common_vendor.o(nextFN),
q: common_vendor.p({
signId: signId.value,
id: id.value,
hotelList: hotelList.value,
projectIdsArray: projectIdsArray.value,
examIdsArry: examIdsArry.value
})
} : {});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-be3b1adb"], ["__file", "/Users/yangyang/project/j-mini/Venue/pages/train/apply/apply.vue"]]);
_sfc_main.__runtimeHooks = 6;
wx.createPage(MiniProgramPage);