jmash-core-mp 0.1.45 → 0.1.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/lib/api/storage/index.js +1 -1
  2. package/lib/api/storage/types.d.ts +9 -2
  3. package/lib/packages/pages/auth/setting-page.mpx.d.ts +1 -0
  4. package/package.json +1 -1
  5. package/src/api/auth/index.ts +1 -1
  6. package/src/api/cms/index.ts +1 -1
  7. package/src/api/dict/index.ts +8 -2
  8. package/src/api/files/index.ts +1 -1
  9. package/src/api/region/index.ts +1 -1
  10. package/src/api/storage/index.ts +2 -2
  11. package/src/api/storage/types.ts +18 -7
  12. package/src/components/cms/jmash-cms-article-view.mpx +1 -1
  13. package/src/components/common/jmash-cascader-region.mpx +2 -2
  14. package/src/components/common/jmash-cell-group.mpx +201 -0
  15. package/src/components/common/jmash-code-interest-popup.mpx +277 -0
  16. package/src/components/common/jmash-popup.mpx +1 -1
  17. package/src/components/common/jmash-tab-bar.mpx +1 -1
  18. package/src/components/common/jmash-top-navigation.mpx +1 -1
  19. package/src/components/core/jmash-popup-login.ali.mpx +4 -4
  20. package/src/components/core/jmash-popup-login.mpx +4 -4
  21. package/src/components/core/jmash-popup-login.web.mpx +3 -3
  22. package/src/custom-tab-bar/index.mpx +1 -1
  23. package/src/packages/index.mpx +1 -0
  24. package/src/packages/pages/auth/cms-protocol.mpx +1 -1
  25. package/src/packages/pages/auth/login.mpx +1 -1
  26. package/src/packages/pages/auth/setting-page.mpx +135 -0
  27. package/src/packages/pages/cms/cms-activity-list.mpx +1 -1
  28. package/src/packages/pages/cms/cms-article-list.mpx +1 -1
  29. package/src/packages/pages/cms/cms-article.mpx +1 -1
  30. package/src/packages/pages/cms/cms-location-list.mpx +1 -1
  31. package/src/packages/pages/cms/cms-location.mpx +1 -1
  32. package/src/packages/pages/cms/cms-product-list.mpx +1 -1
  33. package/src/pages/half-home.mpx +1 -1
  34. package/src/pages/tabbar/home.mpx +1 -1
  35. package/src/pages/tabbar/my.mpx +3 -3
@@ -18,7 +18,7 @@ class StorageApiImpl {
18
18
  method: "GET",
19
19
  });
20
20
  }
