create-weapp-vite 2.0.32 → 2.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/{chunk-IT75MAH3.js → chunk-MXKCD6NA.js} +2 -3
- package/dist/cli.js +1 -5
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/templates/wevu/package.json +1 -1
- package/templates/wevu-tdesign/package.json +1 -1
- package/templates/wevu-retail/.editorconfig +0 -9
- package/templates/wevu-retail/.vscode/settings.json +0 -10
- package/templates/wevu-retail/AGENTS.md +0 -35
- package/templates/wevu-retail/README.md +0 -26
- package/templates/wevu-retail/auto-import-components.json +0 -1
- package/templates/wevu-retail/gitignore +0 -35
- package/templates/wevu-retail/package.json +0 -42
- package/templates/wevu-retail/postcss.config.js +0 -6
- package/templates/wevu-retail/project.config.json +0 -44
- package/templates/wevu-retail/project.private.config.json +0 -8
- package/templates/wevu-retail/src/app.vue +0 -104
- package/templates/wevu-retail/src/common/updateManager.ts +0 -29
- package/templates/wevu-retail/src/components/filter/index.vue +0 -134
- package/templates/wevu-retail/src/components/filter-popup/index.vue +0 -67
- package/templates/wevu-retail/src/components/goods-card/index.vue +0 -219
- package/templates/wevu-retail/src/components/goods-list/index.vue +0 -91
- package/templates/wevu-retail/src/components/load-more/index.vue +0 -99
- package/templates/wevu-retail/src/components/loading-content/index.vue +0 -48
- package/templates/wevu-retail/src/components/price/index.vue +0 -104
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/index.vue +0 -143
- package/templates/wevu-retail/src/components/promotion/ui-coupon-card/tools.wxs +0 -18
- package/templates/wevu-retail/src/components/swipeout/index.vue +0 -118
- package/templates/wevu-retail/src/components/swipeout/swipe.wxs +0 -151
- package/templates/wevu-retail/src/components/webp-image/index.vue +0 -105
- package/templates/wevu-retail/src/components/webp-image/utils.wxs +0 -140
- package/templates/wevu-retail/src/config/index.ts +0 -20437
- package/templates/wevu-retail/src/custom-tab-bar/data.ts +0 -22
- package/templates/wevu-retail/src/custom-tab-bar/index.vue +0 -62
- package/templates/wevu-retail/src/model/activities.ts +0 -7
- package/templates/wevu-retail/src/model/activity.ts +0 -18
- package/templates/wevu-retail/src/model/address.ts +0 -31
- package/templates/wevu-retail/src/model/cart.ts +0 -306
- package/templates/wevu-retail/src/model/category.ts +0 -175
- package/templates/wevu-retail/src/model/comments/queryDetail.ts +0 -50
- package/templates/wevu-retail/src/model/comments.ts +0 -298
- package/templates/wevu-retail/src/model/coupon.ts +0 -39
- package/templates/wevu-retail/src/model/detailsComments.ts +0 -30
- package/templates/wevu-retail/src/model/good.ts +0 -1904
- package/templates/wevu-retail/src/model/goods.ts +0 -7
- package/templates/wevu-retail/src/model/order/applyService.ts +0 -329
- package/templates/wevu-retail/src/model/order/orderConfirm.ts +0 -147
- package/templates/wevu-retail/src/model/order/orderDetail.ts +0 -1191
- package/templates/wevu-retail/src/model/order/orderList.ts +0 -1033
- package/templates/wevu-retail/src/model/promotion.ts +0 -20
- package/templates/wevu-retail/src/model/search.ts +0 -60
- package/templates/wevu-retail/src/model/submitComment.ts +0 -58
- package/templates/wevu-retail/src/model/swiper.ts +0 -39
- package/templates/wevu-retail/src/model/usercenter.ts +0 -52
- package/templates/wevu-retail/src/pages/cart/components/cart-bar/index.vue +0 -104
- package/templates/wevu-retail/src/pages/cart/components/cart-empty/index.vue +0 -41
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.vue +0 -333
- package/templates/wevu-retail/src/pages/cart/components/cart-group/index.wxs +0 -5
- package/templates/wevu-retail/src/pages/cart/components/cart-group/utils.wxs +0 -20
- package/templates/wevu-retail/src/pages/cart/components/goods-card/index.vue +0 -334
- package/templates/wevu-retail/src/pages/cart/components/specs-popup/index.vue +0 -100
- package/templates/wevu-retail/src/pages/cart/index.vue +0 -342
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/README.md +0 -95
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/c-sidebar-item/index.vue +0 -73
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-sidebar/index.vue +0 -121
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/c-tabbar-more/index.vue +0 -74
- package/templates/wevu-retail/src/pages/category/components/goods-category/components/c-tabbar/index.vue +0 -102
- package/templates/wevu-retail/src/pages/category/components/goods-category/index.vue +0 -137
- package/templates/wevu-retail/src/pages/category/index.vue +0 -50
- package/templates/wevu-retail/src/pages/coupon/components/coupon-card/index.vue +0 -95
- package/templates/wevu-retail/src/pages/coupon/components/floating-button/index.vue +0 -44
- package/templates/wevu-retail/src/pages/coupon/coupon-activity-goods/index.vue +0 -135
- package/templates/wevu-retail/src/pages/coupon/coupon-detail/index.vue +0 -94
- package/templates/wevu-retail/src/pages/coupon/coupon-list/index.vue +0 -136
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/assets/play.png +0 -0
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/images-videos/index.vue +0 -65
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/components/my-video/index.vue +0 -92
- package/templates/wevu-retail/src/pages/goods/comments/components/comments-card/index.vue +0 -93
- package/templates/wevu-retail/src/pages/goods/comments/create/index.vue +0 -196
- package/templates/wevu-retail/src/pages/goods/comments/index.vue +0 -293
- package/templates/wevu-retail/src/pages/goods/details/components/buy-bar/index.vue +0 -117
- package/templates/wevu-retail/src/pages/goods/details/components/goods-specs-popup/index.vue +0 -440
- package/templates/wevu-retail/src/pages/goods/details/components/promotion-popup/index.vue +0 -83
- package/templates/wevu-retail/src/pages/goods/details/index.vue +0 -598
- package/templates/wevu-retail/src/pages/goods/list/index.vue +0 -299
- package/templates/wevu-retail/src/pages/goods/result/index.vue +0 -350
- package/templates/wevu-retail/src/pages/goods/search/index.vue +0 -196
- package/templates/wevu-retail/src/pages/home/home.vue +0 -215
- package/templates/wevu-retail/src/pages/home/readme +0 -8
- package/templates/wevu-retail/src/pages/order/after-service-detail/api.ts +0 -34
- package/templates/wevu-retail/src/pages/order/after-service-detail/index.vue +0 -430
- package/templates/wevu-retail/src/pages/order/after-service-list/api.ts +0 -1262
- package/templates/wevu-retail/src/pages/order/after-service-list/index.vue +0 -299
- package/templates/wevu-retail/src/pages/order/apply-service/index.vue +0 -665
- package/templates/wevu-retail/src/pages/order/components/after-service-button-bar/index.vue +0 -142
- package/templates/wevu-retail/src/pages/order/components/customer-service/index.vue +0 -75
- package/templates/wevu-retail/src/pages/order/components/goods-card/index.vue +0 -356
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGood.wxs +0 -17
- package/templates/wevu-retail/src/pages/order/components/noGoods/noGoods.vue +0 -125
- package/templates/wevu-retail/src/pages/order/components/order-button-bar/index.vue +0 -262
- package/templates/wevu-retail/src/pages/order/components/order-card/index.vue +0 -126
- package/templates/wevu-retail/src/pages/order/components/order-goods-card/index.vue +0 -86
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/index.vue +0 -161
- package/templates/wevu-retail/src/pages/order/components/reason-sheet/reasonSheet.ts +0 -25
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/mock.ts +0 -22
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupon.wxs +0 -16
- package/templates/wevu-retail/src/pages/order/components/selectCoupons/selectCoupons.vue +0 -207
- package/templates/wevu-retail/src/pages/order/components/specs-goods-card/index.vue +0 -185
- package/templates/wevu-retail/src/pages/order/config.ts +0 -94
- package/templates/wevu-retail/src/pages/order/delivery-detail/index.vue +0 -145
- package/templates/wevu-retail/src/pages/order/delivery-detail/isUrl.wxs +0 -7
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/api.ts +0 -71
- package/templates/wevu-retail/src/pages/order/fill-tracking-no/index.vue +0 -267
- package/templates/wevu-retail/src/pages/order/invoice/index.vue +0 -94
- package/templates/wevu-retail/src/pages/order/order-confirm/components/address-card/index.vue +0 -78
- package/templates/wevu-retail/src/pages/order/order-confirm/getNotes.wxs +0 -11
- package/templates/wevu-retail/src/pages/order/order-confirm/handleInvoice.wxs +0 -11
- package/templates/wevu-retail/src/pages/order/order-confirm/index.vue +0 -707
- package/templates/wevu-retail/src/pages/order/order-confirm/order.wxs +0 -8
- package/templates/wevu-retail/src/pages/order/order-confirm/pay.ts +0 -115
- package/templates/wevu-retail/src/pages/order/order-detail/index.vue +0 -456
- package/templates/wevu-retail/src/pages/order/order-list/index.vue +0 -288
- package/templates/wevu-retail/src/pages/order/pay-result/index.vue +0 -77
- package/templates/wevu-retail/src/pages/order/receipt/index.vue +0 -336
- package/templates/wevu-retail/src/pages/promotion/promotion-detail/index.vue +0 -145
- package/templates/wevu-retail/src/pages/user/address/edit/index.vue +0 -514
- package/templates/wevu-retail/src/pages/user/address/list/index.vue +0 -249
- package/templates/wevu-retail/src/pages/user/components/t-location/index.vue +0 -156
- package/templates/wevu-retail/src/pages/user/components/ui-address-item/index.vue +0 -92
- package/templates/wevu-retail/src/pages/user/name-edit/index.vue +0 -49
- package/templates/wevu-retail/src/pages/user/person-info/index.vue +0 -198
- package/templates/wevu-retail/src/pages/usercenter/address/edit/util.ts +0 -33
- package/templates/wevu-retail/src/pages/usercenter/components/order-group/index.vue +0 -90
- package/templates/wevu-retail/src/pages/usercenter/components/ui-select-picker/index.vue +0 -108
- package/templates/wevu-retail/src/pages/usercenter/components/user-center-card/index.vue +0 -82
- package/templates/wevu-retail/src/pages/usercenter/index.vue +0 -301
- package/templates/wevu-retail/src/services/_utils/delay.ts +0 -3
- package/templates/wevu-retail/src/services/_utils/timeout.ts +0 -3
- package/templates/wevu-retail/src/services/activity/fetchActivity.ts +0 -20
- package/templates/wevu-retail/src/services/activity/fetchActivityList.ts +0 -20
- package/templates/wevu-retail/src/services/address/edit.ts +0 -33
- package/templates/wevu-retail/src/services/address/fetchAddress.ts +0 -48
- package/templates/wevu-retail/src/services/address/list.ts +0 -31
- package/templates/wevu-retail/src/services/cart/cart.ts +0 -20
- package/templates/wevu-retail/src/services/comments/fetchComments.ts +0 -18
- package/templates/wevu-retail/src/services/comments/fetchCommentsCount.ts +0 -18
- package/templates/wevu-retail/src/services/coupon/index.ts +0 -65
- package/templates/wevu-retail/src/services/good/comments/fetchCommentDetail.ts +0 -20
- package/templates/wevu-retail/src/services/good/fetchCategoryList.ts +0 -18
- package/templates/wevu-retail/src/services/good/fetchGood.ts +0 -18
- package/templates/wevu-retail/src/services/good/fetchGoods.ts +0 -29
- package/templates/wevu-retail/src/services/good/fetchGoodsDetailsComments.ts +0 -37
- package/templates/wevu-retail/src/services/good/fetchGoodsList.ts +0 -39
- package/templates/wevu-retail/src/services/good/fetchSearchHistory.ts +0 -35
- package/templates/wevu-retail/src/services/good/fetchSearchResult.ts +0 -38
- package/templates/wevu-retail/src/services/home/home.ts +0 -53
- package/templates/wevu-retail/src/services/order/applyService.ts +0 -70
- package/templates/wevu-retail/src/services/order/orderConfirm.ts +0 -69
- package/templates/wevu-retail/src/services/order/orderDetail.ts +0 -39
- package/templates/wevu-retail/src/services/order/orderList.ts +0 -39
- package/templates/wevu-retail/src/services/order/orderSubmitComment.ts +0 -22
- package/templates/wevu-retail/src/services/promotion/detail.ts +0 -18
- package/templates/wevu-retail/src/services/usercenter/fetchPerson.ts +0 -28
- package/templates/wevu-retail/src/services/usercenter/fetchUsercenter.ts +0 -18
- package/templates/wevu-retail/src/sitemap.json +0 -7
- package/templates/wevu-retail/src/utils/addressParse.ts +0 -25
- package/templates/wevu-retail/src/utils/getPermission.ts +0 -45
- package/templates/wevu-retail/src/utils/mock.ts +0 -51
- package/templates/wevu-retail/src/utils/util.ts +0 -134
- package/templates/wevu-retail/src/vite-env.d.ts +0 -1
- package/templates/wevu-retail/tailwind.config.ts +0 -15
- package/templates/wevu-retail/tsconfig.app.json +0 -58
- package/templates/wevu-retail/tsconfig.json +0 -11
- package/templates/wevu-retail/tsconfig.node.json +0 -33
- package/templates/wevu-retail/vite.config.ts +0 -14
package/README.md
CHANGED
|
@@ -5,16 +5,15 @@ import fs2 from "fs-extra";
|
|
|
5
5
|
import path2 from "pathe";
|
|
6
6
|
|
|
7
7
|
// ../weapp-vite/package.json
|
|
8
|
-
var version = "6.6.
|
|
8
|
+
var version = "6.6.10";
|
|
9
9
|
|
|
10
10
|
// ../wevu/package.json
|
|
11
|
-
var version2 = "6.6.
|
|
11
|
+
var version2 = "6.6.10";
|
|
12
12
|
|
|
13
13
|
// src/enums.ts
|
|
14
14
|
var TemplateName = /* @__PURE__ */ ((TemplateName2) => {
|
|
15
15
|
TemplateName2["default"] = "default";
|
|
16
16
|
TemplateName2["wevu"] = "wevu";
|
|
17
|
-
TemplateName2["wevuRetail"] = "wevu-retail";
|
|
18
17
|
TemplateName2["tailwindcss"] = "tailwindcss";
|
|
19
18
|
TemplateName2["vant"] = "vant";
|
|
20
19
|
TemplateName2["tdesign"] = "tdesign";
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createProject
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MXKCD6NA.js";
|
|
4
4
|
|
|
5
5
|
// src/cli.ts
|
|
6
6
|
import path from "path";
|
|
@@ -40,10 +40,6 @@ async function run() {
|
|
|
40
40
|
name: "Wevu + TDesign \u6A21\u677F (wevu + tdesign + tailwindcss)",
|
|
41
41
|
value: "wevu-tdesign" /* wevuTdesign */
|
|
42
42
|
},
|
|
43
|
-
{
|
|
44
|
-
name: "Wevu Retail \u6A21\u677F (wevu + tdesign + tailwindcss + mokup)",
|
|
45
|
-
value: "wevu-retail" /* wevuRetail */
|
|
46
|
-
},
|
|
47
43
|
{
|
|
48
44
|
name: "\u96C6\u6210 Tailwindcss",
|
|
49
45
|
value: "tailwindcss" /* tailwindcss */
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.33",
|
|
5
5
|
"description": "create-weapp-vite",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"node": "^20.19.0 || >=22.12.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@inquirer/prompts": "^8.
|
|
38
|
+
"@inquirer/prompts": "^8.3.0",
|
|
39
39
|
"fs-extra": "^11.3.3",
|
|
40
40
|
"pathe": "^2.0.3",
|
|
41
41
|
"pkg-types": "^2.3.0",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# AGENTS Guidelines (retail template)
|
|
2
|
-
|
|
3
|
-
Scope: everything under `templates/weapp-vite-wevu-tailwindcss-tdesign-retail-template/`.
|
|
4
|
-
|
|
5
|
-
Use this file together with root `AGENTS.md`.
|
|
6
|
-
|
|
7
|
-
## 1. Source of Truth
|
|
8
|
-
|
|
9
|
-
- This template must stay aligned with:
|
|
10
|
-
- `apps/tdesign-miniprogram-starter-retail`
|
|
11
|
-
- Page mapping, interaction behavior, and major WXML DOM structure should remain parity-compatible.
|
|
12
|
-
- Do not add extra business regions, placeholder blocks, or additional interaction flows not present in source app.
|
|
13
|
-
|
|
14
|
-
## 2. Authoring Constraints
|
|
15
|
-
|
|
16
|
-
- Page/component source must use Vue SFC + TypeScript.
|
|
17
|
-
- Do not reintroduce native mini-program 4-file page/component source style (`.js + .wxml + .wxss + .json`) for business pages/components.
|
|
18
|
-
- Styles should use Tailwind utility workflow configured with `weapp-tailwindcss`.
|
|
19
|
-
- Avoid ad-hoc copy scripts for WXS sidecar files when normal `weapp-vite` pipeline can resolve them.
|
|
20
|
-
|
|
21
|
-
## 3. Fast Validation Commands
|
|
22
|
-
|
|
23
|
-
- Template local checks:
|
|
24
|
-
- `pnpm -C templates/weapp-vite-wevu-tailwindcss-tdesign-retail-template typecheck`
|
|
25
|
-
- `pnpm -C templates/weapp-vite-wevu-tailwindcss-tdesign-retail-template build`
|
|
26
|
-
- Parity e2e check:
|
|
27
|
-
- `pnpm vitest run -c ./e2e/vitest.e2e.devtools.config.ts e2e/ide/template-weapp-vite-wevu-tailwindcss-tdesign-retail-template.test.ts`
|
|
28
|
-
|
|
29
|
-
Use full e2e matrix only if parity test or shared runtime/compiler tests indicate wider impact.
|
|
30
|
-
|
|
31
|
-
## 4. WXML/WXS Notes
|
|
32
|
-
|
|
33
|
-
- Keep generated WXML valid for WeChat DevTools parser.
|
|
34
|
-
- `<wxs />` self-closing and non-self-closing forms are both valid inputs and should remain supported by compile pipeline.
|
|
35
|
-
- If WXS import resolution fails, prefer fixing compiler/transform handling over adding template-level workarounds.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# weapp-vite-wevu-tailwindcss-tdesign-retail-template
|
|
2
|
-
|
|
3
|
-
该模板页面、组件与交互逻辑已与 `apps/tdesign-miniprogram-starter-retail` 保持一致。
|
|
4
|
-
|
|
5
|
-
- 页面与业务组件统一采用 Vue SFC(`.vue`)编写
|
|
6
|
-
- 业务脚本统一采用 TypeScript(`lang="ts"` / `*.ts`)
|
|
7
|
-
- 不再使用微信原生四文件(`*.js` + `*.wxml` + `*.wxss` + `*.json`)作为页面/组件源码
|
|
8
|
-
|
|
9
|
-
## 开发
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
pnpm install
|
|
13
|
-
pnpm dev
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## 构建
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
pnpm build
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 页面对齐说明
|
|
23
|
-
|
|
24
|
-
- 页面路径与 `app.json` 分包配置一一对应
|
|
25
|
-
- 页面结构、组件引用、事件处理与原项目同步
|
|
26
|
-
- 不包含 `RetailPageShell`/`mokup` 占位页实现
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# dependencies
|
|
2
|
-
node_modules
|
|
3
|
-
.pnp
|
|
4
|
-
.pnp.js
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
coverage
|
|
8
|
-
|
|
9
|
-
# next.js
|
|
10
|
-
.next/
|
|
11
|
-
out/
|
|
12
|
-
build
|
|
13
|
-
|
|
14
|
-
# misc
|
|
15
|
-
.DS_Store
|
|
16
|
-
*.pem
|
|
17
|
-
|
|
18
|
-
# debug
|
|
19
|
-
npm-debug.log*
|
|
20
|
-
yarn-debug.log*
|
|
21
|
-
yarn-error.log*
|
|
22
|
-
.pnpm-debug.log*
|
|
23
|
-
|
|
24
|
-
# local env files
|
|
25
|
-
.env.local
|
|
26
|
-
.env.development.local
|
|
27
|
-
.env.test.local
|
|
28
|
-
.env.production.local
|
|
29
|
-
|
|
30
|
-
# turbo
|
|
31
|
-
.turbo
|
|
32
|
-
|
|
33
|
-
dist
|
|
34
|
-
vite.config.ts.timestamp-*.mjs
|
|
35
|
-
dist-web
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "weapp-vite-wevu-tailwindcss-tdesign-retail-template",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.0.1",
|
|
5
|
-
"private": true,
|
|
6
|
-
"description": "weapp-vite + tdesign retail 模板",
|
|
7
|
-
"author": "ice breaker <1324318532@qq.com>",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/weapp-vite/weapp-vite.git",
|
|
12
|
-
"directory": "templates/weapp-vite-wevu-tailwindcss-tdesign-retail-template"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/weapp-vite/weapp-vite/issues"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"dev": "weapp-vite dev",
|
|
20
|
-
"dev:open": "weapp-vite dev -o",
|
|
21
|
-
"build": "weapp-vite build",
|
|
22
|
-
"typecheck": "vue-tsc --noEmit -p tsconfig.app.json",
|
|
23
|
-
"open": "weapp-vite open",
|
|
24
|
-
"postinstall": "weapp-tw patch"
|
|
25
|
-
},
|
|
26
|
-
"dependencies": {
|
|
27
|
-
"dayjs": "^1.9.3",
|
|
28
|
-
"tdesign-miniprogram": "1.12.3",
|
|
29
|
-
"tslib": "^2.8.1",
|
|
30
|
-
"wevu": "workspace:*"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"autoprefixer": "^10.4.24",
|
|
34
|
-
"miniprogram-api-typings": "^5.0.1",
|
|
35
|
-
"postcss": "^8.5.6",
|
|
36
|
-
"tailwindcss": "^3.4.19",
|
|
37
|
-
"typescript": "^5.9.3",
|
|
38
|
-
"vue-tsc": "^3.2.4",
|
|
39
|
-
"weapp-tailwindcss": "^4.10.2",
|
|
40
|
-
"weapp-vite": "workspace:*"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "项目配置文件",
|
|
3
|
-
"miniprogramRoot": "dist/",
|
|
4
|
-
"compileType": "miniprogram",
|
|
5
|
-
"setting": {
|
|
6
|
-
"babelSetting": {
|
|
7
|
-
"ignore": [],
|
|
8
|
-
"disablePlugins": [],
|
|
9
|
-
"outputPath": ""
|
|
10
|
-
},
|
|
11
|
-
"coverView": false,
|
|
12
|
-
"postcss": false,
|
|
13
|
-
"minified": false,
|
|
14
|
-
"enhance": false,
|
|
15
|
-
"showShadowRootInWxmlPanel": false,
|
|
16
|
-
"packNpmRelationList": [
|
|
17
|
-
{
|
|
18
|
-
"packageJsonPath": "./package.json",
|
|
19
|
-
"miniprogramNpmDistDir": "./dist"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"ignoreUploadUnusedFiles": true,
|
|
23
|
-
"compileHotReLoad": false,
|
|
24
|
-
"skylineRenderEnable": true,
|
|
25
|
-
"packNpmManually": true,
|
|
26
|
-
"es6": true,
|
|
27
|
-
"minifyWXML": true
|
|
28
|
-
},
|
|
29
|
-
"simulatorType": "wechat",
|
|
30
|
-
"simulatorPluginLibVersion": {},
|
|
31
|
-
"condition": {},
|
|
32
|
-
"srcMiniprogramRoot": "dist/",
|
|
33
|
-
"editorSetting": {
|
|
34
|
-
"tabIndent": "insertSpaces",
|
|
35
|
-
"tabSize": 2
|
|
36
|
-
},
|
|
37
|
-
"libVersion": "3.13.2",
|
|
38
|
-
"packOptions": {
|
|
39
|
-
"ignore": [],
|
|
40
|
-
"include": []
|
|
41
|
-
},
|
|
42
|
-
"appid": "wx6ffee4673b257014",
|
|
43
|
-
"projectname": "weapp-vite-wevu-tailwindcss-tdesign-retail-template"
|
|
44
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
|
3
|
-
"projectname": "weapp-vite-wevu-tailwindcss-tdesign-retail-template",
|
|
4
|
-
"setting": {
|
|
5
|
-
"compileHotReLoad": true
|
|
6
|
-
},
|
|
7
|
-
"libVersion": "3.14.0"
|
|
8
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { onShow } from 'wevu'
|
|
3
|
-
import updateManager from './common/updateManager'
|
|
4
|
-
|
|
5
|
-
defineAppJson({
|
|
6
|
-
pages: ['pages/home/home', 'pages/category/index', 'pages/cart/index', 'pages/usercenter/index'],
|
|
7
|
-
subpackages: [
|
|
8
|
-
{
|
|
9
|
-
root: 'pages/user',
|
|
10
|
-
name: 'user',
|
|
11
|
-
pages: ['person-info/index', 'address/list/index', 'address/edit/index', 'name-edit/index'],
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
root: 'pages/goods',
|
|
15
|
-
name: 'goods',
|
|
16
|
-
pages: [
|
|
17
|
-
'list/index',
|
|
18
|
-
'details/index',
|
|
19
|
-
'search/index',
|
|
20
|
-
'result/index',
|
|
21
|
-
'comments/index',
|
|
22
|
-
'comments/create/index',
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
root: 'pages/order',
|
|
27
|
-
name: 'order',
|
|
28
|
-
pages: [
|
|
29
|
-
'order-confirm/index',
|
|
30
|
-
'receipt/index',
|
|
31
|
-
'pay-result/index',
|
|
32
|
-
'order-list/index',
|
|
33
|
-
'order-detail/index',
|
|
34
|
-
'apply-service/index',
|
|
35
|
-
'after-service-list/index',
|
|
36
|
-
'after-service-detail/index',
|
|
37
|
-
'fill-tracking-no/index',
|
|
38
|
-
'delivery-detail/index',
|
|
39
|
-
'invoice/index',
|
|
40
|
-
],
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
root: 'pages/coupon',
|
|
44
|
-
name: 'coupon',
|
|
45
|
-
pages: ['coupon-list/index', 'coupon-detail/index', 'coupon-activity-goods/index'],
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
root: 'pages/promotion',
|
|
49
|
-
name: 'promotion',
|
|
50
|
-
pages: ['promotion-detail/index'],
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
tabBar: {
|
|
54
|
-
custom: true,
|
|
55
|
-
color: '#666666',
|
|
56
|
-
selectedColor: '#FF5F15',
|
|
57
|
-
backgroundColor: '#ffffff',
|
|
58
|
-
borderStyle: 'black',
|
|
59
|
-
list: [
|
|
60
|
-
{
|
|
61
|
-
pagePath: 'pages/home/home',
|
|
62
|
-
text: '首页',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
pagePath: 'pages/category/index',
|
|
66
|
-
text: '分类',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
pagePath: 'pages/cart/index',
|
|
70
|
-
text: '购物车',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
pagePath: 'pages/usercenter/index',
|
|
74
|
-
text: '我的',
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
requiredPrivateInfos: ['chooseAddress'],
|
|
79
|
-
lazyCodeLoading: 'requiredComponents',
|
|
80
|
-
usingComponents: {},
|
|
81
|
-
window: {
|
|
82
|
-
backgroundTextStyle: 'light',
|
|
83
|
-
navigationBarBackgroundColor: '#fff',
|
|
84
|
-
navigationBarTitleText: 'Weixin',
|
|
85
|
-
navigationBarTextStyle: 'black',
|
|
86
|
-
},
|
|
87
|
-
sitemapLocation: 'sitemap.json',
|
|
88
|
-
permission: {
|
|
89
|
-
'scope.userLocation': {
|
|
90
|
-
desc: '你的位置信息将用于小程序位置接口的效果展示',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
onShow(() => {
|
|
96
|
-
updateManager()
|
|
97
|
-
})
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<style>
|
|
101
|
-
@tailwind base;
|
|
102
|
-
@tailwind components;
|
|
103
|
-
@tailwind utilities;
|
|
104
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default () => {
|
|
2
|
-
if (!wx.canIUse('getUpdateManager')) {
|
|
3
|
-
return;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const updateManager = wx.getUpdateManager();
|
|
7
|
-
|
|
8
|
-
updateManager.onCheckForUpdate(function (res) {
|
|
9
|
-
// 请求完新版本信息的回调
|
|
10
|
-
console.log('版本信息', res);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
updateManager.onUpdateReady(function () {
|
|
14
|
-
wx.showModal({
|
|
15
|
-
title: '更新提示',
|
|
16
|
-
content: '新版本已经准备好,是否重启应用?',
|
|
17
|
-
success(res) {
|
|
18
|
-
if (res.confirm) {
|
|
19
|
-
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
20
|
-
updateManager.applyUpdate();
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
updateManager.onUpdateFailed(function () {
|
|
27
|
-
// 新版本下载失败
|
|
28
|
-
});
|
|
29
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
Component({
|
|
3
|
-
externalClasses: ['wr-class'],
|
|
4
|
-
|
|
5
|
-
options: {
|
|
6
|
-
multipleSlots: true,
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
properties: {
|
|
10
|
-
overall: {
|
|
11
|
-
type: Number,
|
|
12
|
-
value: 1,
|
|
13
|
-
observer(overall) {
|
|
14
|
-
this.setData({
|
|
15
|
-
overall,
|
|
16
|
-
});
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
layout: {
|
|
20
|
-
type: Number,
|
|
21
|
-
value: 1,
|
|
22
|
-
observer(layout) {
|
|
23
|
-
this.setData({
|
|
24
|
-
layout,
|
|
25
|
-
});
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
sorts: {
|
|
29
|
-
type: String,
|
|
30
|
-
value: '',
|
|
31
|
-
observer(sorts) {
|
|
32
|
-
this.setData({
|
|
33
|
-
sorts,
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
color: {
|
|
38
|
-
type: String,
|
|
39
|
-
value: '#FA550F',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
data: {
|
|
44
|
-
layout: 1,
|
|
45
|
-
overall: 1,
|
|
46
|
-
sorts: '',
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
methods: {
|
|
50
|
-
onChangeShowAction() {
|
|
51
|
-
const { layout } = this.data;
|
|
52
|
-
const nextLayout = layout === 1 ? 0 : 1;
|
|
53
|
-
this.triggerEvent('change', { ...this.properties, layout: nextLayout });
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
handlePriseSort() {
|
|
57
|
-
const { sorts } = this.data;
|
|
58
|
-
this.triggerEvent('change', {
|
|
59
|
-
...this.properties,
|
|
60
|
-
overall: 0,
|
|
61
|
-
sorts: sorts === 'desc' ? 'asc' : 'desc',
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
open() {
|
|
66
|
-
this.triggerEvent('showFilterPopup', {
|
|
67
|
-
show: true,
|
|
68
|
-
});
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
onOverallAction() {
|
|
72
|
-
const { overall } = this.data;
|
|
73
|
-
const nextOverall = overall === 1 ? 0 : 1;
|
|
74
|
-
const nextData = {
|
|
75
|
-
sorts: '',
|
|
76
|
-
prices: [],
|
|
77
|
-
};
|
|
78
|
-
this.triggerEvent('change', {
|
|
79
|
-
...this.properties,
|
|
80
|
-
...nextData,
|
|
81
|
-
overall: nextOverall,
|
|
82
|
-
});
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
<template>
|
|
89
|
-
<!-- 过滤组件 -->
|
|
90
|
-
<view class="wr-class filter-wrap [width:100%] [height:88rpx] [display:flex] [justify-content:space-between] [position:relative] [background:#fff]">
|
|
91
|
-
<view class="filter-left-content [height:100%] [display:flex] [flex-grow:2] [flex-flow:row_nowrap] [justify-content:space-between] [&_.filter-item]:[flex:1] [&_.filter-item]:[height:100%] [&_.filter-item]:[display:flex] [&_.filter-item]:[align-items:center] [&_.filter-item]:[justify-content:center] [&_.filter-item]:[font-size:26rpx] [&_.filter-item]:[line-height:36rpx] [&_.filter-item]:[font-weight:400] [&_.filter-item]:[color:rgba(51,_51,_51,_1)] [&_.filter-item_.filter-price]:[display:flex] [&_.filter-item_.filter-price]:[flex-direction:column] [&_.filter-item_.filter-price]:[margin-left:6rpx] [&_.filter-item_.filter-price]:[justify-content:space-between] [&_.filter-item_.wr-filter]:[margin-left:8rpx] [&_.filter-active-item]:[color:#fa550f]">
|
|
92
|
-
<view class="filter-item {{overall === 1 ? 'filter-active-item' : ''}}" bindtap="onOverallAction">
|
|
93
|
-
综合
|
|
94
|
-
</view>
|
|
95
|
-
<view class="filter-item" bind:tap="handlePriseSort">
|
|
96
|
-
<text style="color: {{sorts !== '' ? color : '' }}">价格</text>
|
|
97
|
-
<view class="filter-price">
|
|
98
|
-
<t-icon
|
|
99
|
-
prefix="wr"
|
|
100
|
-
name="arrow_drop_up"
|
|
101
|
-
size="18rpx"
|
|
102
|
-
style="color:{{sorts === 'asc' ? color : '#bbb'}}"
|
|
103
|
-
/>
|
|
104
|
-
<t-icon
|
|
105
|
-
prefix="wr"
|
|
106
|
-
name="arrow_drop_down"
|
|
107
|
-
size="18rpx"
|
|
108
|
-
style="color:{{sorts === 'desc' ? color : '#bbb'}}"
|
|
109
|
-
/>
|
|
110
|
-
</view>
|
|
111
|
-
</view>
|
|
112
|
-
<view class="filter-item {{prices.length ? 'filter-active-item' : ''}}" bindtap="open" data-index="5">
|
|
113
|
-
筛选
|
|
114
|
-
<t-icon
|
|
115
|
-
name="filter"
|
|
116
|
-
prefix="wr"
|
|
117
|
-
color="#333"
|
|
118
|
-
size="32rpx"
|
|
119
|
-
/>
|
|
120
|
-
</view>
|
|
121
|
-
</view>
|
|
122
|
-
</view>
|
|
123
|
-
<!-- 筛选弹框 -->
|
|
124
|
-
<slot name="filterPopup" />
|
|
125
|
-
|
|
126
|
-
</template>
|
|
127
|
-
|
|
128
|
-
<json>
|
|
129
|
-
{
|
|
130
|
-
"component": true,
|
|
131
|
-
"usingComponents": {
|
|
132
|
-
"t-icon": "tdesign-miniprogram/icon/icon"
|
|
133
|
-
}
|
|
134
|
-
}</json>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
Component({
|
|
3
|
-
externalClasses: ['wr-class'],
|
|
4
|
-
|
|
5
|
-
options: {
|
|
6
|
-
multipleSlots: true,
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
properties: {
|
|
10
|
-
show: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
observer(show) {
|
|
13
|
-
this.setData({ visible: show });
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
closeBtn: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
value: false,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
data: { visible: false },
|
|
23
|
-
|
|
24
|
-
methods: {
|
|
25
|
-
reset() {
|
|
26
|
-
this.triggerEvent('reset');
|
|
27
|
-
},
|
|
28
|
-
confirm() {
|
|
29
|
-
this.triggerEvent('confirm');
|
|
30
|
-
},
|
|
31
|
-
close() {
|
|
32
|
-
this.triggerEvent('showFilterPopupClose');
|
|
33
|
-
|
|
34
|
-
this.setData({ visible: false });
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<template>
|
|
41
|
-
<t-popup
|
|
42
|
-
visible="{{visible}}"
|
|
43
|
-
placement="right"
|
|
44
|
-
bind:visible-change="close"
|
|
45
|
-
data-index="5"
|
|
46
|
-
close-btn="{{closeBtn}}"
|
|
47
|
-
>
|
|
48
|
-
<view class="content [&_.filter-btns-wrap]:[width:100%] [&_.filter-btns-wrap]:[position:absolute] [&_.filter-btns-wrap]:[bottom:calc(20rpx_+_env(safe-area-inset-bottom))] [&_.filter-btns-wrap]:[display:flex] [&_.filter-btns-wrap]:[flex-direction:row] [&_.filter-btns-wrap]:[border-radius:10rpx_0_0_10rpx] [&_.filter-btns-wrap]:[padding:16rpx_32rpx] [&_.filter-btns-wrap]:[border-top:1rpx_solid_#e5e5e5] [&_.filter-btns-wrap]:[box-sizing:border-box]">
|
|
49
|
-
<slot name="filterSlot" />
|
|
50
|
-
<view class="filter-btns-wrap">
|
|
51
|
-
<view class="filter-btn btn-reset [flex:1] [display:flex] [justify-content:center] [align-items:center] [font-size:28rpx] [font-weight:500] [height:80rpx] [color:#fa4126] [background:rgba(255,_255,_255,_1)] [position:relative] [border:1rpx_solid_#fa4126] [border-radius:84rpx_0_0_84rpx]" bind:tap="reset">重置</view>
|
|
52
|
-
<view class="filter-btn btn-confirm [flex:1] [display:flex] [justify-content:center] [align-items:center] [font-size:28rpx] [font-weight:500] [height:80rpx] [border-radius:0_84rpx_84rpx_0] [border:1rpx_solid_#fa4126] [color:#fff] [background:#fa4126]" bind:tap="confirm" data-index="5">
|
|
53
|
-
确定
|
|
54
|
-
</view>
|
|
55
|
-
</view>
|
|
56
|
-
</view>
|
|
57
|
-
</t-popup>
|
|
58
|
-
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
<json>
|
|
62
|
-
{
|
|
63
|
-
"component": true,
|
|
64
|
-
"usingComponents": {
|
|
65
|
-
"t-popup": "tdesign-miniprogram/popup/popup"
|
|
66
|
-
}
|
|
67
|
-
}</json>
|