Skip to content

Commit 8641f25

Browse files
committed
.
1 parent 628bdd7 commit 8641f25

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/components/QiMen.vue

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ import {
126126
DI_ZHI,
127127
JIA_ZI, MEN_F,
128128
MEN_Z,
129-
QI_YI,
129+
QI_YI, SHEN_F,
130130
SHEN_Z,
131131
TIAN_GAN, XING_F, XING_Z,
132132
XUN_SHOU,
@@ -156,12 +156,20 @@ function paiQiYi() {
156156
function paiFeiPan() {
157157
zhiFu.value = XING_F[xunShouGong - 1]
158158
zhiShi.value = MEN_F[xunShouGong - 1]
159-
cfg.value[shiGanGong][5] = zhiFu.value
160-
cfg.value[shiZhiGong][8] = zhiShi.value
161-
// for (let i = 0; i < 9; i++) {
162-
// const index = XING_F.indexOf(zhiFu.value)
163-
// cfg.value[][5]
159+
for (let i = 0; i < 9; i++) {
160+
const index = XING_F.indexOf(zhiFu.value)
161+
cfg.value[(shiGanGong + i - 1) % 9 + 1][5] = [...XING_F, ...XING_F][index + i]
162+
}
163+
// for (let i = 0; i < 8; i++) {
164+
// const tmp = (shiZhiGong + i - 1) % 9 + 1
165+
// if (tmp === 5) continue
166+
// const index = MEN_F.indexOf(zhiShi.value)
167+
// cfg.value[tmp][8] = [...MEN_F, ...MEN_F][index + i]
164168
// }
169+
for (let i = 0; i < 9; i++) {
170+
const shenList = juShu.value > 0 ? SHEN_F : [SHEN_F[0], ...SHEN_F.slice().reverse()]
171+
cfg.value[(shiGanGong + i - 1) % 9 + 1][2] = shenList[i]
172+
}
165173
}
166174
function paiZhuanPan() {
167175
const transer = [1, 8, 3, 4, 9, 2, 7, 6]

0 commit comments

Comments
 (0)