21
- // 查询列表信息店铺用户浏览信息
21
+ // 查询列表信息店铺
22
22
  findStorageOrganInfoList(data) {
23
23
  const config = getApp().globalData.config;
24
24
  return mpx.xfetch.fetch({
@@ -6,11 +6,18 @@ export interface StorageOrganInfoList {
6
6
  results: StorageOrganInfoModel[];
7
7
  }
8
8
  export interface StorageOrganInfoModel {
9
+ storageId?: string;
10
+ organId?: string;
9
11
  organName?: string;
10
- logoUrl?: string;
12
+ organCode?: string;
13
+ serviceType?: string;
14
+ storage?: string;
15
+ status?: boolean;
16
+ createBy?: string;
11
17
  createTime?: string;
12
- remark?: string;
13
18
  organTenant?: string;
19
+ remark?: string;
20
+ logoUrl?: string;
14
21
  }
15
22
  export interface ShopBrowserUserList {
16
23
  results: ShopBrowserUserModel[];
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-core-mp",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
4
4
  "private": false,
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1,4 +1,4 @@
1
- import { ResponseData, AppConfig } from "../../api/types";
1
+ import { ResponseData } from "../../api/types";
2
2
  import { OpensType } from "./types";
3
3
  import type {
4
4
  LoginReq,
@@ -24,7 +24,7 @@ import {
24
24
  CmsChannelKey,
25
25
  CmsChannelModel,
26
26
  } from "./types";
27
- import { ResponseData, AppConfig } from "../../api/types";
27
+ import { ResponseData } from "../../api/types";
28
28
  import { grpc } from "../../utils/grpc";
29
29
  import mpx from "@mpxjs/core";
30
30
 
@@ -1,5 +1,11 @@
1
- import { ResponseData, AppConfig } from "../../api/types";
2
- import { EnumEntryReq, EnumRes, DictEntryReq, DictEntryList, DictEntryLayList } from "./types";
1
+ import { ResponseData } from "../../api/types";
2
+ import {
3
+ EnumEntryReq,
4
+ EnumRes,
5
+ DictEntryReq,
6
+ DictEntryList,
7
+ DictEntryLayList,
8
+ } from "./types";
3
9
  import mpx from "@mpxjs/core";
4
10
 
5
11
  class DictApiImpl {
@@ -1,5 +1,5 @@
1
1
  import { FileInfo, FileBase64Req, FileDownInfo, FileWebReq } from "./types";
2
- import { ResponseData, AppConfig } from "../../api/types";
2
+ import { ResponseData } from "../../api/types";
3
3
  import { db } from "../../utils/db";
4
4
  import { grpc } from "../../utils/grpc";
5
5
  import mpx from "@mpxjs/core";
@@ -1,5 +1,5 @@
1
1
  import { DictRegionList, DictRegionReq } from "./types";
2
- import { ResponseData, AppConfig } from "../../api/types";
2
+ import { ResponseData } from "../../api/types";
3
3
  import { grpc } from "../../utils/grpc";
4
4
  import mpx from "@mpxjs/core";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import mpx from "@mpxjs/core";
2
- import { ResponseData, AppConfig } from "../../api/types";
2
+ import { ResponseData } from "../../api/types";
3
3
  import { grpc } from "../../utils/grpc";
4
4
  import {
5
5
  StorageOrganInfoReq,
@@ -32,7 +32,7 @@ class StorageApiImpl {
32
32
  });
33
33
  }
34
34
 
35
- // 查询列表信息店铺用户浏览信息
35
+ // 查询列表信息店铺
36
36
  findStorageOrganInfoList(
37
37
  data: StorageOrganInfoReq
38
38
  ): Promise<ResponseData<StorageOrganInfoList>> {
@@ -5,25 +5,37 @@ export interface StorageOrganInfoReq {
5
5
  // 组织名称模糊检索
6
6
  likeOrganName?: string;
7
7
  }
8
-
9
8
  // 组织列表
10
9
  export interface StorageOrganInfoList {
11
10
  // 当前内容
12
11
  results: StorageOrganInfoModel[];
13
12
  }
14
-
15
13
  // 组织实体
16
14
  export interface StorageOrganInfoModel {
15
+ // 存储ID
16
+ storageId?: string;
17
+ // 组织ID
18
+ organId?: string;
17
19
  // 组织名称
18
20
  organName?: string;
19
- // 店铺图片
20
- logoUrl?: string;
21
+ // 组织编码
22
+ organCode?: string;
23
+ // 服务类型
24
+ serviceType?: string;
25
+ // 组织信息存储区
26
+ storage?: string;
27
+ // 状态
28
+ status?: boolean;
29
+ // 创建人
30
+ createBy?: string;
21
31
  // 创建时间
22
32
  createTime?: string;
23
- // 备注
24
- remark?: string;
25
33
  // 组织租户
26
34
  organTenant?: string;
35
+ // 备注
36
+ remark?: string;
37
+ // 组织LOGO
38
+ logoUrl?: string;
27
39
  }
28
40
 
29
41
  // 店铺用户浏览信息列表
@@ -31,7 +43,6 @@ export interface ShopBrowserUserList {
31
43
  // 当前内容
32
44
  results: ShopBrowserUserModel[];
33
45
  }
34
-
35
46
  // 店铺用户浏览信息实体
36
47
  export interface ShopBrowserUserModel {
37
48
  // 店铺名称
@@ -126,7 +126,7 @@ createComponent({
126
126
  {
127
127
  "component": true,
128
128
  "usingComponents": {
129
- "jmash-cms-article-item": "./jmash-cms-article-item.mpx"
129
+ "jmash-cms-article-item": "./jmash-cms-article-item"
130
130
  }
131
131
  }
132
132
  </script>
@@ -111,8 +111,8 @@ createComponent({
111
111
  {
112
112
  "component": true,
113
113
  "usingComponents": {
114
- "cube-cascade-picker": "@mpxjs/mpx-cube-ui/src/components/cascade-picker/index",
115
- "cube-cascade-picker-popup": "@mpxjs/mpx-cube-ui/src/components/cascade-picker-popup/index"
114
+ "cube-cascade-picker": "@mpxjs/mpx-cube-ui/lib/components/cascade-picker/index",
115
+ "cube-cascade-picker-popup": "@mpxjs/mpx-cube-ui/lib/components/cascade-picker-popup/index"
116
116
  }
117
117
  }
118
118
  </script>
@@ -0,0 +1,201 @@
1
+ <template>
2
+ <view class="cell-main">
3
+ <!-- 主菜单列表 -->
4
+ <view class="cell-group">
5
+ <block wx:for="{{ arr }}" wx:key="index">
6
+ <button class="cell contact-cell" wx:if="{{ item.show }}"
7
+ open-type="{{ item.type === 'contact' ? 'contact' : '' }}" bind:tap="handleNavigate"
8
+ data-item="{{ item }}">
9
+ <view class="my-cell-item-l">
10
+ <image wx:if="{{ resourceUrl && item.icon }}" class="cell-icon"
11
+ src="{{ resourceUrl + item.icon }}" mode="widthFix" />
12
+ <view class="cell-text">{{ item.text }}</view>
13
+ </view>
14
+ <cube-icon class="cell-arrow" type="arrow" size="28rpx" />
15
+ </button>
16
+ </block>
17
+ </view>
18
+ </view>
19
+
20
+ <!-- 公众号弹窗 -->
21
+ <jmash-code-interest-popup show="{{ gzShow }}" bind:close="onGzClose" />
22
+ </template>
23
+
24
+ <script lang="ts">
25
+ import mpx, { createComponent, ref, computed } from "@mpxjs/core";
26
+ import { config } from "../../utils/config";
27
+ import { EventBase } from "../../api/types";
28
+ import { useUserStore } from "../../store/user";
29
+
30
+ createComponent({
31
+ options: {
32
+ styleIsolation: "apply-shared",
33
+ },
34
+ properties: {
35
+ // 主菜单列表
36
+ menuList: {
37
+ type: Array,
38
+ value: [],
39
+ },
40
+ },
41
+ setup(props) {
42
+ // 用户状态管理
43
+ const userStore = useUserStore();
44
+ // 资源路径
45
+ const resourceUrl = config.resourceUrl + "/images/";
46
+ // 默认主菜单列表
47
+ const defaultMenuList = computed(() => [
48
+ {
49
+ type: "setting",
50
+ url: "/jmash/pages/auth/setting-page",
51
+ tabbar: false,
52
+ icon: "mall/icon-my-setting.png",
53
+ text: "系统设置",
54
+ show: true,
55
+ },
56
+ {
57
+ type: "gz",
58
+ url: "",
59
+ tabbar: false,
60
+ icon: "mall/icon_12.png",
61
+ text: "公众号",
62
+ show: true,
63
+ },
64
+ {
65
+ type: "contact",
66
+ url: "",
67
+ tabbar: false,
68
+ icon: "serve/icon-my-contact.png",
69
+ text: "联系客服",
70
+ show: true,
71
+ },
72
+ ]);
73
+ // 使用父组件传入的列表或默认列表
74
+ const arr = ref(props.menuList.length > 0 ? props.menuList : defaultMenuList);
75
+ // 公众号弹窗显示状态
76
+ let gzShow = ref(false);
77
+
78
+
79
+ // 公众号弹窗关闭
80
+ function onGzClose() {
81
+ gzShow.value = false;
82
+ }
83
+
84
+ // 跳转
85
+ function handleNavigate(e: EventBase) {
86
+ const { type, url, tabbar } = e.currentTarget.dataset.item;
87
+ if (type === "gz") {
88
+ // 公众号特殊处理
89
+ gzShow.value = true;
90
+ return;
91
+ }
92
+ if (type === "contact") {
93
+ // 联系客服由 open-type="contact" 处理,无需导航
94
+ return;
95
+ }
96
+ if (!userStore.checkLogin()) {
97
+ mpx.showModal({
98
+ title: "提示",
99
+ content: "请先登录!",
100
+ success(res) {
101
+ if (res.confirm) {
102
+ mpx.navigateTo({
103
+ url: config.loginUrl + "?tabbar=true&backurl=" + encodeURIComponent("/pages/tabbar/my"),
104
+ });
105
+ }
106
+ },
107
+ });
108
+ return;
109
+ }
110
+ if (url && !tabbar) {
111
+ mpx.navigateTo({ url });
112
+ } else if (url && tabbar) {
113
+ mpx.switchTab({ url });
114
+ }
115
+ }
116
+
117
+ return {
118
+ resourceUrl,
119
+ gzShow,
120
+ arr,
121
+ userStore,
122
+ handleNavigate,
123
+ onGzClose,
124
+ };
125
+ },
126
+ });
127
+ </script>
128
+
129
+ <style lang="scss">
130
+ @use "../../styles/index.scss" as *;
131
+
132
+ .cell-main {
133
+ display: flex;
134
+ flex-direction: column;
135
+ gap: 20rpx;
136
+ }
137
+
138
+ .cell-group {
139
+ margin: 0 30rpx;
140
+ border-radius: $border-radius;
141
+ background-color: $background-white-color;
142
+ overflow: hidden;
143
+ }
144
+
145
+ .cell {
146
+ display: flex;
147
+ align-items: center;
148
+ justify-content: space-between;
149
+ padding: 26rpx 30rpx;
150
+ border-bottom: 2rpx solid $border-line;
151
+ box-sizing: border-box;
152
+ height: 90rpx;
153
+
154
+ .my-cell-item-l {
155
+ display: flex;
156
+ align-items: center;
157
+ gap: 20rpx;
158
+
159
+ .cell-icon {
160
+ width: 34rpx;
161
+ height: 34rpx;
162
+ }
163
+ }
164
+
165
+ .cell-text {
166
+ font-size: $font-size;
167
+ color: #1f2937;
168
+ }
169
+
170
+ .cell-arrow {
171
+ color: $font-color-grey-opacity;
172
+ }
173
+ }
174
+
175
+ .cell:last-child {
176
+ border-bottom: 0;
177
+ }
178
+
179
+ .contact-cell {
180
+ border: none;
181
+ margin: 0;
182
+ background: transparent;
183
+ text-align: left;
184
+ width: 100%;
185
+ line-height: inherit;
186
+ }
187
+
188
+ .contact-cell::after {
189
+ border: none;
190
+ }
191
+ </style>
192
+
193
+ <script type="application/json">
194
+ {
195
+ "component": true,
196
+ "usingComponents": {
197
+ "cube-icon": "@mpxjs/mpx-cube-ui/lib/components/icon/index",
198
+ "jmash-code-interest-popup": "../../components/common/jmash-code-interest-popup"
199
+ }
200
+ }
201
+ </script>
@@ -0,0 +1,277 @@
1
+ <template>
2
+ <!-- 自定义底部弹窗 -->
3
+ <view class="ci-popup {{ innerShow ? 'ci-popup--show' : '' }}">
4
+ <view class="ci-popup__mask" bind:tap="onClose"></view>
5
+ <view class="ci-popup__content" catch:tap="noop">
6
+ <view class="organ-code-interest-popup" style="padding-bottom: {{ paddingBottom }}px;background-color: #fff;">
7
+ <view class="position-box">
8
+ <image wx:if="{{ resourceUrl }}" class="main-bgc-image" src="{{ resourceUrl + 'replaced/push_bgc.png' }}"
9
+ mode="widthFix" />
10
+ <view class="main">
11
+ <!-- 关闭文字 -->
12
+ <view class="main-close-text" bind:tap="onClose">稍后关注</view>
13
+ <view class="main-title-image-box">
14
+ <view class="main-title">关注公众号</view>
15
+ </view>
16
+ <!-- 手的图片的定位盒子 -->
17
+ <view class="main-push-position-box">
18
+ <image wx:if="{{ resourceUrl }}" class="main-push-bgc-image"
19
+ src="{{ resourceUrl + 'replaced/push_hand_none.png' }}" mode="widthFix" />
20
+ <!-- 公司公众号二维码 -->
21
+ <view class="main-push-code-image">
22
+ <image wx:if="{{ resourceUrl && appQrcodeUrl }}" class="code-image" show-menu-by-longpress="{{ true }}"
23
+ src="{{ appQrcodeUrl }}" mode="aspectFit" />
24
+ </view>
25
+ <!-- 提示文字 -->
26
+ <view class="main-push-text">
27
+ 关注后即可获得以下权益
28
+ <view class="main-push-text_item">
29
+ <image wx:if="{{ resourceUrl }}" class="main-push-text_item_left"
30
+ src="{{ resourceUrl + 'icon_image/interest_lisk.png' }}" mode="aspectFit" />
31
+ <view class="main-push-text_item_right">
32
+ <view class="main-push-text_item_right_title">消息实时提醒</view>
33
+ <view>及时接收订单、收发货、交易、收益等动态信息</view>
34
+ </view>
35
+ </view>
36
+ <view class="main-push-text_item">
37
+ <image wx:if="{{ resourceUrl }}" class="main-push-text_item_left"
38
+ src="{{ resourceUrl + 'icon_image/interest_lisk.png' }}" mode="aspectFit" />
39
+ <view class="main-push-text_item_right">
40
+ <view class="main-push-text_item_right_title">享受更多服务</view>
41
+ <view>关注公众号,解锁客服、活动、会员等超值服务!</view>
42
+ </view>
43
+ </view>
44
+ </view>
45
+ </view>
46
+ </view>
47
+ </view>
48
+ </view>
49
+ </view>
50
+ </view>
51
+ </template>
52
+
53
+ <script lang="ts">
54
+ import { createComponent, ref } from "@mpxjs/core";
55
+ import { getHeight } from "../../utils/common";
56
+ import { config } from "../../utils/config";
57
+
58
+ createComponent({
59
+ options: {
60
+ styleIsolation: "apply-shared"
61
+ },
62
+ /**
63
+ * 组件的属性列表
64
+ */
65
+ properties: {
66
+ // 是否显示
67
+ show: {
68
+ type: Boolean,
69
+ value: false,
70
+ observer() {
71
+ this.innerShow = this.show;
72
+ }
73
+ }
74
+ },
75
+ /**
76
+ * 组件的初始数据
77
+ */
78
+ setup() {
79
+ // 资源路径
80
+ let resourceUrl = config.resourceUrl + "/images/";
81
+ // 底部安全距离
82
+ let paddingBottom = ref(getHeight().computeHeightFn(getHeight().bottomHeight, 30));
83
+ // 公司公众号二维码图片
84
+ let appQrcodeUrl = ref(config.resourceUrl + "/images/replaced/official_account2x.png");
85
+ let innerShow = ref(false);
86
+
87
+ return {
88
+ resourceUrl,
89
+ paddingBottom,
90
+ appQrcodeUrl,
91
+ innerShow,
92
+ };
93
+ },
94
+ /**
95
+ * 组件的方法列表
96
+ */
97
+ methods: {
98
+ // 关闭弹框
99
+ onClose() {
100
+ this.innerShow = false;
101
+ this.triggerEvent("close");
102
+ },
103
+ noop() { },
104
+ }
105
+ });
106
+ </script>
107
+
108
+ <style lang="scss">
109
+ @use "../../styles/index.scss" as *;
110
+
111
+ .ci-popup {
112
+ position: fixed;
113
+ top: 0;
114
+ left: 0;
115
+ right: 0;
116
+ bottom: 0;
117
+ z-index: 999999;
118
+ pointer-events: none;
119
+
120
+ &.ci-popup--show {
121
+ pointer-events: auto;
122
+
123
+ .ci-popup__mask {
124
+ opacity: 1;
125
+ }
126
+
127
+ .ci-popup__content {
128
+ transform: translateY(0);
129
+ }
130
+ }
131
+
132
+ .ci-popup__mask {
133
+ position: absolute;
134
+ top: 0;
135
+ left: 0;
136
+ right: 0;
137
+ bottom: 0;
138
+ background: rgba(0, 0, 0, 0.5);
139
+ opacity: 0;
140
+ transition: opacity 0.3s ease;
141
+ }
142
+
143
+ .ci-popup__content {
144
+ position: absolute;
145
+ bottom: 0;
146
+ left: 0;
147
+ right: 0;
148
+ transform: translateY(100%);
149
+ transition: transform 0.3s ease;
150
+ }
151
+ }
152
+
153
+ .organ-code-interest-popup {
154
+ .position-box {
155
+ position: relative;
156
+ top: -10rpx;
157
+ left: 0;
158
+ height: 85vh;
159
+
160
+ .main-bgc-image {
161
+ position: absolute;
162
+ top: -10rpx;
163
+ left: 0;
164
+ width: $width;
165
+ }
166
+
167
+ .main {
168
+ position: absolute;
169
+ top: 0rpx;
170
+ left: 0;
171
+ padding-top: 37rpx;
172
+ width: $width;
173
+
174
+ .main-close-text {
175
+ display: flex;
176
+ align-items: center;
177
+ justify-content: flex-end;
178
+ font-weight: 400;
179
+ font-size: 30rpx;
180
+ color: #ffffff;
181
+ margin-bottom: 40rpx;
182
+ padding-right: 30rpx;
183
+ }
184
+
185
+ .main-title-image-box {
186
+ display: flex;
187
+ align-items: center;
188
+ justify-content: center;
189
+
190
+ .main-title {
191
+ font-size: 57rpx;
192
+ font-weight: 500;
193
+ color: #0551ff;
194
+ }
195
+
196
+ .main-title-image {
197
+ width: 60%;
198
+ height: 69rpx;
199
+ }
200
+ }
201
+
202
+ .main-push-position-box {
203
+ position: relative;
204
+ display: flex;
205
+ justify-content: center;
206
+ align-items: center;
207
+ width: $width;
208
+ height: 1000rpx;
209
+
210
+ .main-push-bgc-image {
211
+ width: $width;
212
+ }
213
+
214
+ .main-push-code-image {
215
+ position: absolute;
216
+ top: 227rpx;
217
+ width: 187rpx;
218
+ height: 187rpx;
219
+
220
+ .code-image {
221
+ position: relative;
222
+ left: 14rpx;
223
+ width: $width;
224
+ height: 100%;
225
+ }
226
+ }
227
+
228
+ .main-push-text {
229
+ position: absolute;
230
+ top: 737rpx;
231
+ left: 80rpx;
232
+ color: $font-color;
233
+ font-size: $font-size;
234
+ font-weight: 600;
235
+ display: flex;
236
+ flex-direction: column;
237
+ gap: 35rpx;
238
+ letter-spacing: 1px;
239
+
240
+ .main-push-text_item {
241
+ display: flex;
242
+ align-items: self-start;
243
+ gap: 20rpx;
244
+ letter-spacing: 0.8px;
245
+
246
+ .main-push-text_item_left {
247
+ width: 25rpx;
248
+ height: 25rpx;
249
+ margin-top: 8rpx;
250
+ }
251
+
252
+ .main-push-text_item_right {
253
+ display: flex;
254
+ flex-direction: column;
255
+ gap: 10rpx;
256
+ color: $font-color-grey-opacity;
257
+ font-size: $font-size-mini;
258
+
259
+ &_title {
260
+ color: #296efe;
261
+ font-size: 26rpx;
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ }
270
+ </style>
271
+
272
+ <script type="application/json">
273
+ {
274
+ "component": true,
275
+ "usingComponents": {}
276
+ }
277
+ </script>
@@ -133,7 +133,7 @@ createComponent({
133
133
  {
134
134
  "component": true,
135
135
  "usingComponents": {
136
- "cube-popup": "@mpxjs/mpx-cube-ui/src/components/popup/index"
136
+ "cube-popup": "@mpxjs/mpx-cube-ui/lib/components/popup/index"
137
137
  }
138
138
  }
139
139
  </script>
@@ -40,7 +40,7 @@ createComponent({
40
40
  <script type="application/json">
41
41
  {
42
42
  "usingComponents": {
43
- "cube-tab-bar": "@mpxjs/mpx-cube-ui/lib/components/tab-bar/index.mpx"
43
+ "cube-tab-bar": "@mpxjs/mpx-cube-ui/lib/components/tab-bar/index"
44
44
  }
45
45
  }
46
46
  </script>
@@ -198,7 +198,7 @@ createComponent({
198
198
  {
199
199
  "component": true,
200
200
  "usingComponents": {
201
- "cube-icon": "@mpxjs/mpx-cube-ui/src/components/icon/index"
201
+ "cube-icon": "@mpxjs/mpx-cube-ui/lib/components/icon/index"
202
202
  }
203
203
  }
204
204
  </script>
@@ -303,10 +303,10 @@ $bg-card: #ffffff;
303
303
  {
304
304
  "component": true,
305
305
  "usingComponents": {
306
- "cube-modal": "@mpxjs/mpx-cube-ui/lib/components/modal/index.mpx",
307
- "cube-button": "@mpxjs/mpx-cube-ui/lib/components/button/index.mpx",
308
- "cube-checkbox": "@mpxjs/mpx-cube-ui/lib/components/checkbox/index.mpx",
309
- "cube-checkbox-group": "@mpxjs/mpx-cube-ui/lib/components/checkbox-group/index.mpx"
306
+ "cube-modal": "@mpxjs/mpx-cube-ui/lib/components/modal/index",
307
+ "cube-button": "@mpxjs/mpx-cube-ui/lib/components/button/index",
308
+ "cube-checkbox": "@mpxjs/mpx-cube-ui/lib/components/checkbox/index",
309
+ "cube-checkbox-group": "@mpxjs/mpx-cube-ui/lib/components/checkbox-group/index"
310
310
  }
311
311
  }
312
312
  </script>
@@ -408,10 +408,10 @@ $bg-card: #ffffff;
408
408
  {
409
409
  "component": true,
410
410
  "usingComponents": {
411
- "cube-modal": "@mpxjs/mpx-cube-ui/lib/components/modal/index.mpx",
412
- "cube-button": "@mpxjs/mpx-cube-ui/lib/components/button/index.mpx",
413
- "cube-checkbox": "@mpxjs/mpx-cube-ui/lib/components/checkbox/index.mpx",
414
- "cube-checkbox-group": "@mpxjs/mpx-cube-ui/lib/components/checkbox-group/index.mpx"
411
+ "cube-modal": "@mpxjs/mpx-cube-ui/lib/components/modal/index",
412
+ "cube-button": "@mpxjs/mpx-cube-ui/lib/components/button/index",
413
+ "cube-checkbox": "@mpxjs/mpx-cube-ui/lib/components/checkbox/index",
414
+ "cube-checkbox-group": "@mpxjs/mpx-cube-ui/lib/components/checkbox-group/index"
415
415
  }
416
416
  }
417
417
  </script>
@@ -381,9 +381,9 @@ $text-disabled: #999999;
381
381
  {
382
382
  "component": true,
383
383
  "usingComponents": {
384
- "cube-modal": "@mpxjs/mpx-cube-ui/lib/components/modal/index.mpx",
385
- "cube-checkbox": "@mpxjs/mpx-cube-ui/lib/components/checkbox/index.mpx",
386
- "cube-checkbox-group": "@mpxjs/mpx-cube-ui/lib/components/checkbox-group/index.mpx"
384
+ "cube-modal": "@mpxjs/mpx-cube-ui/lib/components/modal/index",
385
+ "cube-checkbox": "@mpxjs/mpx-cube-ui/lib/components/checkbox/index",
386
+ "cube-checkbox-group": "@mpxjs/mpx-cube-ui/lib/components/checkbox-group/index"
387
387
  }
388
388
  }
389
389
  </script>
@@ -4,7 +4,7 @@
4
4
  <script type="application/json">
5
5
  {
6
6
  "usingComponents": {
7
- "jmash-tab-bar": "../components/common/jmash-tab-bar.mpx"
7
+ "jmash-tab-bar": "../components/common/jmash-tab-bar"
8
8
  }
9
9
  }
10
10
  </script>
@@ -4,6 +4,7 @@
4
4
  "./pages/auth/login",
5
5
  "./pages/auth/update-user",
6
6
  "./pages/auth/cms-protocol",
7
+ "./pages/auth/setting-page",
7
8
  "./pages/cms/cms-article-list",
8
9
  "./pages/cms/cms-article",
9
10
  "./pages/cms/cms-location-list",
@@ -30,7 +30,7 @@ createPage({
30
30
  <script type="application/json">
31
31
  {
32
32
  "usingComponents": {
33
- "cms-protocol": "../../../components/core/jmash-cms-protocol.mpx"
33
+ "cms-protocol": "../../../components/core/jmash-cms-protocol"
34
34
  }
35
35
  }
36
36
  </script>
@@ -57,7 +57,7 @@ createPage({
57
57
  {
58
58
  "navigationBarTitleText": "登录",
59
59
  "usingComponents": {
60
- "jmash-login": "../../../components/core/jmash-login.mpx"
60
+ "jmash-login": "../../../components/core/jmash-login"
61
61
  }
62
62
  }
63
63
  </script>
@@ -0,0 +1,135 @@
1
+ <template>
2
+ <!-- 我的协议 -->
3
+ <view class="cell-group" wx:for="{{ arr }}" wx:key="index">
4
+ <navigator class="cell" url="{{ item.url }}" open-type="{{ item.openType }}" hover-class="none">
5
+ <view class="cell-text">{{ item.title }}</view>
6
+ <cube-icon class="cell-arrow" type="arrow" size="28rpx" />
7
+ </navigator>
8
+ </view>
9
+
10
+ <!-- 退出登录-仅清理用户相关数据 -->
11
+ <view class="logout-section">
12
+ <view class="logout-btn" bindtap="handleLogout">
13
+ <text class="logout-text">退出登录</text>
14
+ </view>
15
+ </view>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ import mpx, { createPage } from "@mpxjs/core";
20
+ import { useUserStore } from "../../../store/user";
21
+
22
+ createPage({
23
+ setup() {
24
+ const userStore = useUserStore();
25
+ const config = getApp().globalData.config;
26
+ // 我的协议
27
+ let arr = [
28
+ {
29
+ title: "用户协议",
30
+ openType: "navigateTo",
31
+ url: `/jmash/pages/auth/cms-protocol?tenant=${config.siteTenant}&siteId=${config.siteId}&channelAlias=${config.aliasAgreement}`,
32
+ },
33
+ {
34
+ title: "隐私政策",
35
+ openType: "navigateTo",
36
+ url: `/jmash/pages/auth/cms-protocol?tenant=${config.siteTenant}&siteId=${config.siteId}&channelAlias=${config.aliasPrivacy}`,
37
+ },
38
+ ];
39
+
40
+ return { arr, userStore }
41
+ },
42
+ methods: {
43
+ handleLogout() {
44
+ mpx.showModal({
45
+ title: "提示",
46
+ content: "确定要退出登录吗?",
47
+ success: (res) => {
48
+ if (!res.confirm) return
49
+
50
+ // 1. 只清除登录相关数据,保留角色权限等其他数据
51
+ mpx.removeStorageSync('token')
52
+ mpx.removeStorageSync('refreshToken')
53
+ mpx.removeStorageSync('expiresDate')
54
+ mpx.removeStorageSync('expiresIn')
55
+ mpx.removeStorageSync('userInfo')
56
+
57
+ // 2. 重置 store 状态
58
+ this.userStore.accessToken = ''
59
+ this.userStore.expiresDate = 0
60
+ this.userStore.userInfo = {} as any
61
+
62
+ mpx.showToast({ title: "已退出登录", icon: "none" })
63
+
64
+ // 3. 跳转到启动页,重新走登录流程
65
+ mpx.navigateBack({ delta: 1 })
66
+ },
67
+ })
68
+ },
69
+ },
70
+ });
71
+ </script>
72
+
73
+ <style lang="scss">
74
+ @use "../../../styles/index.scss" as *;
75
+
76
+ page {
77
+ background-color: $background-color;
78
+ }
79
+
80
+ .cell-group {
81
+ background: $background-white-color;
82
+ }
83
+
84
+ .cell {
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: space-between;
88
+ padding: 28rpx 30rpx;
89
+ color: $font-color;
90
+ border-bottom: 2rpx solid $border-line;
91
+ }
92
+
93
+ .cell:last-child {
94
+ border-bottom: 0;
95
+ }
96
+
97
+ .cell-text {
98
+ font-size: $font-size;
99
+ }
100
+
101
+ .cell-arrow {
102
+ color: $font-color-grey-opacity;
103
+ }
104
+
105
+ .logout-section {
106
+ position: fixed;
107
+ left: 0;
108
+ right: 0;
109
+ bottom: 0;
110
+ padding: 0 0 calc(env(safe-area-inset-bottom) + 300rpx);
111
+ background-color: $background-color;
112
+ }
113
+
114
+ .logout-btn {
115
+ background-color: $background-white-color;
116
+ padding: 32rpx 0;
117
+ text-align: center;
118
+ border-radius: 12rpx;
119
+ }
120
+
121
+ .logout-text {
122
+ font-size: $font-size;
123
+ color: #dc2626;
124
+ font-weight: 500;
125
+ }
126
+ </style>
127
+
128
+ <script type="application/json">
129
+ {
130
+ "usingComponents": {
131
+ "cube-icon": "@mpxjs/mpx-cube-ui/lib/components/icon/index"
132
+ },
133
+ "navigationBarTitleText": "系统设置"
134
+ }
135
+ </script>
@@ -81,7 +81,7 @@ page {
81
81
  "navigationBarTitleText": "列表",
82
82
  "usingComponents": {
83
83
  "jmash-search": "../../../components/common/jmash-search",
84
- "jmash-cms-activity-list": "../../../components/cms/jmash-cms-activity-list.mpx"
84
+ "jmash-cms-activity-list": "../../../components/cms/jmash-cms-activity-list"
85
85
  }
86
86
  }
87
87
  </script>
@@ -83,7 +83,7 @@ page {
83
83
  "navigationBarTitleText": "列表",
84
84
  "usingComponents": {
85
85
  "jmash-search": "../../../components/common/jmash-search",
86
- "jmash-cms-article-list": "../../../components/cms/jmash-cms-article-list.mpx"
86
+ "jmash-cms-article-list": "../../../components/cms/jmash-cms-article-list"
87
87
  }
88
88
  }
89
89
  </script>
@@ -27,7 +27,7 @@ createPage({
27
27
  <script type="application/json">
28
28
  {
29
29
  "usingComponents": {
30
- "cms-article": "../../../components/cms/jmash-cms-article.mpx"
30
+ "cms-article": "../../../components/cms/jmash-cms-article"
31
31
  }
32
32
  }
33
33
  </script>
@@ -78,7 +78,7 @@ page {
78
78
  "navigationBarTitleText": "列表",
79
79
  "usingComponents": {
80
80
  "jmash-search": "../../../components/common/jmash-search",
81
- "jmash-cms-location-list": "../../../components/cms/jmash-cms-location-list.mpx"
81
+ "jmash-cms-location-list": "../../../components/cms/jmash-cms-location-list"
82
82
  }
83
83
  }
84
84
  </script>
@@ -27,7 +27,7 @@ createPage({
27
27
  <script type="application/json">
28
28
  {
29
29
  "usingComponents": {
30
- "cms-location": "../../../components/cms/jmash-cms-location.mpx"
30
+ "cms-location": "../../../components/cms/jmash-cms-location"
31
31
  }
32
32
  }
33
33
  </script>
@@ -83,7 +83,7 @@ page {
83
83
  "navigationBarTitleText": "列表",
84
84
  "usingComponents": {
85
85
  "jmash-search": "../../../components/common/jmash-search",
86
- "jmash-cms-product-list": "../../../components/cms/jmash-cms-product-list.mpx"
86
+ "jmash-cms-product-list": "../../../components/cms/jmash-cms-product-list"
87
87
  }
88
88
  }
89
89
  </script>
@@ -53,7 +53,7 @@ createPage({
53
53
  <script type="application/json">
54
54
  {
55
55
  "usingComponents": {
56
- "jmash-popup-login": "../components/core/jmash-popup-login.mpx"
56
+ "jmash-popup-login": "../components/core/jmash-popup-login"
57
57
  }
58
58
  }
59
59
  </script>
@@ -86,7 +86,7 @@ createPage({
86
86
  <script type="application/json">
87
87
  {
88
88
  "usingComponents": {
89
- "jmash-menu": "../../components/common/jmash-menu.mpx"
89
+ "jmash-menu": "../../components/common/jmash-menu"
90
90
  }
91
91
  }
92
92
  </script>
@@ -71,9 +71,9 @@ $bg-page: #f5f5f5;
71
71
  <script type="application/json">
72
72
  {
73
73
  "usingComponents": {
74
- "jmash-user": "../../components/auth-user/jmash-user.mpx",
75
- "jmash-menu": "../../components/common/jmash-menu.mpx",
76
- "jmash-logout": "../../components/auth-user/jmash-logout.mpx"
74
+ "jmash-user": "../../components/auth-user/jmash-user",
75
+ "jmash-menu": "../../components/common/jmash-menu",
76
+ "jmash-logout": "../../components/auth-user/jmash-logout"
77
77
  }
78
78
  }
79
79
  </script>