first commit

This commit is contained in:
SnhAenIgseAl 2026-03-31 16:44:41 +08:00
parent dd513eda30
commit 7bde226505
219 changed files with 33046 additions and 9 deletions

1
.gitignore vendored
View File

@ -9,7 +9,6 @@ lerna-debug.log*
node_modules node_modules
.DS_Store .DS_Store
dist
dist-ssr dist-ssr
coverage coverage
*.local *.local

3
dist/dev/mp-weixin/api/index.js vendored Normal file
View File

@ -0,0 +1,3 @@
"use strict";
require("./modules/AI.js");
require("../common/vendor.js");

92
dist/dev/mp-weixin/api/modules/AI.js vendored Normal file
View File

@ -0,0 +1,92 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
var api_modules_config = require("./config.js");
require("../../stores/index.js");
var stores_modules_AIResponse = require("../../stores/modules/AIResponse.js");
var stores_modules_tabIndex = require("../../stores/modules/tabIndex.js");
const {
responseText,
showResponseText,
isLoading,
isDone
} = common_vendor.storeToRefs(stores_modules_AIResponse.useAIReponseStore());
const {
tabIndex
} = common_vendor.storeToRefs(stores_modules_tabIndex.useTabStore());
const API_KEY = "sk-b65f99c1b2ab416aaf340891cf4ca308";
const AI_URL = "https://api.deepseek.com/chat/completions";
const AI_MODEL = "deepseek-chat";
const errMessage = {
401: "API key \u65E0\u6548",
403: "API key \u4F59\u989D\u4E0D\u8DB3"
};
const AIChat = async (q, symbol_1, symbol_2, symbol_3) => {
const pageCfg = await api_modules_config.getPageConfig();
let callWord = pageCfg.call_word;
callWord = callWord.replace("[q]", q).replace("[symbol_1]", symbol_1).replace("[symbol_2]", symbol_2).replace("[symbol_3]", symbol_3);
console.log(callWord);
return await new Promise((resolve, reject) => {
const requestTask = common_vendor.index.request({
url: AI_URL,
method: "POST",
header: {
"content-type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
data: {
model: AI_MODEL,
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: callWord }
],
stream: true
},
enableChunked: true,
responseType: "arraybuffer",
success: (res) => {
if (res.statusCode !== 200) {
resolve({
code: res.statusCode,
message: errMessage[res.statusCode]
});
}
isDone.value = true;
},
fail: (error) => {
},
complete: (complete) => {
}
});
requestTask.onChunkReceived((res) => {
var _a;
const uint8Array = new Uint8Array(res.data);
const decoder = new common_vendor.textEncodingShim.exports.TextDecoder("utf-8");
const chunk = decoder.decode(uint8Array).toString().split("data: ");
for (let i = 1; i < chunk.length; i++) {
try {
const result = JSON.parse(chunk[i]);
if (result.choices[0].delta.content) {
isLoading.value = false;
responseText.value += (_a = result.choices[0].delta) == null ? void 0 : _a.content;
}
} catch (e) {
}
}
});
common_vendor.watch(
() => tabIndex.value,
(newVal, oldVal) => {
if (newVal !== oldVal) {
requestTask.abort();
isLoading.value = false;
responseText.value = "";
return;
}
},
{
deep: true
}
);
});
};
exports.AIChat = AIChat;

View File

@ -0,0 +1,36 @@
"use strict";
var utils_request = require("../../utils/request.js");
const getZhouList = () => {
return utils_request.request("/api/zhou-yis?sort=index&pagination[pageSize]=64", {
method: "GET"
});
};
const getZhouDetail = ({
id,
name
}) => {
if (id) {
return utils_request.request(`/api/zhou-yis/${id}`, {
method: "GET"
});
}
if (name) {
return utils_request.request(`/api/zhou-yis?filters[name]=${name}`, {
method: "GET"
});
}
};
const \u83B7\u53D6\u6613\u7ECF\u723B\u8F9E = (name, \u52A8\u723B\u540D\u79F0) => {
return utils_request.request(`/api/zhou-yis?filters[name]=${name}`, {
method: "GET"
}).then(
(res) => res.data[0]
).then((res) => {
let str = res.desc.split("\n\n");
let index = str.findIndex((item) => item.includes(\u52A8\u723B\u540D\u79F0));
return str[index] + "\n" + str[index + 1];
});
};
exports.getZhouDetail = getZhouDetail;
exports.getZhouList = getZhouList;
exports["\u83B7\u53D6\u6613\u7ECF\u723B\u8F9E"] = \u83B7\u53D6\u6613\u7ECF\u723B\u8F9E;

View File

@ -0,0 +1,8 @@
"use strict";
var utils_request = require("../../utils/request.js");
const getPageConfig = async () => {
return utils_request.request("/api/config?populate=avatar", {
method: "GET"
}).then((res) => res.data);
};
exports.getPageConfig = getPageConfig;

View File

@ -0,0 +1,13 @@
"use strict";
var utils_request = require("../../utils/request.js");
const createQ = (q) => {
return utils_request.request("/api/questions", {
method: "POST",
data: {
data: {
q
}
}
});
};
exports.createQ = createQ;

View File

@ -0,0 +1,13 @@
"use strict";
var utils_request = require("../../utils/request.js");
const createSuggestion = (desc) => {
return utils_request.request("/api/suggestions", {
method: "POST",
data: {
data: {
desc
}
}
});
};
exports.createSuggestion = createSuggestion;

40
dist/dev/mp-weixin/app.js vendored Normal file
View File

@ -0,0 +1,40 @@
"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
var common_vendor = require("./common/vendor.js");
var stores_index = require("./stores/index.js");
require("./stores/modules/tabIndex.js");
require("./stores/modules/user.js");
require("./stores/modules/AIResponse.js");
require("./stores/modules/rateLimit.js");
if (!Math) {
"./pages/index/index.js";
"./pages/user/history.js";
"./pages/user/suggestion.js";
"./pages/ZhouYi/detail.js";
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "App",
setup(__props) {
common_vendor.onLaunch(() => {
console.log("App Launch");
});
common_vendor.onShow(() => {
console.log("App Show");
});
common_vendor.onHide(() => {
console.log("App Hide");
});
return () => {
};
}
});
var App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/App.vue"]]);
function createApp() {
const app = common_vendor.createSSRApp(App);
stores_index.setupStore(app);
return {
app
};
}
createApp().app.mount("#app");
exports.createApp = createApp;

16
dist/dev/mp-weixin/app.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
"pages": [
"pages/index/index",
"pages/user/history",
"pages/user/suggestion",
"pages/ZhouYi/detail"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"lazyCodeLoading": "requiredComponents",
"usingComponents": {}
}

56
dist/dev/mp-weixin/app.wxss vendored Normal file
View File

@ -0,0 +1,56 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
:root,
page {
--wot-color-theme: #217891 !important;
}
.wd-toast {
background-color: #fff !important;
color: #333 !important;
}
.content {
width: 100%;
min-height: 100dvh;
max-width: auto;
min-height: calc(100vh - env(safe-area-inset-bottom) - 50px);
min-height: calc(100vh - constant(safe-area-inset-bottom) - 50px);
overflow-y: hidden;
background-color: #f3f4f6;
}
.flex-row {
display: flex;
flex-flow: row nowrap;
}
.flex-col {
display: flex;
flex-flow: column nowrap;
}
.gap-2 {
gap: 16rpx;
}
.gap-4 {
gap: 32rpx;
}page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}

8948
dist/dev/mp-weixin/common/vendor.js vendored Normal file

File diff suppressed because it is too large Load Diff

47
dist/dev/mp-weixin/components/NavBar.js vendored Normal file
View File

@ -0,0 +1,47 @@
"use strict";
var common_vendor = require("../common/vendor.js");
if (!Array) {
const _easycom_wd_navbar_capsule2 = common_vendor.resolveComponent("wd-navbar-capsule");
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
(_easycom_wd_navbar_capsule2 + _easycom_wd_navbar2)();
}
const _easycom_wd_navbar_capsule = () => "../uni_modules/wot-design-uni/components/wd-navbar-capsule/wd-navbar-capsule.js";
const _easycom_wd_navbar = () => "../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
if (!Math) {
(_easycom_wd_navbar_capsule + _easycom_wd_navbar)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "NavBar",
props: {
title: {
type: String,
default: ""
}
},
setup(__props) {
const handleBack = () => {
common_vendor.index.navigateBack({});
};
const handleBackHome = () => {
common_vendor.index.reLaunch({
url: "/pages/index/index"
});
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(handleBack),
b: common_vendor.o(handleBackHome),
c: common_vendor.p({
title: __props.title,
["left-text"]: "\u8FD4\u56DE",
["left-arrow"]: true,
fixed: true,
placeholder: true,
safeAreaInsetTop: true
})
};
};
}
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/components/NavBar.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"wd-navbar-capsule": "../uni_modules/wot-design-uni/components/wd-navbar-capsule/wd-navbar-capsule",
"wd-navbar": "../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar"
}
}

View File

@ -0,0 +1 @@
<wd-navbar wx:if="{{c}}" u-s="{{['capsule']}}" u-i="7f1bc8f5-0" bind:__l="__l" u-p="{{c}}"><wd-navbar-capsule bindback="{{a}}" bindbackHome="{{b}}" u-i="7f1bc8f5-1,7f1bc8f5-0" bind:__l="__l" slot="capsule"/></wd-navbar>

View File

68
dist/dev/mp-weixin/components/TabBar.js vendored Normal file
View File

@ -0,0 +1,68 @@
"use strict";
var common_vendor = require("../common/vendor.js");
require("../stores/index.js");
var stores_modules_tabIndex = require("../stores/modules/tabIndex.js");
require("../stores/modules/user.js");
require("../stores/modules/AIResponse.js");
require("../stores/modules/rateLimit.js");
if (!Array) {
const _easycom_wd_tabbar_item2 = common_vendor.resolveComponent("wd-tabbar-item");
const _easycom_wd_tabbar2 = common_vendor.resolveComponent("wd-tabbar");
(_easycom_wd_tabbar_item2 + _easycom_wd_tabbar2)();
}
const _easycom_wd_tabbar_item = () => "../uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.js";
const _easycom_wd_tabbar = () => "../uni_modules/wot-design-uni/components/wd-tabbar/wd-tabbar.js";
if (!Math) {
(_easycom_wd_tabbar_item + _easycom_wd_tabbar)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "TabBar",
setup(__props) {
const {
tabIndex
} = common_vendor.storeToRefs(stores_modules_tabIndex.useTabStore());
const tabBarList = [
{
icon: "home",
title: "\u5B66\u6613"
},
{
icon: "spool",
title: "\u95EE\u6613"
},
{
icon: "user",
title: "\u5F52\u5904"
}
];
const onChange = ({ value }) => {
tabIndex.value = parseInt(value);
console.log(tabIndex.value);
};
return (_ctx, _cache) => {
return {
a: common_vendor.f(tabBarList, (item, index, i0) => {
return {
a: index,
b: "42921124-1-" + i0 + ",42921124-0",
c: common_vendor.p({
title: item.title,
icon: item.icon
})
};
}),
b: common_vendor.o(onChange),
c: common_vendor.o(($event) => common_vendor.isRef(tabIndex) ? tabIndex.value = $event : null),
d: common_vendor.p({
fixed: true,
zIndex: 9,
safeAreaInsetBottom: true,
placeholder: true,
modelValue: common_vendor.unref(tabIndex)
})
};
};
}
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-42921124"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/components/TabBar.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"wd-tabbar-item": "../uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item",
"wd-tabbar": "../uni_modules/wot-design-uni/components/wd-tabbar/wd-tabbar"
}
}

View File

@ -0,0 +1 @@
<view class="tab-bar data-v-42921124"><wd-tabbar wx:if="{{d}}" class="data-v-42921124" u-s="{{['d']}}" bindchange="{{b}}" u-i="42921124-0" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"><wd-tabbar-item wx:for="{{a}}" wx:for-item="item" wx:key="a" class="data-v-42921124" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"></wd-tabbar-item></wd-tabbar></view>

View File

