|
@@ -2,25 +2,76 @@
|
|
|
|
|
|
angular.module('appMessage').controller('MessageController', ['$scope', function ($scope) {
|
|
|
|
|
|
- $scope.message = {
|
|
|
- id:"",
|
|
|
- type:"",
|
|
|
- content:"",
|
|
|
- font:"",
|
|
|
- sender:"",
|
|
|
- reciever:"",
|
|
|
- time:""
|
|
|
+ lxtalkClient.Invoke('{15180DEF-D508-45F7-BAEB-6486CD8752C8}', '_Register', '', $scope);
|
|
|
+ $scope.glued = true;
|
|
|
+ $scope.items = [{
|
|
|
+ "uid": "2636765",
|
|
|
+ "senderDisplayName": "陆趣趣",
|
|
|
+ "sender": "0578+002682BECE10-lqq",
|
|
|
+ "msgType": 0,
|
|
|
+ "networkType": 1,
|
|
|
+ "isDes": false,
|
|
|
+ "length": 0,
|
|
|
+ "isReaded": false,
|
|
|
+ "contentType": 1,
|
|
|
+ "receiver": "0578+002682BECE10-lsws",
|
|
|
+ "fromClient": 0,
|
|
|
+ "ts": 1483494160000,
|
|
|
+ "id": 0,
|
|
|
+ "content": "111111",
|
|
|
+ "style": ""
|
|
|
+ }, {
|
|
|
+ content: "消息内容",
|
|
|
+ style: '字体',
|
|
|
+ fromClient: 2, //消息来源([0:PC],[1:iOS],[2:Android]
|
|
|
+ id: "616ebe69e1c04c2ea9740a14457aaca6",
|
|
|
+ isDes: 0, //是否加密消息
|
|
|
+ contentType: 1, // 消息类型([1,文本消息],[2,图片消息],[3,文件消息],[4,语音消息], [5,位置消息])
|
|
|
+ networkType: 1, //网络类型([1:wifi],[2:2G],[3:3G],[4:4G])
|
|
|
+ sender: "0578+0-ls_xxj1",
|
|
|
+ senderDisplayName: "陆趣趣",
|
|
|
+ length: 12312,
|
|
|
+ ts: 12312312412 //时间搓
|
|
|
+ }, {
|
|
|
+ content: "http://202.107.249.133:8125/e/8/2/4/f/e824fa94cbacff419a0ad611926710f9.dat?下载文件.docx",
|
|
|
+ fromClient: 2,
|
|
|
+ id: "253db476c6d140f0a1b4d4af5fcf2016",
|
|
|
+ isDes: 0,
|
|
|
+ contentType: 3,
|
|
|
+ networkType: 1,
|
|
|
+ sender: "0578+0-ls_xxj1",
|
|
|
+ senderDisplayName: "陆趣趣",
|
|
|
+ length: 17359
|
|
|
+ }, {
|
|
|
+ content: "../img/DefaultHeadImage_96.png",
|
|
|
+ fromClient: 2,
|
|
|
+ id: "253db476c6d140f0a1b4d4af5fcf2016",
|
|
|
+ isDes: 0,
|
|
|
+ contentType: 2,
|
|
|
+ networkType: 1,
|
|
|
+ sender: "0578+0-ls_xxj1",
|
|
|
+ senderDisplayName: "陆趣趣",
|
|
|
+ length: 17359
|
|
|
+ }];
|
|
|
+ // $scope.guid = lxtalkClient.Invoke('register', 'talkview', $scope);
|
|
|
+ $scope.addMessage = function () {
|
|
|
+ scroll(0, document.body.scrollHeight);
|
|
|
}
|
|
|
- $scope.glued = true;
|
|
|
- $scope.items = [{name:'陆趣趣', time:'2016-06-24 15:55', message:'hello world'}];
|
|
|
- // $scope.guid = lxtalkClient.Invoke('register', 'talkview', $scope);
|
|
|
|
|
|
- $scope.addMessage = function(){
|
|
|
- scroll(0, document.body.scrollHeight);
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
- $scope.addClick = function(msg) {
|
|
|
- $scope.items.push(msg);
|
|
|
- }
|
|
|
- }]);
|
|
|
+ $scope.showMessage = function (jsonStr) {
|
|
|
+ console.log(jsonStr);
|
|
|
+ var msg = JSON.parse(jsonStr);
|
|
|
+ $scope.items.push(msg);
|
|
|
+ }
|
|
|
+
|
|
|
+ $scope.showHistoryMessage = function (jsonStr) {
|
|
|
+ var msg = JOSN.parse(jsonStr);
|
|
|
+ $scope.items.unshift(msg);
|
|
|
+ }
|
|
|
+
|
|
|
+ $scope.initAppContent = function(appContentJson){
|
|
|
+ console.log(appContentJson);
|
|
|
+ $scope.appContent = JSON.parse(appContentJson);
|
|
|
+ }
|
|
|
+}]);
|