Basil лет назад: 3
Сommit
ce8786c8cc
100 измененных файлов с 16425 добавлено и 0 удалено
  1. 1 0
      .env.development
  2. 1 0
      .env.production
  3. 8 0
      .eslintignore
  4. 12 0
      .eslintrc
  5. 21 0
      .gitignore
  6. 1 0
      .npmrc
  7. 20 0
      .stylelintignore
  8. 39 0
      .stylelintrc
  9. 105 0
      README.md
  10. 59 0
      components.d.ts
  11. 20 0
      index.html
  12. 102 0
      package.json
  13. 50 0
      pages.config.ts
  14. 9764 0
      pnpm-lock.yaml
  15. 24 0
      rules.ts
  16. 15 0
      src/App.vue
  17. 51 0
      src/apis/auth.api.ts
  18. 138 0
      src/apis/common.ts
  19. 131 0
      src/apis/dacang.ts
  20. 28 0
      src/apis/home.ts
  21. 109 0
      src/apis/merchant.ts
  22. 0 0
      src/apis/model/aboutModel.ts
  23. 26 0
      src/apis/model/accumulateIncomeModel.ts
  24. 60 0
      src/apis/model/address.model.ts
  25. 16 0
      src/apis/model/announcement.model.ts
  26. 49 0
      src/apis/model/articleModel.ts
  27. 15 0
      src/apis/model/certification.model.ts
  28. 33 0
      src/apis/model/common.model.ts
  29. 235 0
      src/apis/model/dacang.model.ts
  30. 6 0
      src/apis/model/dc.model.ts
  31. 99 0
      src/apis/model/integral.model.ts
  32. 38 0
      src/apis/model/inviteFriendsModel.ts
  33. 40 0
      src/apis/model/invitePartnerModel.ts
  34. 54 0
      src/apis/model/login.model.ts
  35. 64 0
      src/apis/model/loginrespone.json
  36. 30 0
      src/apis/model/myRelationMerchantModel.ts
  37. 26 0
      src/apis/model/myRelationProductModel.ts
  38. 346 0
      src/apis/model/order.model.ts
  39. 6 0
      src/apis/model/pageModel.ts
  40. 4 0
      src/apis/model/path.model.ts
  41. 622 0
      src/apis/model/product.model.ts
  42. 41 0
      src/apis/model/replyModel.ts
  43. 35 0
      src/apis/model/revenueSharingModel.ts
  44. 47 0
      src/apis/model/shopping.model.ts
  45. 18 0
      src/apis/model/signIninfo.model.ts
  46. 15 0
      src/apis/model/spreadInfoModel.ts
  47. 85 0
      src/apis/model/storeModel.ts
  48. 6 0
      src/apis/model/user-vip-info.model.ts
  49. 134 0
      src/apis/model/userInfoModel.ts
  50. 35 0
      src/apis/model/userShareProductModel.ts
  51. 16 0
      src/apis/model/userUnionModel.ts
  52. 21 0
      src/apis/model/userYanglaoJinModel.ts
  53. 43 0
      src/apis/model/vip-area.model.ts
  54. 11 0
      src/apis/model/withdrawalConfigurationModel.ts
  55. 33 0
      src/apis/model/withdrawalModel.ts
  56. 11 0
      src/apis/model/withdrawalService.ts
  57. 115 0
      src/apis/model/yanglaoStatisticsModel.ts
  58. 36 0
      src/apis/model/zibubaojian.model.ts
  59. 215 0
      src/apis/order.api.ts
  60. 345 0
      src/apis/product.ts
  61. 635 0
      src/apis/user.ts
  62. 326 0
      src/auto-imports.d.ts
  63. 13 0
      src/components.d.ts
  64. 110 0
      src/components/CXBAuthorize/CXBAuthorize.vue
  65. 11 0
      src/components/CXBBanner/CXBBanner.vue
  66. 53 0
      src/components/CXBBasePage/CXBBasePage.vue
  67. 31 0
      src/components/CXBButton/CXBButton.vue
  68. 167 0
      src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue
  69. 64 0
      src/components/CXBDialogSignIn/SignInGiftBag.vue
  70. 26 0
      src/components/CXBDialogSignIn/SignRedPacket.vue
  71. 65 0
      src/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue
  72. 64 0
      src/components/CXBDialogSignInSucceed/SignInGiftBag.vue
  73. 26 0
      src/components/CXBDialogSignInSucceed/SignRedPacket.vue
  74. 44 0
      src/components/CXBDyLive/CXBDyLiveRecommend.vue
  75. 37 0
      src/components/CXBEmpty/CXBEmpty.vue
  76. 43 0
      src/components/CXBNotLoginButton/CXBNotLoginButton.vue
  77. 64 0
      src/components/CXBNotLoginButton/test.json
  78. 122 0
      src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue
  79. 173 0
      src/components/CXBSkuPopup/CXBSkuPopup.vue
  80. 19 0
      src/components/CXBYaojinTag/CXBYaojinTag.vue
  81. 47 0
      src/components/FButton/FButton.vue
  82. 27 0
      src/components/FButton/button.ts
  83. 2 0
      src/components/FButton/index.ts
  84. 0 0
      src/components/FButton/types.ts
  85. 21 0
      src/components/FButton/use-button.ts
  86. 56 0
      src/components/FCell/FCell.vue
  87. 31 0
      src/components/FCell/define.ts
  88. 2 0
      src/components/FCell/index.ts
  89. 37 0
      src/components/FCell/use-cell.ts
  90. 28 0
      src/components/FCellGroup/FCellGroup.vue
  91. 15 0
      src/components/FCellGroup/define.ts
  92. 1 0
      src/components/FCellGroup/index.ts
  93. 167 0
      src/components/FElevator/FElevator.vue
  94. 1 0
      src/components/FElevator/README.md
  95. 42 0
      src/components/FElevator/define.ts
  96. 9 0
      src/components/FElevator/type.ts
  97. 57 0
      src/components/FField/FField.vue
  98. 56 0
      src/components/FField/field.ts
  99. 3 0
      src/components/FField/index.ts
  100. 0 0
      src/components/FField/types.ts

+ 1 - 0
.env.development

@@ -0,0 +1 @@
1
+VITE_GLOB_API_URL = 'https://test.bjtdba.com'

+ 1 - 0
.env.production

@@ -0,0 +1 @@
1
+VITE_GLOB_API_URL = 'https://app.bjtdba.com'

+ 8 - 0
.eslintignore

@@ -0,0 +1,8 @@
1
+dist
2
+public
3
+node_modules
4
+manifest.json
5
+pages.json
6
+cache
7
+styles
8
+dev-dist

+ 12 - 0
.eslintrc

@@ -0,0 +1,12 @@
1
+{
2
+  "extends": [
3
+    "@antfu"
4
+  ],
5
+  "rules": {
6
+    // "no-console":"warn"
7
+  },
8
+  "env": {
9
+    "node": true,
10
+    "vue/setup-compiler-macros": true
11
+  }
12
+}

+ 21 - 0
.gitignore

@@ -0,0 +1,21 @@
1
+# Logs
2
+logs
3
+*.log
4
+npm-debug.log*
5
+yarn-debug.log*
6
+yarn-error.log*
7
+pnpm-debug.log*
8
+lerna-debug.log*
9
+
10
+node_modules
11
+.DS_Store
12
+dist
13
+*.local
14
+
15
+# Editor directories and files
16
+.idea
17
+*.suo
18
+*.ntvs*
19
+*.njsproj
20
+*.sln
21
+*.sw?

+ 1 - 0
.npmrc

@@ -0,0 +1 @@
1
+shamefully-hoist = true

+ 20 - 0
.stylelintignore

@@ -0,0 +1,20 @@
1
+dist
2
+es
3
+lib
4
+css
5
+example
6
+public
7
+cache
8
+node_modules
9
+.husky
10
+
11
+docs/.vitepress/theme
12
+
13
+*.js
14
+*.cjs
15
+*.mjs
16
+*.ts
17
+*.tsx
18
+*.svg
19
+*.gif
20
+*.md

+ 39 - 0
.stylelintrc

@@ -0,0 +1,39 @@
1
+{
2
+  "defaultSeverity": "error",
3
+  "extends": [
4
+    "stylelint-config-standard",
5
+    "stylelint-config-standard-scss",
6
+    "stylelint-config-recommended-vue",
7
+    "stylelint-config-html",
8
+    "stylelint-config-recess-order"
9
+  ],
10
+  "plugins": ["stylelint-order"],
11
+  "rules": {
12
+    "selector-class-pattern": [
13
+      "^([#a-z][$#{}a-z0-9]*)((-{1,2}|_{2})[$#{}a-z0-9]+)*$",
14
+      {
15
+        "message": "Expected class selector to be kebab-case"
16
+      }
17
+    ],
18
+    "no-descending-specificity" :null,
19
+    "no-empty-source" :null,
20
+    "keyframes-name-pattern": "^[a-z]+([A-Z][a-z]*)*$"
21
+  },
22
+  "ignoreFiles": [
23
+    "node_modules",
24
+    "dist",
25
+    "public",
26
+    "output",
27
+    "coverage",
28
+    "temp",
29
+    "*.js",
30
+    "*.cjs",
31
+    "*.mjs",
32
+    "*.ts",
33
+    "*.tsx",
34
+    "*.svg",
35
+    "*.gif",
36
+    "*.md"
37
+  ]
38
+
39
+}

+ 105 - 0
README.md

@@ -0,0 +1,105 @@
1
+- [ ] 首页
2
+  - [x] 签到(签到得积分)
3
+  - [x] 搜索 `/pages/search/index`
4
+  - [x] 城中大仓
5
+  - [x] 限时秒杀
6
+  - [x] 京东 `跳转至京东小程序`
7
+  - [x] 滋补养生(动态数据请求) `/api/common/home_quick_link`,
8
+  - [ ] 拼多多
9
+    - [x] 商品展示
10
+    - [ ] 小程序跳转
11
+  - [ ] 淘宝
12
+    - [x] 商品购买跳转
13
+  - [ ] 抖音
14
+    - [ ] 抖音商品列表
15
+    - [x] 抖音直播间
16
+  - [ ] 唯品会
17
+    - [x] 唯品会内容列表
18
+    - [ ] 唯品会商品跳转
19
+  - [ ] 苏宁
20
+    - [x] 苏宁商品列表
21
+    - [ ] 苏宁商品跳转
22
+  - [ ] 消息
23
+  - [x] 限时秒杀
24
+  - [x] 积分通兑 `/pages/product/integral`
25
+  - [x] 老年、学生、会员、惠民
26
+  - [x] 创客会员(横幅)`/pages/gust_member_new/index`
27
+  - [x] 通知公告
28
+  - [x] 产品列表
29
+
30
+- [x] 创客 `/pages/store/nearby/index`
31
+  - [x] 分类列表
32
+  
33
+- [x] 大仓 `/pages/dacang/list/index`
34
+
35
+- [ ] 购物车 `/pages/order_addcart/index`
36
+  - [x] 列表
37
+  - [ ] 结算
38
+    - [ ] 地址管理
39
+  
40
+- [ ] 我的
41
+  - [x] 用户
42
+  - [x] 个人资料
43
+  - [x] 养老金 `/pages/annuity/index`
44
+    - [ ] 支付平台绑定 `/pages/third_party_binding/index`
45
+    - [x] 养老金账户(我的养老金) `/pages/pension_account/index`
46
+    - [x] 养老金记录 `/pages/pension_record/index`
47
+      - [x] 电商平台养老金明细 `/pages/pension_choice_platform/index`
48
+      - [x] 实体店养老金明细
49
+    - [x] 中信公证处查看(小程序跳转)
50
+  - [x] 我的佣金、我的邀请 `/pages/my-invitation/index`
51
+    - [x] 邀请伙伴 `/pages/invite-partners/index`
52
+    - [x] 分享收益 `/pages/revenue-sharing/index`
53
+    - [x] 分享产品 `/pages/share-the-product/index`
54
+    - [x] 累计收益 `/pages/accumulate-income/index`
55
+    - [x] 去提现、立即提现 `/pages/immediate-withdrawal/index`
56
+      - [x] 提现记录 `/pages/withdrawal-record/index`
57
+      - [ ] 实名认证 `/pages/real-name-authentication/index`
58
+  - [x] 我的积分 `/pages/my-integral/index`
59
+    - [x] 积分规则
60
+    - [x] 滋补保健 - 去兑换
61
+    - [x] 积分明细 `/pages/my-integral/detail`
62
+    - [x] 积分任务
63
+      - [x] 每日签到 - 去签到
64
+      - [ ] 邀请好友得积分 - 去邀请
65
+        - [ ] 海报
66
+  - [ ] 红积分提现
67
+    - [x] 复购增加红积分
68
+    - [ ] 提现
69
+      - [x] 提现页
70
+      - [ ] 接口验证
71
+  - [x] 团队人数
72
+  - [x] 我的订单 - 查看全部 `/pages/order/index`
73
+    - [x] 待付款
74
+    - [x] 待发货
75
+    - [x] 待收货
76
+    - [x] 待评价
77
+    - [x] 退款/售后
78
+ 
79
+  - [x] 我的邀请(与我的佣金相同)
80
+  - [x] 我的地址
81
+    - [x] 新建收货地址
82
+  - [x] 我的收藏 `/pages/my-relation-product/index`
83
+  - [x] 我的关注 `/pages/my-relation-merchant/index`
84
+  - [x] 三方订单
85
+  - [x] 帮助中心 `/pages/help-center/index`
86
+  - [x] 我的评价 `/pages/my-reply/index`
87
+  - [x] 邀请好友 `/pages/invite-friends/index`
88
+  - [x] 商铺入驻 (小程序跳转)
89
+  - [ ] 帮扶中心 `/pages/bangfuzhongxin/index`
90
+    - [ ] 立即升级(待测试)
91
+  - [x] 设置
92
+    - [x] 反馈回复 `/pages/feedback/index`
93
+    - [x] 关于我们 `/pages/user/about/index`
94
+    - [ ] 版本更新 `/pages/version-update/index`
95
+    - [ ] 实名认证 (接口待对接)
96
+      - `/pages/real-name-authentication/index` 未实名
97
+      - `/pages/already-realname/index` 已实名
98
+    - [ ] 三方账号绑定 `/pages/third_party_binding/index`
99
+      - [ ] 微信授权
100
+      - [ ] 支付宝授权(无法实现)
101
+    - [ ] 个性化选项 `/pages/personalization-options/index`(接口未对接)
102
+    - [x] 服务协议 `/pages/webview/agreement?type=2`
103
+    - [x] 隐私协议 `/pages/webview/agreement?type=1`
104
+    - [ ] 账号注销 (接口未对接)
105
+    - [x] 退出登录

+ 59 - 0
components.d.ts

@@ -0,0 +1,59 @@
1
+/* eslint-disable */
2
+/* prettier-ignore */
3
+// @ts-nocheck
4
+// Generated by vite-plugin-uni-components
5
+// Read more: https://github.com/vuejs/core/pull/3399
6
+import '@vue/runtime-core'
7
+
8
+export {}
9
+
10
+declare module '@vue/runtime-core' {
11
+  export interface GlobalComponents {
12
+    CXBAuthorize: typeof import('./src/components/CXBAuthorize/CXBAuthorize.vue')['default']
13
+    CXBBanner: typeof import('./src/components/CXBBanner/CXBBanner.vue')['default']
14
+    CXBBasePage: typeof import('./src/components/CXBBasePage/CXBBasePage.vue')['default']
15
+    CXBButton: typeof import('./src/components/CXBButton/CXBButton.vue')['default']
16
+    CXBDialogSIgnIn: typeof import('./src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue')['default']
17
+    CXBDialogSIgnInSucceed: typeof import('./src/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue')['default']
18
+    CXBDyLiveRecommend: typeof import('./src/components/CXBDyLive/CXBDyLiveRecommend.vue')['default']
19
+    CXBEmpty: typeof import('./src/components/CXBEmpty/CXBEmpty.vue')['default']
20
+    CXBNotLoginButton: typeof import('./src/components/CXBNotLoginButton/CXBNotLoginButton.vue')['default']
21
+    CXBPhoneLoginButton: typeof import('./src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue')['default']
22
+    CXBSkuPopup: typeof import('./src/components/CXBSkuPopup/CXBSkuPopup.vue')['default']
23
+    CXBYaojinTag: typeof import('./src/components/CXBYaojinTag/CXBYaojinTag.vue')['default']
24
+    FButton: typeof import('./src/components/FButton/FButton.vue')['default']
25
+    FCell: typeof import('./src/components/FCell/FCell.vue')['default']
26
+    FCellGroup: typeof import('./src/components/FCellGroup/FCellGroup.vue')['default']
27
+    FElevator: typeof import('./src/components/FElevator/FElevator.vue')['default']
28
+    FField: typeof import('./src/components/FField/FField.vue')['default']
29
+    FForm: typeof import('./src/components/FForm/FForm.vue')['default']
30
+    FFormItem: typeof import('./src/components/FFormItem/FFormItem.vue')['default']
31
+    FInput: typeof import('./src/components/FInput/FInput.vue')['default']
32
+    FNavBar: typeof import('./src/components/FNavBar/FNavBar.vue')['default']
33
+    FOverlay: typeof import('./src/components/FOverlay/FOverlay.vue')['default']
34
+    FPage: typeof import('./src/components/FPage/FPage.vue')['default']
35
+    FPopup: typeof import('./src/components/FPopup/FPopup.vue')['default']
36
+    FPrice: typeof import('./src/components/FPrice/FPrice.vue')['default']
37
+    FSearch: typeof import('./src/components/FSearch/FSearch.vue')['default']
38
+    FSwitch: typeof import('./src/components/FSwitch/FSwitch.vue')['default']
39
+    FTabs: typeof import('./src/components/FTabs/FTabs.vue')['default']
40
+    FTag: typeof import('./src/components/FTag/FTag.vue')['default']
41
+    FTransition: typeof import('./src/components/FTransition/FTransition.vue')['default']
42
+    NutButton: typeof import('uniapp-nutui/components/button/button.vue')['default']
43
+    NutCascader: typeof import('uniapp-nutui/components/cascader/cascader.vue')['default']
44
+    NutCheckbox: typeof import('uniapp-nutui/components/checkbox/checkbox.vue')['default']
45
+    NutDialog: typeof import('uniapp-nutui/components/dialog/dialog.vue')['default']
46
+    NutForm: typeof import('uniapp-nutui/components/form/form.vue')['default']
47
+    NutFormItem: typeof import('uniapp-nutui/components/formitem/formitem.vue')['default']
48
+    NutInput: typeof import('uniapp-nutui/components/input/input.vue')['default']
49
+    NutInputNumber: typeof import('uniapp-nutui/components/inputnumber/inputnumber.vue')['default']
50
+    NutNoticebar: typeof import('uniapp-nutui/components/noticebar/noticebar.vue')['default']
51
+    NutSwitch: typeof import('uniapp-nutui/components/switch/switch.vue')['default']
52
+    NutTabPane: typeof import('uniapp-nutui/components/tabpane/tabpane.vue')['default']
53
+    NutTabs: typeof import('uniapp-nutui/components/tabs/tabs.vue')['default']
54
+    ProductCard: typeof import('./src/components/ProductCard/ProductCard.vue')['default']
55
+    ProductList: typeof import('./src/components/ProductList/ProductList.vue')['default']
56
+    SignInGiftBag: typeof import('./src/components/CXBDialogSignIn/SignInGiftBag.vue')['default']
57
+    SignRedPacket: typeof import('./src/components/CXBDialogSignIn/SignRedPacket.vue')['default']
58
+  }
59
+}

+ 20 - 0
index.html

