first commit
This commit is contained in:
+568
@@ -0,0 +1,568 @@
|
||||
"use strict";
|
||||
var common_vendor = require("../../common/vendor.js");
|
||||
var uni_modules_wotDesignUni_components_wdToast_index = require("../../uni_modules/wot-design-uni/components/wd-toast/index.js");
|
||||
var uni_modules_wotDesignUni_components_wdMessageBox_index = require("../../uni_modules/wot-design-uni/components/wd-message-box/index.js");
|
||||
require("../../uni_modules/wot-design-uni/locale/index.js");
|
||||
require("../../uni_modules/wot-design-uni/dayjs/index.js");
|
||||
var api_modules_AI = require("../../api/modules/AI.js");
|
||||
var api_modules_ZhouYi = require("../../api/modules/ZhouYi.js");
|
||||
var api_modules_question = require("../../api/modules/question.js");
|
||||
var config_api_config = require("../../config/api.config.js");
|
||||
require("../../stores/index.js");
|
||||
var utils_common = require("../../utils/common.js");
|
||||
var utils_gua_64 = require("../../utils/gua_64.js");
|
||||
var stores_modules_AIResponse = require("../../stores/modules/AIResponse.js");
|
||||
var stores_modules_user = require("../../stores/modules/user.js");
|
||||
require("../../uni_modules/wot-design-uni/components/common/util.js");
|
||||
require("../../uni_modules/wot-design-uni/components/common/AbortablePromise.js");
|
||||
require("../../uni_modules/wot-design-uni/locale/lang/zh-CN.js");
|
||||
require("../../uni_modules/wot-design-uni/dayjs/constant.js");
|
||||
require("../../uni_modules/wot-design-uni/dayjs/locale/en.js");
|
||||
require("../../uni_modules/wot-design-uni/dayjs/utils.js");
|
||||
require("../../api/modules/config.js");
|
||||
require("../../utils/request.js");
|
||||
require("../../stores/modules/tabIndex.js");
|
||||
require("../../stores/modules/rateLimit.js");
|
||||
if (!Array) {
|
||||
const _easycom_wd_button2 = common_vendor.resolveComponent("wd-button");
|
||||
const _easycom_wd_text2 = common_vendor.resolveComponent("wd-text");
|
||||
const _easycom_wd_input2 = common_vendor.resolveComponent("wd-input");
|
||||
const _easycom_wd_img2 = common_vendor.resolveComponent("wd-img");
|
||||
const _easycom_wd_message_box2 = common_vendor.resolveComponent("wd-message-box");
|
||||
const _easycom_wd_overlay2 = common_vendor.resolveComponent("wd-overlay");
|
||||
const _easycom_wd_toast2 = common_vendor.resolveComponent("wd-toast");
|
||||
(_easycom_wd_button2 + _easycom_wd_text2 + _easycom_wd_input2 + _easycom_wd_img2 + _easycom_wd_message_box2 + _easycom_wd_overlay2 + _easycom_wd_toast2)();
|
||||
}
|
||||
const _easycom_wd_button = () => "../../uni_modules/wot-design-uni/components/wd-button/wd-button.js";
|
||||
const _easycom_wd_text = () => "../../uni_modules/wot-design-uni/components/wd-text/wd-text.js";
|
||||
const _easycom_wd_input = () => "../../uni_modules/wot-design-uni/components/wd-input/wd-input.js";
|
||||
const _easycom_wd_img = () => "../../uni_modules/wot-design-uni/components/wd-img/wd-img.js";
|
||||
const _easycom_wd_message_box = () => "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.js";
|
||||
const _easycom_wd_overlay = () => "../../uni_modules/wot-design-uni/components/wd-overlay/wd-overlay.js";
|
||||
const _easycom_wd_toast = () => "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast.js";
|
||||
if (!Math) {
|
||||
(NavBar + _easycom_wd_button + _easycom_wd_text + _easycom_wd_input + _easycom_wd_img + _easycom_wd_message_box + _easycom_wd_overlay + _easycom_wd_toast)();
|
||||
}
|
||||
const NavBar = () => "../../components/NavBar.js";
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "suan-gua",
|
||||
setup(__props) {
|
||||
const {
|
||||
responseText,
|
||||
showResponseText,
|
||||
isLoading,
|
||||
isDone
|
||||
} = common_vendor.storeToRefs(stores_modules_AIResponse.useAIReponseStore());
|
||||
const {
|
||||
yaoList
|
||||
} = common_vendor.storeToRefs(stores_modules_user.useUserStore());
|
||||
const message = uni_modules_wotDesignUni_components_wdMessageBox_index.useMessage();
|
||||
const currentTime = common_vendor.ref(utils_common.formatDate(new Date()));
|
||||
const lunarTime = common_vendor.computed$1(() => {
|
||||
const d = common_vendor.gt(currentTime.value.substring(0, 16));
|
||||
return d.lunar.toString();
|
||||
});
|
||||
const refreshTime = () => {
|
||||
currentTime.value = utils_common.formatDate(new Date());
|
||||
};
|
||||
const YangImg = config_api_config.BASE_URL + "/uploads/mov_yang_d41e51fd83.png";
|
||||
const YinImg = config_api_config.BASE_URL + "/uploads/yin_e32817a811.png";
|
||||
const audio = common_vendor.index.createInnerAudioContext();
|
||||
audio.autoplay = false;
|
||||
audio.src = config_api_config.BASE_URL + "/uploads/01_b7107f6b3b.mp3";
|
||||
const ding = common_vendor.index.createInnerAudioContext();
|
||||
ding.autoplay = false;
|
||||
ding.src = config_api_config.BASE_URL + "/uploads/ding_ae6e65af25.mp3";
|
||||
const coinPositiveImg = config_api_config.BASE_URL + "/uploads/_52f5bd86b5.png";
|
||||
const coinNegativeImg = config_api_config.BASE_URL + "/uploads/_5f46b99d48.png";
|
||||
const toast = uni_modules_wotDesignUni_components_wdToast_index.useToast();
|
||||
const coins = common_vendor.ref(["\u6B63\u9762", "\u6B63\u9762", "\u6B63\u9762"]);
|
||||
const \u672C\u5366 = common_vendor.ref("");
|
||||
const \u53D8\u5366 = common_vendor.ref("");
|
||||
const lines = common_vendor.ref([]);
|
||||
const randomSide = () => {
|
||||
return Math.random() < 0.5 ? "\u6B63\u9762" : "\u53CD\u9762";
|
||||
};
|
||||
const analyzeYao = (coinResults) => {
|
||||
console.log(coinResults);
|
||||
const positiveCount = coinResults.filter((v) => v === "\u6B63\u9762").length;
|
||||
if (positiveCount === 3) {
|
||||
return { type: "\u8001\u9633", isMoving: true, symbol: "\u9633", img: YangImg, number: "9" };
|
||||
} else if (positiveCount === 0) {
|
||||
return { type: "\u8001\u9634", isMoving: true, symbol: "\u9634", img: YinImg, number: "6" };
|
||||
} else if (positiveCount === 2) {
|
||||
return { type: "\u5C11\u9634", isMoving: false, symbol: "\u9634", img: YinImg, number: "8" };
|
||||
} else {
|
||||
return { type: "\u5C11\u9633", isMoving: false, symbol: "\u9633", img: YangImg, number: "7" };
|
||||
}
|
||||
};
|
||||
const resetState = () => {
|
||||
lines.value = [];
|
||||
coins.value = ["\u6B63\u9762", "\u6B63\u9762", "\u6B63\u9762"];
|
||||
\u672C\u5366.value = "";
|
||||
\u53D8\u5366.value = "";
|
||||
\u4F53\u5366.value = "";
|
||||
\u7528\u5366.value = "";
|
||||
\u723B\u8F9E.value = "";
|
||||
\u52A8\u723B\u5217\u8868.value = [];
|
||||
\u9759\u723B\u5217\u8868.value = [];
|
||||
inputTxt.value = "";
|
||||
showUserAgreeButton.value = true;
|
||||
showResponse.value = false;
|
||||
audio.pause();
|
||||
stores_modules_AIResponse.useAIReponseStore().reset();
|
||||
};
|
||||
const performCast = () => {
|
||||
const newCoins = [randomSide(), randomSide(), randomSide()];
|
||||
coins.value = [...newCoins];
|
||||
const yao = analyzeYao(newCoins);
|
||||
lines.value.unshift(yao);
|
||||
};
|
||||
common_vendor.ref(false);
|
||||
const inputTxt = common_vendor.ref("");
|
||||
common_vendor.ref("\u5366\u8C61\u7ED3\u679C\u751F\u6210\u4E2D");
|
||||
const \u672C\u5366\u6570\u5B57 = common_vendor.ref("");
|
||||
const \u4F53\u5366 = common_vendor.ref("");
|
||||
const \u7528\u5366 = common_vendor.ref("");
|
||||
const \u52A8\u723B\u5217\u8868 = common_vendor.ref([]);
|
||||
common_vendor.ref(0);
|
||||
const \u723B\u8F9E = common_vendor.ref("");
|
||||
const \u52A8\u723B\u540D\u79F0 = ["\u521D\u4E5D", "\u4E5D\u4E8C", "\u4E5D\u4E09", "\u4E5D\u56DB", "\u4E5D\u4E94", "\u4E0A\u4E5D", "\u521D\u516D", "\u516D\u4E8C", "\u516D\u4E09", "\u516D\u56DB", "\u516D\u4E94", "\u4E0A\u516D"];
|
||||
const \u9759\u723B\u5217\u8868 = common_vendor.ref([]);
|
||||
const \u83B7\u53D6\u52A8\u723B\u540D\u79F0 = async () => {
|
||||
const len = \u52A8\u723B\u5217\u8868.value.length;
|
||||
if (len === 0) {
|
||||
return "\u65E0";
|
||||
}
|
||||
if (len === 1) {
|
||||
return \u52A8\u723B\u5217\u8868.value[0];
|
||||
}
|
||||
if (len === 2) {
|
||||
return \u52A8\u723B\u5217\u8868.value[1];
|
||||
}
|
||||
if (len === 3) {
|
||||
return \u52A8\u723B\u5217\u8868.value[1];
|
||||
}
|
||||
if (len === 4) {
|
||||
return \u9759\u723B\u5217\u8868.value[0];
|
||||
}
|
||||
if (len === 5) {
|
||||
return \u9759\u723B\u5217\u8868.value[0];
|
||||
}
|
||||
if (len === 6) {
|
||||
if (\u672C\u5366.value === "\u4E7E\u4E3A\u5929") {
|
||||
return "\u7528\u4E5D";
|
||||
} else if (\u672C\u5366.value === "\u5764\u4E3A\u5730") {
|
||||
return "\u7528\u516D";
|
||||
} else {
|
||||
return "\u65E0";
|
||||
}
|
||||
}
|
||||
return "\u65E0";
|
||||
};
|
||||
const showCompleteLoading = common_vendor.ref(false);
|
||||
common_vendor.ref(false);
|
||||
common_vendor.watch(
|
||||
() => lines.value,
|
||||
async (newVal) => {
|
||||
if (newVal.length === 6) {
|
||||
showCompleteLoading.value = true;
|
||||
await utils_common.sleep(3e3);
|
||||
showCompleteLoading.value = false;
|
||||
setTimeout(() => {
|
||||
common_vendor.index.pageScrollTo({
|
||||
scrollTop: 999999
|
||||
});
|
||||
});
|
||||
let result1 = "";
|
||||
let arr1 = JSON.parse(JSON.stringify(lines.value));
|
||||
arr1.reverse().map((line) => {
|
||||
result1 += line.symbol;
|
||||
\u672C\u5366\u6570\u5B57.value += line.number;
|
||||
});
|
||||
let result2 = "";
|
||||
let arr2 = JSON.parse(JSON.stringify(movingInfo.value));
|
||||
arr2.reverse().map((line) => {
|
||||
result2 += line.symbol;
|
||||
});
|
||||
let arr3 = JSON.parse(JSON.stringify(movingInfo.value));
|
||||
arr3.reverse().map((line, i) => {
|
||||
if (line.isMoving) {
|
||||
if (line.number === "6") {
|
||||
\u52A8\u723B\u5217\u8868.value.push(\u52A8\u723B\u540D\u79F0[6 + i]);
|
||||
}
|
||||
if (line.number === "9") {
|
||||
\u52A8\u723B\u5217\u8868.value.push(\u52A8\u723B\u540D\u79F0[i]);
|
||||
}
|
||||
} else {
|
||||
if (line.number === "8") {
|
||||
\u9759\u723B\u5217\u8868.value.push(\u52A8\u723B\u540D\u79F0[6 + i]);
|
||||
}
|
||||
if (line.number === "7") {
|
||||
\u9759\u723B\u5217\u8868.value.push(\u52A8\u723B\u540D\u79F0[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
for (let i = 0; i < 64; i++) {
|
||||
if (utils_gua_64["\u516D\u5341\u56DB\u5366"][i].symbol === result1) {
|
||||
\u672C\u5366.value = utils_gua_64["\u516D\u5341\u56DB\u5366"][i].name;
|
||||
\u4F53\u5366.value = utils_gua_64["\u516D\u5341\u56DB\u5366"][i].bottom;
|
||||
\u7528\u5366.value = utils_gua_64["\u516D\u5341\u56DB\u5366"][i].top;
|
||||
}
|
||||
if (utils_gua_64["\u516D\u5341\u56DB\u5366"][i].symbol === result2) {
|
||||
\u53D8\u5366.value = utils_gua_64["\u516D\u5341\u56DB\u5366"][i].name;
|
||||
}
|
||||
}
|
||||
let _\u52A8\u723B\u540D\u79F0 = await \u83B7\u53D6\u52A8\u723B\u540D\u79F0();
|
||||
if (_\u52A8\u723B\u540D\u79F0 === "\u65E0") {
|
||||
\u723B\u8F9E.value = "\u65E0\u52A8\u723B";
|
||||
} else {
|
||||
\u723B\u8F9E.value = await api_modules_ZhouYi["\u83B7\u53D6\u6613\u7ECF\u723B\u8F9E"](\u672C\u5366.value, _\u52A8\u723B\u540D\u79F0);
|
||||
}
|
||||
await api_modules_AI.AIChat(
|
||||
inputTxt.value,
|
||||
\u672C\u5366.value,
|
||||
\u53D8\u5366.value,
|
||||
\u723B\u8F9E.value
|
||||
).then((res) => {
|
||||
if (res.code) {
|
||||
toast.error(res.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
const showUserAgreeButton = common_vendor.ref(true);
|
||||
const agreeMsg = "\u53E4\u4EBA\u4E91\uFF0C\u201C\u5584\u4E3A\u6613\u8005\u4E0D\u5360\u201D\u3002\u524D\u8DEF\u5409\u51F6\uFF0C\u672C\u662F\u4EBA\u5FC3\u4E4B\u5012\u5F71\uFF1B\u5360\u65AD\u5FAE\u8A00\uFF0C\u4E0D\u8FC7\u5366\u8C61\u4E4B\u8FF7\u6D25\u3002\u516D\u723B\u6240\u793A\uFF0C\u5E76\u975E\u4E0D\u53EF\u9006\u8F6C\u7684\u5BBF\u547D\uFF0C\u5176\u6240\u793A\u8005\uFF0C\u65E0\u975E\u6613\u7406\u63A8\u6F14\uFF0C\u672A\u5FC5\u5C3D\u7136\u65E0\u8BEF\u3002\u65E0\u8BBA\u5F97\u9047\u4F55\u5366\uFF0C\u8BF7\u4EE5\u5E73\u548C\u4E4B\u5FC3\u67E5\u770B\u3002\u4E07\u4E8B\u7EC8\u7A76\u4EBA\u4E3A\uFF0C\u662F\u5426\u67E5\u770B\u5360\u65AD\u7ED3\u679C\uFF1F";
|
||||
const showResponse = common_vendor.ref(false);
|
||||
const userAgree = () => {
|
||||
message.confirm({
|
||||
title: "\u63D0\u793A",
|
||||
msg: agreeMsg
|
||||
}).then(async () => {
|
||||
audio.seek(0);
|
||||
audio.play();
|
||||
showResponse.value = true;
|
||||
showResponseText.value = true;
|
||||
isLoading.value = true;
|
||||
showUserAgreeButton.value = false;
|
||||
});
|
||||
};
|
||||
const save = () => {
|
||||
yaoList.value.unshift({
|
||||
time: new Date().getTime(),
|
||||
q: inputTxt.value,
|
||||
symbol1: \u672C\u5366.value,
|
||||
symbol2: \u53D8\u5366.value,
|
||||
symbolNum: \u672C\u5366\u6570\u5B57.value,
|
||||
result: responseText.value
|
||||
});
|
||||
responseText.value = "";
|
||||
isDone.value = false;
|
||||
toast.success("\u4FDD\u5B58\u6210\u529F");
|
||||
resetState();
|
||||
};
|
||||
const coinLoading = common_vendor.ref(false);
|
||||
const handleCast = async () => {
|
||||
ding.play();
|
||||
if (lines.value.length === 6) {
|
||||
resetState();
|
||||
} else if (lines.value.length === 0) {
|
||||
if (inputTxt.value === "") {
|
||||
toast.error("\u8BF7\u8F93\u5165\u6240\u95EE\u4E4B\u4E8B");
|
||||
return;
|
||||
}
|
||||
await api_modules_question.createQ(inputTxt.value);
|
||||
const func = await utils_common.rateLimit(
|
||||
30 * 60 * 1e3,
|
||||
3
|
||||
);
|
||||
if (!func()) {
|
||||
toast.error("\u60A8\u77ED\u65F6\u95F4\u5185\u5360\u535C\u6B21\u6570\u8FC7\u591A\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5");
|
||||
return;
|
||||
}
|
||||
coinLoading.value = true;
|
||||
toast.info({
|
||||
msg: "\u8BF7\u9759\u5FC3\u7247\u523B\uFF0C\u9ED8\u5FF5\u6240\u95EE\u4E4B\u4E8B",
|
||||
closed: () => {
|
||||
performCast();
|
||||
coinLoading.value = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
coinLoading.value = true;
|
||||
performCast();
|
||||
setTimeout(() => {
|
||||
coinLoading.value = false;
|
||||
}, 1e3);
|
||||
}
|
||||
};
|
||||
const currentStep = common_vendor.computed$1(() => lines.value.length);
|
||||
const isComplete = common_vendor.computed$1(() => lines.value.length === 6);
|
||||
const buttonText = common_vendor.computed$1(() => {
|
||||
if (currentStep.value === 0) {
|
||||
return "\u5F00\u59CB\u8BF7\u723B";
|
||||
} else if (currentStep.value === 6) {
|
||||
return "\u91CD\u65B0\u8BF7\u723B";
|
||||
} else {
|
||||
return `\u7EE7\u7EED\u8BF7\u723B`;
|
||||
}
|
||||
});
|
||||
const displayLines = common_vendor.computed$1(() => {
|
||||
const positionNames = ["\u521D\u723B", "\u4E8C\u723B", "\u4E09\u723B", "\u56DB\u723B", "\u4E94\u723B", "\u4E0A\u723B"];
|
||||
return lines.value.map((line, index) => ({
|
||||
position: positionNames[index],
|
||||
symbol: line.symbol,
|
||||
img: line.img,
|
||||
number: line.number
|
||||
}));
|
||||
});
|
||||
const movingInfo = common_vendor.computed$1(() => {
|
||||
const movingIndices = [];
|
||||
lines.value.forEach((line, idx) => {
|
||||
let item = {
|
||||
...line,
|
||||
img: line.img
|
||||
};
|
||||
if (line.isMoving) {
|
||||
item.position = `\u7B2C${6 - idx}\u723B\u52A8`;
|
||||
item.symbol = line.symbol === "\u9634" ? "\u9633" : "\u9634";
|
||||
if (line.type === "\u8001\u9634")
|
||||
item.img = YangImg;
|
||||
if (line.type === "\u8001\u9633")
|
||||
item.img = YinImg;
|
||||
}
|
||||
movingIndices.push(item);
|
||||
});
|
||||
return movingIndices;
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.p({
|
||||
title: "\u95EE\u6613"
|
||||
}),
|
||||
b: common_vendor.o(refreshTime),
|
||||
c: common_vendor.p({
|
||||
size: "small",
|
||||
type: "icon",
|
||||
icon: "refresh"
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
text: "\u5F53\u524D\u65F6\u95F4",
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
text: "\u516C\u5386",
|
||||
color: "#999"
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
text: currentTime.value,
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
text: "\u519C\u5386",
|
||||
color: "#999"
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
text: common_vendor.unref(lunarTime),
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
i: common_vendor.p({
|
||||
text: "\u6240\u95EE\u4E4B\u4E8B",
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
j: common_vendor.o(($event) => inputTxt.value = $event),
|
||||
k: common_vendor.p({
|
||||
placeholder: "\u8BF7\u8F93\u5165",
|
||||
disabled: lines.value.length !== 0,
|
||||
modelValue: inputTxt.value
|
||||
}),
|
||||
l: common_vendor.t(common_vendor.unref(buttonText)),
|
||||
m: common_vendor.o(handleCast),
|
||||
n: common_vendor.p({
|
||||
type: "warning",
|
||||
size: "large",
|
||||
["custom-style"]: {
|
||||
backgroundColor: "#145060",
|
||||
fontSize: "32rpx"
|
||||
},
|
||||
loading: coinLoading.value,
|
||||
block: true,
|
||||
disabled: common_vendor.unref(showResponseText) && !common_vendor.unref(isDone)
|
||||
}),
|
||||
o: common_vendor.f(coins.value, (coin, index, i0) => {
|
||||
return {
|
||||
a: "14c39f7b-10-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: coin === "\u6B63\u9762" ? coinPositiveImg : coinNegativeImg,
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
mode: "aspectFill"
|
||||
}),
|
||||
c: index
|
||||
};
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
text: "\u672C\u5366",
|
||||
size: "28rpx",
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
q: \u672C\u5366.value
|
||||
}, \u672C\u5366.value ? {
|
||||
r: common_vendor.t(\u672C\u5366.value),
|
||||
s: common_vendor.o(($event) => common_vendor.unref(utils_common.goTo)(`/pages/ZhouYi/detail?name=${\u672C\u5366.value}`)),
|
||||
t: common_vendor.p({
|
||||
size: "small",
|
||||
plain: true,
|
||||
["custom-style"]: {
|
||||
border: "#4b3a2b 2px solid",
|
||||
color: "#4b3a2b",
|
||||
fontSize: "24rpx"
|
||||
}
|
||||
})
|
||||
} : {}, {
|
||||
v: lines.value.length === 0
|
||||
}, lines.value.length === 0 ? {} : {
|
||||
w: common_vendor.f(common_vendor.unref(displayLines), (line, idx, i0) => {
|
||||
return {
|
||||
a: idx,
|
||||
b: `url(${line.img})`
|
||||
};
|
||||
})
|
||||
}, {
|
||||
x: common_vendor.p({
|
||||
text: "\u53D8\u5366",
|
||||
size: "28rpx",
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
y: \u53D8\u5366.value
|
||||
}, \u53D8\u5366.value ? {
|
||||
z: common_vendor.t(\u53D8\u5366.value),
|
||||
A: common_vendor.o(($event) => common_vendor.unref(utils_common.goTo)(`/pages/ZhouYi/detail?name=${\u53D8\u5366.value}`)),
|
||||
B: common_vendor.p({
|
||||
size: "small",
|
||||
plain: true,
|
||||
["custom-style"]: {
|
||||
border: "#4b3a2b 2px solid",
|
||||
color: "#4b3a2b",
|
||||
fontSize: "24rpx"
|
||||
}
|
||||
})
|
||||
} : {}, {
|
||||
C: common_vendor.unref(movingInfo).length === 0
|
||||
}, common_vendor.unref(movingInfo).length === 0 ? {
|
||||
D: common_vendor.t(lines.value.length === 0 ? "\u6682\u65E0" : "\u65E0\u52A8\u723B")
|
||||
} : {
|
||||
E: common_vendor.f(common_vendor.unref(movingInfo), (info, idx, i0) => {
|
||||
return {
|
||||
a: idx,
|
||||
b: `url(${info.img})`
|
||||
};
|
||||
})
|
||||
}, {
|
||||
F: common_vendor.p({
|
||||
text: "\u5360\u65AD\u7ED3\u679C",
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
G: !common_vendor.unref(isComplete)
|
||||
}, !common_vendor.unref(isComplete) ? {
|
||||
H: common_vendor.p({
|
||||
text: "\u5C1A\u672A\u6210\u8C61",
|
||||
color: "#333"
|
||||
})
|
||||
} : {}, {
|
||||
I: common_vendor.unref(isComplete) && showUserAgreeButton.value && !showCompleteLoading.value
|
||||
}, common_vendor.unref(isComplete) && showUserAgreeButton.value && !showCompleteLoading.value ? {
|
||||
J: common_vendor.o(userAgree),
|
||||
K: common_vendor.p({
|
||||
block: true,
|
||||
size: "large",
|
||||
["custom-style"]: {
|
||||
backgroundColor: "#145060",
|
||||
fontSize: "32rpx"
|
||||
}
|
||||
})
|
||||
} : {}, {
|
||||
L: showResponse.value
|
||||
}, showResponse.value ? common_vendor.e({
|
||||
M: common_vendor.p({
|
||||
text: "\u52A8\u723B\u723B\u8F9E",
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
N: \u723B\u8F9E.value
|
||||
}, \u723B\u8F9E.value ? {
|
||||
O: common_vendor.p({
|
||||
text: \u723B\u8F9E.value,
|
||||
color: "#666"
|
||||
})
|
||||
} : {
|
||||
P: common_vendor.p({
|
||||
text: "\u5C1A\u672A\u6210\u8C61",
|
||||
color: "#666"
|
||||
})
|
||||
}, {
|
||||
Q: common_vendor.p({
|
||||
text: "\u5366\u8C61\u8BF4\u660E",
|
||||
bold: true,
|
||||
color: "#333"
|
||||
}),
|
||||
R: !common_vendor.unref(isComplete)
|
||||
}, !common_vendor.unref(isComplete) ? {
|
||||
S: common_vendor.p({
|
||||
text: "\u5C1A\u672A\u6210\u8C61",
|
||||
color: "#666"
|
||||
})
|
||||
} : {}, {
|
||||
T: common_vendor.unref(showResponseText) && common_vendor.unref(responseText)
|
||||
}, common_vendor.unref(showResponseText) && common_vendor.unref(responseText) ? {
|
||||
U: common_vendor.p({
|
||||
text: common_vendor.unref(responseText),
|
||||
color: "#666"
|
||||
})
|
||||
} : {}, {
|
||||
V: common_vendor.unref(isDone) && common_vendor.unref(showResponseText)
|
||||
}, common_vendor.unref(isDone) && common_vendor.unref(showResponseText) ? {
|
||||
W: common_vendor.o(save),
|
||||
X: common_vendor.p({
|
||||
block: true,
|
||||
size: "large",
|
||||
["custom-style"]: {
|
||||
backgroundColor: "#145060",
|
||||
fontSize: "32rpx"
|
||||
}
|
||||
})
|
||||
} : {}) : {}, {
|
||||
Y: common_vendor.p({
|
||||
text: "\u63D0\u793A",
|
||||
size: "32rpx",
|
||||
color: "#333"
|
||||
}),
|
||||
Z: common_vendor.p({
|
||||
text: "\u91D1\u94B1\u843D\u5B9A\uFF0C\u516D\u723B\u5DF2\u6210\uFF0C\u6B63\u5728\u4E3A\u60A8\u63A8\u6F14\u5366\u8C61\u2026\u2026 ",
|
||||
size: "28rpx",
|
||||
color: "#333"
|
||||
}),
|
||||
aa: common_vendor.p({
|
||||
show: showCompleteLoading.value,
|
||||
["lock-scroll"]: true
|
||||
}),
|
||||
ab: common_vendor.p({
|
||||
position: "middle"
|
||||
})
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-14c39f7b"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/suan-gua/suan-gua.vue"]]);
|
||||
wx.createComponent(Component);
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-button": "../../uni_modules/wot-design-uni/components/wd-button/wd-button",
|
||||
"wd-text": "../../uni_modules/wot-design-uni/components/wd-text/wd-text",
|
||||
"wd-input": "../../uni_modules/wot-design-uni/components/wd-input/wd-input",
|
||||
"wd-img": "../../uni_modules/wot-design-uni/components/wd-img/wd-img",
|
||||
"wd-message-box": "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box",
|
||||
"wd-overlay": "../../uni_modules/wot-design-uni/components/wd-overlay/wd-overlay",
|
||||
"wd-toast": "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast",
|
||||
"nav-bar": "../../components/NavBar"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+245
@@ -0,0 +1,245 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.container.data-v-14c39f7b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
height: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 头部 */
|
||||
.header.data-v-14c39f7b {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 32rpx;
|
||||
box-sizing: border-box;
|
||||
border-radius: 32rpx;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.header .title.data-v-14c39f7b {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #3a2c1f;
|
||||
letter-spacing: 4rpx;
|
||||
display: block;
|
||||
text-shadow: 2rpx 2rpx 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.header .header-time.data-v-14c39f7b {
|
||||
margin-top: 32rpx;
|
||||
gap: 32rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.header .subtitle.data-v-14c39f7b {
|
||||
font-size: 26rpx;
|
||||
color: #7f6b4f;
|
||||
margin-top: 12rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* 三枚铜钱区域 */
|
||||
.coins-area.data-v-14c39f7b {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 32rpx;
|
||||
margin: 16rpx 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.coins-area .coin.data-v-14c39f7b {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
filter: drop-shadow(0 8rpx 10rpx rgba(0, 0, 0, 0.25));
|
||||
}
|
||||
.data-v-14c39f7b .cast-btn {
|
||||
width: 400rpx;
|
||||
background: #4b3a2b;
|
||||
color: #fef1df;
|
||||
border-radius: 100rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
padding: 24rpx 0;
|
||||
box-shadow: 0 6rpx 0 #2b2118;
|
||||
transition: all 0.1s linear;
|
||||
margin-bottom: 20rpx;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 按钮区域 */
|
||||
.action-area.data-v-14c39f7b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 30rpx 0 40rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.action-area .progress-text.data-v-14c39f7b {
|
||||
font-size: 28rpx;
|
||||
color: #5c4a34;
|
||||
background: rgba(255, 245, 225, 0.8);
|
||||
padding: 8rpx 24rpx;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
.action-area .complete-text.data-v-14c39f7b {
|
||||
color: #9b6e3e;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 底部结果区域 (主爻 | 动爻) */
|
||||
.result-area.data-v-14c39f7b {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 32rpx;
|
||||
min-height: 348rpx;
|
||||
}
|
||||
.result-area .main-lines.data-v-14c39f7b,
|
||||
.result-area .moving-lines.data-v-14c39f7b {
|
||||
flex: 1;
|
||||
background: #f3f4f6;
|
||||
-webkit-backdrop-filter: blur(4px);
|
||||
backdrop-filter: blur(4px);
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.08);
|
||||
position: relative;
|
||||
}
|
||||
.result-area .section-title.data-v-14c39f7b {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.result-area .empty-tip.data-v-14c39f7b {
|
||||
text-align: center;
|
||||
color: #4b3a2b;
|
||||
font-size: 28rpx;
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
.result-area .lines-list.data-v-14c39f7b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
width: calc(100% - 48rpx);
|
||||
bottom: 24rpx;
|
||||
}
|
||||
.result-area .line-item.data-v-14c39f7b {
|
||||
margin: 8rpx 0;
|
||||
padding: 12rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
align-items: baseline;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
.result-area .line-item .line-position.data-v-14c39f7b {
|
||||
width: 80rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #b87c3a;
|
||||
}
|
||||
.result-area .line-item .line-symbol.data-v-14c39f7b {
|
||||
font-size: 32rpx;
|
||||
letter-spacing: 6rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
.result-area .moving-list.data-v-14c39f7b {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
width: calc(100% - 48rpx);
|
||||
bottom: 24rpx;
|
||||
}
|
||||
.result-area .moving-list .moving-item.data-v-14c39f7b {
|
||||
margin: 8rpx 0;
|
||||
padding: 12rpx 20rpx;
|
||||
border-radius: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
}
|
||||
.result-area .moving-list .moving-symbol.data-v-14c39f7b {
|
||||
color: #ff0000;
|
||||
}
|
||||
.result-area .guaxiang.data-v-14c39f7b {
|
||||
position: absolute;
|
||||
width: calc(100% - 64rpx);
|
||||
bottom: 32rpx;
|
||||
color: #4b3a2b;
|
||||
text-align: center;
|
||||
}
|
||||
.result-content.data-v-14c39f7b {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
gap: 32rpx;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.08);
|
||||
border-radius: 32rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 图例说明 */
|
||||
.overlay-content.data-v-14c39f7b {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
.overlay-content .tips.data-v-14c39f7b {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
align-items: center;
|
||||
gap: 32rpx;
|
||||
width: 300px;
|
||||
padding: 48rpx;
|
||||
border-radius: 32rpx;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.overlay-content .user-agree-tips.data-v-14c39f7b {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 64rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #B8AD70;
|
||||
box-sizing: border-box;
|
||||
padding: 120rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user