@ -0,0 +1,4 @@
.tab-bar.data-v-42921124 {
z-index: 9;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
"use strict";
makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
makeMap("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
makeMap("script,style");
function makeMap(str) {
var obj = {};
var items = str.split(",");
for (var i = 0; i < items.length; i++) {
obj[items[i]] = true;
}
return obj;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,90 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
var components_uaMarkdown_lib_markdownIt_min = require("./lib/markdown-it.min.js");
var components_uaMarkdown_lib_highlight_uniHighlight_min = require("./lib/highlight/uni-highlight.min.js");
require("./lib/html-parser.js");
const _sfc_main = {
__name: "ua-markdown",
props: {
source: String,
showLine: { type: [Boolean, String], default: true }
},
setup(__props) {
const props = __props;
let copyCodeData = [];
const markdown = components_uaMarkdown_lib_markdownIt_min.mt({
html: true,
highlight: function(str, lang) {
let preCode = "";
try {
preCode = components_uaMarkdown_lib_highlight_uniHighlight_min.$e.highlightAuto(str).value;
} catch (err) {
preCode = markdown.utils.escapeHtml(str);
}
const lines = preCode.split(/\n/).slice(0, -1);
let html = lines.map((item, index) => {
if (item == "") {
return "";
}
return '<li><span class="line-num" data-line="' + (index + 1) + '"></span>' + item + "</li>";
}).join("");
if (props.showLine) {
html = '<ol style="padding: 0px 30px;">' + html + "</ol>";
} else {
html = '<ol style="padding: 0px 7px;list-style:none;">' + html + "</ol>";
}
copyCodeData.push(str);
let htmlCode = `<div class="markdown-wrap">`;
htmlCode += `<pre class="hljs" style="padding:10px 8px 0;margin-bottom:5px;overflow: auto;display: block;border-radius: 5px;"><code>${html}</code></pre>`;
htmlCode += "</div>";
return htmlCode;
}
});
const parseNodes = (value) => {
if (!value)
return;
value = value.replace(/<br>|<br\/>|<br \/>/g, "\n");
value = value.replace(/&nbsp;/g, " ");
let htmlString = "";
if (value.split("```").length % 2) {
let mdtext = value;
if (mdtext[mdtext.length - 1] != "\n") {
mdtext += "\n";
}
htmlString = markdown.render(mdtext);
} else {
htmlString = markdown.render(value);
}
htmlString = htmlString.replace(/<table/g, `<table class="table"`);
htmlString = htmlString.replace(/<tr/g, `<tr class="tr"`);
htmlString = htmlString.replace(/<th>/g, `<th class="th">`);
htmlString = htmlString.replace(/<td/g, `<td class="td"`);
htmlString = htmlString.replace(/<hr>|<hr\/>|<hr \/>/g, `<hr class="hr">`);
return htmlString;
};
const handleItemClick = (e) => {
let { attrs } = e.detail.node;
let { "code-data-index": codeDataIndex, "class": className } = attrs;
if (className == "copy-btn") {
common_vendor.index.setClipboardData({
data: copyCodeData[codeDataIndex],
showToast: false,
success() {
common_vendor.index.showToast({
title: "\u590D\u5236\u6210\u529F",
icon: "none"
});
}
});
}
};
return (_ctx, _cache) => {
return {
a: parseNodes(__props.source),
b: common_vendor.o(handleItemClick)
};
};
}
};
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5aa72c31"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/components/ua-markdown/ua-markdown.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view class="ua__markdown data-v-5aa72c31"><rich-text class="data-v-5aa72c31" space="nbsp" nodes="{{a}}" binditemclick="{{b}}"></rich-text></view>

View File

@ -0,0 +1,315 @@
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.ua__markdown.data-v-5aa72c31 {
font-size: 14px;
line-height: 1.5;
word-break: break-all;
}
.ua__markdown h1.data-v-5aa72c31, .ua__markdown h2.data-v-5aa72c31, .ua__markdown h3.data-v-5aa72c31, .ua__markdown h4.data-v-5aa72c31, .ua__markdown h5.data-v-5aa72c31, .ua__markdown h6.data-v-5aa72c31 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
}
.ua__markdown h1.data-v-5aa72c31, .ua__markdown h2.data-v-5aa72c31, .ua__markdown h3.data-v-5aa72c31 {
margin-top: 20px;
margin-bottom: 10px;
}
.ua__markdown h4.data-v-5aa72c31, .ua__markdown h5.data-v-5aa72c31, .ua__markdown h6.data-v-5aa72c31 {
margin-top: 10px;
margin-bottom: 10px;
}
.ua__markdown .h1.data-v-5aa72c31, .ua__markdown h1.data-v-5aa72c31 {
font-size: 36px;
}
.ua__markdown .h2.data-v-5aa72c31, .ua__markdown h2.data-v-5aa72c31 {
font-size: 30px;
}
.ua__markdown .h3.data-v-5aa72c31, .ua__markdown h3.data-v-5aa72c31 {
font-size: 24px;
}
.ua__markdown .h4.data-v-5aa72c31, .ua__markdown h4.data-v-5aa72c31 {
font-size: 18px;
}
.ua__markdown .h5.data-v-5aa72c31, .ua__markdown h5.data-v-5aa72c31 {
font-size: 14px;
}
.ua__markdown .h6.data-v-5aa72c31, .ua__markdown h6.data-v-5aa72c31 {
font-size: 12px;
}
.ua__markdown a.data-v-5aa72c31 {
background-color: transparent;
color: #2196f3;
text-decoration: none;
}
.ua__markdown hr.data-v-5aa72c31, .ua__markdown.data-v-5aa72c31 .hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #e5e5e5;
}
.ua__markdown img.data-v-5aa72c31 {
max-width: 35%;
}
.ua__markdown p.data-v-5aa72c31 {
margin: 0 0 10px;
}
.ua__markdown em.data-v-5aa72c31 {
font-style: italic;
font-weight: inherit;
}
.ua__markdown ol.data-v-5aa72c31, .ua__markdown ul.data-v-5aa72c31 {
margin-top: 0;
margin-bottom: 10px;
padding-left: 40px;
}
.ua__markdown ol ol.data-v-5aa72c31, .ua__markdown ol ul.data-v-5aa72c31, .ua__markdown ul ol.data-v-5aa72c31, .ua__markdown ul ul.data-v-5aa72c31 {
margin-bottom: 0;
}
.ua__markdown ol ol.data-v-5aa72c31, .ua__markdown ul ol.data-v-5aa72c31 {
list-style-type: lower-roman;
}
.ua__markdown ol ol ol.data-v-5aa72c31, .ua__markdown ul ul ol.data-v-5aa72c31 {
list-style-type: lower-alpha;
}
.ua__markdown dl.data-v-5aa72c31 {
margin-top: 0;
margin-bottom: 20px;
}
.ua__markdown dt.data-v-5aa72c31 {
font-weight: 600;
}
.ua__markdown dt.data-v-5aa72c31, .ua__markdown dd.data-v-5aa72c31 {
line-height: 1.4;
}
.ua__markdown .task-list-item.data-v-5aa72c31 {
list-style-type: none;
}
.ua__markdown .task-list-item input.data-v-5aa72c31 {
margin: 0 0.2em 0.25em -1.6em;
vertical-align: middle;
}
.ua__markdown pre.data-v-5aa72c31 {
position: relative;
z-index: 11;
}
.ua__markdown code.data-v-5aa72c31, .ua__markdown kbd.data-v-5aa72c31, .ua__markdown pre.data-v-5aa72c31, .ua__markdown samp.data-v-5aa72c31 {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
.ua__markdown code.data-v-5aa72c31:not(.hljs) {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #ffe7ee;
border-radius: 4px;
}
.ua__markdown code.data-v-5aa72c31:empty {
display: none;
}
.ua__markdown pre code.hljs.data-v-5aa72c31 {
color: var(--vg__text-1);
border-radius: 16px;
background: var(--vg__bg-1);
font-size: 12px;
}
.ua__markdown .markdown-wrap.data-v-5aa72c31 {
font-size: 12px;
margin-bottom: 10px;
}
.ua__markdown pre.code-block-wrapper.data-v-5aa72c31 {
background: #2b2b2b;
color: #f8f8f2;
border-radius: 4px;
overflow-x: auto;
padding: 1em;
position: relative;
}
.ua__markdown pre.code-block-wrapper code.data-v-5aa72c31 {
padding: auto;
font-size: inherit;
color: inherit;
background-color: inherit;
border-radius: 0;
}
.ua__markdown .code-block-header__copy.data-v-5aa72c31 {
font-size: 16px;
margin-left: 5px;
}
.ua__markdown abbr[data-original-title].data-v-5aa72c31, .ua__markdown abbr[title].data-v-5aa72c31 {
cursor: help;
border-bottom: 1px dotted #777;
}
.ua__markdown blockquote.data-v-5aa72c31 {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #e5e5e5;
}
.ua__markdown blockquote ol.data-v-5aa72c31:last-child, .ua__markdown blockquote p.data-v-5aa72c31:last-child, .ua__markdown blockquote ul.data-v-5aa72c31:last-child {
margin-bottom: 0;
}
.ua__markdown blockquote .small.data-v-5aa72c31, .ua__markdown blockquote footer.data-v-5aa72c31, .ua__markdown blockquote small.data-v-5aa72c31 {
display: block;
font-size: 80%;
line-height: 1.42857143;
color: #777;
}
.ua__markdown blockquote .small.data-v-5aa72c31:before, .ua__markdown blockquote footer.data-v-5aa72c31:before, .ua__markdown blockquote small.data-v-5aa72c31:before {
content: "— ";
}
.ua__markdown .blockquote-reverse.data-v-5aa72c31, .ua__markdown blockquote.pull-right.data-v-5aa72c31 {
padding-right: 15px;
padding-left: 0;
text-align: right;
border-right: 5px solid #eee;
border-left: 0;
}
.ua__markdown .blockquote-reverse .small.data-v-5aa72c31:before, .ua__markdown .blockquote-reverse footer.data-v-5aa72c31:before, .ua__markdown .blockquote-reverse small.data-v-5aa72c31:before, .ua__markdown blockquote.pull-right .small.data-v-5aa72c31:before, .ua__markdown blockquote.pull-right footer.data-v-5aa72c31:before, .ua__markdown blockquote.pull-right small.data-v-5aa72c31:before {
content: "";
}
.ua__markdown .blockquote-reverse .small.data-v-5aa72c31:after, .ua__markdown .blockquote-reverse footer.data-v-5aa72c31:after, .ua__markdown .blockquote-reverse small.data-v-5aa72c31:after, .ua__markdown blockquote.pull-right .small.data-v-5aa72c31:after, .ua__markdown blockquote.pull-right footer.data-v-5aa72c31:after, .ua__markdown blockquote.pull-right small.data-v-5aa72c31:after {
content: " —";
}
.ua__markdown .footnotes.data-v-5aa72c31 {
-moz-column-count: 2;
column-count: 2;
}
.ua__markdown .footnotes-list.data-v-5aa72c31 {
padding-left: 2em;
}
.ua__markdown table.data-v-5aa72c31, .ua__markdown.data-v-5aa72c31 .table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
max-width: 65em;
overflow: auto;
margin-top: 0;
margin-bottom: 16px;
}
.ua__markdown table tr.data-v-5aa72c31, .ua__markdown.data-v-5aa72c31 .table .tr {
border-top: 1px solid #e5e5e5;
}
.ua__markdown table th.data-v-5aa72c31, .ua__markdown table td.data-v-5aa72c31, .ua__markdown.data-v-5aa72c31 .table .th, .ua__markdown.data-v-5aa72c31 .table .td {
padding: 6px 13px;
border: 1px solid #e5e5e5;
}
.ua__markdown table th.data-v-5aa72c31, .ua__markdown.data-v-5aa72c31 .table .th {
font-weight: 600;
background-color: #eee;
}
.ua__markdown .hljs[class*=language-].data-v-5aa72c31:before {
position: absolute;
z-index: 3;
top: 0.8em;
right: 1em;
font-size: 0.8em;
color: #999;
}
.ua__markdown .hljs[class~=language-js].data-v-5aa72c31:before {
content: "js";
}
.ua__markdown .hljs[class~=language-ts].data-v-5aa72c31:before {
content: "ts";
}
.ua__markdown .hljs[class~=language-html].data-v-5aa72c31:before {
content: "html";
}
.ua__markdown .hljs[class~=language-md].data-v-5aa72c31:before {
content: "md";
}
.ua__markdown .hljs[class~=language-vue].data-v-5aa72c31:before {
content: "vue";
}
.ua__markdown .hljs[class~=language-css].data-v-5aa72c31:before {
content: "css";
}
.ua__markdown .hljs[class~=language-sass].data-v-5aa72c31:before {
content: "sass";
}
.ua__markdown .hljs[class~=language-scss].data-v-5aa72c31:before {
content: "scss";
}
.ua__markdown .hljs[class~=language-less].data-v-5aa72c31:before {
content: "less";
}
.ua__markdown .hljs[class~=language-stylus].data-v-5aa72c31:before {
content: "stylus";
}
.ua__markdown .hljs[class~=language-go].data-v-5aa72c31:before {
content: "go";
}
.ua__markdown .hljs[class~=language-java].data-v-5aa72c31:before {
content: "java";
}
.ua__markdown .hljs[class~=language-c].data-v-5aa72c31:before {
content: "c";
}
.ua__markdown .hljs[class~=language-sh].data-v-5aa72c31:before {
content: "sh";
}
.ua__markdown .hljs[class~=language-yaml].data-v-5aa72c31:before {
content: "yaml";
}
.ua__markdown .hljs[class~=language-py].data-v-5aa72c31:before {
content: "py";
}
.ua__markdown .hljs[class~=language-docker].data-v-5aa72c31:before {
content: "docker";
}
.ua__markdown .hljs[class~=language-dockerfile].data-v-5aa72c31:before {
content: "dockerfile";
}
.ua__markdown .hljs[class~=language-makefile].data-v-5aa72c31:before {
content: "makefile";
}
.ua__markdown .hljs[class~=language-javascript].data-v-5aa72c31:before {
content: "js";
}
.ua__markdown .hljs[class~=language-typescript].data-v-5aa72c31:before {
content: "ts";
}
.ua__markdown .hljs[class~=language-markup].data-v-5aa72c31:before {
content: "html";
}
.ua__markdown .hljs[class~=language-markdown].data-v-5aa72c31:before {
content: "md";
}
.ua__markdown .hljs[class~=language-json].data-v-5aa72c31:before {
content: "json";
}
.ua__markdown .hljs[class~=language-ruby].data-v-5aa72c31:before {
content: "rb";
}
.ua__markdown .hljs[class~=language-python].data-v-5aa72c31:before {
content: "py";
}
.ua__markdown .hljs[class~=language-bash].data-v-5aa72c31:before {
content: "sh";
}
.ua__markdown .hljs[class~=language-php].data-v-5aa72c31:before {
content: "php";
}

View File

@ -0,0 +1,3 @@
"use strict";
const BASE_URL = "https://ching.snhaenigseal.cn";
exports.BASE_URL = BASE_URL;

View File

@ -0,0 +1,78 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
require("../../api/modules/AI.js");
var api_modules_ZhouYi = require("../../api/modules/ZhouYi.js");
require("../../api/modules/config.js");
require("../../utils/request.js");
require("../../config/api.config.js");
require("../../stores/index.js");
require("../../stores/modules/tabIndex.js");
require("../../stores/modules/user.js");
require("../../stores/modules/AIResponse.js");
require("../../stores/modules/rateLimit.js");
if (!Array) {
const _easycom_wd_text2 = common_vendor.resolveComponent("wd-text");
const _easycom_ua_markdown2 = common_vendor.resolveComponent("ua-markdown");
const _easycom_wd_status_tip2 = common_vendor.resolveComponent("wd-status-tip");
(_easycom_wd_text2 + _easycom_ua_markdown2 + _easycom_wd_status_tip2)();
}
const _easycom_wd_text = () => "../../uni_modules/wot-design-uni/components/wd-text/wd-text.js";
const _easycom_ua_markdown = () => "../../components/ua-markdown/ua-markdown.js";
const _easycom_wd_status_tip = () => "../../uni_modules/wot-design-uni/components/wd-status-tip/wd-status-tip.js";
if (!Math) {
(NavBar + _easycom_wd_text + _easycom_ua_markdown + _easycom_wd_status_tip)();
}
const NavBar = () => "../../components/NavBar.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "detail",
setup(__props) {
const info = common_vendor.ref(null);
common_vendor.onLoad((e) => {
if (e.id) {
api_modules_ZhouYi.getZhouDetail({
id: e.id
}).then((res) => {
info.value = res.data;
});
}
if (e.name) {
api_modules_ZhouYi.getZhouDetail({
name: e.name
}).then((res) => {
info.value = res.data[0];
});
}
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "\u5B66\u4E60\u5366\u8F9E"
}),
b: info.value
}, info.value ? {
c: common_vendor.p({
text: info.value.symbol,
size: "96rpx",
bold: true,
color: "#333"
}),
d: common_vendor.p({
text: info.value.name,
size: "48rpx",
bold: true,
color: "#333"
}),
e: common_vendor.p({
source: info.value.desc
})
} : {
f: common_vendor.p({
image: "https://asstes.snhaenigseal.cn/images/wot/content.png",
tip: "\u6682\u65E0\u5185\u5BB9"
})
});
};
}
});
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7c7d69f0"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/ZhouYi/detail.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -0,0 +1,9 @@
{
"navigationStyle": "custom",
"usingComponents": {
"wd-text": "../../uni_modules/wot-design-uni/components/wd-text/wd-text",
"ua-markdown": "../../components/ua-markdown/ua-markdown",
"wd-status-tip": "../../uni_modules/wot-design-uni/components/wd-status-tip/wd-status-tip",
"nav-bar": "../../components/NavBar"
}
}