@@ -0,0 +1,20 @@
1
+<!DOCTYPE html>
2
+<html>
3
+  <head>
4
+    <meta charset="UTF-8" />
5
+    <script>
6
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
7
+        CSS.supports('top: constant(a)'))
8
+      document.write(
9
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
10
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
11
+    </script>
12
+    <title></title>
13
+    <!--preload-links-->
14
+    <!--app-context-->
15
+  </head>
16
+  <body>
17
+    <div id="app"><!--app-html--></div>
18
+    <script type="module" src="/src/main.ts"></script>
19
+  </body>
20
+</html>

+ 102 - 0
package.json

@@ -0,0 +1,102 @@
1
+{
2
+  "name": "uni-preset-vue",
3
+  "version": "0.0.0",
4
+  "scripts": {
5
+    "dev:app": "uni -p app",
6
+    "dev:app-android": "uni -p app-android",
7
+    "dev:app-ios": "uni -p app-ios",
8
+    "dev:custom": "uni -p",
9
+    "dev:h5": "uni",
10
+    "dev:h5:ssr": "uni --ssr",
11
+    "dev:mp-alipay": "uni -p mp-alipay",
12
+    "dev:mp-baidu": "uni -p mp-baidu",
13
+    "dev:mp-jd": "uni -p mp-jd",
14
+    "dev:mp-kuaishou": "uni -p mp-kuaishou",
15
+    "dev:mp-lark": "uni -p mp-lark",
16
+    "dev:mp-qq": "uni -p mp-qq",
17
+    "dev:mp-toutiao": "uni -p mp-toutiao",
18
+    "dev:mp-weixin": "uni -p mp-weixin",
19
+    "dev:quickapp-webview": "uni -p quickapp-webview",
20
+    "dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
21
+    "dev:quickapp-webview-union": "uni -p quickapp-webview-union",
22
+    "build:app": "uni build -p app",
23
+    "build:app-android": "uni build -p app-android",
24
+    "build:app-ios": "uni build -p app-ios",
25
+    "build:custom": "uni build -p",
26
+    "build:h5": "uni build",
27
+    "build:h5:ssr": "uni build --ssr",
28
+    "build:mp-alipay": "uni build -p mp-alipay",
29
+    "build:mp-baidu": "uni build -p mp-baidu",
30
+    "build:mp-jd": "uni build -p mp-jd",
31
+    "build:mp-kuaishou": "uni build -p mp-kuaishou",
32
+    "build:mp-lark": "uni build -p mp-lark",
33
+    "build:mp-qq": "uni build -p mp-qq",
34
+    "build:mp-toutiao": "uni build -p mp-toutiao",
35
+    "build:mp-weixin": "uni build -p mp-weixin",
36
+    "build:quickapp-webview": "uni build -p quickapp-webview",
37
+    "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
38
+    "build:quickapp-webview-union": "uni build -p quickapp-webview-union",
39
+    "type-check": "vue-tsc --noEmit"
40
+  },
41
+  "dependencies": {
42
+    "@dcloudio/uni-app": "3.0.0-3080720230703001",
43
+    "@dcloudio/uni-app-plus": "3.0.0-3080720230703001",
44
+    "@dcloudio/uni-components": "3.0.0-3080720230703001",
45
+    "@dcloudio/uni-h5": "3.0.0-3080720230703001",
46
+    "@dcloudio/uni-mp-alipay": "3.0.0-3080720230703001",
47
+    "@dcloudio/uni-mp-baidu": "3.0.0-3080720230703001",
48
+    "@dcloudio/uni-mp-jd": "3.0.0-3080720230703001",
49
+    "@dcloudio/uni-mp-kuaishou": "3.0.0-3080720230703001",
50
+    "@dcloudio/uni-mp-lark": "3.0.0-3080720230703001",
51
+    "@dcloudio/uni-mp-qq": "3.0.0-3080720230703001",
52
+    "@dcloudio/uni-mp-toutiao": "3.0.0-3080720230703001",
53
+    "@dcloudio/uni-mp-weixin": "3.0.0-3080720230703001",
54
+    "@dcloudio/uni-quickapp-webview": "3.0.0-3080720230703001",
55
+    "@uni-helper/uni-use": "^0.14.0",
56
+    "@vueuse/core": "^9.13.0",
57
+    "dayjs": "^1.11.9",
58
+    "js-base64": "^3.7.5",
59
+    "less": "^4.2.0",
60
+    "lodash-es": "^4.17.21",
61
+    "mp-html": "^2.4.2",
62
+    "pinia": "^2.0.36",
63
+    "sass": "^1.64.2",
64
+    "uniapp-nutui": "^0.2.5",
65
+    "vue": "^3.3.4",
66
+    "vue-i18n": "^9.2.2"
67
+  },
68
+  "devDependencies": {
69
+    "@antfu/eslint-config": "^0.40.2",
70
+    "@dcloudio/types": "^3.3.3",
71
+    "@dcloudio/uni-automator": "3.0.0-alpha-3081220230802001",
72
+    "@dcloudio/uni-cli-shared": "3.0.0-alpha-3081220230802001",
73
+    "@dcloudio/uni-stacktracey": "3.0.0-alpha-3081220230802001",
74
+    "@dcloudio/vite-plugin-uni": "3.0.0-alpha-3081220230802001",
75
+    "@iconify-json/tabler": "^1.1.87",
76
+    "@types/node": "^20.4.9",
77
+    "@uni-helper/uni-app-types": "^0.5.8",
78
+    "@uni-helper/uni-env": "^0.0.3",
79
+    "@uni-helper/vite-plugin-uni-components": "^0.0.6",
80
+    "@uni-helper/vite-plugin-uni-pages": "^0.2.6",
81
+    "@vue/compiler-sfc": "^3.3.4",
82
+    "@vue/server-renderer": "3.3.4",
83
+    "@vue/tsconfig": "^0.4.0",
84
+    "stylelint": "^15.10.2",
85
+    "stylelint-config-html": "^1.1.0",
86
+    "stylelint-config-recess-order": "^4.3.0",
87
+    "stylelint-config-recommended": "^13.0.0",
88
+    "stylelint-config-recommended-vue": "^1.5.0",
89
+    "stylelint-config-standard": "^34.0.0",
90
+    "stylelint-config-standard-scss": "^10.0.0",
91
+    "stylelint-order": "^6.0.3",
92
+    "typescript": "^5.1.6",
93
+    "uni-tsc": "^0.0.2",
94
+    "unocss": "^0.53.6",
95
+    "unocss-applet": "^0.5.3",
96
+    "unocss-preset-weapp": "^0.53.7",
97
+    "unplugin-auto-import": "^0.16.6",
98
+    "unplugin-vue-components": "^0.25.1",
99
+    "vite": "4.4.7",
100
+    "vue-tsc": "^1.8.8"
101
+  }
102
+}

+ 50 - 0
pages.config.ts

@@ -0,0 +1,50 @@
1
+// pages.config.ts
2
+import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
3
+
4
+export default defineUniPages({
5
+  // You can also define pages fields, which have the highest priority.
6
+  pages: [
7
+  ],
8
+  tabBar: {
9
+    // Gray3
10
+    color: '#828282',
11
+    // Gray1
12
+    selectedColor: '#333333',
13
+    backgroundColor: '#FFFFFF',
14
+    list: [{
15
+      pagePath: 'pages/home/index',
16
+      iconPath: 'static/icon/home-off.png',
17
+      selectedIconPath: 'static/icon/home-on.png',
18
+      text: '首页'
19
+    }, {
20
+      pagePath: 'pages/store/nearby/index',
21
+      iconPath: 'static/icon/chuangke-off.png',
22
+      selectedIconPath: 'static/icon/chuangke-on.png',
23
+      text: '创客'
24
+    }, {
25
+      pagePath: 'pages/dacang/list/index',
26
+      iconPath: 'static/icon/dacang-off.png',
27
+      selectedIconPath: 'static/icon/dacang-on.png',
28
+      text: '大仓'
29
+    }, {
30
+      pagePath: 'pages/order_addcart/index',
31
+      iconPath: 'static/icon/shopcart-off.png',
32
+      selectedIconPath: 'static/icon/shopcart-on.png',
33
+      text: '购物车'
34
+    },{
35
+      pagePath: 'pages/user/index',
36
+      iconPath: 'static/icon/user-off.png',
37
+      selectedIconPath: 'static/icon/user-on.png',
38
+      text: '我的'
39
+    }]
40
+  },
41
+  globalStyle: {
42
+    navigationBarBackgroundColor: '@navBgColor',
43
+    navigationBarTextStyle: '@navTxtStyle',
44
+    navigationBarTitleText: '储蓄保',
45
+    backgroundColor: '@bgColor',
46
+    backgroundTextStyle: '@bgTxtStyle',
47
+    backgroundColorTop: '@bgColorTop',
48
+    backgroundColorBottom: '@bgColorBottom',
49
+  },
50
+})

Разница между файлами не показана из-за своего большого размера
+ 9764 - 0
pnpm-lock.yaml


+ 24 - 0
rules.ts

@@ -0,0 +1,24 @@
1
+import type { Rule, RuleContext } from 'unocss'
2
+import type { Theme } from 'unocss/preset-mini'
3
+import { parseColor } from '@unocss/preset-mini'
4
+
5
+export const rules = [
6
+  [/^f-(.*)$/, ([, body]: string[], { theme }: RuleContext<Theme>) => {
7
+    const color = parseColor(body, theme)
8
+    if (color?.cssColor?.type === 'rgb' && color.cssColor.components) {
9
+      return {
10
+        '--fastlane-c-context': `${color.cssColor.components.join(',')}`,
11
+      }
12
+    }
13
+  }],
14
+  // ['p-safe', { padding: 'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)' }],
15
+  // ['pt-safe', { 'padding-top': 'env(safe-area-inset-top)' }],
16
+  // ['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
17
+  // ['pl-safe', { 'padding-left': 'env(safe-area-inset-left)' }],
18
+  // ['pr-safe', { 'padding-right': 'env(safe-area-inset-right)' }],
19
+  // ['m-safe', { margin: 'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)' }],
20
+  // ['mt-safe', { 'margin-top': 'env(safe-area-inset-top)' }],
21
+  // ['mb-safe', { 'margin-bottom': 'env(safe-area-inset-bottom)' }],
22
+  // ['ml-safe', { 'margin-left': 'env(safe-area-inset-left)' }],
23
+  // ['mr-safe', { 'margin-right': 'env(safe-area-inset-right)' }],
24
+] as Rule<Theme>[]

+ 15 - 0
src/App.vue

@@ -0,0 +1,15 @@
1
+<script setup lang="ts">
2
+import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
3
+onLaunch(() => {
4
+  console.log("App Launch");
5
+});
6
+onShow(() => {
7
+  console.log("App Show");
8
+});
9
+onHide(() => {
10
+  console.log("App Hide");
11
+});
12
+</script>
13
+<style lang="scss">
14
+@import 'uniapp-nutui/styles/index';
15
+</style>

+ 51 - 0
src/apis/auth.api.ts

@@ -0,0 +1,51 @@
1
+import {defHttp} from "~/utils/http";
2
+import type {LoginModel} from "~/apis/model/login.model";
3
+
4
+enum API {
5
+    // 短信验证码
6
+    AUTH_VERIFY = '/api/auth/verify',
7
+    // 手机号+验证码登录
8
+    AUTH_SMS_LOGIN = '/api/auth/smslogin',
9
+    // 手机号+密码登录
10
+    AUTH_LOGIN = '/api/auth/login',
11
+    // 微信登录 - 绑定用户 - 手机号码验证码
12
+    THIRD_BINDING = '/api/third/binding',
13
+    // 一键登录
14
+    AUTH_YIJIANLOGIN = '/api/auth/yijianlogin',
15
+    // 微信登录
16
+    WECHAT_CHECK = '/api/wechat/check',
17
+    // 第三方账号绑定
18
+    USER_UPDATE_ACCOUNT = '/api/user/updateAccount',
19
+    // 获取用户的 openid 财是判断用户是否绑定
20
+    USER_WECHAT_LOGIN_ON = '/gateway/userCenter_service/userWechatLogOn/wechat',
21
+    // 提现微信绑定
22
+    USER_EXTRACT_BAND_OPENID = '/api/user/extract/band_openid',
23
+}
24
+
25
+/**
26
+ * 短信验证码
27
+ * @param phone
28
+ */
29
+export function authVerify(phone: string) {
30
+    return defHttp.post({
31
+        url: API.AUTH_VERIFY,
32
+        data: {
33
+            phone
34
+        }
35
+    })
36
+}
37
+
38
+/**
39
+ * 手机号+验证码登录
40
+ */
41
+export function authSmsLogin(params: {
42
+    phone: string,
43
+    sms_code: string
44
+}): Promise<LoginModel> {
45
+    return defHttp.post({
46
+        url: API.AUTH_SMS_LOGIN,
47
+        data: {
48
+            ...params
49
+        }
50
+    })
51
+}

+ 138 - 0
src/apis/common.ts

@@ -0,0 +1,138 @@
1
+import {defHttp} from '~/utils/http'
2
+import {USER_LATITUDE, USER_LONGITUDE} from "~/constants";
3
+import AmapWx from "~/libs/amap-wx";
4
+import type {ArticleCategoryModel, ArticleModel, ArticleResult} from "~/apis/model/articleModel";
5
+import type {HomeQuickLinkModel} from "~/apis/model/common.model";
6
+import type {IntegralProductModel, IntegralProductParams} from "~/apis/model/integral.model";
7
+import type {AnnouncementResult} from "~/apis/model/announcement.model";
8
+// import {a} from "unocss-preset-weapp/dist/utilities-46c43da7";
9
+// 引入
10
+// import amap from '~/libs/amap-wx.130.js';
11
+
12
+// let amapPlugin = new amap.AMapWX({
13
+//     key: "e42681aed12886436ed44d6c28aa22c8"
14
+// });
15
+const amap = AmapWx.getInstance({key: "e42681aed12886436ed44d6c28aa22c8"});
16
+
17
+enum API {
18
+
19
+    /**
20
+     * // 获取北参堂icon和title
21
+     * 首页金刚区
22
+     */
23
+    HOME_QUICK_LINK = `/api/common/home_quick_link`,
24
+    // 积分通兑产品
25
+    ENTROPY_PRODUCT_LIST = '/api/entropy/product_lst',
26
+    // 帮助中心分类
27
+    ARTICLE_CATEGORY_LIST = '/api/article/category/lst/19',
28
+    // 文章列表
29
+    ARTICLE_LIST = '/api/article/lst',
30
+    // 文章详情
31
+    ARTICLE_DETAIL = '/api/article/detail',
32
+
33
+    // 系统公告
34
+    NOTICE_LIST = '/api/notice/list',
35
+
36
+    // 注销接口
37
+    USER_LOGOUT = '/gateway/userCenter_service/userCenterService/userLogout',
38
+
39
+    // 上传图片
40
+    UPLOAD_IMAGE_FIELD = '/api/upload/image/field'
41
+}
42
+
43
+/**
44
+ * 注销账号
45
+ * @param phone
46
+ */
47
+export function closeAccount(phone: string) {
48
+
49
+    return defHttp.post({
50
+        url: API.USER_LOGOUT,
51
+        data: {
52
+            phone
53
+        }
54
+    })
55
+}
56
+
57
+export function getLocal() {
58
+    uni.showModal({
59
+        title: '提示',
60
+        content: '为了您更好的体验,请同意授权位置',
61
+        success: (res) => {
62
+            if (res.confirm) {
63
+                // uni.getLocation({
64
+                //     type: 'wgs84',
65
+                //     success(res) {
66
+                //         uni.setStorageSync(USER_LATITUDE, res.latitude)
67
+                //         uni.setStorageSync(USER_LONGITUDE, res.longitude)
68
+                //         getRegeo(res.latitude, res.longitude);
69
+                //     }
70
+                // })
71
+                amap.getWxLocation(async (loc) => {
72
+                    // 获取地址描述数据
73
+                    const regeoRes = await amap.getRegeo({location: loc});
74
+                    console.log(regeoRes.data.regeocode.addressComponent)
75
+                })
76
+            }
77
+        }
78
+    })
79
+}
80
+
81
+export async function getRegeo(latitude: number, longitude: number) {
82
+    // amapPlugin.getRegeo
83
+    const regeoRes = await amap.getRegeo({
84
+        location: '' + longitude + ',' + latitude + '',
85
+    })
86
+    console.log(regeoRes.data.regeocode.addressComponent.city)
87
+}
88
+
89
+/**
90
+ * 获取积分通兑产品列表
91
+ */
92
+export function getEntropyProductList(params: IntegralProductParams): Promise<Array<IntegralProductModel>> {
93
+    return defHttp.get({
94
+        url: API.ENTROPY_PRODUCT_LIST,
95
+        data: {
96
+            ...params
97
+        }
98
+    })
99
+}
100
+
101
+/**
102
+ * 获取帮助中心分类
103
+ */
104
+export function getArticleCategory(): Promise<ArticleCategoryModel[]> {
105
+    return defHttp.get({
106
+        url: API.ARTICLE_CATEGORY_LIST,
107
+    }, {withToken: false})
108
+}
109
+
110
+/**
111
+ * 文章列表
112
+ */
113
+export function getArticleList(article_category_id: string): Promise<ArticleResult> {
114
+    return defHttp.get({
115
+        url: `${API.ARTICLE_LIST}/${article_category_id}`,
116
+    }, {withToken: false})
117
+}
118
+
119
+export function getArticleDetail(article_id: string): Promise<ArticleModel> {
120
+    return defHttp.get({
121
+        url: `${API.ARTICLE_DETAIL}/${article_id}`,
122
+    }, {withToken: false})
123
+}
124
+
125
+/**
126
+ * 首页金刚区
127
+ */
128
+export function getHomeQuickLink(): Promise<Array<HomeQuickLinkModel>> {
129
+    return defHttp.get({
130
+        url: `${API.HOME_QUICK_LINK}`
131
+    })
132
+}
133
+
134
+export function getNoticeList(): Promise<AnnouncementResult> {
135
+    return defHttp.get({
136
+        url: `${API.NOTICE_LIST}`
137
+    })
138
+}

+ 131 - 0
src/apis/dacang.ts

@@ -0,0 +1,131 @@
1
+import { defHttp } from '~/utils/http'
2
+import type {
3
+	DcBannerDataModel,
4
+	DcHomeMerchantModel, DcHomeProductModel, DcIntroduce, DcMemberProductResult, DcModel, DcProductClassifyModel,
5
+	DcProductModel, DcSeckillModel, QueryDcHomeParams, QueryDcMemberProductListParams,
6
+	QueryDcProductListParams
7
+} from "~/apis/model/dacang.model";
8
+
9
+enum API {
10
+	DC_BANNER= '/api/newhome/nologin/banner/da_cang',
11
+	// 一元购
12
+	DC_BANNER_ONE_YUAN_PAY = '/api/newhome/nologin/banner/one_yuan_pay',
13
+	// 大仓金刚区
14
+	DC_HOME_MERCHANT = '/api/dacang/nologin/dc_home_merchant',
15
+	// 大仓秒杀商品
16
+	DC_SECKILL = '/api/dacang/nologin/seckill',
17
+	// 大仓商品列表
18
+	DC_PRODUCT_LIST = '/api/dacang/nologin/da_cang_product_lst',
19
+	// 大仓会员商品
20
+	DC_MEMBER_PRODUCT_LIST = '/api/store/product/dacang_lst',
21
+	// 大仓列表
22
+	DC_LIST = '/api/dacang/nologin/da_cang_lst',
23
+	// 大仓介绍
24
+	DC_INTRODUCE = '/api/dacang/nologin/introduce',
25
+	// 单个大仓商品列表
26
+	DC_HOME_PRODUCT_LIST = '/api/dacang/nologin/dc_home_product',
27
+	// 大仓商品列表分类
28
+	DC_CLASSIFY = '/api/dacang/nologin/classify',
29
+}
30
+
31
+
32
+/**
33
+ * 大仓 banner 列表
34
+ */
35
+export function getDcBanner(): Promise<Array<DcBannerDataModel>> {
36
+	return defHttp.get({
37
+		url: API.DC_BANNER
38
+	})
39
+}
40
+
41
+export function getDcBannerOneYuanPay(): Promise<Array<DcBannerDataModel>> {
42
+	return defHttp.get({
43
+		url: API.DC_BANNER_ONE_YUAN_PAY
44
+	})
45
+}
46
+
47
+/**
48
+ * 大仓首页数据(金刚区)
49
+ * @param id
50
+ */
51
+export function getDcHomeMerchant(id: string): Promise<Array<DcHomeMerchantModel>> {
52
+	return defHttp.get({
53
+		url: `${API.DC_HOME_MERCHANT}/${id}`
54
+	})
55
+}
56
+
57
+/**
58
+ * 大仓商品列表
59
+ *
60
+ */
61
+export function getDcProductList(params: QueryDcProductListParams): Promise<Array<DcProductModel>> {
62
+	return defHttp.get({
63
+		url: API.DC_PRODUCT_LIST,
64
+		data: {
65
+			...params
66
+		}
67
+	})
68
+}
69
+
70
+/**
71
+ * 大仓秒杀商品
72
+ */
73
+export function getDcSeckill(): Promise<Array<DcSeckillModel>> {
74
+	return defHttp.get({
75
+		url: API.DC_SECKILL,
76
+	})
77
+}
78
+
79
+/**
80
+ * 大仓会员商品列表
81
+ * @param params
82
+ */
83
+export function getDcMemberProductList(params: QueryDcMemberProductListParams): Promise<DcMemberProductResult> {
84
+	return defHttp.get({
85
+		url: API.DC_MEMBER_PRODUCT_LIST,
86
+		data: {
87
+			...params
88
+		}
89
+	})
90
+}
91
+
92
+/**
93
+ * 大仓列表
94
+ */
95
+export function getDcList(): Promise<Array<DcModel>> {
96
+	return defHttp.get({
97
+		url: API.DC_LIST
98
+	})
99
+}
100
+
101
+/**
102
+ * 大仓介绍
103
+ * @param id
104
+ */
105
+export function getDcIntroduce(id: string): Promise<DcIntroduce> {
106
+	return defHttp.get({
107
+		url: `${API.DC_INTRODUCE}/${id}`
108
+	})
109
+}
110
+
111
+/**
112
+ * 单个大仓的商品列表
113
+ * @param id
114
+ * @param params
115
+ */
116
+export function getDcHomeProductList(id: string, params: QueryDcHomeParams): Promise<Array<DcHomeProductModel>> {
117
+	return defHttp.get({
118
+		url: `${API.DC_HOME_PRODUCT_LIST}/${id}`,
119
+		data: {
120
+			...params
121
+		}
122
+	})
123
+}
124
+/**
125
+ * 大仓商品分类
126
+ */
127
+export function getDcProductClassify(): Promise<DcProductClassifyModel> {
128
+	return defHttp.get({
129
+		url: API.DC_CLASSIFY
130
+	})
131
+}

+ 28 - 0
src/apis/home.ts

@@ -0,0 +1,28 @@
1
+import { defHttp } from '~/utils/http'
2
+import type {PageModel} from "~/apis/model/pageModel";
3
+import type {HomeProduct} from "~/apis/model/product.model";
4
+
5
+enum API {
6
+    GET_ROLL_YANGLAOJIN = '/api/roll_yanglaojin',
7
+    GET_PRODUCT = '/api/newhome/nologin/product',
8
+}
9
+/**
10
+ * 获取滚动消息
11
+ */
12
+export function getRollYanglaojin() {
13
+    return defHttp.get({
14
+        url: API.GET_ROLL_YANGLAOJIN
15
+    })
16
+}
17
+
18
+/**
19
+ * 获取首页商品
20
+ */
21
+export function getProduct(pagination: PageModel): Promise<Array<HomeProduct>> {
22
+    return defHttp.get({
23
+        url: API.GET_PRODUCT,
24
+        data: {
25
+            ...pagination
26
+        }
27
+    })
28
+}

+ 109 - 0
src/apis/merchant.ts

@@ -0,0 +1,109 @@
1
+import { defHttp } from '~/utils/http'
2
+import type {MerchantCategoryModel, StoreParams, StoreResult} from "~/apis/model/storeModel";
3
+import type {PageModel} from "~/apis/model/pageModel";
4
+import type {ZibubaojianResult} from "~/apis/model/zibubaojian.model";
5
+import type {VipAreaResult} from "~/apis/model/vip-area.model";
6
+
7
+enum API {
8
+    GET_SELECT_MERCHANT = '/gateway/wares_service/waresServiceMerchant/selectMerchant',
9
+    GET_SELECT_MERCHANT_SORT = '/gateway/wares_service/waresServiceMerchant/selectMerchantSort',
10
+    GET_DETAIL = '/api/store/merchant/detail',
11
+    GET_MERCHANT_CATEGORY = '/api/store/merchant/category/lst',
12
+    GET_PRODUCT_LIST = '/api/store/merchant/product/lst',
13
+    GET_PRODUCT_DETAIL = '/api/store/product/detail',
14
+    // 产品推荐列表
15
+    GET_PRODUCT_RECOMMEND_LIST = '/api/store/product/recommend/lst',
16
+    // 会员产商品
17
+    GET_VIP_AREA_LIST = '/api/store/merchant/product/lst/324'
18
+}
19
+
20
+/**
21
+ * 店铺搜索
22
+ */
23
+export async function getSelectMerchant(params: StoreParams): Promise<StoreResult> {
24
+    const {pageInfo} = await defHttp.get({
25
+        url: API.GET_SELECT_MERCHANT,
26
+        data: params,
27
+    },{withToken: false})
28
+
29
+    return pageInfo
30
+}
31
+
32
+export function getSelectMerchantSort() {
33
+    return defHttp.get({
34
+        url: API.GET_SELECT_MERCHANT_SORT
35
+    }, {
36
+        withToken: false
37
+    })
38
+}
39
+
40
+export function getMerchantDetail(id: string) {
41
+    return defHttp.get({
42
+        url: API.GET_DETAIL + `/${id}`
43
+    }, {
44
+        withToken: false
45
+    })
46
+}
47
+
48
+export function getMerchantCategory(id: string): Promise<Array<MerchantCategoryModel>> {
49
+    return defHttp.get({
50
+        url: API.GET_MERCHANT_CATEGORY + `/${id}`
51
+    }, {
52
+        withToken: false
53
+    })
54
+}
55
+
56
+/**
57
+ * 获取店铺商品列表
58
+ * 滋补保健
59
+ * @param id
60
+ */
61
+export function getProductList(id: string): Promise<ZibubaojianResult> {
62
+    return defHttp.get({
63
+        url: API.GET_PRODUCT_LIST + `/${id}`,
64
+        params: {
65
+            page: 1,
66
+            limit: 10
67
+        }
68
+    })
69
+}
70
+
71
+/**
72
+ * 获取产品详情
73
+ * @param id
74
+ */
75
+export function getProductDetail(id: string) {
76
+    return defHttp.get({
77
+        url: API.GET_PRODUCT_DETAIL + `/${id}`,
78
+    })
79
+}
80
+
81
+/**
82
+ * 获取推荐商品
83
+ * @param pageParams
84
+ */
85
+export function getRecommendList(pageParams: PageModel) {
86
+
87
+    return defHttp.get({
88
+        url: API.GET_PRODUCT_RECOMMEND_LIST,
89
+        params: {
90
+            page: pageParams.page === undefined ? 1 : pageParams.page,
91
+            limit: pageParams.limit === undefined ? 10 : pageParams.limit
92
+        }
93
+    })
94
+}
95
+
96
+
97
+/**
98
+ * 获取VIP商品
99
+ * @param pageParams
100
+ */
101
+export function getVipAreaList(pageParams: PageModel): Promise<VipAreaResult> {
102
+    return defHttp.get({
103
+        url: API.GET_VIP_AREA_LIST,
104
+        params: {
105
+            page: pageParams.page === undefined ? 1 : pageParams.page,
106
+            limit: pageParams.limit === undefined ? 20 : pageParams.limit
107
+        }
108
+    })
109
+}

+ 0 - 0
src/apis/model/aboutModel.ts


+ 26 - 0
src/apis/model/accumulateIncomeModel.ts

@@ -0,0 +1,26 @@
1
+import type {PageInfoModel} from "~/apis/model/common";
2
+export interface UserInviteProfitParams {
3
+    pageNum: number
4
+    pageSize: number
5
+    uid: string
6
+}
7
+
8
+export interface AccumulateIncomeModel {
9
+    // 累计收入
10
+    numberSun: number
11
+    // 奖励收益
12
+    rewardProfit: string
13
+    pageInfo: PageInfoModel<AccumulatedIncomeListModel>
14
+    // 分享收益
15
+    shareProfit: number
16
+    // 未结算收益
17
+    UserUnsettledInviteProfit: number
18
+}
19
+export interface AccumulatedIncomeListModel {
20
+    // 收益金额
21
+    number: string
22
+    // 收益标题
23
+    title: string
24
+    // 收益时间
25
+    createTime: string
26
+}

+ 60 - 0
src/apis/model/address.model.ts

@@ -0,0 +1,60 @@
1
+/**
2
+ * 地址结果
3
+ */
4
+export interface AddressResult {
5
+    list: Array<AddressModel>
6
+}
7
+
8
+export interface AddressModel {
9
+    address_id: string//用户地址id
10
+    uid: string//用户id
11
+    real_name: string//收货人姓名
12
+    phone: string//收货人电话
13
+    province: string//收货人所在省
14
+    city: string//收货人所在市
15
+    city_id: string//
16
+    district: string//收货人所在区
17
+    detail: string//收货人详细地址
18
+    post_code: string//邮编
19
+    longitude: string//经度
20
+    latitude: string//纬度
21
+    is_default: string//是否默认
22
+    is_del: string//是否删除
23
+    create_time: string//添加时间
24
+    code_list: string
25
+}
26
+
27
+// 一级地址
28
+export interface OneAddressModel {
29
+    id: string
30
+    name: string
31
+    pid: string
32
+    children: Array<TwoAddressModel>
33
+}
34
+
35
+export interface TwoAddressModel {
36
+    id: string
37
+    name: string
38
+    pid: string
39
+    children: Array<ThreeAddressModel>
40
+}
41
+
42
+export interface ThreeAddressModel {
43
+    id: string
44
+    name: string
45
+    pid: string
46
+    children: Array<FourAddressModel>
47
+}
48
+
49
+export interface FourAddressModel {
50
+    id: string
51
+    name: string
52
+    pid: string
53
+    // children: Array<FiveAddressModel>
54
+}
55
+
56
+// export interface FiveAddressModel {
57
+//     id: string
58
+//     name: string
59
+//     pid: string
60
+// }

+ 16 - 0
src/apis/model/announcement.model.ts

@@ -0,0 +1,16 @@
1
+export interface AnnouncementResult {
2
+    count: number,
3
+    list: Array<AnnouncementModel>
4
+}
5
+export interface AnnouncementModel {
6
+    notice_id: string
7
+    // 标题
8
+    title: string
9
+    status: string
10
+    // 时间
11
+    create_time: string
12
+    // 内容
13
+    content: string
14
+    is_del: string
15
+    admin_id: string
16
+}

+ 49 - 0
src/apis/model/articleModel.ts

@@ -0,0 +1,49 @@
1
+export interface ArticleCategoryModel {
2
+    article_category_id: string
3
+    create_time: string
4
+    image: string
5
+    info: string
6
+    mer_id: string
7
+    pid: string
8
+    sort: string
9
+    status: string
10
+    title: string
11
+}
12
+
13
+export interface ArticleContentModel {
14
+    article_content_id: string
15
+    content: string
16
+}
17
+export interface ArticleModel {
18
+    admin_id: string
19
+    articleCategory: {
20
+        title: string
21
+    }
22
+    // 文章id
23
+    article_id: string
24
+    author: string
25
+    // 分类id
26
+    cid: string
27
+    content: ArticleContentModel
28
+    create_time: string
29
+    // 封面图
30
+    image_input: string
31
+    is_banner: string
32
+    is_hot: string
33
+    mer_id: string
34
+    pid: string
35
+    sort: string
36
+    status: string
37
+    synopsis: string
38
+    // 文章名称
39
+    title: string
40
+    uid: string
41
+    url: string
42
+    visit: string
43
+    wechat_news_id: string
44
+}
45
+
46
+export interface ArticleResult {
47
+    count: number,
48
+    list: ArticleModel[]
49
+}

+ 15 - 0
src/apis/model/certification.model.ts

@@ -0,0 +1,15 @@
1
+/**
2
+ * 实名认证信息
3
+ */
4
+export interface CertificationRequest {
5
+    // 姓名
6
+    user_name: string
7
+    // 身份证
8
+    user_card: string
9
+    // 手机号
10
+    mobile?: string
11
+    // 正面(照片)
12
+    card_positive: string
13
+    // 反面(照片)
14
+    card_reverse: string
15
+}

+ 33 - 0
src/apis/model/common.model.ts

@@ -0,0 +1,33 @@
1
+export enum PLATFORM_NAME {
2
+    JD = 'jingding',
3
+    TB = 'taobao',
4
+    PDD = 'pindouduo',
5
+    DC = 'dacang',
6
+    DY = 'douyin',
7
+    VIP = 'vip',
8
+    SU = 'suning'
9
+}
10
+export interface PageInfoModel<T> {
11
+    total: number
12
+    list: Array<T>
13
+    pageNum: number
14
+    pageSize: number
15
+    size: number
16
+    startRow: number
17
+    endRow: number
18
+    pages: number
19
+    prePage: number
20
+    nextPage: number
21
+    isFirstPage: boolean
22
+    isLastPage: boolean
23
+    hasPreviousPage: boolean
24
+    hasNextPage: boolean
25
+    navigatePages: boolean
26
+    navigateLastPage: number
27
+}
28
+
29
+export interface HomeQuickLinkModel {
30
+    image: string
31
+    title: string
32
+    key: string
33
+}

+ 235 - 0
src/apis/model/dacang.model.ts

@@ -0,0 +1,235 @@
1
+export interface QueryDcProductListParams {
2
+     page: number
3
+     limit: number
4
+     classify: string
5
+     keyword: string
6
+}
7
+
8
+export interface QueryDcMemberProductListParams {
9
+     page: number
10
+     limit: number
11
+     type?: string
12
+}
13
+
14
+export interface QueryDcHomeParams {
15
+     page: number
16
+     limit: number
17
+}
18
+// 大仓商品
19
+export type DcProductModel = {
20
+     product_id: string
21
+     mer_id: string
22
+     image: string//图片
23
+     slider_image: string//滑动图
24
+     store_name: string//商品名称
25
+     da_cang_price: string//大仓价格
26
+     store_info: string
27
+     keyword: string//关键字
28
+     bar_code: string
29
+     brand_id: string
30
+     is_show: string
31
+     status: string
32
+     is_del: string
33
+     cate_id: string
34
+     unit_name: string
35
+     sort: string
36
+     rank: string
37
+     sales: string
38
+     price: string//最低价
39
+     cost: string
40
+     ot_price: string//原价
41
+     stock: string
42
+     is_hot: string
43
+     is_benefit: string
44
+     is_best: string
45
+     is_new: string
46
+     is_good: string
47
+     product_type: string
48
+     ficti: string
49
+     browse: string
50
+     code_path: string
51
+     video_link: string
52
+     temp_id: string
53
+     spec_type: string
54
+     extension_type: string
55
+     refusal: string
56
+     rate: string
57
+     reply_count: string
58
+     mer_status: string
59
+     give_coupon_ids: string
60
+     is_gift_bag: string
61
+     create_time: string
62
+     care_count: string
63
+     is_used: string
64
+     old_product_id: string
65
+     volunteer: string
66
+     type: string
67
+     pension: string
68
+     commission: string
69
+     flag: string//1 大仓商品 2 普通商品 3 京东商品
70
+     yanglao: string//养老金
71
+}
72
+
73
+export interface DcBannerDataModel {
74
+     // 名称
75
+     name: string
76
+     // 图片地址
77
+     pic: string
78
+     // 页面跳转路径//金卡,五一,签到,银卡
79
+     url: string
80
+     type: string
81
+     pic_app: string
82
+     ios_path: string
83
+}
84
+
85
+// 首页数据
86
+export interface DcHomeMerchantModel {
87
+     mer_id: string
88
+     mer_name: string
89
+     mer_avatar: string
90
+}
91
+
92
+// 秒杀数据
93
+export interface DcSeckillModel {
94
+     seckill_date: string
95
+     ctime: string
96
+     product_id: number
97
+     status: number
98
+     product_data: Array<DcSeckillProductDataModel>
99
+}
100
+
101
+export interface DcSeckillProductDataModel {
102
+     // 商品id
103
+     product_id: string
104
+     store_name: string
105
+     image: string
106
+     ot_price: number
107
+     seckill_price: number
108
+     yanglao: number
109
+     img: string
110
+     img_text: string
111
+     //1-抢购中。2-即将开始。3-已结速
112
+     status: string
113
+}
114
+
115
+/**
116
+ * 大仓会员商品结果集
117
+ */
118
+export interface DcMemberProductResult {
119
+     count: number
120
+     list: Array<DcMemberProductModel>
121
+}
122
+
123
+export interface DcMemberProductModel {
124
+     image: string
125
+     store_name: string
126
+     price: string
127
+     product_id: number
128
+     product_attr_unique: string
129
+     clicks: boolean
130
+     yanglao: string
131
+     ot_price: string
132
+     sales: string
133
+}
134
+
135
+/**
136
+ * 大仓
137
+ */
138
+export interface DcModel {
139
+     id: string
140
+     logo: string
141
+     warehouse_name: string
142
+     the_selected: boolean
143
+}
144
+
145
+/**
146
+ * 大仓介绍
147
+ */
148
+export interface DcIntroduce {
149
+      id: number
150
+      uid: number //用户id
151
+      user_name: string//负责人
152
+      account: string//储蓄保账号
153
+      create_time: number//创建时间
154
+      update_time: number//修改时间
155
+      warehouse_name: string//大仓名称
156
+      status: number//大仓状态 1开启 0关闭
157
+      logo: string//logo
158
+      complaint_mailbox: string
159
+      complaint_tel: string//投诉电话
160
+      service_tel: string//客服电话
161
+      attract_tel: string//招商电话
162
+      address: string//地址
163
+      business_license: string//营业执照
164
+      main_company: string//主体公司
165
+      province: string//省
166
+      city: string//市
167
+      area: string//县
168
+      introduce: string//介绍
169
+}
170
+
171
+// DcDetailsGoodsListBean
172
+// 单个大仓自己的商品信息
173
+export interface DcHomeProductModel {
174
+      product_id: string//商品ID
175
+      mer_id: string
176
+      image: string//商品图片
177
+      slider_image: string
178
+      store_name: string//商品名称
179
+      store_info: string
180
+      keyword: string
181
+      bar_code: string
182
+      brand_id: string
183
+      is_show: string
184
+      status: string
185
+      is_del: string
186
+      cate_id: string
187
+      unit_name: string
188
+      sort: string
189
+      rank: string
190
+      sales: string
191
+      price: string//最低价格
192
+      cost: string
193
+      ot_price: string//原价
194
+      stock: string
195
+      is_hot: string
196
+      is_benefit: string
197
+      is_best: string
198
+      is_new: string
199
+      is_good: string
200
+      product_type: string
201
+      ficti: string
202
+      browse: string
203
+      code_path: string
204
+      video_link: string
205
+      temp_id: string
206
+      spec_type: string
207
+      extension_type: string
208
+      refusal: string
209
+      rate: string
210
+      reply_count: string
211
+      mer_status: string
212
+      give_coupon_ids: string
213
+      is_gift_bag: string
214
+      create_time: string
215
+      care_count: string
216
+      is_used: string
217
+      old_product_id: string
218
+      volunteer: string
219
+      type: string
220
+      pension: string
221
+      commission: string
222
+      dc_id: string
223
+      flag: string
224
+      yanglao: string//养老金
225
+      da_cang_price: string//大仓价格
226
+}
227
+
228
+/**
229
+ * 大仓商品分类
230
+ */
231
+export interface DcProductClassifyModel {
232
+     store_category_id: string
233
+     cate_name: string
234
+     isClick: boolean
235
+}

+ 6 - 0
src/apis/model/dc.model.ts

@@ -0,0 +1,6 @@
1
+export interface DcListModel {
2
+    id: string
3
+    logo: string
4
+    warehouse_name: string
5
+    the_selected: boolean
6
+}

+ 99 - 0
src/apis/model/integral.model.ts

@@ -0,0 +1,99 @@
1
+export interface IntegralParams {
2
+    page: number
3
+    limit: number
4
+}
5
+export interface IntegralResult {
6
+    count: number
7
+    list: Array<IntegralModel>
8
+}
9
+
10
+export interface IntegralProductParams {
11
+    // 148
12
+    mer_id: number
13
+    cate_id: string
14
+    page: number
15
+    limit: number
16
+}
17
+
18
+export interface IntegralProductModel {
19
+     product_id: string
20
+     mer_id: string
21
+     image: string
22
+     slider_image: string
23
+     store_name: string
24
+     store_info: string
25
+     keyword: string
26
+     bar_code: string
27
+     brand_id: string
28
+     is_show: string
29
+     status: string
30
+     is_del: string
31
+     cate_id: string
32
+     unit_name: string
33
+     sort: string
34
+     rank: string
35
+     sales: string
36
+     price: string
37
+     cost: string
38
+     ot_price: string
39
+     stock: string
40
+     is_hot: string
41
+     is_benefit: string
42
+     is_best: string
43
+     is_new: string
44
+     is_good: string
45
+     product_type: string
46
+     ficti: string
47
+     browse: string
48
+     code_path: string
49
+     video_link: string
50
+     temp_id: string
51
+     spec_type: string
52
+     extension_type: string
53
+     refusal: string
54
+     rate: string
55
+     reply_count: string
56
+     mer_status: string
57
+     give_coupon_ids: string
58
+     is_gift_bag: string
59
+     create_time: string
60
+     care_count: string
61
+     is_used: string
62
+     old_product_id: string
63
+     volunteer: string
64
+     type: string
65
+     pension: string
66
+     commission: string
67
+     dc_id: string
68
+     dc_price: string
69
+     seckill: string
70
+     is_hide: string
71
+     spu_id: string
72
+     cost_price: string
73
+     gong_sku_id: string
74
+}
75
+export interface IntegralModel {
76
+    id: string
77
+    uid: string
78
+    // 签到天数
79
+    continuity_day: string
80
+    // 积分数值
81
+    reward_socre: string
82
+    // reward_score: string
83
+    // 签到时间
84
+    signin_time: string
85
+    // 添加记录时间
86
+    addtime: string
87
+    source_uid: string
88
+    // 0 无效,1 有效
89
+    status: string
90
+    // 备注
91
+    mark: string
92
+    order_id: string
93
+    // 1 收入,2 支出
94
+    pm: string
95
+    // 余额
96
+    surplus: string
97
+    // 订单号
98
+    order_sn: string
99
+}

+ 38 - 0
src/apis/model/inviteFriendsModel.ts

@@ -0,0 +1,38 @@
1
+import type {PageInfoModel} from "~/apis/model/common";
2
+
3
+export interface SharePostersImagesListParams {
4
+    pageNum: number
5
+    pageSize: number
6
+    // 分类 id
7
+    classify?: string
8
+    // 推荐 = 1
9
+    type: string
10
+}
11
+export interface SharePosterClassifyResult {
12
+    sharePostersClassifyList: Array<SharePostersClassify>
13
+}
14
+
15
+export interface SharePostersClassify {
16
+    id: string
17
+    name: string
18
+}
19
+
20
+export interface SharePosterImageResult {
21
+    pageInfo: PageInfoModel<SharePosterImageModel>
22
+}
23
+
24
+export interface SharePosterImageModel {
25
+    id: number
26
+    name: string
27
+    // 背景图片路径
28
+    image: string
29
+    classify: string
30
+    qr_coordinate: string
31
+    head_coordinate: string
32
+    nickname_coordinate: string
33
+    head_size: string
34
+    qr_size: string
35
+    nickname_size: string
36
+    image_fake: string
37
+    type: string
38
+}

+ 40 - 0
src/apis/model/invitePartnerModel.ts

@@ -0,0 +1,40 @@
1
+export interface UserInviteParams {
2
+    pageNum: number
3
+    pageSize: number
4
+    uid?: string
5
+    nickname?: string
6
+}
7
+export interface UserInviteDataModel {
8
+    uid: number
9
+    // 用户名
10
+    nickname: string
11
+    // 用户类型
12
+    statusType: string
13
+    // 成功推广时间
14
+    promoterTime: string
15
+    avatar: string
16
+    phone: string
17
+}
18
+export interface UserInviteVoListModel {
19
+    total: number
20
+    list: UserInviteDataModel[]
21
+    pageNum: number
22
+    pageSize: number
23
+    size: number
24
+    startRow: number
25
+    endRow: number
26
+    pages: number
27
+    prePage: number
28
+    nextPage: number
29
+    isFirstPage: boolean
30
+    isLastPage: boolean
31
+    hasPreviousPage: boolean
32
+    hasNextPage: boolean
33
+    navigatePages: boolean
34
+    navigateLastPage: number
35
+}
36
+export interface InvitePartnerModel {
37
+    userCount: number
38
+    MerchantCount: number
39
+    userInviteVoList?: UserInviteVoListModel
40
+}

+ 54 - 0
src/apis/model/login.model.ts

@@ -0,0 +1,54 @@
1
+export interface LoginModel {
2
+    // 用户令牌
3
+    token: string
4
+    // 令牌可用时间
5
+    exp: number
6
+    // 用户信息
7
+    user: LoginUserModel
8
+}
9
+
10
+export interface LoginUserModel {
11
+    uid: string//用户id
12
+    wechat_user_id: string//微信用户 id
13
+    ali_user_id: string//支付宝用户id
14
+    account: string//用户账号
15
+    sex: string//性别
16
+    nickname: string//用户昵称
17
+    avatar: string//用户头像
18
+    phone: string//手机号码
19
+    now_score: string//用户积分
20
+    now_money: string//用户余额
21
+    user_type: string//用户类型
22
+    promoter_time: string//成功推广时间
23
+    is_promoter: string//是否为推广员
24
+    pay_count: string//用户购买次数
25
+    pay_price: string//用户消费金额
26
+    spread_count: string//下级人数
27
+    adr_id: string//身份所对应的区域id
28
+    identity: string//1 镇代 2 县代 3 市代 4 商户 5 推广员 6渠道商
29
+    mer_id: string//首次消费绑定商户
30
+    mer_topping: string//置顶商户
31
+    user_name: string
32
+    annuity_frozen: string//养老金 冻结
33
+    annuity_num: string//几笔养老金
34
+    annuity: string//养老金
35
+    agent_rebate: string//推荐推广员返利
36
+    mer_rebate: string//推荐商户返利
37
+    promoter_rebate: string//推荐代理返利
38
+    cross_store: string//跨店收入
39
+    jurisdiction: string//辖区内收入
40
+    other_jurisdictions: string//跨区收入
41
+    adv_fee: string//广告费
42
+    xqxiaofei: string//自己辖区消费返利
43
+    birthday60: string//60岁生日
44
+    card_number: string//卡号 养老金
45
+    annuity_yiqu: string//已支取
46
+    is_new: string//是否为新用户:0=>是,1=>不是
47
+    admin_agent_rate: string//平台收入
48
+    locktime: string//会员锁定时间
49
+    user_number: string//用户编号
50
+    im: string//环信账号。0:未注册。1:已注册。
51
+    im_uuid: string//环信UUID
52
+    test_user: string//是否是测试用户
53
+    is_channel: string//是否是渠道商
54
+}

+ 64 - 0
src/apis/model/loginrespone.json

@@ -0,0 +1,64 @@
1
+{
2
+  "status": 200,
3
+  "message": "success",
4
+  "data": {
5
+    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0ZXN0LmJqdGRiYS5jb20iLCJhdWQiOiJ0ZXN0LmJqdGRiYS5jb20iLCJpYXQiOjE2OTM3MzgzNjQsIm5iZiI6MTY5MzczODM2NCwiZXhwIjoxNzA0NTM4MzY0LCJqdGkiOls5OTI5LCJ1c2VyIl19.l37RvPq47-HK6Hay5FJCLnRef9ELVukVmPU59kCt6l8",
6
+    "exp": 10800000,
7
+    "user": {
8
+      "uid": "9929",
9
+      "wechat_user_id": "0",
10
+      "ali_user_id": "2088002106217164",
11
+      "account": "13488689885",
12
+      "sex": "0",
13
+      "nickname": "134****9885",
14
+      "avatar": "https:\/\/app.bjtdba.com\/uploads\/logo.jpg",
15
+      "phone": "13488689885",
16
+      "now_score": "0.00",
17
+      "now_money": "0.00",
18
+      "member_brokerage_price": "0.00",
19
+      "user_type": "APP",
20
+      "promoter_time": null,
21
+      "is_promoter": "0",
22
+      "pay_count": "0",
23
+      "pay_price": "0.00",
24
+      "spread_count": "0",
25
+      "adr_id": null,
26
+      "identity": "0",
27
+      "mer_id": "0",
28
+      "mer_topping": null,
29
+      "user_name": null,
30
+      "annuity_frozen": "0.00",
31
+      "annuity_num": "0",
32
+      "annuity": "0.00",
33
+      "agent_rebate": "0.00",
34
+      "mer_rebate": "0.00",
35
+      "promoter_rebate": "0.00",
36
+      "cross_store": "0.00",
37
+      "jurisdiction": "0.00",
38
+      "other_jurisdictions": "0.00",
39
+      "adv_fee": "0.00",
40
+      "xqxiaofei": "0.00",
41
+      "birthday60": null,
42
+      "card_number": null,
43
+      "annuity_yiqu": "0.00",
44
+      "is_new": "1",
45
+      "admin_agent_rate": "0.00",
46
+      "locktime": null,
47
+      "user_number": "C000009929",
48
+      "im": "0",
49
+      "im_uuid": null,
50
+      "test_user": "0",
51
+      "is_channel": "0",
52
+      "score": "2.00",
53
+      "annuity_once": "0",
54
+      "first_sign": "1",
55
+      "is_del": "0",
56
+      "first_shopping": "0",
57
+      "external": "1",
58
+      "external_id": null,
59
+      "score_beishengtang": "0.00",
60
+      "level_id": "9542",
61
+      "level": "5"
62
+    }
63
+  }
64
+}

+ 30 - 0
src/apis/model/myRelationMerchantModel.ts

@@ -0,0 +1,30 @@
1
+export interface MyRelationMerchantParams {
2
+    keywords: string
3
+    page: number
4
+    limit: number
5
+}
6
+
7
+export interface MyRelationMerchantResult {
8
+    count: number
9
+    list: Array<MyRelationMerchantModel>
10
+}
11
+
12
+export interface MyRelationMerchantModel {
13
+    type_id: string
14
+    type: string
15
+    // 店铺 id
16
+    mer_id: string
17
+    // 店铺 logo
18
+    mer_avatar: string
19
+    // 店铺名称
20
+    mer_name: string
21
+    // 商品描述评分
22
+    product_score: string
23
+    // 服务评分
24
+    service_score: string
25
+    // 物流评分
26
+    postage_score: string
27
+    status: string
28
+    // 人气
29
+    care_count: string
30
+}

+ 26 - 0
src/apis/model/myRelationProductModel.ts

@@ -0,0 +1,26 @@
1
+export interface MyRelationProductPrams {
2
+    page: number
3
+    limit: number
4
+    keyword: string
5
+}
6
+export interface MyRelationProductResult {
7
+    count: number
8
+    list: Array<MyRelationProductModel>
9
+}
10
+export interface MyRelationProductModel {
11
+    type_id: string
12
+    type: string
13
+    // 商品 id
14
+    product_id: string
15
+    // 图片
16
+    image: string
17
+    // 名称
18
+    store_name: string
19
+    // 价格
20
+    price: string
21
+    is_show: string
22
+    status: string
23
+    care_count: string
24
+    // 原价(划线价格)
25
+    ot_price: string
26
+}

+ 346 - 0
src/apis/model/order.model.ts

@@ -0,0 +1,346 @@
1
+import type {DcListModel} from "~/apis/model/dc.model"
2
+
3
+// 待付款订单
4
+export interface OrderListObligationResult {
5
+    count: number
6
+    list: Array<OrderListObligationModel>
7
+}
8
+
9
+export interface OrderListObligationModel {
10
+     group_order_id: string//订单id
11
+     group_order_sn: string
12
+     uid: string
13
+     total_postage: string
14
+     total_price: string
15
+     total_num: string
16
+     coupon_price: string
17
+     real_name: string
18
+     user_phone: string
19
+     user_address: string
20
+     pay_price: string
21
+     pay_postage: string
22
+     cost: string
23
+     give_coupon_ids: string
24
+     paid: string
25
+     pay_time: string
26
+     pay_type: string
27
+     create_time: string
28
+     is_remind: string
29
+     is_del: string
30
+     rand: string
31
+     split: string
32
+     serialNumber: string
33
+     test_order: string
34
+    orderList: Array<ObligationOrderModel>
35
+    merchant: {
36
+        mer_id: string
37
+        mer_name: string
38
+        mer_avatar: string
39
+    }
40
+
41
+}
42
+export interface ObligationOrderModel {
43
+    order_id: string
44
+    orderProduct: Array<ObligationOrderProductModel>
45
+}
46
+
47
+export interface ObligationOrderProductModel {
48
+     order_product_id: string
49
+     order_id: string
50
+     uid: string
51
+     cart_id: string
52
+     product_id: string
53
+     extension_one: string
54
+     extension_two: string
55
+     product_sku: string
56
+     is_refund: string
57
+     product_num: string
58
+     refund_num: string
59
+     is_reply: string
60
+     product_price: string
61
+    cart_info: CartInfoModel
62
+     create_time: string
63
+}
64
+
65
+export interface OrderListResult {
66
+    list: OrderListModel[],
67
+    total: number,
68
+    count: number
69
+}
70
+
71
+export interface OrderListModel {
72
+    source: string//订单类型:1拼多多2唯品会3苏宁5淘宝6京东7app
73
+    id: string
74
+    goods_id: string
75
+    goods_sign: string//拼多多id
76
+    order_sn: string//订单号
77
+    goods_num: string//商品数量
78
+    goods_img: string//图片
79
+    goods_name: string//名称
80
+    goods_price: string//价格
81
+    other_status: string//订单状态
82
+    other_status_desc: string//状态名称
83
+    order_money: string//订单金额
84
+    pay_money: string//支付金额
85
+    create_time: string//创建时间
86
+    commission: string//佣金
87
+    bill_status: string//结算状态
88
+    bill_end_time: string//结算时间
89
+    status_name: string//状态名称
90
+    yanglao: string//养老金
91
+    group_order_sn: string
92
+
93
+    order_id: string//订单ID
94
+    group_order_id: string
95
+
96
+    uid: string//用户 ID
97
+    real_name: string//联系人
98
+    user_phone: string//联系电话
99
+    user_address: string//收货地址
100
+    cart_id: string
101
+    total_num: string//商品数
102
+    total_price: string//订单总额
103
+    total_postage: string//邮费
104
+    pay_price: string//支付金额
105
+    pay_postage: string//支付邮费
106
+    extension_one: string//一级佣金
107
+    extension_two: string//二级佣金
108
+    commission_rate: string//平台手续费
109
+    coupon_id: string//优惠券id
110
+    coupon_price: string//优惠金额
111
+    order_type: string//0普通1自提
112
+    paid: string//是否支付
113
+    pay_time: string//支付时间
114
+    pay_type: string//支付方式 0=余额 1=微信 2=小程序 3=h5 4=支付宝 5=积分
115
+    status: string//订单状态(0:待发货;1:待收货;2:待评价;3:已完成;4已申请退款;-1:已退款)5未支付
116
+    delivery_type: string//发货类型(1:发货 2: 送货 3: 虚拟)
117
+    delivery_name: string//快递名称/送货人姓名
118
+    delivery_id: string//快递单号/手机号
119
+    mark: string//备注
120
+    remark: string//管理员备注
121
+    admin_mark: string//总后台备注
122
+    verify_code: string//核销码
123
+    verify_time: string//核销时间
124
+    verify_service_id: string//核销客服 id
125
+    mer_id: string//商户ID
126
+    reconciliation_id: string//对账id
127
+    cost: string//成本价
128
+    is_del: string
129
+    is_system_del: string//后台是否删除
130
+    remind: string
131
+    remind_time: string
132
+    gzc: string//是否记录公证处入账明细
133
+    trade_no: string//SaaS平台的交易订单编号
134
+    channel_trade_no: string//渠道商订单号
135
+    alipay_no: string//支付宝单号
136
+    weixin_no: string//微信单号
137
+    table_id: string
138
+    mer_money: string//商户可收金额
139
+    last_status: string//上次订单状态 用于拒绝退款
140
+    share_id: string//分享的ID
141
+    pay_mer_id: string//积分支付用的商户ID
142
+    is_split_to_tomorrow: string//0不分账 1分账
143
+    service_money: string//分给服务商的钱
144
+    test_order: string//测试订单
145
+    dacang_id: string//大仓ID
146
+    distribution_mode: string//1快递 2 自提
147
+    da_cang_profit: string//大仓利润
148
+    recommended_merchants: string//推荐商家流水返佣
149
+    mer_fanyong: string//商户分佣金额
150
+    is_dacang: string//1大仓订单 2非大仓订单 0 之前的订单
151
+    orderProduct: Array<OrderProductModel>
152
+    merchant: {
153
+        mer_id: string
154
+        mer_name: string
155
+        mer_avatar: string
156
+    }
157
+}
158
+
159
+export interface OrderProductModel {
160
+    order_product_id: string
161
+    order_id: string
162
+    uid: string
163
+    cart_id: string//购物车id
164
+    product_id: string
165
+    extension_one: string
166
+    extension_two: string
167
+    product_sku: string
168
+    is_refund: string
169
+    product_num: string
170
+    refund_num: string
171
+    is_reply: string
172
+    product_price: string
173
+    cart_info: CartInfoModel
174
+    create_time: string
175
+}
176
+
177
+export interface CartInfoModel {
178
+    product_type: string
179
+    product: {
180
+        product_id: string
181
+        image: string
182
+        store_name: string
183
+        is_show: string
184
+        status: string
185
+        is_del: string
186
+        unit_name: string
187
+        price: string
188
+        mer_status: string
189
+        temp_id: string
190
+        give_coupon_ids: Array<string>
191
+        is_gift_bag: string
192
+        is_used: string
193
+        product_type: string
194
+        old_product_id: string
195
+        temp: {
196
+            shipping_template_id: string
197
+            name: string
198
+            type: string
199
+            appoint: string
200
+            undelivery: string
201
+            mer_id: string
202
+            is_default: string
203
+            sort: string
204
+            create_time: string
205
+            undelives: string
206
+            freeAddress: {
207
+                shipping_template_free_id: string
208
+                temp_id: string
209
+                city_id: string
210
+                number: string
211
+                price: string
212
+            }
213
+        }
214
+    }
215
+    productAttr: {
216
+        product_id: string
217
+        stock: string
218
+        price: string
219
+        unique: string
220
+        sku: string
221
+        volume: string
222
+        weight: string
223
+        ot_price: string
224
+        dacang_price: string
225
+        cost: string
226
+        bc_extension_one: string
227
+        bc_extension_two: string
228
+    }
229
+}
230
+
231
+export interface OrderCreateModel {
232
+    // 订单ID
233
+    order_id: string
234
+    groupOrder: GroupOrderModel
235
+}
236
+
237
+export interface GroupOrderModel {
238
+    group_order_sn: string//订单编号
239
+    give_coupon_ids: Array<string>
240
+    group_order_id: string//订单组 id
241
+    uid: string//用户id
242
+    real_name: string//用户姓名
243
+    user_phone: string//用户电话
244
+    user_address: string//详细地址
245
+    total_num: string//订单商品总数
246
+    total_price: string//订单总价
247
+    total_postage: string//邮费
248
+    pay_price: string//实际支付金额
249
+    pay_postage: string//支付邮费
250
+    coupon_price: string//优惠券金额
251
+    pay_type: string//支付方式 0余额 1微信 2小程序 4支付宝 5特殊商户积分
252
+    create_time: string//创建时间
253
+    cost: string//成本价
254
+}
255
+
256
+export interface OrderCreateShoppingModel {
257
+    cart_id: string
258
+}
259
+
260
+export interface OrderCheckModel {
261
+    order_price: string
262
+    total_price: string
263
+    status: string
264
+    is_dacang_vip_product: string
265
+    order: Array<OrderDataModel>
266
+}
267
+
268
+export interface OrderDataModel {
269
+    mer_id: string
270
+    mer_name: string
271
+    mer_state: string
272
+    mer_avatar: string
273
+    list: Array<OrderListDataModel>
274
+    remark: string
275
+    dcList: Array<DcListModel>
276
+}
277
+
278
+export interface OrderListDataModel {
279
+    cart_id: string
280
+    uid: string
281
+    mer_id: string
282
+    product_type: string
283
+    product_id: string
284
+    product_attr_unique: string
285
+    cart_num: number
286
+    create_time: string
287
+    source: string
288
+    source_id: string
289
+    is_pay: string
290
+    is_del: string
291
+    is_new: string
292
+    is_fail: string
293
+    product: OrderProductDataModel,
294
+    productAttr: OrderProductAttrDataModel,
295
+    // private ProductData product: string
296
+    // private ProductAttrData productAttr: string
297
+    yanglao: string//养老
298
+}
299
+
300
+export interface OrderProductDataModel {
301
+    product_id: string
302
+    image: string
303
+    store_name: string
304
+    is_show: string
305
+    status: string
306
+    is_del: string
307
+    unit_name: string
308
+    price: string
309
+    mer_status: string
310
+    temp_id: string
311
+}
312
+
313
+export interface OrderProductAttrDataModel {
314
+    product_id: string
315
+    stock: string
316
+    price: string
317
+    unique: string
318
+    sku: string
319
+    volume: string
320
+    weight: string
321
+    ot_price: string
322
+    dacang_price: string
323
+    bc_extension_one: string
324
+    bc_extension_two: string
325
+}
326
+
327
+export interface OrderProductDataModel {
328
+    product_id: string
329
+    image: string
330
+    store_name: string
331
+    is_show: string
332
+    status: string
333
+    is_del: string
334
+    unit_name: string
335
+    price: string
336
+    mer_status: string
337
+    temp_id: string
338
+}
339
+
340
+
341
+export interface IntegralOrderCreateModel {
342
+    status: string
343
+    result: {
344
+        order_id
345
+    }
346
+}

+ 6 - 0
src/apis/model/pageModel.ts

@@ -0,0 +1,6 @@
1
+export interface PageModel {
2
+    page: number
3
+    limit: number
4
+}
5
+
6
+export interface PageResult {}

+ 4 - 0
src/apis/model/path.model.ts

@@ -0,0 +1,4 @@
1
+export interface PathModel {
2
+    path: string
3
+    pathName: string
4
+}

+ 622 - 0
src/apis/model/product.model.ts

@@ -0,0 +1,622 @@
1
+import type {PageInfoModel} from "~/apis/model/common"
2
+
3
+enum ORDER {
4
+    SALES = 'sales',
5
+    IS_NEW = 'is_new',
6
+    PRICE_ASC = 'price_asc',
7
+    PRICE_DESC = 'price_desc',
8
+}
9
+
10
+export interface ProductParams {
11
+    // skuId?: string
12
+    keyword?: string
13
+    title?: string
14
+    page: number,
15
+    limit: number
16
+}
17
+
18
+export interface SearchProductParams {
19
+    mer_keyword: string
20
+    pageNum: number
21
+    pageSize: number
22
+    order: ORDER
23
+    // order: 'sales' | 'is_new' | 'price_asc'
24
+}
25
+
26
+/**
27
+ * 商品搜索结果集
28
+ */
29
+export interface SearchProductResult {
30
+    pageInfo: PageInfoModel<ProductDetailModel>
31
+}
32
+
33
+export interface IProductDetail {
34
+    // 产品所属平台
35
+    mallName: string
36
+    // 京东、淘宝、拼多多等
37
+    platform: number
38
+    // 商品ID
39
+    id: string
40
+    // 商品名
41
+    title: string
42
+    // 现价销售价格
43
+    salePrice: number
44
+    // 原价
45
+    price: number
46
+    // 分销URL
47
+    spreadUrl: string
48
+    // 商品图
49
+    featured: Array<string>
50
+    // 商品介绍详情图
51
+    images: Array<string>
52
+    coupon: Partial<{
53
+        // 优惠券金额
54
+        amount: string | number
55
+        // 优惠券有效期
56
+        startTime: string
57
+        endTime: string
58
+    }> | null
59
+    // 养老金补助
60
+    allowance: number
61
+}
62
+
63
+export interface HomeProduct {
64
+    type: string//类型:1:普通商品,2:爆款商品,5:会员专享商品(城中大仓)6:三方 京推推
65
+    skuId: string//商品SKU,商品类型为3时显示
66
+    id: string//京东_品牌code,商品类型为3时显示
67
+    name: string//京推推商品精编标题,
68
+    thumb: string//	 京推推商品主图(京推推优化过的商品主图,建议用户将其设为商品展示主图)
69
+    // 如因图片过大建议优化图片大小:例http://img.jingtuitui.com/a497d202011251136243678.jpg?imageView2/1/w/120/h/120/q/75,
70
+    // 商品类型为3时显示
71
+    commission: string//养老金
72
+    commission_rate: string//商品佣金比例(具体佣金可根据平台分佣体系进行计算显示),商品类型为3时显示
73
+    sales: string//京东商品近30天销量(商品类型为3时): string  销量(商品类型为1,2时)
74
+//     coupon_money: string//优惠券金额,商品类型为3时显示
75
+    coupon_link: string//优惠券链接,商品类型为3时显示
76
+    lowestCouponPrice: string//商品最终价格(使用优惠券后的商品最终价格),商品类型为3时显示
77
+    price: string//商品原价,商品类型为3时显示
78
+    flag: string//商品类型:1:大仓,2:平台内部,3:三方 京推推
79
+    product_id: string//商品ID, 商品类型为1,2时显示
80
+    store_name: string//商品名称,商品类型为1,2时显示
81
+    yanglao: string//养老金,商品类型为1,2时显示
82
+    ot_price: string//原价,商品类型为1,2时显示
83
+    da_cang_price: string//大仓会员价,商品类型为1,2时显示
84
+    image: string//商品图片,商品类型为1,2时显示
85
+    coupon_money: {
86
+        discount: string
87
+        getStartTime: string
88
+        getEndTime: string
89
+    }[]
90
+}
91
+
92
+/**
93
+ * 抖音商品详情
94
+ */
95
+export type DyProductDetailModel = {
96
+    brand: {
97
+        brandId: string
98
+        brandNameCn: string
99
+        brandNameEn: string
100
+    }
101
+    categoryId: string
102
+    categoryName: string
103
+    commentNum: string
104
+    commentScore: string
105
+    cosFee: string
106
+    cosRatio: string
107
+    couponPrice: string
108
+    cover: string
109
+    detailUrl: string
110
+    firstCid: string
111
+    hasSxt: boolean
112
+    imgs: Array<string>
113
+    inStock: boolean
114
+    kolCosFee: string
115
+    kolCosRatio: string
116
+    kolNum: string
117
+    logisticsInfo: string
118
+    orderNum: string
119
+    price: string
120
+    productId: string
121
+    reason: string
122
+    sales: string
123
+    secondCid: string
124
+    sharable: boolean
125
+    shopId: string
126
+    shopName: string
127
+
128
+    status: string
129
+    tags: {
130
+        hasShopBrandTag: boolean
131
+    }
132
+    thirdCid: string
133
+    title: string
134
+    viewNum: string
135
+    yanglao: string
136
+    dyZlink: string
137
+    dyDeeplink: string
138
+}
139
+
140
+/**
141
+ * 抖音直播间
142
+ */
143
+export type DyLiveModel = {
144
+    // 昵称
145
+    authorName: string
146
+    // 等级
147
+    authorLevel: string
148
+    // 直播头像
149
+    authorPic: string
150
+    // 商品类别
151
+    productCategory: Array<string>
152
+    // 粉丝数量
153
+    fansNum: string
154
+    // 场均 gmv
155
+    averageGmv: string
156
+    // 直播间id
157
+    roomId: string
158
+    // 正在直播
159
+    isLive: boolean
160
+    // 性别 male female 未知
161
+    gender: string
162
+    // 主播百应ID
163
+    buyinId: string
164
+    share: DyLiveShare
165
+}
166
+
167
+export type DyLiveShare = {
168
+    dyDeeplink: string
169
+    dyPassword: string
170
+    dyZlink: string
171
+    qrCode: {
172
+        height: number
173
+        width: number
174
+        url: string
175
+    }
176
+}
177
+/**
178
+ * 抖音直播商品
179
+ */
180
+export type DyLiveProductModel = {
181
+    productId: string
182
+    cover: string
183
+    title: string
184
+    price: string
185
+}
186
+
187
+/**
188
+ * 抖音商品
189
+ */
190
+export type DyProductModel = {
191
+    // 类别 6
192
+    type: string
193
+    id: string
194
+    thumb: string
195
+    name: string
196
+    commission: string
197
+    commission_rate: string
198
+    price: string
199
+    sales: string
200
+    detailUrl: string
201
+}
202
+
203
+export type PDDProductDetailModel = {
204
+    category_name: string
205
+    coupon_remain_quantity: string
206
+    promotion_rate: string
207
+    service_tags: Array<number>
208
+    mall_id: string
209
+    mall_name: string
210
+    mall_coupon_end_time: string
211
+    lgst_txt: string
212
+    goods_name: string//商品名称
213
+    goods_gallery_urls: Array<string>//轮播图
214
+    goods_id: string
215
+    brand_name: string
216
+    predict_promotion_rate: string
217
+    goods_desc: string
218
+    opt_name: string
219
+    share_rate: string
220
+    opt_ids: Array<number>
221
+    goods_image_url: string
222
+    mall_img_url: string
223
+    has_mall_coupon: string
224
+    unified_tags: Array<string>
225
+    video_urls: Array<string>
226
+    coupon_start_time: number//优惠券开始时间(10位时间戳)
227
+    min_group_price: number//券后价(单位:分)
228
+    coupon_discount: string//优惠券面额
229
+    coupon_end_time: number//优惠券结束时间(10位时间戳)
230
+    zs_duo_id: string
231
+    mall_coupon_remain_quantity: string
232
+    plan_type: string
233
+    extra_coupon_amount: number
234
+//    <String> material_list: string
235
+    cat_ids: Array<number>
236
+    coupon_min_order_amount: string
237
+    category_id: string
238
+    mall_coupon_discount_pct: string
239
+    coupon_total_quantity: string
240
+    mall_coupon_min_order_amount: string
241
+    merchant_type: string
242
+    sales_tip: string//销量
243
+    only_scene_auth: string
244
+    desc_txt: string
245
+    goods_thumbnail_url: string
246
+    opt_id: string
247
+    activity_tags: Array<number>
248
+    has_coupon: string
249
+    min_normal_price: number//原价(单位:分)
250
+    mall_coupon_start_time: string
251
+    serv_txt: string
252
+    mall_coupon_total_quantity: string
253
+    mall_coupon_max_discount_amount: string
254
+    mall_cps: string
255
+    goods_sign: string
256
+    yanglao: string//养老金
257
+    pddlink: PddLink//链接
258
+}
259
+
260
+export type PddLink = {
261
+    mobile_url: string
262
+    url: string
263
+    wx_url: string
264
+    wx: PddWx
265
+}
266
+
267
+export type PddWx = {
268
+    we_app_icon_url: string
269
+    user_name: string
270
+    page_path: string
271
+    source_display_name: string
272
+    title: string
273
+    app_id: string
274
+    desc: string
275
+}
276
+/**
277
+ * 拼多多
278
+ */
279
+export type PDDProductModel = {
280
+    type: string
281
+    id: string
282
+    thumb: string
283
+    name: string
284
+    commission: string
285
+    commission_rate: string
286
+    sales: string
287
+    coupon_money: string
288
+    market_price: string
289
+    price: string
290
+    min_group_price: string
291
+}
292
+
293
+export interface VipProductParams {
294
+    goodsId: string
295
+}
296
+
297
+export type VipProductModel = {
298
+    type: number
299
+    id: string
300
+    thumb: string
301
+    name: string
302
+    commission: string
303
+    commission_rate: string
304
+    sales: string
305
+    coupon_money: string
306
+    market_price: string
307
+    price: string
308
+}
309
+
310
+export interface VipProductResult {
311
+    returnCode: string
312
+    result: Array<VipProductDetailModel>
313
+    // 养老金
314
+    yanglao: string
315
+    wphlink: WphlinkModel
316
+}
317
+
318
+export interface WphlinkModel {
319
+    url: string
320
+    longUrl: string
321
+    ulUrl: string
322
+    vipQuickAppUrl: string
323
+}
324
+
325
+export interface VipProductDetailModel {
326
+    // 商品原价
327
+    marketPrice: string
328
+    commissionRate: string
329
+    whiteImage: string
330
+    goodsId: string
331
+    discount: string
332
+    // 轮播图
333
+    goodsCarouselPictures: Array<string>
334
+    // 详情
335
+    goodsDetailPictures: Array<string>
336
+    categoryName: string
337
+    haiTao: string
338
+    prepayInfo: PrepayInfoModel
339
+    cat2ndName: string
340
+    isSubsidyActivityGoods: boolean
341
+    cat1stName: string
342
+    // 劵后价
343
+    vipPrice: string
344
+    commission: string
345
+    sn: string
346
+    cat1stId: string
347
+    // 商品名称
348
+    goodsName: string
349
+    storeServiceCapabilityModel: StoreServiceCapabilityModel
350
+    brandName: string
351
+    brandLogoFull: string
352
+    couponInfo: CouponInfoModel
353
+    brandStoreSn: string
354
+    sellTimeFrom: string
355
+    schemeStartTime: string
356
+    commentsInfo: CommentsInfoModel
357
+    saleStockStatus: string
358
+    schemeEndTime: string
359
+    sourceType: string
360
+    sellTimeTo: string
361
+    brandId: string
362
+    goodsThumbUrl: string
363
+    cat2ndId: string
364
+    spuId: string
365
+    storeInfo: string
366
+    goodsMainPicture: string
367
+    destUrl: string
368
+    categoryId: string
369
+    status: string
370
+}
371
+
372
+export interface StoreInfoModel {
373
+    storeName: string
374
+    storeId: string
375
+}
376
+
377
+export interface CommentsInfoModel {
378
+    comments: string
379
+    goodCommentsShare: string
380
+}
381
+
382
+export interface CouponInfoModel {
383
+    useEndTime: string
384
+    totalAmount: string
385
+    couponName: string
386
+    activateEndTime: string
387
+    couponType: string
388
+    buy: string
389
+    useBeginTime: string
390
+    couponNo: string
391
+    fav: string
392
+    activateBeginTime: string
393
+    activedAmount: string
394
+}
395
+
396
+export interface StoreServiceCapabilityModel {
397
+    storeScore: string
398
+    storeRankRate: string
399
+}
400
+
401
+export interface PrepayInfoModel {
402
+    isPrepay: string
403
+}
404
+
405
+/**
406
+ * 苏宁商品详情
407
+ */
408
+export type SuNingProductDetailModel = {
409
+    updateDate: string
410
+    thirdCategoryCode: string
411
+    promoDesc: string
412
+    fourthCategoryCode: string
413
+    categoryName: string
414
+    suningPrice: string//原价
415
+    firstCategoryName: string
416
+    rate: string
417
+    operatingModel: string
418
+    price: string//售价
419
+    goodsName: string//名称
420
+    brandCode: string
421
+    secondCategoryCode: string
422
+    wapPrePayCommission: string
423
+    mertCode: string
424
+    pictureUrl: string//图片
425
+    cmmdtyEanCode: string
426
+    thirdCategoryName: string
427
+    vendorName: string
428
+    fourthCategoryName: string
429
+    prePayCommission: string
430
+    firstCategoryCode: string
431
+    secondCategoryName: string
432
+    wapRate: string
433
+    goodsCode: string
434
+    upStatus: string
435
+    productUrl: string
436
+    productUrlWap: string
437
+    detail: Array<string>//详情
438
+    url: string//链接
439
+}
440
+
441
+/**
442
+ * 苏宁
443
+ */
444
+export type SuNingProductModel = {
445
+    type: string
446
+    id: string
447
+    thumb: string
448
+    name: string
449
+    commission: string
450
+    commission_rate: string
451
+    sales: string
452
+    coupon_money: string
453
+    market_price: string
454
+    price: string
455
+}
456
+
457
+/**
458
+ * 淘宝商品详情
459
+ */
460
+export interface TaobaoProductDetailModel {
461
+    waresDetail: TaobaoWaresDetail
462
+}
463
+
464
+export interface TaobaoWaresDetail {
465
+    pict_url: string
466
+    // 商品名称
467
+    title: string
468
+    // 商品原价
469
+    reserve_price: number
470
+    // 劵后价
471
+    zk_final_price: number
472
+    // 领券链接
473
+    link: string
474
+    small_images: Array<string>
475
+    couponStartTime: string
476
+    couponEndTime: string
477
+}
478
+
479
+/**
480
+ * 淘宝商品列表结果集
481
+ */
482
+export interface TaobaoProductResult {
483
+    thirdPartyWaresList: Array<TaobaoProductThirdPartyWaresModel>
484
+}
485
+
486
+
487
+export type TaobaoProductThirdPartyWaresModel = {
488
+    // 5 淘宝产品
489
+    type: number
490
+    id: string
491
+    // 商品图片
492
+    thumb: string
493
+    // 商品名称
494
+    name: string
495
+    // 养老金
496
+    commission: string
497
+    commission_rate: string
498
+    commission_type: string
499
+    // 销量
500
+    sales: string
501
+    coupon_money: string
502
+    // 原价
503
+    market_price: string
504
+    // 券后价
505
+    price: string
506
+    // 领券链接
507
+    coupon_share_url: string
508
+}
509
+
510
+export interface JdProductDetailModel {
511
+    // 京东商品原标题
512
+    goodsName: string
513
+    // 图片信息 京东图片合集(第一张图为京东商品主图)
514
+    imgUrl: string
515
+    // 商品原价
516
+    unitPrice: number
517
+    // 商品原价
518
+    wlUnitPrice: number
519
+    // 优惠券面额
520
+    couMoney: string
521
+    // 券后价
522
+    nowPrice: number
523
+    // 图片集合
524
+    detail: Array<string>
525
+    // 预估养老金
526
+    yanglao: number
527
+    // 将您的联盟信息、商品SKU以及优惠券链接进行转链,
528
+    // 返回商品的二合一领券下单链接,转链后的结果可进行推广
529
+    materialUrl: string
530
+}
531
+
532
+export type JdProductModel = {
533
+    // 6:表示京东商品 2表示唯品会 5:表示淘宝商品 1:表示拼多多商品 3苏宁
534
+    type: number
535
+    // skuid
536
+    skuId: string
537
+    id: string
538
+    // 商品名称
539
+    name: string
540
+    thumb: string
541
+    commission: number
542
+    commission_rate: string
543
+    // 销量
544
+    sales: string
545
+    coupon_money: Array<CouponMoneyModel>
546
+    // 优惠券链接
547
+    coupon_link: string
548
+    // 券后价格
549
+    lowestCouponPrice: number
550
+    // 原价(划线)京东
551
+    price: number
552
+    // 原价(划线)唯品会
553
+    market_price: number
554
+    // 淘宝原价
555
+    reserve_price: number
556
+    // 淘宝券后价
557
+    zk_final_price: number
558
+}
559
+
560
+export interface CouponMoneyModel {
561
+    discount: string
562
+    getStartTime: string
563
+    getEndTime: string
564
+}
565
+
566
+export interface ProductDetailModel {
567
+    // 商品 ID
568
+    product_id: string
569
+    // 店铺 ID
570
+    mer_id: string
571
+    // 商品图片
572
+    image: string
573
+    // 轮播图
574
+    slider_image: string
575
+    // 轮播图组
576
+    slider_image_list: string
577
+    // 商品名称
578
+    store_name: string
579
+    // 商品简介
580
+    store_info: string
581
+    // 商品单位名
582
+    unit_name: string
583
+    // 最低价格
584
+    price: string
585
+    // 成本价
586
+    cost: string
587
+    // 原价
588
+    ot_price: string
589
+    // 总库存
590
+    stock: string
591
+    // 销量
592
+    sales: string
593
+    // 虚拟销量
594
+    ficti: string
595
+    // 视频链接
596
+    video_link: string
597
+    // 0普通商品,1秒杀商品
598
+    product_type: string
599
+    /** 商品类型:1:普通商品。2:爆款商品。3:消费积分商品 。5:会员专享商品(城中大仓)6:每日免费领商品 */
600
+    type: string
601
+    // 大仓价格
602
+    dc_price: string
603
+    // 是否秒杀 1是 0不是
604
+    seckill: string
605
+    extension_type: string
606
+    // 养老金(计算好的价格)
607
+    yanglao_price: string
608
+}
609
+
610
+export interface SkuModel {
611
+    // 名字
612
+    sku: string
613
+    // 价格
614
+    price: string
615
+    // 编号
616
+    unique: string
617
+    // 库存
618
+    stock: string
619
+    // 图片
620
+    image: string
621
+    dacang: string
622
+}

+ 41 - 0
src/apis/model/replyModel.ts

@@ -0,0 +1,41 @@
1
+export interface ReplyParams {
2
+    page: number
3
+    limit: number
4
+}
5
+export interface ReplyResult {
6
+    count: number
7
+    list: Array<ReplyModel>
8
+}
9
+
10
+export interface ReplyModel {
11
+    // 评论id
12
+    reply_id: string
13
+    uid: string
14
+    // 商户id
15
+    mer_id: string
16
+    // 订单商品id
17
+    order_product_id: string
18
+    unique: string
19
+    // 商品id
20
+    product_id: string
21
+    product_type: string
22
+    product_score: string
23
+    service_score: string
24
+    postage_score: string
25
+    // 平均值
26
+    rate: string
27
+    // 评论内容
28
+    comment: string
29
+    // 图片(用,隔开)
30
+    pics: string
31
+    create_time: string
32
+    merchant_reply_content: string
33
+    merchant_reply_time: string
34
+    is_del: string
35
+    is_reply: string
36
+    is_virtual: string
37
+    // 评论人昵称
38
+    nickname: string
39
+    // 头像
40
+    avatar: string
41
+}

+ 35 - 0
src/apis/model/revenueSharingModel.ts

@@ -0,0 +1,35 @@
1
+export interface RevenueSharingParams {
2
+    page: number,
3
+    limit: number,
4
+    // 0线上, 1线下
5
+    type: number
6
+    // pageNum: number
7
+    // pageSize: number
8
+    // uid?: string
9
+    // nickname?: string
10
+}
11
+
12
+export interface RevenueSharingModel {
13
+    // 说明
14
+    mark: string
15
+    bill_id: string
16
+    type: string
17
+    // 金额
18
+    number: string
19
+    //状态:0-未结算。1-已结算。-1-失效
20
+    status: string
21
+    create_time: string
22
+    uid: string
23
+    // 订单号
24
+    order_sn: string
25
+    link_id: string
26
+    type_shop: string
27
+    commission_type: string
28
+    source: string
29
+    nickname: string
30
+    content: string
31
+    // 下单时间
32
+    xiadan: string
33
+    // 结算时间
34
+    jiesuan: string
35
+}

+ 47 - 0
src/apis/model/shopping.model.ts

@@ -0,0 +1,47 @@
1
+export interface ShoppingResult {
2
+    list: Array<ShopModel>
3
+}
4
+
5
+export interface ShopModel {
6
+    // 商户ID
7
+    mer_id: string
8
+    // 商户名称
9
+    mer_name: string
10
+    // 商户头像
11
+    mer_avatar: string
12
+    // list:
13
+    list: Array<GoodsModel>
14
+    // 店铺默认选择
15
+    shopSelect: boolean
16
+}
17
+
18
+export interface GoodsModel {
19
+    // 购物车id
20
+    cart_id: string
21
+    // 数量
22
+    cart_num: string
23
+    // 创建时间
24
+    create_time: string
25
+    // 送养老金
26
+    yanglao: string
27
+    // 商品详情
28
+    product: ProductDataModel
29
+    // 规格详情
30
+    productAttr: ProductAttrDataModel
31
+    // 商品默认选择
32
+    checkProductSku: true
33
+}
34
+
35
+export interface ProductDataModel {
36
+    product_id: string
37
+    image: string
38
+    store_name: string
39
+}
40
+export interface ProductAttrDataModel {
41
+    product_id: string
42
+    stock: string
43
+    price: string
44
+    unique: string
45
+    sku: string
46
+    image: string
47
+}

+ 18 - 0
src/apis/model/signIninfo.model.ts

@@ -0,0 +1,18 @@
1
+/**
2
+ * 用户签到信息
3
+ */
4
+export interface SignInInfoModel {
5
+    // 今天是否已签到
6
+    /** 0 未签到 1已签到 */
7
+    today: number
8
+    /** 连续签到天数 */
9
+    day: number
10
+}
11
+
12
+/**
13
+ * 积到的积分
14
+ */
15
+export interface SignInModel {
16
+    // 签到获得的积分数值
17
+    score: number
18
+}

+ 15 - 0
src/apis/model/spreadInfoModel.ts

@@ -0,0 +1,15 @@
1
+export interface SpreadInfoModel {
2
+    lock_brokerage: number;
3
+    one_level_count: number
4
+    two_level_count: number
5
+    spread_total: number
6
+    yesterday_brokerage: number
7
+    total_extract: number
8
+    total_brokerage: number
9
+
10
+   // 佣金余额(可提现)
11
+    brokerage_price: string
12
+    now_money: string
13
+
14
+    broken_day: number
15
+}

+ 85 - 0
src/apis/model/storeModel.ts

@@ -0,0 +1,85 @@
1
+export interface StoreParams {
2
+    // 分页
3
+    pageNum: number
4
+    pageSize?: number
5
+    // 纬度
6
+    lat: ''
7
+    // 经度
8
+    lng: ''
9
+    // 关键字(检索内容)
10
+    mer_keyword: ''
11
+    // 距离排序(升序)0
12
+    distanceAsc?: number
13
+    // 商品分类 id
14
+    category_id?: string
15
+}
16
+
17
+export interface MerchantCategoryModel {
18
+    store_category_id: string
19
+    pid: string
20
+    // 分类名称
21
+    cate_name: string
22
+    sort: string
23
+    // 图标
24
+    pic: string
25
+    // 是否显示 1-是
26
+    is_show: string
27
+}
28
+export interface MerchantModel {
29
+    // 商户ID
30
+    mer_id: number
31
+    /** 商户名称 */
32
+    mer_name: string
33
+    // 商户头像
34
+    mer_avatar: string
35
+    // 商品描述评分
36
+    product_score: number
37
+    // 服务评分
38
+    service_score: number
39
+    // 物流评分
40
+    postage_score: number
41
+    // 店铺电话
42
+    service_phone: string
43
+    // 销量
44
+    sales: number
45
+    // 关注总数
46
+    care_count: number
47
+    // 客服应用id
48
+    // business_id: string
49
+    // 首信易二级商户编号
50
+    // sxy_submerchant_id: string
51
+}
52
+export interface StoreResult {
53
+    total: number
54
+    startRow: number
55
+    endRow: number
56
+    hasNextPage: boolean
57
+    hasPreviousPage: boolean
58
+    isFirstPage: boolean
59
+    isLastPage: boolean
60
+    navigateFirstPage: number
61
+    navigateLastPage: number
62
+    navigatePages: number
63
+    navigatepageNums: Array<number>
64
+    nextPage: number
65
+    pageNum: number
66
+    pageSize: number
67
+    pages: number
68
+    prePage: number
69
+    size: number
70
+    list: Array<MerchantModel>
71
+}
72
+
73
+export interface ProductDetailModel {
74
+    type: string
75
+    image: string
76
+    thumb: string
77
+    store_name: string
78
+    name: string
79
+    price: number
80
+    lowestCouponPrice: number
81
+    ot_price: number
82
+    // 养老金
83
+    yanglao: number
84
+    commission: number
85
+}

+ 6 - 0
src/apis/model/user-vip-info.model.ts

@@ -0,0 +1,6 @@
1
+export interface UserVipInfoModel {
2
+    avatar: string
3
+    nickname: string
4
+    // 1、2、3都是会员。4-银卡。5-金卡。6-钻石。7-董事
5
+    da_type: string
6
+}

+ 134 - 0
src/apis/model/userInfoModel.ts

@@ -0,0 +1,134 @@
1
+export interface UserInfoModel{
2
+    /** 用户id */
3
+    uid: string
4
+    /** 微信用户 id */
5
+    wechat_user_id: string
6
+    /** 支付宝用户 id */
7
+    ali_user_id: string
8
+    /** 性别 */
9
+    sex: string
10
+    /** 生日 */
11
+    birthday: string
12
+    /** 用户备注 */
13
+    mark: string
14
+    /** 用户昵称 */
15
+    nickname: string
16
+    /** 用户头像 */
17
+    avatar: string
18
+    /** 手机号 */
19
+    phone: string
20
+    /** 地址 */
21
+    address: string
22
+    /** 创建时间 */
23
+    create_time: string
24
+    /** 用户积分 */
25
+    now_score: string
26
+    /** 用户余额 */
27
+    now_money: string
28
+    /** 佣金余额(可提现) */
29
+    member_brokerage_price: string
30
+    /** 佣金UID */
31
+    spread_uid: string
32
+    /** 用户类型 */
33
+    user_type: string
34
+    /** 成功推广时间 */
35
+    promoter_time: string
36
+    /** 是否为推广员 */
37
+    is_promoter: string
38
+    /** 主账号 */
39
+    main_uid: string
40
+    /** 用户购买次数 */
41
+    pay_count: string
42
+    /** 用户消费金额 */
43
+    pay_price: string
44
+    /** 下级人数 */
45
+    spread_count: string
46
+    /** 身份所对应的区域id */
47
+    adr_id: string
48
+    /** 1 镇代 2 县代 3 市代 4 商户 5 推广员 6渠道商 */
49
+    identity: string
50
+    /** 首次消费绑定商户 */
51
+    mer_id: string
52
+    /** 置顶商户 */
53
+    mer_topping: string
54
+    /** 用户名 */
55
+    user_name: string
56
+    /** 养老金 冻结 */
57
+    annuity_frozen: string
58
+    /** 几笔养老金 */
59
+    annuity_num: string
60
+    /** 养老金 */
61
+    annuity: string
62
+    /** 推荐推广员返利 */
63
+    agent_rebate: string
64
+    /** 推荐商户返利 */
65
+    mer_rebate: string
66
+    /** 推荐代理返利 */
67
+    promoter_rebate: string
68
+    /** 跨店收入 */
69
+    cross_store: string
70
+    /** 辖区内收入 */
71
+    jurisdiction: string
72
+    /** 跨区收入 */
73
+    other_jurisdictions: string
74
+    /** 广告费 */
75
+    adv_fee: string
76
+    /** 自己辖区消费返利 */
77
+    xqxiaofei: string
78
+    /** 60岁生日 */
79
+    birthday60: string
80
+    /** 卡号 养老金 */
81
+    card_number: string
82
+    /** 已支取 */
83
+    annuity_yiqu: string
84
+    /** 是否为新用户:0=>是,1=>不是 */
85
+    is_new: string
86
+    /** 平台收入 */
87
+    admin_agent_rate: string
88
+    /** 会员锁定时间 */
89
+    locktime: string
90
+    /** 用户编号 */
91
+    user_number: string
92
+    /** 环信账号 0:未注册 1:已注册 */
93
+    im: string
94
+    /** 环信UUID */
95
+    im_uuid: string
96
+    /** 是否是测试用户 */
97
+    test_user: string
98
+    /** 是否是渠道商 */
99
+    is_channel: string
100
+    /** 用户积分 */
101
+    score: string
102
+    /** 养老金 */
103
+    annuity_once: string
104
+    first_sign: string
105
+    is_del: string
106
+    first_shopping: string
107
+    external: string
108
+    external_id: string
109
+    score_beishengtang: string
110
+    level_id: string
111
+    level: string
112
+    service: string
113
+    total_consume: string
114
+    total_collect_product: string
115
+    total_collect_store: string
116
+    total_coupon: string
117
+    total_visit_product: string
118
+    total_unread: string
119
+    is_merchant: string
120
+    phone1: string
121
+
122
+    longtime: number
123
+    is_ertification: number
124
+    // is_certification: number
125
+    volunteer: number
126
+    is_da_cang_vip: number
127
+    /** 红积分 */
128
+    red: number
129
+    /** 身份  0-普通用户  1-会员  2-合伙人  3-创始人 */
130
+    user_rich_type: number
131
+    /** 团队人数 */
132
+    team_number: number
133
+    is_bangfu: boolean
134
+}

+ 35 - 0
src/apis/model/userShareProductModel.ts

@@ -0,0 +1,35 @@
1
+import type {PageInfoModel} from "~/apis/model/common";
2
+
3
+export interface UserShareProductParams {
4
+    uid: string
5
+    pageNum: number
6
+    pageSize: number
7
+}
8
+
9
+export interface UserShareProductListModel {
10
+    // 点击率 百分制
11
+    ctr: string
12
+    // 购买率
13
+    buy: string
14
+    pageInfo: PageInfoModel<ShareProductListModel>
15
+}
16
+
17
+export interface ShareProductListModel {
18
+    id: number
19
+    // 用户ID
20
+    uid: number
21
+    // 商品ID
22
+    productId: number
23
+    //分享渠道 1 微信好友 2微信朋友圈
24
+    shareChannel: string
25
+    // 微信好友分享数
26
+    friendSum: string
27
+    // 朋友圈分享数
28
+    momentsSum: string
29
+    // 点击数
30
+    clickNum: string
31
+    // 购买次数
32
+    buyNum: string
33
+    // 创建时间
34
+    ctime: string
35
+}

+ 16 - 0
src/apis/model/userUnionModel.ts

@@ -0,0 +1,16 @@
1
+export interface UserUnionParams {
2
+    // 微信 code
3
+    code: string
4
+    // 来源
5
+    source: string
6
+}
7
+export interface UserUnionResult {
8
+    // cache_key: "16779d3624ee0de9816d5b7cbd6b7cf9"
9
+    // openid: "ow5su5J5ObGG_yPfBAtAZpQLgreA"
10
+    // session_key: "eSWL4hgrq2tZzWkLiC6RWg=="
11
+    // unionid: "oGtg_6CRFac3lDCwWQXDvxoMch1w"
12
+    cache_key: string
13
+    openid: string
14
+    session_key: string
15
+    unionid: string
16
+}

+ 21 - 0
src/apis/model/userYanglaoJinModel.ts

@@ -0,0 +1,21 @@
1
+// UserAnnuityInfoBean
2
+export interface UserYanglaoJinModel {
3
+    wechat_user_id: string
4
+    ali_user_id: string
5
+    annuity_frozen: string
6
+    annuity_num: string
7
+    annuity: string
8
+    create_time: string
9
+    birthday: string
10
+    birthday60: string
11
+    card_number: string
12
+    annuity_yiqu: string
13
+    pay_price: string
14
+    // 是否能提取,1是 0否
15
+    can_withraw: number
16
+    // 是否实名认证:1是
17
+    is_certification: number
18
+    // 银行?
19
+    yinghang: string
20
+    add_up: number
21
+}

+ 43 - 0
src/apis/model/vip-area.model.ts

@@ -0,0 +1,43 @@
1
+export interface VipAreaResult {
2
+    count: number
3
+    list: VipAreaModel[]
4
+    // status: number
5
+    // message: string
6
+    // data: {
7
+    //     count: number
8
+    //     list: VipAreaModel[]
9
+    // }
10
+}
11
+export interface VipAreaModel {
12
+    product_id: string
13
+    mer_id: string
14
+    brand_id: any
15
+    unit_name: string
16
+    rate: string
17
+    reply_count: string
18
+    store_info: string
19
+    cate_id: string
20
+    image: string
21
+    store_name: string
22
+    keyword: string
23
+    sort: string
24
+    is_show: string
25
+    sales: number
26
+    price: string
27
+    refusal: any
28
+    cost: string
29
+    ot_price: string
30
+    stock: string
31
+    is_gift_bag: string
32
+    care_count: number
33
+    status: string
34
+    isUsed: string
35
+    create_time: string
36
+    seckill: string
37
+    plate_mer_profit: string
38
+    type: string
39
+    yanglao: string
40
+    special_merchant: string
41
+    issetCoupon: string
42
+    slider_image: string[]
43
+}

+ 11 - 0
src/apis/model/withdrawalConfigurationModel.ts

@@ -0,0 +1,11 @@
1
+export interface WithdrawalConfigurationModel {
2
+    // 支付宝提现0:关闭,1:开启
3
+    withdrawal_alipay: string
4
+    withdrawal_card: string
5
+    // 最低金额
6
+    withdrawal_money: string
7
+    // 提现功能0:关闭;1:开启
8
+    withdrawal_status: string
9
+    //微信提现0:关闭;1:开启
10
+    withdrawal_wchat: string
11
+}

+ 33 - 0
src/apis/model/withdrawalModel.ts

@@ -0,0 +1,33 @@
1
+export interface WithdrawalModel {
2
+    extract_id: string
3
+    uid: string
4
+    // 名称
5
+    real_name: string
6
+    extract_type: string
7
+    bank_code: string
8
+    bank_address: string
9
+    alipay_code: string
10
+    wechat: string
11
+    extract_pic: string
12
+    // 提现金额
13
+    extract_price: string
14
+    balance: string
15
+    mark: string
16
+    admin_id: string
17
+    fail_msg: string
18
+    // 状态改变时间
19
+    status_time: string
20
+    // 申请时间
21
+    create_time: string
22
+    // -1 未通过 0 审核中 1 已提现
23
+    status: string
24
+    type: string
25
+    // 流水单号
26
+    order_sn: string
27
+    withdrawal_type: string
28
+    mer_id: string
29
+    // 提现手续费
30
+    service_money: string
31
+    // 说明
32
+    title: string
33
+}

+ 11 - 0
src/apis/model/withdrawalService.ts

@@ -0,0 +1,11 @@
1
+export interface WithdrawalParams {
2
+    money: string
3
+}
4
+export interface WithdrawalServiceModel {
5
+    // 扣除服务费
6
+    service_money: string
7
+    // 实际到账金额
8
+    money: string
9
+    // 平台服务费
10
+    service: string
11
+}

+ 115 - 0
src/apis/model/yanglaoStatisticsModel.ts

@@ -0,0 +1,115 @@
1
+export interface YanglaoStatisticsResult {
2
+    all_num: number
3
+    all_yanglao: number
4
+    all_yanglao_a: number
5
+    dy: DyModel
6
+    jd: JdModel
7
+    offLine: OffLineModel
8
+    onLine: OnLineModel
9
+    onLine_take_no: OnLineTakeNo
10
+    pdd: PddModel
11
+    su: SuModel
12
+    tb: TbModel
13
+    third_party_num: ThirdPartyNum
14
+    third_party_num_a: ThirdPartyNumA
15
+    third_party_num_n: ThirdPartyNumN
16
+    vip: VipModel
17
+}
18
+
19
+export interface OffLineModel {
20
+    num: number
21
+    yanglao: number
22
+}
23
+export interface OnLineModel {
24
+    num: number
25
+    yanglao: number
26
+}
27
+
28
+export interface OnLineTakeNo {
29
+    num: number
30
+    yanglao: number
31
+}
32
+
33
+export interface OnLineTakeNo {
34
+    num: number
35
+    yanglao: number
36
+}
37
+/**
38
+ * 抖音
39
+ */
40
+export interface DyModel {
41
+    num: number
42
+    num_a: number
43
+    yanglao: number
44
+    yanglao_a: number
45
+}
46
+
47
+/**
48
+ * 淘宝
49
+ */
50
+export interface TbModel {
51
+    num: number
52
+    num_a: number
53
+    yanglao: number
54
+    yanglao_a: number
55
+}
56
+
57
+/**
58
+ * 京东
59
+ */
60
+export interface JdModel {
61
+    num: number
62
+    num_a: number
63
+    yanglao: number
64
+    yanglao_a: number
65
+}
66
+
67
+/**
68
+ * 苏宁
69
+ */
70
+export interface SuModel {
71
+    num: number
72
+    num_a: number
73
+    yanglao: number
74
+    yanglao_a: number 
75
+}
76
+
77
+/**
78
+ * 拼多多
79
+ */
80
+export interface PddModel {
81
+    num: number
82
+    num_a: number
83
+    yanglao: number
84
+    yanglao_a: number
85
+}
86
+
87
+/**
88
+ * 拼多多
89
+ */
90
+export interface VipModel {
91
+    num: number
92
+    num_a: number
93
+    yanglao: number
94
+    yanglao_a: number
95
+}
96
+/**
97
+ * 第三方养老金笔数
98
+ */
99
+export interface ThirdPartyNum {
100
+    all_num: number
101
+}
102
+
103
+/**
104
+ * 第三方养老金
105
+ */
106
+export interface ThirdPartyNumA {
107
+    all_num_a: number
108
+}
109
+
110
+/**
111
+ * 第三方未结算养老金
112
+ */
113
+export interface ThirdPartyNumN {
114
+    all_num_a: number
115
+}

+ 36 - 0
src/apis/model/zibubaojian.model.ts

@@ -0,0 +1,36 @@
1
+export interface ZibubaojianResult {
2
+    count: number
3
+    list: Array<ZibubaojianModel>
4
+}
5
+export interface ZibubaojianModel {
6
+    product_id: string
7
+    mer_id: string
8
+    brand_id: string
9
+    unit_name: string
10
+    rate: string
11
+    reply_count: string
12
+    store_info: string
13
+    cate_id: string
14
+    image: string
15
+    slider_image: string[]
16
+    store_name: string
17
+    keyword: string
18
+    sort: string
19
+    is_show: string
20
+    sales: string
21
+    price: string
22
+    refusal: string
23
+    cost: string
24
+    ot_price: string
25
+    stock: string
26
+    is_gift_bag: string
27
+    care_count: string
28
+    status: string
29
+    is_used: string
30
+    create_time: string
31
+    seckill: string
32
+    yanglao: string
33
+    issetCoupon: string
34
+    type: string
35
+    special_merchant: string
36
+}

+ 215 - 0
src/apis/order.api.ts

@@ -0,0 +1,215 @@
1
+import {defHttp} from "~/utils/http"
2
+
3
+import type {
4
+    IntegralOrderCreateModel, OrderCheckModel, OrderCreateModel,
5
+    OrderCreateShoppingModel, OrderListDataModel, OrderListObligationResult, OrderListResult
6
+} from "~/apis/model/order.model"
7
+
8
+export interface CartIdRequest {
9
+    cart_id: Array<string>
10
+    address_id: string
11
+}
12
+
13
+export interface CreateOrderRequest {
14
+    address_id: string//地址id
15
+    distribution_mode: string//配送方式:  1: 快递, 2: 自提
16
+    cart_id: Array<string>//购物车id
17
+    // mark: json
18
+    mark: string//备注
19
+    dacang_id: string//大仓id
20
+    pay_type: string//支付方式:0: 余额: string1: 微信: string2: 小程序: string4: 支付宝: string5: 特殊商户积分
21
+    mer_id: string//商户id
22
+}
23
+
24
+enum API {
25
+    // 创建购物车
26
+    USER_CART_CREATE = '/api/user/cart/create',
27
+    // 选择订单商品
28
+    ORDER_CHECK = '/api/order/check',
29
+    // 修改购物车数量
30
+    USER_CART_CHANGE = '/api/user/cart/change',
31
+    // 创建订单 | 积分创建订单
32
+    ORDER_CREATE = '/api/order/create',
33
+    // 获取支付宝路径
34
+    // 开通养老金获取支付宝路径
35
+    // 订单列表
36
+    ORDER_LIST = '/api/order/list',
37
+    // 订单列表-待付款
38
+    GROUP_ORDER_LIST = '/api/order/group_order_list',
39
+    // 取消订单-未付款
40
+    ORDER_CANCEL = '/api/order/cancel',
41
+    // 订单物流
42
+    ORDER_EXPRESS = '/api/order/express',
43
+    // 订单确认收货
44
+    ORDER_TAKE = '/api/order/take',
45
+    // 提交评价
46
+    REPLY = '/api/reply/reply',
47
+    // 计算订单金额
48
+    ORDER_COMPUTED = '/api/order/computed',
49
+    // 订单统计
50
+    ORDER_NUMBER = '/api/order/number',
51
+    // 申请退款
52
+    REFUND_APPLY = '/api/refund/apply',
53
+    // 退款订单详情
54
+    REFUND_DETAIL = '/api/refund/detail',
55
+    // 售后-订单列表
56
+    REFUND_LIST = '/api/refund/list',
57
+    // 三方订单
58
+    USER_THIRD_ORDER = '/api/user/third_order',
59
+    // 全部订单
60
+    ORDER_ALL = '/api/order/all',
61
+    // 获取微信支付小程序原始id和支付链接
62
+    PAY_WX = '/gateway/userCenter_service/userLogOnService/payWx',
63
+
64
+
65
+    IS_DACANG = '/api/dacang/chenckproduct_isdaCang',
66
+    CHECK_GROUP_ORDER = '/api/order/check_group_order'
67
+}
68
+
69
+
70
+// 检查大仓会员
71
+export function checkGroupOrder(id: string) {
72
+    return defHttp.get({
73
+        url: API.CHECK_GROUP_ORDER + `/${id}`
74
+    })
75
+}
76
+export function computedOrderPrice() {
77
+}
78
+
79
+/**
80
+ * 检查商品是否是大仓商品
81
+ * @param product_id
82
+ */
83
+export function checkProductDaCang(product_id: string) {
84
+    return defHttp.get({
85
+        url: API.IS_DACANG + `/${product_id}`,
86
+    })
87
+}
88
+/**
89
+ * 未付款订单取消
90
+ * @param group_order_id
91
+ */
92
+export function cancelOrder(group_order_id: string) {
93
+    return defHttp.post({
94
+        url: `${API.ORDER_CANCEL}/${group_order_id}`,
95
+    })
96
+}
97
+/**
98
+ * 创建购物车
99
+ * @param params
100
+ */
101
+export function createShopping(params: {
102
+    // 商品id
103
+    product_id: string,
104
+    // sku 编码
105
+    product_attr_unique: any,
106
+    // 商品数量
107
+    cart_num: Number,
108
+    // 是否为立即购买: 0否1是
109
+    is_new: '1' | '0'
110
+}): Promise<OrderCreateShoppingModel> {
111
+    return defHttp.post({
112
+        url: API.USER_CART_CREATE,
113
+        data: {
114
+            ...params
115
+        }
116
+    })
117
+}
118
+
119
+
120
+/**
121
+ * 选择订单商品
122
+ */
123
+export function orderCheck(params: {
124
+    cart_id: string,
125
+    address_id: string
126
+}): Promise<OrderCheckModel> {
127
+    return defHttp.post({
128
+        url: API.ORDER_CHECK,
129
+        data: {
130
+            ...params
131
+        }
132
+    })
133
+}
134
+
135
+/**
136
+ * 修改购物车数量
137
+ * @param cart_id
138
+ */
139
+export function cartChange(cart_id: string) {
140
+    return defHttp.post({
141
+        url: `${API.USER_CART_CHANGE}/${cart_id}`
142
+    })
143
+}
144
+
145
+/**
146
+ * 创建订单
147
+ */
148
+export function orderCreate(params: CreateOrderRequest): Promise<OrderCreateModel> {
149
+    return defHttp.post({
150
+        url: API.ORDER_CREATE,
151
+        data: {
152
+            ...params
153
+        }
154
+    })
155
+}
156
+
157
+/**
158
+ * 积分创建订单
159
+ */
160
+export function getIntegralOrderCreate(params: CreateOrderRequest): Promise<IntegralOrderCreateModel> {
161
+    return defHttp.post({
162
+        url: API.ORDER_CREATE,
163
+        data: {
164
+            ...params
165
+        }
166
+    })
167
+}
168
+
169
+/**
170
+ * 订单列表
171
+ */
172
+export function getOrderListFromStatus(params: {
173
+    page: number
174
+    status: number
175
+    limit: number
176
+}): Promise<OrderListResult> {
177
+    return defHttp.get({
178
+        url: API.ORDER_LIST,
179
+        data: {
180
+            ...params
181
+        }
182
+    })
183
+}
184
+
185
+/**
186
+ * 获取全部订单
187
+ * @param params
188
+ */
189
+export function getAllOrder(params: {
190
+    page: number,
191
+    limit: number
192
+}): Promise<OrderListResult> {
193
+    return defHttp.get({
194
+        url: API.ORDER_ALL,
195
+        data: {
196
+            ...params
197
+        }
198
+    })
199
+}
200
+
201
+/**
202
+ * 订单列表-待付款
203
+ * @param params
204
+ */
205
+export function getGroupOrderList(params: {
206
+    page: number,
207
+    limit: number
208
+}): Promise<OrderListObligationResult> {
209
+    return defHttp.get({
210
+        url: API.GROUP_ORDER_LIST,
211
+        data: {
212
+            ...params
213
+        }
214
+    })
215
+}

+ 345 - 0
src/apis/product.ts

@@ -0,0 +1,345 @@
1
+import {defHttp} from "~/utils/http";
2
+import type {
3
+    DyLiveModel, DyLiveProductModel, DyProductDetailModel,
4
+    DyProductModel, JdProductDetailModel,
5
+    JdProductModel, PDDProductDetailModel, PDDProductModel, ProductDetailModel,
6
+    ProductParams,
7
+    SearchProductParams,
8
+    SearchProductResult, SuNingProductDetailModel, SuNingProductModel, TaobaoProductDetailModel,
9
+    TaobaoProductResult, VipProductModel, VipProductParams, VipProductResult
10
+} from "~/apis/model/product.model";
11
+import {resolveUnref} from "@vueuse/core";
12
+
13
+enum API {
14
+    // 首页商品列表
15
+    GET_HOME_PRODUCT = `/api/newhome/nologin/product`,
16
+    // 商品搜索
17
+    SELECT_PRODUCT_LIST = `/gateway/wares_service/waresService/selectProductList`,
18
+    // 商品详情
19
+    GET_PRODUCT_DETAIL = '/api/store/product/detail',
20
+    // 商品推荐列表
21
+    GET_PRODUCT_RECOMMEND_LIST = '/api/store/product/recommend/lst',
22
+    // 分享产品
23
+    PRODUCT_SHARE = '/api/product_share',
24
+    // 京东商品详情
25
+    JD_DETAIL = '/api/jd/detail',
26
+    // 京东商品列表
27
+    JD_LIST = '/api/jd/list',
28
+    // 京东商品列表搜索
29
+    JD_SEARCH = '/api/jd/search',
30
+
31
+    // 唯品会商品列表
32
+    VIP_GOODS = '/api/vip/goods',
33
+    // 唯品会商品列表搜索
34
+    VIP_SEARCH = '/api/vip/search',
35
+    // 唯品会商品详情
36
+    VIP_DETAIL = '/api/vip/detail',
37
+
38
+    // 苏宁商品列表
39
+    SU_LIST = '/api/su/list',
40
+    // 苏宁商品列表搜索
41
+    SU_SEARCH = '/api/su/search',
42
+    // 苏宁商品详情
43
+    SU_DETAIL = '/api/su/detail',
44
+
45
+    // 淘宝商品列表
46
+    TAOBAO_LIST = '/gateway/thirdPartyWares_service/taobao_service/selectTaobaoWaresList',
47
+    // 淘宝商品详情
48
+    TAOBAO_DETAIL = '/gateway/thirdPartyWares_service/taobao_service/taobaoWaresDetail',
49
+    // 淘宝跳转
50
+    JUMP_TAOBAO = '/gateway/thirdPartyWares_service/taobao_service/dtkchangeLink',
51
+
52
+    // 拼多多商品列表
53
+    PDD_LIST = '/api/pdd/list',
54
+    // 拼多多商品搜索
55
+    PDD_SEARCH = '/api/pdd/search',
56
+    // 拼多多商品详情
57
+    PDD_DETAIL = '/api/pdd/detail',
58
+
59
+    // 抖音列表
60
+    DY_LIST = '/api/dy/get_list',
61
+    // 抖音直播间列表
62
+    DY_LIVE_LIST = '/api/dy/live_list',
63
+    // 抖音直播间商品列表
64
+    DY_LIVE_PRODUCT_LIST = '/api/dy/live_product_list',
65
+    // 抖音直播间商品跳转
66
+    DY_LIVE_PRODUCT_SHARE = '/api/dy/live_product_share',
67
+    // 抖音商品列表搜索
68
+    DY_SEARCH = '/api/dy/get_search',
69
+    // 抖音商品详情
70
+    DY_DETAIL = '/api/dy/get_detail'
71
+}
72
+
73
+/**
74
+ * 商品详情
75
+ * @param product_id
76
+ */
77
+export function getProductDetail(product_id: string): Promise<ProductDetailModel> {
78
+    return defHttp.get({
79
+        url: API.GET_PRODUCT_DETAIL,
80
+        data: {
81
+            product_id
82
+        }
83
+    })
84
+}
85
+
86
+/**
87
+ * 首页商品列表
88
+ */
89
+export function getHomeProductList() {
90
+    return defHttp.get({
91
+        url: API.GET_HOME_PRODUCT
92
+    })
93
+}
94
+
95
+/**
96
+ * 商品搜索
97
+ * @param params
98
+ */
99
+export function searchProductList(params: SearchProductParams): Promise<SearchProductResult> {
100
+    return defHttp.get({
101
+        url: API.SELECT_PRODUCT_LIST,
102
+        data: {
103
+            ...params
104
+        }
105
+    })
106
+}
107
+
108
+/**
109
+ * 京东商品详情
110
+ * @param skuId
111
+ */
112
+export  function getJdProductDetail(skuId: string): Promise<Array<JdProductDetailModel>> {
113
+    return defHttp.get({
114
+        url: API.JD_DETAIL,
115
+        data: {
116
+            skuId
117
+        }
118
+    })
119
+}
120
+
121
+/**
122
+ * 京东商品列表
123
+ * @param params
124
+ */
125
+export function getJdProductList(params: ProductParams): Promise<Array<JdProductModel>> {
126
+    return defHttp.get({
127
+        url: API.JD_LIST,
128
+        data: {
129
+            ...params
130
+        }
131
+    })
132
+}
133
+
134
+/**
135
+ * 京东商品搜索
136
+ * @param params
137
+ */
138
+export function searchJdProduct(params: ProductParams): Promise<Array<JdProductModel>> {
139
+    return defHttp.get({
140
+        url: API.JD_SEARCH,
141
+        data: {
142
+            ...params
143
+        }
144
+    })
145
+}
146
+/**
147
+ * 唯品会商品列表
148
+ * @param params
149
+ */
150
+export function getVipProductList(params: ProductParams): Promise<Array<VipProductModel>> {
151
+    return defHttp.get({
152
+        url: API.VIP_GOODS,
153
+        data: {
154
+            ...params
155
+        }
156
+    })
157
+}
158
+
159
+/**
160
+ * 搜索唯品商品
161
+ * @param params
162
+ */
163
+export function searchVipProduct(params: ProductParams): Promise<Array<VipProductResult>> {
164
+    return defHttp.get({
165
+       url: API.VIP_SEARCH,
166
+       data: {
167
+           ...params
168
+       }
169
+    })
170
+}
171
+
172
+/**
173
+ * 唯品商品详情
174
+ * @param params
175
+ */
176
+export function getVipProductDetail(goodsId: string): Promise<VipProductResult> {
177
+    return defHttp.get({
178
+        url: API.VIP_DETAIL,
179
+        data: {
180
+            goodsId
181
+            // ...params
182
+        }
183
+    })
184
+}
185
+
186
+export function getSuProductDetail(id: string): Promise<SuNingProductDetailModel> {
187
+    return defHttp.get({
188
+        url: `${API.SU_DETAIL}/${id}`,
189
+
190
+    })
191
+}
192
+
193
+/**
194
+ * 苏宁商品列表
195
+ * @param params
196
+ */
197
+export function getSuProductList(params: ProductParams): Promise<Array<SuNingProductModel>> {
198
+    return defHttp.get({
199
+        url: API.SU_LIST,
200
+        data: {
201
+            ...params
202
+        }
203
+    })
204
+}
205
+
206
+/**
207
+ * 苏宁商品搜索
208
+ * @param params
209
+ */
210
+export function searchSuProduct(params: ProductParams): Promise<Array<SuNingProductModel>> {
211
+    return defHttp.get({
212
+        url: API.SU_SEARCH,
213
+        data: {
214
+            ...params
215
+        }
216
+    })
217
+}
218
+
219
+export function getTaobaoProductDetail(id: string): Promise<TaobaoProductDetailModel> {
220
+    return defHttp.post({
221
+        url: API.TAOBAO_DETAIL,
222
+        data: {
223
+            id
224
+        }
225
+    }, {
226
+        withToken: false
227
+    })
228
+}
229
+/**
230
+ * 淘宝商品列表
231
+ * @param params
232
+ */
233
+export function getTaobaoProductList(params: {
234
+    pageNum: string
235
+    pageSize: string
236
+    title?: string
237
+}):Promise<TaobaoProductResult> {
238
+    return defHttp.post({
239
+        url: API.TAOBAO_LIST,
240
+        data: {
241
+            ...params
242
+        }
243
+    }, {
244
+        withToken: false
245
+    })
246
+}
247
+
248
+/**
249
+ * 拼多多商品列表
250
+ * @param params
251
+ */
252
+export function getPddProductList(params: ProductParams): Promise<Array<PDDProductModel>> {
253
+    return defHttp.get({
254
+        url: API.PDD_LIST,
255
+        data: {
256
+            ...params
257
+        }
258
+    })
259
+}
260
+
261
+/**
262
+ * 拼多多商品详情
263
+ * @param goodsId
264
+ */
265
+export function getPddProductDetail(goodsId: string): Promise<PDDProductDetailModel> {
266
+    return defHttp.get({
267
+        url: API.PDD_DETAIL,
268
+        data: {
269
+            goodsId
270
+        }
271
+    })
272
+}
273
+/**
274
+ * 拼多多商品搜索
275
+ * @param params
276
+ */
277
+export function searchPddProduct(params: ProductParams): Promise<Array<PDDProductModel>> {
278
+    return defHttp.get({
279
+        url: API.PDD_SEARCH,
280
+        data: {
281
+            ...params
282
+        }
283
+    })
284
+}
285
+/**
286
+ * 抖音商品列表
287
+ * @param params
288
+ */
289
+export function getDyProductList(params: ProductParams): Promise<Array<DyProductModel>> {
290
+    return defHttp.get({
291
+        url: API.DY_LIST,
292
+        data: {
293
+            ...params
294
+        }
295
+    })
296
+}
297
+
298
+/**
299
+ * 抖音直播间列表
300
+ */
301
+export function getDyLiveList(params: ProductParams): Promise<Array<DyLiveModel>> {
302
+    return defHttp.get({
303
+        url: API.DY_LIVE_LIST,
304
+        data: {
305
+            ...params
306
+        }
307
+    })
308
+}
309
+
310
+/**
311
+ * 抖音直播间商品列表
312
+ */
313
+export function getDyLiveProductList(buyinId: string): Promise<DyLiveProductModel> {
314
+    return defHttp.get({
315
+        url: API.DY_LIVE_PRODUCT_LIST,
316
+        data: {
317
+            buyinId
318
+        }
319
+    })
320
+}
321
+/**
322
+ * 抖音商品搜索
323
+ * @param params
324
+ */
325
+export function searchDyProduct(params: ProductParams):Promise<Array<DyProductModel>>{
326
+    return defHttp.get({
327
+        url: API.DY_SEARCH,
328
+        data: {
329
+            ...params
330
+        }
331
+    })
332
+}
333
+
334
+/**
335
+ * 抖音商品详情
336
+ * @param goodsId
337
+ */
338
+export function getDyProductDetail(goodsId: string): Promise<DyProductDetailModel> {
339
+    return defHttp.get({
340
+        url: API.DY_DETAIL,
341
+        data: {
342
+            goodsId
343
+        }
344
+    })
345
+}

+ 635 - 0
src/apis/user.ts

@@ -0,0 +1,635 @@
1
+import {defHttp} from '~/utils/http'
2
+import type {UserUnionParams, UserUnionResult} from "~/apis/model/userUnionModel";
3
+import Cache from '~/utils/cache'
4
+import {EXPIRES_TIME, LOGIN_STATUS, STATE_R_KEY, USER_INFO} from "~/constants";
5
+import {useUserStore} from "~/stores/userStore";
6
+import type {YanglaoStatisticsResult} from "~/apis/model/yanglaoStatisticsModel";
7
+import type {UserInfoModel} from "~/apis/model/userInfoModel";
8
+import type {InvitePartnerModel, UserInviteParams} from "~/apis/model/invitePartnerModel";
9
+import type {UserShareProductListModel, UserShareProductParams} from "~/apis/model/userShareProductModel";
10
+import type {RevenueSharingModel, RevenueSharingParams} from "~/apis/model/revenueSharingModel";
11
+import type {AccumulateIncomeModel, UserInviteProfitParams} from "~/apis/model/accumulateIncomeModel";
12
+import type {SpreadInfoModel} from "~/apis/model/spreadInfoModel";
13
+import type {WithdrawalParams, WithdrawalServiceModel} from "~/apis/model/withdrawalService";
14
+import type {UserYanglaoJinModel} from "~/apis/model/userYanglaoJinModel";
15
+import type {WithdrawalModel} from "~/apis/model/withdrawalModel";
16
+import type {MyRelationMerchantParams, MyRelationMerchantResult} from "~/apis/model/myRelationMerchantModel";
17
+import type {MyRelationProductPrams, MyRelationProductResult} from "~/apis/model/myRelationProductModel";
18
+import type {IntegralParams, IntegralResult} from "~/apis/model/integralModel";
19
+import type {
20
+    SharePosterClassifyResult,
21
+    SharePosterImageResult,
22
+    SharePostersImagesListParams,
23
+} from "~/apis/model/inviteFriendsModel";
24
+import type {ReplyParams, ReplyResult} from "~/apis/model/replyModel";
25
+import type {SignInInfoModel, SignInModel} from "~/apis/model/signIninfo.model";
26
+import type {ShoppingResult} from "~/apis/model/shopping.model";
27
+import type {AddressResult, OneAddressModel} from "~/apis/model/address.model";
28
+import type {UserVipInfoModel} from "~/apis/model/user-vip-info.model";
29
+import type {CertificationRequest} from "~/apis/model/certification.model";
30
+
31
+// 会员中心的提现
32
+// export function entropy(data) {
33
+// return request.post('entropy/withdrawal', data);
34
+// return defHttp.post({})
35
+// }
36
+enum API {
37
+    // 关于我们
38
+    GET_ABOUT_CONFIG = '/api/about/config',
39
+
40
+    // 养老金信息
41
+    GET_YANGLAO = '/api/user/get_yanglao',
42
+    // 养老金记录
43
+    GET_YANGLAOJIN_STATISTICS = '/api/user/get_yanglao_statistics',
44
+    // 获取用户信息
45
+    USER = '/api/user',
46
+    // 获取协议
47
+    GET_XIEYI = '/api/xieyi/detail',
48
+    GET_USER_UNION_ID = '/api/userMp/getUserUnionid',
49
+    WECHAT_CHECK = '/api/wechat/check',
50
+    AUTH_APPLET_PHONE = '/api/auth/applet_phone',
51
+    BIND_PHONE = '/api/thrid/binding',
52
+    AUTH_MP = '/api/auth/mp',
53
+
54
+    // 提现服务费计算
55
+    WITHDRAWAL_SERVICE = '/api/entropy/withdrawal_service',
56
+    // 提现记录
57
+    USER_WITHDRAWAL = '/api/user/withdrawal',
58
+    // 提现配置
59
+    WITHDRAWAL_CONFIG = '/api/withdrawal/config',
60
+    // 佣金信息
61
+    USER_SPREAD_INFO = '/api/user/spread_info',
62
+
63
+    // JAVA 累计收益列表 use by accumulateIncome
64
+    USER_INVITE_PROFIT_LIST = '/gateway/userCenter_service/userInviteService/userInviteProfitList',
65
+    // 分享收益
66
+    GET_COMMISSION_LIST = '/api/get_commission_list',
67
+
68
+    // 评论列表
69
+    GET_REPLY_LIST = '/api/reply/list',
70
+
71
+    // java 邀请商户+伙伴个数 列表
72
+    USER_INVITE_LIST = '/gateway/userCenter_service/userInviteService/userInviteList',
73
+    // java 用户分享产品列表
74
+    USER_SHARE_PRODUCT_LIST = '/gateway/userCenter_service/userShareProductService/userShareProductList',
75
+
76
+    // 我的收藏
77
+    USER_RELATION_PRODUCT_LIST = '/api/user/relation/product/lst',
78
+    // 取消收藏
79
+    USER_RELATION_DELETE = '/api/user/relation/delete',
80
+    // 我关注的店铺
81
+    USER_RELATION_MERCHANT_LIST = '/api/user/relation/merchant/lst',
82
+
83
+    // 积分记录(签到赠送积分)
84
+    USER_SIGN_LIST = '/api/user/sign_list',
85
+
86
+    // 红积分列表
87
+    USER_RED_LOG = '/api/user/red_log',
88
+
89
+    // 获取规则信息
90
+    GET_RULES = '/api/notice/detail',
91
+
92
+    USER_APPLY_BANG_FU = '/api/user/apply_bang_fu',
93
+
94
+    /**
95
+     * 邀请好友分享图片分类接口
96
+     */
97
+    USER_SHARE_PRODUCT_SERVICE_CLASSIFY_LIST = `/gateway/userCenter_service/userShareProductService/classifyList`,
98
+
99
+    /**
100
+     * 邀请好友图片列表
101
+     */
102
+    USER_SHARE_PRODUCT_SERVICE_SHARE_IMAGES_LIST = `/gateway/userCenter_service/userShareProductService/shareImgesList`,
103
+
104
+    /**
105
+     * 生成图片
106
+     */
107
+    POSTER_SERVICE_IMAGES = `/gateway/poster_service/posterService/imgs`,
108
+
109
+    // 新签到信息
110
+    NEW_SIGN_INFO = `/api/user/new_sign_info`,
111
+    // 签到
112
+    NEW_SIGN = `/api/user/new_sign`,
113
+
114
+    // 购物车相关
115
+    // 购物车列表
116
+    USER_CART_LIST = `/api/user/cart/lst`,
117
+    // 购物车删除
118
+    USER_CART_DELETE = `/api/user/cart/delete`,
119
+    // 购物车数量
120
+    USER_CART_COUNT = `/api/user/cart/count`,
121
+
122
+    /// 地址相关
123
+    // 地址列表
124
+    USER_ADDRESS_LIST = `/api/user/address/lst`,
125
+    // 五级联动信息
126
+    // api/system/city/new_five_lst?pid=493
127
+    CITY_NEW_FIVE_LIST = `/api/system/city/new_five_lst`,
128
+    // 获取城市信息县级
129
+    CITY_NEW_LIST = `/api/system/city/new_lst`,
130
+    // 创建地址
131
+    CREATE_USER_ADDRESS = '/api/user/address/new_create',
132
+    USER_ADDRESS_DETAIL = '/api/user/address/detail',
133
+    USER_VIP_INFO = '/api/warehouse/UserVipInfo',
134
+
135
+    USER_ADD_CERTIFICATION = '/api/user/add_certification'
136
+    // getCertification
137
+}
138
+
139
+/**
140
+ * 五级联动地址
141
+ * @param pid
142
+ */
143
+export function getCityNewFiveList(pid: number) {
144
+    return defHttp.get({
145
+        url: API.CITY_NEW_FIVE_LIST,
146
+        data: {
147
+            pid
148
+        }
149
+    })
150
+}
151
+/**
152
+ * 实名认证
153
+ */
154
+export function getCertificationInfo(type: string) {
155
+    return defHttp.get({
156
+        url: API.USER_ADD_CERTIFICATION,
157
+        data: {
158
+            type
159
+        }
160
+    })
161
+}
162
+
163
+/**
164
+ * 提交认证
165
+ * @param params
166
+ */
167
+export function submitCertification(params: CertificationRequest) {
168
+   return defHttp.get({
169
+       url: API.USER_ADD_CERTIFICATION,
170
+       data: {
171
+           ...params
172
+       }
173
+   })
174
+}
175
+/// 地址相关
176
+
177
+/**
178
+ * 获取地址详情
179
+ * @param id
180
+ */
181
+export function getUserAddressDetail(id: string) {
182
+    return defHttp.get({
183
+        url: API.USER_ADDRESS_DETAIL + `/?id=${id}`
184
+    })
185
+}
186
+export function addressNewCreate(params: {
187
+    province: string,
188
+    city: string,
189
+    phone: string,
190
+    // countryName
191
+    district: string,
192
+    address_id?: string
193
+    real_name: string,
194
+    detail: string,
195
+    //是否默认,1默认;0不默认
196
+    is_default: string,
197
+    code_list: string,
198
+    city_id: string,
199
+    village_id: string,
200
+    village: string
201
+
202
+}) {
203
+    return defHttp.post({
204
+        url: API.CREATE_USER_ADDRESS,
205
+        data: {
206
+            ...params
207
+        }
208
+    })
209
+}
210
+/**
211
+ * 获取地址列表
212
+ */
213
+export function getUserAddressList(): Promise<AddressResult> {
214
+    return defHttp.get({
215
+        url: API.USER_ADDRESS_LIST,
216
+    })
217
+}
218
+
219
+/**
220
+ * 获取城市信息
221
+ */
222
+export function getCityList(): Promise<Array<OneAddressModel>> {
223
+    return defHttp.get({
224
+        url: API.CITY_NEW_LIST
225
+    })
226
+}
227
+/**
228
+ * 地址添加或者修改
229
+ * @param params
230
+ */
231
+// export function createAddress(params: AddressParams) {
232
+//     return defHttp.post<AddressParams>({
233
+//         url: API.CREATE_USER_ADDRESS,
234
+//         data: params
235
+//     }, {
236
+//         withToken: true
237
+//     })
238
+// }
239
+
240
+export function getCartCount(): Promise<Array<{count: number}>> {
241
+    return defHttp.get({
242
+        url: API.USER_CART_COUNT
243
+    })
244
+}
245
+/**
246
+ * 获取购物车列表
247
+ */
248
+export function getCartList(): Promise<ShoppingResult> {
249
+    return defHttp.get({
250
+        url: API.USER_CART_LIST
251
+    })
252
+}
253
+
254
+
255
+export function deleteCartItem(cart_id: any[]) {
256
+    return defHttp.post({
257
+        url: API.USER_CART_DELETE,
258
+        data: {
259
+            cart_id
260
+        }
261
+    })
262
+}
263
+/**
264
+ * 获取我的评价(评论)
265
+ */
266
+export function getMyReply(params: ReplyParams): Promise<ReplyResult> {
267
+    return defHttp.post({
268
+        url: API.GET_REPLY_LIST,
269
+        data: {
270
+            ...params
271
+        }
272
+    })
273
+}
274
+
275
+/**
276
+ * 获取邀请好友图片分类
277
+ */
278
+export function getUserSharePostersClassifyList(): Promise<SharePosterClassifyResult> {
279
+    return defHttp.post({
280
+        url: API.USER_SHARE_PRODUCT_SERVICE_CLASSIFY_LIST
281
+    }, {
282
+        withToken: false
283
+    })
284
+}
285
+
286
+export function getUserSharePostersImagesList(params: SharePostersImagesListParams): Promise<SharePosterImageResult> {
287
+    return defHttp.post({
288
+        url: API.USER_SHARE_PRODUCT_SERVICE_SHARE_IMAGES_LIST,
289
+        data: {
290
+            ...params
291
+        }
292
+    }, {
293
+        withToken: false
294
+    })
295
+}
296
+
297
+/**
298
+ * 申请开通帮扶
299
+ */
300
+export function applyBangFu() {
301
+    return defHttp.post({
302
+        url: API.USER_APPLY_BANG_FU
303
+    })
304
+}
305
+
306
+/**
307
+ * 根据ID获取帮扶中心的规则信息
308
+ * @param id
309
+ */
310
+export function getRules(id: number) {
311
+    return defHttp.get({
312
+        url: `${API.GET_RULES}/${id}`,
313
+    })
314
+}
315
+
316
+/**
317
+ * 获取用户积分记录
318
+ * @param params
319
+ */
320
+export function getUserSignList(params: IntegralParams): Promise<IntegralResult> {
321
+    return defHttp.get({
322
+        url: API.USER_SIGN_LIST,
323
+        data: {
324
+            ...params
325
+        }
326
+    }, {})
327
+}
328
+
329
+/**
330
+ * 获取我关注的店铺
331
+ */
332
+export function getMyRelationMerchantList(params: MyRelationMerchantParams): Promise<MyRelationMerchantResult> {
333
+    return defHttp.get({
334
+        url: API.USER_RELATION_MERCHANT_LIST,
335
+        data: {
336
+            ...params
337
+        }
338
+    }, {})
339
+}
340
+
341
+/**
342
+ * 取消我的收藏
343
+ * @param type 1
344
+ */
345
+export function removeMyRelation(params: { type: number, type_id: string }) {
346
+    return defHttp.post({
347
+        url: API.USER_RELATION_DELETE,
348
+        data: {
349
+            ...params
350
+        }
351
+    })
352
+}
353
+
354
+/**
355
+ * 获取我的收藏
356
+ * @param params
357
+ */
358
+export function getMyRelationProduct(params: MyRelationProductPrams): Promise<MyRelationProductResult> {
359
+    return defHttp.get({
360
+        url: API.USER_RELATION_PRODUCT_LIST,
361
+        data: {
362
+            ...params
363
+        }
364
+    }, {})
365
+}
366
+
367
+/**
368
+ * 用户提现记录
369
+ */
370
+export function getWithdrawal(params: {
371
+    type: number
372
+}): Promise<WithdrawalModel> {
373
+    return defHttp.get({
374
+        url: API.USER_WITHDRAWAL,
375
+        data: {
376
+            ...params
377
+        }
378
+    }, {})
379
+}
380
+
381
+/**
382
+ * 获取用户养老金信息
383
+ */
384
+export function getUserYangLaoJin(): Promise<UserYanglaoJinModel> {
385
+    return defHttp.get({
386
+        url: API.GET_YANGLAO,
387
+    }, {})
388
+}
389
+
390
+/**
391
+ * 获取平台服务纪晓岚计算
392
+ */
393
+export function getWithdrawalService(params: WithdrawalParams): Promise<WithdrawalServiceModel> {
394
+    return defHttp.post({
395
+        url: API.WITHDRAWAL_SERVICE,
396
+        data: {
397
+            ...params
398
+        }
399
+    }, {})
400
+}
401
+
402
+/**
403
+ * 用户佣金信息
404
+ */
405
+export function getUserSpreadInfo(): Promise<SpreadInfoModel> {
406
+    return defHttp.get({
407
+        url: API.USER_SPREAD_INFO
408
+    })
409
+}
410
+
411
+/**
412
+ * 累计收益列表
413
+ * @param params
414
+ */
415
+export function getUserInviteProfitList(params: UserInviteProfitParams): Promise<AccumulateIncomeModel> {
416
+    return defHttp.get({
417
+        url: API.USER_INVITE_PROFIT_LIST,
418
+        data: {
419
+            ...params
420
+        }
421
+    }, {
422
+        withToken: false
423
+    })
424
+}
425
+
426
+/**
427
+ * 分享收益
428
+ */
429
+export function getRevenueSharing(params: RevenueSharingParams): Promise<RevenueSharingModel[]> {
430
+    return defHttp.get({
431
+        url: API.GET_COMMISSION_LIST,
432
+        data: {
433
+            ...params
434
+        }
435
+    })
436
+}
437
+
438
+/**
439
+ * 用户分享产品列表
440
+ * @param params
441
+ */
442
+export function getUserShareProductList(params: UserShareProductParams): Promise<UserShareProductListModel> {
443
+    return defHttp.get({
444
+        url: API.USER_SHARE_PRODUCT_LIST,
445
+        data: params
446
+    }, {
447
+        withToken: false
448
+    })
449
+}
450
+
451
+/**
452
+ * 邀请商户+伙伴 列表
453
+ * @param params
454
+ */
455
+export function getUserInviteList(params: UserInviteParams): Promise<InvitePartnerModel> {
456
+    return defHttp.get({
457
+        url: API.USER_INVITE_LIST,
458
+        data: params
459
+    }, {
460
+        withToken: false
461
+    })
462
+}
463
+
464
+/*
465
+
466
+获取滚动消息
467
+*/
468
+// export function getbulletin(){
469
+//  return request.get('roll_yanglaojin')
470
+// }
471
+
472
+/**
473
+ * 获取养老金记录
474
+ */
475
+export function getYanglaojinStatistics(): Promise<YanglaoStatisticsResult> {
476
+    return defHttp.get({
477
+        url: API.GET_YANGLAOJIN_STATISTICS,
478
+    })
479
+}
480
+
481
+/**
482
+ * 获取用户信息
483
+ */
484
+export function getUserInfo(): Promise<UserInfoModel> {
485
+    return defHttp.get({
486
+        url: API.USER
487
+    })
488
+}
489
+
490
+/**
491
+ * 获取协议内容
492
+ */
493
+export function getXieYi(type: number) {
494
+    return defHttp.get({
495
+        url: API.GET_XIEYI,
496
+        data: {
497
+            type
498
+        }
499
+    })
500
+}
501
+
502
+
503
+export function getAboutConfig() {
504
+    return defHttp.get({
505
+        url: API.GET_ABOUT_CONFIG
506
+    })
507
+}
508
+
509
+/**
510
+ * 获取微信平台唯一ID
511
+ * @param params
512
+ */
513
+export function getUserUnionId(params: UserUnionParams): Promise<UserUnionResult> {
514
+    return defHttp.post({
515
+        url: API.GET_USER_UNION_ID,
516
+        data: {
517
+            ...params
518
+        },
519
+    })
520
+}
521
+
522
+export function wechatCheck(openid: string): Promise<{ token: string, exp: number, user: UserInfoModel }> {
523
+    return defHttp.get({
524
+        url: API.WECHAT_CHECK,
525
+        data: {
526
+            openid
527
+        }
528
+    })
529
+}
530
+
531
+/**
532
+ * 手机号一键登录
533
+ */
534
+export function authAppletPhone(params: {
535
+    sessionKey: string,
536
+    encryptedData: string,
537
+    iv: string
538
+}): Promise<{ token: string, exp: number, user: any }> {
539
+    return defHttp.post({
540
+        url: API.AUTH_APPLET_PHONE,
541
+        data: {
542
+            ...params
543
+        }
544
+    })
545
+}
546
+
547
+/**
548
+ * 绑定手机号
549
+ */
550
+export function bindPhone(params: {
551
+    phone: string,
552
+    sms: number | 1,
553
+    sms_code: string,
554
+    password: string,
555
+    // unionId
556
+    third_user_id: string,
557
+    // 1 微信 2支付宝
558
+    type: number
559
+}) {
560
+    return defHttp.get({
561
+        url: API.BIND_PHONE,
562
+    })
563
+}
564
+
565
+/**
566
+ * 小程序用户登录
567
+ */
568
+export function authMp(data: any) {
569
+    return defHttp.post({
570
+        url: API.AUTH_MP,
571
+        data
572
+    })
573
+}
574
+
575
+// 检查登录状态
576
+export function checkLogin() {
577
+    const userStore = useUserStore()
578
+
579
+    let token = Cache.get(LOGIN_STATUS);
580
+    let expiresTime = Cache.get(EXPIRES_TIME);
581
+    let newTime = Math.round(new Date().getTime() / 1000);
582
+    if (expiresTime < newTime || !token) {
583
+        uni.removeStorageSync('USERINFO')
584
+        Cache.clear(LOGIN_STATUS);
585
+        Cache.clear(EXPIRES_TIME);
586
+        Cache.clear(USER_INFO);
587
+        Cache.clear(STATE_R_KEY);
588
+        return false;
589
+    } else {
590
+        // store.commit('UPDATE_LOGIN',token);
591
+        userStore.setToken(token);
592
+        let userInfo = Cache.get(USER_INFO, true);
593
+        if (userInfo) {
594
+            // store.commit('UPDATE_USERINFO',userInfo);
595
+            userStore.setUserInfo(userInfo)
596
+        }
597
+        return true;
598
+    }
599
+}
600
+
601
+export function reLogin() {
602
+    const userStore = useUserStore()
603
+    userStore.logout()
604
+    uni.switchTab({
605
+        url: '/pages/home/index'
606
+    })
607
+
608
+}
609
+
610
+/**
611
+ * 新签到信息
612
+ */
613
+export function getNewSignInInfo():Promise<SignInInfoModel> {
614
+    return defHttp.get({
615
+        url: API.NEW_SIGN_INFO,
616
+    })
617
+}
618
+
619
+/**
620
+ * 签到
621
+ */
622
+export function getNewSignIn(): Promise<SignInModel> {
623
+    return defHttp.post({
624
+        url: API.NEW_SIGN
625
+    })
626
+}
627
+
628
+/**
629
+ * 获取用户VIP信息
630
+ */
631
+export function getUserVipInfo(): Promise<UserVipInfoModel> {
632
+    return defHttp.get({
633
+        url: API.USER_VIP_INFO
634
+    })
635
+}

+ 326 - 0
src/auto-imports.d.ts

@@ -0,0 +1,326 @@
1
+/* eslint-disable */
2
+/* prettier-ignore */
3
+// @ts-nocheck
4
+// noinspection JSUnusedGlobalSymbols
5
+// Generated by unplugin-auto-import
6
+export {}
7
+declare global {
8
+  const EffectScope: typeof import('vue')['EffectScope']
9
+  const PositionProp: typeof import('./composables/useProps')['PositionProp']
10
+  const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
11
+  const computed: typeof import('vue')['computed']
12
+  const createApp: typeof import('vue')['createApp']
13
+  const createPinia: typeof import('pinia')['createPinia']
14
+  const customRef: typeof import('vue')['customRef']
15
+  const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
16
+  const defineComponent: typeof import('vue')['defineComponent']
17
+  const defineStore: typeof import('pinia')['defineStore']
18
+  const effectScope: typeof import('vue')['effectScope']
19
+  const getActivePinia: typeof import('pinia')['getActivePinia']
20
+  const getCurrentInstance: typeof import('vue')['getCurrentInstance']
21
+  const getCurrentScope: typeof import('vue')['getCurrentScope']
22
+  const h: typeof import('vue')['h']
23
+  const inject: typeof import('vue')['inject']
24
+  const isProxy: typeof import('vue')['isProxy']
25
+  const isReactive: typeof import('vue')['isReactive']
26
+  const isReadonly: typeof import('vue')['isReadonly']
27
+  const isRef: typeof import('vue')['isRef']
28
+  const mapActions: typeof import('pinia')['mapActions']
29
+  const mapGetters: typeof import('pinia')['mapGetters']
30
+  const mapState: typeof import('pinia')['mapState']
31
+  const mapStores: typeof import('pinia')['mapStores']
32
+  const mapWritableState: typeof import('pinia')['mapWritableState']
33
+  const markRaw: typeof import('vue')['markRaw']
34
+  const nextTick: typeof import('vue')['nextTick']
35
+  const onActivated: typeof import('vue')['onActivated']
36
+  const onAddToFavorites: typeof import('@dcloudio/uni-app')['onAddToFavorites']
37
+  const onBackPress: typeof import('@dcloudio/uni-app')['onBackPress']
38
+  const onBeforeMount: typeof import('vue')['onBeforeMount']
39
+  const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
40
+  const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
41
+  const onDeactivated: typeof import('vue')['onDeactivated']
42
+  const onError: typeof import('@dcloudio/uni-app')['onError']
43
+  const onErrorCaptured: typeof import('vue')['onErrorCaptured']
44
+  const onHide: typeof import('@dcloudio/uni-app')['onHide']
45
+  const onLaunch: typeof import('@dcloudio/uni-app')['onLaunch']
46
+  const onLoad: typeof import('@dcloudio/uni-app')['onLoad']
47
+  const onMounted: typeof import('vue')['onMounted']
48
+  const onNavigationBarButtonTap: typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']
49
+  const onNavigationBarSearchInputChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']
50
+  const onNavigationBarSearchInputClicked: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']
51
+  const onNavigationBarSearchInputConfirmed: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']
52
+  const onNavigationBarSearchInputFocusChanged: typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']
53
+  const onPageNotFound: typeof import('@dcloudio/uni-app')['onPageNotFound']
54
+  const onPageScroll: typeof import('@dcloudio/uni-app')['onPageScroll']
55
+  const onPullDownRefresh: typeof import('@dcloudio/uni-app')['onPullDownRefresh']
56
+  const onReachBottom: typeof import('@dcloudio/uni-app')['onReachBottom']
57
+  const onReady: typeof import('@dcloudio/uni-app')['onReady']
58
+  const onRenderTracked: typeof import('vue')['onRenderTracked']
59
+  const onRenderTriggered: typeof import('vue')['onRenderTriggered']
60
+  const onResize: typeof import('@dcloudio/uni-app')['onResize']
61
+  const onScopeDispose: typeof import('vue')['onScopeDispose']
62
+  const onServerPrefetch: typeof import('vue')['onServerPrefetch']
63
+  const onShareAppMessage: typeof import('@dcloudio/uni-app')['onShareAppMessage']
64
+  const onShareTimeline: typeof import('@dcloudio/uni-app')['onShareTimeline']
65
+  const onShow: typeof import('@dcloudio/uni-app')['onShow']
66
+  const onTabItemTap: typeof import('@dcloudio/uni-app')['onTabItemTap']
67
+  const onThemeChange: typeof import('@dcloudio/uni-app')['onThemeChange']
68
+  const onUnhandledRejection: typeof import('@dcloudio/uni-app')['onUnhandledRejection']
69
+  const onUnload: typeof import('@dcloudio/uni-app')['onUnload']
70
+  const onUnmounted: typeof import('vue')['onUnmounted']
71
+  const onUpdated: typeof import('vue')['onUpdated']
72
+  const provide: typeof import('vue')['provide']
73
+  const reactive: typeof import('vue')['reactive']
74
+  const readonly: typeof import('vue')['readonly']
75
+  const ref: typeof import('vue')['ref']
76
+  const resolveComponent: typeof import('vue')['resolveComponent']
77
+  const setActivePinia: typeof import('pinia')['setActivePinia']
78
+  const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
79
+  const shallowReactive: typeof import('vue')['shallowReactive']
80
+  const shallowReadonly: typeof import('vue')['shallowReadonly']
81
+  const shallowRef: typeof import('vue')['shallowRef']
82
+  const storeToRefs: typeof import('pinia')['storeToRefs']
83
+  const toRaw: typeof import('vue')['toRaw']
84
+  const toRef: typeof import('vue')['toRef']
85
+  const toRefs: typeof import('vue')['toRefs']
86
+  const toValue: typeof import('vue')['toValue']
87
+  const triggerRef: typeof import('vue')['triggerRef']
88
+  const unref: typeof import('vue')['unref']
89
+  const useAppStore: typeof import('./stores/app')['useAppStore']
90
+  const useAppStoreWidthOut: typeof import('./stores/app')['useAppStoreWidthOut']
91
+  const useAttrs: typeof import('vue')['useAttrs']
92
+  const useCssModule: typeof import('vue')['useCssModule']
93
+  const useCssVars: typeof import('vue')['useCssVars']
94
+  const useCustomClassProp: typeof import('./composables/useProps')['useCustomClassProp']
95
+  const useCustomStyleProp: typeof import('./composables/useProps')['useCustomStyleProp']
96
+  const useDacangStore: typeof import('./stores/dacangStore')['useDacangStore']
97
+  const useDirectionProp: typeof import('./composables/useProps')['useDirectionProp']
98
+  const usePageStore: typeof import('./stores/page')['usePageStore']
99
+  const usePageStoreWidthOut: typeof import('./stores/page')['usePageStoreWidthOut']
100
+  const useSizeProp: typeof import('./composables/useProps')['useSizeProp']
101
+  const useSlots: typeof import('vue')['useSlots']
102
+  const useTypeProp: typeof import('./composables/useProps')['useTypeProp']
103
+  const useUserStore: typeof import('./stores/userStore')['useUserStore']
104
+  const useVariantProp: typeof import('./composables/useProps')['useVariantProp']
105
+  const watch: typeof import('vue')['watch']
106
+  const watchEffect: typeof import('vue')['watchEffect']
107
+  const watchPostEffect: typeof import('vue')['watchPostEffect']
108
+  const watchSyncEffect: typeof import('vue')['watchSyncEffect']
109
+}
110
+// for type re-export
111
+declare global {
112
+  // @ts-ignore
113
+  export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
114
+}
115
+// for vue template auto import
116
+import { UnwrapRef } from 'vue'
117
+declare module 'vue' {
118
+  interface ComponentCustomProperties {
119
+    readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
120
+    readonly PositionProp: UnwrapRef<typeof import('./composables/useProps')['PositionProp']>
121
+    readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
122
+    readonly computed: UnwrapRef<typeof import('vue')['computed']>
123
+    readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
124
+    readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
125
+    readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
126
+    readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
127
+    readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
128
+    readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
129
+    readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
130
+    readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
131
+    readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
132
+    readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
133
+    readonly h: UnwrapRef<typeof import('vue')['h']>
134
+    readonly inject: UnwrapRef<typeof import('vue')['inject']>
135
+    readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
136
+    readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
137
+    readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
138
+    readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
139
+    readonly mapActions: UnwrapRef<typeof import('pinia')['mapActions']>
140
+    readonly mapGetters: UnwrapRef<typeof import('pinia')['mapGetters']>
141
+    readonly mapState: UnwrapRef<typeof import('pinia')['mapState']>
142
+    readonly mapStores: UnwrapRef<typeof import('pinia')['mapStores']>
143
+    readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
144
+    readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
145
+    readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
146
+    readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
147
+    readonly onAddToFavorites: UnwrapRef<typeof import('@dcloudio/uni-app')['onAddToFavorites']>
148
+    readonly onBackPress: UnwrapRef<typeof import('@dcloudio/uni-app')['onBackPress']>
149
+    readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
150
+    readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
151
+    readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
152
+    readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
153
+    readonly onError: UnwrapRef<typeof import('@dcloudio/uni-app')['onError']>
154
+    readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
155
+    readonly onHide: UnwrapRef<typeof import('@dcloudio/uni-app')['onHide']>
156
+    readonly onLaunch: UnwrapRef<typeof import('@dcloudio/uni-app')['onLaunch']>
157
+    readonly onLoad: UnwrapRef<typeof import('@dcloudio/uni-app')['onLoad']>
158
+    readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
159
+    readonly onNavigationBarButtonTap: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']>
160
+    readonly onNavigationBarSearchInputChanged: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']>
161
+    readonly onNavigationBarSearchInputClicked: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']>
162
+    readonly onNavigationBarSearchInputConfirmed: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']>
163
+    readonly onNavigationBarSearchInputFocusChanged: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']>
164
+    readonly onPageNotFound: UnwrapRef<typeof import('@dcloudio/uni-app')['onPageNotFound']>
165
+    readonly onPageScroll: UnwrapRef<typeof import('@dcloudio/uni-app')['onPageScroll']>
166
+    readonly onPullDownRefresh: UnwrapRef<typeof import('@dcloudio/uni-app')['onPullDownRefresh']>
167
+    readonly onReachBottom: UnwrapRef<typeof import('@dcloudio/uni-app')['onReachBottom']>
168
+    readonly onReady: UnwrapRef<typeof import('@dcloudio/uni-app')['onReady']>
169
+    readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
170
+    readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
171
+    readonly onResize: UnwrapRef<typeof import('@dcloudio/uni-app')['onResize']>
172
+    readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
173
+    readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
174
+    readonly onShareAppMessage: UnwrapRef<typeof import('@dcloudio/uni-app')['onShareAppMessage']>
175
+    readonly onShareTimeline: UnwrapRef<typeof import('@dcloudio/uni-app')['onShareTimeline']>
176
+    readonly onShow: UnwrapRef<typeof import('@dcloudio/uni-app')['onShow']>
177
+    readonly onTabItemTap: UnwrapRef<typeof import('@dcloudio/uni-app')['onTabItemTap']>
178
+    readonly onThemeChange: UnwrapRef<typeof import('@dcloudio/uni-app')['onThemeChange']>
179
+    readonly onUnhandledRejection: UnwrapRef<typeof import('@dcloudio/uni-app')['onUnhandledRejection']>
180
+    readonly onUnload: UnwrapRef<typeof import('@dcloudio/uni-app')['onUnload']>
181
+    readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
182
+    readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
183
+    readonly provide: UnwrapRef<typeof import('vue')['provide']>
184
+    readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
185
+    readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
186
+    readonly ref: UnwrapRef<typeof import('vue')['ref']>
187
+    readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
188
+    readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
189
+    readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
190
+    readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
191
+    readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
192
+    readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
193
+    readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
194
+    readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
195
+    readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
196
+    readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
197
+    readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
198
+    readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
199
+    readonly unref: UnwrapRef<typeof import('vue')['unref']>
200
+    readonly useAppStore: UnwrapRef<typeof import('./stores/app')['useAppStore']>
201
+    readonly useAppStoreWidthOut: UnwrapRef<typeof import('./stores/app')['useAppStoreWidthOut']>
202
+    readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
203
+    readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
204
+    readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
205
+    readonly useCustomClassProp: UnwrapRef<typeof import('./composables/useProps')['useCustomClassProp']>
206
+    readonly useCustomStyleProp: UnwrapRef<typeof import('./composables/useProps')['useCustomStyleProp']>
207
+    readonly useDacangStore: UnwrapRef<typeof import('./stores/dacangStore')['useDacangStore']>
208
+    readonly useDirectionProp: UnwrapRef<typeof import('./composables/useProps')['useDirectionProp']>
209
+    readonly usePageStore: UnwrapRef<typeof import('./stores/page')['usePageStore']>
210
+    readonly usePageStoreWidthOut: UnwrapRef<typeof import('./stores/page')['usePageStoreWidthOut']>
211
+    readonly useSizeProp: UnwrapRef<typeof import('./composables/useProps')['useSizeProp']>
212
+    readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
213
+    readonly useTypeProp: UnwrapRef<typeof import('./composables/useProps')['useTypeProp']>
214
+    readonly useUserStore: UnwrapRef<typeof import('./stores/userStore')['useUserStore']>
215
+    readonly useVariantProp: UnwrapRef<typeof import('./composables/useProps')['useVariantProp']>
216
+    readonly watch: UnwrapRef<typeof import('vue')['watch']>
217
+    readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
218
+    readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
219
+    readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
220
+  }
221
+}
222
+declare module '@vue/runtime-core' {
223
+  interface ComponentCustomProperties {
224
+    readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
225
+    readonly PositionProp: UnwrapRef<typeof import('./composables/useProps')['PositionProp']>
226
+    readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
227
+    readonly computed: UnwrapRef<typeof import('vue')['computed']>
228
+    readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
229
+    readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']>
230
+    readonly customRef: UnwrapRef<typeof import('vue')['customRef']>
231
+    readonly defineAsyncComponent: UnwrapRef<typeof import('vue')['defineAsyncComponent']>
232
+    readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']>
233
+    readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']>
234
+    readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']>
235
+    readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']>
236
+    readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']>
237
+    readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']>
238
+    readonly h: UnwrapRef<typeof import('vue')['h']>
239
+    readonly inject: UnwrapRef<typeof import('vue')['inject']>
240
+    readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
241
+    readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
242
+    readonly isReadonly: UnwrapRef<typeof import('vue')['isReadonly']>
243
+    readonly isRef: UnwrapRef<typeof import('vue')['isRef']>
244
+    readonly mapActions: UnwrapRef<typeof import('pinia')['mapActions']>
245
+    readonly mapGetters: UnwrapRef<typeof import('pinia')['mapGetters']>
246
+    readonly mapState: UnwrapRef<typeof import('pinia')['mapState']>
247
+    readonly mapStores: UnwrapRef<typeof import('pinia')['mapStores']>
248
+    readonly mapWritableState: UnwrapRef<typeof import('pinia')['mapWritableState']>
249
+    readonly markRaw: UnwrapRef<typeof import('vue')['markRaw']>
250
+    readonly nextTick: UnwrapRef<typeof import('vue')['nextTick']>
251
+    readonly onActivated: UnwrapRef<typeof import('vue')['onActivated']>
252
+    readonly onAddToFavorites: UnwrapRef<typeof import('@dcloudio/uni-app')['onAddToFavorites']>
253
+    readonly onBackPress: UnwrapRef<typeof import('@dcloudio/uni-app')['onBackPress']>
254
+    readonly onBeforeMount: UnwrapRef<typeof import('vue')['onBeforeMount']>
255
+    readonly onBeforeUnmount: UnwrapRef<typeof import('vue')['onBeforeUnmount']>
256
+    readonly onBeforeUpdate: UnwrapRef<typeof import('vue')['onBeforeUpdate']>
257
+    readonly onDeactivated: UnwrapRef<typeof import('vue')['onDeactivated']>
258
+    readonly onError: UnwrapRef<typeof import('@dcloudio/uni-app')['onError']>
259
+    readonly onErrorCaptured: UnwrapRef<typeof import('vue')['onErrorCaptured']>
260
+    readonly onHide: UnwrapRef<typeof import('@dcloudio/uni-app')['onHide']>
261
+    readonly onLaunch: UnwrapRef<typeof import('@dcloudio/uni-app')['onLaunch']>
262
+    readonly onLoad: UnwrapRef<typeof import('@dcloudio/uni-app')['onLoad']>
263
+    readonly onMounted: UnwrapRef<typeof import('vue')['onMounted']>
264
+    readonly onNavigationBarButtonTap: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarButtonTap']>
265
+    readonly onNavigationBarSearchInputChanged: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputChanged']>
266
+    readonly onNavigationBarSearchInputClicked: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputClicked']>
267
+    readonly onNavigationBarSearchInputConfirmed: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputConfirmed']>
268
+    readonly onNavigationBarSearchInputFocusChanged: UnwrapRef<typeof import('@dcloudio/uni-app')['onNavigationBarSearchInputFocusChanged']>
269
+    readonly onPageNotFound: UnwrapRef<typeof import('@dcloudio/uni-app')['onPageNotFound']>
270
+    readonly onPageScroll: UnwrapRef<typeof import('@dcloudio/uni-app')['onPageScroll']>
271
+    readonly onPullDownRefresh: UnwrapRef<typeof import('@dcloudio/uni-app')['onPullDownRefresh']>
272
+    readonly onReachBottom: UnwrapRef<typeof import('@dcloudio/uni-app')['onReachBottom']>
273
+    readonly onReady: UnwrapRef<typeof import('@dcloudio/uni-app')['onReady']>
274
+    readonly onRenderTracked: UnwrapRef<typeof import('vue')['onRenderTracked']>
275
+    readonly onRenderTriggered: UnwrapRef<typeof import('vue')['onRenderTriggered']>
276
+    readonly onResize: UnwrapRef<typeof import('@dcloudio/uni-app')['onResize']>
277
+    readonly onScopeDispose: UnwrapRef<typeof import('vue')['onScopeDispose']>
278
+    readonly onServerPrefetch: UnwrapRef<typeof import('vue')['onServerPrefetch']>
279
+    readonly onShareAppMessage: UnwrapRef<typeof import('@dcloudio/uni-app')['onShareAppMessage']>
280
+    readonly onShareTimeline: UnwrapRef<typeof import('@dcloudio/uni-app')['onShareTimeline']>
281
+    readonly onShow: UnwrapRef<typeof import('@dcloudio/uni-app')['onShow']>
282
+    readonly onTabItemTap: UnwrapRef<typeof import('@dcloudio/uni-app')['onTabItemTap']>
283
+    readonly onThemeChange: UnwrapRef<typeof import('@dcloudio/uni-app')['onThemeChange']>
284
+    readonly onUnhandledRejection: UnwrapRef<typeof import('@dcloudio/uni-app')['onUnhandledRejection']>
285
+    readonly onUnload: UnwrapRef<typeof import('@dcloudio/uni-app')['onUnload']>
286
+    readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
287
+    readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
288
+    readonly provide: UnwrapRef<typeof import('vue')['provide']>
289
+    readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
290
+    readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
291
+    readonly ref: UnwrapRef<typeof import('vue')['ref']>
292
+    readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
293
+    readonly setActivePinia: UnwrapRef<typeof import('pinia')['setActivePinia']>
294
+    readonly setMapStoreSuffix: UnwrapRef<typeof import('pinia')['setMapStoreSuffix']>
295
+    readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
296
+    readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
297
+    readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
298
+    readonly storeToRefs: UnwrapRef<typeof import('pinia')['storeToRefs']>
299
+    readonly toRaw: UnwrapRef<typeof import('vue')['toRaw']>
300
+    readonly toRef: UnwrapRef<typeof import('vue')['toRef']>
301
+    readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
302
+    readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
303
+    readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
304
+    readonly unref: UnwrapRef<typeof import('vue')['unref']>
305
+    readonly useAppStore: UnwrapRef<typeof import('./stores/app')['useAppStore']>
306
+    readonly useAppStoreWidthOut: UnwrapRef<typeof import('./stores/app')['useAppStoreWidthOut']>
307
+    readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
308
+    readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']>
309
+    readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
310
+    readonly useCustomClassProp: UnwrapRef<typeof import('./composables/useProps')['useCustomClassProp']>
311
+    readonly useCustomStyleProp: UnwrapRef<typeof import('./composables/useProps')['useCustomStyleProp']>
312
+    readonly useDacangStore: UnwrapRef<typeof import('./stores/dacangStore')['useDacangStore']>
313
+    readonly useDirectionProp: UnwrapRef<typeof import('./composables/useProps')['useDirectionProp']>
314
+    readonly usePageStore: UnwrapRef<typeof import('./stores/page')['usePageStore']>
315
+    readonly usePageStoreWidthOut: UnwrapRef<typeof import('./stores/page')['usePageStoreWidthOut']>
316
+    readonly useSizeProp: UnwrapRef<typeof import('./composables/useProps')['useSizeProp']>
317
+    readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
318
+    readonly useTypeProp: UnwrapRef<typeof import('./composables/useProps')['useTypeProp']>
319
+    readonly useUserStore: UnwrapRef<typeof import('./stores/userStore')['useUserStore']>
320
+    readonly useVariantProp: UnwrapRef<typeof import('./composables/useProps')['useVariantProp']>
321
+    readonly watch: UnwrapRef<typeof import('vue')['watch']>
322
+    readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>
323
+    readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']>
324
+    readonly watchSyncEffect: UnwrapRef<typeof import('vue')['watchSyncEffect']>
325
+  }
326
+}

+ 13 - 0
src/components.d.ts

@@ -0,0 +1,13 @@
1
+/* eslint-disable */
2
+/* prettier-ignore */
3
+// @ts-nocheck
4
+// Generated by unplugin-vue-components
5
+// Read more: https://github.com/vuejs/core/pull/3399
6
+export {}
7
+
8
+declare module 'vue' {
9
+  export interface GlobalComponents {
10
+    RouterLink: typeof import('vue-router')['RouterLink']
11
+    RouterView: typeof import('vue-router')['RouterView']
12
+  }
13
+}

+ 110 - 0
src/components/CXBAuthorize/CXBAuthorize.vue

@@ -0,0 +1,110 @@
1
+<template>
2
+  <view>
3
+    <view class='Popup' v-if='isShowAuth'>
4
+      <view class="logo-auth">
5
+        <image :src='logoUrl' mode="aspectFit"></image>
6
+      </view>
7
+      <view class='title'>授权提醒</view>
8
+      <view class='tip'>请授权头像等信息,以便为您提供更好的服务</view>
9
+      <view class='bottom flex'>
10
+        <view class='item' @click='close'>随便逛逛</view>
11
+        <!--  #ifdef APP-PLUS
12
+          <button class='item grant' @click="setUserInfo">去授权</button>
13
+        #endif -->
14
+        <!-- #ifdef MP -->
15
+        <button class='item grant'  type="primary" open-type="getUserInfo" lang="zh_CN" @getuserinfo="setUserInfo">去授权</button>
16
+        <!-- #endif -->
17
+      </view>
18
+    </view>
19
+    <view class='mask' v-if='isShowAuth' @click='close'></view>
20
+  </view>
21
+</template>
22
+
23
+<script lang="ts" setup>
24
+import Routine from "~/libs/routine";
25
+import {useUserStore} from "~/stores/userStore";
26
+import {useLoading} from "@uni-helper/uni-use";
27
+
28
+const app: any = getApp();
29
+const emit = defineEmits<{
30
+  (e: 'loadFun', value: any): void,
31
+  (e: 'authClose', value: boolean): void
32
+}>()
33
+const props = defineProps({
34
+  isAuto: {
35
+    type: Boolean,
36
+    default: true
37
+  },
38
+  isGoIndex: {
39
+    type: Boolean,
40
+    default: true
41
+  },
42
+  isShowAuth: {
43
+    type: Boolean,
44
+    default: false
45
+  }
46
+})
47
+const userStore = useUserStore()
48
+
49
+// onMounted(() => {
50
+// })
51
+const setAuthStatus = () => {
52
+  Routine.authorize().then(res => {
53
+    console.log(res)
54
+    if (res.isLogin == false) {
55
+      // 去登录
56
+      uni.navigateTo({
57
+        url: '/pages/user/login/index?key=3'
58
+      })
59
+      setUserInfo()
60
+    }
61
+    // if (res.isLogin === false) {
62
+    //   setUserInfo()
63
+    // }
64
+    //   if(res.islogin === false)
65
+    //     this.setUserInfo();
66
+    //   else
67
+    //     this.$emit('onLoadFun',this.userInfo);
68
+    // }).catch(res=>{
69
+    //   if (this.isAuto)
70
+    //     this.$emit('authColse',true);
71
+    // })
72
+  })
73
+}
74
+
75
+setAuthStatus()
76
+
77
+
78
+const setUserInfo = () => {
79
+  // useLoading({
80
+  //   title: '正在登录中'
81
+  // })
82
+  // uni.showLoading({
83
+  //   title: '正在登录中'
84
+  // })
85
+  Routine.getCode().then( (code: string) => {
86
+    // uni.navigateTo({
87
+    //   url: '/pages/users/login/index?key=3'
88
+    // })
89
+    // console.log(code)
90
+    getUserInfo(code)
91
+  }).catch( res => {
92
+    uni.hideLoading()
93
+  })
94
+}
95
+
96
+const getUserInfo = (code: string) => {
97
+  Routine.getUserInfo().then((res: any) => {
98
+    let userInfo = res.userInfo
99
+    userInfo.code = code;
100
+    userInfo.spread_spid = app.globalData.spid;//获取推广人ID
101
+    userInfo.spread_code = app.globalData.code;//获取推广人分享二维码ID
102
+
103
+    Routine.authUserInfo(userInfo).then(res => {
104
+      uni.hideLoading()
105
+      emit('authClose', false)
106
+      emit('loadFun', userInfo)
107
+    })
108
+  })
109
+}
110
+</script>

+ 11 - 0
src/components/CXBBanner/CXBBanner.vue

@@ -0,0 +1,11 @@
1
+<script lang="ts" setup>
2
+</script>
3
+<template>
4
+  <div class="flex flex-col justify-center items-center py-20">
5
+    <image
6
+        src="https://test.bjtdba.com/applet/static/home/404986b1e3aeaf4b3829efa2c2ac6bf.png"
7
+        mode="widthFix"
8
+        class="w-35 h-35"
9
+    ></image>
10
+  </div>
11
+</template>

+ 53 - 0
src/components/CXBBasePage/CXBBasePage.vue

@@ -0,0 +1,53 @@
1
+<script setup lang='ts'>
2
+import FPage from "~/components/FPage/FPage.vue";
3
+import FNavBar from "~/components/FNavBar/FNavBar.vue";
4
+
5
+defineProps({
6
+  show: {
7
+    type: Boolean,
8
+    default: false,
9
+  },
10
+  title: {
11
+    type: String,
12
+  },
13
+  backArrow: {
14
+    type: Boolean,
15
+    default: true,
16
+  },
17
+})
18
+
19
+const curPage = getCurrentPages().at(-1) as any
20
+
21
+// #ifdef H5
22
+if (window.parent !== window.self) {
23
+  window.parent.postMessage({
24
+    type: 'route',
25
+    data: curPage.route,
26
+  }, '*')
27
+}
28
+// #endif
29
+
30
+const titleText = curPage.$page?.meta?.navigationBar?.titleText || '标题'
31
+
32
+function onClickLeft() {
33
+  const pages = getCurrentPages()
34
+  if (pages.length > 1) {
35
+    uni.navigateBack()
36
+  }
37
+  else {
38
+    uni.redirectTo({
39
+      url: '/',
40
+    })
41
+  }
42
+}
43
+</script>
44
+
45
+<template>
46
+  <FPage ex-class="font-sans pb-10 fixed inset-0 overflow-auto">
47
+    <FNavBar
48
+        v-if="show" :title="title ?? titleText" :left-arrow="backArrow" fixed placeholder z-index="999"
49
+        @click-left="onClickLeft"
50
+    />
51
+    <slot />
52
+  </FPage>
53
+</template>

+ 31 - 0
src/components/CXBButton/CXBButton.vue

@@ -0,0 +1,31 @@
1
+<template>
2
+  <FButton
3
+      :size="size"
4
+      :exClass="['rounded-full', 'text-white', classes]"
5
+  >
6
+    <slot />
7
+  </FButton>
8
+</template>
9
+<script setup lang="ts">
10
+import FButton from "~/components/FButton/FButton.vue";
11
+const props = defineProps({
12
+  type: {
13
+    type: String,
14
+    default: 'gradient'
15
+  },
16
+  size: {
17
+    type: String,
18
+    default: 'small',
19
+    required: true
20
+  }
21
+})
22
+
23
+const classes = computed(() => {
24
+  if (props.type === 'gradient') {
25
+    return [ 'bg-gradient-to-r', 'from-[#fe0032]', 'to-[#fe7577]']
26
+  }
27
+  if (props.type === 'fill') {
28
+    return ['bg-[#fe0032]', '!text-[10px]', 'min-w-13']
29
+  }
30
+})
31
+</script>

+ 167 - 0
src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue

@@ -0,0 +1,167 @@
1
+<script setup lang="ts">
2
+import FOverlay from "~/components/FOverlay/FOverlay.vue";
3
+import SignRedPacket from "~/components/CXBDialogSignIn/SignRedPacket.vue";
4
+import SignInGiftBag from "~/components/CXBDialogSignIn/SignInGiftBag.vue";
5
+import {CLICK_EVENT, CLOSE_EVENT, CONFIRM_EVENT} from "~/constants/event";
6
+import {getNewSignIn} from "~/apis/user";
7
+import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
8
+import {CDN_URL} from "~/config/app";
9
+
10
+const bgImage = CDN_URL + '/static/assets/sign_in_bg.png'
11
+const signInBtnImage = CDN_URL + '/static/assets/sign_in_button.png'
12
+const signInCloseImage = CDN_URL + '/static/assets/sign_in_close.png'
13
+
14
+const isShowOverlay = ref(true)
15
+
16
+const props = defineProps({
17
+  show: {
18
+    type: Boolean,
19
+    default: false
20
+  },
21
+  today: {
22
+    type: Number,
23
+    default: 0
24
+  },
25
+  day: {
26
+    type: Number,
27
+    default: 0
28
+  }
29
+})
30
+
31
+const show = ref(props.show || false)
32
+
33
+const showValue = computed(() => props.show || show.value)
34
+
35
+const signInSuccess = ref(false)
36
+
37
+const signInScore = ref(0)
38
+
39
+const emit = defineEmits({
40
+  [CLICK_EVENT]: (evt: MouseEvent) => evt instanceof Object,
41
+  [CLOSE_EVENT]: (evt: MouseEvent) => evt instanceof Object,
42
+  [CONFIRM_EVENT]: () => true,
43
+  // 'signIn': () => Boolean
44
+})
45
+
46
+// const integral
47
+function getScoreText(day: number) {
48
+  let integral = 0
49
+  switch (day) {
50
+    case 0: {
51
+      // return getScoreText(2)
52
+      integral = 2
53
+      break;
54
+    }
55
+    case 1: {
56
+      integral = 4
57
+      break;
58
+    }
59
+    case 2: {
60
+      integral = 6
61
+      break;
62
+    }
63
+    case 3: {
64
+      integral = 10
65
+      break;
66
+    }
67
+    case 4: {
68
+      integral = 14
69
+      break;
70
+    }
71
+    case 5: {
72
+      integral = 20
73
+      break;
74
+    }
75
+    case 6: {
76
+      integral = 41
77
+      break;
78
+    }
79
+    case 13: {
80
+      integral = 71
81
+      break;
82
+    }
83
+    case 20: {
84
+      integral = 131
85
+      break;
86
+    }
87
+    case 29: {
88
+      integral = 191
89
+    }
90
+  }
91
+  return `+${integral}积分`
92
+}
93
+
94
+const signInFor = computed(() => {
95
+  if (props.today === 0) {
96
+    return getScoreText(props.day)
97
+  }
98
+})
99
+
100
+function closeHandler(evt: MouseEvent) {
101
+  show.value = false
102
+  emit(CLOSE_EVENT, evt)
103
+}
104
+function confirmHandler() {
105
+  // 执行签到
106
+  getNewSignIn().then(res => {
107
+    // res.score
108
+    if (res) {
109
+      signInScore.value = res.score
110
+      signInSuccess.value = true
111
+    }
112
+  })
113
+  emit(CONFIRM_EVENT)
114
+}
115
+
116
+function handleSignInSucceedClose() {
117
+  signInSuccess.value = false
118
+}
119
+</script>
120
+<template>
121
+  <FOverlay :show="showValue"
122
+            name="fade"
123
+  >
124
+    <div class="bg flex flex-col justify-center items-center h-full w-full relative ">
125
+      <image :src="bgImage" mode="widthFix"
126
+             class="absolute "
127
+      ></image>
128
+      <div class="flex flex-col justify-around items-center relative top-10 gap-3 ">
129
+        <div class="flex gap-4 mb-4 ">
130
+          <SignRedPacket
131
+              v-for="item in 6"
132
+              :key="item"
133
+              :day="item"
134
+          />
135
+        </div>
136
+        <div class=" px-4 flex mb-4 ">
137
+          <div class="flex gap-3 ">
138
+            <SignInGiftBag
139
+                v-for="item in [7, 14, 21, 30]"
140
+                :key="item"
141
+                :day="item"
142
+            />
143
+          </div>
144
+        </div>
145
+
146
+        <div
147
+            @click.stop="confirmHandler"
148
+            class="relative h-13 flex justify-center items-center">
149
+          <image :src="signInBtnImage" mode="widthFix"
150
+                 class="absolute w-45"></image>
151
+          <div class="relative flex w-full text-white top--1.5">
152
+            <div>立即签到</div>
153
+            <div class="text-[#ffe980]">{{ signInFor }}</div>
154
+          </div>
155
+        </div>
156
+      </div>
157
+    </div>
158
+    <div
159
+        @click.stop="closeHandler"
160
+        class="relative bottom-40 flex justify-center items-center"
161
+    >
162
+      <image :src="signInCloseImage" class="h-8 w-8"></image>
163
+    </div>
164
+  </FOverlay>
165
+  <CXBDialogSIgnInSucceed :show="signInSuccess" @close="handleSignInSucceedClose"/>
166
+
167
+</template>

+ 64 - 0
src/components/CXBDialogSignIn/SignInGiftBag.vue

@@ -0,0 +1,64 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+
4
+const bgGiftImg = CDN_URL + '/static/assets/sign_in_gift_bag.png'
5
+const bgTrophyImg = CDN_URL + '/static/assets/sign_in_trophy.png'
6
+
7
+const bgImg = computed(() => {
8
+  if (props.day !== 30) {
9
+    return bgGiftImg
10
+  }
11
+  return bgTrophyImg
12
+})
13
+const props = defineProps({
14
+  integral: {
15
+    type: Number,
16
+    default: 0
17
+  },
18
+  day: {
19
+    type: Number,
20
+    required: true
21
+  }
22
+})
23
+const cIntegral = computed(() => {
24
+  if (props.integral) return props.integral
25
+  let integral = 0;
26
+  switch (props.day) {
27
+    case 7: {
28
+      integral = 38
29
+      break;
30
+    }
31
+    case 14: {
32
+      integral = 68
33
+      break;
34
+    }
35
+    case 21: {
36
+      integral = 128
37
+      break;
38
+    }
39
+    case 30: {
40
+      integral = 188
41
+      break;
42
+    }
43
+  }
44
+  return integral
45
+})
46
+</script>
47
+<template>
48
+  <div class="flex">
49
+    <div class="flex flex-col items-center">
50
+      <div class=" flex flex-col  items-center text-primary text-xs">
51
+        <div class="!bg-white p-2 relative rounded-t">
52
+          <image :src="bgImg"
53
+                 mode="widthFix"
54
+                 class="relative w-10"
55
+          ></image>
56
+        </div>
57
+
58
+        <div class="relative text-[11px] mb-1 bg-[#feeae9] w-full rounded-b text-center">+{{ cIntegral }}</div>
59
+      </div>
60
+      <div class="relative text-[10px]">第 {{day}} 天</div>
61
+    </div>
62
+  </div>
63
+
64
+</template>

+ 26 - 0
src/components/CXBDialogSignIn/SignRedPacket.vue

@@ -0,0 +1,26 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+
4
+const signInRedPacketImage = CDN_URL + '/static/assets/sign_in_red_packet.png'
5
+const props = defineProps({
6
+  day: {
7
+    type: Number,
8
+    required: true
9
+  }
10
+})
11
+</script>
12
+<template>
13
+  <div class="flex ">
14
+    <div class="flex flex-col gap-1">
15
+      <div class="relative flex flex-col h-13 w-full justify-end items-center text-white text-xs">
16
+        <image :src="signInRedPacketImage"
17
+               mode="widthFix"
18
+               class="absolute w-9 h-10"
19
+        ></image>
20
+        <div class="relative text-[11px] mb-1">+2</div>
21
+      </div>
22
+      <div class="relative text-[10px]">第 {{ props.day }} 天</div>
23
+    </div>
24
+  </div>
25
+
26
+</template>

+ 65 - 0
src/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue

@@ -0,0 +1,65 @@
1
+<script setup lang="ts">
2
+import FOverlay from "~/components/FOverlay/FOverlay.vue";
3
+import FButton from "~/components/FButton/FButton.vue";
4
+import {CLICK_EVENT, CLOSE_EVENT} from "~/constants/event";
5
+import {CDN_URL} from "~/config/app";
6
+
7
+const bgImage = CDN_URL + '/static/assets/signin_succeed_dialog_bg.png'
8
+const signInCloseImage = CDN_URL + '/static/assets/sign_in_close.png'
9
+
10
+const props = defineProps({
11
+  show: {
12
+    type: Boolean
13
+  },
14
+  score: {
15
+    type: String,
16
+    default: 2
17
+  }
18
+})
19
+const show = ref(props.show || false)
20
+
21
+const showValue = computed(() => props.show || show.value)
22
+
23
+// const isShowOverlay = ref(true)
24
+const emit = defineEmits({
25
+  [CLICK_EVENT]: (evt: MouseEvent) => evt instanceof Object,
26
+  [CLOSE_EVENT]: (evt: MouseEvent) => evt instanceof Object
27
+})
28
+
29
+function closeHandler(evt: MouseEvent) {
30
+  show.value = false
31
+  emit(CLOSE_EVENT, evt)
32
+}
33
+</script>
34
+<template>
35
+  <FOverlay :show="showValue"
36
+            name="fade"
37
+  >
38
+    <div class="flex flex-col justify-center items-center w-full h-full gap-6">
39
+      <div class="relative bg-gradient-to-b from-[#ffffff] to-[#fff6d5]  rounded w-70 h-45 flex flex-col justify-center  items-center">
40
+        <image :src="bgImage" mode="widthFix"
41
+               class="absolute w-30 top--12"
42
+        ></image>
43
+        <div class="text-[#854a1b]">
44
+          恭喜获得积分 +{{score}}
45
+        </div>
46
+        <div class="pb-5 absolute bottom-0">
47
+          <FButton
48
+              size="small"
49
+              :exClass="['rounded-lg', 'text-white','bg-[#fe0032]', 'w-40']"
50
+              @click.stop="closeHandler"
51
+          >
52
+            我知道了
53
+          </FButton>
54
+        </div>
55
+
56
+      </div>
57
+
58
+      <div class="relative flex justify-center items-center" @click.stop="closeHandler">
59
+        <image :src="signInCloseImage" class="h-8 w-8"></image>
60
+      </div>
61
+    </div>
62
+
63
+  </FOverlay>
64
+
65
+</template>

+ 64 - 0
src/components/CXBDialogSignInSucceed/SignInGiftBag.vue

@@ -0,0 +1,64 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+
4
+const bgGiftImg = CDN_URL + '/static/assets/sign_in_gift_bag.png'
5
+const bgTrophyImg = CDN_URL + '/static/assets/sign_in_trophy.png'
6
+
7
+const bgImg = computed(() => {
8
+  if (props.day !== 30) {
9
+    return bgGiftImg
10
+  }
11
+  return bgTrophyImg
12
+})
13
+const props = defineProps({
14
+  integral: {
15
+    type: Number,
16
+    default: 0
17
+  },
18
+  day: {
19
+    type: Number,
20
+    required: true
21
+  }
22
+})
23
+const cIntegral = computed(() => {
24
+  if (props.integral) return props.integral
25
+  let integral = 0;
26
+  switch (props.day) {
27
+    case 7: {
28
+      integral = 38
29
+      break;
30
+    }
31
+    case 14: {
32
+      integral = 68
33
+      break;
34
+    }
35
+    case 21: {
36
+      integral = 128
37
+      break;
38
+    }
39
+    case 30: {
40
+      integral = 188
41
+      break;
42
+    }
43
+  }
44
+  return integral
45
+})
46
+</script>
47
+<template>
48
+  <div class="flex">
49
+    <div class="flex flex-col items-center">
50
+      <div class=" flex flex-col  items-center text-primary text-xs">
51
+        <div class="!bg-white p-2 relative rounded-t">
52
+          <image :src="bgImg"
53
+                 mode="widthFix"
54
+                 class="relative w-10"
55
+          ></image>
56
+        </div>
57
+
58
+        <div class="relative text-[11px] mb-1 bg-[#feeae9] w-full rounded-b text-center">+{{ cIntegral }}</div>
59
+      </div>
60
+      <div class="relative text-[10px]">第 {{day}} 天</div>
61
+    </div>
62
+  </div>
63
+
64
+</template>

+ 26 - 0
src/components/CXBDialogSignInSucceed/SignRedPacket.vue

@@ -0,0 +1,26 @@
1
+<script setup lang="ts">
2
+import {CDN_URL} from "~/config/app";
3
+
4
+const signInRedPacketImage = CDN_URL + '/static/assets/sign_in_red_packet.png'
5
+const props = defineProps({
6
+  day: {
7
+    type: Number,
8
+    required: true
9
+  }
10
+})
11
+</script>
12
+<template>
13
+  <div class="flex ">
14
+    <div class="flex flex-col gap-1">
15
+      <div class="relative flex flex-col h-13 w-full justify-end items-center text-white text-xs">
16
+        <image :src="signInRedPacketImage"
17
+               mode="widthFix"
18
+               class="absolute w-9 h-10"
19
+        ></image>
20
+        <div class="relative text-[11px] mb-1">+2</div>
21
+      </div>
22
+      <div class="relative text-[10px]">第 {{ props.day }} 天</div>
23
+    </div>
24
+  </div>
25
+
26
+</template>

+ 44 - 0
src/components/CXBDyLive/CXBDyLiveRecommend.vue

@@ -0,0 +1,44 @@
1
+<script setup lang="ts">
2
+import FCell from "~/components/FCell/FCell.vue";
3
+import type {PropType} from "vue";
4
+import type {DyLiveModel} from "~/apis/model/product.model";
5
+import {encodeBase64} from "~/utils/http/helper";
6
+
7
+const props = defineProps({
8
+  list: {
9
+    type: Array as PropType<Array<DyLiveModel>>,
10
+    required: true
11
+  }
12
+})
13
+function handleItemClick(item: DyLiveModel) {
14
+  uni.navigateTo({
15
+    url: `/pages/store/product/dy-live-product-list?data=${encodeBase64(item)}`
16
+  })
17
+}
18
+</script>
19
+<template>
20
+  <div>
21
+    <FCell
22
+        @click="$emit('titleClick')"
23
+        title="抖音热门直播"
24
+           value="查看更多"
25
+           titleClass="font-bold"
26
+           valueClass="text-sm"
27
+           exClass="!f-bg"
28
+           arrow
29
+    >
30
+    </FCell>
31
+    <scroll-view
32
+        class="flex flex-row w-full gap-2 overflow-x whitespace-nowrap w-screen"
33
+        :scroll-with-animation="true"
34
+        :scroll-x="true"
35
+    >
36
+      <div v-for="(item,index) in list" :key="index"
37
+           @tap="handleItemClick(item)"
38
+           class="flex inline-flex pl-2 items-center justify-center relative"
39
+      >
40
+          <image :src="item.authorPic" mode="widthFix" class="w-20 h-20 rounded"></image>
41
+      </div>
42
+    </scroll-view>
43
+  </div>
44
+</template>

+ 37 - 0
src/components/CXBEmpty/CXBEmpty.vue

@@ -0,0 +1,37 @@
1
+<script lang="ts" setup>
2
+import {CDN_URL} from "~/config/app";
3
+
4
+const searchEmptyImg = CDN_URL + '/static/assets/search_zanwuxiangguan_220617.png'
5
+const addressEmptyImg = CDN_URL + '/static/assets/no_address_bg_220624.png'
6
+// search
7
+const props = defineProps({
8
+  type: {
9
+    type: String,
10
+    default: 'search'
11
+  },
12
+  text: {
13
+    type: String,
14
+    default: '暂无数据'
15
+  }
16
+})
17
+
18
+const emptyImage = computed(() => {
19
+  // return props.type === 'search' ? searchEmptyImg : ''
20
+  switch (props.type) {
21
+    case 'search': {
22
+      return searchEmptyImg
23
+    }
24
+    case 'address': {
25
+      return addressEmptyImg
26
+    }
27
+  }
28
+})
29
+</script>
30
+<template>
31
+  <div class="w-full h-full">
32
+    <div class="flex flex-col justify-center items-center py-10 text-xs text-gray gap-4">
33
+      <image :src="emptyImage" mode="widthFix" class="w-18 h-18"></image>
34
+      <div>{{ text }}</div>
35
+    </div>
36
+  </div>
37
+</template>

+ 43 - 0
src/components/CXBNotLoginButton/CXBNotLoginButton.vue

@@ -0,0 +1,43 @@
1
+<script lang="ts" setup>
2
+const props = defineProps({
3
+  key: {
4
+    type: String,
5
+    require: true
6
+  }
7
+})
8
+function goTo() {
9
+  switch (props.key) {
10
+    case '1':
11
+      uni.navigateTo({
12
+        url: "/pages/order_addcart/order_addcart"
13
+      })
14
+      break;
15
+    case '4':
16
+      uni.navigateTo({
17
+        url: "./index"
18
+      })
19
+      break;
20
+    case '10':
21
+      uni.navigateTo({
22
+        url: "/pages/user/index"
23
+      })
24
+      break;
25
+    case '30':
26
+      uni.switchTab({
27
+        url: '/pages/home/index'
28
+      })
29
+      break;
30
+    default:
31
+      uni.switchTab({
32
+        url: "/pages/home/index"
33
+      })
34
+  }
35
+}
36
+</script>
37
+<template>
38
+  <div class="fixed bottom-0 w-full">
39
+<!--    <div class="flex justify-center items-center text-sm p-safe"-->
40
+<!--         @click="goTo"-->
41
+<!--    >暂不登录</div>-->
42
+  </div>
43
+</template>

+ 64 - 0
src/components/CXBNotLoginButton/test.json

@@ -0,0 +1,64 @@
1
+{
2
+  "status": 200,
3
+  "message": "success",
4
+  "data": {
5
+    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcHAuYmp0ZGJhLmNvbSIsImF1ZCI6ImFwcC5ianRkYmEuY29tIiwiaWF0IjoxNjkwODEyNjcwLCJuYmYiOjE2OTA4MTI2NzAsImV4cCI6MTcwMTYxMjY3MCwianRpIjpbMTAwODYsInVzZXIiXX0.YdzFyDX4sOt5o3D7XyL4Yh31uFTRaZ95H4DoD7FN2Vo",
6
+    "exp": 10800000,
7
+    "user": {
8
+      "uid": "10086",
9
+      "wechat_user_id": "0",
10
+      "ali_user_id": "0",
11
+      "account": "18911894578",
12
+      "sex": "0",
13
+      "nickname": "用户4578",
14
+      "avatar": "https:\/\/app.bjtdba.com\/uploads\/logo.jpg",
15
+      "phone": "18911894578",
16
+      "now_score": "0.00",
17
+      "now_money": "0.00",
18
+      "member_brokerage_price": "0.00",
19
+      "user_type": "APP",
20
+      "promoter_time": null,
21
+      "is_promoter": "0",
22
+      "pay_count": "0",
23
+      "pay_price": "0.00",
24
+      "spread_count": "0",
25
+      "adr_id": null,
26
+      "identity": "5",
27
+      "mer_id": "0",
28
+      "mer_topping": null,
29
+      "user_name": null,
30
+      "annuity_frozen": "0.00",
31
+      "annuity_num": "0",
32
+      "annuity": "0.00",
33
+      "agent_rebate": "0.00",
34
+      "mer_rebate": "0.00",
35
+      "promoter_rebate": "0.00",
36
+      "cross_store": "0.00",
37
+      "jurisdiction": "0.00",
38
+      "other_jurisdictions": "0.00",
39
+      "adv_fee": "0.00",
40
+      "xqxiaofei": "0.00",
41
+      "birthday60": null,
42
+      "card_number": null,
43
+      "annuity_yiqu": "0.00",
44
+      "is_new": "0",
45
+      "admin_agent_rate": "0.00",
46
+      "locktime": null,
47
+      "user_number": null,
48
+      "im": "0",
49
+      "im_uuid": null,
50
+      "test_user": "0",
51
+      "is_channel": "0",
52
+      "score": "0.00",
53
+      "annuity_once": "0",
54
+      "first_sign": "0",
55
+      "is_del": "0",
56
+      "first_shopping": "0",
57
+      "external": "1",
58
+      "external_id": null,
59
+      "score_beishengtang": "0.00",
60
+      "level_id": "9548",
61
+      "level": "5"
62
+    }
63
+  }
64
+}

+ 122 - 0
src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue

@@ -0,0 +1,122 @@
1
+<script lang="ts" setup>
2
+import {authAppletPhone, bindPhone, getUserUnionId} from "~/apis/user";
3
+import {useUserStore} from "~/stores/userStore";
4
+const userStore = useUserStore()
5
+const props = defineProps({
6
+  text: {
7
+    type: String,
8
+    require: true
9
+  },
10
+  key: {
11
+    type: String
12
+  }
13
+})
14
+function getPhoneNumber(e) {
15
+  // console.log(e.detail)
16
+  // console.log(e)
17
+  if (e.detail.errMsg === 'getPhoneNumber:ok') {
18
+    uni.login({
19
+      provider: 'weixin',
20
+      success: result => {
21
+        const source = 'cxb'
22
+        getUserUnionId({
23
+          code: result.code,
24
+          source,
25
+        }).then(unionRes => {
26
+          // 手机号授权
27
+          authAppletPhone({
28
+            sessionKey: unionRes.session_key,
29
+            encryptedData: e.detail.encryptedData,
30
+            iv: e.detail.iv
31
+          }).then(authRes => {
32
+            userStore.login(authRes.token, authRes.exp)
33
+            userStore.setUID(authRes.user.uid)
34
+            userStore.setUserInfo(authRes.user)
35
+
36
+            // 绑定手机号
37
+            bindPhone({
38
+              phone: authRes.user.account,
39
+              sms: 1,
40
+              sms_code: '1024',
41
+              password: '12345678',
42
+              third_user_id: unionRes.unionid,
43
+              type: 1
44
+            }).then(bindRes => {
45
+              console.log('已绑定手机')
46
+              console.log(bindRes)
47
+            })
48
+
49
+            // 跳转
50
+            switch (props.key) {
51
+              case '10':
52
+                uni.switchTab({
53
+                  url: '/pages/user/index'
54
+                })
55
+                break;
56
+              case '4':
57
+                uni.navigateBack({
58
+                  delta: 2
59
+                })
60
+                break;
61
+              case '1':
62
+                uni.switchTab({
63
+                  url: '/pages/order_addcart/index'
64
+                })
65
+                break;
66
+              case undefined:
67
+                uni.switchTab({
68
+                  url: '/pages/user/index'
69
+                })
70
+                    break;
71
+              case '30':
72
+                uni.switchTab({
73
+                  url: '/pages/home/index'
74
+                })
75
+                    break;
76
+              default:
77
+                uni.switchTab({
78
+                  url: '/pages/home/index'
79
+                })
80
+            }
81
+            // console.log(authRes)
82
+            // authRes.token
83
+          })
84
+          // 手机号绑定
85
+          // res.openid
86
+          // res.session_key
87
+          // bindPhone({
88
+          //
89
+          // })
90
+        })
91
+      }
92
+    })
93
+  }
94
+}
95
+</script>
96
+<template>
97
+  <div class="bg-white border border-solid border-1 border-gray-300 rounded-md py-3 gap-2 flex justify-center items-center">
98
+    <image
99
+        src="https://test.bjtdba.com/applet/static/home/4879edf0b6e2b0ad29fa7d4053d676b.png" mode="widthFix"
100
+        class="w-4 h-4"
101
+    ></image>
102
+    <button
103
+        open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
104
+    >
105
+      {{ text }}
106
+    </button>
107
+  </div>
108
+</template>
109
+
110
+<style>
111
+button{
112
+  margin: 0;
113
+  padding: 0;
114
+  outline: none;
115
+  border-radius: 0;
116
+  background-color: transparent;
117
+  line-height: inherit;
118
+}
119
+button::after{
120
+  border: none;
121
+}
122
+</style>

+ 173 - 0
src/components/CXBSkuPopup/CXBSkuPopup.vue

@@ -0,0 +1,173 @@
1
+<script setup lang="ts">
2
+import FPopup from "~/components/FPopup/FPopup.vue";
3
+import {CANCEL_EVENT, CONFIRM_EVENT} from "~/constants/event";
4
+import FPrice from "~/components/FPrice/FPrice.vue";
5
+import {SkuModel} from "~/apis/model/product.model";
6
+import {computed} from "vue";
7
+import {PopupProps} from "~/components/FPopup";
8
+import {CLOSE_EVENT, OPEN_EVENT, UPDATE_SHOW_EVENT} from "~/components/constants";
9
+import CXBButton from "~/components/CXBButton/CXBButton.vue";
10
+import FButton from "~/components/FButton/FButton.vue";
11
+const emit = defineEmits()
12
+const props = defineProps({
13
+  show: {
14
+    type: Boolean,
15
+    default: false
16
+  },
17
+  detail: {
18
+    type: Object
19
+  },
20
+  sku: {
21
+    type: Array,
22
+    default: () => {
23
+      return []
24
+    }
25
+  }
26
+})
27
+const show = ref(props.show || false)
28
+
29
+const showValue = computed<PopupProps['show']>({
30
+  get: () => props.show || show.value,
31
+  set(val) {
32
+    // console.log(val + 'xxxx')
33
+    if (val)
34
+      emit(OPEN_EVENT)
35
+    else
36
+      emit(CLOSE_EVENT)
37
+    show.value = val
38
+    emit(UPDATE_SHOW_EVENT, val)
39
+  },
40
+})
41
+const currentSku = ref(null)
42
+const onConfirm = () => {
43
+  show.value = false
44
+  showValue.value = false
45
+  console.log(showValue.value)
46
+  emit(CONFIRM_EVENT)
47
+}
48
+
49
+const onCancel = () => {
50
+  // show.value = false
51
+  showValue.value = false
52
+
53
+  emit(CANCEL_EVENT)
54
+}
55
+const count = ref(1)
56
+
57
+const skuList = computed(() => {
58
+  const skuData = []
59
+  if (props.detail && props.detail.sku) {
60
+    for (let key in props.detail.sku) {
61
+      const skuItem: SkuModel = props.detail.sku[key]
62
+      skuData.push(skuItem)
63
+      currentSku.value = skuData[0]
64
+    }
65
+  }
66
+  return skuData
67
+})
68
+
69
+onMounted(() => {
70
+  emit('selected:item', currentSku)
71
+
72
+})
73
+
74
+function handleSelectedSku(skuItem) {
75
+  currentSku.value = skuItem
76
+  emit('selected:item', currentSku)
77
+}
78
+function handleClose() {
79
+  showValue.value = false
80
+
81
+  emit(CLOSE_EVENT)
82
+}
83
+
84
+function handleAddCart() {
85
+  emit('submit')
86
+}
87
+// function handleSelectedSku(item) {
88
+//
89
+// }
90
+
91
+function handleCountChange(value) {
92
+  emit('count-change', value)
93
+}
94
+</script>
95
+
96
+<template>
97
+  <FPopup
98
+      v-model:show="showValue"
99
+      @close="onCancel"
100
+      position="bottom"
101
+      exClass="rounded-rt-xl rounded-lt-xl flex flex-col p-safe h-[40%]"
102
+
103
+  >
104
+    <div class="flex flex-col justify-between h-full">
105
+      <div class="flex-1">
106
+        <div class="p-3 flex flex-col gap-3">
107
+          <div class="flex flex-row gap-3">
108
+            <image :src="currentSku.image"
109
+                   v-if="currentSku"
110
+                   mode="widthFix" class="w-25 h-25 rounded"></image>
111
+            <div class="flex flex-col w-full">
112
+
113
+              <div class="flex gap-2 justify-between w-full">
114
+                <div class="text-overflow text-xs flex-1">
115
+                  {{ detail.store_name }}
116
+                </div>
117
+                <div
118
+                    @tap="handleClose"
119
+                    class="i-tabler-x w-5 h-5 text-gray-500"></div>
120
+              </div>
121
+
122
+
123
+              <div class="flex flex-col" v-if="currentSku">
124
+                <div class="text-[12px] text-right text-gray-500 ">
125
+                  剩余库存{{currentSku.stock}}
126
+                </div>
127
+                <div class="flex items-end gap-2" >
128
+                  <FPrice :price="currentSku.price"/>
129
+                  <FPrice v-if="detail && detail.ot_price" :price="detail.ot_price" :ex-class="'!text-black text-xs font-bold'" need-symbol strike-through/>
130
+                </div>
131
+              </div>
132
+
133
+            </div>
134
+          </div>
135
+
136
+          <div class="flex flex-row gap-2">
137
+            <div
138
+                v-for="(item, index) in skuList"
139
+                :key="index"
140
+                @tap="handleSelectedSku(item)"
141
+                class="text-[12px] border border-solid rounded p-1 px-2"
142
+                :class="currentSku.unique === item.unique ? 'border-primary text-primary' : 'border-gray-500 text-gray-500'"
143
+            >
144
+              {{ item.sku }}
145
+            </div>
146
+          </div>
147
+        </div>
148
+        <div class="p-3">
149
+          <div class="flex  justify-between text-sm">
150
+            数量
151
+            <nut-input-number v-model="count" @change="handleCountChange"/>
152
+          </div>
153
+
154
+
155
+        </div>
156
+      </div>
157
+
158
+      <div class="px-3">
159
+        <FButton
160
+            @click="handleAddCart"
161
+            size="small"
162
+            type="fill"
163
+            :exClass="['!bg-primary', 'rounded-full', 'text-white']"
164
+            block
165
+        >
166
+          确定
167
+        </FButton>
168
+
169
+      </div>
170
+    </div>
171
+
172
+  </FPopup>
173
+</template>

+ 19 - 0
src/components/CXBYaojinTag/CXBYaojinTag.vue

@@ -0,0 +1,19 @@
1
+<script setup lang="ts">
2
+const props = defineProps({
3
+  amount: {
4
+    type: Number,
5
+    required: true
6
+  }
7
+})
8
+</script>
9
+<template>
10
+  <div class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
11
+    <image src="https://cdn.bjtdba.com/vod/image/2023-02-21/20230221093033267.png"
12
+           mode="widthFix" class="!w-7"></image>
13
+    <div class="px-2 flex items-center jusitify-center text-[11px]">
14
+      <div>
15
+        养老金 ¥{{ amount }}
16
+      </div>
17
+    </div>
18
+  </div>
19
+</template>

+ 47 - 0
src/components/FButton/FButton.vue

@@ -0,0 +1,47 @@
1
+<script setup lang="ts">
2
+import { buttonEmits, buttonProps } from './button'
3
+import { useButton } from './use-button'
4
+
5
+const props = defineProps(buttonProps)
6
+const emit = defineEmits(buttonEmits)
7
+
8
+const { disabled, clickHandler } = useButton(props, emit)
9
+</script>
10
+
11
+<template>
12
+  <button
13
+    class="box-border items-center justify-center rounded text-center f-button-wrapper-reset m-0 gap-2"
14
+    :class="[`f-${props.type}`, `f-button-${props.size}`, `f-${props.variant}`, props.block ? 'w-full flex' : 'inline-flex', disabled ? 'op-50' : '', props.exClass]"
15
+    :hover-class="disabled ? '' : '!before:op10'" :open-type="props.openType" :style="props.exStyle" @click="clickHandler"
16
+  >
17
+    <div v-if="props.loading" class="i-tabler-loader animate-spin" />
18
+    <template v-else>
19
+      <slot name="icon">
20
+        <div v-if="props.icon" :class="props.icon" />
21
+      </slot>
22
+    </template>
23
+    <slot />
24
+  </button>
25
+</template>
26
+
27
+<style scoped>
28
+.f-button-wrapper-reset {
29
+  --at-apply: 'after:display-none before:content-none before:absolute before:inset-0 before:bg-black before:op0'
30
+}
31
+
32
+.f-button-mini {
33
+  --at-apply: 'h-6 px-2 text-xs'
34
+}
35
+
36
+.f-button-small {
37
+  --at-apply: 'h-8 px-3 text-sm'
38
+}
39
+
40
+.f-button-normal {
41
+  --at-apply: 'h-11 px-5 text-base'
42
+}
43
+
44
+.f-button-large {
45
+  --at-apply: 'h-12.5 px-6 text-lg'
46
+}
47
+</style>

+ 27 - 0
src/components/FButton/button.ts

@@ -0,0 +1,27 @@
1
+import type { ExtractPropTypes } from 'vue'
2
+import { useCustomClassProp, useCustomStyleProp, useSizeProp, useTypeProp, useVariantProp } from '../composables'
3
+import { CLICK_EVENT } from '../constants'
4
+
5
+export const useButtonTypeProp = useTypeProp
6
+
7
+export const useButtonSizeProp = useSizeProp
8
+
9
+export const buttonProps = {
10
+  exClass: useCustomClassProp,
11
+  exStyle: useCustomStyleProp,
12
+  type: useButtonTypeProp,
13
+  size: useButtonSizeProp,
14
+  variant: useVariantProp,
15
+  disabled: Boolean,
16
+  icon: String,
17
+  openType: String,
18
+  block: Boolean,
19
+  loading: Boolean,
20
+}
21
+
22
+export const buttonEmits = {
23
+  [CLICK_EVENT]: (evt: MouseEvent) => evt instanceof Object,
24
+}
25
+
26
+export type ButtonProps = ExtractPropTypes<typeof buttonProps>
27
+export type ButtonEmits = typeof buttonEmits

+ 2 - 0
src/components/FButton/index.ts

@@ -0,0 +1,2 @@
1
+export * from './button'
2
+export * from './use-button'

+ 0 - 0
src/components/FButton/types.ts


+ 21 - 0
src/components/FButton/use-button.ts

@@ -0,0 +1,21 @@
1
+import type { SetupContext } from 'vue'
2
+import { computed } from 'vue'
3
+import { CLICK_EVENT } from '../constants'
4
+import type { ButtonEmits, ButtonProps } from './button'
5
+
6
+export function useButton(props: ButtonProps, emit: SetupContext<ButtonEmits>['emit']) {
7
+  const disabled = computed(() => props.disabled || props.loading)
8
+
9
+  function clickHandler(evt: MouseEvent) {
10
+    if (disabled.value)
11
+      return
12
+
13
+    emit(CLICK_EVENT, evt)
14
+  }
15
+
16
+  return {
17
+    disabled,
18
+
19
+    clickHandler,
20
+  }
21
+}

+ 56 - 0
src/components/FCell/FCell.vue

@@ -0,0 +1,56 @@
1
+<script setup lang="ts">
2
+import { cellEmits, cellProps } from './define'
3
+import { useCell } from './use-cell'
4
+
5
+const props = defineProps(cellProps)
6
+const emit = defineEmits(cellEmits)
7
+
8
+const { arrow, classes, clickHandler } = useCell(props, emit)
9
+</script>
10
+
11
+<template>
12
+  <div
13
+    class="relative box-border items-center gap-2 overflow-hidden flex px-4 f-cell py-3 text-sm after:absolute after:left-4 after:right-4 after:top-0 after:scale-y-50% after:border-t after:f-border after:border-t-solid after:content-['_']  f-bg-2 f-text-color "
14
+    :class="[classes, { 'text-gray3': props.disabled }, props.exClass]"
15
+    :hover-class="(arrow && !props.disabled) ? '!f-active' : ''" :style="props.exStyle"
16
+    @click="clickHandler"
17
+  >
18
+    <div v-if="$slots.title || props.title" class="flex-1" :class="props.titleClass" :style="props.titleStyle">
19
+      <div class="flex items-center gap-1">
20
+        <template v-if="$slots.icon || props.icon">
21
+          <slot name="icon">
22
+            <div v-if="props.icon" :class="props.icon" />
23
+          </slot>
24
+        </template>
25
+        <slot name="title">
26
+          {{ props.title }}
27
+        </slot>
28
+      </div>
29
+      <slot name="label">
30
+        <div v-if="props.label" class="text-sm f-text-color-2">
31
+          {{ props.label }}
32
+        </div>
33
+      </slot>
34
+    </div>
35
+    <div
36
+      v-if="$slots.value || $slots['right'] || props.value || arrow" class="flex items-center gap-1"
37
+      :class="[{ 'flex-1': $slots.value || props.value }, props.valueClass]" :style="props.valueStyle"
38
+    >
39
+      <div v-if="$slots.value || props.value" class="flex-1">
40
+        <slot name="value">
41
+          <div v-if="props.value" class="f-text-color-2" :class="[props.title ? 'text-right' : 'text-left']">
42
+            {{ props.value }}
43
+          </div>
44
+        </slot>
45
+      </div>
46
+      <slot name="right">
47
+        <div
48
+          v-if="arrow" class="f-text-color-2 i-tabler-chevron-right transform transition-300"
49
+          :class="[arrow === 'bottom' && 'rotate-90']"
50
+        />
51
+      </slot>
52
+    </div>
53
+  </div>
54
+</template>
55
+
56
+<style scoped></style>

+ 31 - 0
src/components/FCell/define.ts

@@ -0,0 +1,31 @@
1
+import type { ExtractPropTypes, PropType } from 'vue'
2
+import { useCustomClassProp, useCustomStyleProp } from '../composables'
3
+import { CLICK_EVENT } from '../constants'
4
+
5
+export const cellProps = {
6
+  exClass: useCustomClassProp,
7
+  exStyle: useCustomStyleProp,
8
+  title: String,
9
+  value: String,
10
+  label: String,
11
+  icon: String,
12
+  arrow: {
13
+    type: [Boolean, String] as PropType<boolean | 'right' | 'bottom'>,
14
+  },
15
+  center: Boolean,
16
+  clickable: Boolean,
17
+  disabled: Boolean,
18
+  titleClass: useCustomClassProp,
19
+  titleStyle: useCustomStyleProp,
20
+  valueClass: useCustomClassProp,
21
+  valueStyle: useCustomStyleProp,
22
+  labelClass: useCustomClassProp,
23
+  labelStyle: useCustomStyleProp,
24
+}
25
+
26
+export const cellEmits = {
27
+  [CLICK_EVENT]: (evt: MouseEvent) => evt instanceof Object,
28
+}
29
+
30
+export type CellProps = ExtractPropTypes<typeof cellProps>
31
+export type CellEmits = typeof cellEmits

+ 2 - 0
src/components/FCell/index.ts

@@ -0,0 +1,2 @@
1
+export * from './define'
2
+export * from './use-cell'

+ 37 - 0
src/components/FCell/use-cell.ts

@@ -0,0 +1,37 @@
1
+import type { SetupContext } from 'vue'
2
+import { computed, inject } from 'vue'
3
+import { cellGroupKey } from '../tokens'
4
+import { CLICK_EVENT } from '../constants'
5
+import type { CellEmits, CellProps } from './define'
6
+
7
+// @unocss-include
8
+
9
+export function useCell(props: CellProps, emit: SetupContext<CellEmits>['emit']) {
10
+  const cellGroup = inject(cellGroupKey, undefined)
11
+  // @ts-ignore
12
+  const arrow = computed(() => cellGroup?.arrow || props.arrow)
13
+  // @ts-ignore
14
+  const clickable = computed(() => cellGroup?.clickable || props.clickable)
15
+
16
+  const classes = computed(() => {
17
+    const _classes: string[] = []
18
+    // #ifdef H5
19
+    if (arrow.value || clickable.value)
20
+      _classes.push('f-active-h5')
21
+
22
+    // #endif
23
+    return _classes
24
+  })
25
+
26
+  function clickHandler(evt: MouseEvent) {
27
+    emit(CLICK_EVENT, evt)
28
+  }
29
+
30
+  return {
31
+    arrow,
32
+    clickable,
33
+    classes,
34
+
35
+    clickHandler,
36
+  }
37
+}

+ 28 - 0
src/components/FCellGroup/FCellGroup.vue

@@ -0,0 +1,28 @@
1
+<script setup lang='ts'>
2
+import { provide, reactive, toRefs } from 'vue'
3
+import { cellGroupKey } from '../tokens'
4
+import { cellGroupProps } from './define'
5
+
6
+const props = defineProps(cellGroupProps)
7
+
8
+provide(cellGroupKey,
9
+  reactive({
10
+    ...toRefs(props),
11
+  }),
12
+)
13
+</script>
14
+
15
+<template>
16
+  <div v-if="props.title" class="f-text-color-2 p-4">
17
+    {{ props.title }}
18
+  </div>
19
+  <div
20
+    :class="[{ 'mx-4 rounded-lg overflow-hidden': props.inset },
21
+             { '[&_f-cell:last-child_.f-cell]:after:content-none [&>.f-cell+.f-cell]:after:content-none': props.divider }, props.exClass]"
22
+    :style="props.exStyle"
23
+  >
24
+    <slot />
25
+  </div>
26
+</template>
27
+
28
+<style scoped></style>

