@indfnd/common-mobile 0.0.29 → 0.0.31
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/CHANGELOG.md +18 -0
- package/dist/ind-common-mobile.es.js +59 -10
- package/dist/ind-common-mobile.umd.cjs +28 -28
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,13 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.0.31](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.30...v0.0.31) (2024-06-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 支持滚动加载 ([108e33e](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/108e33ecb53bd5376d16c770d259a7fdeb2e46cf))
|
|
11
|
+
|
|
12
|
+
### [0.0.30](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.29...v0.0.30) (2024-06-16)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* 会话 ([a831445](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/a8314450437e65b86de2b8425e3062fbce13478f))
|
|
18
|
+
* init ([c0d2737](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/c0d27373cc7948aa4f7ca9241c47484fd8e8e0ef))
|
|
19
|
+
|
|
5
20
|
### [0.0.29](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.28...v0.0.29) (2024-06-15)
|
|
6
21
|
|
|
22
|
+
<<<<<<< HEAD
|
|
23
|
+
=======
|
|
7
24
|
|
|
8
25
|
### Features
|
|
9
26
|
|
|
10
27
|
* 移动端会话补偿 ([2f627eb](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/commit/2f627eb7362d45a41bd0b1c3a537fd22e3fd5784))
|
|
11
28
|
|
|
29
|
+
>>>>>>> 7445f43a11f06ff428d84dd9eae853fe1c47cc2c
|
|
12
30
|
### [0.0.28](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v0.0.27...v0.0.28) (2024-06-15)
|
|
13
31
|
|
|
14
32
|
|
|
@@ -2,7 +2,7 @@ import { getQuarterNum, getHalfYearNum, getHalfYear, formatDate, useConfig, getL
|
|
|
2
2
|
import Vue$1 from "vue";
|
|
3
3
|
import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
|
|
4
4
|
const name$1 = "@indfnd/common-mobile";
|
|
5
|
-
const version$2 = "0.0.
|
|
5
|
+
const version$2 = "0.0.30";
|
|
6
6
|
const author$1 = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -43259,6 +43259,7 @@ var staticRenderFns$m = [];
|
|
|
43259
43259
|
const __vue2_script$m = {
|
|
43260
43260
|
name: "IndMLoadMore",
|
|
43261
43261
|
props: {
|
|
43262
|
+
enableLoadMore: Boolean,
|
|
43262
43263
|
dataUrl: String,
|
|
43263
43264
|
params: Object,
|
|
43264
43265
|
datas: {
|
|
@@ -44521,7 +44522,7 @@ var render$h = function() {
|
|
|
44521
44522
|
_vm.searchVal = $event;
|
|
44522
44523
|
}, "update:search-val": function($event) {
|
|
44523
44524
|
_vm.searchVal = $event;
|
|
44524
|
-
}, "doSearch": _vm.doSearch, "doSearchFilter": _vm.doSearchFilter } }), _vm.topMsg ? _c("van-notice-bar", { staticClass: "ind-flex-no-shrink", attrs: { "mode": "closeable" } }, [_vm._v(_vm._s(_vm.topMsg))]) : _vm._e(), _c("div", {
|
|
44525
|
+
}, "doSearch": _vm.doSearch, "doSearchFilter": _vm.doSearchFilter } }), _vm.topMsg ? _c("van-notice-bar", { staticClass: "ind-flex-no-shrink", attrs: { "mode": "closeable" } }, [_vm._v(_vm._s(_vm.topMsg))]) : _vm._e(), _c("div", { class: ["ind-page", _vm.enableLoadMore ? "loadmore" : ""] }, [_c("IndMLoadMore", { attrs: { "enableLoadMore": _vm.enableLoadMore, "pageLen": 10, "datas": _vm.displayRows, "dataUrl": _vm.dataUrl, "params": _vm.searchForm }, scopedSlots: _vm._u([{ key: "item", fn: function(ref) {
|
|
44525
44526
|
var item2 = ref.item;
|
|
44526
44527
|
return [_vm._t("item", function() {
|
|
44527
44528
|
return [_c("IndMForm", { attrs: { "fieldList": _vm.formFieldList, "cardBtns": _vm.cardBtns, "value": item2, "formType": "card" } })];
|
|
@@ -44557,7 +44558,8 @@ const __vue2_script$h = {
|
|
|
44557
44558
|
searchFields: Array,
|
|
44558
44559
|
searchForm: Object,
|
|
44559
44560
|
apiParams: Object,
|
|
44560
|
-
cardFields: Array
|
|
44561
|
+
cardFields: Array,
|
|
44562
|
+
enableLoadMore: Boolean
|
|
44561
44563
|
},
|
|
44562
44564
|
data() {
|
|
44563
44565
|
return {
|
|
@@ -68295,7 +68297,7 @@ const __vue2_script$3 = {
|
|
|
68295
68297
|
},
|
|
68296
68298
|
my_apps() {
|
|
68297
68299
|
setTimeout(() => {
|
|
68298
|
-
this.offsetTop = this.$refs.myapp.clientHeight + 48;
|
|
68300
|
+
this.offsetTop = this.$refs.myapp.clientHeight + 48 + 10 + 4;
|
|
68299
68301
|
}, 200);
|
|
68300
68302
|
}
|
|
68301
68303
|
},
|
|
@@ -68752,6 +68754,7 @@ const rootRoute = {
|
|
|
68752
68754
|
{
|
|
68753
68755
|
name: config.homeRouteName,
|
|
68754
68756
|
path: "home",
|
|
68757
|
+
redirect: "/apps?t=" + new Date().getTime(),
|
|
68755
68758
|
meta: {
|
|
68756
68759
|
hideInMenu: true,
|
|
68757
68760
|
title: "\u9996\u9875",
|
|
@@ -70119,6 +70122,31 @@ axios$1.isAxiosError = isAxiosError;
|
|
|
70119
70122
|
axios$2.exports = axios$1;
|
|
70120
70123
|
axios$2.exports.default = axios$1;
|
|
70121
70124
|
var axios = axios$2.exports;
|
|
70125
|
+
const Cookie = {
|
|
70126
|
+
set: function(key, value17, exdays) {
|
|
70127
|
+
if (key.indexOf("=") !== -1) {
|
|
70128
|
+
throw new Error("Cookie\u4E0D\u652F\u6301key\u4E2D\u4F7F\u7528\u7B49\u53F7\u3010=\u3011, key:" + key);
|
|
70129
|
+
}
|
|
70130
|
+
let exdate = new Date();
|
|
70131
|
+
exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1e3 * exdays);
|
|
70132
|
+
window.document.cookie = key + "=" + value17 + ";path=/;expires=" + exdate.toGMTString();
|
|
70133
|
+
},
|
|
70134
|
+
get: function(key) {
|
|
70135
|
+
if (document.cookie.length > 0) {
|
|
70136
|
+
var arr = document.cookie.split("; ");
|
|
70137
|
+
for (let i = 0; i < arr.length; i++) {
|
|
70138
|
+
let arr2 = arr[i].split("=");
|
|
70139
|
+
if (arr2[0] === key) {
|
|
70140
|
+
var value17 = arr2[1];
|
|
70141
|
+
for (let j = 2; j < arr2.length; j++) {
|
|
70142
|
+
value17 += "=" + arr2[j];
|
|
70143
|
+
}
|
|
70144
|
+
return value17;
|
|
70145
|
+
}
|
|
70146
|
+
}
|
|
70147
|
+
}
|
|
70148
|
+
}
|
|
70149
|
+
};
|
|
70122
70150
|
async function renderRoutes({ router, store: store2, microType, allowPermissionList, routerOptionsBak }) {
|
|
70123
70151
|
await store2.dispatch("getUserInfo");
|
|
70124
70152
|
await store2.dispatch("getAppListData");
|
|
@@ -70166,7 +70194,10 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
70166
70194
|
const routerOptionsBak = _.cloneDeep(router.options);
|
|
70167
70195
|
window.sessionNotValidHandler = async function() {
|
|
70168
70196
|
if (typeof window.Code != "undefined") {
|
|
70169
|
-
await pluginLogin();
|
|
70197
|
+
await pluginLogin(store2);
|
|
70198
|
+
await store2.dispatch("getUserInfo");
|
|
70199
|
+
await store2.dispatch("getAppListData");
|
|
70200
|
+
await store2.dispatch("getPermissionData");
|
|
70170
70201
|
} else {
|
|
70171
70202
|
if (window.confirm("\u4F1A\u8BDD\u5DF2\u5931\u6548\uFF0C\u662F\u5426\u91CD\u65B0\u767B\u5F55\uFF1F")) {
|
|
70172
70203
|
router.push({ name: LOGIN_PAGE_NAME }, () => {
|
|
@@ -70205,8 +70236,10 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
70205
70236
|
allowPermissionList,
|
|
70206
70237
|
routerOptionsBak
|
|
70207
70238
|
});
|
|
70239
|
+
console.log("router1");
|
|
70208
70240
|
next2({ ...to, replace: true });
|
|
70209
70241
|
} catch (error) {
|
|
70242
|
+
console.log("router2");
|
|
70210
70243
|
next2({ name: LOGIN_PAGE_NAME });
|
|
70211
70244
|
}
|
|
70212
70245
|
Spin.hide();
|
|
@@ -70214,35 +70247,41 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
70214
70247
|
console.log("window?.selectInst?.show", (_a = window == null ? void 0 : window.selectInst) == null ? void 0 : _a.show);
|
|
70215
70248
|
if ((_b = window == null ? void 0 : window.selectInst) == null ? void 0 : _b.show) {
|
|
70216
70249
|
window.selectInst.$emit("update:show", false);
|
|
70250
|
+
console.log("router3");
|
|
70217
70251
|
next2(false);
|
|
70218
70252
|
} else if ((_c = window == null ? void 0 : window.popupPageInst) == null ? void 0 : _c.value) {
|
|
70219
70253
|
window.popupPageInst.$emit("input", false);
|
|
70254
|
+
console.log("router4");
|
|
70220
70255
|
next2(false);
|
|
70221
70256
|
} else {
|
|
70257
|
+
console.log("router5");
|
|
70222
70258
|
next2();
|
|
70223
70259
|
}
|
|
70224
70260
|
}
|
|
70225
70261
|
}
|
|
70226
70262
|
if (typeof window.Code != "undefined") {
|
|
70227
70263
|
if (!token) {
|
|
70228
|
-
token = await pluginLogin();
|
|
70264
|
+
token = await pluginLogin(store2);
|
|
70229
70265
|
store2.dispatch("loginSuccess", token);
|
|
70230
70266
|
await _renderRoutes();
|
|
70231
70267
|
} else {
|
|
70232
70268
|
if (!await checkLogin()) {
|
|
70233
|
-
token = await pluginLogin();
|
|
70269
|
+
token = await pluginLogin(store2);
|
|
70234
70270
|
store2.dispatch("loginSuccess", token);
|
|
70235
70271
|
}
|
|
70236
70272
|
await _renderRoutes();
|
|
70237
70273
|
}
|
|
70238
70274
|
} else {
|
|
70239
70275
|
if (!token && to.name !== LOGIN_PAGE_NAME) {
|
|
70276
|
+
console.log("router6");
|
|
70240
70277
|
next2({ name: LOGIN_PAGE_NAME });
|
|
70241
70278
|
} else if (to.name === LOGIN_PAGE_NAME) {
|
|
70279
|
+
console.log("router7");
|
|
70242
70280
|
next2();
|
|
70243
70281
|
} else {
|
|
70282
|
+
console.log("router8");
|
|
70244
70283
|
if (!await checkLogin()) {
|
|
70245
|
-
token = await pluginLogin();
|
|
70284
|
+
token = await pluginLogin(store2);
|
|
70246
70285
|
store2.dispatch("loginSuccess", token);
|
|
70247
70286
|
}
|
|
70248
70287
|
await _renderRoutes();
|
|
@@ -70254,12 +70293,22 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
70254
70293
|
window.scrollTo(0, 0);
|
|
70255
70294
|
});
|
|
70256
70295
|
}
|
|
70257
|
-
const pluginLogin = () => {
|
|
70296
|
+
const pluginLogin = (store2) => {
|
|
70297
|
+
sessionStorage.removeItem("lambo-token");
|
|
70298
|
+
sessionStorage.removeItem("sso_token");
|
|
70299
|
+
sessionStorage.removeItem("userInfo");
|
|
70300
|
+
localStorage.removeItem("v8-token");
|
|
70301
|
+
localStorage.removeItem("userId");
|
|
70302
|
+
localStorage.removeItem("userInfo");
|
|
70303
|
+
Cookie.set("lambo-sso-key", "", 1);
|
|
70304
|
+
Cookie.set("TOKEN_KEY", "", 1);
|
|
70305
|
+
store2.commit("setUserName", "");
|
|
70306
|
+
store2.commit("setToken", "");
|
|
70258
70307
|
return new Promise((resolve, reject) => {
|
|
70259
70308
|
Code.postMessage("");
|
|
70260
70309
|
window.getCode = function(res) {
|
|
70261
70310
|
console.log("getCode res", res);
|
|
70262
|
-
axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then((resp) => {
|
|
70311
|
+
axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
|
|
70263
70312
|
setToken(resp.token);
|
|
70264
70313
|
resolve(resp.token);
|
|
70265
70314
|
}).catch((e) => {
|