Project

General

Profile

Specification » History » Version 8

Soh Keong, 05/04/2021 02:33 PM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h2. Programming Guide
6
7
h3. Jar version 
8
9
|_. version |_. Description                    |
10
| 1.0       | Init                             |
11
12
h3. Jar File Download
13
14 2 Soh Keong
"Jar":/redmine/attachments/download/551/orderTrackingService-1.0.jar
15 1 Soh Keong
"Lib":/redmine/attachments/download/548/lib.rar
16
"Properties":/redmine/attachments/download/550/service.properties
17
18
h3. properties file
19
20
* *service.properties*
21
22
# *json.url*                - provided by DotNet team
23
# *connection.timeout*      - set connection timeout
24
# *connection.read.timeout* - set connection read timeout
25
26
27
h1. Methods
28
29
<pre>
30
cosway.eCos2WebApi.service.TrackService service = new cosway.eCos2WebApi.service.TrackService();
31
</pre>
32
33 3 Soh Keong
h2. getTrackingOrderDetail (GetTrackingOrderDetail)
34 1 Soh Keong
35
<pre>
36
cosway.eCos2WebApi.model.ResponseTrack responseBean = service.getTrackingOrderDetail(String orderId)
37
</pre>
38
39
* *cosway.eCos2WebApi.model.ResponseTrack*
40
> * *errorCode*      - String
41
> * *errorMessage*   - String
42
> * *detail*         - TrackOrderDetail
43
>> * *companyName*     - String
44
>> * *trackingNo*      - String
45
>> * *updateDatetime*  - Date
46 4 Soh Keong
47
h2. Live tracking.my
48
49 7 Soh Keong
h3. third party Javascript
50 8 Soh Keong
51 4 Soh Keong
<pre>
52 5 Soh Keong
<script src="//www.tracking.my/track-button.js"></script>
53
<script>
54 6 Soh Keong
	function inputTrack(num) {
55
		TrackButton.track({
56
				tracking_no: num
57
			});
58
	}
59 5 Soh Keong
</script>
60 4 Soh Keong
61 6 Soh Keong
<input type="button" value="Detail" onclick="inputTrack('<%=trackNo %>')">
62 7 Soh Keong
</pre>
63
64
h3. Pop up new windows
65
66
<pre>
67
<script>
68
	function viewDetail(num) {
69
		window.open("https://www.tracking.my/externalcall?tracking_no="+num,"_blank", getSpecs()).focus();
70
	}
71
72
	function getSpecs() {
73
		return "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=50,left=100,width=500,height=600";
74
	}
75
</script>
76
77
<input type="button" value="Detail" onclick="viewDetail('<%=trackNo %>')">
78 4 Soh Keong
</pre>