+ 15 - 0
src/components/FCellGroup/define.ts

@@ -0,0 +1,15 @@
1
+import type { ExtractPropTypes } from 'vue'
2
+import { useCustomClassProp, useCustomStyleProp } from '../composables'
3
+
4
+export const cellGroupProps = {
5
+  exClass: useCustomClassProp,
6
+  exStyle: useCustomStyleProp,
7
+  divider: Boolean,
8
+  inset: Boolean,
9
+  arrow: Boolean,
10
+  center: Boolean,
11
+  clickable: Boolean,
12
+  title: String,
13
+}
14
+
15
+export type CellGroupProps = ExtractPropTypes<typeof cellGroupProps>

+ 1 - 0
src/components/FCellGroup/index.ts

@@ -0,0 +1 @@
1
+export * from './define'

+ 167 - 0
src/components/FElevator/FElevator.vue

@@ -0,0 +1,167 @@
1
+<script setup lang="ts">
2
+import {elevatorEmits, elevatorProps} from "./define";
3
+import type {CSSProperties} from "vue";
4
+import type {ElevatorData} from "./type";
5
+const props = defineProps(elevatorProps)
6
+const emit = defineEmits(elevatorEmits)
7
+
8
+const spaceHeight = 23
9
+
10
+const state = reactive({
11
+  anchorIndex: 0,
12
+  codeIndex: 0,
13
+  listHeight: [] as number[],
14
+  listGroup: [] as HTMLLIElement[],
15
+  touchState: {
16
+    y1: 0,
17
+    y2: 0,
18
+  },
19
+  currentIndex: 0,
20
+  scrollStart: false,
21
+  query: uni.createSelectorQuery(),
22
+  scrollTop: 0,
23
+  scrollY: 0
24
+})
25
+
26
+const fixedStyle = computed(() => {
27
+  return {
28
+    pointerEvents: 'none',
29
+    height: `${state.listHeight[state.listGroup.length - 1]}px`,
30
+  } as CSSProperties
31
+})
32
+
33
+function calculateHeight() {
34
+  state.listHeight = []
35
+  let height = 0
36
+  state.listHeight.push(height)
37
+  for (let i = 0; i < state.listGroup.length; i++) {
38
+    state.query.in(instance).selectAll(`#elevator__item__${i}`).boundingClientRect()
39
+    state.query.exec((res: { height: number }[][]) => {
40
+      height += Math.floor(res[i][0].height)
41
+      state.listHeight.push(height)
42
+    })
43
+  }
44
+}
45
+
46
+function touchStart(e: TouchEvent) {
47
+  state.scrollStart = true
48
+  const index = getData(e.target as HTMLElement)
49
+  const firstTouch = e.touches[0]
50
+  state.touchState.y1 = firstTouch.pageY
51
+  state.anchorIndex = +index
52
+  state.codeIndex = +index
53
+  scrollTo(+index)
54
+}
55
+
56
+function touchMove(e: TouchEvent) {
57
+  const firstTouch = e.touches[0]
58
+  state.touchState.y2 = firstTouch.pageY
59
+  const delta = ((state.touchState.y2 - state.touchState.y1) / spaceHeight) | 0
60
+  state.codeIndex = state.anchorIndex + delta
61
+  scrollTo(state.currentIndex)
62
+}
63
+
64
+function touchEnd() {
65
+  state.scrollStart = false
66
+}
67
+
68
+
69
+watch(
70
+    () => state.listGroup.length,
71
+    (val) => {
72
+      nextTick(calculateHeight)
73
+    },
74
+)
75
+function handleClickItem(key: string, item: ElevatorData) {
76
+  emit('clickItem', key, item)
77
+  state.currentData = item
78
+  state.currentKey = key
79
+}
80
+function handleClickIndex(key: string) {
81
+  emit('clickIndex', key)
82
+}
83
+
84
+function listViewScroll(e: any) {
85
+  const target = e.detail as Element
86
+  const scrollTop = target.scrollTop
87
+  const listHeight = state.listHeight
88
+  state.scrollY = Math.floor(scrollTop)
89
+  for (let i = 0; i < state.listHeight.length - 1; i++) {
90
+    const height1 = listHeight[i]
91
+    const height2 = listHeight[i + 1]
92
+
93
+    if (state.scrollY >= height1 && state.scrollY < height2) {
94
+      state.currentIndex = i
95
+      return
96
+    }
97
+  }
98
+}
99
+
100
+const {scrollTop, scrollY, currentIndex, codeIndex, scrollStart } = toRefs(state)
101
+</script>
102
+<template>
103
+  <div>
104
+    <scroll-view
105
+        id="listview"
106
+        :scroll-top="scrollTop"
107
+        :scroll-y="true"
108
+        :scroll-width-animation="true"
109
+        :scroll-anchoring="true"
110
+        :style="{ height: isNaN(+height) ? height : `${height}px` }"
111
+        @scroll="listViewScroll"
112
+    >
113
+      <div v-show="scrollY > 0 && isSticky" :style="fixedStyle"
114
+           class="absolute top-0 left-0 w-full"
115
+      >
116
+        <div v-if="isSticky"
117
+             class="sticky top--1 left-0 z-1 border-box w-full shadow"
118
+        >
119
+          {{ indexList[currentIndex]?.[acceptKey] }}
120
+        </div>
121
+      </div>
122
+
123
+      <div id="elevator__item-wrap">
124
+        <div
125
+            v-for="(item, index) in indexList"
126
+            :id="[`elevator__item__${index}`]"
127
+            :key="item[acceptKey]"
128
+        >
129
+          <div>
130
+            {{ item[acceptKey] }}
131
+          </div>
132
+          <div
133
+              v-for="subitem in item.list"
134
+              :key="subitem.id"
135
+              @click="handleClickItem(item[acceptKey], subitem)"
136
+          >
137
+            <div v-if="!$slots.default" v-html="subitem.name" />
138
+            <slot v-else :item="subitem" />
139
+          </div>
140
+        </div>
141
+      </div>
142
+    </scroll-view>
143
+
144
+    <div v-show="scrollStart"
145
+         v-if="indexList.length > 0"
146
+    >
147
+      {{ indexList[codeIndex][acceptKey]}}
148
+    </div>
149
+
150
+    <div
151
+        @touchstart="touchStart"
152
+        @touchmove.stop.prevent="touchMove"
153
+        @touchend="touchEnd"
154
+    >
155
+      <div>
156
+        <div
157
+            v-for="(item, index) in indexList"
158
+            :key="item[acceptKey]"
159
+            :data-index="index"
160
+            @click="handleClickIndex(item[acceptKey])"
161
+        >
162
+          {{ item[acceptKey] }}
163
+        </div>
164
+      </div>
165
+    </div>
166
+  </div>
167
+</template>

