Browse Source

双汇app

miaofuhao 6 years ago
parent
commit
899fdd6060
38 changed files with 6182 additions and 744 deletions
  1. 1 12
      CallCenterWeb.UI/login.html
  2. 32 44
      双汇APP/Common/Setting-portrait.html
  3. 189 0
      双汇APP/Common/cropper.html
  4. 0 0
      双汇APP/Common/cropper/cropper.css
  5. 0 0
      双汇APP/Common/cropper/cropper.js
  6. 0 0
      双汇APP/Common/cropper/cropper.min.css
  7. 0 0
      双汇APP/Common/cropper/cropper.min.js
  8. 29 0
      双汇APP/Common/css/jquery.Jcrop.min.css
  9. 3004 0
      双汇APP/Common/head/cropper.js
  10. 9 0
      双汇APP/Common/head/cropper.min.css
  11. 10 0
      双汇APP/Common/head/cropper.min.js
  12. 8 0
      双汇APP/Common/head/html2canvas.min.js
  13. 4 0
      双汇APP/Common/head/jquery-1.11.1.min.js
  14. 117 0
      双汇APP/Common/head/sitelogo.css
  15. 331 0
      双汇APP/Common/head/sitelogo.js
  16. 90 0
      双汇APP/Common/headimg.html
  17. 161 0
      双汇APP/Common/index.html
  18. 805 0
      双汇APP/Common/js/exif.js
  19. 5 0
      双汇APP/Common/js/jquery-1.9.1.min.js
  20. 22 0
      双汇APP/Common/js/jquery.Jcrop.min.js
  21. 37 21
      双汇APP/Common/js/portrait.js
  22. 17 10
      双汇APP/Common/portrait_head.html
  23. 3 3
      双汇APP/Leader-index.html
  24. 1 0
      双汇APP/Setting-1.html
  25. 78 0
      双汇APP/css/feedback-page.css
  26. 115 0
      双汇APP/css/feedback.css
  27. 367 352
      双汇APP/css/personal.css
  28. 2 0
      双汇APP/css/setting.css
  29. 7 0
      双汇APP/js/Work-Add.js
  30. 110 0
      双汇APP/js/feedback-page.js
  31. 221 0
      双汇APP/js/feedback.js
  32. 110 100
      双汇APP/js/personal.js
  33. 188 183
      双汇APP/js/setting.js
  34. 94 6
      双汇APP/personal.html
  35. 2 2
      双汇APP/tab-phone.html
  36. 10 1
      双汇APP/unpackage/.confirmed_dependencies
  37. 0 7
      双汇WebAPP/User-Work-Add.html
  38. 3 3
      双汇WebAPP/js/feedback-page.js

+ 1 - 12
CallCenterWeb.UI/login.html

@@ -62,24 +62,13 @@
62 62
     </div>
63 63
     <div class="container">
64 64
         <div class="row clearfix">
65
-            <div class="signin_left col-md-5">
66
-               <!--<h2>
67
-                   <i></i>
68
-                    <span>全客服平台</span>
69
-                </h2>-->
70
-                <!--<p>欢迎您进入全客服平台,开启智慧客服新篇章!</p>-->
71
-                <!--<div class="left_word">
72
-                	 <h3>用心做,更出色</h3>
73
-                <p>致力于临床实验技术的普通和提高,为人类健康服务</p>
74
-                </div>-->
75
-            </div>
65
+            <div class="signin_left col-md-5"></div>
76 66
             <div class="signin_right col-md-5">
77 67
                 <div class="signin_panel">
78 68
                 	<div class="logo_title">
79 69
                 		<img src="img/snLogo.png" alt=""width="50px" height="50px"/>
80 70
                 		<span>双汇客服中心管理系统</span>
81 71
                 	</div>
82
-                    <!--<h1>思念呼叫中心管理系统</h1>-->
83 72
                     <div class="signin_user">
84 73
                         <i class="signin_icons"></i>
85 74
                         <input class="form-control" type="text" placeholder="请输入您的管理账号" id="user" autofocus autocomplete="off">

+ 32 - 44
双汇APP/Common/Setting-portrait.html

@@ -46,12 +46,10 @@
46 46
     </head>
47 47
 
48 48
     <body>
49
-        <header class="mui-bar mui-bar-nav">
50
-            <button type="button" id="finish" class="mui-left mui-btn mui-btn-link mui-btn-nav mui-pull-left">
51
-                    <span class="mui-icon mui-icon-left-nav"></span>完成
52
-            </button>
53
-            <h1 class="mui-title">头信息</h1>
54
-        </header>
49
+       	<header class="mui-bar mui-bar-nav" style="padding-right: 15px;color: #fff; background-color: #cd0000 !important;">
50
+			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #FFFFFF;"></a>
51
+			<h1 class="mui-center mui-title"><span class="Totle-box">我的头像</span><span class="Totle"></span></h1>
52
+		</header>
55 53
         <div class="mui-content">
56 54
 
57 55
             <ul class="mui-table-view">
@@ -89,45 +87,35 @@
89 87
 
90 88
                     //弹出菜单
91 89
                     mui(".mui-table-view-cell").on("tap", "#head", function(e) {
92
-//                      if(mui.os.plus) {
93
-//                          var a = [{
94
-//                              title: "拍照"
95
-//                          }, {
96
-//                              title: "从手机相册选择"
97
-//                          }];
98
-//                          plus.nativeUI.actionSheet({
99
-//                              title: "修改头像",
100
-//                              cancel: "取消",
101
-//                              buttons: a
102
-//                          }, function(b) {
103
-//                              switch(b.index) {
104
-//                                  case 0:
105
-//                                      break;
106
-//                                  case 1:
107
-//                                      getImage();
108
-//                                      break;
109
-//                                  case 2:
110
-//                                      galleryImg();
111
-//                                      break;
112
-//                                  default:
113
-//                                      break
114
-//                              }
115
-//                          })
116
-//                      }
90
+                        if(mui.os.plus) {
91
+                            var a = [{
92
+                                title: "拍照"
93
+                            }, {
94
+                                title: "从手机相册选择"
95
+                            }];
96
+                            plus.nativeUI.actionSheet({
97
+                                title: "修改头像",
98
+                                cancel: "取消",
99
+                                buttons: a
100
+                            }, function(b) {
101
+                                switch(b.index) {
102
+                                    case 0:
103
+                                        break;
104
+                                    case 1:
105
+                                        getImage();
106
+                                        break;
107
+                                    case 2:
108
+                                        galleryImg();
109
+                                        break;
110
+                                    default:
111
+                                        break
112
+                                }
113
+                            })
114
+                        }
117 115
 
118 116
                     });
119 117
 
120
-                    //完成并返回
121
-                    document.getElementById("finish").addEventListener("tap", function() {
122
-                        var nwaiting = plus.nativeUI.showWaiting();
123
-						webviewShow = plus.webview.create("../Setting-1.html"); //后台创建webview并打开show.html  
124
-						webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件  
125
-							nwaiting.close(); //新webview的载入完毕后关闭等待框  
126
-							webviewShow.show("slide-in-right", 300); //把新webview窗体显示出来,显示动画效果为速度300毫秒的右侧移入动画
127
-						}, false);
128
-                       
129
-
130
-                    });
118
+                    
131 119
 
132 120
                 });
133 121
 
@@ -225,8 +213,8 @@
225 213
                 //裁剪图片
