chenxiaofeng 5 年之前
父節點
當前提交
728692af43
共有 11 個文件被更改,包括 1309 次插入1103 次删除
  1. 二進制
      .DS_Store
  2. 15 16
      app.js
  3. 87 87
      app.json
  4. 二進制
      pages/.DS_Store
  5. 27 15
      pages/chat-list/chat-list.js
  6. 1 1
      pages/chat/chat.js
  7. 二進制
      pages/index/.DS_Store
  8. 1138 980
      pages/index/index.js
  9. 12 3
      pages/index_details/index_details.js
  10. 3 1
      project.config.json
  11. 26 0
      utils/share.js

二進制
.DS_Store


+ 15 - 16
app.js

@@ -55,7 +55,12 @@ App({
55 55
   
56 56
   },
57 57
 
58
+  onLoad: function (options) {
59
+
60
+   
58 61
   
62
+  },
63
+
59 64
   onLaunch: function (options) {
60 65
     wx.showShareMenu();
61 66
 
@@ -63,14 +68,7 @@ App({
63 68
     // 查看是否授权
64 69
  
65 70
 
66
-    wx.getLocation({
67
-
68
-      success: function (res) {
69
-        _this.getDistrict(res.latitude, res.longitude)
70
-
71
-      },
72
-
73
-    })
71
+ 
74 72
   },
75 73
 
76 74
   // 提示框
@@ -200,15 +198,16 @@ App({
200 198
       success: function (res) {
201 199
         console.log(res);
202 200
         if (res.data.status == 0) {
203
-          // 省
204
-          let province = res.data.result.address_component.province;
205
-          // 市
206
-          let city = res.data.result.address_component.city;
207
-          // 区
208
-          let district = res.data.result.address_component.district;
209
-          console.log(province);
201
+          console.log(res.data.result.address_component);
202
+          _page.postRequest('trajectory/location/position', res.data.result.address_component)
203
+          // // 省
204
+          // let province = res.data.result.address_component.province;
205
+          // // 市
206
+          // let city = res.data.result.address_component.city;
207
+          // // 区
208
+          // let district = res.data.result.address_component.district;
209
+          // console.log(province);
210 210
         }
211
-
212 211
       }
213 212
     })
214 213
   },

+ 87 - 87
app.json

@@ -1,88 +1,88 @@
1
-{
2
-  "pages": [
3
-      "pages/Setup/Opinion/Opinion",
4
-  "pages/Setup/Publicaddress/Publicaddress",
5
-  "pages/Setup/Contactus/Contactus",
6
-  "pages/Setup/Aboutus/Aboutus",
7
-
8
-  "pages/Setup/modify/modify",
9
-  "pages/Landpage/Land/Land",
10
-  "pages/zheo_More/zheo_More",
11
-  "pages/details_More/details_More",
12
-   "pages/personal_core/personaldata/personaldata",
13
- 
14
-   "pages/Setup/security/security",
15
-   "pages/Setup/Setuplist/Setuplist",
16
-    "pages/information/chat/chat",
17
-    "pages/payment/Member/Member",
18
-    "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
19
-    "pages/personal_core/Album/Album",
20
-    "pages/personal_core/requirements/requirements",
21
-    "pages/personal_core/personaldataModifythe/personaldataModifythe",
22
-    "pages/personal_core/QRcode/QRcode",
23
-    "pages/personal_core/home/home",
24
-    "pages/personal_core/Realestate/Realestate",
25
-    "pages/personal_core/Adegreein/Adegreein",
26
-    "pages/personal_core/Realname/Realname",
27
-    "pages/personal_core/vehicle/vehicle",
28
-    "pages/personal_core/home_list/home_list",
29
-    "pages/index_details/index_details",
30
-    "pages/index/index",
31
-    "pages/index_screen/index_screen",
32
-
33
-    "pages/Landpage/Retrievepassword/Retrievepassword",
34
-    "pages/register/fillTel/fillTel",
35
-    "pages/register/OwnData/OwnData",
36
-    "pages/news/newslist/newslist",
37
-    "pages/news/FabulousI/FabulousI",
38
-    "pages/news/IFabulous/IFabulous",
39
-    "pages/news/Lookwho/Lookwho",
40
-    "pages/news/Lookatme/Lookatme",
41
-    "pages/news/nodata/nodata",
42
-    "pages/Jurisdiction/Requirement/Requirement",
43
-    "pages/logs/logs",
44
-    "pages/chat-list/chat-list",
45
-    "pages/chat/chat",
46
-    "pages/chat-input/chat-input"
47
-
48
-
49
-  ],
50
-  "permission": {
51
-    "scope.userLocation": {
52
-      "desc": "你的位置信息将用于小程序位置接口的效果展示"
53
-    }
54
-  },
55
-  "window": {
56
-    "backgroundTextStyle": "light",
57
-    "navigationBarBackgroundColor": "#fff",
58
-    "navigationBarTitleText": "WeChat",
59
-    "navigationBarTextStyle": "black"
60
-  },
61
-  "tabBar": {
62
-    "color": "#353636",
63
-    "selectedColor": "#FA50A0",
64
-    "borderStyle": "black",
65
-    "backgroundColor": "#FFF",
66
-    "list": [
67
-      {
68
-        "selectedIconPath": "image/nav01.png",
69
-        "iconPath": "image/nav1.png",
70
-        "pagePath": "pages/index/index",
71
-        "text": "首页"
72
-      },
73
-      {
74
-        "selectedIconPath": "image/nav03.png",
75
-        "iconPath": "image/nav3.png",
76
-        "pagePath": "pages/chat-list/chat-list",
77
-        "text": "消息"
78
-      },
79
-      {
80
-        "selectedIconPath": "image/nav04.png",
81
-        "iconPath": "image/nav4.png",
82
-        "pagePath": "pages/personal_core/home/home",
83
-        "text": "我的"
84
-      }
85
-    ]
86
-  },
87
-  "sitemapLocation": "sitemap.json"
1
+{
2
+  "pages": [
3
+      "pages/Setup/Opinion/Opinion",
4
+  "pages/Setup/Publicaddress/Publicaddress",
5
+  "pages/Setup/Contactus/Contactus",
6
+  "pages/Setup/Aboutus/Aboutus",
7
+
8
+  "pages/Setup/modify/modify",
9
+  "pages/Landpage/Land/Land",
10
+  "pages/zheo_More/zheo_More",
11
+  "pages/details_More/details_More",
12
+   "pages/personal_core/personaldata/personaldata",
13
+ 
14
+   "pages/Setup/security/security",
15
+   "pages/Setup/Setuplist/Setuplist",
16
+    "pages/information/chat/chat",
17
+    "pages/payment/Member/Member",
18
+    "pages/Jurisdiction/click_Jurisdiction/click_Jurisdiction",
19
+    "pages/personal_core/Album/Album",
20
+    "pages/personal_core/requirements/requirements",
21
+    "pages/personal_core/personaldataModifythe/personaldataModifythe",
22
+    "pages/personal_core/QRcode/QRcode",
23
+    "pages/personal_core/home/home",
24
+    "pages/personal_core/Realestate/Realestate",
25
+    "pages/personal_core/Adegreein/Adegreein",
26
+    "pages/personal_core/Realname/Realname",
27
+    "pages/personal_core/vehicle/vehicle",
28
+    "pages/personal_core/home_list/home_list",
29
+    "pages/index_details/index_details",
30
+    "pages/index/index",
31
+    "pages/index_screen/index_screen",
32
+
33
+    "pages/Landpage/Retrievepassword/Retrievepassword",
34
+    "pages/register/fillTel/fillTel",
35
+    "pages/register/OwnData/OwnData",
36
+    "pages/news/newslist/newslist",
37
+    "pages/news/FabulousI/FabulousI",
38
+    "pages/news/IFabulous/IFabulous",
39
+    "pages/news/Lookwho/Lookwho",
40
+    "pages/news/Lookatme/Lookatme",
41
+    "pages/news/nodata/nodata",
42
+    "pages/Jurisdiction/Requirement/Requirement",
43
+    "pages/logs/logs",
44
+    "pages/chat-list/chat-list",
45
+    "pages/chat/chat",
46
+    "pages/chat-input/chat-input"
47
+
48
+
49
+  ],
50
+  "permission": {
51
+    "scope.userLocation": {
52
+      "desc": "你的位置信息将用于小程序位置接口的效果展示"
53
+    }
54
+  },
55
+  "window": {
56
+    "backgroundTextStyle": "light",
57
+    "navigationBarBackgroundColor": "#fff",
58
+    "navigationBarTitleText": "WeChat",
59
+    "navigationBarTextStyle": "black"
60
+  },
61
+  "tabBar": {
62
+    "color": "#353636",
63
+    "selectedColor": "#FA50A0",
64
+    "borderStyle": "black",
65
+    "backgroundColor": "#FFF",
66
+    "list": [
67
+      {
68
+        "selectedIconPath": "image/nav01.png",
69
+        "iconPath": "image/nav1.png",
70
+        "pagePath": "pages/index/index",
71
+        "text": "首页"
72
+      },
73
+      {
74
+        "selectedIconPath": "image/nav03.png",
75
+        "iconPath": "image/nav3.png",
76
+        "pagePath": "pages/chat-list/chat-list",
77
+        "text": "消息"
78
+      },
79
+      {
80
+        "selectedIconPath": "image/nav04.png",
81
+        "iconPath": "image/nav4.png",
82
+        "pagePath": "pages/personal_core/home/home",
83
+        "text": "我的"
84
+      }
85
+    ]
86
+  },
87
+  "sitemapLocation": "sitemap.json"
88 88
 }

二進制
pages/.DS_Store


+ 27 - 15
pages/chat-list/chat-list.js

@@ -20,7 +20,18 @@ Page({
20 20
      */
21 21
     onLoad(options) {
22 22
       let that = this;
23
-      // emojiChar: "☺-😋-😌-😍-😏-😜-😝-😞-😔-😪-😭-😁-😂-😃-😅-😆-👿-😒-😓-😔-😏-😖-😘-😚-😒-😡-😢-😣-😤-😢-😨-😳-😵-😷-😸-😻-😼-😽-😾-😿-🙊-🙋-🙏-✈-🚇-🚃-🚌-🍄-🍅-🍆-🍇-🍈-🍉-🍑-🍒-🍓-🐔-🐶-🐷-👦-👧-👱-👩-👰-👨-👲-👳-💃-💄-💅-💆-💇-🌹-💑-💓-💘-🚲",
23
+
24
+      app.postRequest('my/images/headurl', {}, function (res) {
25
+        if (res.code == 201) {
26
+        //  console.log(res);
27
+          that.setData({
28
+            myheadurl: res.data.img,
29
+            // optioninfocode: res,
30
+          })
31
+        }
32
+      })
33
+
34
+    // emojiChar: "☺-😋-😌-😍-😏-😜-😝-😞-😔-😪-😭-😁-😂-😃-😅-😆-👿-😒-😓-😔-😏-😖-😘-😚-😒-😡-😢-😣-😤-😢-😨-😳-😵-😷-😸-😻-😼-😽-😾-😿-🙊-🙋-🙏-✈-🚇-🚃-🚌-🍄-🍅-🍆-🍇-🍈-🍉-🍑-🍒-🍓-🐔-🐶-🐷-👦-👧-👱-👩-👰-👨-👲-👳-💃-💄-💅-💆-💇-🌹-💑-💓-💘-🚲",
24 35
 
25 36
 
26 37
 
@@ -35,6 +46,9 @@ Page({
35 46
         _that.data.conversations[index].count = 0;
36 47
       }
37 48
     }
49
+  
50
+    //唯一用户表示
51
+    wx.setStorageSync('ChatListCount', e.currentTarget.dataset.item.to_str);
38 52
     // wx.setStorageSync('','');
39 53
     wx.setStorageSync('chat_to_id', e.currentTarget.dataset.item.to_id)
40 54
     wx.navigateTo({
@@ -59,20 +73,6 @@ Page({
59 73
 
60 74
     }
61 75
       console.log(e,111111222222);
62
-   
63
-    console.log(11);
64
-
65
-      app.postRequest('my/images/headurl', {}, function (res) {
66
-        if (res.code == 201) {
67
-          console.log(res);
68
-          _this.setData({
69
-            myheadurl: res.data.img,
70
-            // optioninfocode: res,
71
-          })
72
-        }
73
-      })
74
-
75
-      console.log(getApp().UserId());
76 76
       webSocket.sendSocketMessage({
77 77
         msg: JSON.stringify({ form_id: getApp().UserId(), type: 'Chat_list' }),
78 78
         success: function (res) {
@@ -105,12 +105,24 @@ Page({
105 105
   onSocketMessageCallback:function(e){
106 106
      let _this = this; 
107 107
     let data =  JSON.parse(e);
108
+    let chatlistcount = wx.getStorageSync('ChatListCount')
109
+    try {
110
+     
108 111
  
112
+    } catch (e) {
113
+      // Do something when catch error
114
+    }
109 115
     switch(data.type){
110 116
       case 'Chat_list':
111 117
       let dataAtt = data.data
112 118
       console.log(data.data,111111);
113 119
         for (var index in dataAtt) {
120
+          //清除缓存
121
+          if (chatlistcount && dataAtt[index].to_str == chatlistcount) {
122
+            wx.removeStorageSync('ChatListCount');
123
+            console.log(112233);
124
+            dataAtt[index].count = 0;
125
+          }
114 126
           if (dataAtt[index].type == 2) {
115 127
             dataAtt[index].content = '[图片]'
116 128
           }

+ 1 - 1
pages/chat/chat.js

@@ -342,6 +342,6 @@ Page({
342 342
     this.SocketSend({ to_id: _that.data.friendId, form_id: getApp().UserId(), type: 'get_history', page: _that.data.limit_page})
343 343
   },
344 344
   emojis:function(){
345
-      console.log(1111);
345
+    getApp().Tips('该功能正在开发中。');
346 346
   }
347 347
 });

二進制
pages/index/.DS_Store


文件差異過大導致無法顯示
+ 1138 - 980
pages/index/index.js


+ 12 - 3
pages/index_details/index_details.js

@@ -249,9 +249,18 @@ console.log(that.data.uploadImages)
249 249
   },
250 250
   toChat(e) { //跳转进入聊天页面
251 251
   let that = this;
252
-    wx.navigateTo({
253
-      url: '../chat/chat?to_id=' + that.to_id + '&myheadurl=' + that.myheadurl + '&headUrl=' + that.data.options_img
254
-    });
252
+    app.postRequest('circle/dialogue/validate', {}, function (res) {
253
+        console.log(res);
254
+      if (res.code == 201) {
255
+        wx.navigateTo({
256
+          url: '../chat/chat?to_id=' + that.to_id + '&myheadurl=' + that.myheadurl + '&headUrl=' + that.data.options_img
257
+        });
258
+        return ;
259
+      } 
260
+      app.Tips(res.msg);
261
+
262
+    })
263
+
255 264
   }
256 265
 
257 266
 

+ 3 - 1
project.config.json

@@ -8,7 +8,9 @@
8 8
 		"es6": true,
9 9
 		"postcss": true,
10 10
 		"minified": true,
11
-		"newFeature": true
11
+		"newFeature": true,
12
+		"autoAudits": false,
13
+		"checkInvalidKey": true
12 14
 	},
13 15
 	"compileType": "miniprogram",
14 16
 	"libVersion": "2.4.0",

+ 26 - 0
utils/share.js

@@ -0,0 +1,26 @@
1
+const app = getApp();
2
+const share_title = 'sharetitle';
3
+const share_path = 'sharepath';
4
+const share_imageurl = 'shareimageurl';
5
+function ShareSetInfo(){
6
+  app.postRequest('my/other/share', {}, function (res) {
7
+    if (res.code == 201) {
8
+      wx.setStorageSync(share_title, res.data.title);
9
+      wx.setStorageSync(share_path, res.data.path);
10
+      wx.setStorageSync(share_imageurl, res.data.imageUrl);
11
+    }
12
+  })
13
+}
14
+
15
+function Shareginfo(){
16
+    return{
17
+      title: wx.getStorageSync(share_title),
18
+      path: wx.getStorageSync(share_path),
19
+      imageurl: wx.getStorageSync(share_imageurl),
20
+    };
21
+}
22
+
23
+module.exports = {
24
+  ShareSetInfo,
25
+  Shareginfo
26
+};