jmash-core-mp 0.1.62 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mpx.config.js
CHANGED
|
@@ -16,9 +16,20 @@ module.exports = defineConfig({
|
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
loader: {},
|
|
19
|
-
unocss: {},
|
|
20
19
|
},
|
|
21
20
|
},
|
|
21
|
+
chainWebpack(config) {
|
|
22
|
+
const rules = config.module.rules;
|
|
23
|
+
rules.store.forEach((rule) => {
|
|
24
|
+
if (!rule || !rule.uses) return;
|
|
25
|
+
const use = rule.uses.get("ts-loader");
|
|
26
|
+
if (!use) return;
|
|
27
|
+
use.tap((options = {}) => ({
|
|
28
|
+
...options,
|
|
29
|
+
allowTsInNodeModules: true,
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
},
|
|
22
33
|
/**
|
|
23
34
|
* 如果希望node_modules下的文件时对应的缓存可以失效,
|
|
24
35
|
* 可以将configureWebpack.snap.managedPaths修改为 []
|
package/package.json
CHANGED
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
<script lang="ts">
|
|
25
25
|
import mpx, { createComponent, ref, computed } from "@mpxjs/core";
|
|
26
|
-
import { config } from "../../utils/config";
|
|
27
26
|
import { EventBase } from "../../api/types";
|
|
28
27
|
import { useUserStore } from "../../store/user";
|
|
29
28
|
|
|
@@ -41,6 +40,7 @@ createComponent({
|
|
|
41
40
|
setup(props) {
|
|
42
41
|
// 用户状态管理
|
|
43
42
|
const userStore = useUserStore();
|
|
43
|
+
let config = getApp().globalData.config;
|
|
44
44
|
// 资源路径
|
|
45
45
|
const resourceUrl = config.resourceUrl + "/images/";
|
|
46
46
|
// 默认主菜单列表
|
|
@@ -99,6 +99,7 @@ createComponent({
|
|
|
99
99
|
content: "请先登录!",
|
|
100
100
|
success(res) {
|
|
101
101
|
if (res.confirm) {
|
|
102
|
+
let config = getApp().globalData.config;
|
|
102
103
|
mpx.navigateTo({
|
|
103
104
|
url: config.loginUrl + "?tabbar=true&backurl=" + encodeURIComponent("/pages/tabbar/my"),
|
|
104
105
|
});
|
|
@@ -107,10 +108,14 @@ createComponent({
|
|
|
107
108
|
});
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
|
-
if (url
|
|
111
|
-
mpx.
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
if (!url) {
|
|
112
|
+
mpx.showToast({ title: "暂未开放,敬请期待", icon: "none" });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (url && tabbar === false) {
|
|
116
|
+
mpx.navigateTo({ url: url });
|
|
117
|
+
} else if (url && tabbar === true) {
|
|
118
|
+
mpx.switchTab({ url: url });
|
|
114
119
|
}
|
|
115
120
|
}
|
|
116
121
|
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
|
|
50
50
|
<script lang="ts">
|
|
51
51
|
import { createComponent, ref } from "@mpxjs/core";
|
|
52
|
-
import { config } from "../../utils/config";
|
|
53
52
|
|
|
54
53
|
createComponent({
|
|
55
54
|
options: {
|
|
@@ -69,6 +68,7 @@ createComponent({
|
|
|
69
68
|
* 组件的初始数据
|
|
70
69
|
*/
|
|
71
70
|
setup() {
|
|
71
|
+
let config = getApp().globalData.config;
|
|
72
72
|
// 资源路径
|
|
73
73
|
let resourceUrl = config.resourceUrl + "/images/";
|
|
74
74
|
// 公司公众号二维码图片
|