226 214
                 function cutImage(path) {
227 215
                     $.openWindow({
228
-                        url: 'cropper.html',
229
-                        id: 'cropper',
216
+                        url: 'index.html',
217
+                        id: 'index',
230 218
                         extras: {
231 219
                             path: path,
232 220
                         },

+ 189 - 0
双汇APP/Common/cropper.html

@@ -0,0 +1,189 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+    <head>
5
+        <meta charset="utf-8">
6
+        <title>裁剪头像</title>
7
+        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
+        <link href="../css/mui.min.css" rel="stylesheet" />
9
+        <link href="../js/cropper/cropper.css" rel="stylesheet" />
10
+        <style type="text/css">
11
+            body {
12
+                background-color: #000000;
13
+            }
14
+            
15
+            #cropper-example-1 {
16
+                background-color: #000000;
17
+                height: 93%;
18
+                width: 100%;
19
+                position: absolute;
20
+            }
21
+            
22
+            .divbut {
23
+                width: 100%;
24
+                text-align: center;
25
+                position: fixed;
26
+                z-index: 2;
27
+                bottom: 0px;
28
+                background-color: #000000;
29
+                height: 7.5%;
30
+                line-height: 50px;
31
+            }
32
+            
33
+            .divbut>div:first-child {
34
+                float: left;
35
+                width: 20%;
36
+            }
37
+            
38
+            .divbut>div:last-child {
39
+                float: right;
40
+                width: 20%;
41
+            }
42
+            
43
+            img#im {
44
+                height: 100%;
45
+                width: 100%;
46
+            }
47
+        </style>
48
+    </head>
49
+
50
+    <body>
51
+        <div id="cropper-example-1" class="mui-hidden">
52
+            <img id="im" alt="Picture" />
53
+        </div>
54
+
55
+        <div class="divbut">
56
+            <div>
57
+                <p id="quxiao" class="mui-icon mui-icon-closeempty"></p>
58
+            </div>
59
+            <div>
60
+                <p id="xuanqu" class="mui-icon mui-icon-checkmarkempty"></p>
61
+            </div>
62
+        </div>
63
+        <img src="" alt="" class="mui-hidden" id="im_exif" />
64
+
65
+        <script type="text/javascript" src="../js/jquery-1.8.js"></script>
66
+        <script src="../js/mui.min.js"></script>
67
+        <script type="text/javascript" src="js/exif.js"></script>
68
+        <script src="../js/cropper/cropper.min.js"></script>
69
+        <script src="../js/app.js"></script>
70
+        <script>
71
+            (function(c) {
72
+                var Cro = function() {}
73
+                c.extend(Cro.prototype, {
74
+                    orientation: null,
75
+                    urldata: null,
76
+                    view: null,
77
+                    num: 0,
78
+                    sbx: null,
79
+                    sby: null,
80
+                    n: 0,
81
+                    onReady: function() {
82
+                        var that = this;
83
+                        mui.init();
84
+                        that.bindEvent();
85
+                        that.view = plus.webview.currentWebview();
86
+
87
+                        var img = document.getElementById("im_exif");
88
+                        img.src = that.view.path;
89
+                        img.addEventListener("load", function() {
90
+                            //exif调整图片的横竖
91
+                            EXIF.getData(this, function() {
92
+                                var orientation = EXIF.getAllTags(this).Orientation;
93
+                                $("#im").attr("src", that.loadcopyImg(img, orientation));
94
+                                document.getElementById("cropper-example-1").classList.remove("mui-hidden"); //显示裁剪区域
95
+                                that.cropperImg();
96
+                            });
97
+                        })
98
+                    },
99
+                    cropperImg: function() {
100
+                        var that = this;
101
+                        $('#cropper-example-1 > img').cropper({
102
+                            aspectRatio: 1 / 1,
103
+                            autoCropArea: 1,
104
+                            strict: true,
105
+                            background: false,
106
+                            guides: false,
107
+                            highlight: false,
108
+                            dragCrop: false,
109
+                            movable: false,
110
+                            resizable: false,
111
+                            crop: function(data) {
112
+                                that.urldata = that.base64(data);
113
+                            }
114
+                        });
115
+                    },
116
+                    loadcopyImg: function(img, opt) {
117
+                        var that = this;
118
+                        var canvas = document.createElement("canvas");
119
+                        var square = 500;
120
+                        var imageWidth, imageHeight;
121
+                        if(img.width > img.height) {
122
+                            imageHeight = square;
123
+                            imageWidth = Math.round(square * img.width / img.height);
124
+                        } else {
125
+                            imageHeight = square; //this.width;
126
+                            imageWidth = Math.round(square * img.width / img.height);
127
+                        }
128
+                        canvas.height = imageHeight;
129
+                        canvas.width = imageWidth;
130
+                        if(opt == 6) {
131
+                            that.num = 90;
132
+                        } else if(opt == 3) {
133
+                            that.num = 180;
134
+                        } else if(opt == 8) {
135
+                            that.num = 270;
136
+                        }
137
+                        if(that.num == 360) {
138
+                            that.num = 0;
139
+                        }
140
+
141
+                        var ctx = canvas.getContext("2d");
142
+                        ctx.translate(imageWidth / 2, imageHeight / 2);
143
+                        ctx.rotate(that.num * Math.PI / 180);
144
+                        ctx.translate(-imageWidth / 2, -imageHeight / 2);
145
+                        ctx.drawImage(img, 0, 0, imageWidth, imageHeight);
146
+                        var dataURL = canvas.toDataURL("image/jpeg", 1);
147
+                        return dataURL;
148
+                    },
149
+                    bindEvent: function() {
150
+                        var that = this;
151
+                        document.getElementById("quxiao").addEventListener("tap", function() {
152
+                            mui.back(); //取消就直接返回
153
+                        });
154
+                        document.getElementById("xuanqu").addEventListener("tap", function() {
155
+                            //触发上一个页面刷新图片事件
156
+                            var preView = plus.webview.getWebviewById('user/headinfo');
157
+                            mui.fire(preView, 'updateHeadImg', {
158
+                                'img': that.urldata
159
+                            }); //不能保存图片,需要判断上传性,所以选择传值的方式,传递图片,格式为json
160
+                            mui.back();
161
+                        });
162
+                    },
163
+                    base64: function(data) {
164
+                        var that = this;
165
+                        var img = document.getElementById("im");
166
+
167
+                        var canvas = document.createElement("canvas");
168
+                        //像素
169
+                        canvas.height = 400;
170
+                        canvas.width = 400;
171
+                        var bx = data.x;
172
+                        var by = data.y;
173
+                        var ctx = canvas.getContext("2d");
174
+                        ctx.drawImage(img, bx, by, data.width, data.height, 0, 0, 400, 400);
175
+                        var dataURL = canvas.toDataURL("image/jpeg", 0.5); //第二个参数是质量
176
+                        return dataURL;
177
+                    }
178
+                });
179
+
180
+                var cro = new Cro();
181
+
182
+                c.plusReady(function() {
183
+                    cro.onReady();
184
+                })
185
+            })(mui)
186
+        </script>
187
+    </body>
188
+
189
+</html>

双汇APP/js/cropper/cropper.css → 双汇APP/Common/cropper/cropper.css


双汇APP/js/cropper/cropper.js → 双汇APP/Common/cropper/cropper.js


双汇APP/js/cropper/cropper.min.css → 双汇APP/Common/cropper/cropper.min.css


双汇APP/js/cropper/cropper.min.js → 双汇APP/Common/cropper/cropper.min.js


+ 29 - 0
双汇APP/Common/css/jquery.Jcrop.min.css

@@ -0,0 +1,29 @@
1
+/* jquery.Jcrop.min.css v0.9.12 (build:20130126) */
2
+.jcrop-holder{direction:ltr;text-align:left;}
3
+.jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif);font-size:0;position:absolute;}
4
+.jcrop-vline{height:100%;width:1px!important;}
5
+.jcrop-vline.right{right:0;}
6
+.jcrop-hline{height:1px!important;width:100%;}
7
+.jcrop-hline.bottom{bottom:0;}
8
+.jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%;}
9
+.jcrop-handle{background-color:#333;border:1px #EEE solid;font-size:1px;height:7px;width:7px;}
10
+.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0;}
11
+.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px;}
12
+.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%;}
13
+.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%;}
14
+.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0;}
15
+.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0;}
16
+.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0;}
17
+.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px;}
18
+.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%;}
19
+.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px;}
20
+.jcrop-dragbar.ord-n{margin-top:-4px;}
21
+.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px;}
22
+.jcrop-dragbar.ord-e{margin-right:-4px;right:0;}
23
+.jcrop-dragbar.ord-w{margin-left:-4px;}
24
+.jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:alpha(opacity=70)!important;opacity:.70!important;}
25
+.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px;}
26
+.jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important;}
27
+.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px;}
28
+.solid-line .jcrop-vline,.solid-line .jcrop-hline{background:#FFF;}
29
+.jcrop-holder img,img.jcrop-preview{max-width:none;}

File diff suppressed because it is too large
+ 3004 - 0
双汇APP/Common/head/cropper.js


File diff suppressed because it is too large
+ 9 - 0
双汇APP/Common/head/cropper.min.css


File diff suppressed because it is too large
+ 10 - 0
双汇APP/Common/head/cropper.min.js


File diff suppressed because it is too large
+ 8 - 0
双汇APP/Common/head/html2canvas.min.js


File diff suppressed because it is too large
+ 4 - 0
双汇APP/Common/head/jquery-1.11.1.min.js


+ 117 - 0
双汇APP/Common/head/sitelogo.css

@@ -0,0 +1,117 @@
1
+.avatar-view {
2
+  display: block;
3
+  width: 220px;
4
+  height: 220px;
5
+  border: 3px solid #fff;
6
+  border-radius: 5px;
7
+  box-shadow: 0 0 5px rgba(0,0,0,.15);
8
+  cursor: pointer;
9
+  overflow: hidden;
10
+}
11
+
12
+.avatar-view img {
13
+  width: 100%;
14
+}
15
+
16
+.avatar-body {
17
+  padding-right: 15px;
18
+  padding-left: 15px;
19
+}
20
+
21
+.avatar-upload {
22
+  overflow: hidden;
23
+}
24
+
25
+.avatar-upload label {
26
+  display: block;
27
+  float: left;
28
+  clear: left;
29
+  width: 100px;
30
+}
31
+
32
+.avatar-upload input {
33
+  display: block;
34
+  margin-left: 110px;
35
+}
36
+
37
+.avater-alert {
38
+  margin-top: 10px;
39
+  margin-bottom: 10px;
40
+}
41
+
42
+.avatar-wrapper {
43
+  height: 364px;
44
+  width: 100%;
45
+  margin-top: 15px;
46
+  box-shadow: inset 0 0 5px rgba(0,0,0,.25);
47
+  background-color: #fcfcfc;
48
+  overflow: hidden;
49
+}
50
+
51
+.avatar-wrapper img {
52
+  display: block;
53
+  height: auto;
54
+  max-width: 100%;
55
+}
56
+
57
+.avatar-preview {
58
+  float: left;
59
+  margin-top: 15px;
60
+  margin-right: 15px;
61
+  border: 1px solid #eee;
62
+  border-radius: 4px;
63
+  background-color: #fff;
64
+  overflow: hidden;
65
+}
66
+
67
+.avatar-preview:hover {
68
+  border-color: #ccf;
69
+  box-shadow: 0 0 5px rgba(0,0,0,.15);
70
+}
71
+
72
+.avatar-preview img {
73
+  width: 100%;
74
+}
75
+
76
+.preview-lg {
77
+  height: 184px;
78
+  width: 184px;
79
+  margin-top: 15px;
80
+}
81
+
82
+.preview-md {
83
+  height: 100px;
84
+  width: 100px;
85
+}
86
+
87
+.preview-sm {
88
+  height: 50px;
89
+  width: 50px;
90
+}
91
+
92
+@media (min-width: 992px) {
93
+  .avatar-preview {
94
+    float: none;
95
+  }
96
+}
97
+
98
+.avatar-btns {
99
+  margin-top: 30px;
100
+  margin-bottom: 15px;
101
+}
102
+
103
+.avatar-btns .btn-group {
104
+  margin-right: 5px;
105
+}
106
+
107
+.loading {
108
+  display: none;
109
+  position: absolute;
110
+  top: 0;
111
+  right: 0;
112
+  bottom: 0;
113
+  left: 0;
114
+  opacity: .75;
115
+  filter: alpha(opacity=75);
116
+  z-index: 20140628;
117
+}

+ 331 - 0
双汇APP/Common/head/sitelogo.js

@@ -0,0 +1,331 @@
1
+(function(factory) {
2
+	if(typeof define === 'function' && define.amd) {
3
+		define(['jquery'], factory);
4
+	} else if(typeof exports === 'object') {
5
+		// Node / CommonJS
6
+		factory(require('jquery'));
7
+	} else {
8
+		factory(jQuery);
9
+	}
10
+})(function($) {
11
+
12
+	'use strict';
13
+
14
+	var console = window.console || {
15
+		log: function() {}
16
+	};
17
+
18
+	function CropAvatar($element) {
19
+		this.$container = $element;
20
+
21
+		this.$avatarView = this.$container.find('.avatar-view');
22
+		this.$avatar = this.$avatarView.find('img');
23
+		this.$avatarModal = $("body").find('#avatar-modal');
24
+		this.$loading = $("#page-wrapper").find('.loading');
25
+
26
+		this.$avatarForm = this.$avatarModal.find('.avatar-form');
27
+		this.$avatarUpload = this.$avatarForm.find('.avatar-upload');
28
+		this.$avatarSrc = this.$avatarForm.find('.avatar-src');
29
+		this.$avatarData = this.$avatarForm.find('.avatar-data');
30
+		this.$avatarInput = this.$avatarForm.find('.avatar-input');
31
+		this.$avatarSave = this.$avatarForm.find('.avatar-save');
32
+		this.$avatarBtns = this.$avatarForm.find('.avatar-btns');
33
+
34
+		this.$avatarWrapper = this.$avatarModal.find('.avatar-wrapper');
35
+		this.$avatarPreview = this.$avatarModal.find('.avatar-preview');
36
+
37
+		this.init();
38
+	}
39
+
40
+	CropAvatar.prototype = {
41
+		constructor: CropAvatar,
42
+		support: {
43
+			fileList: !!$('<input type="file">').prop('files'),
44
+			blobURLs: !!window.URL && URL.createObjectURL,
45
+			formData: !!window.FormData
46
+		},
47
+
48
+		init: function() {
49
+			this.support.datauri = this.support.fileList && this.support.blobURLs;
50
+
51
+			if(!this.support.formData) {
52
+				this.initIframe();
53
+			}
54
+
55
+			this.initTooltip();
56
+			this.initModal();
57
+			this.addListener();
58
+		},
59
+
60
+		addListener: function() {
61
+			this.$avatarView.on('click', $.proxy(this.click, this));
62
+			this.$avatarInput.on('change', $.proxy(this.change, this));
63
+			this.$avatarForm.on('submit', $.proxy(this.submit, this));
64
+			this.$avatarBtns.on('click', $.proxy(this.rotate, this));
65
+		},
66
+
67
+		initTooltip: function() {
68
+			this.$avatarView.tooltip({
69
+				placement: 'bottom'
70
+			});
71
+		},
72
+
73
+		initModal: function() {
74
+			this.$avatarModal.modal({
75
+				show: false
76
+			});
77
+		},
78
+
79
+		initPreview: function() {
80
+			var url = this.$avatar.attr('src');
81
+
82
+//			this.$avatarPreview.empty().html('<img src="' + url + '">');
83
+		},
84
+
85
+		initIframe: function() {
86
+			var target = 'upload-iframe-' + (new Date()).getTime(),
87
+				$iframe = $('<iframe>').attr({
88
+					name: target,
89
+					src: ''
90
+				}),
91
+				_this = this;
92
+
93
+			// Ready ifrmae
94
+			$iframe.one('load', function() {
95
+
96
+				// respond response
97
+				$iframe.on('load', function() {
98
+					var data;
99
+
100
+					try {
101
+						data = $(this).contents().find('body').text();
102
+					} catch(e) {
103
+						console.log(e.message);
104
+					}
105
+
106
+					if(data) {
107
+						try {
108
+							data = $.parseJSON(data);
109
+						} catch(e) {
110
+							console.log(e.message);
111
+						}
112
+
113
+						_this.submitDone(data);
114
+					} else {
115
+						_this.submitFail('Image upload failed!');
116
+					}
117
+
118
+					_this.submitEnd();
119
+
120
+				});
121
+			});
122
+
123
+			this.$iframe = $iframe;
124
+			this.$avatarForm.attr('target', target).after($iframe.hide());
125
+		},
126
+
127
+		click: function() {
128
+			this.$avatarModal.modal('show');
129
+			this.initPreview();
130
+		},
131
+
132
+		change: function() {
133
+			var files,
134
+				file;
135
+
136
+			if(this.support.datauri) {
137
+				files = this.$avatarInput.prop('files');
138
+
139
+				if(files.length > 0) {
140
+					file = files[0];
141
+
142
+					if(this.isImageFile(file)) {
143
+						if(this.url) {
144
+							URL.revokeObjectURL(this.url); // Revoke the old one
145
+						}
146
+
147
+						this.url = URL.createObjectURL(file);
148
+						this.startCropper();
149
+					}
150
+				}
151
+			} else {
152
+				file = this.$avatarInput.val();
153
+
154
+				if(this.isImageFile(file)) {
155
+					this.syncUpload();
156
+				}
157
+			}
158
+		},
159
+
160
+		submit: function() {
161
+			if(!this.$avatarSrc.val() && !this.$avatarInput.val()) {
162
+				return false;
163
+			}
164
+
165
+			if(this.support.formData) {
166
+				this.ajaxUpload();
167
+				return false;
168
+			}
169
+		},
170
+
171
+		rotate: function(e) {
172
+			var data;
173
+
174
+			if(this.active) {
175
+				data = $(e.target).data();
176
+
177
+				if(data.method) {
178
+					this.$img.cropper(data.method, data.option);
179
+				}
180
+			}
181
+		},
182
+
183
+		isImageFile: function(file) {
184
+			if(file.type) {
185
+				return /^image\/\w+$/.test(file.type);
186
+			} else {
187
+				return /\.(jpg|jpeg|png|gif)$/.test(file);
188
+			}
189
+		},
190
+
191
+		startCropper: function() {
192
+			var _this = this;
193
+
194
+			if(this.active) {
195
+				this.$img.cropper('replace', this.url);
196
+			} else {
197
+				this.$img = $('<img src="' + this.url + '">');
198
+				this.$avatarWrapper.empty().html(this.$img);
199
+				this.$img.cropper({
200
+					aspectRatio: 1,
201
+					preview: this.$avatarPreview.selector,
202
+					strict: false,
203
+//					crop: function(data) {
204
+//						var json = [
205
+//							'{"x":' + data.x,
206
+//							'"y":' + data.y,
207
+//							'"height":' + data.height,
208
+//							'"width":' + data.width,
209
+//							'"rotate":' + data.rotate + '}'
210
+//						].join();
211
+//						_this.$avatarData.val(json);
212
+//					}
213
+				});
214
+
215
+				this.active = true;
216
+			}
217
+		},
218
+
219
+		stopCropper: function() {
220
+			if(this.active) {
221
+				this.$img.cropper('destroy');
222
+				this.$img.remove();
223
+				this.active = false;
224
+			}
225
+		},
226
+
227
+//		ajaxUpload: function() {
228
+//			var url = this.$avatarForm.attr('action'),
229
+//				data = new FormData(this.$avatarForm[0]),
230
+//				_this = this;
231
+//
232
+//			$.ajax(url, {
233
+//				headers: {
234
+//					'X-XSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
235
+//				},
236
+//				type: 'post',
237
+//				data: data,
238
+//				dataType: 'json',
239
+//				processData: false,
240
+//				contentType: false,
241
+//
242
+//				beforeSend: function() {
243
+//					_this.submitStart();
244
+//				},
245
+//
246
+//				success: function(data) {
247
+//					_this.submitDone(data);
248
+//				},
249
+//
250
+//				error: function(XMLHttpRequest, textStatus, errorThrown) {
251
+//					if (this.uploaded) {
252
+//					    this.uploaded = false;
253
+//					    this.cropDone(); 
254
+//					    // this.uploaded = true;this.support.datauri ||           
255
+//					    // this.$avatarSrc.val(this.url);            
256
+//					    // this.startCropper();         
257
+//					 } else {           
258
+//					     this.uploaded = true;            
259
+//					     this.$avatarSrc.val(this.url);           
260
+//					     this.startCropper();            
261
+//					     this.cropDone();          
262
+//					}
263
+//				},
264
+//
265
+//				complete: function() {
266
+//					_this.submitEnd();
267
+//				}
268
+//			});
269
+//		},
270
+
271
+		syncUpload: function() {
272
+			this.$avatarSave.click();
273
+		},
274
+
275
+		submitStart: function() {
276
+			this.$loading.fadeIn();
277
+		},
278
+
279
+//		submitDone: function(data) {
280
+//			if($.isPlainObject(data)) {
281
+//				if(data.result) {
282
+//					this.url = data.result;
283
+//					if(this.support.datauri || this.uploaded) {
284
+//						this.uploaded = false;
285
+//						this.cropDone();
286
+//					} else {
287
+//						this.uploaded = true;
288
+//						this.$avatarSrc.val(this.url);
289
+//						this.startCropper();
290
+//					}
291
+//					this.$avatarInput.val('');
292
+//				} else if(data.message) {
293
+//					this.alert(data.message);
294
+//				}
295
+//			} else {
296
+//				this.alert('Failed to response');
297
+//			}
298
+//		},
299
+
300
+		submitFail: function(msg) {
301
+			this.alert(msg);
302
+		},
303
+
304
+		submitEnd: function() {
305
+			this.$loading.fadeOut();
306
+		},
307
+
308
+		cropDone: function() {
309
+			this.$avatarForm.get(0).reset();
310
+			this.$avatar.attr('src', this.url);
311
+			this.stopCropper();
312
+			this.$avatarModal.modal('hide');
313
+		},
314
+
315
+		alert: function(msg) {
316
+			var $alert = [
317
+				'<div class="alert alert-danger avater-alert">',
318
+				'<button type="button" class="close" data-dismiss="alert">&times;</button>',
319
+				msg,
320
+				'</div>'
321
+			].join('');
322
+
323
+			this.$avatarUpload.after($alert);
324
+		}
325
+	};
326
+
327
+	$(function() {
328
+		return new CropAvatar($('#crop-avatar'));
329
+	});
330
+
331
+});

+ 90 - 0
双汇APP/Common/headimg.html

@@ -0,0 +1,90 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+	<head>
5
+		<meta charset="utf-8" />
6
+		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
7
+		<link rel="stylesheet" href="../css/mui.min.css" />
8
+		<link rel="stylesheet" href="../css/jquery.Jcrop.min.css" />
9
+		<script type="text/javascript" src="../js/mui.min.js"></script>
10
+		<script type="text/javascript" src="../js/jquery-1.9.1.min.js"></script>
11
+		<script type="text/javascript" src="../js/jquery.Jcrop.min.js"></script>
12
+		<script type="text/javascript">
13
+			var jcrop_api;
14
+
15
+			function initJcrop(x, y) {
16
+				$('#panel').Jcrop({
17
+					allowResize: false,
18
+					allowSelect: false,
19
+					onChange: updatePreview,
20
+				}, function() {
21
+					jcrop_api = this;
22
+					jcrop_api.animateTo([x, y, x + 100, y + 100]);
23
+				});
24
+			};
25
+
26
+			function updatePreview(c) {
27
+				setHead(c.x, c.y);
28
+			};
29
+		</script>
30
+
31
+		<style>
32
+			button span {
33
+				font-size: 17px;
34
+				margin: 0px !important;
35
+			}
36
+			button {
37
+				padding: 0px !important;
38
+				padding-right: 5px !important;
39
+				line-height: 30px !important;
40
+			}
41
+		</style>
42
+	</head>
43
+
44
+	<body>
45
+		<header class="mui-bar mui-bar-nav hander-bg">
46
+			<button class="mui-btn mui-pull-left "><span class="mui-icon mui-icon-closeempty" style="font-size: 30px;"></span> 取消
47
+			</button>
48
+			<button class="mui-btn mui-pull-right" onclick="getResults()"><span class="mui-icon mui-icon-checkmarkempty" style="font-size: 30px;"></span> 确定
49
+			</button>
50
+		</header> 
51
+		<div class="mui-content">
52
+			<canvas id="panel"></canvas>
53
+		</div>
54
+		<canvas style="display: none;" id="targetCanvas" width="100" height="100"></canvas>
55
+	</body>
56
+	<script type="text/javascript">
57
+		mui.init();
58
+		var canvas = document.getElementById('panel');
59
+		var h = xm.getQueryString("h") - 44;
60
+		var w = xm.getQueryString("w"); 
61
+		canvas.height = h;
62
+		canvas.width = w;
63
+		initJcrop((w - 100) / 2, (h - 100) / 2);
64
+		var ctx = canvas.getContext('2d');
65
+		var image = new Image();
66
+		image.src = unescape(xm.getQueryString("p"));
67
+		image.onload = function() {
68
+			ctx.drawImage(image, 0, 0, w, h);
69
+			setHead((w - 100) / 2, (h - 100) / 2);
70
+		}
71
+
72
+		function setHead(x, y) {
73
+			var temp = ctx.getImageData(x, y, 100, 100);
74
+			var target = document.getElementById('targetCanvas');
75
+			var target = target.getContext('2d');
76
+			target.putImageData(temp, 0, 0);
77
+		}
78
+
79
+		function getResults() {
80
+			var p = document.getElementById('targetCanvas').toDataURL();
81
+			var cur = plus.webview.currentWebview();
82
+			var page = plus.webview.getWebviewById(cur.page); 
83
+			if (page) {
84
+				page.evalJS("setHeadImage('" + p + "')");
85
+				cur.close();
86
+			}
87
+		}
88
+	</script>
89
+
90
+</html>

+ 161 - 0
双汇APP/Common/index.html

@@ -0,0 +1,161 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>Document</title>
7
+		<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
8
+		<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">
9
+		<link href="head/cropper.min.css" rel="stylesheet">
10
+		<link href="head/sitelogo.css" rel="stylesheet">
11
+		<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
12
+		<script src="http://www.jq22.com/jquery/bootstrap-3.3.4.js"></script>
13
+		<script src="head/cropper.js"></script>
14
+		<script src="head/sitelogo.js"></script>
15
+		<style type="text/css">
16
+			.avatar-btns button {
17
+			    height: 35px;
18
+			}
19
+			
20
+		</style>
21
+		
22
+		
23
+	</head>
24
+
25
+	<body>
26
+		<button type="button" class="btn btn-primary"  data-toggle="modal" data-target="#avatar-modal" style="margin: 10px;">
27
+				修改头像
28
+		</button>
29
+		<div class="user_pic" style="margin: 10px;">
30
+			<img src=""/>
31
+		</div>
32
+
33
+		<div class="modal fade" id="avatar-modal" aria-hidden="true" aria-labelledby="avatar-modal-label" role="dialog" tabindex="-1">
34
+			<div class="modal-dialog modal-lg">
35
+				<div class="modal-content">
36
+					<!--<form class="avatar-form" action="upload-logo.php" enctype="multipart/form-data" method="post">-->
37
+					<form class="avatar-form">
38
+						<div class="modal-header">
39
+							<button class="close" data-dismiss="modal" type="button">&times;</button>
40
+							<h4 class="modal-title" id="avatar-modal-label">上传图片</h4>
41
+						</div>
42
+						<div class="modal-body">
43
+							<div class="avatar-body">
44
+								<div class="avatar-upload">
45
+									<input class="avatar-src" name="avatar_src" type="hidden">
46
+									<input class="avatar-data" name="avatar_data" type="hidden">
47
+									<label for="avatarInput" style="line-height: 35px;">图片上传</label>
48
+									<button class="btn btn-danger"  type="button" style="height: 35px;" onclick="$('input[id=avatarInput]').click();">请选择图片</button>
49
+									<span id="avatar-name"></span>
50
+									<input class="avatar-input hide" id="avatarInput" name="avatar_file" type="file"></div>
51
+								<div class="row">
52
+									<div class="col-md-9">
53
+										<div class="avatar-wrapper"></div>
54
+									</div>
55
+									<div class="col-md-3">
56
+										<div class="avatar-preview preview-lg" id="imageHead"></div>
57
+										<!--<div class="avatar-preview preview-md"></div>
58
+								<div class="avatar-preview preview-sm"></div>-->
59
+									</div>
60
+								</div>
61
+								<div class="row avatar-btns">
62
+									<div class="col-md-4">
63
+										<div class="btn-group">
64
+											<button class="btn btn-danger fa fa-undo" data-method="rotate" data-option="-90" type="button" title="Rotate -90 degrees"> 向左旋转</button>
65
+										</div>
66
+										<div class="btn-group">
67
+											<button class="btn  btn-danger fa fa-repeat" data-method="rotate" data-option="90" type="button" title="Rotate 90 degrees"> 向右旋转</button>
68
+										</div>
69
+									</div>
70
+									<div class="col-md-5" style="text-align: right;">								
71
+										<button class="btn btn-danger fa fa-arrows" data-method="setDragMode" data-option="move" type="button" title="移动">
72
+							            <span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;setDragMode&quot;, &quot;move&quot;)">
73
+							            </span>
74
+							          </button>
75
+							          <button type="button" class="btn btn-danger fa fa-search-plus" data-method="zoom" data-option="0.1" title="放大图片">
76
+							            <span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;zoom&quot;, 0.1)">
77
+							              <!--<span class="fa fa-search-plus"></span>-->
78
+							            </span>
79
+							          </button>
80
+							          <button type="button" class="btn btn-danger fa fa-search-minus" data-method="zoom" data-option="-0.1" title="缩小图片">
81
+							            <span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;zoom&quot;, -0.1)">
82
+							              <!--<span class="fa fa-search-minus"></span>-->
83
+							            </span>
84
+							          </button>
85
+							          <button type="button" class="btn btn-danger fa fa-refresh" data-method="reset" title="重置图片">
86
+								            <span class="docs-tooltip" data-toggle="tooltip" title="" data-original-title="$().cropper(&quot;reset&quot;)" aria-describedby="tooltip866214">
87
+								       </button>
88
+							        </div>
89
+									<div class="col-md-3">
90
+										<button class="btn btn-danger btn-block avatar-save fa fa-save" type="button" data-dismiss="modal"> 保存修改</button>
91
+									</div>
92
+								</div>
93
+							</div>
94
+						</div>
95
+					</form>
96
+				</div>
97
+			</div>
98
+		</div>
99
+
100
+		<div class="loading" aria-label="Loading" role="img" tabindex="-1"></div>
101
+		<script src="head/html2canvas.min.js" type="text/javascript" charset="utf-8"></script>
102
+		<script type="text/javascript">
103
+		//做个下简易的验证  大小 格式 
104
+			$('#avatarInput').on('change', function(e) {
105
+				var filemaxsize = 1024 * 5;//5M
106
+				var target = $(e.target);
107
+				var Size = target[0].files[0].size / 1024;
108
+				if(Size > filemaxsize) {
109
+					alert('图片过大,请重新选择!');
110
+					$(".avatar-wrapper").childre().remove;
111
+					return false;
112
+				}
113
+				if(!this.files[0].type.match(/image.*/)) {
114
+					alert('请选择正确的图片!')
115
+				} else {
116
+					var filename = document.querySelector("#avatar-name");
117
+					var texts = document.querySelector("#avatarInput").value;
118
+					var teststr = texts; //你这里的路径写错了
119
+					testend = teststr.match(/[^\\]+\.[^\(]+/i); //直接完整文件名的
120
+					filename.innerHTML = testend;
121
+				}
122
+			
123
+			});
124
+
125
+			$(".avatar-save").on("click", function() {
126
+				var img_lg = document.getElementById('imageHead');
127
+				// 截图小的显示框内的内容
128
+				html2canvas(img_lg, {
129
+					allowTaint: true,
130
+					taintTest: false,
131
+					onrendered: function(canvas) {
132
+						canvas.id = "mycanvas";
133
+						//生成base64图片数据
134
+						var dataUrl = canvas.toDataURL("image/jpeg");
135
+						var newImg = document.createElement("img");
136
+						newImg.src = dataUrl;
137
+						imagesAjax(dataUrl)
138
+					}
139
+				});
140
+			})
141
+			
142
+			function imagesAjax(src) {
143
+				var data = {};
144
+				data.img = src;
145
+				data.jid = $('#jid').val();
146
+				$.ajax({
147
+					url: "upload-logo.php",
148
+					data: data,
149
+					type: "POST",
150
+					dataType: 'json',
151
+					success: function(re) {
152
+						if(re.status == '1') {
153
+							$('.user_pic img').attr('src',src );
154
+						}
155
+					}
156
+				});
157
+			}
158
+		</script>
159
+	</body>
160
+
161
+</html>

+ 805 - 0
双汇APP/Common/js/exif.js

@@ -0,0 +1,805 @@
1
+(function() {
2
+
3
+    var debug = false;
4
+
5
+    var root = this;
6
+
7
+    var EXIF = function(obj) {
8
+        if (obj instanceof EXIF) return obj;
9
+        if (!(this instanceof EXIF)) return new EXIF(obj);
10
+        this.EXIFwrapped = obj;
11
+    };
12
+
13
+    if (typeof exports !== 'undefined') {
14
+        if (typeof module !== 'undefined' && module.exports) {
15
+            exports = module.exports = EXIF;
16
+        }
17
+        exports.EXIF = EXIF;
18
+    } else {
19
+        root.EXIF = EXIF;
20
+    }
21
+
22
+    var ExifTags = EXIF.Tags = {
23
+
24
+        // version tags
25
+        0x9000 : "ExifVersion",             // EXIF version
26
+        0xA000 : "FlashpixVersion",         // Flashpix format version
27
+
28
+        // colorspace tags
29
+        0xA001 : "ColorSpace",              // Color space information tag
30
+
31
+        // image configuration
32
+        0xA002 : "PixelXDimension",         // Valid width of meaningful image
33
+        0xA003 : "PixelYDimension",         // Valid height of meaningful image
34
+        0x9101 : "ComponentsConfiguration", // Information about channels
35
+        0x9102 : "CompressedBitsPerPixel",  // Compressed bits per pixel
36
+
37
+        // user information
38
+        0x927C : "MakerNote",               // Any desired information written by the manufacturer
39
+        0x9286 : "UserComment",             // Comments by user
40
+
41
+        // related file
42
+        0xA004 : "RelatedSoundFile",        // Name of related sound file
43
+
44
+        // date and time
45
+        0x9003 : "DateTimeOriginal",        // Date and time when the original image was generated
46
+        0x9004 : "DateTimeDigitized",       // Date and time when the image was stored digitally
47
+        0x9290 : "SubsecTime",              // Fractions of seconds for DateTime
48
+        0x9291 : "SubsecTimeOriginal",      // Fractions of seconds for DateTimeOriginal
49
+        0x9292 : "SubsecTimeDigitized",     // Fractions of seconds for DateTimeDigitized
50
+
51
+        // picture-taking conditions
52
+        0x829A : "ExposureTime",            // Exposure time (in seconds)
53
+        0x829D : "FNumber",                 // F number
54
+        0x8822 : "ExposureProgram",         // Exposure program
55
+        0x8824 : "SpectralSensitivity",     // Spectral sensitivity
56
+        0x8827 : "ISOSpeedRatings",         // ISO speed rating
57
+        0x8828 : "OECF",                    // Optoelectric conversion factor
58
+        0x9201 : "ShutterSpeedValue",       // Shutter speed
59
+        0x9202 : "ApertureValue",           // Lens aperture
60
+        0x9203 : "BrightnessValue",         // Value of brightness
61
+        0x9204 : "ExposureBias",            // Exposure bias
62
+        0x9205 : "MaxApertureValue",        // Smallest F number of lens
63
+        0x9206 : "SubjectDistance",         // Distance to subject in meters
64
+        0x9207 : "MeteringMode",            // Metering mode
65
+        0x9208 : "LightSource",             // Kind of light source
66
+        0x9209 : "Flash",                   // Flash status
67
+        0x9214 : "SubjectArea",             // Location and area of main subject
68
+        0x920A : "FocalLength",             // Focal length of the lens in mm
69
+        0xA20B : "FlashEnergy",             // Strobe energy in BCPS
70
+        0xA20C : "SpatialFrequencyResponse",    //
71
+        0xA20E : "FocalPlaneXResolution",   // Number of pixels in width direction per FocalPlaneResolutionUnit
72
+        0xA20F : "FocalPlaneYResolution",   // Number of pixels in height direction per FocalPlaneResolutionUnit
73
+        0xA210 : "FocalPlaneResolutionUnit",    // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution
74
+        0xA214 : "SubjectLocation",         // Location of subject in image
75
+        0xA215 : "ExposureIndex",           // Exposure index selected on camera
76
+        0xA217 : "SensingMethod",           // Image sensor type
77
+        0xA300 : "FileSource",              // Image source (3 == DSC)
78
+        0xA301 : "SceneType",               // Scene type (1 == directly photographed)
79
+        0xA302 : "CFAPattern",              // Color filter array geometric pattern
80
+        0xA401 : "CustomRendered",          // Special processing
81
+        0xA402 : "ExposureMode",            // Exposure mode
82
+        0xA403 : "WhiteBalance",            // 1 = auto white balance, 2 = manual
83
+        0xA404 : "DigitalZoomRation",       // Digital zoom ratio
84
+        0xA405 : "FocalLengthIn35mmFilm",   // Equivalent foacl length assuming 35mm film camera (in mm)
85
+        0xA406 : "SceneCaptureType",        // Type of scene
86
+        0xA407 : "GainControl",             // Degree of overall image gain adjustment
87
+        0xA408 : "Contrast",                // Direction of contrast processing applied by camera
88
+        0xA409 : "Saturation",              // Direction of saturation processing applied by camera
89
+        0xA40A : "Sharpness",               // Direction of sharpness processing applied by camera
90
+        0xA40B : "DeviceSettingDescription",    //
91
+        0xA40C : "SubjectDistanceRange",    // Distance to subject
92
+
93
+        // other tags
94
+        0xA005 : "InteroperabilityIFDPointer",
95
+        0xA420 : "ImageUniqueID"            // Identifier assigned uniquely to each image
96
+    };
97
+
98
+    var TiffTags = EXIF.TiffTags = {
99
+        0x0100 : "ImageWidth",
100
+        0x0101 : "ImageHeight",
101
+        0x8769 : "ExifIFDPointer",
102
+        0x8825 : "GPSInfoIFDPointer",
103
+        0xA005 : "InteroperabilityIFDPointer",
104
+        0x0102 : "BitsPerSample",
105
+        0x0103 : "Compression",
106
+        0x0106 : "PhotometricInterpretation",
107
+        0x0112 : "Orientation",
108
+        0x0115 : "SamplesPerPixel",
109
+        0x011C : "PlanarConfiguration",
110
+        0x0212 : "YCbCrSubSampling",
111
+        0x0213 : "YCbCrPositioning",
112
+        0x011A : "XResolution",
113
+        0x011B : "YResolution",
114
+        0x0128 : "ResolutionUnit",
115
+        0x0111 : "StripOffsets",
116
+        0x0116 : "RowsPerStrip",
117
+        0x0117 : "StripByteCounts",
118
+        0x0201 : "JPEGInterchangeFormat",
119
+        0x0202 : "JPEGInterchangeFormatLength",
120
+        0x012D : "TransferFunction",
121
+        0x013E : "WhitePoint",
122
+        0x013F : "PrimaryChromaticities",
123
+        0x0211 : "YCbCrCoefficients",
124
+        0x0214 : "ReferenceBlackWhite",
125
+        0x0132 : "DateTime",
126
+        0x010E : "ImageDescription",
127
+        0x010F : "Make",
128
+        0x0110 : "Model",
129
+        0x0131 : "Software",
130
+        0x013B : "Artist",
131
+        0x8298 : "Copyright"
132
+    };
133
+
134
+    var GPSTags = EXIF.GPSTags = {
135
+        0x0000 : "GPSVersionID",
136
+        0x0001 : "GPSLatitudeRef",
137
+        0x0002 : "GPSLatitude",
138
+        0x0003 : "GPSLongitudeRef",
139
+        0x0004 : "GPSLongitude",
140
+        0x0005 : "GPSAltitudeRef",
141
+        0x0006 : "GPSAltitude",
142
+        0x0007 : "GPSTimeStamp",
143
+        0x0008 : "GPSSatellites",
144
+        0x0009 : "GPSStatus",
145
+        0x000A : "GPSMeasureMode",
146
+        0x000B : "GPSDOP",
147
+        0x000C : "GPSSpeedRef",
148
+        0x000D : "GPSSpeed",
149
+        0x000E : "GPSTrackRef",
150
+        0x000F : "GPSTrack",
151
+        0x0010 : "GPSImgDirectionRef",
152
+        0x0011 : "GPSImgDirection",
153
+        0x0012 : "GPSMapDatum",
154
+        0x0013 : "GPSDestLatitudeRef",
155
+        0x0014 : "GPSDestLatitude",
156
+        0x0015 : "GPSDestLongitudeRef",
157
+        0x0016 : "GPSDestLongitude",
158
+        0x0017 : "GPSDestBearingRef",
159
+        0x0018 : "GPSDestBearing",
160
+        0x0019 : "GPSDestDistanceRef",
161
+        0x001A : "GPSDestDistance",
162
+        0x001B : "GPSProcessingMethod",
163
+        0x001C : "GPSAreaInformation",
164
+        0x001D : "GPSDateStamp",
165
+        0x001E : "GPSDifferential"
166
+    };
167
+
168
+    var StringValues = EXIF.StringValues = {
169
+        ExposureProgram : {
170
+            0 : "Not defined",
171
+            1 : "Manual",
172
+            2 : "Normal program",
173
+            3 : "Aperture priority",
174
+            4 : "Shutter priority",
175
+            5 : "Creative program",
176
+            6 : "Action program",
177
+            7 : "Portrait mode",
178
+            8 : "Landscape mode"
179
+        },
180
+        MeteringMode : {
181
+            0 : "Unknown",
182
+            1 : "Average",
183
+            2 : "CenterWeightedAverage",
184
+            3 : "Spot",
185
+            4 : "MultiSpot",
186
+            5 : "Pattern",
187
+            6 : "Partial",
188
+            255 : "Other"
189
+        },
190
+        LightSource : {
191
+            0 : "Unknown",
192
+            1 : "Daylight",
193
+            2 : "Fluorescent",
194
+            3 : "Tungsten (incandescent light)",
195
+            4 : "Flash",
196
+            9 : "Fine weather",
197
+            10 : "Cloudy weather",
198
+            11 : "Shade",
199
+            12 : "Daylight fluorescent (D 5700 - 7100K)",
200
+            13 : "Day white fluorescent (N 4600 - 5400K)",
201
+            14 : "Cool white fluorescent (W 3900 - 4500K)",
202
+            15 : "White fluorescent (WW 3200 - 3700K)",
203
+            17 : "Standard light A",
204
+            18 : "Standard light B",
205
+            19 : "Standard light C",
206
+            20 : "D55",
207
+            21 : "D65",
208
+            22 : "D75",
209
+            23 : "D50",
210
+            24 : "ISO studio tungsten",
211
+            255 : "Other"
212
+        },
213
+        Flash : {
214
+            0x0000 : "Flash did not fire",
215
+            0x0001 : "Flash fired",
216
+            0x0005 : "Strobe return light not detected",
217
+            0x0007 : "Strobe return light detected",
218
+            0x0009 : "Flash fired, compulsory flash mode",
219
+            0x000D : "Flash fired, compulsory flash mode, return light not detected",
220
+            0x000F : "Flash fired, compulsory flash mode, return light detected",
221
+            0x0010 : "Flash did not fire, compulsory flash mode",
222
+            0x0018 : "Flash did not fire, auto mode",
223
+            0x0019 : "Flash fired, auto mode",
224
+            0x001D : "Flash fired, auto mode, return light not detected",
225
+            0x001F : "Flash fired, auto mode, return light detected",
226
+            0x0020 : "No flash function",
227
+            0x0041 : "Flash fired, red-eye reduction mode",
228
+            0x0045 : "Flash fired, red-eye reduction mode, return light not detected",
229
+            0x0047 : "Flash fired, red-eye reduction mode, return light detected",
230
+            0x0049 : "Flash fired, compulsory flash mode, red-eye reduction mode",
231
+            0x004D : "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",
232
+            0x004F : "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",
233
+            0x0059 : "Flash fired, auto mode, red-eye reduction mode",
234
+            0x005D : "Flash fired, auto mode, return light not detected, red-eye reduction mode",
235
+            0x005F : "Flash fired, auto mode, return light detected, red-eye reduction mode"
236
+        },
237
+        SensingMethod : {
238
+            1 : "Not defined",
239
+            2 : "One-chip color area sensor",
240
+            3 : "Two-chip color area sensor",
241
+            4 : "Three-chip color area sensor",
242
+            5 : "Color sequential area sensor",
243
+            7 : "Trilinear sensor",
244
+            8 : "Color sequential linear sensor"
245
+        },
246
+        SceneCaptureType : {
247
+            0 : "Standard",
248
+            1 : "Landscape",
249
+            2 : "Portrait",
250
+            3 : "Night scene"
251
+        },
252
+        SceneType : {
253
+            1 : "Directly photographed"
254
+        },
255
+        CustomRendered : {
256
+            0 : "Normal process",
257
+            1 : "Custom process"
258
+        },
259
+        WhiteBalance : {
260
+            0 : "Auto white balance",
261
+            1 : "Manual white balance"
262
+        },
263
+        GainControl : {
264
+            0 : "None",
265
+            1 : "Low gain up",
266
+            2 : "High gain up",
267
+            3 : "Low gain down",
268
+            4 : "High gain down"
269
+        },
270
+        Contrast : {
271
+            0 : "Normal",
272
+            1 : "Soft",
273
+            2 : "Hard"
274
+        },
275
+        Saturation : {
276
+            0 : "Normal",
277
+            1 : "Low saturation",
278
+            2 : "High saturation"
279
+        },
280
+        Sharpness : {
281
+            0 : "Normal",
282
+            1 : "Soft",
283
+            2 : "Hard"
284
+        },
285
+        SubjectDistanceRange : {
286
+            0 : "Unknown",
287
+            1 : "Macro",
288
+            2 : "Close view",
289
+            3 : "Distant view"
290
+        },
291
+        FileSource : {
292
+            3 : "DSC"
293
+        },
294
+
295
+        Components : {
296
+            0 : "",
297
+            1 : "Y",
298
+            2 : "Cb",
299
+            3 : "Cr",
300
+            4 : "R",
301
+            5 : "G",
302
+            6 : "B"
303
+        }
304
+    };
305
+
306
+    function addEvent(element, event, handler) {
307
+        if (element.addEventListener) {
308
+            element.addEventListener(event, handler, false);
309
+        } else if (element.attachEvent) {
310
+            element.attachEvent("on" + event, handler);
311
+        }
312
+    }
313
+
314
+    function imageHasData(img) {
315
+        return !!(img.exifdata);
316
+    }
317
+
318
+
319
+    function base64ToArrayBuffer(base64, contentType) {
320
+        contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/mi)[1] || ''; // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'
321
+        base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, '');
322
+        var binary = atob(base64);
323
+        var len = binary.length;
324
+        var buffer = new ArrayBuffer(len);
325
+        var view = new Uint8Array(buffer);
326
+        for (var i = 0; i < len; i++) {
327
+            view[i] = binary.charCodeAt(i);
328
+        }
329
+        return buffer;
330
+    }
331
+
332
+    function objectURLToBlob(url, callback) {
333
+        var http = new XMLHttpRequest();
334
+        http.open("GET", url, true);
335
+        http.responseType = "blob";
336
+        http.onload = function(e) {
337
+            if (this.status == 200 || this.status === 0) {
338
+                callback(this.response);
339
+            }
340
+        };
341
+        http.send();
342
+    }
343
+
344
+    function getImageData(img, callback) {
345
+        function handleBinaryFile(binFile) {
346
+            var data = findEXIFinJPEG(binFile);
347
+            var iptcdata = findIPTCinJPEG(binFile);
348
+            img.exifdata = data || {};
349
+            img.iptcdata = iptcdata || {};
350
+            if (callback) {
351
+                callback.call(img);
352
+            }
353
+        }
354
+
355
+        if (img.src) {
356
+            if (/^data\:/i.test(img.src)) { // Data URI
357
+                var arrayBuffer = base64ToArrayBuffer(img.src);
358
+                handleBinaryFile(arrayBuffer);
359
+
360
+            } else if (/^blob\:/i.test(img.src)) { // Object URL
361
+                var fileReader = new FileReader();
362
+                fileReader.onload = function(e) {
363
+                    handleBinaryFile(e.target.result);
364
+                };
365
+                objectURLToBlob(img.src, function (blob) {
366
+                    fileReader.readAsArrayBuffer(blob);
367
+                });
368
+            } else {
369
+                var http = new XMLHttpRequest();
370
+                http.onload = function() {
371
+                    if (this.status == 200 || this.status === 0) {
372
+                        handleBinaryFile(http.response);
373
+                    } else {
374
+                        throw "Could not load image";
375
+                    }
376
+                    http = null;
377
+                };
378
+                http.open("GET", img.src, true);
379
+                http.responseType = "arraybuffer";
380
+                http.send(null);
381
+            }
382
+        } else if (window.FileReader && (img instanceof window.Blob || img instanceof window.File)) {
383
+            var fileReader = new FileReader();
384
+            fileReader.onload = function(e) {
385
+                if (debug) console.log("Got file of length " + e.target.result.byteLength);
386
+                handleBinaryFile(e.target.result);
387
+            };
388
+
389
+            fileReader.readAsArrayBuffer(img);
390
+        }
391
+    }
392
+
393
+    function findEXIFinJPEG(file) {
394
+        var dataView = new DataView(file);
395
+
396
+        if (debug) console.log("Got file of length " + file.byteLength);
397
+        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
398
+            if (debug) console.log("Not a valid JPEG");
399
+            return false; // not a valid jpeg
400
+        }
401
+
402
+        var offset = 2,
403
+            length = file.byteLength,
404
+            marker;
405
+
406
+        while (offset < length) {
407
+            if (dataView.getUint8(offset) != 0xFF) {
408
+                if (debug) console.log("Not a valid marker at offset " + offset + ", found: " + dataView.getUint8(offset));
409
+                return false; // not a valid marker, something is wrong
410
+            }
411
+
412
+            marker = dataView.getUint8(offset + 1);
413
+            if (debug) console.log(marker);
414
+
415
+            // we could implement handling for other markers here,
416
+            // but we're only looking for 0xFFE1 for EXIF data
417
+
418
+            if (marker == 225) {
419
+                if (debug) console.log("Found 0xFFE1 marker");
420
+
421
+                return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);
422
+
423
+                // offset += 2 + file.getShortAt(offset+2, true);
424
+
425
+            } else {
426
+                offset += 2 + dataView.getUint16(offset+2);
427
+            }
428
+
429
+        }
430
+
431
+    }
432
+
433
+    function findIPTCinJPEG(file) {
434
+        var dataView = new DataView(file);
435
+
436
+        if (debug) console.log("Got file of length " + file.byteLength);
437
+        if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
438
+            if (debug) console.log("Not a valid JPEG");
439
+            return false; // not a valid jpeg
440
+        }
441
+
442
+        var offset = 2,
443
+            length = file.byteLength;
444
+
445
+
446
+        var isFieldSegmentStart = function(dataView, offset){
447
+            return (
448
+                dataView.getUint8(offset) === 0x38 &&
449
+                dataView.getUint8(offset+1) === 0x42 &&
450
+                dataView.getUint8(offset+2) === 0x49 &&
451
+                dataView.getUint8(offset+3) === 0x4D &&
452
+                dataView.getUint8(offset+4) === 0x04 &&
453
+                dataView.getUint8(offset+5) === 0x04
454
+            );
455
+        };
456
+
457
+        while (offset < length) {
458
+
459
+            if ( isFieldSegmentStart(dataView, offset )){
460
+
461
+                // Get the length of the name header (which is padded to an even number of bytes)
462
+                var nameHeaderLength = dataView.getUint8(offset+7);
463
+                if(nameHeaderLength % 2 !== 0) nameHeaderLength += 1;
464
+                // Check for pre photoshop 6 format
465
+                if(nameHeaderLength === 0) {
466
+                    // Always 4
467
+                    nameHeaderLength = 4;
468
+                }
469
+
470
+                var startOffset = offset + 8 + nameHeaderLength;
471
+                var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);
472
+
473
+                return readIPTCData(file, startOffset, sectionLength);
474
+
475
+                break;
476
+
477
+            }
478
+
479
+
480
+            // Not the marker, continue searching
481
+            offset++;
482
+
483
+        }
484
+
485
+    }
486
+    var IptcFieldMap = {
487
+        0x78 : 'caption',
488
+        0x6E : 'credit',
489
+        0x19 : 'keywords',
490
+        0x37 : 'dateCreated',
491
+        0x50 : 'byline',
492
+        0x55 : 'bylineTitle',
493
+        0x7A : 'captionWriter',
494
+        0x69 : 'headline',
495
+        0x74 : 'copyright',
496
+        0x0F : 'category'
497
+    };
498
+    function readIPTCData(file, startOffset, sectionLength){
499
+        var dataView = new DataView(file);
500
+        var data = {};
501
+        var fieldValue, fieldName, dataSize, segmentType, segmentSize;
502
+        var segmentStartPos = startOffset;
503
+        while(segmentStartPos < startOffset+sectionLength) {
504
+            if(dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos+1) === 0x02){
505
+                segmentType = dataView.getUint8(segmentStartPos+2);
506
+                if(segmentType in IptcFieldMap) {
507
+                    dataSize = dataView.getInt16(segmentStartPos+3);
508
+                    segmentSize = dataSize + 5;
509
+                    fieldName = IptcFieldMap[segmentType];
510
+                    fieldValue = getStringFromDB(dataView, segmentStartPos+5, dataSize);
511
+                    // Check if we already stored a value with this name
512
+                    if(data.hasOwnProperty(fieldName)) {
513
+                        // Value already stored with this name, create multivalue field
514
+                        if(data[fieldName] instanceof Array) {
515
+                            data[fieldName].push(fieldValue);
516
+                        }
517
+                        else {
518
+                            data[fieldName] = [data[fieldName], fieldValue];
519
+                        }
520
+                    }
521
+                    else {
522
+                        data[fieldName] = fieldValue;
523
+                    }
524
+                }
525
+
526
+            }
527
+            segmentStartPos++;
528
+        }
529
+        return data;
530
+    }
531
+
532
+
533
+
534
+    function readTags(file, tiffStart, dirStart, strings, bigEnd) {
535
+        var entries = file.getUint16(dirStart, !bigEnd),
536
+            tags = {},
537
+            entryOffset, tag,
538
+            i;
539
+
540
+        for (i=0;i<entries;i++) {
541
+            entryOffset = dirStart + i*12 + 2;
542
+            tag = strings[file.getUint16(entryOffset, !bigEnd)];
543
+            if (!tag && debug) console.log("Unknown tag: " + file.getUint16(entryOffset, !bigEnd));
544
+            tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);
545
+        }
546
+        return tags;
547
+    }
548
+
549
+
550
+    function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {
551
+        var type = file.getUint16(entryOffset+2, !bigEnd),
552
+            numValues = file.getUint32(entryOffset+4, !bigEnd),
553
+            valueOffset = file.getUint32(entryOffset+8, !bigEnd) + tiffStart,
554
+            offset,
555
+            vals, val, n,
556
+            numerator, denominator;
557
+
558
+        switch (type) {
559
+            case 1: // byte, 8-bit unsigned int
560
+            case 7: // undefined, 8-bit byte, value depending on field
561
+                if (numValues == 1) {
562
+                    return file.getUint8(entryOffset + 8, !bigEnd);
563
+                } else {
564
+                    offset = numValues > 4 ? valueOffset : (entryOffset + 8);
565
+                    vals = [];
566
+                    for (n=0;n<numValues;n++) {
567
+                        vals[n] = file.getUint8(offset + n);
568
+                    }
569
+                    return vals;
570
+                }
571
+
572
+            case 2: // ascii, 8-bit byte
573
+                offset = numValues > 4 ? valueOffset : (entryOffset + 8);
574
+                return getStringFromDB(file, offset, numValues-1);
575
+
576
+            case 3: // short, 16 bit int
577
+                if (numValues == 1) {
578
+                    return file.getUint16(entryOffset + 8, !bigEnd);
579
+                } else {
580
+                    offset = numValues > 2 ? valueOffset : (entryOffset + 8);
581
+                    vals = [];
582
+                    for (n=0;n<numValues;n++) {
583
+                        vals[n] = file.getUint16(offset + 2*n, !bigEnd);
584
+                    }
585
+                    return vals;
586
+                }
587
+
588
+            case 4: // long, 32 bit int
589
+                if (numValues == 1) {
590
+                    return file.getUint32(entryOffset + 8, !bigEnd);
591
+                } else {
592
+                    vals = [];
593
+                    for (n=0;n<numValues;n++) {
594
+                        vals[n] = file.getUint32(valueOffset + 4*n, !bigEnd);
595
+                    }
596
+                    return vals;
597
+                }
598
+
599
+            case 5:    // rational = two long values, first is numerator, second is denominator
600
+                if (numValues == 1) {
601
+                    numerator = file.getUint32(valueOffset, !bigEnd);
602
+                    denominator = file.getUint32(valueOffset+4, !bigEnd);
603
+                    val = new Number(numerator / denominator);
604
+                    val.numerator = numerator;
605
+                    val.denominator = denominator;
606
+                    return val;
607
+                } else {
608
+                    vals = [];
609
+                    for (n=0;n<numValues;n++) {
610
+                        numerator = file.getUint32(valueOffset + 8*n, !bigEnd);
611
+                        denominator = file.getUint32(valueOffset+4 + 8*n, !bigEnd);
612
+                        vals[n] = new Number(numerator / denominator);
613
+                        vals[n].numerator = numerator;
614
+                        vals[n].denominator = denominator;
615
+                    }
616
+                    return vals;
617
+                }
618
+
619
+            case 9: // slong, 32 bit signed int
620
+                if (numValues == 1) {
621
+                    return file.getInt32(entryOffset + 8, !bigEnd);
622
+                } else {
623
+                    vals = [];
624
+                    for (n=0;n<numValues;n++) {
625
+                        vals[n] = file.getInt32(valueOffset + 4*n, !bigEnd);
626
+                    }
627
+                    return vals;
628
+                }
629
+
630
+            case 10: // signed rational, two slongs, first is numerator, second is denominator
631
+                if (numValues == 1) {
632
+                    return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset+4, !bigEnd);
633
+                } else {
634
+                    vals = [];
635
+                    for (n=0;n<numValues;n++) {
636
+                        vals[n] = file.getInt32(valueOffset + 8*n, !bigEnd) / file.getInt32(valueOffset+4 + 8*n, !bigEnd);
637
+                    }
638
+                    return vals;
639
+                }
640
+        }
641
+    }
642
+
643
+    function getStringFromDB(buffer, start, length) {
644
+        var outstr = "";
645
+        for (n = start; n < start+length; n++) {
646
+            outstr += String.fromCharCode(buffer.getUint8(n));
647
+        }
648
+        return outstr;
649
+    }
650
+
651
+    function readEXIFData(file, start) {
652
+        if (getStringFromDB(file, start, 4) != "Exif") {
653
+            if (debug) console.log("Not valid EXIF data! " + getStringFromDB(file, start, 4));
654
+            return false;
655
+        }
656
+
657
+        var bigEnd,
658
+            tags, tag,
659
+            exifData, gpsData,
660
+            tiffOffset = start + 6;
661
+
662
+        // test for TIFF validity and endianness
663
+        if (file.getUint16(tiffOffset) == 0x4949) {
664
+            bigEnd = false;
665
+        } else if (file.getUint16(tiffOffset) == 0x4D4D) {
666
+            bigEnd = true;
667
+        } else {
668
+            if (debug) console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)");
669
+            return false;
670
+        }
671
+
672
+        if (file.getUint16(tiffOffset+2, !bigEnd) != 0x002A) {
673
+            if (debug) console.log("Not valid TIFF data! (no 0x002A)");
674
+            return false;
675
+        }
676
+
677
+        var firstIFDOffset = file.getUint32(tiffOffset+4, !bigEnd);
678
+
679
+        if (firstIFDOffset < 0x00000008) {
680
+            if (debug) console.log("Not valid TIFF data! (First offset less than 8)", file.getUint32(tiffOffset+4, !bigEnd));
681
+            return false;
682
+        }
683
+
684
+        tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);
685
+
686
+        if (tags.ExifIFDPointer) {
687
+            exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);
688
+            for (tag in exifData) {
689
+                switch (tag) {
690
+                    case "LightSource" :
691
+                    case "Flash" :
692
+                    case "MeteringMode" :
693
+                    case "ExposureProgram" :
694
+                    case "SensingMethod" :
695
+                    case "SceneCaptureType" :
696
+                    case "SceneType" :
697
+                    case "CustomRendered" :
698
+                    case "WhiteBalance" :
699
+                    case "GainControl" :
700
+                    case "Contrast" :
701
+                    case "Saturation" :
702
+                    case "Sharpness" :
703
+                    case "SubjectDistanceRange" :
704
+                    case "FileSource" :
705
+                        exifData[tag] = StringValues[tag][exifData[tag]];
706
+                        break;
707
+
708
+                    case "ExifVersion" :
709
+                    case "FlashpixVersion" :
710
+                        exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);
711
+                        break;
712
+
713
+                    case "ComponentsConfiguration" :
714
+                        exifData[tag] =
715
+                            StringValues.Components[exifData[tag][0]] +
716
+                            StringValues.Components[exifData[tag][1]] +
717
+                            StringValues.Components[exifData[tag][2]] +
718
+                            StringValues.Components[exifData[tag][3]];
719
+                        break;
720
+                }
721
+                tags[tag] = exifData[tag];
722
+            }
723
+        }
724
+
725
+        if (tags.GPSInfoIFDPointer) {
726
+            gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);
727
+            for (tag in gpsData) {
728
+                switch (tag) {
729
+                    case "GPSVersionID" :
730
+                        gpsData[tag] = gpsData[tag][0] +
731
+                            "." + gpsData[tag][1] +
732
+                            "." + gpsData[tag][2] +
733
+                            "." + gpsData[tag][3];
734
+                        break;
735
+                }
736
+                tags[tag] = gpsData[tag];
737
+            }
738
+        }
739
+
740
+        return tags;
741
+    }
742
+
743
+    EXIF.getData = function(img, callback) {
744
+        if ((img instanceof Image || img instanceof HTMLImageElement) && !img.complete) return false;
745
+
746
+        if (!imageHasData(img)) {
747
+            getImageData(img, callback);
748
+        } else {
749
+            if (callback) {
750
+                callback.call(img);
751
+            }
752
+        }
753
+        return true;
754
+    }
755
+
756
+    EXIF.getTag = function(img, tag) {
757
+        if (!imageHasData(img)) return;
758
+        return img.exifdata[tag];
759
+    }
760
+
761
+    EXIF.getAllTags = function(img) {
762
+        if (!imageHasData(img)) return {};
763
+        var a,
764
+            data = img.exifdata,
765
+            tags = {};
766
+        for (a in data) {
767
+            if (data.hasOwnProperty(a)) {
768
+                tags[a] = data[a];
769
+            }
770
+        }
771
+        return tags;
772
+    }
773
+
774
+    EXIF.pretty = function(img) {
775
+        if (!imageHasData(img)) return "";
776
+        var a,
777
+            data = img.exifdata,
778
+            strPretty = "";
779
+        for (a in data) {
780
+            if (data.hasOwnProperty(a)) {
781
+                if (typeof data[a] == "object") {
782
+                    if (data[a] instanceof Number) {
783
+                        strPretty += a + " : " + data[a] + " [" + data[a].numerator + "/" + data[a].denominator + "]\r\n";
784
+                    } else {
785
+                        strPretty += a + " : [" + data[a].length + " values]\r\n";
786
+                    }
787
+                } else {
788
+                    strPretty += a + " : " + data[a] + "\r\n";
789
+                }
790
+            }
791
+        }
792
+        return strPretty;
793
+    }
794
+
795
+    EXIF.readFromBinaryFile = function(file) {
796
+        return findEXIFinJPEG(file);
797
+    }
798
+
799
+    if (typeof define === 'function' && define.amd) {
800
+        define('exif-js', [], function() {
801
+            return EXIF;
802
+        });
803
+    }
804
+}.call(this));
805
+