+ 1 - 0
src/components/FElevator/README.md

@@ -0,0 +1 @@
1
+## Elevator 电梯楼层

+ 42 - 0
src/components/FElevator/define.ts

@@ -0,0 +1,42 @@
1
+import type {ExtractPropTypes, PropType} from "vue";
2
+import type {ElevatorData} from "./type";
3
+import {isNumber, isString} from "~/utils";
4
+
5
+export const elevatorProps = {
6
+    height: {
7
+        type: [Number, String],
8
+        default: '200px'
9
+    },
10
+    acceptKey: {
11
+        type: [String],
12
+        default: 'title'
13
+    },
14
+    indexList: {
15
+        type: Array as PropType<ElevatorData[]>,
16
+        default: () => {
17
+            return []
18
+        }
19
+    },
20
+    isSticky: {
21
+        type: [Boolean],
22
+        default: false
23
+    },
24
+    spaceHeight: {
25
+        type: [Number],
26
+        default: 23,
27
+    },
28
+    titleHeight: {
29
+        type: [Number],
30
+        default: 35
31
+    }
32
+}
33
+
34
+export type ElevatorProps = ExtractPropTypes<typeof elevatorProps>
35
+
36
+export const elevatorEmits = {
37
+    clickItem: (key: string, item: any) => { return { key, item } },
38
+    clickIndex: (key: string) => isString(key),
39
+    change: (val: number) => isNumber(val),
40
+}
41
+
42
+export type ElevatorEmits = typeof elevatorEmits

