diff --git a/build/webpack.base.js b/build/webpack.base.js
index 3105ecd..606553e 100644
--- a/build/webpack.base.js
+++ b/build/webpack.base.js
@@ -50,6 +50,7 @@ module.exports = {
plugins: [
new VueLoaderPlugin(), // vue-loader 插件
new MiniCssExtractPlugin({
+ ignoreOrder: true, // 解决css引入顺序不一导致冲突的警告问题
filename: 'css/[name].[contenthash].content.css',
}),
new HtmlWebpackPlugin({
diff --git a/src/global.css b/src/global.scss
similarity index 97%
rename from src/global.css
rename to src/global.scss
index cab8aec..501989d 100644
--- a/src/global.css
+++ b/src/global.scss
@@ -114,3 +114,10 @@ html {
justify-content: center;
}
}
+
+// 按钮置灰
+.btnPlacingAshes {
+ background: #e8eaec !important;
+}
+
+
diff --git a/src/main.ts b/src/main.ts
index 6d9dad9..67f4489 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,6 +1,6 @@
import { createApp } from 'vue'
import './scripts/flexible.js'
-import './global.css' // 添加全局样式
+import './global.scss' // 添加全局样式
import App from './App.vue'
import router from './router'
diff --git a/src/router/api.ts b/src/router/api.ts
index 15c035c..d0e4e58 100644
--- a/src/router/api.ts
+++ b/src/router/api.ts
@@ -5,14 +5,14 @@ export enum Api {
LOGIN = "/v1/user/login",
// 商品查询
QUERY = "/v1/goods/list/key",
- // 商品详情
- DETAIL = "/v1/goods/detail",
// 模板查询
GET_THEME = "/v1/theme",
// 兑换
EXCHANGE = "/v1/order/exchange",
// 商品详情查询
DETAIL_QUERY = "/v1/goods/detail",
+ // 订单状态查询
+ ORDER_QUERY = "/v1/order/query",
}
@@ -20,10 +20,10 @@ export const LOGIN = (data?: any) => request.post(Api.LOGIN, data);
export const QUERY = (data?: any) => request.get(Api.QUERY, data);
-export const DETAIL = (data?: any) => request.get(Api.DETAIL, data);
-
export const GET_THEME = (data?: any) => request.get(Api.GET_THEME, data);
export const EXCHANGE = (data?: any) => request.post(Api.EXCHANGE, data);
-export const getGoodsDetail = (data?: any) => request.get(Api.DETAIL_QUERY, data);
+export const DETAIL_QUERY = (data?: any) => request.get(Api.DETAIL_QUERY, data);
+
+export const ORDER_QUERY = (data?: any) => request.post(Api.ORDER_QUERY, data);
diff --git a/src/router/index.ts b/src/router/index.ts
index 363ad25..3b94955 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -3,21 +3,18 @@ import {
createWebHashHistory,
createWebHistory,
} from "vue-router";
-import { LOGIN, QUERY } from "@/router/api";
// 公共路由
const routePublic = [
{
- // 商品中转(空白页)
- path: "/proTransfer",
- name: "proTransfer",
- component: () => ({}),
+ path: "/",
+ redirect: "/home"
},
{
- // 中转失败页
- path: "/transferError",
- name: "transferError",
- component: () => import("../views/transferError.vue"),
+ // 首页(中转处理逻辑)
+ path: "/home",
+ name: "home",
+ component: () => import("../views/home.vue"),
},
];
@@ -67,64 +64,4 @@ const router = createRouter({
routes,
});
-router.beforeEach(async (to, from, next) => {
- if (to.path === "/proTransfer") {
- // 商品中转
- // console.log('---proTransfer-router.beforeEach---', to, from);
- try {
- const key =
- to.query.key || "rPBVzOCs0FN4P7jNMqHo5IVfb0oaAyigbfNBmCKnavs=";
- // const res = await LOGIN({ key: key }); // 请求 token
- const res = { data: { Token: "" }, code: 200, message: "" }; // 请求 token
- if (res && res.code === 200) {
- res.data.Token =
- "admingL_q2QjDlD_MdeU11q5ILoeLFEqhbGBtcEptfs-OHzI53vbrgX9GFCh-SB4fSJBGwgSTl.uDPUoyiPjJ2O6e7zUBzExUUXhsdnPxtyLwncYc8.vy9ikZRp-wUba2POZJlTERJxnLbK6DzpQFQTxuYfcNM_yl3Avo7hgCjkS-ot5QgzNiO5TE";
- if (res.data.Token) {
- localStorage.setItem("token", res.data.Token);
- const resList = await QUERY({ key: key }); // 根据商品判断 跳转指定路由
- if (resList && resList.code === 200) {
- localStorage.setItem("key", String(key));
- sessionStorage.removeItem("transferError_page_identify");
- if (resList.data.length !== 1) {
- sessionStorage.setItem(
- "transferProListData",
- JSON.stringify(resList.data)
- );
- return next({
- path: "/cmsList",
- query: { key: key },
- }); // 商品列表
- } else {
- const pro = resList.data[0];
- if (pro.goods.group_id) {
- return next({
- path: "/comProduct",
- query: { group_id: pro.goods.group_id },
- }); // 组合商品
- } else {
- // todo 3 种商品的详情页
- }
- }
- }
- } else {
- showToast("登录失败");
- }
- } else {
- showToast(res?.message || '接口请求失败');
- }
- next({
- path: "/transferError",
- query: { redirect: to.fullPath },
- });
- } catch (error) {
- next({
- path: "/transferError",
- query: { redirect: to.fullPath },
- });
- }
- } else {
- next(); // 对于非匹配路由,直接放行
- }
-});
-
export default router;
diff --git a/src/views/home.vue b/src/views/home.vue
new file mode 100644
index 0000000..5739f84
--- /dev/null
+++ b/src/views/home.vue
@@ -0,0 +1,110 @@
+
+
一键领取 >
支付宝账号达到可领取上限,请换号重试
+{{ '暂无接口字段' }}
{{ listCss.get(item)?.text }}
- 10元 - x2 + {{ `${10}元`}} + {{ 10 }} + x{{i.info.send_num}}
-满10.01减10
+{{ `满${i.info.full_amount}减${i.info.amount}` }}
默认文案-云闪付5元立减金
-默认文案-使用招商银行卡支付可立减金
+{{ i.goods.name }}
+{{ i.info.instruction }}
- {{ '立即领取' }} + {{ + i.goods.err_code + ? 'code 文案' + : (i.goods.type === 3) && i.info.send_num ? `立即领取 ${i.goods.exchange_times/i.info.send_num}` : '立即领取' + }}
标题
+