Skip to content

Commit

Permalink
feat:macro
Browse files Browse the repository at this point in the history
  • Loading branch information
iRuxu committed Jan 8, 2024
1 parent 9bd068f commit 995ddd2
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 6 deletions.
Binary file modified README.md
Binary file not shown.
10 changes: 10 additions & 0 deletions public/macro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta name="renderer" content="webkit" />
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
</html>
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import reporter from "@jx3box/jx3box-common/js/reporter";
reporter.install(Vue);

// 数据与路由
import router from "./router";
import router from "./router/game";
import store from "./store";

import App from "./App.vue";
Expand Down
22 changes: 22 additions & 0 deletions src/pages/macro.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import jquery from "jquery";
import { __Root, __OriginRoot } from "@jx3box/jx3box-common/data/jx3box.json";
const qs = require("qs");

const query = qs.parse(location.search, { ignoreQueryPrefix: true });
const rootPath = query.L === "classic_yq" ? __OriginRoot : __Root;
const name = decodeURIComponent(query.name);

jquery.ajax({
async: true,
url: "https://pull.j3cx.com/api/macro/query",
type: "GET",
data: { name: name },
dataType: "json",
success: function (data) {
// alert(search)
location.href = data.about;
},
error: function (err) {
location.href = rootPath + "macro/";
},
});
10 changes: 10 additions & 0 deletions src/pages/macros.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import xfid from "@jx3box/jx3box-data/data/xf/xfid.json";
import { __Root, __OriginRoot } from "@jx3box/jx3box-common/data/jx3box.json";

const qs = require("qs");

const query = qs.parse(location.search, { ignoreQueryPrefix: true });
const rootPath = query.L === "classic_yq" ? __OriginRoot : __Root;
const xf = xfid[query.kungfu];

location.href = rootPath + "macro/?subtype=" + xf; //+ '#/rank'
5 changes: 0 additions & 5 deletions src/router/index.js → src/router/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ Vue.use(VueRouter);
const routes = [
{
path: "/",
redirect: "/cj",
},
{
path: "/game",
name: "game",
component: () => import("../views/game.vue"),
},
];
Expand Down
12 changes: 12 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ module.exports = {
entry: "src/pages/cj.js",
filename: "cj/index.html",
},
macros : {
title : '云端宏排行榜 - JX3BOX',
entry:'src/pages/macros.js',
template : 'public/macro.html',
filename:'macros.html',
},
macro : {
title : '云端宏 - JX3BOX',
entry:'src/pages/macro.js',
template : 'public/macro.html',
filename:'macro.html',
},
},

// ❤️ Porxy ~
Expand Down

0 comments on commit 995ddd2

Please sign in to comment.