From 83de834e6d932c47cb6cfbc9cdcfaa8a81143d01 Mon Sep 17 00:00:00 2001 From: fifthThirteen <570205219@qq.com> Date: Fri, 10 Jan 2025 18:09:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B4=BB=E5=8A=A8=E5=91=8A=E7=A4=BA?= =?UTF-8?q?=E7=BE=8E=E4=BA=BA=E5=9B=BE#152?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/gonggao/daily.less | 63 +++++++ src/components/gonggao/Daily.vue | 44 ++++- src/components/gonggao/daily/MrtDialog.vue | 178 ++++++++++++++++++ src/components/gonggao/daily/SimpleMrt.vue | 78 +++++--- src/components/gonggao/daily/SimpleMrtV1.vue | 65 +++++++ src/components/gonggao/daily/SimpleNotice.vue | 5 +- src/service/gonggao.js | 16 +- src/store/pvg.js | 2 +- 8 files changed, 422 insertions(+), 29 deletions(-) create mode 100644 src/components/gonggao/daily/MrtDialog.vue create mode 100644 src/components/gonggao/daily/SimpleMrtV1.vue diff --git a/src/assets/css/gonggao/daily.less b/src/assets/css/gonggao/daily.less index 2375d8e09..4093c5d06 100644 --- a/src/assets/css/gonggao/daily.less +++ b/src/assets/css/gonggao/daily.less @@ -527,6 +527,49 @@ } } } + .m-simple-mrt-new { + .flex; + flex-direction: column; + gap: 10px; + .m-mrt-item { + position: relative; + .flex; + justify-content: space-between; + align-items: center; + padding: 10px; + gap: 20px; + width: 100%; + height: 76px; + box-sizing: border-box; + + background: #ffffff; + border-radius: 10px; + font-size: 14px; + font-weight: bold; + .u-name { + .flex; + align-items: center; + gap: 10px; + color: #000000; + &.active { + color: #ffad31; + } + } + .u-desc { + font-size: 12px; + color: #999; + font-weight: normal; + } + .u-date { + font-size: 10px; + color: #999; + font-weight: normal; + position: absolute; + right: 10px; + bottom: 10px; + } + } + } .m-simple-horse { position: relative; @@ -778,4 +821,24 @@ } } } + .u-mrt-title { + .flex; + align-items: center; + gap: 10px; + .el-select { + max-width: 72px; + .el-input__inner { + border: none; + padding: 0; + background-color: transparent; + } + input { + font-size: 12px; + padding: 0; + } + .el-input__suffix { + right: -15px; + } + } + } } diff --git a/src/components/gonggao/Daily.vue b/src/components/gonggao/Daily.vue index 5139fb2ac..7e07a8ece 100644 --- a/src/components/gonggao/Daily.vue +++ b/src/components/gonggao/Daily.vue @@ -40,7 +40,20 @@
抓马播报
+
+
+
+ 美人图 · + + + +
+ 查询 +
+ +
+ @@ -55,7 +68,13 @@ import SimpleCelebrity from "./daily/SimpleCelebrity.vue"; // import SimpleReputation from "./daily/SimpleReputation.vue"; // import SimpleFurniture from "./daily/SimpleFurniture.vue"; import SimpleHorse from "./daily/SimpleHorse.vue"; +import SimpleMrt from "./daily/SimpleMrt.vue"; +import MrtDialog from "./daily/MrtDialog.vue"; + import dailyKeys from "@/assets/data/daily_keys.json"; +import servers_std from "@jx3box/jx3box-data/data/server/server_std.json"; +import servers_origin from "@jx3box/jx3box-data/data/server/server_origin.json"; + export default { name: "Daily", components: { @@ -67,6 +86,8 @@ export default { // SimpleWeek, // SimpleFurniture, SimpleHorse, + SimpleMrt, + MrtDialog, }, data() { return { @@ -79,14 +100,23 @@ export default { currentFurniture: {}, nextFurniture: {}, activities: [], // 日常配置列表 + visible: false, + currentServer: "", }; }, computed: { client() { - return this.$store.state.client; + return this.$store.state.client || "std"; }, server() { - return this.$store.state.server; + return this.$store.state.server || "梦江南"; + }, + servers: function () { + if (this.client == "std") { + return servers_std; + } else { + return servers_origin; + } }, isOrigin() { return location.href.includes("origin"); @@ -109,6 +139,16 @@ export default { return week === currentWeek; }, }, + watch: { + server: { + immediate: true, + handler(server) { + if (server) { + this.currentServer = server; + } + }, + }, + }, methods: { changeCelebrity(i) { this.currentCelebrity = i; diff --git a/src/components/gonggao/daily/MrtDialog.vue b/src/components/gonggao/daily/MrtDialog.vue new file mode 100644 index 000000000..4af275147 --- /dev/null +++ b/src/components/gonggao/daily/MrtDialog.vue @@ -0,0 +1,178 @@ + + + diff --git a/src/components/gonggao/daily/SimpleMrt.vue b/src/components/gonggao/daily/SimpleMrt.vue index fa3cefbde..28cda4f8b 100644 --- a/src/components/gonggao/daily/SimpleMrt.vue +++ b/src/components/gonggao/daily/SimpleMrt.vue @@ -1,28 +1,36 @@ diff --git a/src/components/gonggao/daily/SimpleNotice.vue b/src/components/gonggao/daily/SimpleNotice.vue index f66e7182c..ccee98f27 100644 --- a/src/components/gonggao/daily/SimpleNotice.vue +++ b/src/components/gonggao/daily/SimpleNotice.vue @@ -101,14 +101,13 @@ export default { }, loadGameData: function () { getGameNews(this.client).then((res) => { - // 正式服 - const data = this.client == "std" ? res?.data : res?.data?.reverse(); + // const data = this.client == "std" ? res?.data : res?.data?.reverse(); this.game_data = res?.data .map((item) => { item.url = this.linkFormat(item.url); // 如果当前为1月,且新闻时间为12月,则年份-1 item.time = - !new Date().getMonth() && item.item.split("/")[0] == 12 + !new Date().getMonth() && item.item?.split("/")[0] == 12 ? (item.time = new Date(new Date().getFullYear() - 1 + "/" + item.time)) : new Date(new Date().getFullYear() + "/" + item.time); item.type = "game"; diff --git a/src/service/gonggao.js b/src/service/gonggao.js index fe295dba6..c2c2099b5 100644 --- a/src/service/gonggao.js +++ b/src/service/gonggao.js @@ -1,7 +1,6 @@ import { $node, $next, $cms } from "@jx3box/jx3box-common/js/https"; import axios from "axios"; import { __spider2, __dataPath } from "@jx3box/jx3box-common/data/jx3box.json"; - const $spider = axios.create({ baseURL: __spider2, }); @@ -30,6 +29,19 @@ function getMeirentu(server = "蝶恋花") { }); } +// 新美人图 +function getMeirentuNew(params) { + return $cms().get(`/api/cms/pvx/beauty-paint`, { + params, + }); +} +// 查询美人图下一次出现的日期 +function getMeirentuPredict(params) { + return $cms().get(`/api/cms/pvx/beauty-paint/predict`, { + params, + }); +} + // 宠物福缘 function getPetLucky() { return axios.get(__dataPath + "pvx/pet/output/pet_lucky.json"); @@ -127,4 +139,6 @@ export { getPosts, getChangelog, getDailyFromOs, + getMeirentuNew, + getMeirentuPredict, }; diff --git a/src/store/pvg.js b/src/store/pvg.js index 42cacb837..d7c924d5d 100644 --- a/src/store/pvg.js +++ b/src/store/pvg.js @@ -9,7 +9,7 @@ Vue.use(Vuex); let store = { state: { client: location.href.includes("origin") ? "origin" : "std", - server: "", + server: "梦江南", craft_key: "", item_id: "", item: {},