From 08545536d31e3560b70793413843c6e54867c38a Mon Sep 17 00:00:00 2001
From: ywk <317226901@qq.com>
Date: Tue, 8 Apr 2025 17:51:03 +0800
Subject: [PATCH] feat(prettier): add prettier for code
---
.prettierignore | 27 +
.prettierrc.json | 8 +
config/regiest.js | 6 +-
package-lock.json | 32 +-
package.json | 9 +-
pages.json | 6 -
pages/market/activeArea/activeArea.vue | 110 +-
pages/mine/order/index.vue | 27 +-
pages/other/index.vue | 2582 +++++++++++++-----------
pages/other/newGiftPay.vue | 968 ---------
10 files changed, 1511 insertions(+), 2264 deletions(-)
create mode 100644 .prettierignore
create mode 100644 .prettierrc.json
delete mode 100644 pages/other/newGiftPay.vue
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..e2189b8
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,27 @@
+# Dependencies
+node_modules/
+
+# Build output
+dist/
+build/
+out/
+unpackage/ # uni-app output
+
+# Lock files
+package-lock.json
+yarn.lock
+
+# Git
+.git/
+
+# OS generated
+.DS_Store
+
+# uni-app specific
+uni_modules/
+
+# Logs
+*.log
+
+# Docs
+docs/
\ No newline at end of file
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 0000000..4bdaf71
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,8 @@
+{
+ "semi": false,
+ "singleQuote": true,
+ "trailingComma": "es5",
+ "printWidth": 80,
+ "tabWidth": 2,
+ "arrowParens": "avoid"
+}
\ No newline at end of file
diff --git a/config/regiest.js b/config/regiest.js
index 0718c89..6406c77 100644
--- a/config/regiest.js
+++ b/config/regiest.js
@@ -43,8 +43,7 @@ export const validPhone = (params) => http.post('/sale/api/order/valid-phone', p
export const upgRel = (params) => http.post('/sale/api/order/validate-upg-rel', params)
//升级复购单确认
export const confirmOthOrder = (params) => http.post('/sale/api/order/confirm-oth-order', params)
-//新人礼包确认
-export const confirmGiftOrder = (params) => http.post('/sale/api/order/confirm-gift-order', params)
+
//嗨粉确认订单
export const confirmFunOrder = (params) => http.post('/sale/api/order/confirm-fun-order', params)
//协议
@@ -74,8 +73,7 @@ responseType: 'blob',})
//特殊信息列表
export const specialList = (params) => http.get('/member/api/member-special/special-list', { params })
-// 自营合作支付校验
-export const checkPay = (params) => http.post('/sale/api/order/check-pay-type', params)
+
// 创客空间接口
export const queryCard = (params) => http.post('/sale/api/wares/query-cabin-card', params)
diff --git a/package-lock.json b/package-lock.json
index 44948e9..d368753 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,7 +24,8 @@
},
"devDependencies": {
"less": "^3.13.1",
- "less-loader": "^4.1.0"
+ "less-loader": "^4.1.0",
+ "prettier": "^3.5.3"
}
},
"node_modules/@babel/helper-string-parser": {
@@ -3797,15 +3798,16 @@
}
},
"node_modules/prettier": {
- "version": "2.8.8",
- "resolved": "https://mirrors.cloud.tencent.com/npm/prettier/-/prettier-2.8.8.tgz",
- "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
- "optional": true,
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
+ "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
+ "dev": true,
+ "license": "MIT",
"bin": {
- "prettier": "bin-prettier.js"
+ "prettier": "bin/prettier.cjs"
},
"engines": {
- "node": ">=10.13.0"
+ "node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
@@ -5261,6 +5263,22 @@
"prettier": "^1.18.2 || ^2.0.0"
}
},
+ "node_modules/vue-tree-color/node_modules/prettier": {
+ "version": "2.8.8",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
+ "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
+ "license": "MIT",
+ "optional": true,
+ "bin": {
+ "prettier": "bin-prettier.js"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
"node_modules/vue-tree-color/node_modules/vue": {
"version": "2.7.16",
"resolved": "https://mirrors.cloud.tencent.com/npm/vue/-/vue-2.7.16.tgz",
diff --git a/package.json b/package.json
index 5adb59c..edac290 100644
--- a/package.json
+++ b/package.json
@@ -19,10 +19,13 @@
},
"devDependencies": {
"less": "^3.13.1",
- "less-loader": "^4.1.0"
+ "less-loader": "^4.1.0",
+ "prettier": "^3.5.3"
},
"scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "format": "prettier --write .",
+ "check-format": "prettier --check ."
},
"repository": {
"type": "git",
@@ -31,4 +34,4 @@
"keywords": [],
"author": "",
"license": "ISC"
-}
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index c1a9c66..f807721 100644
--- a/pages.json
+++ b/pages.json
@@ -386,12 +386,6 @@
"navigationBarTitleText": "注册专区"
}
},
- {
- "path": "pages/other/newGiftPay",
- "style": {
- "navigationBarTitleText": "新人礼包"
- }
- },
{
"path": "pages/other/haiConfirm",
"style": {
diff --git a/pages/market/activeArea/activeArea.vue b/pages/market/activeArea/activeArea.vue
index a165458..742a699 100644
--- a/pages/market/activeArea/activeArea.vue
+++ b/pages/market/activeArea/activeArea.vue
@@ -1,60 +1,56 @@
-
+
-
+
- {{item.actName}}
+ {{ item.actName }}
- {{item.actStartDate}}-{{ item.actEndDate }}
+ {{ item.actStartDate }}-{{ item.actEndDate }}
-
-
- {{ '种植' }}
- 积分:{{ item.point }}
+
- {{ item.actStatusVal }}
- {{ item.actStatusVal }}
- {{ item.actStatusVal }}
+ {{
+ item.actStatusVal
+ }}
+ {{
+ item.actStatusVal
+ }}
+ {{
+ item.actStatusVal
+ }}
-
+
-
-
+
\ No newline at end of file
+.mr {
+ margin-left: 20rpx;
+ background: #181818;
+ border-radius: 16rpx;
+ font-size: 20rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 400;
+ color: #ffffff;
+ padding: 6rpx 16rpx;
+ border-radius: 20px;
+}
+
diff --git a/pages/other/newGiftPay.vue b/pages/other/newGiftPay.vue
deleted file mode 100644
index 783850d..0000000
--- a/pages/other/newGiftPay.vue
+++ /dev/null
@@ -1,968 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- {{'收货人信息'}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.productName }}
-
-
- x{{ item.quantity }}
-
-
-
-
- {{ item.specsName}}
-
-
-
-
-
-
-
-
-
-
-
-
- {{'总价'}}:
- {{ allDataObj.price | numberToCurrency | isLocal}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-