File diff suppressed because it is too large
+ 5 - 0
双汇APP/Common/js/jquery-1.9.1.min.js


File diff suppressed because it is too large
+ 22 - 0
双汇APP/Common/js/jquery.Jcrop.min.js


+ 37 - 21
双汇APP/Common/js/portrait.js

@@ -1,30 +1,46 @@
1 1
 mui.init();
2
-
3
-var a = localStorage.getItem('token')
2
+mui.init({
3
+    beforeback: function() {    
4
+        var list = plus.webview.currentWebview().opener();    
5
+        //refresh是A页面自定义事件
6
+        mui.fire(list, 'refresh');
7
+        //返回true,继续页面关闭逻辑
8
+        return true;
9
+    }
10
+});
4 11
 //初始化单页的区域滚动
5 12
 mui('.mui-scroll-wrapper').scroll();
6
-mui.ajax(huayi.config.callcenter_url + '/UserAccount/GetNowUser', {
7
-	data: {
8
-		token: a,
9
-	},
10
-	dataType: 'json', //服务器返回json格式数据
11
-	type: 'get', //HTTP请求类型
12
-	timeout: 10000, //超时时间设置为10秒;
13
-	headers: {
14
-		'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
15
-	},
16
-	success: function(data) {
13
+mui.plusReady(function() {
14
+	mui.ajax(huayi.config.callcenter_url + '/UserAccount/GetNowUser', {
15
+		data: {
16
+			token: localStorage.getItem("token"),
17
+		},
18
+		dataType: 'json', //服务器返回json格式数据
19
+		async: false,
20
+		type: 'get', //HTTP请求类型
21
+		timeout: 10000, //超时时间设置为10秒;
22
+		headers: {
23
+			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
24
+		},
25
+		success: function(data) {
26
+			var RoleCode = data.data.role.F_RoleCode;
27
+			$(".F_UserName").text(data.data.user.F_UserName);
28
+			$(".rolname").text(data.data.user.F_UserCode);
29
+			if(!data.data.FileUrl[0].F_Url) {
30
+				$(".feedback .image-item").css("background-image", "url(../img/3.png)")
31
+			} else{
32
+				$(".feedback .image-item").css("background-image", "url(" + data.data.FileUrl[0].F_Url + ")")
33
+			}
34
+				
35
+		},
36
+		error: function(xhr, type, errorThrown) {
37
+			//异常处理;
38
+		}
17 39
 
18
-		var RoleCode = data.data.role.F_RoleCode;
19
-		$(".F_UserName").text(data.data.user.F_UserName);
20
-		$(".rolname").text(data.data.user.F_UserCode);
40
+	});
41
+})
21 42
 
22
-	},
23
-	error: function(xhr, type, errorThrown) {
24
-		//异常处理;
25
-	}
26 43
 
27
-});
28 44
 //常见问题
