fix hlk
This commit is contained in:
parent
b9c7b52a4d
commit
82414ef213
441
indexedDB.json
441
indexedDB.json
@ -1,8 +1,11 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"databaseName": "hlk_touch_test_14920",
|
||||||
|
"data": [
|
||||||
{ "key": "HLK_TOUCH_account_mobile", "value": "17770720274" },
|
{ "key": "HLK_TOUCH_account_mobile", "value": "17770720274" },
|
||||||
{
|
{
|
||||||
"key": "HLK_TOUCH_currentShop",
|
"key": "HLK_TOUCH_currentShop",
|
||||||
"value": { "14920": { "currentShopId": 26981, "timer": 1734622498195 } }
|
"value": { "14920": { "currentShopId": 26981, "timer": 1734703756648 } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "HLK_TOUCH_metadata",
|
"key": "HLK_TOUCH_metadata",
|
||||||
@ -278,17 +281,6 @@
|
|||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709231000
|
"createTs": 1723709231000
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": 51577,
|
|
||||||
"merchantId": 14920,
|
|
||||||
"shopId": 26981,
|
|
||||||
"no": "FIRST",
|
|
||||||
"name": "顾问",
|
|
||||||
"departmentNo": "1",
|
|
||||||
"seqNo": null,
|
|
||||||
"status": "NORMAL",
|
|
||||||
"createTs": 1723709536000
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": 51771,
|
"id": 51771,
|
||||||
"merchantId": 14920,
|
"merchantId": 14920,
|
||||||
@ -333,6 +325,17 @@
|
|||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709193000
|
"createTs": 1723709193000
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": 51577,
|
||||||
|
"merchantId": 14920,
|
||||||
|
"shopId": 26981,
|
||||||
|
"no": "FIRST",
|
||||||
|
"name": "顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"seqNo": null,
|
||||||
|
"status": "NORMAL",
|
||||||
|
"createTs": 1723709536000
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": 51578,
|
"id": 51578,
|
||||||
"merchantId": 14920,
|
"merchantId": 14920,
|
||||||
@ -344,17 +347,6 @@
|
|||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709536000
|
"createTs": 1723709536000
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": 51580,
|
|
||||||
"merchantId": 14920,
|
|
||||||
"shopId": 26982,
|
|
||||||
"no": "SECOND",
|
|
||||||
"name": "美容师",
|
|
||||||
"departmentNo": "1",
|
|
||||||
"seqNo": null,
|
|
||||||
"status": "NORMAL",
|
|
||||||
"createTs": 1723709546000
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": 51571,
|
"id": 51571,
|
||||||
"merchantId": 14920,
|
"merchantId": 14920,
|
||||||
@ -389,15 +381,15 @@
|
|||||||
"createTs": 1723709545000
|
"createTs": 1723709545000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 51574,
|
"id": 51580,
|
||||||
"merchantId": 14920,
|
"merchantId": 14920,
|
||||||
"shopId": null,
|
"shopId": 26982,
|
||||||
"no": "SECOND",
|
"no": "SECOND",
|
||||||
"name": "医师",
|
"name": "美容师",
|
||||||
"departmentNo": "2",
|
"departmentNo": "1",
|
||||||
"seqNo": null,
|
"seqNo": null,
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709389000
|
"createTs": 1723709546000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 51565,
|
"id": 51565,
|
||||||
@ -433,15 +425,15 @@
|
|||||||
"createTs": 1723709389000
|
"createTs": 1723709389000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 51576,
|
"id": 51574,
|
||||||
"merchantId": 14920,
|
"merchantId": 14920,
|
||||||
"shopId": 26981,
|
"shopId": null,
|
||||||
"no": "SECOND",
|
"no": "SECOND",
|
||||||
"name": "医师",
|
"name": "医师",
|
||||||
"departmentNo": "2",
|
"departmentNo": "2",
|
||||||
"seqNo": null,
|
"seqNo": null,
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709533000
|
"createTs": 1723709389000
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 51575,
|
"id": 51575,
|
||||||
@ -453,6 +445,17 @@
|
|||||||
"seqNo": null,
|
"seqNo": null,
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709533000
|
"createTs": 1723709533000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 51576,
|
||||||
|
"merchantId": 14920,
|
||||||
|
"shopId": 26981,
|
||||||
|
"no": "SECOND",
|
||||||
|
"name": "医师",
|
||||||
|
"departmentNo": "2",
|
||||||
|
"seqNo": null,
|
||||||
|
"status": "NORMAL",
|
||||||
|
"createTs": 1723709533000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"merchantInterConfig": {
|
"merchantInterConfig": {
|
||||||
@ -663,15 +666,6 @@
|
|||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709545000
|
"createTs": 1723709545000
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": 35583,
|
|
||||||
"merchantId": 14920,
|
|
||||||
"shopId": 26981,
|
|
||||||
"no": "2",
|
|
||||||
"name": "医美部",
|
|
||||||
"status": "NORMAL",
|
|
||||||
"createTs": 1723709533000
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": 35582,
|
"id": 35582,
|
||||||
"merchantId": 14920,
|
"merchantId": 14920,
|
||||||
@ -680,6 +674,15 @@
|
|||||||
"name": "医美部",
|
"name": "医美部",
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1723709389000
|
"createTs": 1723709389000
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 35583,
|
||||||
|
"merchantId": 14920,
|
||||||
|
"shopId": 26981,
|
||||||
|
"no": "2",
|
||||||
|
"name": "医美部",
|
||||||
|
"status": "NORMAL",
|
||||||
|
"createTs": 1723709533000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"user": [
|
"user": [
|
||||||
@ -1116,7 +1119,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": "24082064254008068495",
|
"groupNo": "24082064254008068495",
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1160,7 +1168,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": "24082055976109612496",
|
"groupNo": "24082055976109612496",
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1204,7 +1217,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1248,7 +1266,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1292,7 +1315,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1336,7 +1364,12 @@
|
|||||||
"departmentNo": "2",
|
"departmentNo": "2",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "38823192", "name": "医美咨询师", "departmentNo": "2", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "38823192",
|
||||||
|
"name": "医美咨询师",
|
||||||
|
"departmentNo": "2",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": "24082039599685473852",
|
"groupNo": "24082039599685473852",
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1380,7 +1413,12 @@
|
|||||||
"departmentNo": "2",
|
"departmentNo": "2",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "38823192", "name": "医美咨询师", "departmentNo": "2", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "38823192",
|
||||||
|
"name": "医美咨询师",
|
||||||
|
"departmentNo": "2",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": "24082026153655700495",
|
"groupNo": "24082026153655700495",
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1424,7 +1462,12 @@
|
|||||||
"departmentNo": "2",
|
"departmentNo": "2",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "38823192", "name": "医美咨询师", "departmentNo": "2", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "38823192",
|
||||||
|
"name": "医美咨询师",
|
||||||
|
"departmentNo": "2",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1468,7 +1511,12 @@
|
|||||||
"departmentNo": "2",
|
"departmentNo": "2",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "38823192", "name": "医美咨询师", "departmentNo": "2", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "38823192",
|
||||||
|
"name": "医美咨询师",
|
||||||
|
"departmentNo": "2",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1512,7 +1560,12 @@
|
|||||||
"departmentNo": "2",
|
"departmentNo": "2",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "38823192", "name": "医美咨询师", "departmentNo": "2", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "38823192",
|
||||||
|
"name": "医美咨询师",
|
||||||
|
"departmentNo": "2",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1556,7 +1609,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1600,7 +1658,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1644,7 +1707,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1688,7 +1756,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1732,7 +1805,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "26998199", "name": "美容顾问", "departmentNo": "1", "positionNo": "FIRST" }
|
{
|
||||||
|
"no": "26998199",
|
||||||
|
"name": "美容顾问",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "FIRST"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1776,7 +1854,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1820,7 +1903,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1864,7 +1952,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1908,7 +2001,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -1952,7 +2050,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -2216,7 +2319,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -2260,7 +2368,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -2304,7 +2417,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -2348,7 +2466,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -2392,7 +2515,12 @@
|
|||||||
"departmentNo": "1",
|
"departmentNo": "1",
|
||||||
"isServing": "Y",
|
"isServing": "Y",
|
||||||
"levels": [
|
"levels": [
|
||||||
{ "no": "41513283", "name": "美容师", "departmentNo": "1", "positionNo": "SECOND" }
|
{
|
||||||
|
"no": "41513283",
|
||||||
|
"name": "美容师",
|
||||||
|
"departmentNo": "1",
|
||||||
|
"positionNo": "SECOND"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"groupNo": null,
|
"groupNo": null,
|
||||||
"group": null,
|
"group": null,
|
||||||
@ -2424,38 +2552,6 @@
|
|||||||
"crmSn": null
|
"crmSn": null
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"merchant": [
|
|
||||||
{
|
|
||||||
"id": 14920,
|
|
||||||
"name": "AT测试租户",
|
|
||||||
"brandLogo": "upload/14920/0/6f72381b2c734aac8d610a2e75d7fa60.jpg",
|
|
||||||
"brandName": "AT测试EEO",
|
|
||||||
"contact": "邬琴",
|
|
||||||
"phone": "13677997987",
|
|
||||||
"remark": ["测试租户"],
|
|
||||||
"adminExt": {
|
|
||||||
"serviceEmp": { "name": "", "id": "" },
|
|
||||||
"org": { "name": "" },
|
|
||||||
"city": { "name": "深圳", "id": "0755" },
|
|
||||||
"employee": { "name": "深圳公司", "id": "24" },
|
|
||||||
"group": { "name": "深圳_深圳公司", "id": "10" },
|
|
||||||
"payFace": {
|
|
||||||
"faceHandlerEmpName": "",
|
|
||||||
"posHandlerEmpId": "",
|
|
||||||
"faceChargeEmpId": "",
|
|
||||||
"faceHandlerEmpId": "",
|
|
||||||
"posHandlerEmpName": "",
|
|
||||||
"faceChargeEmpName": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"status": "NORMAL",
|
|
||||||
"createTs": 1723709147000,
|
|
||||||
"lastUpdateTs": 1733356105000,
|
|
||||||
"channelType": "HLK",
|
|
||||||
"enableRegion": "N"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"merchantRegion": [],
|
|
||||||
"paymentConfig": { "id": 17022, "merchantId": 14920, "channel": "DLB", "ext": {} },
|
"paymentConfig": { "id": 17022, "merchantId": 14920, "channel": "DLB", "ext": {} },
|
||||||
"classify": [
|
"classify": [
|
||||||
{
|
{
|
||||||
@ -2997,6 +3093,37 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"merchant": [
|
||||||
|
{
|
||||||
|
"id": 14920,
|
||||||
|
"name": "AT测试租户",
|
||||||
|
"brandLogo": "upload/14920/0/6f72381b2c734aac8d610a2e75d7fa60.jpg",
|
||||||
|
"brandName": "AT测试EEO",
|
||||||
|
"contact": "邬琴",
|
||||||
|
"phone": "13677997987",
|
||||||
|
"remark": ["测试租户"],
|
||||||
|
"adminExt": {
|
||||||
|
"serviceEmp": { "name": "", "id": "" },
|
||||||
|
"org": { "name": "" },
|
||||||
|
"city": { "name": "深圳", "id": "0755" },
|
||||||
|
"employee": { "name": "深圳公司", "id": "24" },
|
||||||
|
"group": { "name": "深圳_深圳公司", "id": "10" },
|
||||||
|
"payFace": {
|
||||||
|
"faceHandlerEmpName": "",
|
||||||
|
"posHandlerEmpId": "",
|
||||||
|
"faceChargeEmpId": "",
|
||||||
|
"faceHandlerEmpId": "",
|
||||||
|
"posHandlerEmpName": "",
|
||||||
|
"faceChargeEmpName": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": "NORMAL",
|
||||||
|
"createTs": 1723709147000,
|
||||||
|
"lastUpdateTs": 1733356105000,
|
||||||
|
"channelType": "HLK",
|
||||||
|
"enableRegion": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
"billRemark": [
|
"billRemark": [
|
||||||
{
|
{
|
||||||
"id": 60781,
|
"id": 60781,
|
||||||
@ -3013,6 +3140,7 @@
|
|||||||
"createTs": 1726121053000
|
"createTs": 1726121053000
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"merchantRegion": [],
|
||||||
"paymentType": [
|
"paymentType": [
|
||||||
{
|
{
|
||||||
"id": 34308,
|
"id": 34308,
|
||||||
@ -3022,7 +3150,12 @@
|
|||||||
"icon": "cash",
|
"icon": "cash",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "Y",
|
"isCash": "Y",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028820000
|
"createTs": 1587028820000
|
||||||
},
|
},
|
||||||
@ -3034,7 +3167,12 @@
|
|||||||
"icon": "card",
|
"icon": "card",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": false, "service": true, "goods": true, "cardPurchase": false },
|
"ext": {
|
||||||
|
"cardRecharge": false,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": false
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028821000
|
"createTs": 1587028821000
|
||||||
},
|
},
|
||||||
@ -3046,7 +3184,12 @@
|
|||||||
"icon": "bonus",
|
"icon": "bonus",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": false, "service": true, "goods": true, "cardPurchase": false },
|
"ext": {
|
||||||
|
"cardRecharge": false,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": false
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028821000
|
"createTs": 1587028821000
|
||||||
},
|
},
|
||||||
@ -3058,7 +3201,12 @@
|
|||||||
"icon": "wechat",
|
"icon": "wechat",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "Y",
|
"isCash": "Y",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028821000,
|
"createTs": 1587028821000,
|
||||||
"isQR": true
|
"isQR": true
|
||||||
@ -3071,7 +3219,12 @@
|
|||||||
"icon": "alipay",
|
"icon": "alipay",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "Y",
|
"isCash": "Y",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028821000,
|
"createTs": 1587028821000,
|
||||||
"isQR": true
|
"isQR": true
|
||||||
@ -3084,7 +3237,12 @@
|
|||||||
"icon": "union",
|
"icon": "union",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "Y",
|
"isCash": "Y",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028822000
|
"createTs": 1587028822000
|
||||||
},
|
},
|
||||||
@ -3096,7 +3254,12 @@
|
|||||||
"icon": null,
|
"icon": null,
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028822000
|
"createTs": 1587028822000
|
||||||
},
|
},
|
||||||
@ -3108,7 +3271,12 @@
|
|||||||
"icon": "zdy",
|
"icon": "zdy",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1587028823000
|
"createTs": 1587028823000
|
||||||
},
|
},
|
||||||
@ -3120,7 +3288,12 @@
|
|||||||
"icon": "rebate",
|
"icon": "rebate",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1612397172000
|
"createTs": 1612397172000
|
||||||
},
|
},
|
||||||
@ -3132,7 +3305,12 @@
|
|||||||
"icon": "zdy",
|
"icon": "zdy",
|
||||||
"isDefault": "Y",
|
"isDefault": "Y",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1639048591000
|
"createTs": 1639048591000
|
||||||
},
|
},
|
||||||
@ -3182,7 +3360,12 @@
|
|||||||
"icon": "zdy",
|
"icon": "zdy",
|
||||||
"isDefault": "N",
|
"isDefault": "N",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1724136423000
|
"createTs": 1724136423000
|
||||||
},
|
},
|
||||||
@ -3194,7 +3377,12 @@
|
|||||||
"icon": "zdy",
|
"icon": "zdy",
|
||||||
"isDefault": "N",
|
"isDefault": "N",
|
||||||
"isCash": "N",
|
"isCash": "N",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1724136424000
|
"createTs": 1724136424000
|
||||||
},
|
},
|
||||||
@ -3206,7 +3394,12 @@
|
|||||||
"icon": "zdy",
|
"icon": "zdy",
|
||||||
"isDefault": "N",
|
"isDefault": "N",
|
||||||
"isCash": "Y",
|
"isCash": "Y",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1724136438000
|
"createTs": 1724136438000
|
||||||
},
|
},
|
||||||
@ -3218,7 +3411,12 @@
|
|||||||
"icon": "zdy",
|
"icon": "zdy",
|
||||||
"isDefault": "N",
|
"isDefault": "N",
|
||||||
"isCash": "Y",
|
"isCash": "Y",
|
||||||
"ext": { "cardRecharge": true, "service": true, "goods": true, "cardPurchase": true },
|
"ext": {
|
||||||
|
"cardRecharge": true,
|
||||||
|
"service": true,
|
||||||
|
"goods": true,
|
||||||
|
"cardPurchase": true
|
||||||
|
},
|
||||||
"status": "NORMAL",
|
"status": "NORMAL",
|
||||||
"createTs": 1731306816000
|
"createTs": 1731306816000
|
||||||
}
|
}
|
||||||
@ -3281,11 +3479,11 @@
|
|||||||
"user": 1733356140386,
|
"user": 1733356140386,
|
||||||
"userLevel": 1723709506551,
|
"userLevel": 1723709506551,
|
||||||
"department": 1723709546004,
|
"department": 1723709546004,
|
||||||
"merchant": 1734622498141,
|
|
||||||
"merchantRegion": 1723709673591,
|
|
||||||
"billRemark": 1724045524248,
|
"billRemark": 1724045524248,
|
||||||
"classify": 1733355270554,
|
"classify": 1733355270554,
|
||||||
"paymentConfig": 1731500143334,
|
"paymentConfig": 1731500143334,
|
||||||
|
"merchant": 1734703771245,
|
||||||
|
"merchantRegion": 1723709673591,
|
||||||
"paymentType": 1731306816449,
|
"paymentType": 1731306816449,
|
||||||
"thdPaymentConfig": 1731393775960
|
"thdPaymentConfig": 1731393775960
|
||||||
},
|
},
|
||||||
@ -3311,14 +3509,14 @@
|
|||||||
"mallTheme": 1733356114262,
|
"mallTheme": 1733356114262,
|
||||||
"mallItemSeries": 1733356024585,
|
"mallItemSeries": 1733356024585,
|
||||||
"serviceAssessments": 1724144392889,
|
"serviceAssessments": 1724144392889,
|
||||||
"merchant": 1734622498313,
|
"merchant": 1734703771409,
|
||||||
"propertyDiscountRule": 1724136193571,
|
"propertyDiscountRule": 1724136193571,
|
||||||
"mallShop": 1733356109640,
|
"mallShop": 1733356109640,
|
||||||
"weComTagGroup": 1729678945555,
|
"weComTagGroup": 1729678945555,
|
||||||
"pack": 1725955985037,
|
"pack": 1725955985037,
|
||||||
"initWechatConfig": 1734622498426,
|
"initWechatConfig": 1734703771475,
|
||||||
"vocationSchedule": 1734622498426,
|
"vocationSchedule": 1734703771475,
|
||||||
"shiftConfig": 1734622498426,
|
"shiftConfig": 1734703771475,
|
||||||
"kpiType": 1724219649867,
|
"kpiType": 1724219649867,
|
||||||
"stockPropertyCapacityUnit": 1730702814870,
|
"stockPropertyCapacityUnit": 1730702814870,
|
||||||
"stockSupplier": 1726125558988,
|
"stockSupplier": 1726125558988,
|
||||||
@ -3350,10 +3548,10 @@
|
|||||||
"reservationProperty": 1723709147913,
|
"reservationProperty": 1723709147913,
|
||||||
"shopModule": 1729133328828,
|
"shopModule": 1729133328828,
|
||||||
"propertyType": 1733355385694,
|
"propertyType": 1733355385694,
|
||||||
"merchantPushConfig": 1734622498426,
|
"merchantPushConfig": 1734703771475,
|
||||||
"tagType": 1724143703296,
|
"tagType": 1724143703296,
|
||||||
"userRankingConfig": 1723709148243,
|
"userRankingConfig": 1723709148243,
|
||||||
"profitConfig": 1734622498426,
|
"profitConfig": 1734703771475,
|
||||||
"mallItemAttribute": 1733356038072,
|
"mallItemAttribute": 1733356038072,
|
||||||
"stockConfig": 1723795631389,
|
"stockConfig": 1723795631389,
|
||||||
"department": 1723709546004,
|
"department": 1723709546004,
|
||||||
@ -3364,7 +3562,7 @@
|
|||||||
"channelCommissionConfig": 1724037860562,
|
"channelCommissionConfig": 1724037860562,
|
||||||
"stockType": 1724038466165,
|
"stockType": 1724038466165,
|
||||||
"cardType": 1732174899402,
|
"cardType": 1732174899402,
|
||||||
"weComGroup": 1734622498426,
|
"weComGroup": 1734703771475,
|
||||||
"classifyType": 1724140192413,
|
"classifyType": 1724140192413,
|
||||||
"stockFactory": 1726125558988,
|
"stockFactory": 1726125558988,
|
||||||
"thdApplication": 1733354225465,
|
"thdApplication": 1733354225465,
|
||||||
@ -3381,4 +3579,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{ "databaseName": "hlk_touch_test_init", "data": [] }
|
||||||
]
|
]
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
116
sethlk.spec.js
116
sethlk.spec.js
@ -1,5 +1,5 @@
|
|||||||
import puppeteer from 'puppeteer';
|
import puppeteer from 'puppeteer';
|
||||||
import { read, readFileSync } from 'fs';
|
import { readFileSync } from 'fs';
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
// 读取 JSON 文件
|
// 读取 JSON 文件
|
||||||
@ -21,68 +21,13 @@ import { read, readFileSync } from 'fs';
|
|||||||
}, localStorageData);
|
}, localStorageData);
|
||||||
console.log('set localStorage success');
|
console.log('set localStorage success');
|
||||||
|
|
||||||
// const cookie = JSON.parse(readFileSync('cookie.json', 'utf8'));
|
|
||||||
// await page.setCookie(...cookie);
|
|
||||||
// console.log('cookie', cookie);
|
|
||||||
|
|
||||||
// console.log(JSON.stringify(jsonData, null, 2));
|
|
||||||
|
|
||||||
page.on('console', (msg) => {
|
|
||||||
for (let i = 0; i < msg.args().length; ++i) {
|
|
||||||
console.log(`${msg.args()[i]}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// await page.evaluate((jsonData) => {
|
|
||||||
// // 打开 IndexedDB 数据库
|
|
||||||
// const openRequest = indexedDB.open('hlk_touch_test_14920', 2);
|
|
||||||
|
|
||||||
// // 处理数据库版本升级
|
|
||||||
// openRequest.onupgradeneeded = (event) => {
|
|
||||||
// const db = event.target.result;
|
|
||||||
// // 创建对象存储,如果不存在的话
|
|
||||||
// if (!db.objectStoreNames.contains('keyvaluepairs')) {
|
|
||||||
// db.createObjectStore('keyvaluepairs');
|
|
||||||
// }
|
|
||||||
// if (!db.objectStoreNames.contains('local-forage-detect-blob-support')) {
|
|
||||||
// db.createObjectStore('local-forage-detect-blob-support');
|
|
||||||
// }
|
|
||||||
// };
|
|
||||||
|
|
||||||
// openRequest.onsuccess = (event) => {
|
|
||||||
// const db = event.target.result;
|
|
||||||
// const transaction = db.transaction(['keyvaluepairs'], 'readwrite');
|
|
||||||
// const objectStore = transaction.objectStore('keyvaluepairs'); // 使用硬编码的存储名
|
|
||||||
// console.log(jsonData[0].value);
|
|
||||||
|
|
||||||
// console.log('jsonData.length', jsonData.length);
|
|
||||||
|
|
||||||
// for (let i = 0; i < jsonData.length; i++) {
|
|
||||||
// const addObject = objectStore.put(jsonData[i].value, jsonData[i].key);
|
|
||||||
// addObject.onsuccess = (event) => {
|
|
||||||
// console.log('数据添加成功');
|
|
||||||
// };
|
|
||||||
// addObject.onerror = (event) => {
|
|
||||||
// console.error('数据添加失败:', event.target.error);
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 事务错误处理
|
|
||||||
// transaction.onerror = (event) => {
|
|
||||||
// console.error('事务失败:', event.target.error);
|
|
||||||
// };
|
|
||||||
// };
|
|
||||||
|
|
||||||
// // 错误处理
|
|
||||||
// openRequest.onerror = (event) => {
|
|
||||||
// console.error('数据库打开失败:', event.target.error);
|
|
||||||
// };
|
|
||||||
// }, jsonData); // 将 jsonData 传递到浏览器上下文中
|
|
||||||
|
|
||||||
await page.evaluate((jsonData) => {
|
await page.evaluate((jsonData) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
// 使用 async 函数来处理异步操作
|
||||||
|
const processDatabase = async (database) => {
|
||||||
|
try {
|
||||||
// 打开 IndexedDB 数据库
|
// 打开 IndexedDB 数据库
|
||||||
const openRequest = indexedDB.open('hlk_touch_test_14920', 2);
|
const openRequest = indexedDB.open(database.databaseName, 2);
|
||||||
|
|
||||||
// 处理数据库版本升级
|
// 处理数据库版本升级
|
||||||
openRequest.onupgradeneeded = (event) => {
|
openRequest.onupgradeneeded = (event) => {
|
||||||
@ -96,40 +41,44 @@ import { read, readFileSync } from 'fs';
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
openRequest.onsuccess = (event) => {
|
// 处理数据库打开成功
|
||||||
|
openRequest.onsuccess = async (event) => {
|
||||||
const db = event.target.result;
|
const db = event.target.result;
|
||||||
|
const table = database.data;
|
||||||
const transaction = db.transaction(['keyvaluepairs'], 'readwrite');
|
const transaction = db.transaction(['keyvaluepairs'], 'readwrite');
|
||||||
const objectStore = transaction.objectStore('keyvaluepairs'); // 使用硬编码的存储名
|
const objectStore = transaction.objectStore('keyvaluepairs'); // 使用硬编码的存储名
|
||||||
console.log(jsonData[0].value);
|
console.log(table.value);
|
||||||
|
|
||||||
console.log('jsonData.length', jsonData.length);
|
|
||||||
|
|
||||||
let completedOperations = 0;
|
let completedOperations = 0;
|
||||||
const totalOperations = jsonData.length;
|
const totalOperations = table.length;
|
||||||
|
|
||||||
for (let i = 0; i < jsonData.length; i++) {
|
|
||||||
const addObject = objectStore.put(jsonData[i].value, jsonData[i].key);
|
|
||||||
|
|
||||||
|
// 使用 Promise.all 来确保所有的写入操作完成
|
||||||
|
const writeOperations = table.map((item, index) => {
|
||||||
|
return new Promise((innerResolve, innerReject) => {
|
||||||
|
const addObject = objectStore.put(item.value, item.key);
|
||||||
addObject.onsuccess = () => {
|
addObject.onsuccess = () => {
|
||||||
console.log('数据添加成功', jsonData[i].key);
|
console.log('数据添加成功', item.key);
|
||||||
completedOperations++;
|
completedOperations++;
|
||||||
// 如果所有操作完成,调用 resolve
|
// 如果所有操作完成,调用 resolve
|
||||||
if (completedOperations === totalOperations) {
|
if (completedOperations === totalOperations) {
|
||||||
resolve('所有数据写入完成');
|
innerResolve('数据写入成功');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
addObject.onerror = (event) => {
|
addObject.onerror = (event) => {
|
||||||
console.error('数据添加失败:', event.target.error);
|
console.error('数据添加失败:', event.target.error);
|
||||||
reject('数据添加失败');
|
innerReject('数据添加失败');
|
||||||
};
|
};
|
||||||
}
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// 事务错误处理
|
// 等待所有写入操作完成
|
||||||
transaction.onerror = (event) => {
|
try {
|
||||||
console.error('事务失败:', event.target.error);
|
await Promise.all(writeOperations);
|
||||||
reject('事务失败');
|
console.log('所有数据写入完成');
|
||||||
};
|
resolve('所有数据写入完成');
|
||||||
|
} catch (error) {
|
||||||
|
reject('数据写入失败');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 错误处理
|
// 错误处理
|
||||||
@ -137,11 +86,22 @@ import { read, readFileSync } from 'fs';
|
|||||||
console.error('数据库打开失败:', event.target.error);
|
console.error('数据库打开失败:', event.target.error);
|
||||||
reject('数据库打开失败');
|
reject('数据库打开失败');
|
||||||
};
|
};
|
||||||
|
} catch (error) {
|
||||||
|
reject('数据库操作失败: ' + error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 遍历所有数据库
|
||||||
|
Promise.all(jsonData.map((database) => processDatabase(database)))
|
||||||
|
.then(() => resolve('所有数据库操作完成'))
|
||||||
|
.catch((error) => reject('操作失败: ' + error));
|
||||||
});
|
});
|
||||||
}, jsonData); // 将 jsonData 传递到浏览器上下文中
|
}, jsonData); // 将 jsonData 传递到浏览器上下文中
|
||||||
|
|
||||||
console.log('end');
|
console.log('end');
|
||||||
|
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
||||||
|
|
||||||
await page.goto('https://hlk.meiguanjia.net');
|
await page.goto('https://hlk.meiguanjia.net');
|
||||||
|
|
||||||
// await
|
// await
|
||||||
|
|||||||
@ -62,47 +62,58 @@ import { resolve } from 'path';
|
|||||||
|
|
||||||
// 获取浏览器中的 IndexedDB 数据
|
// 获取浏览器中的 IndexedDB 数据
|
||||||
const result = await page.evaluate(async () => {
|
const result = await page.evaluate(async () => {
|
||||||
return new Promise((resolve, reject) => {
|
const databases = await indexedDB.databases();
|
||||||
const request = indexedDB.open('hlk_touch_test_14920');
|
const allData = [];
|
||||||
|
|
||||||
|
for (const db of databases) {
|
||||||
|
const databaseName = db.name;
|
||||||
|
|
||||||
|
// 打开数据库
|
||||||
|
const request = indexedDB.open(databaseName);
|
||||||
|
|
||||||
|
const databaseData = await new Promise((resolve, reject) => {
|
||||||
request.onsuccess = (event) => {
|
request.onsuccess = (event) => {
|
||||||
const db = event.target.result;
|
const db = event.target.result;
|
||||||
const transaction = db.transaction(db.objectStoreNames, 'readonly');
|
const transaction = db.transaction(db.objectStoreNames, 'readonly');
|
||||||
|
|
||||||
const objectStore = transaction.objectStore(db.objectStoreNames[0]);
|
const objectStore = transaction.objectStore(db.objectStoreNames[0]);
|
||||||
const cursorRequest = objectStore.openCursor();
|
const cursorRequest = objectStore.openCursor();
|
||||||
|
|
||||||
const allData = [];
|
const storeData = [];
|
||||||
|
|
||||||
cursorRequest.onsuccess = (event) => {
|
cursorRequest.onsuccess = (event) => {
|
||||||
const cursor = event.target.result;
|
const cursor = event.target.result;
|
||||||
if (cursor) {
|
if (cursor) {
|
||||||
// console.log(cursor.key);
|
storeData.push({ key: cursor.key, value: cursor.value });
|
||||||
// console.log(JSON.stringify(value));
|
|
||||||
const key = cursor.key;
|
|
||||||
const value = cursor.value;
|
|
||||||
|
|
||||||
allData.push({ key, value });
|
|
||||||
|
|
||||||
cursor.continue();
|
cursor.continue();
|
||||||
} else {
|
} else {
|
||||||
resolve(allData);
|
resolve(storeData); // 执行 resolve,返回数据
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cursorRequest.onerror = (event) => {
|
||||||
|
reject(event.target.error); // 发生错误时 reject
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
request.onerror = (event) => {
|
request.onerror = (event) => {
|
||||||
reject(event.target.error);
|
reject(event.target.error); // 发生错误时 reject
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 将数据库数据存入 allData
|
||||||
|
allData.push({
|
||||||
|
databaseName,
|
||||||
|
data: databaseData,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return allData;
|
||||||
});
|
});
|
||||||
// console.log(result);
|
|
||||||
// const cookie = await page.cookies();
|
|
||||||
// fs.writeFileSync('./cookie.json', JSON.stringify(cookie));
|
|
||||||
const localStorageData = await page.evaluate(() => {
|
const localStorageData = await page.evaluate(() => {
|
||||||
return JSON.stringify(localStorage); // 将 localStorage 转换为对象
|
return JSON.stringify(localStorage); // 将 localStorage 转换为对象
|
||||||
});
|
});
|
||||||
fs.writeFileSync('./localStorage.json', localStorageData);
|
|
||||||
fs.writeFileSync('./indexedDB.json', JSON.stringify(result));
|
fs.writeFileSync('./indexedDB.json', JSON.stringify(result));
|
||||||
|
fs.writeFileSync('./localStorage.json', localStorageData);
|
||||||
}
|
}
|
||||||
|
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user