View File

@ -0,0 +1 @@
<nav-bar wx:if="{{a}}" class="data-v-7c7d69f0" u-i="7c7d69f0-0" bind:__l="__l" u-p="{{a}}"/><view wx:if="{{b}}" class="content data-v-7c7d69f0"><view class="symbol data-v-7c7d69f0"><wd-text wx:if="{{c}}" class="data-v-7c7d69f0" u-i="7c7d69f0-1" bind:__l="__l" u-p="{{c}}"/><wd-text wx:if="{{d}}" class="data-v-7c7d69f0" u-i="7c7d69f0-2" bind:__l="__l" u-p="{{d}}"/></view><view class="desc data-v-7c7d69f0"><ua-markdown wx:if="{{e}}" class="data-v-7c7d69f0" u-i="7c7d69f0-3" bind:__l="__l" u-p="{{e}}"/></view></view><view wx:else class="page data-v-7c7d69f0"><wd-status-tip wx:if="{{f}}" class="data-v-7c7d69f0" u-i="7c7d69f0-4" bind:__l="__l" u-p="{{f}}"/></view>

View File

@ -0,0 +1,41 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content.data-v-7c7d69f0 {
height: auto;
}
.symbol.data-v-7c7d69f0 {
display: flex;
flex-flow: column nowrap;
gap: 16rpx;
align-items: center;
margin: 16rpx 0;
}
.desc.data-v-7c7d69f0 {
border-radius: 16rpx;
margin: 32rpx;
padding: 32rpx;
background-color: #fff;
}

105
dist/dev/mp-weixin/pages/home/home.js vendored Normal file
View File

@ -0,0 +1,105 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
var api_modules_ZhouYi = require("../../api/modules/ZhouYi.js");
var utils_common = require("../../utils/common.js");
require("../../utils/request.js");
require("../../config/api.config.js");
require("../../stores/modules/rateLimit.js");
if (!Array) {
const _easycom_wd_text2 = common_vendor.resolveComponent("wd-text");
const _easycom_wd_col2 = common_vendor.resolveComponent("wd-col");
const _easycom_wd_row2 = common_vendor.resolveComponent("wd-row");
(_easycom_wd_text2 + _easycom_wd_col2 + _easycom_wd_row2)();
}
const _easycom_wd_text = () => "../../uni_modules/wot-design-uni/components/wd-text/wd-text.js";
const _easycom_wd_col = () => "../../uni_modules/wot-design-uni/components/wd-col/wd-col.js";
const _easycom_wd_row = () => "../../uni_modules/wot-design-uni/components/wd-row/wd-row.js";
if (!Math) {
(NavBar + _easycom_wd_text + _easycom_wd_col + _easycom_wd_row)();
}
const NavBar = () => "../../components/NavBar.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "home",
setup(__props) {
const list = common_vendor.ref([]);
const \u4E0A\u7ECF = common_vendor.ref([]);
const \u4E0B\u7ECF = common_vendor.ref([]);
api_modules_ZhouYi.getZhouList().then((res) => {
list.value = res.data;
\u4E0A\u7ECF.value = list.value.filter((item) => item.index >= 1 && item.index <= 30);
\u4E0B\u7ECF.value = list.value.filter((item) => item.index >= 31 && item.index <= 64);
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "\u5B66\u6613"
}),
b: common_vendor.p({
text: "\u4E0A\u7ECF",
size: "36rpx",
bold: true,
color: "#333"
}),
c: list.value.length
}, list.value.length ? {
d: common_vendor.f(\u4E0A\u7ECF.value, (item, index, i0) => {
return {
a: "087d42bb-4-" + i0 + "," + ("087d42bb-3-" + i0),
b: common_vendor.p({
text: item.symbol,
size: "90rpx",
color: "#333"
}),
c: "087d42bb-5-" + i0 + "," + ("087d42bb-3-" + i0),
d: common_vendor.p({
text: item.name,
bold: true,
size: "28rpx",
color: "#333"
}),
e: common_vendor.o(($event) => common_vendor.unref(utils_common.goTo)("/pages/ZhouYi/detail?id=" + item.documentId)),
f: index,
g: "087d42bb-3-" + i0 + ",087d42bb-2"
};
}),
e: common_vendor.p({
span: 6
})
} : {}, {
f: common_vendor.p({
text: "\u4E0B\u7ECF",
size: "36rpx",
bold: true,
color: "#333"
}),
g: list.value.length
}, list.value.length ? {
h: common_vendor.f(\u4E0B\u7ECF.value, (item, index, i0) => {
return {
a: "087d42bb-9-" + i0 + "," + ("087d42bb-8-" + i0),
b: common_vendor.p({
text: item.symbol,
size: "90rpx",
color: "#333"
}),
c: "087d42bb-10-" + i0 + "," + ("087d42bb-8-" + i0),
d: common_vendor.p({
text: item.name,
bold: true,
size: "28rpx",
color: "#333"
}),
e: common_vendor.o(($event) => common_vendor.unref(utils_common.goTo)("/pages/ZhouYi/detail?id=" + item.documentId)),
f: index,
g: "087d42bb-8-" + i0 + ",087d42bb-7"
};
}),
i: common_vendor.p({
span: 6
})
} : {});
};
}
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-087d42bb"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/home/home.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"wd-text": "../../uni_modules/wot-design-uni/components/wd-text/wd-text",
"wd-col": "../../uni_modules/wot-design-uni/components/wd-col/wd-col",
"wd-row": "../../uni_modules/wot-design-uni/components/wd-row/wd-row",
"nav-bar": "../../components/NavBar"
}
}

View File

@ -0,0 +1 @@
<nav-bar wx:if="{{a}}" class="data-v-087d42bb" u-i="087d42bb-0" bind:__l="__l" u-p="{{a}}"/><view class="data-v-087d42bb" style="margin:16rpx"><view class="title data-v-087d42bb"><wd-text wx:if="{{b}}" class="data-v-087d42bb" u-i="087d42bb-1" bind:__l="__l" u-p="{{b}}"/></view><wd-row class="data-v-087d42bb" u-s="{{['d']}}" u-i="087d42bb-2" bind:__l="__l"><block wx:if="{{c}}"><wd-col wx:for="{{d}}" wx:for-item="item" wx:key="f" class="data-v-087d42bb" u-s="{{['d']}}" u-i="{{item.g}}" bind:__l="__l" u-p="{{e}}"><view class="item data-v-087d42bb" bindtap="{{item.e}}"><wd-text wx:if="{{item.b}}" class="data-v-087d42bb" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"/><wd-text wx:if="{{item.d}}" class="data-v-087d42bb" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"/></view></wd-col></block></wd-row><view class="title data-v-087d42bb"><wd-text wx:if="{{f}}" class="data-v-087d42bb" u-i="087d42bb-6" bind:__l="__l" u-p="{{f}}"/></view><wd-row class="data-v-087d42bb" u-s="{{['d']}}" u-i="087d42bb-7" bind:__l="__l"><block wx:if="{{g}}"><wd-col wx:for="{{h}}" wx:for-item="item" wx:key="f" class="data-v-087d42bb" u-s="{{['d']}}" u-i="{{item.g}}" bind:__l="__l" u-p="{{i}}"><view class="item data-v-087d42bb" bindtap="{{item.e}}"><wd-text wx:if="{{item.b}}" class="data-v-087d42bb" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"/><wd-text wx:if="{{item.d}}" class="data-v-087d42bb" u-i="{{item.c}}" bind:__l="__l" u-p="{{item.d}}"/></view></wd-col></block></wd-row></view>

39
dist/dev/mp-weixin/pages/home/home.wxss vendored Normal file
View File

@ -0,0 +1,39 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.title.data-v-087d42bb {
margin: 36rpx 16rpx;
}
.item.data-v-087d42bb {
display: flex;
flex-flow: column nowrap;
align-items: center;
gap: 16rpx;
margin: 16rpx;
padding: 32rpx 16rpx;
border-radius: 16rpx;
background-color: #fff;
box-sizing: border-box;
}

34
dist/dev/mp-weixin/pages/index/index.js vendored Normal file
View File

@ -0,0 +1,34 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
require("../../stores/index.js");
var stores_modules_tabIndex = require("../../stores/modules/tabIndex.js");
require("../../stores/modules/user.js");
require("../../stores/modules/AIResponse.js");
require("../../stores/modules/rateLimit.js");
if (!Math) {
(Home + SuanGua + User + TabBar)();
}
const SuanGua = () => "../suan-gua/suan-gua.js";
const Home = () => "../home/home.js";
const User = () => "../user/user.js";
const TabBar = () => "../../components/TabBar.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
setup(__props) {
const {
tabIndex
} = common_vendor.storeToRefs(stores_modules_tabIndex.useTabStore());
console.log(tabIndex.value);
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(tabIndex) === 0
}, common_vendor.unref(tabIndex) === 0 ? {} : {}, {
b: common_vendor.unref(tabIndex) === 1
}, common_vendor.unref(tabIndex) === 1 ? {} : {}, {
c: common_vendor.unref(tabIndex) === 2
}, common_vendor.unref(tabIndex) === 2 ? {} : {});
};
}
});
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1badc801"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/index/index.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -0,0 +1,9 @@
{
"navigationStyle": "custom",
"usingComponents": {
"suan-gua": "../suan-gua/suan-gua",
"home": "../home/home",
"user": "../user/user",
"tab-bar": "../../components/TabBar"
}
}

View File

@ -0,0 +1 @@
<view class="content data-v-1badc801"><home wx:if="{{a}}" class="data-v-1badc801" u-i="1badc801-0" bind:__l="__l"/><suan-gua wx:if="{{b}}" class="data-v-1badc801" u-i="1badc801-1" bind:__l="__l"/><user wx:if="{{c}}" class="data-v-1badc801" u-i="1badc801-2" bind:__l="__l"/></view><tab-bar class="data-v-1badc801" u-i="1badc801-3" bind:__l="__l"/>

View File

@ -0,0 +1,28 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content.data-v-1badc801 {
height: auto;
}

View File

@ -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);

View File

@ -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

View File

@ -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;
}

103
dist/dev/mp-weixin/pages/user/history.js vendored Normal file
View File

@ -0,0 +1,103 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
require("../../stores/index.js");
var utils_common = require("../../utils/common.js");
var stores_modules_user = require("../../stores/modules/user.js");
require("../../stores/modules/tabIndex.js");
require("../../stores/modules/AIResponse.js");
require("../../stores/modules/rateLimit.js");
if (!Array) {
const _easycom_wd_text2 = common_vendor.resolveComponent("wd-text");
const _easycom_wd_button2 = common_vendor.resolveComponent("wd-button");
const _easycom_wd_card2 = common_vendor.resolveComponent("wd-card");
const _easycom_wd_status_tip2 = common_vendor.resolveComponent("wd-status-tip");
const _easycom_wd_message_box2 = common_vendor.resolveComponent("wd-message-box");
const _easycom_wd_toast2 = common_vendor.resolveComponent("wd-toast");
(_easycom_wd_text2 + _easycom_wd_button2 + _easycom_wd_card2 + _easycom_wd_status_tip2 + _easycom_wd_message_box2 + _easycom_wd_toast2)();
}
const _easycom_wd_text = () => "../../uni_modules/wot-design-uni/components/wd-text/wd-text.js";
const _easycom_wd_button = () => "../../uni_modules/wot-design-uni/components/wd-button/wd-button.js";
const _easycom_wd_card = () => "../../uni_modules/wot-design-uni/components/wd-card/wd-card.js";
const _easycom_wd_status_tip = () => "../../uni_modules/wot-design-uni/components/wd-status-tip/wd-status-tip.js";
const _easycom_wd_message_box = () => "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.js";
const _easycom_wd_toast = () => "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast.js";
if (!Math) {
(NavBar + _easycom_wd_text + _easycom_wd_button + _easycom_wd_card + _easycom_wd_status_tip + _easycom_wd_message_box + _easycom_wd_toast)();
}
const NavBar = () => "../../components/NavBar.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "history",
setup(__props) {
const {
yaoList
} = common_vendor.storeToRefs(stores_modules_user.useUserStore());
const message = common_vendor.useMessage();
const toast = common_vendor.useToast();
const delHistory = (index) => {
message.confirm({
title: "\u63D0\u793A",
msg: "\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u8BB0\u5F55\u5417"
}).then(() => {
yaoList.value.splice(index, 1);
toast.success("\u5220\u9664\u6210\u529F");
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "\u5386\u53F2\u8BB0\u5F55"
}),
b: common_vendor.unref(yaoList).length
}, common_vendor.unref(yaoList).length ? {
c: common_vendor.f(common_vendor.unref(yaoList), (item, index, i0) => {
return common_vendor.e({
a: "101dd8d4-2-" + i0 + "," + ("101dd8d4-1-" + i0),
b: common_vendor.p({
text: `${item.symbol1}\u53D8${item.symbol2}`,
color: "#333",
size: "32rpx",
bold: true
}),
c: item.q
}, item.q ? {
d: "101dd8d4-3-" + i0 + "," + ("101dd8d4-1-" + i0),
e: common_vendor.p({
text: `\u5360${item.q}\u8BE6\u89E3`,
color: "#333",
size: "32rpx",
bold: true
})
} : {}, {
f: "101dd8d4-4-" + i0 + "," + ("101dd8d4-1-" + i0),
g: common_vendor.p({
text: item.result
}),
h: "101dd8d4-5-" + i0 + "," + ("101dd8d4-1-" + i0),
i: common_vendor.p({
text: common_vendor.unref(utils_common.formatDate)(new Date(item.time))
}),
j: common_vendor.o(($event) => delHistory(index)),
k: "101dd8d4-6-" + i0 + "," + ("101dd8d4-1-" + i0),
l: index,
m: "101dd8d4-1-" + i0
});
}),
d: common_vendor.p({
size: "small",
type: "error",
plain: true
}),
e: common_vendor.p({
type: "rectangle"
})
} : {
f: common_vendor.p({
image: "https://asstes.snhaenigseal.cn/images/wot/content.png",
tip: "\u6682\u65E0\u5185\u5BB9"
})
});
};
}
});
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-101dd8d4"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/user/history.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -0,0 +1,12 @@
{
"navigationStyle": "custom",
"usingComponents": {
"wd-text": "../../uni_modules/wot-design-uni/components/wd-text/wd-text",
"wd-button": "../../uni_modules/wot-design-uni/components/wd-button/wd-button",
"wd-card": "../../uni_modules/wot-design-uni/components/wd-card/wd-card",
"wd-status-tip": "../../uni_modules/wot-design-uni/components/wd-status-tip/wd-status-tip",
"wd-message-box": "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box",
"wd-toast": "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast",
"nav-bar": "../../components/NavBar"
}
}