29 45
 //document.getElementById('Question').addEventListener('tap', function() {
30 46
 //	var nwaiting = plus.nativeUI.showWaiting();

+ 17 - 10
双汇APP/Common/portrait_head.html

@@ -2,30 +2,32 @@
2 2
 <html>
3 3
 	<head>
4 4
 		<meta charset="utf-8">
5
-		<title>Hello MUI</title>
5
+		<title>修改资料</title>
6 6
 		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
7 7
 		<meta name="apple-mobile-web-app-capable" content="yes">
8 8
 		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9 9
 		<link rel="stylesheet" href="../css/mui.min.css">
10
+		<link href="../css/feedback-page.css" rel="stylesheet" />
10 11
 		<link rel="stylesheet" href="css/portrait.css" />
11 12
 	</head>
12 13
 	<body>
13 14
 		<header class="mui-bar mui-bar-nav">
14 15
 			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
15
-			<h1 id="title" class="mui-title">常见问题</h1>
16
+			<h1 id="title" class="mui-title">修改资料</h1>
16 17
 		</header>
17
-			<!--页面主内容区开始-->
18
+		<!--页面主内容区开始-->
18 19
 		<div class="mui-page-content" style="margin-top: 44px;">
19 20
 			<div class="mui-scroll-wrapper">
20 21
 				<div class="mui-scroll">
21 22
 					<ul class="mui-table-view mui-table-view-chevron">
