Project

General

Profile

Specification » History » Version 7

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 4 Soh Keong
<pre>
51 5 Soh Keong
<script src="//www.tracking.my/track-button.js"></script>
52
<script>
53 6 Soh Keong
	function inputTrack(num) {
54
		TrackButton.track({
55
				tracking_no: num
56
			});
57
	}
58 5 Soh Keong
</script>
59 4 Soh Keong
60 6 Soh Keong
<input type="button" value="Detail" onclick="inputTrack('<%=trackNo %>')">
61 7 Soh Keong
</pre>
62
63
h3. Pop up new windows
64
65
<pre>
66
<script>
67
	function viewDetail(num) {
68
		window.open("https://www.tracking.my/externalcall?tracking_no="+num,"_blank", getSpecs()).focus();
69
	}
70
71
	function getSpecs() {
72
		return "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=50,left=100,width=500,height=600";
73
	}
74
</script>
75
76
<input type="button" value="Detail" onclick="viewDetail('<%=trackNo %>')">
77 4 Soh Keong
</pre>