View File

@ -0,0 +1 @@
<nav-bar wx:if="{{a}}" class="data-v-101dd8d4" u-i="101dd8d4-0" bind:__l="__l" u-p="{{a}}"/><view class="content data-v-101dd8d4"><block wx:if="{{b}}"><wd-card wx:for="{{c}}" wx:for-item="item" wx:key="l" class="data-v-101dd8d4" u-s="{{['title','d','footer']}}" u-i="{{item.m}}" bind:__l="__l" u-p="{{e}}"><view slot="title"><wd-text wx:if="{{item.b}}" class="data-v-101dd8d4" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"/><wd-text wx:if="{{item.c}}" class="data-v-101dd8d4" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"/></view><wd-text class="data-v-101dd8d4" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"/><view class="footer data-v-101dd8d4" slot="footer"><wd-text wx:if="{{item.i}}" class="data-v-101dd8d4" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"/><wd-button wx:if="{{d}}" class="data-v-101dd8d4" u-s="{{['d']}}" bindclick="{{item.j}}" u-i="{{item.k}}" bind:__l="__l" u-p="{{d}}">删除</wd-button></view></wd-card></block><view wx:else class="page data-v-101dd8d4"><wd-status-tip wx:if="{{f}}" class="data-v-101dd8d4" u-i="101dd8d4-7" bind:__l="__l" u-p="{{f}}"/></view></view><wd-message-box class="data-v-101dd8d4" u-i="101dd8d4-8" bind:__l="__l"/><wd-toast class="data-v-101dd8d4" u-i="101dd8d4-9" bind:__l="__l"/>

View File

@ -0,0 +1,42 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content.data-v-101dd8d4 {
height: auto;
}
.page.data-v-101dd8d4 {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 720rpx;
background-color: #fff;
}
.footer.data-v-101dd8d4 {
display: flex;
gap: 32rpx;
justify-content: space-between;
align-items: center;
}

View File

@ -0,0 +1,68 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
var api_modules_suggestion = require("../../api/modules/suggestion.js");
var uni_modules_wotDesignUni_components_wdToast_index = require("../../uni_modules/wot-design-uni/components/wd-toast/index.js");
require("../../uni_modules/wot-design-uni/locale/index.js");
require("../../uni_modules/wot-design-uni/dayjs/index.js");
require("../../utils/request.js");
require("../../config/api.config.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");
if (!Array) {
const _easycom_wd_textarea2 = common_vendor.resolveComponent("wd-textarea");
const _easycom_wd_button2 = common_vendor.resolveComponent("wd-button");
const _easycom_wd_toast2 = common_vendor.resolveComponent("wd-toast");
(_easycom_wd_textarea2 + _easycom_wd_button2 + _easycom_wd_toast2)();
}
const _easycom_wd_textarea = () => "../../uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.js";
const _easycom_wd_button = () => "../../uni_modules/wot-design-uni/components/wd-button/wd-button.js";
const _easycom_wd_toast = () => "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast.js";
if (!Math) {
(NavBar + _easycom_wd_textarea + _easycom_wd_button + _easycom_wd_toast)();
}
const NavBar = () => "../../components/NavBar.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "suggestion",
setup(__props) {
const desc = common_vendor.ref("");
const toast = uni_modules_wotDesignUni_components_wdToast_index.useToast();
const submit = async () => {
if (!desc.value) {
toast.error("\u8BF7\u586B\u5199\u5EFA\u8BAE\u53CD\u9988");
return;
}
await api_modules_suggestion.createSuggestion(
desc.value
).then((res) => {
if (res.data) {
toast.success("\u63D0\u4EA4\u6210\u529F");
desc.value = "";
} else {
toast.error("\u63D0\u4EA4\u5931\u8D25");
}
});
};
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: "\u5EFA\u8BAE\u53CD\u9988"
}),
b: common_vendor.o(($event) => desc.value = $event),
c: common_vendor.p({
placeholder: "\u8BF7\u586B\u5199\u5EFA\u8BAE\u53CD\u9988",
modelValue: desc.value
}),
d: common_vendor.o(submit),
e: common_vendor.p({
block: true
})
};
};
}
});
var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-c29aa418"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/user/suggestion.vue"]]);
wx.createPage(MiniProgramPage);

View File

@ -0,0 +1,9 @@
{
"navigationStyle": "custom",
"usingComponents": {
"wd-textarea": "../../uni_modules/wot-design-uni/components/wd-textarea/wd-textarea",
"wd-button": "../../uni_modules/wot-design-uni/components/wd-button/wd-button",
"wd-toast": "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast",
"nav-bar": "../../components/NavBar"
}
}

View File

@ -0,0 +1 @@
<nav-bar wx:if="{{a}}" class="data-v-c29aa418" u-i="c29aa418-0" bind:__l="__l" u-p="{{a}}"/><view class="content flex-col gap-4 data-v-c29aa418"><wd-textarea wx:if="{{c}}" class="data-v-c29aa418" u-i="c29aa418-1" bind:__l="__l" bindupdateModelValue="{{b}}" u-p="{{c}}"/><wd-button wx:if="{{e}}" class="data-v-c29aa418" u-s="{{['d']}}" bindclick="{{d}}" u-i="c29aa418-2" bind:__l="__l" u-p="{{e}}">提交</wd-button></view><wd-toast class="data-v-c29aa418" u-i="c29aa418-3" bind:__l="__l"/>

View File

@ -0,0 +1,29 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content.data-v-c29aa418 {
width: calc(100% - 64rpx);
padding: 32rpx;
}

108
dist/dev/mp-weixin/pages/user/user.js vendored Normal file
View File

@ -0,0 +1,108 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
require("../../stores/index.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_config = require("../../api/modules/config.js");
var config_api_config = require("../../config/api.config.js");
var stores_modules_user = require("../../stores/modules/user.js");
require("../../stores/modules/tabIndex.js");
require("../../stores/modules/AIResponse.js");
require("../../stores/modules/rateLimit.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("../../utils/request.js");
if (!Array) {
const _easycom_wd_img2 = common_vendor.resolveComponent("wd-img");
const _easycom_wd_cell2 = common_vendor.resolveComponent("wd-cell");
const _easycom_wd_cell_group2 = common_vendor.resolveComponent("wd-cell-group");
const _easycom_wd_message_box2 = common_vendor.resolveComponent("wd-message-box");
const _easycom_wd_toast2 = common_vendor.resolveComponent("wd-toast");
(_easycom_wd_img2 + _easycom_wd_cell2 + _easycom_wd_cell_group2 + _easycom_wd_message_box2 + _easycom_wd_toast2)();
}
const _easycom_wd_img = () => "../../uni_modules/wot-design-uni/components/wd-img/wd-img.js";
const _easycom_wd_cell = () => "../../uni_modules/wot-design-uni/components/wd-cell/wd-cell.js";
const _easycom_wd_cell_group = () => "../../uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.js";
const _easycom_wd_message_box = () => "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.js";
const _easycom_wd_toast = () => "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast.js";
if (!Math) {
(NavBar + _easycom_wd_img + _easycom_wd_cell + _easycom_wd_cell_group + _easycom_wd_message_box + _easycom_wd_toast)();
}
const NavBar = () => "../../components/NavBar.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "user",
setup(__props) {
const message = uni_modules_wotDesignUni_components_wdMessageBox_index.useMessage();
const toast = uni_modules_wotDesignUni_components_wdToast_index.useToast();
const {
yaoList
} = common_vendor.storeToRefs(stores_modules_user.useUserStore());
const avatar = common_vendor.ref("");
api_modules_config.getPageConfig().then((res) => {
avatar.value = res.avatar.formats.medium.url;
});
const list = [
{
title: "\u5386\u53F2\u8BB0\u5F55",
isLink: true,
url: "/pages/user/history"
},
{
title: "\u6E05\u7A7A\u7F13\u5B58",
isLink: true,
onClick: () => {
message.confirm({
title: "\u63D0\u793A",
msg: "\u6B64\u64CD\u4F5C\u5C06\u5220\u9664\u6240\u6709\u5386\u53F2\u6570\u636E\uFF0C\u662F\u5426\u786E\u5B9A\uFF1F"
}).then(() => {
yaoList.value = [];
toast.success("\u6E05\u9664\u7F13\u5B58\u6210\u529F");
});
}
},
{
title: "\u5EFA\u8BAE\u53CD\u9988",
isLink: true,
url: "/pages/user/suggestion"
}
];
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.p({
title: "\u4E2A\u4EBA\u4E2D\u5FC3"
}),
b: avatar.value
}, avatar.value ? {
c: common_vendor.p({
src: common_vendor.unref(config_api_config.BASE_URL) + avatar.value,
width: "160rpx",
height: "160rpx",
round: true
})
} : {}, {
d: common_vendor.f(list, (item, index, i0) => {
return {
a: common_vendor.o(item.onClick),
b: "1198f63b-3-" + i0 + ",1198f63b-2",
c: common_vendor.p({
title: item.title,
["is-link"]: item.isLink,
to: item.url
})
};
}),
e: common_vendor.p({
border: true
})
});
};
}
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1198f63b"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/pages/user/user.vue"]]);
wx.createComponent(Component);

11
dist/dev/mp-weixin/pages/user/user.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"component": true,
"usingComponents": {
"wd-img": "../../uni_modules/wot-design-uni/components/wd-img/wd-img",
"wd-cell": "../../uni_modules/wot-design-uni/components/wd-cell/wd-cell",
"wd-cell-group": "../../uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group",
"wd-message-box": "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box",
"wd-toast": "../../uni_modules/wot-design-uni/components/wd-toast/wd-toast",
"nav-bar": "../../components/NavBar"
}
}

View File

@ -0,0 +1 @@
<nav-bar wx:if="{{a}}" class="data-v-1198f63b" u-i="1198f63b-0" bind:__l="__l" u-p="{{a}}"/><view class="avatar data-v-1198f63b"><wd-img wx:if="{{b}}" class="data-v-1198f63b" u-i="1198f63b-1" bind:__l="__l" u-p="{{c}}"/></view><wd-cell-group wx:if="{{e}}" class="data-v-1198f63b" u-s="{{['d']}}" u-i="1198f63b-2" bind:__l="__l" u-p="{{e}}"><wd-cell wx:for="{{d}}" wx:for-item="item" class="data-v-1198f63b" bindclick="{{item.a}}" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"/></wd-cell-group><wd-message-box class="data-v-1198f63b" u-i="1198f63b-4" bind:__l="__l"/><wd-toast class="data-v-1198f63b" u-i="1198f63b-5" bind:__l="__l"/>

31
dist/dev/mp-weixin/pages/user/user.wxss vendored Normal file
View File

@ -0,0 +1,31 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.avatar.data-v-1198f63b {
display: flex;
justify-content: center;
align-items: center;
margin: 48rpx auto;
}

24
dist/dev/mp-weixin/project.config.json vendored Normal file
View File

@ -0,0 +1,24 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"libVersion": "3.13.2",
"appid": "wxed54ab6227ca85b6",
"projectname": "",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

BIN
dist/dev/mp-weixin/static/avatar.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
dist/dev/mp-weixin/static/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
dist/dev/mp-weixin/static/mov_yang.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/dev/mp-weixin/static/mov_yin.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/dev/mp-weixin/static/yang.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/dev/mp-weixin/static/yin.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

20
dist/dev/mp-weixin/stores/index.js vendored Normal file
View File

@ -0,0 +1,20 @@
"use strict";
var common_vendor = require("../common/vendor.js");
require("./modules/tabIndex.js");
require("./modules/user.js");
require("./modules/AIResponse.js");
require("./modules/rateLimit.js");
const createPersistUni = () => {
return common_vendor.createPersistedState({
storage: {
getItem: common_vendor.index.getStorageSync,
setItem: common_vendor.index.setStorageSync
}
});
};
const store = common_vendor.createPinia();
store.use(createPersistUni());
function setupStore(app) {
app.use(store);
}
exports.setupStore = setupStore;

View File

@ -0,0 +1,21 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
const useAIReponseStore = common_vendor.defineStore("AIResponse", () => {
const responseText = common_vendor.ref("");
const showResponseText = common_vendor.ref(false);
const isLoading = common_vendor.ref(false);
const isDone = common_vendor.ref(false);
const reset = () => {
responseText.value = "";
showResponseText.value = false;
isDone.value = false;
};
return {
responseText,
showResponseText,
isLoading,
isDone,
reset
};
});
exports.useAIReponseStore = useAIReponseStore;