22
-						<li class="mui-table-view-cell">
23
-							
24
-							<a id="Question" class="mui-navigate-right">
25
-								头像 <i class="mui-pull-right "></i>
26
-								<img class="posi-head" src="../img/3.png">
27
-							</a>
28
-						</li>
23
+		                <li class="mui-table-view-cell">
24
+		                    <a id="head" class="mui-navigate-right">个人头像
25
+		                        <div class="mui-pull-right feedback">
26
+		                        	<div id='image-list' class="image-list">
27
+		                        	</div>
28
+		                        </div>
29
+		                    </a>
30
+		                </li>
29 31
 						<li class="mui-table-view-cell">
30 32
 							<a id="Bom">用户名 <span class="mui-pull-right F_UserName"></span></a>
31 33
 						</li>
@@ -34,7 +36,9 @@
34 36
 						</li>
35 37
 					</ul>
36 38
 				</div>
39
+				
37 40
 			</div>
41
+			
38 42
 		</div>
39 43
 		<input type="hidden" id="Vb" />
40 44
 		</div>
@@ -43,7 +47,10 @@
43 47
 	</body>
44 48
 	<script src="../js/mui.min.js "></script>
45 49
 	<script src="../js/zepto.js"></script>
50
+	<script src="../js/jquery-1.8.js"></script>
46 51
 	<script src="../js/huayi.config.js"></script>
47 52
 	<script src="../js/mui.view.js "></script>
53
+	<script src="../js/app.js"></script>
54
+	<script src="../js/feedback-page.js"></script>
48 55
 	<script src="js/portrait.js"></script>
49 56
 </html>

+ 3 - 3
双汇APP/Leader-index.html

@@ -139,17 +139,17 @@
139 139
 					return;
140 140
 				}
141 141
 				//更换标题
142
-							title.innerHTML = this.querySelector('.mui-tab-label').innerHTML;
142
+				title.innerHTML = this.querySelector('.mui-tab-label').innerHTML;
143 143
 				//显示目标选项卡
144 144
 				//若为iOS平台或非首次显示,则直接显示
145 145
 				if(mui.os.ios || aniShow[targetTab]) {
146
-					plus.webview.show(targetTab);
146
+					plus.webview.show(targetTab, 1000);
147 147
 				} else {
148 148
 					//否则,使用fade-in动画,且保存变量
149 149
 					var temp = {};
150 150
 					temp[targetTab] = "true";
151 151
 					mui.extend(aniShow, temp);
152
-					plus.webview.show(targetTab, "fade-in", 200);
152
+					plus.webview.show(targetTab, "fade-in", 1000);
153 153
 				}
154 154
 				//隐藏当前;
155 155
 				plus.webview.hide(activeTab);

+ 1 - 0
双汇APP/Setting-1.html

@@ -72,6 +72,7 @@
72 72
 	</body>
73 73
 	<script src="js/mui.min.js "></script>
74 74
 	<script src="js/zepto.js"></script>
75
+	<script src="js/jquery-1.8.js"></script>
75 76
 	<script src="js/huayi.config.js"></script>
76 77
 	<script src="js/mui.view.js "></script>
77 78
 	<script src="js/setting.js"></script>

+ 78 - 0
双汇APP/css/feedback-page.css

@@ -0,0 +1,78 @@
1
+.feedback body {
2
+	background-color: #EFEFF4;
3
+}
4
+.feedback input,
5
+.feedback textarea {
6
+	border: none !important;
7
+}
8
+.feedback textarea {
9
+	height: 100px;
10
+	margin-bottom: 0 !important;
11
+	padding-bottom: 0 !important;
12
+}
13
+.feedback .row {
14
+	width: 100%;
15
+	background-color: #fff;
16
+}
17
+.feedback p {
18
+	padding: 10px 15px 0;
19
+}
20
+.feedback button#submit { 
21
+	width: 90%;
22
+	height: 46px;
23
+	left: 50%;
24
+	-webkit-transform: translate(-50%);
25
+}
26
+.feedback .hidden {
27
+	display: none;
28
+}
29
+.feedback .image-list {
30
+	width: 100%;
31
+	/*height: 90px;*/
32
+	background-size: cover;
33
+	padding: 10px 10px;
34
+	overflow: hidden;
35
+}
36
+.feedback .image-item {
37
+	width: 70px;
38
+	height: 70px;
39
+	/*background-image: url(../img/iconfont-tianjia.png);*/
40
+	background-size: 100% 100%;
41
+	display: inline-block;
42
+	position: relative;
43
+	border-radius: 5px;
44
+	border: solid 1px #e8e8e8;
45
+}
46
+.feedback .image-item input[type="file"] {
47
+	position: absolute;
48
+	left: 0px;
49
+	top: 0px;
50
+	width: 100%;
51
+	height: 100%;
52
+	opacity: 0;
53
+	cursor: pointer;
54
+	z-index: 0;
55
+}
56
+.feedback .image-item.space {
57
+	border: none;
58
+}
59
+.feedback .image-item .image-close {
60
+	position: absolute;
61
+	display: none;
62
+	right: -6px;
63
+	top: -6px;
64
+	width: 20px;
65
+	height: 20px;
66
+	text-align: center;
67
+	line-height: 20px;
68
+	border-radius: 12px;
69
+	background-color: #FF5053;
70
+	color: #f3f3f3;
71
+	border: solid 1px #FF5053;
72
+	font-size: 9px;
73
+	font-weight: 200;
74
+	z-index: 1;
75
+}
76
+.feedback .image-item.space .image-close {
77
+	display: none;
78
+}

+ 115 - 0
双汇APP/css/feedback.css

@@ -0,0 +1,115 @@
1
+/*!
2
+ * ======================================================
3
+ * FeedBack Template For MUI (http://dev.dcloud.net.cn/mui)
4
+ * =======================================================
5
+ * @version:1.0.0
6
+ * @author:cuihongbao@dcloud.io
7
+ */
8
+
9
+.feedback body {
10
+	background-color: #EFEFF4;
11
+}
12
+.feedback input,
13
+.feedback textarea {
14
+	border: none !important;
15
+}
16
+.feedback textarea {
17
+	height: 100px;
18
+	margin-bottom: 0 !important;
19
+	padding-bottom: 0 !important;
20
+}
21
+.feedback .row {
22
+	width: 100%;
23
+	background-color: #fff;
24
+}
25
+.feedback p {
26
+	padding: 10px 15px 0;
27
+}
28
+/*.feedback button#submit { 
29
+	width: 90%;
30
+	height: 46px;
31
+	left: 50%;
32
+	-webkit-transform: translate(-50%);
33
+}*/
34
+
35
+input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
36
+	font-size: 14px;
37
+}
38
+
39
+.feedback .hidden {
40
+	display: none;
41
+}
42
+.feedback .image-list {
43
+	width: 100%;
44
+	height: 85px;
45
+	background-size: cover;
46
+	padding: 10px 10px;
47
+	overflow: hidden;
48
+}
49
+.feedback .image-item {
50
+	width: 65px;
51
+	height: 65px;
52
+	background-image: url(../img/iconfont-tianjia.png);
53
+	background-size: 100% 100%;
54
+	display: inline-block;
55
+	position: relative;
56
+	border-radius: 5px;
57
+	margin-right: 10px;
58
+	margin-bottom: 10px;
59
+	border: solid 1px #e8e8e8;
60
+}
61
+.feedback .image-item .file {
62
+	position: absolute;
63
+	left: 0px;
64
+	top: 0px;
65
+	width: 100%;
66
+	height: 100%;
67
+	opacity: 0;
68
+	cursor: pointer;
69
+	z-index: 0;
70
+}
71
+.feedback .image-item.space {
72
+	border: none;
73
+}
74
+.feedback .image-item .image-close {
75
+	position: absolute;
76
+	display: inline-block;
77
+	right: -6px;
78
+	top: -6px;
79
+	width: 20px;
80
+	height: 20px;
81
+	text-align: center;
82
+	line-height: 20px;
83
+	border-radius: 12px;
84
+	background-color: #FF5053;
85
+	color: #f3f3f3;
86
+	border: solid 1px #FF5053;
87
+	font-size: 9px;
88
+	font-weight: 200;
89
+	z-index: 1;
90
+}
91
+.feedback .image-item.space .image-close {
92
+	display: none;
93
+}
94
+.feedback .mui-inline{
95
+	vertical-align: bottom;
96
+	font-size: 14px;
97
+	color: #8f8f94;
98
+}
99
+.mui-icon-star{
100
+	color: #B5B5B5;
101
+	font-size: 22px;
102
+}
103
+.mui-icon-star-filled{
104
+	color: #FFB400;
105
+	font-size: 22px;
106
+} 
107
+.mui-popover {
108
+	height: 180px;
109
+}
110
+.stream{
111
+	display: none;
112
+}
113
+.mui-plus-stream .stream{
114
+	display: block;
115
+}

+ 367 - 352
双汇APP/css/personal.css

@@ -1,353 +1,368 @@
1 1
 html,
2
-			body {
3
-				background-color: #efeff4;
4
-			}
5
-			.mui-views,
6
-			.mui-view,
7
-			.mui-pages,
8
-			.mui-page,
9
-			.mui-page-content {
10
-				position: absolute;
11
-				left: 0;
12
-				right: 0;
13
-				top: 0;
14
-				bottom: 0;
15
-				width: 100%;
16
-				height: 100%;
17
-				background-color: #efeff4;
18
-			}
19
-			
20
-			.mui-pages {
21
-				top: 46px;
22
-				height: auto;
23
-			}
24
-			
25
-			.mui-scroll-wrapper,
26
-			.mui-scroll {
27
-				background-color: #efeff4;
28
-			}
29
-			
30
-			.mui-page.mui-transitioning {
31
-				-webkit-transition: -webkit-transform 300ms ease;
32
-				transition: transform 300ms ease;
33
-			}
34
-			
35
-			.mui-page-left {
36
-				-webkit-transform: translate3d(0, 0, 0);
37
-				transform: translate3d(0, 0, 0);
38
-			}
39
-			
40
-			.mui-ios .mui-page-left {
41
-				-webkit-transform: translate3d(-20%, 0, 0);
42
-				transform: translate3d(-20%, 0, 0);
43
-			}
44
-			
45
-			.mui-bar-nav {
46
-				background-color: #00a1cb;
47
-			}
48
-			
49
-			.mui-navbar {
50
-				position: fixed;
51
-				right: 0;
52
-				left: 0;
53
-				z-index: 10;
54
-				height: 44px;
55
-				background-color: #00a1cb;
56
-			}
57
-			
58
-			.mui-navbar .mui-bar {
59
-				position: absolute;
60
-				background: transparent;
61
-				text-align: center;
62
-			}
63
-			
64
-			.mui-android .mui-navbar-inner.mui-navbar-left {
65
-				opacity: 0;
66
-			}
67
-			
68
-			.mui-ios .mui-navbar-left .mui-left,
69
-			.mui-ios .mui-navbar-left .mui-center,
70
-			.mui-ios .mui-navbar-left .mui-right {
71
-				opacity: 0;
72
-			}
73
-			
74
-			.mui-navbar .mui-btn-nav {
75
-				-webkit-transition: none;
76
-				transition: none;
77
-				-webkit-transition-duration: .0s;
78
-				transition-duration: .0s;
79
-			}
80
-			
81
-			.mui-navbar .mui-bar .mui-title {
82
-				display: inline-block;
83
-				width: auto;
84
-			}
85
-			
86
-			.mui-page-shadow {
87
-				position: absolute;
88
-				right: 100%;
89
-				top: 0;
90
-				width: 16px;
91
-				height: 100%;
92
-				z-index: -1;
93
-				content: '';
94
-			}
95
-			
96
-			.mui-page-shadow {
97
-				background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
98
-				background: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
99
-			}
100
-			
101
-			.mui-navbar-inner.mui-transitioning,
102
-			.mui-navbar-inner .mui-transitioning {
103
-				-webkit-transition: opacity 300ms ease, -webkit-transform 300ms ease;
104
-				transition: opacity 300ms ease, transform 300ms ease;
105
-			}
106
-			
107
-			.mui-page {
108
-				display: none;
109
-			}
110
-			
111
-			.mui-pages .mui-page {
112
-				display: block;
113
-			}
114
-			
115
-			.mui-page .mui-table-view:first-child {
116
-				margin-top: 15px;
117
-			}
118
-			
119
-			.mui-page .mui-table-view:last-child {
120
-				margin-bottom: 30px;
121
-			}
122
-			
123
-			.mui-table-view {
124
-				margin-top: 20px;
125
-			}
126
-			
127
-			.mui-table-view span.mui-pull-right {
128
-				color: #999;
129
-			}
130
-			
131
-			.mui-table-view-divider {
132
-				background-color: #efeff4;
133
-				font-size: 14px;
134
-			}
135
-			
136
-			.mui-table-view-divider:before,
137
-			.mui-table-view-divider:after {
138
-				height: 0;
139
-			}
140
-			
141
-			.head {
142
-				height: 40px;
143
-			}
144
-			
145
-			#head {
146
-				line-height: 40px;
147
-			}
148
-			
149
-			.head-img {
150
-				width: 40px;
151
-				height: 40px;
152
-			}
153
-			
154
-			#head-img1 {
155
-				position: absolute;
156
-				bottom: 10px;
157
-				right: 40px;
158
-				width: 40px;
159
-				height: 40px;
160
-			}
161
-			
162
-			.update {
163
-				font-style: normal;
164
-				color: #999999;
165
-				margin-right: -25px;
166
-				font-size: 15px;
167
-			}
168
-			
169
-			.mui-fullscreen {
170
-				position: fixed;
171
-				z-index: 20;
172
-				background-color: #000;
173
-			}
174
-			
175
-			.mui-ios .mui-navbar .mui-bar .mui-title {
176
-				position: static;
177
-			}
178
-			
179
-			.mui-title {
180
-				color: #fff!important;
181
-			}
182
-			
183
-			#img1 {
184
-				width: 100%;
185
-			}
186
-			
187
-			.mui-grid-view.mui-grid-9 .mui-table-view-cell {
188
-				padding: 11px 10px;
189
-			}
190
-			
191
-			.Content .mui-media-body {
192
-				width: 50%;
193
-			}
194
-			
195
-			.mui-icon {
196
-				font-size: 20px!important;
197
-				vertical-align: sub;
198
-			}
199
-			
200
-			.Blue {
201
-				color: #1775c2;
202
-			}
203
-			/*图标颜色*/
204
-			
205
-			.yellow {
206
-				color: #f68d20;
207
-			}
208
-			
209
-			.blue {
210
-				color: #1775C2;
211
-			}
212
-			
213
-			.blues {
214
-				color: #1677be;
215
-			}
216
-			
217
-			.green {
218
-				color: #008a4d;
219
-			}
220
-			
221
-			.red {
222
-				color: #e4415d;
223
-			}
224
-			
225
-			.Content {
226
-				background-color: #fff;
227
-			}
228
-			
229
-			.Content-title {
230
-				margin-left: 8px;
231
-			}
232
-			
233
-			.Content-title h5 {
234
-				margin: 0;
235
-				line-height: 34px;
236
-				color: #797979;
237
-				
238
-			}
239
-			
240
-			.size-16 {
241
-				font-size: 16px;
242
-			}
243
-			
244
-			.size-14 {
245
-				font-size: 14px;
246
-			}
247
-			.size-13 {
248
-				font-size: 13px;
249
-			}
250
-			.Left-icon {
251
-				width: 20%;
252
-				line-height: 40px;
253
-				margin-right: 3px;
254
-			}
255
-			
256
-			.mui-pull-left h4 {
257
-				font-size: 13px;
258
-				margin-bottom: 8px;
259
-			}
260
-			
261
-			.mui-pull-left h5 {
262
-				font-size: 12px;
263
-			}
264
-			
265
-			#IMG-box {
266
-				background-color: #fff;
267
-			}
268
-			
269
-			.Common-box li {
270
-				display: none;
271
-				position: relative;
272
-			
273
-			}
274
-			.stateIcon{
275
-				position: absolute;
276
-				right: 6px;
277
-				top: 6px;
278
-				width: 20px;
279
-				height: 20px;
280
-				color: #FFFFFF;
281
-				background: #FF1B41;
282
-				border-radius: 10px;
283
-				font-size: 12px;
284
-			}
285
-			.red {
286
-				color: #ff1b41;
287
-			}
288
-			
289
-			.marquee {
290
-				overflow: hidden;
291
-				line-height: 40px;
292
-				background-color: #fff;
293
-				margin-bottom: 8px;
294
-				margin-top: -5px;
295
-			}
296
-			
297
-			.marquee-span {
298
-				font-size: 12px;
299
-				color: #797979;
300
-				font-weight: bold;
301
-				
302
-			}
303
-			
304
-			.Icon {
305
-				/*height: 30px; */
306
-				padding: 5px;
307
-				/* width: 30px; */
308
-				border-radius: 50%;
309
-				width: 34px;
310
-				margin: 0 auto;
311
-			}
312
-			
313
-			.Icon i {
314
-				color: #fff;
315
-			}
316
-			
317
-			.icon-1 {
318
-				background-color: #ff9600;
319
-			}
320
-			
321
-			.icon-2 {
322
-				background-color: #4692f8;
323
-			}
324
-			
325
-			.icon-3 {
326
-				background-color: #ff784b;
327
-			}
328
-			
329
-			.icon-4 {
330
-				background-color: #7068e2;
331
-			}
332
-			
333
-			.icon-7 {
334
-				background-color: #1bce8d;
335
-			}
336
-			
337
-			.icon-6 {
338
-				background-color: #f26665;
339
-			}
340
-			.mui-grid-view.mui-grid-9 .mui-table-view-cell{
341
-				/*border: none;*/
342
-				
343
-			}
344
-			.mui-grid-view.mui-grid-9:after{
345
-				position:absolute;
346
-			}
347
-			.font-weight-bold{
348
-				font-weight: bold;
349
-				color: #797979 !important;
350
-			}
351
-			.mui-h5, h5{
352
-				font-size: 13px;
353
-			}
2
+body {
3
+	background-color: #efeff4;
4
+}
5
+
6
+.mui-views,
7
+.mui-view,
8
+.mui-pages,
9
+.mui-page,
10
+.mui-page-content {
11
+	position: absolute;
12
+	left: 0;
13
+	right: 0;
14
+	top: 0;
15
+	bottom: 0;
16
+	width: 100%;
17
+	height: 100%;
18
+	background-color: #efeff4;
19
+}
20
+
21
+.mui-pages {
22
+	top: 46px;
23
+	height: auto;
24
+}
25
+
26
+.mui-scroll-wrapper,
27
+.mui-scroll {
28
+	background-color: #efeff4;
29
+}
30
+
31
+.mui-page.mui-transitioning {
32
+	-webkit-transition: -webkit-transform 300ms ease;
33
+	transition: transform 300ms ease;
34
+}
35
+
36
+.mui-page-left {
37
+	-webkit-transform: translate3d(0, 0, 0);
38
+	transform: translate3d(0, 0, 0);
39
+}
40
+
41
+.mui-ios .mui-page-left {
42
+	-webkit-transform: translate3d(-20%, 0, 0);
43
+	transform: translate3d(-20%, 0, 0);
44
+}
45
+
46
+.mui-bar-nav {
47
+	background-color: #00a1cb;
48
+}
49
+
50
+.mui-navbar {
51
+	position: fixed;
52
+	right: 0;
53
+	left: 0;
54
+	z-index: 10;
55
+	height: 44px;
56
+	background-color: #00a1cb;
57
+}
58
+
59
+.mui-navbar .mui-bar {
60
+	position: absolute;
61
+	background: transparent;
62
+	text-align: center;
63
+}
64
+
65
+.mui-android .mui-navbar-inner.mui-navbar-left {
66
+	opacity: 0;
67
+}
68
+
69
+.mui-ios .mui-navbar-left .mui-left,
70
+.mui-ios .mui-navbar-left .mui-center,
71
+.mui-ios .mui-navbar-left .mui-right {
72
+	opacity: 0;
73
+}
74
+
75
+.mui-navbar .mui-btn-nav {
76
+	-webkit-transition: none;
77
+	transition: none;
78
+	-webkit-transition-duration: .0s;
79
+	transition-duration: .0s;
80
+}
81
+
82
+.mui-navbar .mui-bar .mui-title {
83
+	display: inline-block;
84
+	width: auto;
85
+}
86
+
87
+.mui-page-shadow {
88
+	position: absolute;
89
+	right: 100%;
90
+	top: 0;
91
+	width: 16px;
92
+	height: 100%;
93
+	z-index: -1;
94
+	content: '';
95
+}
96
+
97
+.mui-page-shadow {
98
+	background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
99
+	background: linear-gradient(to right, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, .01) 50%, rgba(0, 0, 0, .2) 100%);
100
+}
101
+
102
+.mui-navbar-inner.mui-transitioning,
103
+.mui-navbar-inner .mui-transitioning {
104
+	-webkit-transition: opacity 300ms ease, -webkit-transform 300ms ease;
105
+	transition: opacity 300ms ease, transform 300ms ease;
106
+}
107
+
108
+.mui-page {
109
+	display: none;
110
+}
111
+
112
+.mui-pages .mui-page {
113
+	display: block;
114
+}
115
+
116
+.mui-page .mui-table-view:first-child {
117
+	margin-top: 15px;
118
+}
119
+
120
+.mui-page .mui-table-view:last-child {
121
+	margin-bottom: 30px;
122
+}
123
+
124
+.mui-table-view {
125
+	margin-top: 20px;
126
+}
127
+
128
+.mui-table-view span.mui-pull-right {
129
+	color: #999;
130
+}
131
+
132
+.mui-table-view-divider {
133
+	background-color: #efeff4;
134
+	font-size: 14px;
135
+}
136
+
137
+.mui-table-view-divider:before,
138
+.mui-table-view-divider:after {
139
+	height: 0;
140
+}
141
+
142
+.head {
143
+	height: 40px;
144
+}
145
+
146
+#head {
147
+	line-height: 40px;
148
+}
149
+
150
+.head-img {
151
+	width: 40px;
152
+	height: 40px;
153
+}
154
+
155
+#head-img1 {
156
+	position: absolute;
157
+	bottom: 10px;
158
+	right: 40px;
159
+	width: 40px;
160
+	height: 40px;
161
+}
162
+
163
+.update {
164
+	font-style: normal;
165
+	color: #999999;
166
+	margin-right: -25px;
167
+	font-size: 15px;
168
+}
169
+
170
+.mui-fullscreen {
171
+	position: fixed;
172
+	z-index: 20;
173
+	background-color: #000;
174
+}
175
+
176
+.mui-ios .mui-navbar .mui-bar .mui-title {
177
+	position: static;
178
+}
179
+
180
+.mui-title {
181
+	color: #fff!important;
182
+}
183
+
184
+#img1 {
185
+	width: 100%;
186
+}
187
+
188
+.mui-grid-view.mui-grid-9 .mui-table-view-cell {
189
+	padding: 11px 10px;
190
+}
191
+
192
+.Content .mui-media-body {
193
+	width: 50%;
194
+}
195
+
196
+.mui-icon {
197
+	font-size: 20px!important;
198
+	vertical-align: sub;
199
+}
200
+
201
+.Blue {
202
+	color: #1775c2;
203
+}
204
+
205
+
206
+/*图标颜色*/
207
+
208
+.yellow {
209
+	color: #f68d20;
210
+}
211
+
212
+.blue {
213
+	color: #1775C2;
214
+}
215
+
216
+.blues {
217
+	color: #1677be;
218
+}
219
+
220
+.green {
221
+	color: #008a4d;
222
+}
223
+
224
+.red {
225
+	color: #e4415d;
226
+}
227
+
228
+.Content {
229
+	background-color: #fff;
230
+}
231
+
232
+.Content-title {
233
+	margin-left: 8px;
234
+}
235
+
236
+.Content-title h5 {
237
+	margin: 0;
238
+	line-height: 34px;
239
+	color: #797979;
240
+}
241
+
242
+.size-16 {
243
+	font-size: 16px;
244
+}
245
+
246
+.size-14 {
247
+	font-size: 14px;
248
+}
249
+
250
+.size-13 {
251
+	font-size: 13px;
252
+}
253
+
254
+.Left-icon {
255
+	width: 20%;
256
+	line-height: 40px;
257
+	margin-right: 3px;
258
+}
259
+
260
+.mui-pull-left h4 {
261
+	font-size: 13px;
262
+	margin-bottom: 8px;
263
+}
264
+
265
+.mui-pull-left h5 {
266
+	font-size: 12px;
267
+}
268
+
269
+#IMG-box {
270
+	background-color: #fff;
271
+}
272
+
273
+.Common-box li {
274
+	display: none;
275
+	position: relative;
276
+}
277
+
278
+.stateIcon {
279
+	position: absolute;
280
+	right: 6px;
281
+	top: 6px;
282
+	width: 20px;
283
+	height: 20px;
284
+	color: #FFFFFF;
285
+	background: #FF1B41;
286
+	border-radius: 10px;
287
+	font-size: 12px;
288
+}
289
+
290
+.red {
291
+	color: #ff1b41;
292
+}
293
+
294
+.marquee {
295
+	overflow: hidden;
296
+	line-height: 40px;
297
+	background-color: #fff;
298
+	margin-bottom: 8px;
299
+	margin-top: -5px;
300
+}
301
+
302
+.marquee-span {
303
+	font-size: 12px;
304
+	color: #797979;
305
+	font-weight: bold;
306
+}
307
+
308
+.Icon {
309
+	/*height: 30px; */
310
+	padding: 5px;
311
+	/* width: 30px; */
312
+	border-radius: 50%;
313
+	width: 34px;
314
+	margin: 0 auto;
315
+}
316
+
317
+.Icon i {
318
+	color: #fff;
319
+}
320
+
321
+.icon-1 {
322
+	background-color: #ff9600;
323
+}
324
+
325
+.icon-2 {
326
+	background-color: #4692f8;
327
+}
328
+
329
+.icon-3 {
330
+	background-color: #ff784b;
331
+}
332
+
333
+.icon-4 {
334
+	background-color: #7068e2;
335
+}
336
+
337
+.icon-7 {
338
+	background-color: #1bce8d;
339
+}
340
+
341
+.icon-6 {
342
+	background-color: #f26665;
343
+}
344
+
345
+.mui-grid-view.mui-grid-9 .mui-table-view-cell {
346
+	/*border: none;*/
347
+}
348
+
349
+.mui-grid-view.mui-grid-9:after {
350
+	position: absolute;
351
+}
352
+
353
+.font-weight-bold {
354
+	font-weight: bold;
355
+	color: #797979 !important;
356
+}
357
+
358
+.mui-h5,
359
+h5 {
360
+	font-size: 13px;
361
+}
362
+.RoleCode_0,.RoleCode_1,.RoleCode_2,.RoleCode_3{
363
+	display: none;
364
+}
365
+
366
+
367
+
368
+

