@palerock/exam-qa 1.0.4 → 1.0.6-patch1

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.
@@ -0,0 +1,480 @@
1
+ {
2
+ "title": "Salesforce-Certified-Platform-Developer-1-[Set-7]",
3
+ "category": "Salesforce Dev 1",
4
+ "questions": [
5
+ {
6
+ "describe": "How should a developer make sure that a child record on a custom object, with a lookup to the Account object, has the same sharing access as its associated account?",
7
+ "answerOptions": [
8
+ {
9
+ "isRight": false,
10
+ "describe": "Include the sharing related list on the custom object page layout."
11
+ },
12
+ {
13
+ "isRight": true,
14
+ "describe": "Ensure that the relationship between the objects is Master-Detail."
15
+ },
16
+ {
17
+ "isRight": false,
18
+ "describe": "Create a validation rule on the custom object comparing the record owners on both records."
19
+ },
20
+ {
21
+ "isRight": false,
22
+ "describe": "Create a Sharing Rule comparing the custom object owner to the account owner."
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "describe": "A developer needs to test an Invoicing system integration. After reviewing the number of transactions required for the test, the developer estimates that the test data will total about 2 GB of data storage. Production data is not required for the integration testing.\nWhich two environments meet the requirements for testing?\nChoose 2 answers",
28
+ "answerOptions": [
29
+ {
30
+ "isRight": false,
31
+ "describe": "Developer Pro Sandbox"
32
+ },
33
+ {
34
+ "isRight": true,
35
+ "describe": "Partial Sandbox"
36
+ },
37
+ {
38
+ "isRight": true,
39
+ "describe": "Full Sandbox"
40
+ },
41
+ {
42
+ "isRight": false,
43
+ "describe": "Developer Sandbox"
44
+ },
45
+ {
46
+ "isRight": false,
47
+ "describe": "Developer Edition"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "describe": "Which two number expressions evaluate correctly?\nChoose 2 answers",
53
+ "answerOptions": [
54
+ {
55
+ "isRight": true,
56
+ "describe": "Decimal d = 3.14159;"
57
+ },
58
+ {
59
+ "isRight": false,
60
+ "describe": "Long I = 3.14159;"
61
+ },
62
+ {
63
+ "isRight": false,
64
+ "describe": "Double d = 3.14159;"
65
+ },
66
+ {
67
+ "isRight": false,
68
+ "describe": "Integer i= 3.14159;"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "describe": "A developer needs to create a Visualforce page that displays Case data. The page will be used by both support reps and support managers. The Support Rep profile does not allow visibility of the Customer_Satisfaction__c field, but the Support Manager profile does.\nHow can the developer create the page to enforce Field Level Security and keep future maintenance to a minimum?",
74
+ "answerOptions": [
75
+ {
76
+ "isRight": false,
77
+ "describe": "Use a new Support Manager permission set."
78
+ },
79
+ {
80
+ "isRight": true,
81
+ "describe": "Use a custom controller that has the with sharing keywords."
82
+ },
83
+ {
84
+ "isRight": false,
85
+ "describe": "Create a separate Visualforce Page for each profile."
86
+ },
87
+ {
88
+ "isRight": false,
89
+ "describe": "Create one Visualforce Page for use by both profiles."
90
+ }
91
+ ]
92
+ },
93
+ {
94
+ "describe": "Before putting an app into production, which step should be taken?",
95
+ "answerOptions": [
96
+ {
97
+ "isRight": false,
98
+ "describe": "Scale your Dynos."
99
+ },
100
+ {
101
+ "isRight": false,
102
+ "describe": "Insure that you have installed a performance introspection add-on."
103
+ },
104
+ {
105
+ "isRight": false,
106
+ "describe": "Switch to a production database."
107
+ },
108
+ {
109
+ "isRight": true,
110
+ "describe": "Run the Production Check feature via the web interface"
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "describe": "A Platform Developer needs to write an Apex method that will only perform an action if a record is assigned to a specific Record Type.\nWhich two options allow the developer to dynamically determine the ID of the required Record Type by its name? Choose 2 answers",
116
+ "answerOptions": [
117
+ {
118
+ "isRight": true,
119
+ "describe": "Use the getRecordTypeInfosByName() method in the DescribeSObjectResult class."
120
+ },
121
+ {
122
+ "isRight": false,
123
+ "describe": "Make an outbound web services call to the SOAP API."
124
+ },
125
+ {
126
+ "isRight": false,
127
+ "describe": "Hardcode the ID as a constant in an Apex class."
128
+ },
129
+ {
130
+ "isRight": true,
131
+ "describe": "Execute a SOQL query on the RecordType object."
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ "describe": "What are two valid options for iterating through each Account in the collection List<Account> named AccountList?\nChoose 2 answers",
137
+ "answerOptions": [
138
+ {
139
+ "isRight": false,
140
+ "describe": "for (List L : AccountList) {...}"
141
+ },
142
+ {
143
+ "isRight": true,
144
+ "describe": "for (Account theAccount : AccountList) {...}"
145
+ },
146
+ {
147
+ "isRight": false,
148
+ "describe": "for (AccountList) {...}"
149
+ },
150
+ {
151
+ "isRight": true,
152
+ "describe": "for (Integer i=0; i < AccountList. Size 0 ; i++){...}"
153
+ }
154
+ ]
155
+ },
156
+ {
157
+ "describe": "What are three characteristics of static methods? Choose 3 answers",
158
+ "answerOptions": [
159
+ {
160
+ "isRight": true,
161
+ "describe": "Initialized only when a class is loaded"
162
+ },
163
+ {
164
+ "isRight": false,
165
+ "describe": "A static variable is available outside of the scope of an Apex transaction"
166
+ },
167
+ {
168
+ "isRight": true,
169
+ "describe": "Allowed only in outer classes"
170
+ },
171
+ {
172
+ "isRight": false,
173
+ "describe": "Allowed only in inner classes"
174
+ },
175
+ {
176
+ "isRight": true,
177
+ "describe": "Excluded from the view state for a Visualforce page"
178
+ }
179
+ ]
180
+ },
181
+ {
182
+ "describe": "The operation manager at a construction company uses a custom object called Machinery to manage the usage and of maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different construction jobs, and track the dates and costs associated with each job. More than one piece of machinery can be assigned to one construction job.\nWhat should a developer do to meet these requirements?",
183
+ "answerOptions": [
184
+ {
185
+ "isRight": false,
186
+ "describe": "Create a lookup field on the Machinery object to the Construction Job object."
187
+ },
188
+ {
189
+ "isRight": false,
190
+ "describe": "Create a Master-Detail Lookup on the Machinery object to the Construction Job object."
191
+ },
192
+ {
193
+ "isRight": true,
194
+ "describe": "Create a junction object with Master-Detail Relationship to both the Machinery object and the Construction Job object."
195
+ },
196
+ {
197
+ "isRight": false,
198
+ "describe": "Create a lookup field on the Construction Job object to the Machinery object."
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ "describe": "What should a developer use to implement an automatic Approval Process submission for Cases?",
204
+ "answerOptions": [
205
+ {
206
+ "isRight": false,
207
+ "describe": "Scheduled Apex"
208
+ },
209
+ {
210
+ "isRight": false,
211
+ "describe": "A Workflow Rule"
212
+ },
213
+ {
214
+ "isRight": true,
215
+ "describe": "Process Builder"
216
+ },
217
+ {
218
+ "isRight": false,
219
+ "describe": "An Assignment Rule"
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ "describe": "Which two platform features align to the Controller portion of MVC architecture? Choose 2 answers",
225
+ "answerOptions": [
226
+ {
227
+ "isRight": true,
228
+ "describe": "Workflow rules"
229
+ },
230
+ {
231
+ "isRight": false,
232
+ "describe": "Date fields"
233
+ },
234
+ {
235
+ "isRight": true,
236
+ "describe": "Process Builder actions"
237
+ },
238
+ {
239
+ "isRight": false,
240
+ "describe": "Standard objects"
241
+ }
242
+ ]
243
+ },
244
+ {
245
+ "describe": "A developer working on a time management application wants to make total hours for each timecard available to application users. A timecard entry has a Master-Detail relationship to a timecard.\nWhich approach should the developer use to accomplish this declaratively?",
246
+ "answerOptions": [
247
+ {
248
+ "isRight": false,
249
+ "describe": "A Process Builder process that updates a field on the timecard when a timecard entry is created"
250
+ },
251
+ {
252
+ "isRight": false,
253
+ "describe": "A Visualforce page that calculates the total number of hours for a timecard and displays it on the page"
254
+ },
255
+ {
256
+ "isRight": true,
257
+ "describe": "A Roll-Up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard"
258
+ },
259
+ {
260
+ "isRight": false,
261
+ "describe": "An Apex trigger that uses an Aggregate Query to calculate the hours for a given timecard and stores it in a custom field"
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "describe": "Which three options can be accomplished with formula fields? Choose 3 answers",
267
+ "answerOptions": [
268
+ {
269
+ "isRight": false,
270
+ "describe": "Return and display a field value from another object using the VLOOKUP function."
271
+ },
272
+ {
273
+ "isRight": false,
274
+ "describe": "Display the previous value for a field using the PRIORVALUE function."
275
+ },
276
+ {
277
+ "isRight": true,
278
+ "describe": "Generate a link using the HYPERLINK function to a specific record."
279
+ },
280
+ {
281
+ "isRight": true,
282
+ "describe": "Determine which of three different images to display using the IF function."
283
+ },
284
+ {
285
+ "isRight": true,
286
+ "describe": "Determine if a datetime field value has passed using the NOW function."
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "describe": "Why would a developer consider using a custom controller over a controller extension?",
292
+ "answerOptions": [
293
+ {
294
+ "isRight": true,
295
+ "describe": "To implement all of the logic for a page and bypass default Salesforce functionality"
296
+ },
297
+ {
298
+ "isRight": false,
299
+ "describe": "To enforce user sharing settings and permissions"
300
+ },
301
+ {
302
+ "isRight": false,
303
+ "describe": "To increase the SOQL query governor limits"
304
+ },
305
+ {
306
+ "isRight": false,
307
+ "describe": "To leverage built-in functionality of a standard controller"
308
+ }
309
+ ]
310
+ },
311
+ {
312
+ "describe": "How should a developer avoid hitting the governor limits in test methods?",
313
+ "answerOptions": [
314
+ {
315
+ "isRight": false,
316
+ "describe": "Use @IsTest (SeeAliData=true) to use existing data."
317
+ },
318
+ {
319
+ "isRight": true,
320
+ "describe": "Use Test. startTest() to reset governor limits."
321
+ },
322
+ {
323
+ "isRight": false,
324
+ "describe": "Use Test.loadData() to load data from a static resource."
325
+ },
326
+ {
327
+ "isRight": false,
328
+ "describe": "Use @Testvisible on methods that create records."
329
+ }
330
+ ]
331
+ },
332
+ {
333
+ "describe": "A developer is asked to set a picklist field to 'Monitor' on any new Leads owned by a subset of Users.\nHow should the developer implement this request?",
334
+ "answerOptions": [
335
+ {
336
+ "isRight": false,
337
+ "describe": "Create an after insert Lead trigger."
338
+ },
339
+ {
340
+ "isRight": false,
341
+ "describe": "Create a before insert Lead trigger."
342
+ },
343
+ {
344
+ "isRight": false,
345
+ "describe": "Create a Lead formula field."
346
+ },
347
+ {
348
+ "isRight": true,
349
+ "describe": "Create a Lead Workflow Rule Field Update."
350
+ }
351
+ ]
352
+ },
353
+ {
354
+ "describe": "A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension.\nThe Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?",
355
+ "answerOptions": [
356
+ {
357
+ "isRight": true,
358
+ "describe": "standardController=\"Case\" and extensions=\"myControllerExtension\""
359
+ },
360
+ {
361
+ "isRight": false,
362
+ "describe": "extensions=\"myControllerExtension\""
363
+ },
364
+ {
365
+ "isRight": false,
366
+ "describe": "controller=\"myControllerExtension\""
367
+ },
368
+ {
369
+ "isRight": false,
370
+ "describe": "controller=\"Case\" and extensions=\"myControllerExtension\""
371
+ }
372
+ ]
373
+ },
374
+ {
375
+ "describe": "When should an Apex Trigger be required instead of a Process Builder Process?",
376
+ "answerOptions": [
377
+ {
378
+ "isRight": false,
379
+ "describe": "When multiple records related to the triggering record need to be updated"
380
+ },
381
+ {
382
+ "isRight": false,
383
+ "describe": "When a record needs to be created"
384
+ },
385
+ {
386
+ "isRight": true,
387
+ "describe": "When an action needs to be taken on a delete or undelete, or before a DML operation is executed"
388
+ },
389
+ {
390
+ "isRight": false,
391
+ "describe": "When a post to Chatter needs to be created"
392
+ }
393
+ ]
394
+ },
395
+ {
396
+ "describe": "A developer has the controller class below:\npublic with sharing class myFooController{\npublic integer prop { get; private set;}\n}\nWhich code block will run successfully in an execute anonymous window?",
397
+ "answerOptions": [
398
+ {
399
+ "isRight": true,
400
+ "describe": "myFooController m = new myFooController();\nSystem.assert(m.prop ==null);"
401
+ },
402
+ {
403
+ "isRight": false,
404
+ "describe": "myFooController m = new myFooController();\nSystem.assert(m.prop==1);"
405
+ },
406
+ {
407
+ "isRight": false,
408
+ "describe": "myFooController m = new myFooController();\nSystem.assert(m.prop ==0);"
409
+ },
410
+ {
411
+ "isRight": false,
412
+ "describe": "myFooController m = new myFooController();\nSystem.assert(m.prop !=null);"
413
+ }
414
+ ]
415
+ },
416
+ {
417
+ "describe": "A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown.\nWhat step should the developer take to resolve the issue and properly test the exception?",
418
+ "answerOptions": [
419
+ {
420
+ "isRight": false,
421
+ "describe": "Use database methods with all or none set to FALSE."
422
+ },
423
+ {
424
+ "isRight": false,
425
+ "describe": "Use try/catch within the unit test to catch the exception."
426
+ },
427
+ {
428
+ "isRight": false,
429
+ "describe": "Use the finally block within the unit test to populate the exception."
430
+ },
431
+ {
432
+ "isRight": true,
433
+ "describe": "Use Test. isRunningTest () within the custom controller."
434
+ }
435
+ ]
436
+ },
437
+ {
438
+ "describe": "A newly hired developer discovers that there are multiple triggers on the case object.\nWhat should the developer consider when working with triggers?",
439
+ "answerOptions": [
440
+ {
441
+ "isRight": false,
442
+ "describe": "Developers must dictate the order of trigger execution."
443
+ },
444
+ {
445
+ "isRight": false,
446
+ "describe": "Unit tests must specify the trigger being tested."
447
+ },
448
+ {
449
+ "isRight": true,
450
+ "describe": "Trigger execution order is not guaranteed for the same sObject."
451
+ },
452
+ {
453
+ "isRight": false,
454
+ "describe": "Trigger execution order is based on creation date and time."
455
+ }
456
+ ]
457
+ },
458
+ {
459
+ "describe": "Which approach should a developer take to automatically add a \"Maintenance Plan\" to each Opportunity that includes an \"Annual Subscription\" when an opportunity is closed?",
460
+ "answerOptions": [
461
+ {
462
+ "isRight": false,
463
+ "describe": "Build an Opportunity trigger that adds a PriceBookEntry record."
464
+ },
465
+ {
466
+ "isRight": false,
467
+ "describe": "Build an OpportunityLineltem trigger to add an OpportunityLineltem record."
468
+ },
469
+ {
470
+ "isRight": false,
471
+ "describe": "Build a OpportunityLineltem trigger that adds a PriceBookEntry record."
472
+ },
473
+ {
474
+ "isRight": true,
475
+ "describe": "Build an Opportunity trigger to add an OpportunityLineltem record."
476
+ }
477
+ ]
478
+ }
479
+ ]
480
+ }
package/lib-json/map.json CHANGED
@@ -9,6 +9,13 @@
9
9
  "Salesforce-Admin(302)-[Set-7].json",
10
10
  "Salesforce-Admin(302)-[Set-8].json",
11
11
  "Salesforce-Admin(302)-[Set-9].json",
12
+ "Salesforce-Certified-Platform-Developer-1-[Set-1].json",
13
+ "Salesforce-Certified-Platform-Developer-1-[Set-2].json",
14
+ "Salesforce-Certified-Platform-Developer-1-[Set-3].json",
15
+ "Salesforce-Certified-Platform-Developer-1-[Set-4].json",
16
+ "Salesforce-Certified-Platform-Developer-1-[Set-5].json",
17
+ "Salesforce-Certified-Platform-Developer-1-[Set-6].json",
18
+ "Salesforce-Certified-Platform-Developer-1-[Set-7].json",
12
19
  "Salesforce-Sales-Cloud-Certification(81)-[Set-1].json",
13
20
  "Salesforce-Sales-Cloud-Certification(81)-[Set-2].json",
14
21
  "Salesforce-Sales-Cloud-Certification(81)-[Set-3].json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palerock/exam-qa",
3
- "version": "1.0.4",
3
+ "version": "1.0.6-patch1",
4
4
  "description": "A Vue.js project",
5
5
  "author": "ryan <1184518756@qq.com>",
6
6
  "scripts": {
@@ -1,2 +0,0 @@
1
- webpackJsonp([1],{"+c27":function(t,e){},"/E+L":function(t,e){},"3wLQ":function(t,e){},"4rJS":function(t,e){},"6WHU":function(t,e){},"97dx":function(t,e){},JKiR:function(t,e){},NAlg:function(t,e){},NHnr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n("7+uW"),r={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("transition",{attrs:{name:this.direction}},[e("router-view",{staticClass:"appView"})],1)],1)},staticRenderFns:[]};var o=n("VU/8")({name:"App",data:function(){return{direction:"slide-right"}},watch:{$route:function(t,e){var n=t.path.split("/").length,i=e.path.split("/").length;"/"===t.path?this.direction="slide-right":"/"===e.path?this.direction="slide-left":this.direction=n<i?"slide-right":"slide-left"}}},r,!1,function(t){n("u1TY")},null,null).exports,s=n("/ocq"),a=(n("FO5P"),n("woHG")),u=(n("RgoE"),n("0KWt")),c=(n("1E9F"),n("2Ux5")),l=n("L8Ge"),h=n.n(l),f=n("pDAi"),p=n.n(f),m=n("rXUV"),d=n.n(m),v=n("0VsM"),g=n.n(v),y=n("4vMe"),b=n.n(y),w=n("6Cj1"),x=n.n(w),k=n("49HJ"),C=n.n(k),_=n("Yo5Z"),q=n.n(_),E=n("7U2N"),S=n.n(E),I=n("Tg6C"),A=n.n(I),R=n("GiJQ"),D=n.n(R),O=n("/xtf"),N=n.n(O),T=n("crjn"),H=n.n(T),L=n("s1qc"),P=n.n(L),M=n("6qwz"),B=n.n(M),Q=n("0VlM"),j=n.n(Q),F=(n("cZ0s"),n("fIxc")),W=(n("RIEG"),n("zjGD")),U=(n("YP+l"),n("EA31")),$=(n("sgvh"),n("zc1Q")),z=(n("mMXg"),n("qYlo")),V=(n("3Lne"),n("SSsa")),J=(n("MY4N"),n("0zAV")),Z=(n("OWWB"),n("1fWZ")),G=(n("i0mo"),n("Hkar")),Y=(n("XmAh"),n("il3B")),K=n("IG2y"),X=n.n(K),tt=n("ckt0"),et=n.n(tt);function nt(t,e){var n=x()(t);if(b.a){var i=b()(t);e&&(i=i.filter(function(e){return g()(t,e).enumerable})),n.push.apply(n,i)}return n}var it={getHashCode:function(t){return this.getStrHashCode(this.getMessage(t).concat(this.getPropertyNames(t)).join(""))},getPropertyNames:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return n<=0?"":!t||["string","number","boolean","function"].includes(et()(t))||t instanceof Date?"":this.flat(q()(t).map(function(t){var i=C()(t,2),r=i[0],o=i[1];return[r,e.getPropertyNames(o,n--)]})).filter(function(t){return null!=t&&""!==t})},getMessage:function(t,e){var n=this;return null==e&&(e=10),e<=0?"":!t||["string","number","boolean","function"].includes(et()(t))||t instanceof Date?[null!=t?t.toString():""]:this.flat(x()(t).map(function(i){return n.getMessage(t[i],e--)})).filter(function(t){return null!=t&&""!==t})},getStrHashCode:function(t){var e,n,i=0;if(0===t.length)return i;for(e=0,n=t.length;e<n;e++)i=(i<<5)-i+t.charCodeAt(e),i|=0;return i+""},flat:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=[],i=!1;return t.forEach(function(t){X()(t)?(i=!0,n.push.apply(n,P()(t))):n.push(t)}),i&&e>0?this.flat(n,e--):n},fromEntries:function(t){var e={};return t.forEach(function(t){t instanceof Array&&(e[t[0]]=t[1])}),e},storage:{getItem:function(t){var e=localStorage.getItem("__exam_s0_"+t),n=null;try{n=JSON.parse(e)}catch(e){console.log("No valid item for key [".concat(t,"] to get in storage."))}return n},setItem:function(t,e){var n=null;try{n=N()(e),localStorage.setItem("__exam_s0_"+t,n)}catch(e){console.log("Not valid item for key [".concat(t,"] to set."))}},removeItem:function(t){localStorage.removeItem("__exam_s0_"+t)}},groupArray:function(t,e){var n=this,i=t.map(function(t){return{hashCode:n.getHashCode(t),item:t}});e instanceof Array||(e=[e]);var r={};return i.map(function(t){return{hashCode:t.hashCode,checkItem:Object.fromEntries(e.map(function(e){return[e,(t.item||{})[e]]}))}}).map(function(t){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nt(n,!0).forEach(function(e){j()(t,e,n[e])}):d.a?p()(t,d()(n)):nt(n).forEach(function(e){h()(t,e,g()(n,e))})}return t}({},t,{checkedHashCode:n.getHashCode(t.checkItem)})}).forEach(function(t){var e=r[t.checkedHashCode];e||(e=[]),e.push(i.find(function(e){return e.hashCode===t.hashCode}).item),r[t.checkedHashCode]=e}),S()(r)},duplicateRemoval:function(t){var e=t.map(function(t){return{item:t}});return this.groupArray(e,"item").map(function(t){return t[0].item})},randomSort:function(t){return t.sort(function(){return Math.random()-.5})}},rt=n("Kr0U"),ot=n.n(rt),st=n("EEoX"),at=n.n(st),ut=n("5WHX"),ct=n.n(ut),lt=n("mnGM"),ht=n.n(lt),ft=n("6DPD"),pt=n.n(ft),mt=n("OdJd"),dt=n.n(mt),vt=new(n("YwQ6").a)("_qa_db");vt.version(1).stores({config:"key, value, createDate, modifyDate",question:"hashCode, describe, type, createDate, modifyDate",bank:"hashCode, title, *questions, createDate, modifyDate",historyRecord:"relatedQuestion, rightTimes, errorTimes, maxTime, minTime, totalTime, createDate, modifyDate"}),vt.version(2).stores({bank:"hashCode, title, *questions, category, createDate, modifyDate"});var gt=vt.config,yt=vt.question,bt=vt.bank,wt=vt.historyRecord;function xt(t,e){var n=x()(t);if(b.a){var i=b()(t);e&&(i=i.filter(function(e){return g()(t,e).enumerable})),n.push.apply(n,i)}return n}function kt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xt(n,!0).forEach(function(e){j()(t,e,n[e])}):d.a?p()(t,d()(n)):xt(n).forEach(function(e){h()(t,e,g()(n,e))})}return t}var Ct=function(){function t(e,n){pt()(this,t),this.db=e,this.defaultEntry=n||{},this.db.hook("creating",function(t,e){e.createDate=ht()(),e.modifyDate=ht()()}),this.db.hook("updating",function(t,e,n){return t.modifiedDate=ht()(),n.createdDate||(t.createdDate=ht()()),console.log(kt({},t)),t})}return dt()(t,[{key:"upsert",value:function(){var t=D()(A.a.mark(function t(e){var n=this;return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e instanceof Array)){t.next=2;break}return t.abrupt("return",this.db.bulkPut(e.map(function(t){return kt({},n.defaultEntry,{},t)})));case 2:return t.abrupt("return",this.db.put(kt({},this.defaultEntry,{},e)));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"query",value:function(t){return this.db.where(t)}},{key:"queryByHashCode",value:function(t){return this.query("hashCode").equals(t).first()}},{key:"delete",value:function(){var t=D()(A.a.mark(function t(e){return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e instanceof Array)){t.next=2;break}return t.abrupt("return",this.db.bulkDelete(e));case 2:return t.abrupt("return",this.db.delete(e));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()}]),t}(),_t=function(t){function e(){return pt()(this,e),ot()(this,at()(e).call(this,gt,{value:null}))}return ct()(e,t),e}(Ct),qt=function(t){function e(){return pt()(this,e),ot()(this,at()(e).call(this,yt,{describe:"",type:"picklist"}))}return ct()(e,t),e}(Ct),Et=function(t){function e(){return pt()(this,e),ot()(this,at()(e).call(this,bt,{title:"",questions:[]}))}return ct()(e,t),e}(Ct),St=function(t){function e(){return pt()(this,e),ot()(this,at()(e).call(this,wt,{rightTimes:0,errorTimes:0,maxTime:0,minTime:0,totalTime:0}))}return ct()(e,t),dt()(e,[{key:"queryByHashCode",value:function(t){return this.query("relatedQuestion").equals(t).first()}},{key:"queryMany",value:function(t){return this.query("relatedQuestion").anyOf(t).toArray()}}]),e}(Ct),It=new _t,At=new qt,Rt=new Et,Dt=new St,Ot="1.0.4";function Nt(t,e){var n=x()(t);if(b.a){var i=b()(t);e&&(i=i.filter(function(e){return g()(t,e).enumerable})),n.push.apply(n,i)}return n}function Tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Nt(n,!0).forEach(function(e){j()(t,e,n[e])}):d.a?p()(t,d()(n)):Nt(n).forEach(function(e){h()(t,e,g()(n,e))})}return t}i.a.use(Y.a),i.a.use(J.a).use(Z.a).use(G.a),i.a.use(V.a),i.a.use(z.a),i.a.use(U.a).use($.a),i.a.use(F.a).use(W.a);var Ht={name:"HomeIndex",data:function(){return{isShowImporter:!1,isShowOption:!1,isFromOnline:!1,onlineLibs:[],onlineSelects:[],questionLib:"",examList:[],currentCategory:"",categories:[],optionInfo:{canReviewError:!0,canDoExam:!0,canClear:!0,hashCode:""}}},computed:{selectedLibs:function(){var t=this,e=this.onlineLibs.filter(function(e){return t.onlineSelects.includes(e.hashCode)}).map(function(t){return Tt({},t)});return e.forEach(function(t){delete t.hashCode}),e},inCategory:function(){return!!this.currentCategory}},methods:{doExam:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Rt.query("hashCode").equals(t).first().then(function(t){return B.a.all([t].concat(P()(t.questions.map(function(t){return At.query("hashCode").equals(t).first()}))))}).then(function(t){var i=H()(t),r=i[0],o=i.slice(1);r.questions=o,r?e.$router.push({name:"DoExamPage",params:{examConfig:r,isReviewError:n}}):Y.a.alert({message:"该题库已失效!"})})},clearHistory:function(t){var e=this;Rt.queryByHashCode(t).then(function(t){return t=t||{},Dt.delete(t.questions||[])}).then(function(){console.log("remove the history."),e.isShowOption=!1,e.initExamList()})},showOption:function(t){t.hasHistoryError?(this.optionInfo.hashCode=t.hashCode,this.isShowOption=!0):this.doExam(t.hashCode)},selectLib:function(t){this.onlineSelects.includes(t.hashCode)?this.onlineSelects=this.onlineSelects.filter(function(e){return e!==t.hashCode}):this.onlineSelects=[].concat(P()(this.onlineSelects),[t.hashCode]),this.questionLib=N()(this.selectedLibs)},showImporter:function(){this.isShowImporter=!0,this.isFromOnline=!1},importFromExist:function(){var t=this;this.isFromOnline=!0,this.fetchOnlineLib().then(function(e){t.onlineLibs=e.filter(function(t){return t.data}).map(function(t){return Tt({},t.data,{hashCode:it.getHashCode(t.data)})})}).catch(function(e){console.log(e),alert("获取失败,请尝试自行录入"),t.isShowImporter=!1})},fetchOnlineLib:function(){var t=D()(A.a.mark(function t(){var e,n,i=this;return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.$http.get("../lib-json/map.json");case 2:if(t.t0=t.sent.data,t.t0){t.next=5;break}t.t0=[];case 5:return e=t.t0,n=e.map(function(t){return i.$http.get("../lib-json/"+t)}),t.abrupt("return",B.a.all(n));case 8:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),importLib:function(){var t=D()(A.a.mark(function t(){var e,n=this;return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!((e=JSON.parse(this.questionLib))instanceof Array)){t.next=7;break}return t.next=5,B.a.all(e.map(function(){var t=D()(A.a.mark(function t(e){return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.importSingleLib(e);case 2:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 5:t.next=9;break;case 7:return t.next=9,this.importSingleLib(e);case 9:t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),alert("题库格式错误:".concat(it.getMessage(t.t0)));case 14:return t.next=16,this.initExamList();case 16:this.isShowImporter=!1,this.questionLib="";case 18:case"end":return t.stop()}},t,this,[[0,11]])}));return function(){return t.apply(this,arguments)}}(),importSingleLib:function(){var t=D()(A.a.mark(function t(e){var n;return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.questions&&0!==e.questions.length){t.next=2;break}return t.abrupt("return",!1);case 2:return e.questions.forEach(function(t){t.hashCode=it.getHashCode(t)}),(n=Tt({},e,{questions:e.questions.map(function(t){return t.hashCode})})).hashCode=it.getHashCode(n),t.next=7,At.upsert(e.questions).then(function(){return Rt.upsert([n])});case 7:return t.abrupt("return",!0);case 8:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),intoCategory:function(){var t=D()(A.a.mark(function t(){var e,n=this,i=arguments;return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:"default",this.currentCategory=e,t.next=4,Rt.query("hashCode").notEqual("").toArray().then(function(t){var e=t.map(function(t){return Dt.query("relatedQuestion").anyOf(t.questions).sortBy("createDate").then(function(e){var n=Object.fromEntries(e.map(function(t){return[t.relatedQuestion,Tt({},t,{times:t.errorTimes})]})),i=!!S()(n).find(function(t){return t.times>0});return Tt({},t,{errorMap:n,hasHistoryError:i})})});return B.a.all(e)}).then(function(t){t=t.map(function(t){return t.category=t.category||"default",t}),n.examList=t.filter(function(t){return t.category===e})});case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),initExamList:function(){var t=D()(A.a.mark(function t(){var e=this;return A.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Rt.query("hashCode").notEqual("").toArray().then(function(t){t=t.map(function(t){return t.category=t.category||"default",t}),e.categories=t.reduce(function(t,e){return t.includes(e.category)||t.push(e.category),t},[])});case 2:this.currentCategory&&this.intoCategory(this.currentCategory);case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),syncDataToIndexDB:function(){var t=JSON.parse(N()(this.examList)).map(function(t){return Tt({},t,{bank:it.storage.getItem(t.hashCode)})}).map(function(t){return Tt({},t,{questionSet:t.bank.questions,bank:Tt({},t.bank,{hashCode:it.getHashCode(t.bank),questions:t.bank.questions.map(function(t){return it.getHashCode(t)})}),historyRecords:q()(t.errorMap).map(function(t){var e=C()(t,2),n=e[0],i=e[1],r=i.times;return{relatedQuestion:n,rightTimes:i.rightTimes,errorTimes:r}})})});At.upsert(it.flat(t.map(function(t){return t.questionSet.map(function(t){return Tt({},t,{hashCode:it.getHashCode(t)})})}),2)).then(function(){return Rt.upsert(t.map(function(t){return t.bank}))}).then(function(){return Dt.upsert(it.flat(t.map(function(t){return t.historyRecords}),2))}).then(function(){return It.upsert({key:"hasSync",value:!0})}).then(function(){console.log("sync success.")}).catch(function(t){console.log(t)})}},mounted:function(){this.initExamList()}},Lt={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.inCategory?n("van-grid",[n("van-grid-item",{attrs:{icon:"notes-o",clickable:""},on:{click:function(e){t.currentCategory=null}}},[n("div",{staticClass:"van-grid-item__text text-align-center",attrs:{slot:"text"},slot:"text"},[t._v("返回")])]),t._v(" "),t._l(t.examList,function(e){return n("van-grid-item",{key:e.hashCode,attrs:{icon:"notes-o",clickable:""},on:{click:function(n){return t.showOption(e)}}},[n("div",{staticClass:"van-grid-item__text text-align-center",attrs:{slot:"text"},slot:"text"},[t._v(t._s(e.title))])])})],2):n("van-grid",[n("van-grid-item",{attrs:{icon:"notes-o",clickable:""},on:{click:t.showImporter}},[n("div",{staticClass:"van-grid-item__text text-align-center",attrs:{slot:"text"},slot:"text"},[t._v("开始答题(导入)")])]),t._v(" "),t._l(t.categories,function(e){return n("van-grid-item",{key:e,attrs:{icon:"notes-o",clickable:""},on:{click:function(n){return t.intoCategory(e)}}},[n("div",{staticClass:"van-grid-item__text text-align-center",attrs:{slot:"text"},slot:"text"},[t._v(t._s(e))])])})],2),t._v(" "),n("van-popup",{model:{value:t.isShowImporter,callback:function(e){t.isShowImporter=e},expression:"isShowImporter"}},[n("div",{staticClass:"exam-import-box"},[t.isFromOnline?n("div",{staticStyle:{"max-height":"300px","overflow-y":"auto"}},[n("van-checkbox-group",{model:{value:t.onlineSelects,callback:function(e){t.onlineSelects=e},expression:"onlineSelects"}},[n("van-cell-group",t._l(t.onlineLibs,function(e,i){return n("van-cell",{key:i,attrs:{clickable:""},on:{click:function(n){return t.selectLib(e)}}},[n("template",{slot:"title"},[n("span",[t._v(t._s(e.title))])]),t._v(" "),n("van-checkbox",{attrs:{slot:"right-icon",name:e.hashCode},slot:"right-icon"})],2)}),1)],1)],1):t._e(),t._v(" "),t.isFromOnline?t._e():n("div",[n("van-cell-group",[n("van-field",{attrs:{label:"题库",type:"textarea",placeholder:"请输入题库",rows:"10"},model:{value:t.questionLib,callback:function(e){t.questionLib=e},expression:"questionLib"}})],1)],1),t._v(" "),n("div",[n("van-button",{attrs:{type:"info",size:"small",block:""},on:{click:t.importLib}},[t._v("导入题库")])],1),t._v(" "),n("div",{staticClass:"exam-m-top-small"},[n("van-button",{attrs:{type:"primary",size:"small",block:""},on:{click:t.importFromExist}},[t._v("获取在线题库")])],1)])]),t._v(" "),n("van-popup",{attrs:{position:"bottom"},model:{value:t.isShowOption,callback:function(e){t.isShowOption=e},expression:"isShowOption"}},[n("div",{},[n("van-button",{attrs:{type:"primary",block:""},on:{click:function(e){return t.doExam(t.optionInfo.hashCode)}}},[t._v("重新测试\n ")]),t._v(" "),n("van-button",{attrs:{type:"info",block:""},on:{click:function(e){return t.doExam(t.optionInfo.hashCode,!0)}}},[t._v("复习错题\n ")]),t._v(" "),n("van-button",{attrs:{type:"danger",block:""},on:{click:function(e){return t.clearHistory(t.optionInfo.hashCode)}}},[t._v("清空错题\n ")])],1)])],1)},staticRenderFns:[]};var Pt=n("VU/8")(Ht,Lt,!1,function(t){n("6WHU")},"data-v-1274651e",null).exports;i.a.use(V.a);var Mt={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("van-button",{attrs:{type:"default"}},[t._v("默认按钮")]),t._v(" "),n("van-button",{attrs:{type:"primary"}},[t._v("主要按钮")]),t._v(" "),n("van-button",{attrs:{type:"info"}},[t._v("信息按钮")]),t._v(" "),n("van-button",{attrs:{type:"warning"}},[t._v("警告按钮")]),t._v(" "),n("van-button",{attrs:{type:"danger"}},[t._v("危险按钮")])],1)},staticRenderFns:[]};n("VU/8")({name:"HelloWorld",data:function(){return{msg:"Welcome to Your Vue.js App"}}},Mt,!1,null,null,null).exports;i.a.use(a.a).use(u.a).use(c.a);var Bt={name:"HomePage",data:function(){return{activeTabIndex:0,pages:[{title:"主页",label:"Home",api:Pt,icon:"home-o"}]}},computed:{activePage:function(){return this.pages[this.activeTabIndex]||{}},version:function(){return Ot}}},Qt={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("van-nav-bar",{attrs:{title:t.activePage.label,fixed:""}}),t._v(" "),n("div",{staticClass:"is-relation"},[n(t.activePage.api,{tag:"component"}),t._v(" "),n("p",{staticClass:"text-align-center is-absolute",staticStyle:{color:"#efefef",width:"100%"}},[t._v(t._s(t.version))])],1),t._v(" "),n("van-tabbar",{model:{value:t.activeTabIndex,callback:function(e){t.activeTabIndex=e},expression:"activeTabIndex"}},t._l(t.pages,function(e,i){return n("van-tabbar-item",{key:i,attrs:{icon:e.icon}},[t._v(t._s(e.label))])}),1)],1)},staticRenderFns:[]};var jt=n("VU/8")(Bt,Qt,!1,function(t){n("zW/T")},"data-v-5c9e76e7",null).exports,Ft=(n("I4j4"),n("7fQT")),Wt=(n("le1z"),n("hZxG")),Ut=(n("HZGa"),n("pykS")),$t=(n("ZuV/"),n("37Xn")),zt=(n("JRZP"),n("LK01"));function Vt(t,e){var n=x()(t);if(b.a){var i=b()(t);e&&(i=i.filter(function(e){return g()(t,e).enumerable})),n.push.apply(n,i)}return n}function Jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Vt(n,!0).forEach(function(e){j()(t,e,n[e])}):d.a?p()(t,d()(n)):Vt(n).forEach(function(e){h()(t,e,g()(n,e))})}return t}i.a.use($t.a).use(zt.a),i.a.use(Y.a),i.a.use(F.a).use(W.a),i.a.use(Ut.a),i.a.use(Wt.a),i.a.use(Z.a).use(G.a);var Zt={required:!0,score:1,usingScore:!1,type:"option",describe:"Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?Do you love me?",answerOptions:[{api:"A",describe:"Yes",isRight:!0},{api:"B",describe:"No"}]},Gt={title:"试题测试",questions:[Zt]};i.a.use(a.a).use(Ft.a).use(V.a);var Yt={name:"DoExamPage",data:function(){return{answers:[],questionNum:0,isShowResult:!1,letterIndex:P()("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),examInfo:{},hasSubmit:!1,examHashCode:0,historyExams:[],showAcButtons:!1}},computed:{totalNum:function(){return this.questions.length},questions:function(){var t=this;return(this.examInfo.questions||[]).filter(function(e){return!t.isReviewError||t.historyErrorHashCodes.includes(e.hashCode)}).map(function(e,n){return Jt({},e,{active:n===t.questionNum})})},questionsInfo:function(){var t=this;return this.questions.map(function(e,n){return t.answers[n]||(t.answers[n]={results:[{}],single:{},multi:{apis:[]}}),Jt({},e,{answer:t.answers[n]||{},orderNum:n+1,isMulti:e.answerOptions.filter(function(t){return t.isRight}).length>1})})},historyErrorHashCodes:function(){return this.historyExams.filter(function(t){return t.errorTimes>0}).map(function(t){return t.hashCode})}},methods:{getQuestionTitle:function(t){return["(".concat(this.questionNum+1,"/").concat(this.totalNum,")"),t.describe].join(" ")},getQuestionDesc:function(t){var e="";t.required||(e+="(可选)"),"option"===t.type&&(t.isMulti?e+="多选题":e+="单选题");var n=this.historyExams.find(function(e){return e.hashCode===t.hashCode});if(n){this.isReviewError&&n.errorTimes&&(e+=" (做错次数: ".concat(n.errorTimes,")"));var i=n.errorTimes+n.rightTimes;i>0&&(e+="(历史正确率:".concat((n.rightTimes/i*100).toFixed(0),"%)"))}return e},setAnswer:function(t,e){this.answers=P()(this.answers).map(function(n,i){return i===t&&(n.results=e.map(function(t){return{api:t}}),n.single.api=e[0],n.multi.apis=e),n})},toggleAnswer:function(t,e){var n=this.answers[t].multi.apis;n.includes(e)?n=n.filter(function(t){return t!==e}):(n.push(e),n=P()(n)),this.setAnswer(t,n)},checkResult:function(t){var e=this;this.answers=P()(this.answers).map(function(n,i){if(t!==i&&null!=t)return n;var r=e.questions[i].answerOptions.filter(function(t){return t.isRight}).map(function(t){return t.api});return n.results.forEach(function(t){t.isMistake=!r.includes(t.api)}),n.isAnswered=n.results.filter(function(t){return t.api}).length>0,!n.isChecked&&n.isAnswered&&(n.isMistake=n.results.length!==r.length||!!n.results.find(function(t){return t.isMistake}),n.isPass=n.isAnswered&&!n.isMistake,n.isChecked=!0),n})},turnTo:function(t){this.questionNum=t},confirmSubmit:function(){var t=this;Y.a.confirm({title:"提交答案",message:"确认提交?"}).then(function(){t.submit()}).catch(function(t){console.log(t)})},submit:function(){this.checkResult();var t=this.questionsInfo.filter(function(t){return t.answer.isAnswered}).length;if(t<this.totalNum&&this.requireAllDone)Y.a.alert({message:"题目还没有答完:"+"".concat(t,"/").concat(this.totalNum)});else{var e=this.questionsInfo.filter(function(t){return t.answer.isPass}).length,n=e/this.totalNum*100+"%";this.questionsInfo.filter(function(t){return t.answer.isChecked}).forEach(function(t){Dt.queryByHashCode(t.hashCode).then(function(e){e||(e={relatedQuestion:t.hashCode,errorTimes:0}),t.answer.isPass?e.rightTimes++:e.errorTimes++,Dt.upsert(e).then(function(){console.log("做题信息已保存")})})}),this.isShowResult=!0,Y.a.alert({message:"答题结束,成绩如下:"+"正确:".concat(e,"(总共:").concat(this.totalNum,")(正确率:").concat(n,")")}),this.hasSubmit=!0}},adaptExamConfig:function(){var t=Jt({},Gt,{},this.examConfig);t.questions=t.questions.map(function(t){return Jt({},Zt,{},t,{hashCode:t.hashCode,answerOptions:t.answerOptions?t.answerOptions.map(function(t){return Jt({},t,{api:it.getHashCode(t)+""})}):[]})}).filter(function(t){if(!t.describe||0===t.answerOptions.length)return console.log("错误的题目(无描述或无答案).",t),!1;var e=it.groupArray(t.answerOptions,"isRight");if(1===e.length&&!e[0][0].isRight)return console.log("错误的题目(无正确答案).",t),!1;var n=it.groupArray(t.answerOptions,"describe").map(function(t){if(t.length>1){var e=Jt({},t[0]);return it.groupArray(t,"isRight").length!==t.length&&(e.invalid=!0),e}return t[0]});return n.find(function(t){return t.invalid})?(console.log("错误的题目(答案中有重复描述且对错不一).",t),!1):(t.answerOptions=it.randomSort(n),!0)}),t.questions=it.randomSort(t.questions),this.examInfo=t,this.examHashCode=this.examConfig.hashCode,this.loadHistoryExamInfo()},getOptionColor:function(t,e){return this.isShowResult||this.isPractice&&t.answer.isChecked?t.answer.results.map(function(t){return t.api}).includes(e.api)&&e.isRight?"#44af11":"#cd0000":"#1989fa"},loadHistoryExamInfo:function(){var t=this;Dt.queryMany(this.examConfig.questions.map(function(t){return t.hashCode})).then(function(e){t.historyExams=e.map(function(t){return Jt({},t,{hashCode:t.relatedQuestion})})})},swipe:function(t){switch(t.direction){case"Left":this.questionNum<this.totalNum-1&&this.turnTo(this.questionNum+1);break;case"Right":this.questionNum>0&&this.turnTo(this.questionNum-1);break;case"Up":this.showAcButtons=!1;break;case"Down":this.showAcButtons=!0}}},props:{examConfig:{type:Object,default:function(){return Gt}},isReviewError:{type:Boolean,default:!1},isNew:{type:Boolean,default:!1},requireAllDone:{type:Boolean,default:!1},isPractice:{type:Boolean,default:!0}},watch:{examConfig:function(){this.adaptExamConfig()}},mounted:function(){this.adaptExamConfig(),console.log("开始答题");try{plus.device.setWakelock(!0),console.log("打开屏幕常亮")}catch(t){}},destroyed:function(){console.log("结束答题");try{plus.device.setWakelock(!1),console.log("关闭屏幕常亮")}catch(t){}}},Kt={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"finger",rawName:"v-finger:swipe",value:t.swipe,expression:"swipe",arg:"swipe"}],staticClass:"exam-root"},[n("van-nav-bar",{attrs:{title:t.examInfo.title,fixed:"","left-arrow":"","right-text":"目录"},on:{"click-left":function(e){return t.$router.back()},"click-right":function(e){t.showAcButtons=!t.showAcButtons}}}),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showAcButtons,expression:"showAcButtons"}],staticClass:"ac-qn-backdrop",on:{click:function(e){e.stopPropagation(),t.showAcButtons=!1}}},[n("div",{staticClass:"exam-p-around-small ac-qn",on:{click:function(t){t.stopPropagation()}}},[n("van-row",t._l(t.questionsInfo,function(e,i){return n("van-col",{key:i,attrs:{span:"4"}},[n("div",{staticClass:"exam-circle exam-done",class:{"exam-right":e.answer.isPass&&(t.isShowResult||e.answer.isChecked&&t.isPractice),"exam-error":e.answer.isMistake&&(t.isShowResult||e.answer.isChecked&&t.isPractice),"exam-current":t.questionNum===i},on:{click:function(e){return t.turnTo(i)}}},[t._v("\n "+t._s(i+1)+"\n ")])])}),1)],1)]),t._v(" "),n("div",{staticClass:"question-box",style:"width: "+100*t.totalNum+"%;transform:translate("+100*-t.questionNum/t.totalNum+"%,0)",on:{dblclick:function(e){e.stopPropagation(),t.showAcButtons=!0}}},t._l(t.questionsInfo,function(e,i){return n("div",{key:e.hashCode,staticClass:"question-item"},[n("van-panel",{attrs:{title:t.getQuestionTitle(e),desc:t.getQuestionDesc(e)}},[e.isMulti?n("div",[n("van-checkbox-group",{on:{click:function(t){t.stopPropagation()},dblclick:function(t){t.stopPropagation()}},model:{value:e.answer.multi.apis,callback:function(n){t.$set(e.answer.multi,"apis",n)},expression:"question.answer.multi.apis"}},[n("van-cell-group",t._l(e.answerOptions,function(r,o){return n("van-cell",{key:o,attrs:{clickable:""},on:{click:function(e){return t.toggleAnswer(i,r.api)}}},[n("template",{slot:"title"},[n("span",{class:{"right-answer":r.isRight&&t.isShowResult||r.isRight&&e.answer.isChecked&&t.isPractice,"error-answer":!r.isRight&&t.isShowResult||!r.isRight&&e.answer.isAnswered&&t.isPractice,"custom-title":!0}},[t._v(t._s(t.letterIndex[o]+". "+r.describe))])]),t._v(" "),n("van-checkbox",{attrs:{slot:"right-icon",name:r.api,"checked-color":t.getOptionColor(e,r)},slot:"right-icon"})],2)}),1)],1)],1):t._e(),t._v(" "),e.isMulti?t._e():n("div",[n("van-radio-group",{model:{value:e.answer.single.api,callback:function(n){t.$set(e.answer.single,"api",n)},expression:"question.answer.single.api"}},[n("van-cell-group",t._l(e.answerOptions,function(r,o){return n("van-cell",{key:o,attrs:{clickable:""},on:{click:function(e){return t.setAnswer(i,[r.api])}}},[n("template",{slot:"title"},[n("span",{class:{"right-answer":r.isRight&&t.isShowResult||r.isRight&&e.answer.isChecked&&t.isPractice,"error-answer":!r.isRight&&t.isShowResult||!r.isRight&&e.answer.isAnswered&&t.isPractice,"custom-title":!0}},[t._v(t._s(t.letterIndex[o]+". "+r.describe))])]),t._v(" "),n("van-radio",{attrs:{slot:"right-icon",name:r.api,"checked-color":t.getOptionColor(e,r)},slot:"right-icon"})],2)}),1)],1)],1)])],1)}),0),t._v(" "),t.questionsInfo[t.questionNum]?n("div",{staticClass:"text-align-center ac-buttons"},[t.questionNum>0?n("van-button",{attrs:{size:"small"},on:{click:function(e){return t.turnTo(t.questionNum-1)}}},[t._v("上一题")]):t._e(),t._v(" "),t.questionNum<t.totalNum-1?n("van-button",{attrs:{size:"small",type:"info"},on:{click:function(e){return t.turnTo(t.questionNum+1)}}},[t._v("下一题\n ")]):t._e(),t._v(" "),t.isPractice&&!t.questionsInfo[t.questionNum].answer.isChecked?n("van-button",{attrs:{size:"small",type:"warning"},on:{click:function(e){return t.checkResult(t.questionNum)}}},[t._v("检查该题答案\n ")]):t._e(),t._v(" "),t.hasSubmit?t._e():n("van-button",{attrs:{size:"small",type:"primary"},on:{click:t.confirmSubmit}},[t._v("提交\n ")])],1):t._e()],1)},staticRenderFns:[]};var Xt=n("VU/8")(Yt,Kt,!1,function(t){n("3wLQ")},"data-v-4b469db2",null).exports;i.a.use(s.a);var te=new s.a({routes:[{path:"/",name:"HomePage",component:jt},{path:"/exam",name:"DoExamPage",component:Xt,props:!0}]}),ee=(n("ZsCP"),n("mtWM")),ne=n.n(ee),ie=n("hU7x"),re=n.n(ie),oe=n("7oBh"),se=n.n(oe),ae=n("vhKK"),ue=n.n(ae);if(i.a.use(ue.a,{AlloyFinger:se.a}),i.a.prototype.$http=ne.a,i.a.prototype.$http.jsonp=re.a,Object.fromEntries||(Object.fromEntries=it.fromEntries),!Array.prototype.flat)try{h()(Array.prototype,"flat",{value:function(t){return it.flat(this,t)},enumerable:!1})}catch(t){Array.prototype.flat=function(t){return it.flat(this,t)}}i.a.config.productionTip=!1,new i.a({el:"#app",router:te,components:{App:o},template:"<App/>"})},RUOb:function(t,e){},ZsCP:function(t,e){},hW8u:function(t,e){},"hy4/":function(t,e){},juSK:function(t,e){},nLpc:function(t,e){},nOtf:function(t,e){},nsZj:function(t,e){},px3J:function(t,e){},sKgQ:function(t,e){},u1TY:function(t,e){},"zW/T":function(t,e){}},["NHnr"]);
2
- //# sourceMappingURL=app.4e58d03b72ab044886ef.js.map