View File

@ -0,0 +1,11 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
const useRateLimitStore = common_vendor.defineStore("rateLimit", () => {
const timestamps = common_vendor.ref([]);
return {
timestamps
};
}, {
persist: true
});
exports.useRateLimitStore = useRateLimitStore;

View File

@ -0,0 +1,11 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
const useTabStore = common_vendor.defineStore("tab", () => {
const tabIndex = common_vendor.ref(1);
return {
tabIndex
};
}, {
persist: true
});
exports.useTabStore = useTabStore;

View File

@ -0,0 +1,11 @@
"use strict";
var common_vendor = require("../../common/vendor.js");
const useUserStore = common_vendor.defineStore("user", () => {
const yaoList = common_vendor.ref([]);
return {
yaoList
};
}, {
persist: true
});
exports.useUserStore = useUserStore;

View File

@ -0,0 +1,29 @@
"use strict";
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
class AbortablePromise {
constructor(executor) {
__publicField(this, "promise");
__publicField(this, "_reject", null);
this.promise = new Promise((resolve, reject) => {
executor(resolve, reject);
this._reject = reject;
});
}
abort(error) {
if (this._reject) {
this._reject(error);
}
}
then(onfulfilled, onrejected) {
return this.promise.then(onfulfilled, onrejected);
}
catch(onrejected) {
return this.promise.catch(onrejected);
}
}
exports.AbortablePromise = AbortablePromise;

View File

@ -0,0 +1,27 @@
"use strict";
const _b64chars = [..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"];
const _mkUriSafe = (src) => src.replace(/[+/]/g, (m0) => m0 === "+" ? "-" : "_").replace(/=+\$/m, "");
const fromUint8Array = (src, rfc4648 = false) => {
let b64 = "";
for (let i = 0, l = src.length; i < l; i += 3) {
const [a0, a1, a2] = [src[i], src[i + 1], src[i + 2]];
const ord = a0 << 16 | a1 << 8 | a2;
b64 += _b64chars[ord >>> 18];
b64 += _b64chars[ord >>> 12 & 63];
b64 += typeof a1 !== "undefined" ? _b64chars[ord >>> 6 & 63] : "=";
b64 += typeof a2 !== "undefined" ? _b64chars[ord & 63] : "=";
}
return rfc4648 ? _mkUriSafe(b64) : b64;
};
const _btoa = typeof btoa === "function" ? (s) => btoa(s) : (s) => {
if (s.charCodeAt(0) > 255) {
throw new RangeError("The string contains invalid characters.");
}
return fromUint8Array(Uint8Array.from(s, (c) => c.charCodeAt(0)));
};
const utob = (src) => unescape(encodeURIComponent(src));
function encode(src, rfc4648 = false) {
const b64 = _btoa(utob(src));
return rfc4648 ? _mkUriSafe(b64) : b64;
}
exports.encode = encode;

View File

@ -0,0 +1 @@
"use strict";

View File

@ -0,0 +1,38 @@
"use strict";
const numericProp = [Number, String];
const makeRequiredProp = (type) => ({
type,
required: true
});
const makeArrayProp = () => ({
type: Array,
default: () => []
});
const makeBooleanProp = (defaultVal) => ({
type: Boolean,
default: defaultVal
});
const makeNumberProp = (defaultVal) => ({
type: Number,
default: defaultVal
});
const makeNumericProp = (defaultVal) => ({
type: numericProp,
default: defaultVal
});
const makeStringProp = (defaultVal) => ({
type: String,
default: defaultVal
});
const baseProps = {
customStyle: makeStringProp(""),
customClass: makeStringProp("")
};
exports.baseProps = baseProps;
exports.makeArrayProp = makeArrayProp;
exports.makeBooleanProp = makeBooleanProp;
exports.makeNumberProp = makeNumberProp;
exports.makeNumericProp = makeNumericProp;
exports.makeRequiredProp = makeRequiredProp;
exports.makeStringProp = makeStringProp;
exports.numericProp = numericProp;

View File

@ -0,0 +1,233 @@
"use strict";
var common_vendor = require("../../../../common/vendor.js");
var uni_modules_wotDesignUni_components_common_AbortablePromise = require("./AbortablePromise.js");
function addUnit(num) {
return Number.isNaN(Number(num)) ? `${num}` : `${num}px`;
}
function isObj(value) {
return Object.prototype.toString.call(value) === "[object Object]" || typeof value === "object";
}
function getType(target) {
const typeStr = Object.prototype.toString.call(target);
const match = typeStr.match(/\[object (\w+)\]/);
const type = match && match.length ? match[1].toLowerCase() : "";
return type;
}
const isDef = (value) => value !== void 0 && value !== null;
function rgbToHex(r, g, b) {
const hex = (r << 16 | g << 8 | b).toString(16);
const paddedHex = "#" + "0".repeat(Math.max(0, 6 - hex.length)) + hex;
return paddedHex;
}
function hexToRgb(hex) {
const rgb = [];
for (let i = 1; i < 7; i += 2) {
rgb.push(parseInt("0x" + hex.slice(i, i + 2), 16));
}
return rgb;
}
const gradient = (startColor, endColor, step = 2) => {
const sColor = hexToRgb(startColor);
const eColor = hexToRgb(endColor);
const rStep = (eColor[0] - sColor[0]) / step;
const gStep = (eColor[1] - sColor[1]) / step;
const bStep = (eColor[2] - sColor[2]) / step;
const gradientColorArr = [];
for (let i = 0; i < step; i++) {
gradientColorArr.push(
rgbToHex(parseInt(String(rStep * i + sColor[0])), parseInt(String(gStep * i + sColor[1])), parseInt(String(bStep * i + sColor[2])))
);
}
return gradientColorArr;
};
const isEqual = (value1, value2) => {
if (value1 === value2) {
return true;
}
if (!Array.isArray(value1) || !Array.isArray(value2)) {
return false;
}
if (value1.length !== value2.length) {
return false;
}
for (let i = 0; i < value1.length; ++i) {
if (value1[i] !== value2[i]) {
return false;
}
}
return true;
};
const context = {
id: 1e3
};
function getRect(selector, all, scope, useFields) {
return new Promise((resolve, reject) => {
let query = null;
if (scope) {
query = common_vendor.index.createSelectorQuery().in(scope);
} else {
query = common_vendor.index.createSelectorQuery();
}
const method = all ? "selectAll" : "select";
const callback = (rect) => {
if (all && isArray(rect) && rect.length > 0) {
resolve(rect);
} else if (!all && rect) {
resolve(rect);
} else {
reject(new Error("No nodes found"));
}
};
if (useFields) {
query[method](selector).fields({ size: true, node: true }, callback).exec();
} else {
query[method](selector).boundingClientRect(callback).exec();
}
});
}
function kebabCase(word) {
const newWord = word.replace(/[A-Z]/g, function(match) {
return "-" + match;
}).toLowerCase();
return newWord;
}
function camelCase(word) {
return word.replace(/-(\w)/g, (_, c) => c.toUpperCase());
}
function isArray(value) {
if (typeof Array.isArray === "function") {
return Array.isArray(value);
}
return Object.prototype.toString.call(value) === "[object Array]";
}
function isFunction(value) {
return getType(value) === "function" || getType(value) === "asyncfunction";
}
function isString(value) {
return getType(value) === "string";
}
function isNumber(value) {
return getType(value) === "number";
}
function isPromise(value) {
if (isObj(value) && isDef(value)) {
return isFunction(value.then) && isFunction(value.catch);
}
return false;
}
function isUndefined(value) {
return typeof value === "undefined";
}
function objToStyle(styles) {
if (isArray(styles)) {
const result = styles.filter(function(item) {
return item != null && item !== "";
}).map(function(item) {
return objToStyle(item);
}).join(";");
return result ? result.endsWith(";") ? result : result + ";" : "";
}
if (isString(styles)) {
return styles ? styles.endsWith(";") ? styles : styles + ";" : "";
}
if (isObj(styles)) {
const result = Object.keys(styles).filter(function(key) {
return styles[key] != null && styles[key] !== "";
}).map(function(key) {
return [kebabCase(key), styles[key]].join(":");
}).join(";");
return result ? result.endsWith(";") ? result : result + ";" : "";
}
return "";
}
const pause = (ms = 1e3 / 30) => {
return new uni_modules_wotDesignUni_components_common_AbortablePromise.AbortablePromise((resolve) => {
const timer = setTimeout(() => {
clearTimeout(timer);
resolve(true);
}, ms);
});
};
function deepClone(obj, cache = /* @__PURE__ */ new Map()) {
if (obj === null || typeof obj !== "object") {
return obj;
}
if (isDate(obj)) {
return new Date(obj.getTime());
}
if (obj instanceof RegExp) {
return new RegExp(obj.source, obj.flags);
}
if (obj instanceof Error) {
const errorCopy = new Error(obj.message);
errorCopy.stack = obj.stack;
return errorCopy;
}
if (cache.has(obj)) {
return cache.get(obj);
}
const copy = Array.isArray(obj) ? [] : {};
cache.set(obj, copy);
for (const key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
copy[key] = deepClone(obj[key], cache);
}
}
return copy;
}
function deepMerge(target, source) {
target = deepClone(target);
if (typeof target !== "object" || typeof source !== "object") {
throw new Error("Both target and source must be objects.");
}
for (const prop in source) {
if (!source.hasOwnProperty(prop))
continue;
target[prop] = source[prop];
}
return target;
}
function deepAssign(target, source) {
Object.keys(source).forEach((key) => {
const targetValue = target[key];
const newObjValue = source[key];
if (isObj(targetValue) && isObj(newObjValue)) {
deepAssign(targetValue, newObjValue);
} else {
target[key] = newObjValue;
}
});
return target;
}
const getPropByPath = (obj, path) => {
const keys = path.split(".");
try {
return keys.reduce((acc, key) => acc !== void 0 && acc !== null ? acc[key] : void 0, obj);
} catch (error) {
return void 0;
}
};
const isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
function omitBy(obj, predicate) {
const newObj = deepClone(obj);
Object.keys(newObj).forEach((key) => predicate(newObj[key], key) && delete newObj[key]);
return newObj;
}
exports.addUnit = addUnit;
exports.camelCase = camelCase;
exports.context = context;
exports.deepAssign = deepAssign;
exports.deepMerge = deepMerge;
exports.getPropByPath = getPropByPath;
exports.getRect = getRect;
exports.gradient = gradient;
exports.isDef = isDef;
exports.isEqual = isEqual;
exports.isFunction = isFunction;
exports.isNumber = isNumber;
exports.isObj = isObj;
exports.isPromise = isPromise;
exports.isUndefined = isUndefined;
exports.objToStyle = objToStyle;
exports.omitBy = omitBy;
exports.pause = pause;

View File

@ -0,0 +1,3 @@
"use strict";
require("../../../../common/vendor.js");
require("../../locale/index.js");

View File

@ -0,0 +1,12 @@
"use strict";
var common_vendor = require("../../../../common/vendor.js");
var uni_modules_wotDesignUni_components_composables_useParent = require("./useParent.js");
var uni_modules_wotDesignUni_components_wdCellGroup_types = require("../wd-cell-group/types.js");
function useCell() {
const { parent: cellGroup, index } = uni_modules_wotDesignUni_components_composables_useParent.useParent(uni_modules_wotDesignUni_components_wdCellGroup_types.CELL_GROUP_KEY);
const border = common_vendor.computed$1(() => {
return cellGroup && cellGroup.props.border && index.value;
});
return { border };
}
exports.useCell = useCell;

View File

@ -0,0 +1,80 @@
"use strict";
var common_vendor = require("../../../../common/vendor.js");
function isVNode(value) {
return value ? value.__v_isVNode === true : false;
}
function flattenVNodes(children) {
const result = [];
const traverse = (children2) => {
if (Array.isArray(children2)) {
children2.forEach((child) => {
var _a;
if (isVNode(child)) {
result.push(child);
if ((_a = child.component) == null ? void 0 : _a.subTree) {
result.push(child.component.subTree);
traverse(child.component.subTree.children);
}
if (child.children) {
traverse(child.children);
}
}
});
}
};
traverse(children);
return result;
}
const findVNodeIndex = (vnodes, vnode) => {
const index = vnodes.indexOf(vnode);
if (index === -1) {
return vnodes.findIndex((item) => vnode.key !== void 0 && vnode.key !== null && item.type === vnode.type && item.key === vnode.key);
}
return index;
};
function sortChildren(parent, publicChildren, internalChildren) {
const vnodes = parent && parent.subTree && parent.subTree.children ? flattenVNodes(parent.subTree.children) : [];
internalChildren.sort((a, b) => findVNodeIndex(vnodes, a.vnode) - findVNodeIndex(vnodes, b.vnode));
const orderedPublicChildren = internalChildren.map((item) => item.proxy);
publicChildren.sort((a, b) => {
const indexA = orderedPublicChildren.indexOf(a);
const indexB = orderedPublicChildren.indexOf(b);
return indexA - indexB;
});
}
function useChildren(key) {
const publicChildren = common_vendor.reactive([]);
const internalChildren = common_vendor.reactive([]);
const parent = common_vendor.getCurrentInstance();
const linkChildren = (value) => {
const link = (child) => {
if (child.proxy) {
internalChildren.push(child);
publicChildren.push(child.proxy);
sortChildren(parent, publicChildren, internalChildren);
}
};
const unlink = (child) => {
const index = internalChildren.indexOf(child);
publicChildren.splice(index, 1);
internalChildren.splice(index, 1);
};
common_vendor.provide(
key,
Object.assign(
{
link,
unlink,
children: publicChildren,
internalChildren
},
value
)
);
};
return {
children: publicChildren,
linkChildren
};
}
exports.useChildren = useChildren;

View File

@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");

View File

@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");

View File

@ -0,0 +1,21 @@
"use strict";
var common_vendor = require("../../../../common/vendor.js");
function useParent(key) {
const parent = common_vendor.inject(key, null);
if (parent) {
const instance = common_vendor.getCurrentInstance();
const { link, unlink, internalChildren } = parent;
link(instance);
common_vendor.onUnmounted(() => unlink(instance));
const index = common_vendor.computed$1(() => internalChildren.indexOf(instance));
return {
parent,
index
};
}
return {
parent: null,
index: common_vendor.ref(-1)
};
}
exports.useParent = useParent;