+ 2 - 0
双汇APP/css/setting.css

@@ -231,10 +231,12 @@ p {
231 231
 	position: absolute;
232 232
 	width: 78px;
233 233
 	height: 78px;
234
+	
234 235
 }
235 236
 .top_left img{
236 237
 	width: 100%;
237 238
 	height: 100%;
239
+	border-radius: 39px;
238 240
 }
239 241
 .top_text{
240 242
 	position: absolute;

+ 7 - 0
双汇APP/js/Work-Add.js

@@ -1,5 +1,12 @@
1 1
 mui.init({
2 2
 	swipeBack: false,
3
+	beforeback: function() {    
4
+        var list = plus.webview.currentWebview().opener();    
5
+        //refresh是A页面自定义事件
6
+        mui.fire(list, 'refreshPer');
7
+        //返回true,继续页面关闭逻辑
8
+        return true;
9
+    }
3 10
 })
4 11
 mui.plusReady(function() {
5 12
 	var wv = plus.webview.currentWebview();

+ 110 - 0
双汇APP/js/feedback-page.js

@@ -0,0 +1,110 @@
1
+(function(mui, window, document, undefined) {
2
+	mui.init();
3
+	var get = function(id) {
4
+		return document.getElementById(id);
5
+	};
6
+	var qsa = function(sel) {
7
+		return [].slice.call(document.querySelectorAll(sel));
8
+	};
9
+	var ui = {
10
+		question: get('question'),
11
+		contact: get('contact'),
12
+		imageList: get('image-list'),
13
+		submit: get('submit')
14
+	};
15
+	ui.clearForm = function() {
16
+		ui.question.value = '';
17
+		ui.contact.value = '';
18
+		ui.imageList.innerHTML = '';
19
+		ui.newPlaceholder();
20
+	};
21
+	ui.getFileInputArray = function() {
22
+		return [].slice.call(ui.imageList.querySelectorAll('input[type="file"]'));
23
+	};
24
+	ui.getFileInputIdArray = function() {
25
+		var fileInputArray = ui.getFileInputArray();
26
+		var idArray = [];
27
+		fileInputArray.forEach(function(fileInput) {
28
+			if(fileInput.value != '') {
29
+				idArray.push(fileInput.getAttribute('id'));
30
+			}
31
+		});
32
+		return idArray;
33
+	};
34
+	var imageIndexIdNum = 0;
35
+	ui.newPlaceholder = function() {
36
+		var fileInputArray = ui.getFileInputArray();
37
+		if(fileInputArray &&fileInputArray.length >0) {
38
+			return;
39
+		}
40
+		imageIndexIdNum++;
41
+		var placeholder = document.createElement('div');
42
+		placeholder.setAttribute('class', 'image-item space');
43
+		var closeButton = document.createElement('div');
44
+		closeButton.setAttribute('class', 'image-close');
45
+		closeButton.innerHTML = 'X';
46
+		closeButton.addEventListener('click', function(event) {
47
+			event.stopPropagation();
48
+			event.cancelBubble = true;
49
+			setTimeout(function() {
50
+				ui.imageList.removeChild(placeholder);
51
+			}, 0);
52
+			return false;
53
+		}, false);
54
+		var fileInput = document.createElement('input');
55
+		fileInput.setAttribute('type', 'file');
56
+		fileInput.setAttribute('class', 'image-box ');
57
+		fileInput.setAttribute('accept', 'image/*');
58
+		fileInput.setAttribute('id', 'image-' + imageIndexIdNum);
59
+
60
+		fileInput.addEventListener('change', function(event) {
61
+			var file = fileInput.files[0];
62
+			var lengh = document.getElementsByClassName("image-item").length;
63
+			if(lengh <6) {
64
+				if(file) {
65
+					var filename = $("#image-" + imageIndexIdNum).val();
66
+					fileName = filename.split("\\")[2];
67
+					var reader = new FileReader();
68
+					reader.onload = function() {
69
+						//处理 android 4.1 兼容问题
70
+						var base64 = reader.result.split(',')[1];
71
+						var dataUrl = 'data:image/png;base64,' + base64;
72
+						var usercode = localStorage.getItem("user"); //获取本地存储
73
+						placeholder.style.backgroundImage = 'url(' + dataUrl + ')';
74
+						$.ajax({
75
+							type: "post",
76
+							url: huayi.config.callcenter_url + 'Index/Upload64',
77
+							async: true,
78
+							dataType: 'json',
79
+							data: {
80
+								dataurl: dataUrl,
81
+								usercode: localStorage.getItem("user"),
82
+								filename:fileName,
83
+								token:localStorage.getItem("token")
84
+							},
85
+							success: function(data) {
86
+								if(data.state == "success") {
87
+									fileInput.setAttribute('indexs', data.data.F_Id);
88
+									mui.toast('上传成功'); 
89
+								} else {
90
+									mui.alert(data.message);
91
+								}
92
+							}
93
+						});
94
+					}
95
+
96
+					reader.readAsDataURL(file);
97
+					placeholder.classList.remove('space');
98
+					ui.newPlaceholder();
99
+				}
100
+			}else{
101
+				mui.toast('最多上传五张');
102
+			}
103
+
104
+		}, false);
105
+		placeholder.appendChild(closeButton);
106
+		placeholder.appendChild(fileInput);
107
+		ui.imageList.appendChild(placeholder);
108
+	};
109
+	ui.newPlaceholder();
110
+})(mui, window, document, undefined);

+ 221 - 0
双汇APP/js/feedback.js

@@ -0,0 +1,221 @@
1
+/*!
2
+ * ======================================================
3
+ * FeedBack Template For MUI (http://dev.dcloud.net.cn/mui)
4
+ * =======================================================
5
+ * @version:1.0.0
6
+ * @author:cuihongbao@dcloud.io
7
+ */
8
+(function() {
9
+	var index = 1;
10
+	var size = null;
11
+	var imageIndexIdNum = 0;
12
+	var starIndex = 0;
13
+	var feedback = {
14
+		question: document.getElementById('question'), 
15
+		contact: document.getElementById('contact'), 
16
+		imageList: document.getElementById('image-list'),
17
+		submitBtn: document.getElementById('submit')
18
+	};
19
+	var url = 'https://service.dcloud.net.cn/feedback';
20
+	feedback.files = [];
21
+	feedback.uploader = null;  
22
+	feedback.deviceInfo = null; 
23
+	mui.plusReady(function() {
24
+		//设备信息,无需修改
25
+		feedback.deviceInfo = {
26
+			appid: plus.runtime.appid, 
27
+			imei: plus.device.imei, //设备标识
28
+			images: feedback.files, //图片文件
29
+			p: mui.os.android ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
30
+			md: plus.device.model, //设备型号
31
+			app_version: plus.runtime.version,
32
+			plus_versin: plus.runtime.innerVersion, //基座版本号
33
+			os:  mui.os.version,
34
+			net: ''+plus.networkinfo.getCurrentType()
35
+		}
36
+	});
37
+	/**
38
+	 *提交成功之后,恢复表单项 
39
+	 */
40
+	feedback.clearForm = function() {
41
+		feedback.question.value = '';
42
+		feedback.contact.value = '';
43
+		feedback.imageList.innerHTML = '';
44
+		feedback.newPlaceholder();
45
+		feedback.files = [];
46
+		index = 0;
47
+		size = 0;
48
+		imageIndexIdNum = 0;
49
+		starIndex = 0;
50
+		//清除所有星标
51
+		mui('.icons i').each(function (index,element) {
52
+			if (element.classList.contains('mui-icon-star-filled')) {
53
+				element.classList.add('mui-icon-star')
54
+	  			element.classList.remove('mui-icon-star-filled')
55
+			}
56
+		})
57
+	};
58
+	feedback.getFileInputArray = function() {
59
+		return [].slice.call(feedback.imageList.querySelectorAll('.file'));
60
+	};
61
+	feedback.addFile = function(path) {
62
+		feedback.files.push({name:"images"+index,path:path});
63
+		index++;
64
+	};
65
+	/**
66
+	 * 初始化图片域占位
67
+	 */
68
+	feedback.newPlaceholder = function() {
69
+		var fileInputArray = feedback.getFileInputArray();
70
+		if (fileInputArray &&
71
+			fileInputArray.length > 0 &&
72
+			fileInputArray[fileInputArray.length - 1].parentNode.classList.contains('space')) {
73
+			return;
74
+		};
75
+		imageIndexIdNum++;
76
+		var placeholder = document.createElement('div');
77
+		placeholder.setAttribute('class', 'image-item space');
78
+		//删除图片
79
+		var closeButton = document.createElement('div');
80
+		closeButton.setAttribute('class', 'image-close');
81
+		closeButton.innerHTML = 'X';
82
+		//小X的点击事件
83
+		closeButton.addEventListener('tap', function(event) {
84
+			setTimeout(function() {
85
+				feedback.imageList.removeChild(placeholder);
86
+			}, 0);
87
+			return false;
88
+		}, false);
89
+		
90
+		//
91
+		var fileInput = document.createElement('div');
92
+		fileInput.setAttribute('class', 'file');
93
+		fileInput.setAttribute('id', 'image-' + imageIndexIdNum);
94
+		fileInput.addEventListener('tap', function(event) {
95
+			var self = this;
96
+			var index = (this.id).substr(-1);
97
+			
98
+			plus.gallery.pick(function(e) {
99
+//				console.log("event:"+e);
100
+				var name = e.substr(e.lastIndexOf('/') + 1);
101
+				console.log("name:"+name);
102
+					
103
+				plus.zip.compressImage({
104
+					src: e,
105
+					dst: '_doc/' + name,
106
+					overwrite: true,
107
+					quality: 50
108
+				}, function(zip) {
109
+					size += zip.size  
110
+					console.log("filesize:"+zip.size+",totalsize:"+size);
111
+					if (size > (10*1024*1024)) {
112
+						return mui.toast('文件超大,请重新选择~');
113
+					}
114
+					if (!self.parentNode.classList.contains('space')) { //已有图片
115
+						feedback.files.splice(index-1,1,{name:"images"+index,path:e});
116
+					} else { //加号
117
+						placeholder.classList.remove('space');
118
+						feedback.addFile(zip.target);
119
+						feedback.newPlaceholder();
120
+					}
121
+					placeholder.style.backgroundImage = 'url(' + zip.target + ')';
122
+				}, function(zipe) {
123
+					mui.toast('压缩失败!')
124
+				});
125
+				
126
+
127
+				
128
+			}, function(e) {
129
+				mui.toast(e.message);
130
+			},{});
131
+		}, false);
132
+		placeholder.appendChild(closeButton);
133
+		placeholder.appendChild(fileInput);
134
+		feedback.imageList.appendChild(placeholder);
135
+	};
136
+	feedback.newPlaceholder();
137
+	feedback.submitBtn.addEventListener('tap', function(event) {
138
+		if (feedback.question.value == '' ||
139
+			(feedback.contact.value != '' &&
140
+				feedback.contact.value.search(/^(\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+)|([1-9]\d{4,9})$/) != 0)) {
141
+			return mui.toast('信息填写不符合规范');
142
+		}
143
+		if (feedback.question.value.length > 200 || feedback.contact.value.length > 200) {
144
+			return mui.toast('信息超长,请重新填写~')
145
+		}
146
+		//判断网络连接
147
+		if(plus.networkinfo.getCurrentType()==plus.networkinfo.CONNECTION_NONE){
148
+			return mui.toast("连接网络失败,请稍后再试");
149
+		}
150
+		feedback.send(mui.extend({}, feedback.deviceInfo, {
151
+			content: feedback.question.value,
152
+			contact: feedback.contact.value,
153
+			images: feedback.files,
154
+			score:''+starIndex
155
+		})) 
156
+	}, false)
157
+	feedback.send = function(content) {
158
+		feedback.uploader = plus.uploader.createUpload(url, {
159
+			method: 'POST'
160
+		}, function(upload, status) {
161
+//			plus.nativeUI.closeWaiting()
162
+			console.log("upload cb:"+upload.responseText);
163
+			console.log("upload status:"+status);
164
+			if(status==200){
165
+				var data = JSON.parse(upload.responseText);
166
+				//上传成功,重置表单
167
+				if (data.ret === 0 && data.desc === 'Success') {
168
+					console.log("upload success");
169
+				}
170
+			}else{
171
+				console.log("upload fail");
172
+			}
173
+		});
174
+		//添加上传数据
175
+		mui.each(content, function(index, element) {
176
+			if (index !== 'images') {
177
+//				console.log("addData:"+index+","+element);
178
+				feedback.uploader.addData(index, element)
179
+			} 
180
+		});
181
+		//添加上传文件
182
+		mui.each(feedback.files, function(index, element) {
183
+			var f = feedback.files[index];
184
+//			console.log("addFile:"+JSON.stringify(f));
185
+			feedback.uploader.addFile(f.path, {
186
+				key: f.name
187
+			});
188
+		});
189
+		
190
+		//开始上传任务
191
+		feedback.uploader.start();
192
+		mui.alert("感谢反馈,点击确定关闭","问题反馈","确定",function () {
193
+			feedback.clearForm();
194
+			mui.back();
195
+		});
196
+	};
197
+	
198
+	 //应用评分
199
+	 mui('.icons').on('tap','i',function(){
200
+	  	var index = parseInt(this.getAttribute("data-index"));
201
+	  	var parent = this.parentNode;
202
+	  	var children = parent.children;
203
+	  	if(this.classList.contains("mui-icon-star")){
204
+	  		for(var i=0;i<index;i++){
205
+  				children[i].classList.remove('mui-icon-star');
206
+  				children[i].classList.add('mui-icon-star-filled');
207
+	  		}
208
+	  	}else{
209
+	  		for (var i = index; i < 5; i++) {
210
+	  			children[i].classList.add('mui-icon-star')
211
+	  			children[i].classList.remove('mui-icon-star-filled')
212
+	  		}
213
+	  	}
214
+	  	starIndex = index;
215
+  });
216
+  	//选择快捷输入
217
+	mui('.mui-popover').on('tap','li',function(e){
218
+	  document.getElementById("question").value = document.getElementById("question").value + this.children[0].innerHTML;
219
+	  mui('.mui-popover').popover('toggle')
220
+	}) 
221
+})();

+ 110 - 100
双汇APP/js/personal.js

@@ -1,42 +1,53 @@
1 1
 mui.init();
2 2
 var slider = mui("#slider");
3
+window.addEventListener('refreshPer', function(e) { //执行刷新
4
+	ajaxRefresh();
5
+});
3 6
 slider.slider({
4 7
 	interval: 5000
5 8
 });
6
-mui.plusReady(function() {
7
-	var token = localStorage.getItem("token"); //获取本地存储
8
-	//权限判断
9
-	mui.ajax(huayi.config.callcenter_url + '/UserAccount/GetNowUser', {
10
-		data: {
11
-			token: token,
12
-		},
13
-		dataType: 'json', //服务器返回json格式数据
14
-		type: 'get', //HTTP请求类型
15
-		timeout: 10000, //超时时间设置为10秒;
16
-		headers: {
17
-			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
18
-		},
19
-		success: function(data) {
20
-			if (data.data.display=="1") {
21
-				$(".addDisplay").show()
22
-			}else{
23
-				$(".addDisplay").hide()
24
-			}
25
-			var RoleCode = data.data.role.F_RoleCode;
26
-			$(".F_UserName").text(data.data.user.F_UserName);
27
-			localStorage.setItem("F_UserName", data.data.user.F_UserName);
28
-			localStorage.setItem("F_UserName", data.data.user.F_UserName);
29
-			$(".rolname").text(data.data.user.rolname);
30
-			if(RoleCode == "XTGLY") { //调度
31
-				$(".Dispatch_").css('display', 'block')
32
-			} 
33
-		},
34
-		error: function(xhr, type, errorThrown) {
35
-			//异常处理;
9
+var token = localStorage.getItem("token"); //获取本地存储
10
+ajaxRefresh();
11
+//权限判断
12
+mui.ajax(huayi.config.callcenter_url + '/UserAccount/GetNowUser', {
13
+	data: {
14
+		token: token,
15
+	},
16
+	dataType: 'json', //服务器返回json格式数据
17
+	type: 'get', //HTTP请求类型
18
+	timeout: 10000, //超时时间设置为10秒;
19
+	headers: {
20
+		'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
21
+	},
22
+	success: function(data) {
23
+		if(data.data.display == "1") {
24
+			$(".addDisplay").show()
25
+		} else {
26
+			$(".addDisplay").hide()
27
+		}
28
+		var RoleCode = data.data.user.F_See;
29
+		$(".F_UserName").text(data.data.user.F_UserName);
30
+		localStorage.setItem("F_UserName", data.data.user.F_UserName);
31
+		localStorage.setItem("F_UserName", data.data.user.F_UserName);
32
+		$(".rolname").text(data.data.user.rolname);
33
+		if(RoleCode == "0") { //调度  
34
+			$(".RoleCode_0").css('display', 'block')
35
+		} else if(RoleCode == "1") {
36
+			$(".RoleCode_1").css('display', 'block')
37
+		} else if(RoleCode == "2") {
38
+			$(".RoleCode_2").css('display', 'block')
39
+		} else if(RoleCode == "3") {
40
+			$(".RoleCode_3").css('display', 'block')
36 41
 		}
42
+	},
43
+	error: function(xhr, type, errorThrown) {
44
+		//异常处理;
45
+	}
37 46
 
38
-	});
39
-	//权限判断
47
+});
48
+
49
+function ajaxRefresh() {
50
+ 	//权限判断
40 51
 	mui.ajax(huayi.config.callcenter_url + '/WorkorderApp/GetCount', {
41 52
 		data: {
42 53
 			token: token,
@@ -44,111 +55,110 @@ mui.plusReady(function() {
44 55
 		dataType: 'json', //服务器返回json格式数据
45 56
 		type: 'get', //HTTP请求类型
46 57
 		timeout: 10000, //超时时间设置为10秒;
47
-		headers: { 
58
+		headers: {
48 59
 			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
49 60
 		},
50 61
 		success: function(data) {
51
-			if (data.DTJ>99) {
62
+			if(data.DTJ > 99) {
52 63
 				$(".DTJ").text("99"); //待提交
53
-			}else{
64
+			} else {
54 65
 				$(".DTJ").text(data.DTJ); //待提交
55 66
 			}
56
-			if (data.DFP>99) {
67
+			if(data.DFP > 99) {
57 68
 				$(".DFP").text("99"); //待提交
58
-			}else{
69
+			} else {
59 70
 				$(".DFP").text(data.DFP); //待提交
60 71
 			}
61
-			if (data.DCL>99) {
72
+			if(data.DCL > 99) {
62 73
 				$(".DCL").text("99"); //待处理
63
-			}else{
74
+			} else {
64 75
 				$(".DCL").text(data.DCL); //待处理
65 76
 			}
66
-			if (data.CLZ>99) {
77
+			if(data.CLZ > 99) {
67 78
 				$(".CLZ").text("99"); //待提交
68
-			}else{
79
+			} else {
69 80
 				$(".CLZ").text(data.CLZ); //处理中
70 81
 			}
71
-			if (data.YWJ>99) {
82
+			if(data.YWJ > 99) {
72 83
 				$(".YWJ").text("99"); //待提交
73
-			}else{
84
+			} else {
74 85
 				$(".YWJ").text(data.YWJ); //已完结
75 86
 			}
76
-			if (data.THDTJ>99) {
87
+			if(data.THDTJ > 99) {
77 88
 				$(".THDTJ").text("99"); //待提交
78
-			}else{
89
+			} else {
79 90
 				$(".THDTJ").text(data.THDTJ); //退回待提交
80 91
 			}
81
-			if (data.THDFP>99) {
92
+			if(data.THDFP > 99) {
82 93
 				$(".THDFP").text("99"); //待提交
83
-			}else{
94
+			} else {
84 95
 				$(".THDFP").text(data.THDFP); //退回待分配
85 96
 			}
86
-			if (data.YJGD>99) {
97
+			if(data.YJGD > 99) {
87 98
 				$(".YJGD").text("99"); //待提交
88
-			}else{
99
+			} else {
89 100
 				$(".YJGD").text(data.YJGD); //一级工单
90 101
 			}
91
-			if (data.EJGD>99) {
102
+			if(data.EJGD > 99) {
92 103
 				$(".EJGD").text("99"); //待提交
93
-			}else{
104
+			} else {
94 105
 				$(".EJGD").text(data.EJGD); //二级工单
95 106
 			}
96
-			if (data.SJGD>99) {
107
+			if(data.SJGD > 99) {
97 108
 				$(".SJGD").text("99"); //三级工单
98
-			}else{
109
+			} else {
99 110
 				$(".SJGD").text(data.SJGD); //三级工单
100 111
 			}
101 112
 		},
102 113
 		error: function(xhr, type, errorThrown) {
103 114
 			//异常处理;
104 115
 		}
105
-  
106
-	});
107
-	//一级查看-待处理列表
108
-	$(".work-list").on('tap', function() {
109
-		var index = $(this).attr('index');
110
-		mui.openWindow({
111
-			id: 'Work-list',
112
-			url: 'workOrder/Work-list.html',
113
-			createNew:true,
114
-			show: {
115
-				autoShow: false
116
-			},
117
-			waiting: {
118
-				autoShow: true //自动显示等待框,默认为true
119
-			},
120
-			extras: {
121
-				index: index,
122
-			}
123
-		});
124
-	})
125
-	//工单等级列表
126
-	$(".work-class").on('tap', function() {
127
-		var importClass = $(this).attr('index');
128
-		mui.openWindow({
129
-			id: 'Work-listClass',
130
-			url: 'workOrder/Work-listClass.html',
131
-			createNew:true,
132
-			show: {
133
-				autoShow: false
134
-			},
135
-			waiting: {
136
-				autoShow: true //自动显示等待框,默认为true
137
-			},
138
-			extras: {
139
-				importClass: importClass,
140
-			}
141
-		});
142
-	})
143
-	//常见问题
144
-	document.getElementById('Report').addEventListener('tap', function() {
145
-		var nwaiting = plus.nativeUI.showWaiting();
146
-		webviewShow = plus.webview.create("Work-Add.html"); //后台创建webview并打开show.html  
147
-		webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件  
148
-			nwaiting.close(); //新webview的载入完毕后关闭等待框  
149
-			webviewShow.show("slide-in-right", 300); //把新webview窗体显示出来,显示动画效果为速度300毫秒的右侧移入动画
150
-		}, false);
151 116
 
152 117
 	});
118
+}
119
+//一级查看-待处理列表
120
+$(".work-list").on('tap', function() {
121
+	var index = $(this).attr('index');
122
+	mui.openWindow({
123
+		id: 'Work-list',
124
+		url: 'workOrder/Work-list.html',
125
+		createNew: true,
126
+		show: {
127
+			autoShow: false
128
+		},
129
+		waiting: {
130
+			autoShow: true //自动显示等待框,默认为true
131
+		},
132
+		extras: {
133
+			index: index,
134
+		}
135
+	});
136
+})
137
+//工单等级列表
138
+$(".work-class").on('tap', function() {
139
+	var importClass = $(this).attr('index');
140
+	mui.openWindow({
141
+		id: 'Work-listClass',
142
+		url: 'workOrder/Work-listClass.html',
143
+		createNew: true,
144
+		show: {
145
+			autoShow: false
146
+		},
147
+		waiting: {
148
+			autoShow: true //自动显示等待框,默认为true
149
+		},
150
+		extras: {
151
+			importClass: importClass,
152
+		}
153
+	});
154
+})
155
+//常见问题
156
+document.getElementById('Report').addEventListener('tap', function() {
157
+	var nwaiting = plus.nativeUI.showWaiting();
158
+	webviewShow = plus.webview.create("Work-Add.html"); //后台创建webview并打开show.html  
159
+	webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件  
160
+		nwaiting.close(); //新webview的载入完毕后关闭等待框  
161
+		webviewShow.show("slide-in-right", 300); //把新webview窗体显示出来,显示动画效果为速度300毫秒的右侧移入动画
162
+	}, false);
153 163
 
154
-})
164
+});

+ 188 - 183
双汇APP/js/setting.js

@@ -1,204 +1,209 @@
1 1
 mui.init();
2
-		//初始化单页view
3
-		var viewApi = mui('#app').view({
4
-			defaultPage: '#setting'
5
-		});
6
-		var a = localStorage.getItem('token')
7
-		//初始化单页的区域滚动
8
-		mui('.mui-scroll-wrapper').scroll();
9
-		mui.ajax(huayi.config.callcenter_url + '/UserAccount/GetNowUser', {
2
+//初始化单页view
3
+var viewApi = mui('#app').view({
4
+	defaultPage: '#setting'
5
+});
6
+window.addEventListener('refresh', function(e){//执行刷新
7
+    adminTx();
8
+});
9
+var a = localStorage.getItem('token')
10
+var mineTx;
11
+//初始化单页的区域滚动
12
+mui('.mui-scroll-wrapper').scroll(); 
13
+function adminTx() {
14
+	mui.ajax(huayi.config.callcenter_url + '/UserAccount/GetNowUser', {
15
+		data: {
16
+			token: a,
17
+		},
18
+		dataType: 'json', //服务器返回json格式数据
19
+		type: 'get', //HTTP请求类型
20
+		timeout: 10000, //超时时间设置为10秒;
21
+		headers: {
22
+			'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
23
+		},
24
+		success: function(data) {
25
+			var RoleCode = data.data.role.F_RoleCode;
26
+			$(".F_UserName").text(data.data.user.F_UserName);
27
+			$(".rolname").text(data.data.user.F_UserCode);
28
+			
29
+			if(!data.data.FileUrl[0].F_Url) {
30
+				$('.top_left img').attr("src", "img/3.png");
31
+			}else{
32
+				$('.top_left img').attr("src", data.data.FileUrl[0].F_Url);
33
+			}
34
+		},
35
+		error: function(xhr, type, errorThrown) {
36
+			//异常处理;
37
+		}
38
+	
39
+	});
40
+}
41
+
42
+
43
+//		//检测网络连接
44
+mui.plusReady(function() {
45
+	var Code_;
46
+	var NewCode_;
47
+	var server = huayi.config.callcenter_url + "ApplicationsRefresh/GetInfo?"; //获取升级描述文件服务器地址
48
+	document.addEventListener("netchange", wainshow, false);
49
+	plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
50
+		//				$("#Vb").text(wgtinfo.version);
51
+		//			 var 
52
+		//							$('.update').text(Code_);
53
+		console.log("当前应用版本:" + wgtinfo.version + "---" + plus.runtime.version);
54
+		localStorage.setItem("Code", wgtinfo.version) //缓存保存版本号;
55
+		Code_ = localStorage.getItem("Code");
56
+		$('.update').text(Code_);
57
+
58
+		//			Gx();
59
+	});
60
+	//检查更新
61
+	document.getElementById("update").addEventListener('tap', function() {
62
+		var server = huayi.config.callcenter_url + "ApplicationsRefresh/GetInfo?"; //获取升级描述文件服务器地址
63
+		mui.ajax(server, {
10 64
 			data: {
11
-				token: a,
65
+				isNew: true,
66
+				token: a
12 67
 			},
13 68
 			dataType: 'json', //服务器返回json格式数据
14
-			type: 'get', //HTTP请求类型
69
+			type: 'post', //HTTP请求类型
15 70
 			timeout: 10000, //超时时间设置为10秒;
16 71
 			headers: {
17 72
 				'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
18 73
 			},
19 74
 			success: function(data) {
20
-				
21
-				var RoleCode = data.data.role.F_RoleCode;
22
-				$(".F_UserName").text(data.data.user.F_UserName);
23
-				$(".rolname").text(data.data.user.F_UserCode);
75
+				if(data.state == "success") {
76
+					NewCode_ = data.data.F_VersionCode;
77
+					localStorage.setItem("Code", NewCode_); //缓存保存版本号;
78
+					if(Code_ != NewCode_) {
79
+						var Codes = localStorage.setItem("Code", NewCode_);
80
+						console.log(Codes);
81
+						plus.nativeUI.confirm("发现新版本", function(event) {
82
+							var tapIndex = event.index;
83
+							if(tapIndex == 0) {
84
+								plus.runtime.openURL(data.data.F_DownUrl);
85
+							} else {
86
+								mui.toast("取消更新");
87
+							}
88
+						}, "提示", ["立即更新", "取消", ])
89
+					}
90
+
91
+				} else {
92
+					mui.toast(data.message);
93
+
94
+				}
24 95
 
25 96
 			},
26
-			error: function(xhr, type, errorThrown) {
97
+			error: function(data) {
27 98
 				//异常处理;
99
+				console.log(data.message);
28 100
 			}
101
+		})
102
+	});
103
+	var backcount = 0;
104
+	mui.back = function() {
105
+		if(mui.os.ios) return;
106
+		if(backcount > 0) {
107
+			if(window.plus) plus.runtime.quit();
108
+			return;
109
+		};
110
+		mui.toast('再按一次退出应用');
111
+		backcount++;
112
+		setTimeout(function() {
113
+			backcount = 0;
114
+		}, 2000);
115
+	};
29 116
 
30
-		});
31
-
32
-		//		//检测网络连接
33
-		mui.plusReady(function() {
34
-			var Code_;
35
-			var NewCode_;
36
-			var server = huayi.config.callcenter_url + "ApplicationsRefresh/GetInfo?"; //获取升级描述文件服务器地址
37
-			document.addEventListener("netchange", wainshow, false);
38
-			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
39
-				//				$("#Vb").text(wgtinfo.version);
40
-				//			 var 
41
-				//							$('.update').text(Code_);
42
-				console.log("当前应用版本:" + wgtinfo.version + "---" + plus.runtime.version);
43
-				localStorage.setItem("Code", wgtinfo.version) //缓存保存版本号;
44
-				Code_ = localStorage.getItem("Code");
45
-				$('.update').text(Code_);
46
-
47
-				//			Gx();
48
-			});
49
-			//检查更新
50
-			document.getElementById("update").addEventListener('tap', function() {
51
-				var server = huayi.config.callcenter_url + "ApplicationsRefresh/GetInfo?"; //获取升级描述文件服务器地址
52
-				mui.ajax(server, {
53
-					data: {
54
-						isNew: true,
55
-						token: a
56
-					},
57
-					dataType: 'json', //服务器返回json格式数据
58
-					type: 'post', //HTTP请求类型
59
-					timeout: 10000, //超时时间设置为10秒;
60
-					headers: {
61
-						'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
62
-					},
63
-					success: function(data) {
64
-						if(data.state == "success") {
65
-							NewCode_ = data.data.F_VersionCode;
66
-							localStorage.setItem("Code", NewCode_); //缓存保存版本号;
67
-//							alert(Code_);
68
-//							alert(NewCode_);
69
-							if(Code_ != NewCode_) {
70
-								var Codes = localStorage.setItem("Code", NewCode_);
71
-								console.log(Codes);
72
-								plus.nativeUI.confirm("发现新版本", function(event) {
73
-									var tapIndex = event.index;
74
-									if(tapIndex == 0) {
75
-										console.log(data);
76
-										plus.runtime.openURL(data.data.F_DownUrl);
77
-									} else {
78
-										mui.toast("取消更新");
79
-									}
80
-								}, "提示", ["立即更新", "取消", ])
81
-							}
82
-
83
-						} else {
84
-							mui.toast(data.message);
85
-
86
-						}
117
+});
118
+//检测网络连接
119
+function wainshow() {
120
+	if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
121
+		mui.toast("网络异常,请检查网络设置!");
122
+	} else {
123
+		mui.toast("网络连接");
124
+	}
125
+}
126
+//常见问题
127
+document.getElementById('Question').addEventListener('tap', function() {
128
+	var nwaiting = plus.nativeUI.showWaiting();
129
+	webviewShow = plus.webview.create("Common/portrait_head.html"); //后台创建webview并打开show.html  
130
+	webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件  
131
+		nwaiting.close(); //新webview的载入完毕后关闭等待框  
132
+		webviewShow.show("slide-in-right", 300); //把新webview窗体显示出来,显示动画效果为速度300毫秒的右侧移入动画
133
+	}, false);
134
+});
135
+//退出
136
+document.getElementById('exit').addEventListener('tap', function() {
137
+	var btnArray = [{
138
+		title: "注销当前账号"
139
+	}, {
140
+		title: "直接关闭应用"
141
+	}];
142
+	plus.nativeUI.actionSheet({
143
+		cancel: "取消",
144
+		buttons: btnArray
145
+	}, function(event) {
146
+		var index = event.index;
147
+		switch(index) {
148
+			case 1:
149
+				//注销账号						
150
+				plus.runtime.restart();
151
+				break;
152
+			case 2:
153
+				plus.runtime.quit();
154
+				break;
155
+		}
156
+	});
157
+}, false);
87 158
 
88
-					},
89
-					error: function(data) {
90
-						//异常处理;
91
-						console.log(data.message);
92
-					}
93
-				})
94
-			});
95
-			var backcount = 0;
96
-			mui.back = function() {
97
-				if(mui.os.ios) return;
98
-				if(backcount > 0) {
99
-					if(window.plus) plus.runtime.quit();
100
-					return;
101
-				};
102
-				mui.toast('再按一次退出应用');
103
-				backcount++;
104
-				setTimeout(function() {
105
-					backcount = 0;
106
-				}, 2000);
107
-			};
159
+function logout() {
160
+	$.ajax({
161
+		url: huayi.config.callcenter_url + "Login/Logout",
162
+		data: {
163
+			token: a
164
+		},
165
+		dataType: "json",
166
+		type: 'post', //HTTP请求类型
167
+		success: function(res) {
168
+			if(res.state == "success") {
169
+				localStorage.clear();
170
+				mui.alert(res.data);
108 171
 
109
-		});
110
-		//检测网络连接
111
-		function wainshow() {
112
-			if(plus.networkinfo.getCurrentType() == plus.networkinfo.CONNECTION_NONE) {
113
-				mui.toast("网络异常,请检查网络设置!");
114
-			} else {
115
-				mui.toast("网络连接");
116 172
 			}
117 173
 		}
118
-		//常见问题
119
-		document.getElementById('Question').addEventListener('tap', function() {
120
-			var nwaiting = plus.nativeUI.showWaiting();
121
-			webviewShow = plus.webview.create("Common/Setting-portrait.html"); //后台创建webview并打开show.html  
122
-			webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件  
123
-				nwaiting.close(); //新webview的载入完毕后关闭等待框  
124
-				webviewShow.show("slide-in-right", 300); //把新webview窗体显示出来,显示动画效果为速度300毫秒的右侧移入动画
125
-			}, false);
126
-		});
127
-		//退出
128
-		document.getElementById('exit').addEventListener('tap', function() {
129
-
130
-			var btnArray = [{
131
-				title: "注销当前账号"
132
-			}, {
133
-				title: "直接关闭应用"
134
-			}];
135
-			plus.nativeUI.actionSheet({
136
-				cancel: "取消",
137
-				buttons: btnArray
138
-			}, function(event) {
139
-				var index = event.index;
140
-				switch(index) {
141
-					case 1:
142
-						//注销账号						
143
-//						localStorage.clear();
144
-						plus.runtime.restart();
145
-						break;
146
-					case 2:
147
-						plus.runtime.quit();
148
-						break;
149
-				}
150
-			});
151
-		}, false);
152
-
153
-		function logout() {
154
-			$.ajax({
155
-				url: huayi.config.callcenter_url + "Login/Logout",
156
-				data: {
157
-					token: a
158
-				},
159
-				dataType: "json",
160
-				type: 'post', //HTTP请求类型
161
-				success: function(res) {
174
+	});
175
+}
162 176
 
163
-					if(res.state == "success") {
164
-						localStorage.clear();
165
-						mui.alert(res.data);
177
+function Clean() {
178
+	$("#mobile").val('');
179
+	$("#title").val('');
180
+	$("#content").val('');
181
+}
166 182
 
167
-					}
168
-				}
169
-			});
170
-		}
171
-
172
-		function Clean() {
173
-			$("#mobile").val('');
174
-			$("#title").val('');
175
-			$("#content").val('');
183
+var view = viewApi.view;
184
+(function($) {
185
+	//处理view的后退与webview后退
186
+	var oldBack = $.back;
187
+	$.back = function() {
188
+		if(viewApi.canBack()) { //如果view可以后退,则执行view的后退
189
+			viewApi.back();
190
+		} else { //执行webview后退
191
+			oldBack();
176 192
 		}
177
-
178
-		var view = viewApi.view;
179
-		(function($) {
180
-			//处理view的后退与webview后退
181
-			var oldBack = $.back;
182
-			$.back = function() {
183
-				if(viewApi.canBack()) { //如果view可以后退,则执行view的后退
184
-					viewApi.back();
185
-				} else { //执行webview后退
186
-					oldBack();
187
-				}
188
-			};
189
-			//监听页面切换事件方案1,通过view元素监听所有页面切换事件,目前提供pageBeforeShow|pageShow|pageBeforeBack|pageBack四种事件(before事件为动画开始前触发)
190
-			//第一个参数为事件名称,第二个参数为事件回调,其中e.detail.page为当前页面的html对象
191
-			view.addEventListener('pageBeforeShow', function(e) {
192
-				//				console.log(e.detail.page.id + ' beforeShow');
193
-			});
194
-			view.addEventListener('pageShow', function(e) {
195
-				//				console.log(e.detail.page.id + ' show');
196
-			});
197
-			view.addEventListener('pageBeforeBack', function(e) {
198
-				//				console.log(e.detail.page.id + ' beforeBack');
199
-			});
200
-			view.addEventListener('pageBack', function(e) {
201
-				//				console.log(e.detail.page.id + ' back');
202
-			});
203
-		})(mui);
204
-		//点击两次就退出软件
193
+	};
194
+	//监听页面切换事件方案1,通过view元素监听所有页面切换事件,目前提供pageBeforeShow|pageShow|pageBeforeBack|pageBack四种事件(before事件为动画开始前触发)
195
+	//第一个参数为事件名称,第二个参数为事件回调,其中e.detail.page为当前页面的html对象
196
+	view.addEventListener('pageBeforeShow', function(e) {
197
+		//				console.log(e.detail.page.id + ' beforeShow');
198
+	});
199
+	view.addEventListener('pageShow', function(e) {
200
+		//				console.log(e.detail.page.id + ' show');
201
+	});
202
+	view.addEventListener('pageBeforeBack', function(e) {
203
+		//				console.log(e.detail.page.id + ' beforeBack');
204
+	});
205
+	view.addEventListener('pageBack', function(e) {
206
+		//				console.log(e.detail.page.id + ' back');
207
+	});
208
+})(mui);
209
+//点击两次就退出软件

+ 94 - 6
双汇APP/personal.html

@@ -11,13 +11,11 @@
11 11
 		<link rel="stylesheet" href="css/iconfont.css" />
12 12
 		<link rel="stylesheet" href="css/personal.css" />
13 13
 	</head>
14
-
15 14
 	<body>
16
-		
17 15
 		<!--页面主内容区开始-->
18 16
 		<div class="mui-content">
19 17
 			<!--banner-->
20
-			<div id="IMG-box">
18
+			<div id="IMG-box"> 
21 19
 				<div id="slider" class="mui-slider" >
22 20
 					<div class="mui-slider-group mui-slider-loop">
23 21
 						<!-- 额外增加的一个节点(循环轮播:第一个节点是最后一张轮播) -->
@@ -74,8 +72,9 @@
74 72
 					</h5>
75 73
 				</div>
76 74
 			</div>
77
-			<ul class="mui-table-view mui-grid-view mui-grid-9 Common-box Dispatch_" style="display: none;">
78
-				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 ">
75
+			<!--系统管理员-->
76
+			<ul class="mui-table-view mui-grid-view mui-grid-9 Common-box RoleCode_0">
77
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
79 78
 					<a href="javascript:;" class="work-list" index="0">
80 79
 						<div class="Icon icon-1"><i  class="mui-icon iconfont icon-dengdai2"></i></div>
81 80
 						<div class="mui-media-body font-weight-bold">待提交</div>
@@ -113,7 +112,32 @@
113 112
 				
114 113
 				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
115 114
 					<a href="javascript:;" class="work-list" index="6">
116
-						<div class="Icon icon-4"><i class="mui-icon iconfont icon-zidongjiean "></i></div>
115
+						<div class="Icon icon-4"><i class="mui-icon iconfont icon-zidongjiean"></i></div>
116
+						<div class="mui-media-body font-weight-bold">退回待提交</div>
117
+					</a>
118
+					<div class="stateIcon THDTJ">99</div>
119
+				</li>
120
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
121
+					<a href="javascript:;" class="work-list" index="10" issatisfie="0">
122
+						<div class="Icon icon-7"><i class="mui-icon iconfont  icon-daiban"></i></div>
123
+						<div class="mui-media-body font-weight-bold">已处理</div>
124
+					</a>
125
+					<div class="stateIcon YWJ">99</div>
126
+				</li>
127
+				
128
+			</ul>
129
+			<!--客服-->
130
+			<ul class="mui-table-view mui-grid-view mui-grid-9 Common-box RoleCode_1">
131
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
132
+					<a href="javascript:;" class="work-list" index="0">
133
+						<div class="Icon icon-1"><i  class="mui-icon iconfont icon-dengdai2"></i></div>
134
+						<div class="mui-media-body font-weight-bold">待提交</div>
135
+					</a>  
136
+					<div class="stateIcon DTJ">99</div>
137
+				</li>
138
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
139
+					<a href="javascript:;" class="work-list" index="6">
140
+						<div class="Icon icon-4"><i class="mui-icon iconfont icon-zidongjiean"></i></div>
117 141
 						<div class="mui-media-body font-weight-bold">退回待提交</div>
118 142
 					</a>
119 143
 					<div class="stateIcon THDTJ">99</div>
@@ -127,6 +151,70 @@
127 151
 				</li>
128 152
 				
129 153
 			</ul>
154
+			<!--办事处经理-->
155
+			<ul class="mui-table-view mui-grid-view mui-grid-9 Common-box RoleCode_2">
156
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
157
+					<a href="javascript:;" class="work-list" index="1">
158
+						<div class="Icon icon-2"><i class="mui-icon iconfont icon-hui "></i></div>
159
+						<div class="mui-media-body font-weight-bold">待分派</div>
160
+					</a>
161
+					<div class="stateIcon DFP">99</div>
162
+				</li>
163
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
164
+					<a href="javascript:;" class="work-list" index="3">
165
+						<div class="Icon icon-3"><i class="mui-icon iconfont icon-dengdai3"></i></div>
166
+						<div class="mui-media-body font-weight-bold">待处理</div>
167
+					</a> 
168
+					<div class="stateIcon DCL">99</div>
169
+				</li>
170
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
171
+					<a href="javascript:;" class="work-list" index="4">
172
+						<div class="Icon icon-4"><i class="mui-icon iconfont icon-zidongjiean "></i></div>
173
+						<div class="mui-media-body font-weight-bold">处理中</div>
174
+					</a>
175
+					<div class="stateIcon CLZ">99</div>
176
+				</li>
177
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
178
+					<a href="javascript:;" class="work-list" index="5">
179
+						<div class="Icon icon-7"><i class="mui-icon iconfont  icon-daiban"></i></div>
180
+						<div class="mui-media-body font-weight-bold">退回待分派</div>
181
+					</a>
182
+					<div class="stateIcon THDFP">99</div>
183
+				</li>
184
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
185
+					<a href="javascript:;" class="work-list" index="10" issatisfie="0">
186
+						<div class="Icon icon-7"><i class="mui-icon iconfont  icon-daiban"></i></div>
187
+						<div class="mui-media-body font-weight-bold">已处理</div>
188
+					</a>
189
+					<div class="stateIcon YWJ">99</div>
190
+				</li>
191
+			</ul>
192
+			
193
+			<!--业务员-->
194
+			<ul class="mui-table-view mui-grid-view mui-grid-9 Common-box RoleCode_3">
195
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
196
+					<a href="javascript:;" class="work-list" index="3">
197
+						<div class="Icon icon-3"><i class="mui-icon iconfont icon-dengdai3 "></i></div>
198
+						<div class="mui-media-body font-weight-bold">待处理</div>
199
+					</a> 
200
+					<div class="stateIcon DCL">99</div>
201
+				</li>
202
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3">
203
+					<a href="javascript:;" class="work-list" index="4">
204
+						<div class="Icon icon-4"><i class="mui-icon iconfont icon-zidongjiean "></i></div>
205
+						<div class="mui-media-body font-weight-bold">处理中</div>
206
+					</a>
207
+					<div class="stateIcon CLZ">99</div>
208
+				</li>
209
+				<li class="mui-table-view-cell mui-media mui-col-xs-3 mui-col-sm-3 ">
210
+					<a href="javascript:;" class="work-list" index="10" issatisfie="0">
211
+						<div class="Icon icon-7"><i class="mui-icon iconfont  icon-daiban"></i></div>
212
+						<div class="mui-media-body font-weight-bold">已处理</div>
213
+					</a>
214
+					<div class="stateIcon YWJ">99</div>
215
+				</li>
216
+			</ul>
217
+			
130 218
 			<ul class="mui-table-view mui-grid-view mui-grid-9 Common-box addDisplay" style="display: none;">
131 219
 				<li class="mui-table-view-cell mui-media mui-col-xs-12 mui-col-sm-6">
132 220
 					<a href="javascript:;" id="Report" data-index="0">

+ 2 - 2
双汇APP/tab-phone.html

@@ -165,7 +165,9 @@
165 165
 													'</div>'+
166 166
 												'</li>';
167 167
 										$(html).appendTo($(".TX"));
168
+										
168 169
 									})
170
+									
169 171
 								}
170 172
 								
171 173
 									
@@ -180,8 +182,6 @@
180 182
 
181 183
 
182 184
 				}
183
-
184
-				
185 185
 				setTimeout(indexAjax,5000); 
186 186
 				function indexAjax () {
187 187
 					var list = document.getElementById('list')

+ 10 - 1
双汇APP/unpackage/.confirmed_dependencies

@@ -139,7 +139,8 @@
139 139
 			"Common/Setting-wenti.html",
140 140
 			"Common/Setting-FabKui.html",
141 141
 			"Common/Phone-list.html",
142
-			"Common/Setting-portrait.html"
142
+			"Common/Setting-portrait.html",
143
+			"Common/portrait_head.html"
143 144
 		],
144 145
 		"resources": [
145 146
 			"img/Wc.png",
@@ -1480,6 +1481,14 @@
1480 1481
 	"Common/Setting-portrait.html": {
1481 1482
 		"refer": [
1482 1483
 			"Common/portrait_head.html",
1484
+			"Setting-1.html",
1485
+			"Common/headimg.html",
1486
+			"Common/cropper.html",
1487
+			"Common/index.html"
1488
+		]
1489
+	},
1490
+	"Common/portrait_head.html": {
1491
+		"refer": [
1483 1492
 			"Setting-1.html"
1484 1493
 		]
1485 1494
 	}

+ 0 - 7
双汇WebAPP/User-Work-Add.html

@@ -220,7 +220,6 @@
220 220
 				<i class="iconfont icon-gantanhao" style="margin-right: 5px;font-size: 20px;vertical-align: middle;"></i>
221 221
 				<span style="color: #f81737;">以上内容都为必填内容,请如实填写</span>
222 222
 			</p>
223
-			<!--<button type="button" class="mui-btn mui-btn-primary mui-btn-block block_button">提交</button>-->
224 223
 			<div style="padding: 10px;">
225 224
 				<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block block_button submit" id="submit">提交</button>
226 225
 			</div>
@@ -228,10 +227,8 @@
228 227
 		</div>
229 228
 
230 229
 		<script src="js/mui.min.js?"></script>
231
-		
232 230
 		<script src="js/mui.picker.js"></script>
233 231
 		<script src="js/mui.poppicker.js"></script>
234
-		<!--<script src="js/city.data-3.js"></script>-->
235 232
 		<script src="js/zepto.js"></script>
236 233
 		<script src="js/huayi.config.js"></script>
237 234
 		<script src="js/jquery.min.js"></script>
@@ -243,7 +240,6 @@
243 240
 			mui.plusReady(function() {
244 241
 				var wv = plus.webview.currentWebview();
245 242
 				var usercode = localStorage.getItem("user"); //获取本地存储
246
-
247 243
 				var files;
248 244
 				var Str = '';
249 245
 				var str_ary;
@@ -258,9 +254,7 @@
258 254
 						}
259 255
 					})
260 256
 					str_ary = Str.substring(0, Str.length - 1);
261
-//					alert(str_ary);
262 257
 					var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;
263
-//					/^(([0\+]\d{2,3}-)?((0\d{2,3}))?(-)?)?(\d{7,8})(-(\d{3,}))?$/
264 258
 					var myreg11 = /^(([0\+]\d{2,3}-)?((0\d{2,3}))?(-)?)?(\d{7,8})(-(\d{3,}))?$/;
265 259
 					var str = $("#phone").val();
266 260
 					if($('#name').val() == '') {
@@ -292,7 +286,6 @@
292 286
 								cusphone: $('#phone').val(), //投诉人电话			  				  		
293 287
 								sourcearea: $('#cityResult3').attr('data-index'), //事发地域id
294 288
 								sourceaddress: $('#detail_address').val(), //详细地址
295
-								//			  		issubmit:1, //=(0保存1保存并提交)
296 289
 								files: str_ary,
297 290
 								usercode: usercode,
298 291
 							},

+ 3 - 3
双汇WebAPP/js/feedback-page.js

@@ -112,9 +112,9 @@
112 112
 			}
113 113
 
114 114
 		}, false);
115
-		placeholder.appendChild(closeButton);
116
-		placeholder.appendChild(fileInput);
117
-		ui.imageList.appendChild(placeholder);
115
+//		placeholder.appendChild(closeButton);
116
+//		placeholder.appendChild(fileInput);
117
+//		ui.imageList.appendChild(placeholder);
118 118
 	};
119 119
 	ui.newPlaceholder();
120 120
 })(mui, window, document, undefined);