+ 9 - 0
src/components/FElevator/type.ts

@@ -0,0 +1,9 @@
1
+export interface ElevatorData {
2
+    name?: string
3
+    id?: number | string
4
+    [key: string]: any
5
+}
6
+
7
+export interface ElevatorInst {
8
+    scrollTop: (val: number) => void
9
+}

+ 57 - 0
src/components/FField/FField.vue

@@ -0,0 +1,57 @@
1
+<script setup lang="ts">
2
+import { fieldEmits, fieldProps } from './field'
3
+import { useField } from './use-field'
4
+import FCell from "~/components/FCell/FCell.vue";
5
+
6
+const props = defineProps(fieldProps)
7
+const emit = defineEmits(fieldEmits)
8
+
9
+const {
10
+  disabled, modelValue, placeholderText, showPasswordText, focus,
11
+  focusHandler, clickHandler, blurHandler, inputHandler, clearHandler,
12
+} = useField(props, emit)
13
+</script>
14
+
15
+<template>
16
+  <FCell
17
+    :title="label" :exClass="[{ 'flex-wrap': labelAlign === 'top' || type === 'textarea' }, exClass]" :exStyle="[exStyle]" :icon="icon"
18
+    :title-class="['!flex-1/3', { '[&>.flex]:justify-end': labelAlign === 'right' }, { '[&>.flex]:justify-center': labelAlign === 'center' }]"
19
+    :value-class="['!flex-2/3']"
20
+  >
21
+    <template #icon>
22
+      <slot name="icon" />
23
+    </template>
24
+    <template #value>
25
+      <div class="flex items-center gap-1 f-text-color text-right v-middle leading-inherit">
26
+        <slot name="prefix" />
27
+        <input
28
+          v-if="type !== 'textarea'" class="m-0 flex-1 leading-inherit min-h-auto bg-transparent p-0 text-left"
29
+          :type="type !== 'password' ? type : 'text'"
30
+          :class="[`f-field-content-base-${inputAlign}`, { 'f-field-disabled': disabled }, ccc]" :style="ccs"
31
+          :value="modelValue" :placeholder="placeholderText" :maxlength="maxlength" :focus="focus" :disabled="disabled"
32
+          :password="type === 'password' ? !showPasswordText : false" @click="clickHandler" @blur="blurHandler"
33
+          @input="inputHandler" @focus="focusHandler"
34
+        >
35
+        <textarea
36
+          v-else class="m-0 w-full flex-1 bg-transparent p-0 text-left leading-inherit h-20"
37
+          :class="[`f-field-content-base-${inputAlign}`, { 'f-field-disabled': disabled }, ccc]" :style="ccs"
38
+          :value="modelValue" :placeholder="placeholderText" :maxlength="maxlength" :focus="focus" :disabled="disabled"
39
+          @click="clickHandler" @blur="blurHandler" @input="inputHandler" @focus="focusHandler"
40
+        />
41
+      </div>
42
+    </template>
43
+    <template #right-icon>
44
+      <div v-if="showClear && modelValue" class="i-tabler-circle-x" @click.stop="clearHandler" />
45
+      <div
46
+        v-if="type === 'password'" :class="showPasswordText ? 'i-tabler-eye' : 'i-tabler-eye-closed'"
47
+        @click.stop="showPasswordText = !showPasswordText"
48
+      />
49
+      <div v-if="showWordLimit && modelValue">
50
+        {{ modelValue.length }}/{{ maxlength }}
51
+      </div>
52
+    </template>
53
+  </FCell>
54
+</template>
55
+
56
+<style scoped>
57
+</style>