View File

@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");

View File

@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");

View File

@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");

View File

@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");

View File

@ -0,0 +1,13 @@
"use strict";
var uni_modules_wotDesignUni_components_common_util = require("../common/util.js");
var uni_modules_wotDesignUni_locale_index = require("../../locale/index.js");
const useTranslate = (name) => {
const prefix = name ? uni_modules_wotDesignUni_components_common_util.camelCase(name) + "." : "";
const translate = (key, ...args) => {
const currentMessages = uni_modules_wotDesignUni_locale_index.Locale.messages();
const message = uni_modules_wotDesignUni_components_common_util.getPropByPath(currentMessages, prefix + key);
return uni_modules_wotDesignUni_components_common_util.isFunction(message) ? message(...args) : uni_modules_wotDesignUni_components_common_util.isDef(message) ? message : `${prefix}${key}`;
};
return { translate };
};
exports.useTranslate = useTranslate;

View File

@ -0,0 +1,2 @@
"use strict";
require("../../../../common/vendor.js");

View File

@ -0,0 +1,15 @@
"use strict";
var uni_modules_wotDesignUni_components_common_props = require("../common/props.js");
const badgeProps = {
...uni_modules_wotDesignUni_components_common_props.baseProps,
modelValue: uni_modules_wotDesignUni_components_common_props.numericProp,
showZero: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
bgColor: String,
max: Number,
isDot: Boolean,
hidden: Boolean,
type: uni_modules_wotDesignUni_components_common_props.makeStringProp(void 0),
top: uni_modules_wotDesignUni_components_common_props.numericProp,
right: uni_modules_wotDesignUni_components_common_props.numericProp
};
exports.badgeProps = badgeProps;

View File

@ -0,0 +1,60 @@
"use strict";
var common_vendor = require("../../../../common/vendor.js");
var uni_modules_wotDesignUni_components_wdBadge_types = require("./types.js");
var uni_modules_wotDesignUni_components_common_util = require("../common/util.js");
require("../common/props.js");
require("../common/AbortablePromise.js");
const __default__ = {
name: "wd-badge",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_wotDesignUni_components_wdBadge_types.badgeProps,
setup(__props) {
const props = __props;
const content = common_vendor.computed$1(() => {
const { modelValue, max, isDot } = props;
if (isDot)
return "";
let value = modelValue;
if (value && max && uni_modules_wotDesignUni_components_common_util.isNumber(value) && !Number.isNaN(value) && !Number.isNaN(max)) {
value = max < value ? `${max}+` : value;
}
return value;
});
const contentStyle = common_vendor.computed$1(() => {
const style = {};
if (uni_modules_wotDesignUni_components_common_util.isDef(props.bgColor)) {
style.backgroundColor = props.bgColor;
}
if (uni_modules_wotDesignUni_components_common_util.isDef(props.top)) {
style.top = uni_modules_wotDesignUni_components_common_util.addUnit(props.top);
}
if (uni_modules_wotDesignUni_components_common_util.isDef(props.right)) {
style.right = uni_modules_wotDesignUni_components_common_util.addUnit(props.right);
}
return uni_modules_wotDesignUni_components_common_util.objToStyle(style);
});
const shouldShowBadge = common_vendor.computed$1(() => !props.hidden && (content.value || content.value === 0 && props.showZero || props.isDot));
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(shouldShowBadge)
}, common_vendor.unref(shouldShowBadge) ? {
b: common_vendor.t(common_vendor.unref(content)),
c: common_vendor.n(_ctx.type ? "wd-badge__content--" + _ctx.type : ""),
d: common_vendor.n(_ctx.isDot ? "is-dot" : ""),
e: common_vendor.s(common_vendor.unref(contentStyle))
} : {}, {
f: common_vendor.n(_ctx.customClass),
g: common_vendor.s(_ctx.customStyle)
});
};
}
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-63f38c73"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/uni_modules/wot-design-uni/components/wd-badge/wd-badge.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view class="{{['data-v-63f38c73', 'wd-badge', f]}}" style="{{g}}"><slot></slot><view wx:if="{{a}}" class="{{['data-v-63f38c73', 'wd-badge__content', 'is-fixed', c, d]}}" style="{{e}}">{{b}}</view></view>

View File

