Browse Source

add subcribe message

张延森 5 years ago
parent
commit
06574882f3
4 changed files with 22 additions and 6 deletions
  1. 4
    4
      config/dev.js
  2. 3
    0
      src/constants/api.js
  3. 8
    0
      src/constants/common.js
  4. 7
    2
      src/services/common.js

+ 4
- 4
config/dev.js View File

7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
8
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    // HOST: '"http://192.168.2.51:8080"',
13
-    // WSS_HOST: '"ws://192.168.2.51:8080"',
10
+    // HOST: '"https://lt.pawoma.cn"',
11
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12
+    HOST: '"http://127.0.0.1:8080"',
13
+    WSS_HOST: '"ws://127.0.0.1:8080"',
14
     Version: 'V3.5.3'
14
     Version: 'V3.5.3'
15
   },
15
   },
16
   weapp: {},
16
   weapp: {},

+ 3
- 0
src/constants/api.js View File

184
 export const API_BUILDING_TYPE = resolvePath('getByBuildingIdSelectBuildingProjectType')
184
 export const API_BUILDING_TYPE = resolvePath('getByBuildingIdSelectBuildingProjectType')
185
 export const API_CONSULTANT_VISIT_RECORD = resolvePath('visitRecord')
185
 export const API_CONSULTANT_VISIT_RECORD = resolvePath('visitRecord')
186
 export const API_MORE_ACTIVITY = resolvePath('visitRecord/activity')
186
 export const API_MORE_ACTIVITY = resolvePath('visitRecord/activity')
187
+
188
+// 消息模板
189
+export const API_TEMPLATE_TYPE = resolvePath('template/of/')

+ 8
- 0
src/constants/common.js View File

1
+// 通知消息
2
+export const TPL_NOTICE = "notice";
3
+
4
+// 助力消息
5
+export const TPL_HELP = "help-result";
6
+
7
+// 拼团消息
8
+export const TPL_GROUP = "group-result";

+ 7
- 2
src/services/common.js View File

6
   API_BANNER_LIST,
6
   API_BANNER_LIST,
7
   API_QUERY_CODE_SCENE,
7
   API_QUERY_CODE_SCENE,
8
   API_BURIED_POINT,
8
   API_BURIED_POINT,
9
-  API_CITY_LIST
9
+  API_CITY_LIST,
10
+  API_TEMPLATE_TYPE,
10
 } from '@constants/api'
11
 } from '@constants/api'
11
 
12
 
12
 /**
13
 /**
55
 export const queryCityList = () => fetch({ url: API_CITY_LIST })
56
 export const queryCityList = () => fetch({ url: API_CITY_LIST })
56
 
57
 
57
 
58
 
58
-
59
+/**
60
+ * 获取消息模板
61
+ * @param {*} 
62
+ */
63
+export const queryMessageTPL = type => fetch({ url: `${API_TEMPLATE_TYPE}/${type}` })