+ 56 - 0
src/components/FField/field.ts

@@ -0,0 +1,56 @@
1
+import type { ExtractPropTypes, PropType } from 'vue'
2
+import { useCustomClassProp, useCustomStyleProp } from '../composables'
3
+import { BLUR_EVENT, CHANGE_EVENT, CLEAR_EVENT, CLICK_EVENT, FOCUS_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from '../constants'
4
+import { isString, makeNumberProp } from '../utils'
5
+import type { FieldLabelAlign, FieldType } from './types'
6
+
7
+export const useFieldTypeProp = {
8
+  type: String as PropType<FieldType>,
9
+  validator: (value: string) => ['text', 'number', 'digit', 'password', 'textarea'].includes(value),
10
+  default: 'text',
11
+}
12
+
13
+export const useFieldLabelAlignProp = {
14
+  type: String as PropType<FieldLabelAlign>,
15
+  validator: (value: string) => ['left', 'right', 'top', 'center'].includes(value),
16
+  default: 'left',
17
+}
18
+
19
+export const useFieldInputAlignProp = {
20
+  type: String as PropType<FieldLabelAlign>,
21
+  validator: (value: string) => ['left', 'right'].includes(value),
22
+  default: 'left',
23
+}
24
+
25
+export const fieldProps = {
26
+  exClass: useCustomClassProp,
27
+  ccc: useCustomClassProp,
28
+  exStyle: useCustomStyleProp,
29
+  ccs: useCustomStyleProp,
30
+  type: useFieldTypeProp,
31
+  label: String,
32
+  labelAlign: useFieldLabelAlignProp,
33
+  inputAlign: useFieldInputAlignProp,
34
+  disabled: Boolean,
35
+  focus: Boolean,
36
+  icon: String,
37
+  suffixIcon: String,
38
+  showClear: Boolean,
39
+  placeholder: String,
40
+  modelValue: String,
41
+  maxlength: makeNumberProp(-1),
42
+  showWordLimit: Boolean,
43
+}
44
+
45
+export const fieldEmits = {
46
+  [UPDATE_MODEL_EVENT]: (value: string) => isString(value),
47
+  [CLICK_EVENT]: (evt: MouseEvent) => evt instanceof Object,
48
+  [FOCUS_EVENT]: () => true,
49
+  [BLUR_EVENT]: () => true,
50
+  [INPUT_EVENT]: (value: string) => isString(value),
51
+  [CHANGE_EVENT]: (value: string) => isString(value),
52
+  [CLEAR_EVENT]: () => true,
53
+}
54
+
55
+export type FieldProps = ExtractPropTypes<typeof fieldProps>
56
+export type FieldEmits = typeof fieldEmits

+ 3 - 0
src/components/FField/index.ts

@@ -0,0 +1,3 @@
1
+export * from './field'
2
+export * from './use-field'
3
+export * from './types'

+ 0 - 0
src/components/FField/types.ts


Некоторые файлы не были показаны из-за большого количества измененных файлов