@ -0,0 +1,239 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/**
* 混合宏
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/**
* 辅助函数
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/* 转换成字符串 */
/* 判断是否存在 Modifier */
/* 判断是否存在伪类 */
/**
* 主题色切换
* @params $theme-color 主题色
* @params $type 变暗dark 变亮 'light'
* @params $mix-color 自己设置的混色
*/
/**
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
* @params $open-linear 是否开启线性渐变色
* @params $deg 渐变色角度
* @params $theme-color 当前配色
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
* @params [Array] $per-list 渐变色比例
*/
/**
* BEM定义块b)
*/
/* 定义元素e对于伪类会自动将 e 嵌套在 伪类 底下 */
/* 此方法用于生成穿透样式 */
/* 定义元素e对于伪类会自动将 e 嵌套在 伪类 底下 */
/* 定义状态m */
/* 定义状态m */
/* 对于需要需要嵌套在 m 底下的 e调用这个混合宏一般在切换整个组件的状态如切换颜色的时候 */
/* 状态,生成 is-$state 类名 */
/**
* 常用混合宏
*/
/* 单行超出隐藏 */
/* 多行超出隐藏 */
/* 清除浮动 */
/* 0.5px 边框 指定方向*/
/* 0.5px 边框 环绕 */
/**
* 三角形实现尖角样式,适用于背景透明情况
* @param $size 三角形高,底边为 $size * 2
* @param $bg 三角形背景颜色
*/
/**
* 正方形实现尖角样式,适用于背景不透明情况
* @param $size 正方形边长
* @param $bg 正方形背景颜色
* @param $z-index z-index属性值不得大于外部包裹器
* @param $box-shadow 阴影
*/
/**
* 辅助函数
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/* 转换成字符串 */
/* 判断是否存在 Modifier */
/* 判断是否存在伪类 */
/**
* 主题色切换
* @params $theme-color 主题色
* @params $type 变暗dark 变亮 'light'
* @params $mix-color 自己设置的混色
*/
/**
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
* @params $open-linear 是否开启线性渐变色
* @params $deg 渐变色角度
* @params $theme-color 当前配色
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
* @params [Array] $per-list 渐变色比例
*/
/**
* UI规范基础变量
*/
/*----------------------------------------- Theme color. start ----------------------------------------*/
/* 主题颜色 */
/* 辅助色 */
/* 文字颜色(默认浅色背景下 */
/* 暗黑模式 */
/* 图形颜色 */
/*----------------------------------------- Theme color. end -------------------------------------------*/
/*-------------------------------- Theme color application size. start --------------------------------*/
/* 文字字号 */
/* 文字字重 */
/* 尺寸 */
/*-------------------------------- Theme color application size. end --------------------------------*/
/* component var */
/* action-sheet */
/* badge */
/* button */
/* cell */
/* calendar */
/* checkbox */
/* collapse */
/* divider */
/* drop-menu */
/* input-number */
/* input */
/* textarea */
/* loadmore */
/* message-box */
/* notice-bar */
/* pagination */
/* picker */
/* col-picker */
/* overlay */
/* popup */
/* progress */
/* radio */
/* search */
/* slider */
/* sort-button */
/* steps */
/* switch */
/* tabs */
/* tag */
/* toast */
/* loading */
/* tooltip */
/* popover */
/* grid-item */
/* statustip */
/* card */
/* upload */
/* curtain */
/* notify */
/* skeleton */
/* circle */
/* swiper */
/* swiper-nav */
/* segmented */
/* tabbar */
/* tabbar-item */
/* navbar */
/* navbar-capsule */
/* table */
/* sidebar */
/* sidebar-item */
/* fab */
/* count-down */
/* keyboard */
/* number-keyboard */
/* passwod-input */
/* form-item */
/* backtop */
/* index-bar */
/* text */
/* video-preview */
/* img-cropper */
/* floating-panel */
/* signature */
.wot-theme-dark .wd-badge__content.data-v-63f38c73 {
border-color: var(--wot-dark-background2, #1b1b1b);
}
.wd-badge.data-v-63f38c73 {
position: relative;
vertical-align: middle;
display: inline-block;
}
.wd-badge__content.data-v-63f38c73 {
display: inline-block;
box-sizing: content-box;
height: var(--wot-badge-height, 16px);
line-height: var(--wot-badge-height, 16px);
padding: var(--wot-badge-padding, 0 5px);
background-color: var(--wot-badge-bg, var(--wot-color-danger, #fa4350));
border-radius: calc(var(--wot-badge-height, 16px) / 2 + 2px);
color: var(--wot-badge-color, #fff);
font-size: var(--wot-badge-fs, 12px);
text-align: center;
white-space: nowrap;
border: var(--wot-badge-border, 2px solid var(--wot-badge-color, #fff));
font-weight: 500;
}
.wd-badge__content.is-fixed.data-v-63f38c73 {
position: absolute;
top: 0px;
right: 0px;
transform: translateY(-50%) translateX(50%);
}
.wd-badge__content.is-dot.data-v-63f38c73 {
height: var(--wot-badge-dot-size, 6px);
width: var(--wot-badge-dot-size, 6px);
padding: 0;
border-radius: 50%;
}
.wd-badge__content--primary.data-v-63f38c73 {
background-color: var(--wot-badge-primary, var(--wot-color-theme, #4d80f0));
}
.wd-badge__content--success.data-v-63f38c73 {
background-color: var(--wot-badge-success, var(--wot-color-success, #34d19d));
}
.wd-badge__content--warning.data-v-63f38c73 {
background-color: var(--wot-badge-warning, var(--wot-color-warning, #f0883a));
}
.wd-badge__content--info.data-v-63f38c73 {
background-color: var(--wot-badge-info, var(--wot-color-info, #909399));
}
.wd-badge__content--danger.data-v-63f38c73 {
background-color: var(--wot-badge-danger, var(--wot-color-danger, #fa4350));
}

View File

@ -0,0 +1,28 @@
"use strict";
var uni_modules_wotDesignUni_components_common_props = require("../common/props.js");
const buttonProps = {
...uni_modules_wotDesignUni_components_common_props.baseProps,
plain: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
round: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(true),
disabled: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
hairline: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
block: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
type: uni_modules_wotDesignUni_components_common_props.makeStringProp("primary"),
size: uni_modules_wotDesignUni_components_common_props.makeStringProp("medium"),
icon: String,
classPrefix: uni_modules_wotDesignUni_components_common_props.makeStringProp("wd-icon"),
loading: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
loadingColor: String,
openType: String,
hoverStopPropagation: Boolean,
lang: String,
sessionFrom: String,
sendMessageTitle: String,
sendMessagePath: String,
sendMessageImg: String,
appParameter: String,
showMessageCard: Boolean,
buttonId: String,
scope: String
};
exports.buttonProps = buttonProps;

View File

@ -0,0 +1,171 @@
"use strict";
var common_vendor = require("../../../../common/vendor.js");
var uni_modules_wotDesignUni_components_common_base64 = require("../common/base64.js");
var uni_modules_wotDesignUni_components_wdButton_types = require("./types.js");
require("../common/props.js");
if (!Math) {
wdIcon();
}
const wdIcon = () => "../wd-icon/wd-icon.js";
const __default__ = {
name: "wd-button",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_wotDesignUni_components_wdButton_types.buttonProps,
emits: [
"click",
"getuserinfo",
"contact",
"getphonenumber",
"getrealtimephonenumber",
"error",
"launchapp",
"opensetting",
"chooseavatar",
"agreeprivacyauthorization"
],
setup(__props, { emit }) {
const props = __props;
const loadingIcon = (color = "#4D80F0", reverse = true) => {
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><defs><linearGradient x1="100%" y1="0%" x2="0%" y2="0%" id="a"><stop stop-color="${reverse ? color : "#fff"}" offset="0%" stop-opacity="0"/><stop stop-color="${reverse ? color : "#fff"}" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M21 1c11.046 0 20 8.954 20 20s-8.954 20-20 20S1 32.046 1 21 9.954 1 21 1zm0 7C13.82 8 8 13.82 8 21s5.82 13 13 13 13-5.82 13-13S28.18 8 21 8z" fill="${reverse ? "#fff" : color}"/><path d="M4.599 21c0 9.044 7.332 16.376 16.376 16.376 9.045 0 16.376-7.332 16.376-16.376" stroke="url(#a)" stroke-width="3.5" stroke-linecap="round"/></g></svg>`;
};
const hoverStartTime = common_vendor.ref(20);
const hoverStayTime = common_vendor.ref(70);
const loadingIconSvg = common_vendor.ref("");
const loadingStyle = common_vendor.computed$1(() => {
return `background-image: url(${loadingIconSvg.value});`;
});
common_vendor.watch(
() => props.loading,
() => {
buildLoadingSvg();
},
{ deep: true, immediate: true }
);
function handleClick(event) {
if (!props.disabled && !props.loading) {
emit("click", event);
}
}
function handleGetAuthorize(event) {
if (props.scope === "phoneNumber") {
handleGetphonenumber(event);
} else if (props.scope === "userInfo") {
handleGetuserinfo(event);
}
}
function handleGetuserinfo(event) {
emit("getuserinfo", event.detail);
}
function handleConcat(event) {
emit("contact", event.detail);
}
function handleGetphonenumber(event) {
emit("getphonenumber", event.detail);
}
function handleGetrealtimephonenumber(event) {
emit("getrealtimephonenumber", event.detail);
}
function handleError(event) {
emit("error", event.detail);
}
function handleLaunchapp(event) {
emit("launchapp", event.detail);
}
function handleOpensetting(event) {
emit("opensetting", event.detail);
}
function handleChooseavatar(event) {
emit("chooseavatar", event.detail);
}
function handleAgreePrivacyAuthorization(event) {
emit("agreeprivacyauthorization", event.detail);
}
function buildLoadingSvg() {
const { loadingColor, type, plain } = props;
let color = loadingColor;
if (!color) {
switch (type) {
case "primary":
color = "#4D80F0";
break;
case "success":
color = "#34d19d";
break;
case "info":
color = "#333";
break;
case "warning":
color = "#f0883a";
break;
case "error":
color = "#fa4350";
break;
case "default":
color = "#333";
break;
}
}
const svg = loadingIcon(color, !plain);
loadingIconSvg.value = `"data:image/svg+xml;base64,${uni_modules_wotDesignUni_components_common_base64.encode(svg)}"`;
}
return (_ctx, _cache) => {
return common_vendor.e({
a: _ctx.loading
}, _ctx.loading ? {
b: common_vendor.s(common_vendor.unref(loadingStyle))
} : _ctx.icon ? {
d: common_vendor.p({
["custom-class"]: "wd-button__icon",
name: _ctx.icon,
classPrefix: _ctx.classPrefix
})
} : {}, {
c: _ctx.icon,
e: _ctx.buttonId,
f: `${_ctx.disabled || _ctx.loading ? "" : "wd-button--active"}`,
g: common_vendor.s(_ctx.customStyle),
h: common_vendor.n("is-" + _ctx.type),
i: common_vendor.n("is-" + _ctx.size),
j: common_vendor.n(_ctx.round ? "is-round" : ""),
k: common_vendor.n(_ctx.hairline ? "is-hairline" : ""),
l: common_vendor.n(_ctx.plain ? "is-plain" : ""),
m: common_vendor.n(_ctx.disabled ? "is-disabled" : ""),
n: common_vendor.n(_ctx.block ? "is-block" : ""),
o: common_vendor.n(_ctx.loading ? "is-loading" : ""),
p: common_vendor.n(_ctx.customClass),
q: hoverStartTime.value,
r: hoverStayTime.value,
s: _ctx.disabled || _ctx.loading ? void 0 : _ctx.openType,
t: _ctx.sendMessageTitle,
v: _ctx.sendMessagePath,
w: _ctx.sendMessageImg,
x: _ctx.appParameter,
y: _ctx.showMessageCard,
z: _ctx.sessionFrom,
A: _ctx.lang,
B: _ctx.hoverStopPropagation,
C: _ctx.scope,
D: common_vendor.o(handleClick),
E: common_vendor.o(handleGetAuthorize),
F: common_vendor.o(handleGetuserinfo),
G: common_vendor.o(handleConcat),
H: common_vendor.o(handleGetphonenumber),
I: common_vendor.o(handleGetrealtimephonenumber),
J: common_vendor.o(handleError),
K: common_vendor.o(handleLaunchapp),
L: common_vendor.o(handleOpensetting),
M: common_vendor.o(handleChooseavatar),
N: common_vendor.o(handleAgreePrivacyAuthorization)
});
};
}
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-31484079"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/uni_modules/wot-design-uni/components/wd-button/wd-button.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wd-icon": "../wd-icon/wd-icon"
}
}

View File

@ -0,0 +1 @@
<button id="{{e}}" hover-class="{{f}}" style="{{g}}" class="{{['data-v-31484079', 'wd-button', h, i, j, k, l, m, n, o, p]}}" hover-start-time="{{q}}" hover-stay-time="{{r}}" open-type="{{s}}" send-message-title="{{t}}" send-message-path="{{v}}" send-message-img="{{w}}" app-parameter="{{x}}" show-message-card="{{y}}" session-from="{{z}}" lang="{{A}}" hover-stop-propagation="{{B}}" scope="{{C}}" bindtap="{{D}}" bindgetAuthorize="{{E}}" bindgetuserinfo="{{F}}" bindcontact="{{G}}" bindgetphonenumber="{{H}}" bindgetrealtimephonenumber="{{I}}" binderror="{{J}}" bindlaunchapp="{{K}}" bindopensetting="{{L}}" bindchooseavatar="{{M}}" bindagreeprivacyauthorization="{{N}}"><view class="wd-button__content data-v-31484079"><view wx:if="{{a}}" class="wd-button__loading data-v-31484079"><view class="wd-button__loading-svg data-v-31484079" style="{{b}}"></view></view><wd-icon wx:elif="{{c}}" class="data-v-31484079" u-i="31484079-0" bind:__l="__l" u-p="{{d}}"></wd-icon><view class="wd-button__text data-v-31484079"><slot/></view></view></button>

View File

@ -0,0 +1,465 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/**
* 混合宏
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/**
* 辅助函数
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/* 转换成字符串 */
/* 判断是否存在 Modifier */
/* 判断是否存在伪类 */
/**
* 主题色切换
* @params $theme-color 主题色
* @params $type 变暗dark 变亮 'light'
* @params $mix-color 自己设置的混色
*/
/**
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
* @params $open-linear 是否开启线性渐变色
* @params $deg 渐变色角度
* @params $theme-color 当前配色
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
* @params [Array] $per-list 渐变色比例
*/
/**
* BEM定义块b)
*/
/* 定义元素e对于伪类会自动将 e 嵌套在 伪类 底下 */
/* 此方法用于生成穿透样式 */
/* 定义元素e对于伪类会自动将 e 嵌套在 伪类 底下 */
/* 定义状态m */
/* 定义状态m */
/* 对于需要需要嵌套在 m 底下的 e调用这个混合宏一般在切换整个组件的状态如切换颜色的时候 */
/* 状态,生成 is-$state 类名 */
/**
* 常用混合宏
*/
/* 单行超出隐藏 */
/* 多行超出隐藏 */
/* 清除浮动 */
/* 0.5px 边框 指定方向*/
/* 0.5px 边框 环绕 */
/**
* 三角形实现尖角样式,适用于背景透明情况
* @param $size 三角形高,底边为 $size * 2
* @param $bg 三角形背景颜色
*/
/**
* 正方形实现尖角样式,适用于背景不透明情况
* @param $size 正方形边长
* @param $bg 正方形背景颜色
* @param $z-index z-index属性值不得大于外部包裹器
* @param $box-shadow 阴影
*/
/**
* 辅助函数
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/* 转换成字符串 */
/* 判断是否存在 Modifier */
/* 判断是否存在伪类 */
/**
* 主题色切换
* @params $theme-color 主题色
* @params $type 变暗dark 变亮 'light'
* @params $mix-color 自己设置的混色
*/
/**
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
* @params $open-linear 是否开启线性渐变色
* @params $deg 渐变色角度
* @params $theme-color 当前配色
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
* @params [Array] $per-list 渐变色比例
*/
/**
* UI规范基础变量
*/
/*----------------------------------------- Theme color. start ----------------------------------------*/
/* 主题颜色 */
/* 辅助色 */
/* 文字颜色(默认浅色背景下 */
/* 暗黑模式 */
/* 图形颜色 */
/*----------------------------------------- Theme color. end -------------------------------------------*/
/*-------------------------------- Theme color application size. start --------------------------------*/
/* 文字字号 */
/* 文字字重 */
/* 尺寸 */
/*-------------------------------- Theme color application size. end --------------------------------*/
/* component var */
/* action-sheet */
/* badge */
/* button */
/* cell */
/* calendar */
/* checkbox */
/* collapse */
/* divider */
/* drop-menu */
/* input-number */
/* input */
/* textarea */
/* loadmore */
/* message-box */
/* notice-bar */
/* pagination */
/* picker */
/* col-picker */
/* overlay */
/* popup */
/* progress */
/* radio */
/* search */
/* slider */
/* sort-button */
/* steps */
/* switch */
/* tabs */
/* tag */
/* toast */
/* loading */
/* tooltip */
/* popover */
/* grid-item */
/* statustip */
/* card */
/* upload */
/* curtain */
/* notify */
/* skeleton */
/* circle */
/* swiper */
/* swiper-nav */
/* segmented */
/* tabbar */
/* tabbar-item */
/* navbar */
/* navbar-capsule */
/* table */
/* sidebar */
/* sidebar-item */
/* fab */
/* count-down */
/* keyboard */
/* number-keyboard */
/* passwod-input */
/* form-item */
/* backtop */
/* index-bar */
/* text */
/* video-preview */
/* img-cropper */
/* floating-panel */
/* signature */
.wot-theme-dark .wd-button.is-info.data-v-31484079 {
background: var(--wot-dark-background4, #323233);
color: var(--wot-dark-color3, rgba(232, 230, 227, 0.8));
}
.wot-theme-dark .wd-button.is-plain.data-v-31484079 {
background: transparent;
}
.wot-theme-dark .wd-button.is-plain.is-info.data-v-31484079 {
color: var(--wot-dark-color, var(--wot-color-white, rgb(255, 255, 255)));
}
.wot-theme-dark .wd-button.is-plain.is-info.data-v-31484079::after {
border-color: var(--wot-dark-background5, #646566);
}
.wot-theme-dark .wd-button.is-text.is-disabled.data-v-31484079 {
color: var(--wot-dark-color-gray, var(--wot-color-secondary, #595959));
background: transparent;
}
.wot-theme-dark .wd-button.is-icon.data-v-31484079 {
color: var(--wot-dark-color, var(--wot-color-white, rgb(255, 255, 255)));
}
.wot-theme-dark .wd-button.is-icon.is-disabled.data-v-31484079 {
color: var(--wot-dark-color-gray, var(--wot-color-secondary, #595959));
background: transparent;
}
.wd-button.data-v-31484079 {
margin-left: initial;
margin-right: initial;
position: relative;
display: inline-block;
outline: none;
-webkit-appearance: none;
outline: none;
background: transparent;
box-sizing: border-box;
border: none;
border-radius: 0;
color: var(--wot-button-normal-color, var(--wot-color-title, var(--wot-color-black, rgb(0, 0, 0))));
transition: opacity 0.2s;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
font-weight: normal;
}
.wd-button.data-v-31484079::before {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
background: var(--wot-color-black, rgb(0, 0, 0));
border: inherit;
border-color: var(--wot-color-black, rgb(0, 0, 0));
border-radius: inherit;
transform: translate(-50%, -50%);
opacity: 0;
content: " ";
}
.wd-button.data-v-31484079::after {
border: none;
border-radius: 0;
}
.wd-button__content.data-v-31484079 {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.wd-button--active.data-v-31484079:active::before {
opacity: 0.15;
}
.wd-button.is-disabled.data-v-31484079 {
opacity: var(--wot-button-disabled-opacity, 0.6);
}
.wd-button__loading.data-v-31484079 {
margin-right: 5px;
-webkit-animation: wd-rotate-31484079 0.8s linear infinite;
animation: wd-rotate-31484079 0.8s linear infinite;
-webkit-animation-duration: 2s;
animation-duration: 2s;
}
.wd-button__loading-svg.data-v-31484079 {
width: 100%;
height: 100%;
background-size: cover;
background-repeat: no-repeat;
}
.wd-button.is-primary.data-v-31484079 {
background: var(--wot-button-primary-bg-color, var(--wot-color-theme, #4d80f0));
color: var(--wot-button-primary-color, var(--wot-color-white, rgb(255, 255, 255)));
}
.wd-button.is-success.data-v-31484079 {
background: var(--wot-button-success-bg-color, var(--wot-color-success, #34d19d));
color: var(--wot-button-success-color, var(--wot-color-white, rgb(255, 255, 255)));
}
.wd-button.is-info.data-v-31484079 {
background: var(--wot-button-info-bg-color, #f0f0f0);
color: var(--wot-button-info-color, var(--wot-color-title, var(--wot-color-black, rgb(0, 0, 0))));
}
.wd-button.is-warning.data-v-31484079 {
background: var(--wot-button-warning-bg-color, var(--wot-color-warning, #f0883a));
color: var(--wot-button-warning-color, var(--wot-color-white, rgb(255, 255, 255)));
}
.wd-button.is-error.data-v-31484079 {
background: var(--wot-button-error-bg-color, var(--wot-color-danger, #fa4350));
color: var(--wot-button-error-color, var(--wot-color-white, rgb(255, 255, 255)));
}
.wd-button.is-small.data-v-31484079 {
height: var(--wot-button-small-height, 28px);
padding: var(--wot-button-small-padding, 0 12px);
border-radius: var(--wot-button-small-radius, 2px);
font-size: var(--wot-button-small-fs, var(--wot-fs-secondary, 12px));
font-weight: normal;
}
.wd-button.is-small .wd-button__loading.data-v-31484079 {
width: var(--wot-button-small-loading, 14px);
height: var(--wot-button-small-loading, 14px);
}
.wd-button.is-medium.data-v-31484079 {
height: var(--wot-button-medium-height, 36px);
padding: var(--wot-button-medium-padding, 0 16px);
border-radius: var(--wot-button-medium-radius, 4px);
font-size: var(--wot-button-medium-fs, var(--wot-fs-content, 14px));
min-width: 120px;
}
.wd-button.is-medium.is-round.is-icon.data-v-31484079 {
min-width: 0;
border-radius: 50%;
}
.wd-button.is-medium.is-round.is-text.data-v-31484079 {
border-radius: 0;
min-width: 0;
}
.wd-button.is-medium .wd-button__loading.data-v-31484079 {
width: var(--wot-button-medium-loading, 18px);
height: var(--wot-button-medium-loading, 18px);
}
.wd-button.is-large.data-v-31484079 {
height: var(--wot-button-large-height, 44px);
padding: var(--wot-button-large-padding, 0 36px);
border-radius: var(--wot-button-large-radius, 8px);
font-size: var(--wot-button-large-fs, var(--wot-fs-title, 16px));
}
.wd-button.is-large.data-v-31484079::after {
border-radius: var(--wot-button-large-radius, 8px);
}
.wd-button.is-large .wd-button__loading.data-v-31484079 {
width: var(--wot-button-large-loading, 24px);
height: var(--wot-button-large-loading, 24px);
}
.wd-button.is-round.data-v-31484079 {
border-radius: 999px;
}
.wd-button.is-text.data-v-31484079 {
color: var(--wot-button-primary-bg-color, var(--wot-color-theme, #4d80f0));
min-width: 0;
padding: 4px 0;
}
.wd-button.is-text.data-v-31484079::after {
display: none;
}
.wd-button.is-text.wd-button--active.data-v-31484079 {
opacity: var(--wot-button-text-hover-opacity, 0.7);
}
.wd-button.is-text.wd-button--active.data-v-31484079:active::before {
display: none;
}
.wd-button.is-text.is-disabled.data-v-31484079 {
color: var(--wot-button-normal-disabled-color, rgba(0, 0, 0, 0.25));
background: transparent;
}
.wd-button.is-plain.data-v-31484079 {
background: var(--wot-button-plain-bg-color, var(--wot-color-white, rgb(255, 255, 255)));
border: 1px solid currentColor;
}
.wd-button.is-plain.is-primary.data-v-31484079 {
color: var(--wot-button-primary-bg-color, var(--wot-color-theme, #4d80f0));
}
.wd-button.is-plain.is-success.data-v-31484079 {
color: var(--wot-button-success-bg-color, var(--wot-color-success, #34d19d));
}
.wd-button.is-plain.is-info.data-v-31484079 {
color: var(--wot-button-info-plain-normal-color, rgba(0, 0, 0, 0.85));
border-color: var(--wot-button-info-plain-border-color, rgba(0, 0, 0, 0.45));
}
.wd-button.is-plain.is-warning.data-v-31484079 {
color: var(--wot-button-warning-bg-color, var(--wot-color-warning, #f0883a));
}
.wd-button.is-plain.is-error.data-v-31484079 {
color: var(--wot-button-error-bg-color, var(--wot-color-danger, #fa4350));
}
.wd-button.is-hairline.data-v-31484079 {
border-width: 0;
}
.wd-button.is-hairline.is-plain.data-v-31484079 {
position: relative;
}
.wd-button.is-hairline.is-plain.data-v-31484079::after {
position: absolute;
display: block;
content: " ";
pointer-events: none;
width: 200%;
height: 200%;
left: 0;
top: 0;
border: 1px solid var(--wot-color-border-light, #e8e8e8);
transform: scale(0.5);
box-sizing: border-box;
transform-origin: left top;
}
.wd-button.is-hairline.is-plain.data-v-31484079::before {
border-radius: inherit;
}
.wd-button.is-hairline.is-plain.data-v-31484079::after {
border-color: inherit;
}
.wd-button.is-hairline.is-plain.is-round.data-v-31484079::after {
border-radius: inherit !important;
}
.wd-button.is-hairline.is-plain.is-large.data-v-31484079::after {
border-radius: calc(2 * var(--wot-button-large-radius, 8px));
}
.wd-button.is-hairline.is-plain.is-medium.data-v-31484079::after {
border-radius: calc(2 * var(--wot-button-medium-radius, 4px));
}
.wd-button.is-hairline.is-plain.is-small.data-v-31484079::after {
border-radius: calc(2 * var(--wot-button-small-radius, 2px));
}
.wd-button.is-block.data-v-31484079 {
display: block;
}
.wd-button.is-icon.data-v-31484079 {
width: var(--wot-button-icon-size, 40px);
height: var(--wot-button-icon-size, 40px);
padding: 0;
border-radius: 50%;
color: var(--wot-button-icon-color, rgba(0, 0, 0, 0.65));
}
.wd-button.is-icon.data-v-31484079::after {
display: none;
}
.wd-button.is-icon.data-v-31484079 .wd-button__icon {
margin-right: 0;
}
.wd-button.is-icon.is-disabled.data-v-31484079 {
color: var(--wot-button-icon-disabled-color, var(--wot-color-icon-disabled, #a7a7a7));
background: transparent;
}
.data-v-31484079 .wd-button__icon {
display: block;
margin-right: 6px;
font-size: var(--wot-button-icon-fs, 18px);
vertical-align: middle;
}
.wd-button__text.data-v-31484079 {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
white-space: nowrap;
}
@-webkit-keyframes wd-rotate-31484079 {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes wd-rotate-31484079 {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

View File

@ -0,0 +1,11 @@
"use strict";
var uni_modules_wotDesignUni_components_common_props = require("../common/props.js");
const cardProps = {
...uni_modules_wotDesignUni_components_common_props.baseProps,
type: String,
title: String,
customTitleClass: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
customContentClass: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
customFooterClass: uni_modules_wotDesignUni_components_common_props.makeStringProp("")
};
exports.cardProps = cardProps;

View File

@ -0,0 +1,40 @@
"use strict";
var common_vendor = require("../../../../common/vendor.js");
var uni_modules_wotDesignUni_components_wdCard_types = require("./types.js");
require("../common/props.js");
const __default__ = {
name: "wd-card",
options: {
addGlobalClass: true,
virtualHost: true,
styleIsolation: "shared"
}
};
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: uni_modules_wotDesignUni_components_wdCard_types.cardProps,
setup(__props) {
return (_ctx, _cache) => {
return common_vendor.e({
a: _ctx.title || _ctx.$slots.title
}, _ctx.title || _ctx.$slots.title ? common_vendor.e({
b: _ctx.title
}, _ctx.title ? {
c: common_vendor.t(_ctx.title)
} : {}, {
d: common_vendor.n(_ctx.customTitleClass)
}) : {}, {
e: common_vendor.n(`wd-card__content ${_ctx.customContentClass}`),
f: _ctx.$slots.footer
}, _ctx.$slots.footer ? {
g: common_vendor.n(`wd-card__footer ${_ctx.customFooterClass}`)
} : {}, {
h: common_vendor.n(_ctx.type == "rectangle" ? "is-rectangle" : ""),
i: common_vendor.n(_ctx.customClass),
j: common_vendor.s(_ctx.customStyle)
});
};
}
});
var Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f064e216"], ["__file", "D:/\u7F51\u6291\u4E91Time/\u79C1\u6D3B/2000\u7B97\u5366/src/uni_modules/wot-design-uni/components/wd-card/wd-card.vue"]]);
wx.createComponent(Component);

View File

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -0,0 +1 @@
<view class="{{['data-v-f064e216', 'wd-card', h, i]}}" style="{{j}}"><view wx:if="{{a}}" class="{{['data-v-f064e216', 'wd-card__title-content', d]}}"><view class="wd-card__title data-v-f064e216"><text wx:if="{{b}}" class="data-v-f064e216">{{c}}</text><slot wx:else name="title"></slot></view></view><view class="{{['data-v-f064e216', e]}}"><slot></slot></view><view wx:if="{{f}}" class="{{['data-v-f064e216', g]}}"><slot name="footer"></slot></view></view>

View File

@ -0,0 +1,290 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/**
* 辅助函数
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/* 转换成字符串 */
/* 判断是否存在 Modifier */
/* 判断是否存在伪类 */
/**
* 主题色切换
* @params $theme-color 主题色
* @params $type 变暗dark 变亮 'light'
* @params $mix-color 自己设置的混色
*/
/**
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
* @params $open-linear 是否开启线性渐变色
* @params $deg 渐变色角度
* @params $theme-color 当前配色
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
* @params [Array] $per-list 渐变色比例
*/
/**
* UI规范基础变量
*/
/*----------------------------------------- Theme color. start ----------------------------------------*/
/* 主题颜色 */
/* 辅助色 */
/* 文字颜色(默认浅色背景下 */
/* 暗黑模式 */
/* 图形颜色 */
/*----------------------------------------- Theme color. end -------------------------------------------*/
/*-------------------------------- Theme color application size. start --------------------------------*/
/* 文字字号 */
/* 文字字重 */
/* 尺寸 */
/*-------------------------------- Theme color application size. end --------------------------------*/
/* component var */
/* action-sheet */
/* badge */
/* button */
/* cell */
/* calendar */
/* checkbox */
/* collapse */
/* divider */
/* drop-menu */
/* input-number */
/* input */
/* textarea */
/* loadmore */
/* message-box */
/* notice-bar */
/* pagination */
/* picker */
/* col-picker */
/* overlay */
/* popup */
/* progress */
/* radio */
/* search */
/* slider */
/* sort-button */
/* steps */
/* switch */
/* tabs */
/* tag */
/* toast */
/* loading */
/* tooltip */
/* popover */
/* grid-item */
/* statustip */
/* card */
/* upload */
/* curtain */
/* notify */
/* skeleton */
/* circle */
/* swiper */
/* swiper-nav */
/* segmented */
/* tabbar */
/* tabbar-item */
/* navbar */
/* navbar-capsule */
/* table */
/* sidebar */
/* sidebar-item */
/* fab */
/* count-down */
/* keyboard */
/* number-keyboard */
/* passwod-input */
/* form-item */
/* backtop */
/* index-bar */
/* text */
/* video-preview */
/* img-cropper */
/* floating-panel */
/* signature */
/**
* 混合宏
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/**
* 辅助函数
*/
/**
* SCSS 配置项命名空间以及BEM
*/
/* 转换成字符串 */
/* 判断是否存在 Modifier */
/* 判断是否存在伪类 */
/**
* 主题色切换
* @params $theme-color 主题色
* @params $type 变暗dark 变亮 'light'
* @params $mix-color 自己设置的混色
*/
/**
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
* @params $open-linear 是否开启线性渐变色
* @params $deg 渐变色角度
* @params $theme-color 当前配色
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
* @params [Array] $per-list 渐变色比例
*/
/**
* BEM定义块b)
*/
/* 定义元素e对于伪类会自动将 e 嵌套在 伪类 底下 */
/* 此方法用于生成穿透样式 */
/* 定义元素e对于伪类会自动将 e 嵌套在 伪类 底下 */
/* 定义状态m */
/* 定义状态m */
/* 对于需要需要嵌套在 m 底下的 e调用这个混合宏一般在切换整个组件的状态如切换颜色的时候 */
/* 状态,生成 is-$state 类名 */
/**
* 常用混合宏
*/
/* 单行超出隐藏 */
/* 多行超出隐藏 */
/* 清除浮动 */
/* 0.5px 边框 指定方向*/
/* 0.5px 边框 环绕 */
/**
* 三角形实现尖角样式,适用于背景透明情况
* @param $size 三角形高,底边为 $size * 2
* @param $bg 三角形背景颜色
*/
/**
* 正方形实现尖角样式,适用于背景不透明情况
* @param $size 正方形边长
* @param $bg 正方形背景颜色
* @param $z-index z-index属性值不得大于外部包裹器
* @param $box-shadow 阴影
*/
.wot-theme-dark .wd-card.data-v-f064e216 {
background-color: var(--wot-dark-background2, #1b1b1b);
}
.wot-theme-dark .wd-card.is-rectangle .wd-card__content.data-v-f064e216 {
position: relative;
}
.wot-theme-dark .wd-card.is-rectangle .wd-card__content.data-v-f064e216::after {
position: absolute;
display: block;
content: "";
width: 100%;
height: 1px;
left: 0;
top: 0;
transform: scaleY(0.5);
background: var(--wot-dark-border-color, #3a3a3c);
}
.wot-theme-dark .wd-card.is-rectangle .wd-card__footer.data-v-f064e216 {
position: relative;
}
.wot-theme-dark .wd-card.is-rectangle .wd-card__footer.data-v-f064e216::after {
position: absolute;
display: block;
content: "";
width: 100%;
height: 1px;
left: 0;
top: 0;
transform: scaleY(0.5);
background: var(--wot-dark-border-color, #3a3a3c);
}
.wot-theme-dark .wd-card__title-content.data-v-f064e216 {
color: var(--wot-dark-color, var(--wot-color-white, rgb(255, 255, 255)));
}
.wot-theme-dark .wd-card__content.data-v-f064e216 {
color: var(--wot-dark-color3, rgba(232, 230, 227, 0.8));
}
.wd-card.data-v-f064e216 {
padding: var(--wot-card-padding, 0 var(--wot-size-side-padding, 15px));
background-color: var(--wot-card-bg, var(--wot-color-white, rgb(255, 255, 255)));
line-height: var(--wot-card-line-height, 1.1);
margin: var(--wot-card-margin, 0 var(--wot-size-side-padding, 15px));
border-radius: var(--wot-card-radius, 8px);
box-shadow: var(--wot-card-shadow-color, 0px 4px 8px 0px rgba(0, 0, 0, 0.02));
font-size: var(--wot-card-fs, var(--wot-fs-content, 14px));
margin-bottom: 12px;
}
.wd-card.is-rectangle.data-v-f064e216 {
margin-left: 0;
margin-right: 0;
border-radius: 0;
box-shadow: none;
}
.wd-card.is-rectangle .wd-card__title-content.data-v-f064e216 {
font-size: var(--wot-card-fs, var(--wot-fs-content, 14px));
}
.wd-card.is-rectangle .wd-card__content.data-v-f064e216 {
position: relative;
padding: var(--wot-card-rectangle-content-padding, 16px 0);
position: relative;
}
.wd-card.is-rectangle .wd-card__content.data-v-f064e216::after {
position: absolute;
display: block;
content: "";
width: 100%;
height: 1px;
left: 0;
top: 0;
transform: scaleY(0.5);
background: var(--wot-card-content-border-color, rgba(0, 0, 0, 0.09));
}
.wd-card.is-rectangle .wd-card__footer.data-v-f064e216 {
position: relative;
padding: var(--wot-card-rectangle-footer-padding, 12px 0);
position: relative;
}
.wd-card.is-rectangle .wd-card__footer.data-v-f064e216::after {
position: absolute;
display: block;
content: "";
width: 100%;
height: 1px;
left: 0;
top: 0;
transform: scaleY(0.5);
background: var(--wot-card-content-border-color, rgba(0, 0, 0, 0.09));
}
.wd-card__title-content.data-v-f064e216 {
padding: 16px 0;
color: var(--wot-card-title-color, rgba(0, 0, 0, 0.85));
font-size: var(--wot-card-title-fs, var(--wot-fs-title, 16px));
}
.wd-card__content.data-v-f064e216 {
color: var(--wot-card-content-color, rgba(0, 0, 0, 0.45));
line-height: var(--wot-card-content-line-height, 1.428);
}
.wd-card__footer.data-v-f064e216 {
padding: var(--wot-card-footer-padding, 12px 0 16px);
text-align: right;
}

View File

@ -0,0 +1,12 @@
"use strict";
var uni_modules_wotDesignUni_components_common_props = require("../common/props.js");
const CELL_GROUP_KEY = Symbol("wd-cell-group");
const cellGroupProps = {
...uni_modules_wotDesignUni_components_common_props.baseProps,
title: String,
value: String,
useSlot: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
border: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false)
};
exports.CELL_GROUP_KEY = CELL_GROUP_KEY;
exports.cellGroupProps = cellGroupProps;

Some files were not shown because too many files have changed in this diff Show More