From 8b5de95140843e1c1a746b7178a21c7dde361a5b Mon Sep 17 00:00:00 2001
From: YuanHuakk <1751826683@qq.com>
Date: Sat, 19 Aug 2023 21:37:22 +0800
Subject: [PATCH] i
---
package.json | 1 -
src/api/admin.ts | 3 +
src/api/goods.ts | 11 +-
src/api/order.ts | 2 +-
src/app.config.ts | 115 ++--
src/components/Pay.vue | 239 +++++----
src/pages/admin/verify/index.vue | 16 +-
src/pages/game/gamedetail/index.vue | 51 +-
src/pages/game/gameview/index.config.ts | 0
src/pages/game/gameview/index.vue | 13 +
src/pages/goods/goods_detail/index.vue | 647 ++++++++++++-----------
src/pages/hotGoods/index/index.config.ts | 4 +
src/pages/hotGoods/index/index.vue | 135 +++++
src/pages/index/index.vue | 6 +-
src/pages/users/order_list/index.vue | 6 +-
tsconfig.json | 18 +-
16 files changed, 749 insertions(+), 518 deletions(-)
create mode 100644 src/pages/game/gameview/index.config.ts
create mode 100644 src/pages/game/gameview/index.vue
create mode 100644 src/pages/hotGoods/index/index.config.ts
create mode 100644 src/pages/hotGoods/index/index.vue
diff --git a/package.json b/package.json
index 39ba72b..dc66776 100644
--- a/package.json
+++ b/package.json
@@ -53,7 +53,6 @@
"@tarojs/shared": "3.6.11",
"@tarojs/taro": "3.6.11",
"pinia": "^2.1.6",
- "uqrcodejs": "^4.0.7",
"vue": "^3.2.40"
},
"devDependencies": {
diff --git a/src/api/admin.ts b/src/api/admin.ts
index 7bac9d8..1a30db1 100644
--- a/src/api/admin.ts
+++ b/src/api/admin.ts
@@ -2,3 +2,6 @@ import request from '../utils/request';
// 订单核销
export const orderVerify = (data: object) => request('/user/cancelPointOrder', data, 'POST');
+
+// 活动订单核销
+export const activeOrderVerify = (data: object) => request('/user/cancelOrder', data, 'POST');
diff --git a/src/api/goods.ts b/src/api/goods.ts
index 7e478ec..11214ea 100644
--- a/src/api/goods.ts
+++ b/src/api/goods.ts
@@ -16,4 +16,13 @@ export const getGoodsDetail = (data: object) => request('/point/details', data,
export const createOrder = (data: object) => request('/point/place', data, 'POST')
// 确认付款
-export const payJfOrder = (data: object) => request('/point/confirmOrder', data, 'POST')
\ No newline at end of file
+export const payJfOrder = (data: object) => request('/point/confirmOrder', data, 'POST')
+
+// 获取活动商品
+export const getActiveGoods = () => request('/goods', {}, 'POST')
+
+// 获取活动商品详情
+export const getActiveGoodsDetail = (data: object) => request('/goods/details', data, 'POST')
+
+// 活动商品下单
+export const createActiveOrder = (data: object) => request('/order/place', data, 'POST')
\ No newline at end of file
diff --git a/src/api/order.ts b/src/api/order.ts
index a3d529e..4b08776 100644
--- a/src/api/order.ts
+++ b/src/api/order.ts
@@ -1,4 +1,4 @@
import request from '@/utils/request'
// 订单支付
-export const payOrder = (data: object) => request('/order/place', data, 'POST')
\ No newline at end of file
+export const payOrder = (data: object) => request('/order/confirmOrder', data, 'POST')
\ No newline at end of file
diff --git a/src/app.config.ts b/src/app.config.ts
index 2147b0d..9658966 100644
--- a/src/app.config.ts
+++ b/src/app.config.ts
@@ -1,86 +1,87 @@
export default defineAppConfig({
pages: [
- 'pages/index/index',
- 'pages/category/index',
- 'pages/cart/index',
- 'pages/user/index',
+ "pages/index/index",
+ "pages/category/index",
+ "pages/cart/index",
+ "pages/user/index",
],
subPackages: [
{
- root: 'pages/users',
+ root: "pages/users",
pages: [
- 'order_list/index',
- 'setting/index',
- 'user_setting/index',
- 'settled_mer/index',
- 'order_list_detail/index',
- 'account/index'
- ]
+ "order_list/index",
+ "setting/index",
+ "user_setting/index",
+ "settled_mer/index",
+ "order_list_detail/index",
+ "account/index",
+ ],
},
{
- root: 'pages/goods',
+ root: "pages/goods",
pages: [
- 'goods_detail/index',
- 'order_create/index',
- 'order_status/index'
- ]
+ "goods_detail/index",
+ "order_create/index",
+ "order_status/index",
+ ],
},
{
- root: 'pages/admin',
- pages: ['verify/index']
+ root: "pages/admin",
+ pages: ["verify/index"],
},
{
- root: 'pages/game',
- pages: [
- 'gamehome/index',
- 'gamedetail/index',
- ]
- }
+ root: "pages/game",
+ pages: ["gamehome/index", "gamedetail/index", "gameview/index"],
+ },
+ {
+ root: "pages/hotGoods",
+ pages: ["index/index"],
+ },
],
window: {
- backgroundTextStyle: 'light',
- navigationBarBackgroundColor: '#fff',
- navigationBarTitleText: 'WeChat',
- navigationBarTextStyle: 'black'
+ backgroundTextStyle: "light",
+ navigationBarBackgroundColor: "#fff",
+ navigationBarTitleText: "WeChat",
+ navigationBarTextStyle: "black",
},
tabBar: {
- color: '#666666',
- selectedColor: '#ff0000',
- backgroundColor: '#ffffff',
- borderStyle: 'white',
+ color: "#666666",
+ selectedColor: "#ff0000",
+ backgroundColor: "#ffffff",
+ borderStyle: "white",
list: [
{
- pagePath: 'pages/index/index',
- iconPath: 'static/tabbar/1-001.png',
- selectedIconPath: 'static/tabbar/1-002.png',
- text: '首页'
+ pagePath: "pages/index/index",
+ iconPath: "static/tabbar/1-001.png",
+ selectedIconPath: "static/tabbar/1-002.png",
+ text: "首页",
},
{
- pagePath: 'pages/category/index',
- iconPath: 'static/tabbar/2-001.png',
- selectedIconPath: 'static/tabbar/2-002.png',
- text: '分类'
+ pagePath: "pages/category/index",
+ iconPath: "static/tabbar/2-001.png",
+ selectedIconPath: "static/tabbar/2-002.png",
+ text: "分类",
},
{
- pagePath: 'pages/cart/index',
- iconPath: 'static/tabbar/3-001.png',
- selectedIconPath: 'static/tabbar/3-002.png',
- text: '购物车'
+ pagePath: "pages/cart/index",
+ iconPath: "static/tabbar/3-001.png",
+ selectedIconPath: "static/tabbar/3-002.png",
+ text: "购物车",
},
{
- pagePath: 'pages/user/index',
- iconPath: 'static/tabbar/4-001.png',
- selectedIconPath: 'static/tabbar/4-002.png',
- text: '我的'
- }
- ]
+ pagePath: "pages/user/index",
+ iconPath: "static/tabbar/4-001.png",
+ selectedIconPath: "static/tabbar/4-002.png",
+ text: "我的",
+ },
+ ],
},
permission: {
- 'scope.userLocation': {
- desc: '你的位置信息将用于小程序位置接口的效果展示'
- }
+ "scope.userLocation": {
+ desc: "你的位置信息将用于小程序位置接口的效果展示",
+ },
},
- requiredBackgroundModes: ['audio', 'location'],
+ requiredBackgroundModes: ["audio", "location"],
// @ts-ignore
- requiredPrivateInfos: ['getLocation']
-})
+ requiredPrivateInfos: ["getLocation"],
+});
diff --git a/src/components/Pay.vue b/src/components/Pay.vue
index 9a32ce7..b17dce0 100644
--- a/src/components/Pay.vue
+++ b/src/components/Pay.vue
@@ -1,134 +1,151 @@
-
-
- 支付方式
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 支付方式
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/admin/verify/index.vue b/src/pages/admin/verify/index.vue
index 5341270..9251f1a 100644
--- a/src/pages/admin/verify/index.vue
+++ b/src/pages/admin/verify/index.vue
@@ -10,7 +10,7 @@
+
+
\ No newline at end of file
diff --git a/src/pages/goods/goods_detail/index.vue b/src/pages/goods/goods_detail/index.vue
index 1ab048d..8c98fc6 100644
--- a/src/pages/goods/goods_detail/index.vue
+++ b/src/pages/goods/goods_detail/index.vue
@@ -1,99 +1,97 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ goodInfo.name }}
-
-
-
-
-
- 产品介绍
-
-
-
-
-
-
-
-
- 首页
+
+
+
-
-
- 购物车
-
-
-
- 客服
-
-
-
-
-
- 加入购物车
-
+
- 立即兑换
-
+
+
+
+
+
+
+
+
+ {{ goodInfo.name }}
+
+
+
+
+ 产品介绍
+
+
+
+
+
+
+
+
+ 首页
+
+
+
+ 购物车
+
+
+
+ 客服
+
+
+
+
+
+ 加入购物车
+
+ {{ payType === "jf" ? "立即兑换" : "立即购买" }}
+
+
+
+
+
-
-
-
-
-
- 商品规格
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/src/pages/hotGoods/index/index.config.ts b/src/pages/hotGoods/index/index.config.ts
new file mode 100644
index 0000000..b22ea80
--- /dev/null
+++ b/src/pages/hotGoods/index/index.config.ts
@@ -0,0 +1,4 @@
+export default definePageConfig({
+ navigationBarTitleText: '活动商品',
+ })
+
\ No newline at end of file
diff --git a/src/pages/hotGoods/index/index.vue b/src/pages/hotGoods/index/index.vue
new file mode 100644
index 0000000..8c90926
--- /dev/null
+++ b/src/pages/hotGoods/index/index.vue
@@ -0,0 +1,135 @@
+
+
+
+
+
+ 我的订单
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+ ¥
+ {{
+ item.number
+ }}
+ 元
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 4888b6d..a31cd0c 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -40,7 +40,7 @@
@click.stop="toGoodDetails(item.gid as number)"
>
{{ item.number }}
积分
-
+
@@ -99,7 +99,7 @@ const userMenuList = ref([
{
id: 2,
label: '活动商品',
- url: '',
+ url: '/pages/hotGoods/index/index',
icon: 'http://jdt168.com/uploads/def/20230509/d59e7fcb65a88bc56694dae4f9d21b51.png'
},
{
diff --git a/src/pages/users/order_list/index.vue b/src/pages/users/order_list/index.vue
index 399285e..bce8f97 100644
--- a/src/pages/users/order_list/index.vue
+++ b/src/pages/users/order_list/index.vue
@@ -152,11 +152,11 @@ const toDetail = (item: any) => {
{{ item.add_time.slice(0, 19) }}
{{
- item.status === 1
+ item.status === 0
? "待付款"
- : item.status === 2
+ : item.status === 1
? "待使用"
- : item.status === 3
+ : item.status === 2
? "已使用"
: "已失效"
}}
diff --git a/tsconfig.json b/tsconfig.json
index c3f4480..2c6f94b 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -18,22 +18,12 @@
"jsx": "preserve",
"allowJs": true,
"resolveJsonModule": true,
- "typeRoots": [
- "node_modules/@types"
- ],
- "types": [
- "@tarojs/components/vue3"
- ],
+ "typeRoots": ["node_modules/@types"],
+ "types": ["@tarojs/components/vue3"],
"paths": {
- "@/*": [
- "src/*"
- ]
+ "@/*": ["src/*"]
}
},
- "include": [
- "./src",
- "./types",
- "components.d.ts"
- ],
+ "include": ["./src", "./types", "components.d.ts"],
"compileOnSave": false
}