Browse Source

侧边栏-客户画像

xiuli.gao 2 years ago
parent
commit
abcfb99021
100 changed files with 13913 additions and 407 deletions
  1. BIN
      .DS_Store
  2. 0 5
      .idea/workspace.xml
  3. 5 1
      index.html
  4. 1 1
      project/src/App.vue
  5. 32 28
      project/src/assets/config/interface_api.js
  6. 0 4
      project/src/assets/css/reset.css
  7. 33 0
      project/src/components/customOperate/sideTool/index.vue
  8. 5 0
      project/src/components/customOperate/sideTool/quickWord.vue
  9. 621 0
      project/src/components/customOperate/sideTool/userPortrait.vue
  10. 5 2
      project/src/components/customOperate/welcom_message.vue
  11. 8 1
      project/src/components/dataBoard/wxAccount/accountReportConf.vue
  12. 2 1
      project/src/components/dataBoard/wxAccount/list.vue
  13. 12 12
      project/src/router/allRouter.js
  14. 18 0
      qwh5/config/index.js
  15. 1 0
      qwh5/dist/css/agreement.3ed8f786.css
  16. 0 1
      qwh5/dist/css/app.59ebc8d6.css
  17. 1 0
      qwh5/dist/css/app.629067db.css
  18. 1 1
      qwh5/dist/css/chunk-vendors.01b3e040.css
  19. 1 0
      qwh5/dist/css/userPortrait.933ef233.css
  20. 0 0
      qwh5/dist/img/dpNoData.572b0f6d.png
  21. BIN
      qwh5/dist/img/info_err.7976f107.png
  22. 1 1
      qwh5/dist/index.html
  23. 1 2
      qwh5/dist/js/about.f1949232.js
  24. 0 1
      qwh5/dist/js/about.f1949232.js.map
  25. 1 0
      qwh5/dist/js/agreement.e61e9c61.js
  26. 1 0
      qwh5/dist/js/app.94514a13.js
  27. 0 2
      qwh5/dist/js/app.a8110a54.js
  28. 0 1
      qwh5/dist/js/app.a8110a54.js.map
  29. 48 0
      qwh5/dist/js/chunk-vendors.62819ea7.js
  30. 0 42
      qwh5/dist/js/chunk-vendors.f252284d.js
  31. 0 1
      qwh5/dist/js/chunk-vendors.f252284d.js.map
  32. 1 0
      qwh5/dist/js/demo.853f5d45.js
  33. 1 0
      qwh5/dist/js/userPortrait.c48bbcef.js
  34. 11187 184
      qwh5/package-lock.json
  35. 3 0
      qwh5/package.json
  36. 14 0
      qwh5/postcss.config.js
  37. BIN
      qwh5/src/assets/img/dpNoData.png
  38. BIN
      qwh5/src/assets/img/info_err.png
  39. BIN
      qwh5/src/assets/img/lable_detial.png
  40. BIN
      qwh5/src/assets/img/self_head.png
  41. BIN
      qwh5/src/assets/img/userDefault.png
  42. 20 0
      qwh5/src/components/noData.vue
  43. 103 0
      qwh5/src/components/tag.vue
  44. 13 1
      qwh5/src/main.ts
  45. 15 0
      qwh5/src/router/index.ts
  46. 1 2
      qwh5/src/shims-vue.d.ts
  47. 11 0
      qwh5/src/styles/index.scss
  48. 351 0
      qwh5/src/styles/normalize.scss
  49. 125 0
      qwh5/src/styles/reset.scss
  50. 15 0
      qwh5/src/styles/self.scss
  51. 178 0
      qwh5/src/utils/axios.ts
  52. 23 0
      qwh5/src/utils/common.ts
  53. 59 0
      qwh5/src/utils/getWxConfig.ts
  54. 193 0
      qwh5/src/views/agreement.vue
  55. 52 0
      qwh5/src/views/demo.vue
  56. 735 0
      qwh5/src/views/userPortrait.vue
  57. 15 0
      qwh5/vue.config.js
  58. 0 1
      static/css/app.c78f736523b86d3407189d500dc847eb.css
  59. BIN
      static/fonts/element-icons.535877f.woff
  60. BIN
      static/fonts/element-icons.732389d.ttf
  61. BIN
      static/img/404.ff9db83.png
  62. BIN
      static/img/bg-head.7056a38.png
  63. BIN
      static/img/bg-home.7ba89c9.png
  64. BIN
      static/img/exterprise-mass-send.ee20127.png
  65. BIN
      static/img/friendsCircleSend.289dbc8.png
  66. BIN
      static/img/home-ac.fa77639.gif
  67. BIN
      static/img/home-item1.3692ebe.png
  68. BIN
      static/img/home-item2.1f77d7c.png
  69. BIN
      static/img/home-item3.c412bc4.png
  70. BIN
      static/img/home-item4.33bee47.png
  71. BIN
      static/img/kaigongsi.929270e.png
  72. BIN
      static/img/login_box.039035d.png
  73. BIN
      static/img/logo-box.9d6ccc3.png
  74. BIN
      static/img/phone.1c130fa.png
  75. 0 8
      static/js/0.21aa934fce8808bcf4c0.js
  76. 0 16
      static/js/1.e7a49a517b66e754a35a.js
  77. 0 1
      static/js/10.6815f56894e13b48cd83.js
  78. 0 1
      static/js/11.7e1ce1f7bf976332c440.js
  79. 0 1
      static/js/12.0329281da493e9d54ebe.js
  80. 0 1
      static/js/13.4b2c4f9b6e9ca268e7be.js
  81. 0 1
      static/js/14.7be4d5a6cfd440d21206.js
  82. 0 1
      static/js/15.6f38c82bbfa1c5a66205.js
  83. 0 1
      static/js/16.f918d724d540fb8bbf28.js
  84. 0 1
      static/js/17.3fbdfa0a82cd05196849.js
  85. 0 1
      static/js/18.38a43a077636f36bf359.js
  86. 0 1
      static/js/19.9b1dd29945ad8d7c5bdd.js
  87. 0 25
      static/js/2.312b7033339f3756c518.js
  88. 0 1
      static/js/20.9960f748cf535791d274.js
  89. 0 42
      static/js/21.4a1312b5994c40aa6f96.js
  90. 0 1
      static/js/22.ee99e1266e3ef75a5e0d.js
  91. 0 1
      static/js/23.61789f86bf56d27597e1.js
  92. 0 1
      static/js/24.15e5d4837150e5075be0.js
  93. 0 1
      static/js/25.cf40b14d7725d3b245d0.js
  94. 0 1
      static/js/26.17b4bcec2e4d07eeecea.js
  95. 0 1
      static/js/27.92a7ec021cf0e04ecdae.js
  96. 0 1
      static/js/28.cbc2d3084d45c7a20fe2.js
  97. 0 1
      static/js/29.461d5c8aba0dbd93bac9.js
  98. 0 1
      static/js/3.56ee950bf002a95b9c65.js
  99. 0 1
      static/js/30.29c3ca21f1571edfca8c.js
  100. 0 0
      static/js/31.fe38f3b05cf46e48b05a.js

BIN
.DS_Store


+ 0 - 5
.idea/workspace.xml

@@ -55,11 +55,6 @@
55 55
       <workItem from="1654653264438" duration="30604000" />
56 56
       <workItem from="1654739102819" duration="11048000" />
57 57
       <workItem from="1654756255993" duration="16970000" />
58
-<<<<<<< HEAD
59
-      <workItem from="1654774566674" duration="839000" />
60
-      <workItem from="1654827336655" duration="1043000" />
61
-=======
62
->>>>>>> master
63 58
     </task>
64 59
     <servers />
65 60
   </component>

+ 5 - 1
index.html

@@ -7,4 +7,8 @@
7 7
         hm.src = "https://hm.baidu.com/hm.js?d61b9e2caf4d46ccda7471b5385e2333";
8 8
         var s = document.getElementsByTagName("script")[0];
9 9
         s.parentNode.insertBefore(hm, s);
10
-      })();</script><link href=./static/css/app.c78f736523b86d3407189d500dc847eb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.ba4419c54f5a237da531.js></script><script type=text/javascript src=./static/js/app.0203bebff36ccbdd96b9.js></script></body></html>
10
+<<<<<<< HEAD
11
+      })();</script><link href=./static/css/app.c78f736523b86d3407189d500dc847eb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.ba4419c54f5a237da531.js></script><script type=text/javascript src=./static/js/app.0203bebff36ccbdd96b9.js></script></body></html>
12
+=======
13
+      })();</script><link href=./static/css/app.48238dbaa02fabdc35a1e2d7e4f7b248.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.5eb06677015611e88a3a.js></script><script type=text/javascript src=./static/js/app.7c7e776ed746ab9966e3.js></script></body></html>
14
+>>>>>>> xiu

+ 1 - 1
project/src/App.vue

@@ -58,7 +58,7 @@ export default {
58 58
 #app {
59 59
   background: #f5f6f8;
60 60
   min-height: 100vh;
61
-  width: 100vw;
61
+  width: 100%;
62 62
   font-family: "Noto Sans SC";
63 63
 }
64 64
 #warning_sorry {

+ 32 - 28
project/src/assets/config/interface_api.js

@@ -165,35 +165,39 @@ var api = {
165 165
   warn_djuserList: "/api/warn/djuserList",
166 166
   warn_groupEableOp: "/api/warn/groupEableOp",
167 167
 
168
-  channel_groupList:'/api/sq/sqGroupList',
169
-  channel_addGroup:'/api/sq/addSqgroup',
170
-  channel_editGroup:'/api/sq/editSqgroup',
171
-  channel_sortGroup:'/api/sq/editGroupSort',
172
-  channel_deleGroup:'/api/sq/delSqGroup',
173
-  channel_createCode:'/api/sq/addSourceQrcode',
174
-  channel_codeList:'/api/sq/sourceQrcodeList',
175
-  channel_codeDetial:'/api/sq/sourceQrcodeDetail',
176
-  channel_codeEdit:'/api/sq/editSourceQrcode',
177
-  channel_code_forbidden:'/api/sq/delSourceQrcode',
178
-  channel_dataView:'/api/sq/dataView',
179
-  channel_dataTrend:'/api/sq/dataTrend',
180
-  channel_trend_customerList:'/api/sq/customerList',
181
-  channel_trend_staffList:'/api/sq/staffList',
168
+  channel_groupList: '/api/sq/sqGroupList',
169
+  channel_addGroup: '/api/sq/addSqgroup',
170
+  channel_editGroup: '/api/sq/editSqgroup',
171
+  channel_sortGroup: '/api/sq/editGroupSort',
172
+  channel_deleGroup: '/api/sq/delSqGroup',
173
+  channel_createCode: '/api/sq/addSourceQrcode',
174
+  channel_codeList: '/api/sq/sourceQrcodeList',
175
+  channel_codeDetial: '/api/sq/sourceQrcodeDetail',
176
+  channel_codeEdit: '/api/sq/editSourceQrcode',
177
+  channel_code_forbidden: '/api/sq/delSourceQrcode',
178
+  channel_dataView: '/api/sq/dataView',
179
+  channel_dataTrend: '/api/sq/dataTrend',
180
+  channel_trend_customerList: '/api/sq/customerList',
181
+  channel_trend_staffList: '/api/sq/staffList',
182 182
 
183
-  radar_addGroup:'/api/radar/radarGroupCreate',
184
-  radar_groupList:'/api/radar/radarGroupList',
185
-  radar_editGroup:'/api/radar/radarGroupUpdate',
186
-  radar_sortGroup:'/api/radar/radarGroupSortUpdate',
187
-  radar_deleGroup:'/api/radar/radarGroupDelete',
188
-  radar_addRadar:'/api/radar/radarCreate',
189
-  radar_radarList:'/api/radar/radarList',
190
-  radar_radarDetail:'/api/radar/radarDetail',
191
-  radar_radarEdit:'/api/radar/radarUpdate',
192
-  radar_radarSort:'/api/radar/radarSortUpdate',
193
-  radar_radarDele:'/api/radar/radarDelete',
194
-  radar_uploadFileToOss:'/api/material/uploadFileToOss',
195
-  radar_dataView:'/api/radar/dataStatisticsTotal',
196
-  radar_dataView_list:'/api/radar/dataStatisticsList',
183
+  radar_addGroup: '/api/radar/radarGroupCreate',
184
+  radar_groupList: '/api/radar/radarGroupList',
185
+  radar_editGroup: '/api/radar/radarGroupUpdate',
186
+  radar_sortGroup: '/api/radar/radarGroupSortUpdate',
187
+  radar_deleGroup: '/api/radar/radarGroupDelete',
188
+  radar_addRadar: '/api/radar/radarCreate',
189
+  radar_radarList: '/api/radar/radarList',
190
+  radar_radarDetail: '/api/radar/radarDetail',
191
+  radar_radarEdit: '/api/radar/radarUpdate',
192
+  radar_radarSort: '/api/radar/radarSortUpdate',
193
+  radar_radarDele: '/api/radar/radarDelete',
194
+  radar_uploadFileToOss: '/api/material/uploadFileToOss',
195
+  radar_dataView: '/api/radar/dataStatisticsTotal',
196
+  radar_dataView_list: '/api/radar/dataStatisticsList',
197
+  portrait_confList: '/api/portrait/confList',
198
+  portrait_confOperate: '/api/portrait/confOperate',
199
+  portrait_confAdd: "/api/portrait/confAdd",
200
+  portrait_confEdit: "/api/portrait/confEdit",
197 201
 
198 202
 };
199 203
 

+ 0 - 4
project/src/assets/css/reset.css

@@ -56,8 +56,4 @@ button{
56 56
 *::-webkit-scrollbar-thumb {
57 57
     border-radius: 5px;
58 58
     background-color: rgba(196,197,200,.3);
59
-}
60
-html,body::-webkit-scrollbar {
61
-  width: 0px !important;
62
-  height: 0px !important;
63 59
 }

+ 33 - 0
project/src/components/customOperate/sideTool/index.vue

@@ -0,0 +1,33 @@
1
+<template>
2
+  <div>
3
+    <div class="topTagBox flex">
4
+      <div class="left flex-align-center">
5
+        <div :class="['tagItem',type=='userPortrait'?'tagItem_active':'']" @click="changeType('userPortrait');">客户画像</div>
6
+        <!-- <div :class="['tagItem',type=='quickWord'?'tagItem_active':'']" @click="changeType('quickWord');">快捷话术</div> -->
7
+      </div>
8
+    </div>
9
+    <keep-alive>
10
+      <component v-bind:is="type" class="tab"></component>
11
+    </keep-alive>
12
+  </div>
13
+</template>
14
+<script>
15
+import userPortrait from './userPortrait.vue'
16
+import quickWord from './quickWord.vue'
17
+export default {
18
+  components: { userPortrait, quickWord },
19
+  data () {
20
+    return {
21
+      type: 'userPortrait'
22
+    }
23
+  },
24
+  methods: {
25
+    changeType (type) {
26
+      this.type = type
27
+    },
28
+    
29
+  }
30
+}
31
+</script>
32
+<style lang="scss" scoped>
33
+</style>

+ 5 - 0
project/src/components/customOperate/sideTool/quickWord.vue

@@ -0,0 +1,5 @@
1
+<template>
2
+  <div>
3
+    2222
4
+  </div>
5
+</template>

File diff suppressed because it is too large
+ 621 - 0
project/src/components/customOperate/sideTool/userPortrait.vue


+ 5 - 2
project/src/components/customOperate/welcom_message.vue

@@ -52,7 +52,7 @@
52 52
             <p>2、分时段之外的时间将发送欢迎语。</p>
53 53
           </div>
54 54
         </div>
55
-        <div class="regulations regulations2" v-for="(item,index) in timeIntervalList" :key="index + 'shiduan'">
55
+        <div class="regulations regulations2" v-for="(item,index) in timeIntervalList" :key="index + 'shiduan'+key_we_index">
56 56
           <label style="margin-top:30px;text-align:right">时段{{index+1}}:</label>
57 57
           <welcom-edit :deleteFlag='timeIntervalList.length==1?false:true'
58 58
                        :editInfo="item"
@@ -108,7 +108,8 @@ export default {
108 108
         "content": '',
109 109
         "attachments": []
110 110
       },
111
-      dataInfo: {}
111
+      dataInfo: {},
112
+      key_we_index:1
112 113
     }
113 114
   },
114 115
   created () {
@@ -174,9 +175,11 @@ export default {
174 175
         this.deleteTimeIntervalList.push(obj)
175 176
       }
176 177
       this.timeIntervalList.splice(index, 1)
178
+      this.key_we_index++;
177 179
     },
178 180
     addWelcom () {//添加分时段
179 181
       this.timeIntervalList.push(this.init_welcom_con)
182
+      this.key_we_index++;
180 183
     },
181 184
     switchChange () {//分时段开关打开
182 185
       if (this.is_day_parting && this.timeIntervalList.length == 0) {

+ 8 - 1
project/src/components/dataBoard/wxAccount/accountReportConf.vue

@@ -10,6 +10,10 @@
10 10
         <div class="name"><em>*</em>关联企微:</div>
11 11
         <self-channel title="" width="250px" type='corpIdList' :afferent_value='corpid' @channelDefine="(val)=>{corpid = val;}"></self-channel>
12 12
       </div>
13
+      <div class="itemBox">
14
+        <div class="name">渠道编号:</div>
15
+        <el-input placeholder="请输入渠道编号" style="width:250px" v-model.trim="channel" size="small" clearable></el-input>
16
+      </div>
13 17
     </div>
14 18
     <div slot="footer" class="dialog-footer">
15 19
       <el-button size="mini" @click="$emit('returnReportRule')">取 消</el-button>
@@ -30,13 +34,15 @@ export default {
30 34
       user_id: '',
31 35
       time: [],
32 36
       loading: false,
33
-      user_action_set_id: ''
37
+      user_action_set_id: '',
38
+      channel: ''
34 39
     }
35 40
   },
36 41
   created () {
37 42
     if (this.editData && this.editData.wechat_account_id) {
38 43
       this.corpid = this.editData.corp_id ? this.editData.corp_id : '';
39 44
       this.user_action_set_id = this.editData.user_action_set_id ? this.editData.user_action_set_id : '';
45
+      this.channel = this.editData.channel ? this.editData.channel : '';
40 46
     }
41 47
   },
42 48
   methods: {
@@ -61,6 +67,7 @@ export default {
61 67
         user_action_set_id: this.user_action_set_id,
62 68
         corpid: this.corpid,
63 69
         app_id: this.editData.wechat_account_id,
70
+        channel: this.channel
64 71
       }
65 72
       this.$axios.post(this.URL.BASEURL + axios_api, params).then((res) => {
66 73
         var res = res.data

+ 2 - 1
project/src/components/dataBoard/wxAccount/list.vue

@@ -12,7 +12,7 @@
12 12
             <el-button type="primary" plain size="mini" @click="clearSelect">清空选中</el-button>
13 13
           </div>
14 14
         </div>
15
-        <div class="c-FF604D f14 lMar28">重要提示:公众号完成后请及时编辑数据源ID与企微主体</div>
15
+        <div class="c-FF604D f14 lMar28">重要提示:公众号完成后请及时编辑渠道编号、数据源ID与企微主体</div>
16 16
       </div>
17 17
       <div class="flex">
18 18
         <el-popover placement="bottom" width="600" trigger="click">
@@ -35,6 +35,7 @@
35 35
     <el-table ref="multipleTable" :height="height" :data="gzhData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
36 36
       <el-table-column type="selection" :selectable="checkSelectable" width="55" align="center"></el-table-column>
37 37
       <el-table-column prop="account_name" min-width="160" label="公众号" show-overflow-tooltip align="center" fixed="left"></el-table-column>
38
+      <el-table-column prop="channel" min-width="140" label="渠道编号" show-overflow-tooltip align="center"></el-table-column>
38 39
       <el-table-column prop="user_action_set_id" min-width="160" label="数据源ID" show-overflow-tooltip align="center"></el-table-column>
39 40
       <el-table-column prop="created_at" min-width="180" label="授权时间" show-overflow-tooltip align="center"></el-table-column>
40 41
       <el-table-column prop="corp_name" min-width="160" label="关联企微" show-overflow-tooltip align="center"></el-table-column>

+ 12 - 12
project/src/router/allRouter.js

@@ -5,7 +5,7 @@ const homeData = () => import('@/components/HomeData.vue')
5 5
 const customManage = () => import(/* webpackChunkName: 'customManage' */ '@/components/customManage/manage.vue')
6 6
 const employee_bulk_messaging_log = () => import(/* webpackChunkName: 'employee_bulk_messaging_log' */ '@/components/customOperate/employee_bulk_messaging_log.vue')
7 7
 const customerFriendsCircle = () => import(/* webpackChunkName: 'customerFriendsCircle' */ '@/components/customOperate/friendsCircle/index.vue')
8
-// const createFriendsCircle = () => import(/* webpackChunkName: 'createFriendsCircle' */ '@/components/customOperate/createFriendsCircle.vue')
8
+const sideTool = () => import(/* webpackChunkName: 'sideTool' */ '@/components/customOperate/sideTool/index.vue')
9 9
 // const createMassMsg = () => import(/* webpackChunkName: 'createMassMsg' */ '@/components/customOperate/createMassMsg.vue')
10 10
 const blackList = () => import(/* webpackChunkName: 'blackList' */ '@/components/customManage/blackList.vue')
11 11
 const welcomeMsg = () => import(/* webpackChunkName: 'welcomeMsg' */ '@/components/customOperate/welcomeMsg.vue')
@@ -41,7 +41,7 @@ const importRecordDetial = () => import(/* webpackChunkName: 'importRecordDetial
41 41
 const codeIndex = () => import(/* webpackChunkName: 'codeIndex' */ '@/components/channelCode/codeIndex.vue')
42 42
 const code_dataAnalyse = () => import(/* webpackChunkName: 'dataAnalyse' */ '@/components/channelCode/dataAnalyse.vue')
43 43
 const createChannelCode = () => import(/* webpackChunkName: 'createChannelCode' */ '@/components/channelCode/createChannelCode.vue')
44
-const h5test= () => import(/* webpackChunkName: 'h5test' */ '@/components/h5test.vue')
44
+const h5test = () => import(/* webpackChunkName: 'h5test' */ '@/components/h5test.vue')
45 45
 
46 46
 // name与菜单配置的页面路由一致
47 47
 // meta下isData:true为数据看板,否则为助手
@@ -213,16 +213,16 @@ export var allRouter = [
213 213
           title: '客户朋友圈'
214 214
         }
215 215
       },
216
-      // {
217
-      //   path: 'createFriendsCircle',
218
-      //   name: 'customerFriendsCircle',
219
-      //   component: createFriendsCircle,
220
-      //   meta: {
221
-      //     keepAlive: false,
222
-      //     isLogin: true,
223
-      //     title: '创建朋友圈'
224
-      //   }
225
-      // },
216
+      {
217
+        path: 'sideTool',
218
+        name: 'sideTool',
219
+        component: sideTool,
220
+        meta: {
221
+          keepAlive: false,
222
+          isLogin: true,
223
+          title: '侧边栏工具'
224
+        }
225
+      },
226 226
       {
227 227
         path: 'employee_bulk_messaging_log',
228 228
         name: 'employee_bulk_messaging_log',

+ 18 - 0
qwh5/config/index.js

@@ -0,0 +1,18 @@
1
+module.exports = {
2
+  mock: {
3
+    baseURL: '/dev-api',
4
+    mockURL: 'https://mock.xwhx.top'
5
+  },
6
+  local: {
7
+    baseURL: '/dev-api',
8
+    mockURL: 'http://0.0.0.0:7001'
9
+  },
10
+  development: {
11
+    baseURL: '/api',
12
+    mockURL: 'http://duanju.wenxingshuju.com'
13
+  },
14
+  production: {
15
+    baseURL: 'http://duanju.wenxingshuju.com',
16
+    mockURL: 'http://duanju.wenxingshuju.com'
17
+  }
18
+}

File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/css/agreement.3ed8f786.css


File diff suppressed because it is too large
+ 0 - 1
qwh5/dist/css/app.59ebc8d6.css


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/css/app.629067db.css


File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/css/chunk-vendors.01b3e040.css


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/css/userPortrait.933ef233.css


static/img/dpNoData.28b47ba.png → qwh5/dist/img/dpNoData.572b0f6d.png


BIN
qwh5/dist/img/info_err.7976f107.png


File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/index.html


+ 1 - 2
qwh5/dist/js/about.f1949232.js

@@ -1,2 +1 @@
1
-"use strict";(self["webpackChunkqwh5"]=self["webpackChunkqwh5"]||[]).push([[443],{4335:function(n,u,t){t.r(u),t.d(u,{default:function(){return f}});var a=t(3396);const e={class:"about"},r=(0,a._)("h1",null,"This is an about page",-1),s=[r];function c(n,u){return(0,a.wg)(),(0,a.iD)("div",e,s)}var i=t(89);const h={},o=(0,i.Z)(h,[["render",c]]);var f=o}}]);
2
-//# sourceMappingURL=about.f1949232.js.map
1
+"use strict";(self["webpackChunkqwh5"]=self["webpackChunkqwh5"]||[]).push([[443],{4335:function(n,u,t){t.r(u),t.d(u,{default:function(){return f}});var a=t(3396);const e={class:"about"},r=(0,a._)("h1",null,"This is an about page",-1),s=[r];function c(n,u){return(0,a.wg)(),(0,a.iD)("div",e,s)}var i=t(89);const h={},o=(0,i.Z)(h,[["render",c]]);var f=o}}]);

File diff suppressed because it is too large
+ 0 - 1
qwh5/dist/js/about.f1949232.js.map


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/agreement.e61e9c61.js


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/app.94514a13.js


File diff suppressed because it is too large
+ 0 - 2
qwh5/dist/js/app.a8110a54.js


File diff suppressed because it is too large
+ 0 - 1
qwh5/dist/js/app.a8110a54.js.map


File diff suppressed because it is too large
+ 48 - 0
qwh5/dist/js/chunk-vendors.62819ea7.js


File diff suppressed because it is too large
+ 0 - 42
qwh5/dist/js/chunk-vendors.f252284d.js


File diff suppressed because it is too large
+ 0 - 1
qwh5/dist/js/chunk-vendors.f252284d.js.map


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/demo.853f5d45.js


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/userPortrait.c48bbcef.js


File diff suppressed because it is too large
+ 11187 - 184
qwh5/package-lock.json


+ 3 - 0
qwh5/package.json

@@ -10,9 +10,11 @@
10 10
     "axios": "^0.27.2",
11 11
     "core-js": "^3.8.3",
12 12
     "element-plus": "^2.2.5",
13
+    "md5": "^2.3.0",
13 14
     "sass": "^1.52.3",
14 15
     "sass-loader": "^13.0.0",
15 16
     "save": "^2.5.0",
17
+    "vant": "^3.5.2",
16 18
     "vue": "^3.2.13",
17 19
     "vue-class-component": "^8.0.0-0",
18 20
     "vue-router": "^4.0.3",
@@ -24,6 +26,7 @@
24 26
     "@vue/cli-plugin-typescript": "~5.0.0",
25 27
     "@vue/cli-plugin-vuex": "~5.0.0",
26 28
     "@vue/cli-service": "~5.0.0",
29
+    "postcss-px-to-viewport": "^1.1.1",
27 30
     "typescript": "~4.5.5"
28 31
   }
29 32
 }

+ 14 - 0
qwh5/postcss.config.js

@@ -0,0 +1,14 @@
1
+module.exports = {
2
+  plugins: {
3
+    autoprefixer: {},
4
+    'postcss-px-to-viewport': {
5
+      viewportWidth: 375,
6
+      unitPrecision: 5,
7
+      viewportUnit: 'vw',
8
+      selectorBlackList: ['.ignore', '.hairlines'],
9
+      minPixelValue: 1,
10
+      mediaQuery: false,
11
+      exclude: /node_modules/
12
+    }
13
+  }
14
+}

BIN
qwh5/src/assets/img/dpNoData.png


BIN
qwh5/src/assets/img/info_err.png


BIN
qwh5/src/assets/img/lable_detial.png


BIN
qwh5/src/assets/img/self_head.png


BIN
qwh5/src/assets/img/userDefault.png


+ 20 - 0
qwh5/src/components/noData.vue

@@ -0,0 +1,20 @@
1
+<template>
2
+  <div>
3
+    <img src="@/assets/img/dpNoData.png" class="dpNoData" alt="">
4
+    <p class="hint">暂无数据</p>
5
+  </div>
6
+</template>
7
+<style lang="scss" scoped>
8
+.dpNoData{
9
+  width:50%;
10
+  margin:auto;
11
+  display: block;
12
+}
13
+.hint{
14
+  font-size: 13px;
15
+  color:#888;
16
+  line-height: 20px;
17
+  text-align: center;
18
+  margin-top:20px;
19
+}
20
+</style>

+ 103 - 0
qwh5/src/components/tag.vue

@@ -0,0 +1,103 @@
1
+<template>
2
+  <div class="tag_cantiner">
3
+    <div v-for="(item,index) in tagList" :key="index+'tag'" class="tagBox">
4
+      <h3 class="tagName">{{item.group_name}}</h3>
5
+      <div class="tagItemBox">
6
+        <div :class="['tagItem',(selectedTag.filter((v)=>{return v.tag_md5 == tag.tag_md5})).length>0?'active':'']" v-for="(tag) in item.tag_list" :key="tag.tag_id" @click="tagEvent(tag)">{{tag.tag_name}}</div>
7
+      </div>
8
+    </div>
9
+  </div>
10
+</template>
11
+<script lang="ts" setup>
12
+import { Toast } from 'vant';
13
+import { onBeforeMount, ref, reactive, getCurrentInstance } from 'vue';
14
+  const emits= defineEmits<{///*ts专有*/
15
+    (e: 'closeTag', num: number): void
16
+  }>()
17
+  const props = defineProps({
18
+    labelList :{
19
+      type: Array,
20
+      default: []
21
+    },
22
+    configInfo: {
23
+      type: Object
24
+    }
25
+  })
26
+  const { proxy } = getCurrentInstance(); //来获取全局 globalProperties 中配置的信息
27
+  const tagList = ref([])
28
+  const selectedTag = ref([]);//选中的标签
29
+  selectedTag.value = JSON.parse(JSON.stringify(props.labelList));
30
+
31
+  onBeforeMount(() => {//组件挂载之前
32
+    get_tag()
33
+  });
34
+  function tagEvent(data){//点击标签选择
35
+    let arr:any = selectedTag.value;
36
+    if(arr.filter((v)=>{
37
+      return v.tag_md5 == data.tag_md5
38
+    }).length>0){
39
+      arr = arr.filter((v)=>{
40
+        return v.tag_md5 != data.tag_md5
41
+      })
42
+    }else{
43
+      arr.push(data)
44
+    }
45
+    selectedTag.value = arr;
46
+    emits('closeTag',arr)
47
+  }
48
+  function get_tag(){//获取所有标签
49
+    Toast.loading({
50
+      duration:0,
51
+      message: '加载中...',
52
+      forbidClick: true,
53
+    });
54
+    (proxy as any).$axios.post("/api/h5/portrait/tagList", {
55
+      corpid: props.configInfo.corpid,
56
+      external_userid: props.configInfo.external_userid,
57
+      user_id: props.configInfo.user_id
58
+    },true)
59
+    .then((res) => {
60
+      //请求成功
61
+      tagList.value = res.rst;
62
+      Toast.clear();
63
+    })
64
+    .catch( err => {
65
+      Toast.clear();
66
+    })
67
+  }
68
+</script>
69
+<style lang="scss" scoped>
70
+.tag_cantiner{
71
+  padding:20px;
72
+  max-height: 60vh;
73
+  overflow-y: auto;
74
+}
75
+.tagBox{
76
+  .tagName{
77
+    font-size: 14px;
78
+    font-weight: bold;
79
+    color: #444;
80
+  }
81
+  .tagItemBox{
82
+    display: flex;
83
+    align-items: center;
84
+    flex-wrap: wrap;
85
+    margin-bottom: 20px;
86
+    .tagItem{
87
+      padding: 2px 10px;
88
+      line-height: 20px;
89
+      text-align: center;
90
+      border: 1px solid #d2d2d2;
91
+      margin-right: 8px;
92
+      margin-top: 10px;
93
+      font-size: 12px;
94
+      border-radius: 3px;
95
+      &.active{
96
+        background-color: rgba(0,179,138,.2);
97
+        border: 1px solid rgba(0,179,138,.4);
98
+        color: #00b38a;
99
+      }
100
+    }
101
+  }
102
+}
103
+</style>

+ 13 - 1
qwh5/src/main.ts

@@ -4,5 +4,17 @@ import router from './router'
4 4
 import store from './store'
5 5
 import ElementPlus from 'element-plus'
6 6
 import 'element-plus/dist/index.css'
7
+// import * as ElementPlusIconsVue from '@element-plus/icons-vue'
8
+import { Icon, Loading, Popover, List, Field } from 'vant';
9
+import 'vant/lib/index.css';
10
+import './styles/index.scss'
11
+import axios from './utils/axios';
12
+const app = createApp(App)
7 13
 
8
-createApp(App).use(ElementPlus).use(store).use(router).mount('#app')
14
+// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {//引入elemenet全部图标
15
+//   app.component(key, component)
16
+// }
17
+
18
+app.use(Field).use(List).use(Popover).use(Loading).use(Icon).use(ElementPlus).use(store).use(router).mount('#app')
19
+
20
+app.config.globalProperties.$axios = axios;//全局挂载方法

+ 15 - 0
qwh5/src/router/index.ts

@@ -3,6 +3,16 @@ import HomeView from '../views/HomeView.vue'
3 3
 
4 4
 const routes: Array<RouteRecordRaw> = [
5 5
   {
6
+    path: '/demo',
7
+    name: 'demo',
8
+    component: () => import(/*webpackChunkName:"demo" */ '@/views/demo.vue')
9
+  },
10
+  {
11
+    path: '/agreement',
12
+    name: 'agreement',
13
+    component: () => import(/*webpackChunkName:"agreement" */ '@/views/agreement.vue')
14
+  },
15
+  {
6 16
     path: '/',
7 17
     name: 'home',
8 18
     component: HomeView
@@ -14,6 +24,11 @@ const routes: Array<RouteRecordRaw> = [
14 24
     // this generates a separate chunk (about.[hash].js) for this route
15 25
     // which is lazy-loaded when the route is visited.
16 26
     component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
27
+  },
28
+  {
29
+    path: '/userPortrait',
30
+    name: 'userPortrait',
31
+    component: () => import(/*webpackChunkName:"userPortrait" */ '@/views/userPortrait.vue')
17 32
   }
18 33
 ]
19 34
 

+ 1 - 2
qwh5/src/shims-vue.d.ts

@@ -1,8 +1,7 @@
1 1
 /* eslint-disable */
2 2
 // import {DefineComponent} from "vue";
3
-
4 3
 declare module '*.vue' {
5
-  import  { DefineComponent } from 'vue'
4
+  import { DefineComponent } from 'vue'
6 5
   const component: DefineComponent<{}, {}, any>
7 6
   export default component
8 7
 }

+ 11 - 0
qwh5/src/styles/index.scss

@@ -0,0 +1,11 @@
1
+@import './reset.scss';
2
+@import './normalize.scss';
3
+@import './self.scss';
4
+
5
+html {
6
+  touch-action: manipulation;
7
+}
8
+
9
+.van-popup-background-color{
10
+  background-color: red;
11
+}

+ 351 - 0
qwh5/src/styles/normalize.scss

@@ -0,0 +1,351 @@
1
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
2
+
3
+/* Document
4
+   ========================================================================== */
5
+
6
+/**
7
+ * 1. Correct the line height in all browsers.
8
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
9
+ */
10
+
11
+ html {
12
+  line-height: 1.15; /* 1 */
13
+  -webkit-text-size-adjust: 100%; /* 2 */
14
+}
15
+
16
+/* Sections
17
+     ========================================================================== */
18
+
19
+/**
20
+   * Remove the margin in all browsers.
21
+   */
22
+
23
+body {
24
+  margin: 0;
25
+}
26
+
27
+/**
28
+   * Render the `main` element consistently in IE.
29
+   */
30
+
31
+main {
32
+  display: block;
33
+}
34
+
35
+/**
36
+   * Correct the font size and margin on `h1` elements within `section` and
37
+   * `article` contexts in Chrome, Firefox, and Safari.
38
+   */
39
+
40
+h1 {
41
+  font-size: 2em;
42
+  margin: 0.67em 0;
43
+}
44
+
45
+/* Grouping content
46
+     ========================================================================== */
47
+
48
+/**
49
+   * 1. Add the correct box sizing in Firefox.
50
+   * 2. Show the overflow in Edge and IE.
51
+   */
52
+
53
+hr {
54
+  box-sizing: content-box; /* 1 */
55
+  height: 0; /* 1 */
56
+  overflow: visible; /* 2 */
57
+}
58
+
59
+/**
60
+   * 1. Correct the inheritance and scaling of font size in all browsers.
61
+   * 2. Correct the odd `em` font sizing in all browsers.
62
+   */
63
+
64
+pre {
65
+  font-family: monospace, monospace; /* 1 */
66
+  font-size: 1em; /* 2 */
67
+}
68
+
69
+/* Text-level semantics
70
+     ========================================================================== */
71
+
72
+/**
73
+   * Remove the gray background on active links in IE 10.
74
+   */
75
+
76
+a {
77
+  background-color: transparent;
78
+}
79
+
80
+/**
81
+   * 1. Remove the bottom border in Chrome 57-
82
+   * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
83
+   */
84
+
85
+abbr[title] {
86
+  border-bottom: none; /* 1 */
87
+  text-decoration: underline; /* 2 */
88
+  text-decoration: underline dotted; /* 2 */
89
+}
90
+
91
+/**
92
+   * Add the correct font weight in Chrome, Edge, and Safari.
93
+   */
94
+
95
+b,
96
+strong {
97
+  font-weight: bolder;
98
+}
99
+
100
+/**
101
+   * 1. Correct the inheritance and scaling of font size in all browsers.
102
+   * 2. Correct the odd `em` font sizing in all browsers.
103
+   */
104
+
105
+code,
106
+kbd,
107
+samp {
108
+  font-family: monospace, monospace; /* 1 */
109
+  font-size: 1em; /* 2 */
110
+}
111
+
112
+/**
113
+   * Add the correct font size in all browsers.
114
+   */
115
+
116
+small {
117
+  font-size: 80%;
118
+}
119
+
120
+/**
121
+   * Prevent `sub` and `sup` elements from affecting the line height in
122
+   * all browsers.
123
+   */
124
+
125
+sub,
126
+sup {
127
+  font-size: 75%;
128
+  line-height: 0;
129
+  position: relative;
130
+  vertical-align: baseline;
131
+}
132
+
133
+sub {
134
+  bottom: -0.25em;
135
+}
136
+
137
+sup {
138
+  top: -0.5em;
139
+}
140
+
141
+/* Embedded content
142
+     ========================================================================== */
143
+
144
+/**
145
+   * Remove the border on images inside links in IE 10.
146
+   */
147
+
148
+img {
149
+  border-style: none;
150
+}
151
+
152
+/* Forms
153
+     ========================================================================== */
154
+
155
+/**
156
+   * 1. Change the font styles in all browsers.
157
+   * 2. Remove the margin in Firefox and Safari.
158
+   */
159
+
160
+button,
161
+input,
162
+optgroup,
163
+select,
164
+textarea {
165
+  font-family: inherit; /* 1 */
166
+  font-size: 100%; /* 1 */
167
+  line-height: 1.15; /* 1 */
168
+  margin: 0; /* 2 */
169
+}
170
+
171
+/**
172
+   * Show the overflow in IE.
173
+   * 1. Show the overflow in Edge.
174
+   */
175
+
176
+button,
177
+input {
178
+  /* 1 */
179
+  overflow: visible;
180
+}
181
+
182
+/**
183
+   * Remove the inheritance of text transform in Edge, Firefox, and IE.
184
+   * 1. Remove the inheritance of text transform in Firefox.
185
+   */
186
+
187
+button,
188
+select {
189
+  /* 1 */
190
+  text-transform: none;
191
+}
192
+
193
+/**
194
+   * Correct the inability to style clickable types in iOS and Safari.
195
+   */
196
+
197
+button,
198
+[type='button'],
199
+[type='reset'],
200
+[type='submit'] {
201
+  -webkit-appearance: button;
202
+}
203
+
204
+/**
205
+   * Remove the inner border and padding in Firefox.
206
+   */
207
+
208
+button::-moz-focus-inner,
209
+[type='button']::-moz-focus-inner,
210
+[type='reset']::-moz-focus-inner,
211
+[type='submit']::-moz-focus-inner {
212
+  border-style: none;
213
+  padding: 0;
214
+}
215
+
216
+/**
217
+   * Restore the focus styles unset by the previous rule.
218
+   */
219
+
220
+button:-moz-focusring,
221
+[type='button']:-moz-focusring,
222
+[type='reset']:-moz-focusring,
223
+[type='submit']:-moz-focusring {
224
+  outline: 1px dotted ButtonText;
225
+}
226
+
227
+/**
228
+   * Correct the padding in Firefox.
229
+   */
230
+
231
+fieldset {
232
+  padding: 0.35em 0.75em 0.625em;
233
+}
234
+
235
+/**
236
+   * 1. Correct the text wrapping in Edge and IE.
237
+   * 2. Correct the color inheritance from `fieldset` elements in IE.
238
+   * 3. Remove the padding so developers are not caught out when they zero out
239
+   *    `fieldset` elements in all browsers.
240
+   */
241
+
242
+legend {
243
+  box-sizing: border-box; /* 1 */
244
+  color: inherit; /* 2 */
245
+  display: table; /* 1 */
246
+  max-width: 100%; /* 1 */
247
+  padding: 0; /* 3 */
248
+  white-space: normal; /* 1 */
249
+}
250
+
251
+/**
252
+   * Add the correct vertical alignment in Chrome, Firefox, and Opera.
253
+   */
254
+
255
+progress {
256
+  vertical-align: baseline;
257
+}
258
+
259
+/**
260
+   * Remove the default vertical scrollbar in IE 10+.
261
+   */
262
+
263
+textarea {
264
+  overflow: auto;
265
+}
266
+
267
+/**
268
+   * 1. Add the correct box sizing in IE 10.
269
+   * 2. Remove the padding in IE 10.
270
+   */
271
+
272
+[type='checkbox'],
273
+[type='radio'] {
274
+  box-sizing: border-box; /* 1 */
275
+  padding: 0; /* 2 */
276
+}
277
+
278
+/**
279
+   * Correct the cursor style of increment and decrement buttons in Chrome.
280
+   */
281
+
282
+[type='number']::-webkit-inner-spin-button,
283
+[type='number']::-webkit-outer-spin-button {
284
+  height: auto;
285
+}
286
+
287
+/**
288
+   * 1. Correct the odd appearance in Chrome and Safari.
289
+   * 2. Correct the outline style in Safari.
290
+   */
291
+
292
+[type='search'] {
293
+  -webkit-appearance: textfield; /* 1 */
294
+  outline-offset: -2px; /* 2 */
295
+}
296
+
297
+/**
298
+   * Remove the inner padding in Chrome and Safari on macOS.
299
+   */
300
+
301
+[type='search']::-webkit-search-decoration {
302
+  -webkit-appearance: none;
303
+}
304
+
305
+/**
306
+   * 1. Correct the inability to style clickable types in iOS and Safari.
307
+   * 2. Change font properties to `inherit` in Safari.
308
+   */
309
+
310
+::-webkit-file-upload-button {
311
+  -webkit-appearance: button; /* 1 */
312
+  font: inherit; /* 2 */
313
+}
314
+
315
+/* Interactive
316
+     ========================================================================== */
317
+
318
+/*
319
+   * Add the correct display in Edge, IE 10+, and Firefox.
320
+   */
321
+
322
+details {
323
+  display: block;
324
+}
325
+
326
+/*
327
+   * Add the correct display in all browsers.
328
+   */
329
+
330
+summary {
331
+  display: list-item;
332
+}
333
+
334
+/* Misc
335
+     ========================================================================== */
336
+
337
+/**
338
+   * Add the correct display in IE 10+.
339
+   */
340
+
341
+template {
342
+  display: none;
343
+}
344
+
345
+/**
346
+   * Add the correct display in IE 10.
347
+   */
348
+
349
+[hidden] {
350
+  display: none;
351
+}

+ 125 - 0
qwh5/src/styles/reset.scss

@@ -0,0 +1,125 @@
1
+html,
2
+body,
3
+div,
4
+span,
5
+applet,
6
+object,
7
+iframe,
8
+h1,
9
+h2,
10
+h3,
11
+h4,
12
+h5,
13
+h6,
14
+p,
15
+blockquote,
16
+pre,
17
+a,
18
+abbr,
19
+acronym,
20
+address,
21
+big,
22
+cite,
23
+code,
24
+del,
25
+dfn,
26
+em,
27
+img,
28
+ins,
29
+kbd,
30
+q,
31
+s,
32
+samp,
33
+small,
34
+strike,
35
+strong,
36
+sub,
37
+sup,
38
+tt,
39
+var,
40
+b,
41
+u,
42
+i,
43
+center,
44
+dl,
45
+dt,
46
+dd,
47
+ol,
48
+ul,
49
+li,
50
+fieldset,
51
+form,
52
+label,
53
+legend,
54
+table,
55
+caption,
56
+tbody,
57
+tfoot,
58
+thead,
59
+tr,
60
+th,
61
+td,
62
+article,
63
+aside,
64
+canvas,
65
+details,
66
+embed,
67
+figure,
68
+figcaption,
69
+footer,
70
+header,
71
+hgroup,
72
+menu,
73
+nav,
74
+output,
75
+ruby,
76
+section,
77
+summary,
78
+time,
79
+mark,
80
+audio,
81
+video {
82
+  margin: 0;
83
+  padding: 0;
84
+  border: 0;
85
+  font-size: 100%;
86
+  font: inherit;
87
+  vertical-align: baseline;
88
+  font-family:'Noto Sans SC','PingFangSC-Regular', 'PingFang SC';
89
+}
90
+/* HTML5 display-role reset for older browsers */
91
+article,
92
+aside,
93
+details,
94
+figcaption,
95
+figure,
96
+footer,
97
+header,
98
+hgroup,
99
+menu,
100
+nav,
101
+section {
102
+  display: block;
103
+}
104
+body {
105
+  line-height: 1.15;
106
+}
107
+ol,
108
+ul {
109
+  list-style: none;
110
+}
111
+blockquote,
112
+q {
113
+  quotes: none;
114
+}
115
+blockquote:before,
116
+blockquote:after,
117
+q:before,
118
+q:after {
119
+  content: "";
120
+  content: none;
121
+}
122
+table {
123
+  border-collapse: collapse;
124
+  border-spacing: 0;
125
+}

+ 15 - 0
qwh5/src/styles/self.scss

@@ -0,0 +1,15 @@
1
+.flex{
2
+  display: flex;
3
+  align-items: center;
4
+}
5
+.flex-center-between{
6
+  display: flex;
7
+  align-items: center;
8
+  justify-content: space-between;
9
+}
10
+.c-00b38a{
11
+  color:#00b38a !important;
12
+}
13
+.f14{
14
+  font-size: 14px;
15
+}

+ 178 - 0
qwh5/src/utils/axios.ts

@@ -0,0 +1,178 @@
1
+import axios, { AxiosInstance } from 'axios'
2
+// eslint-disable-next-line
3
+// import { getToken, getCsrfToken } from '@/utils/auth'
4
+// import store from '@/store'
5
+import { Toast } from 'vant'
6
+import md5 from 'md5';
7
+
8
+// eslint-disable-next-line
9
+const config = require('../../config')
10
+
11
+const { baseURL } = config[process.env.NODE_ENV]
12
+
13
+// 创建axios实例
14
+const service: AxiosInstance = axios.create({
15
+  baseURL,
16
+  // timeout: 5000
17
+  // withCredentials: true
18
+})
19
+
20
+// 请求拦截器
21
+service.interceptors.request.use(
22
+  config => {
23
+    // if (store.state.user.token) {
24
+    //   config.headers.Authorization = `Bearer ${getToken()}`
25
+    // }
26
+    // config.headers['x-csrf-token'] = getCsrfToken()
27
+    if (config.method == "post") {
28
+      config.data = Object.assign((config.data ? config.data : {}))
29
+    } else {
30
+      config.params = Object.assign((config.params ? config.params : {}))
31
+    }
32
+    return config
33
+  },
34
+  error => {
35
+    console.log(error)
36
+    return Promise.reject(error)
37
+  }
38
+)
39
+
40
+// 响应拦截器
41
+service.interceptors.response.use(
42
+  response => {
43
+    return response
44
+  },
45
+  error => {
46
+    //这里是返回状态码不为200时候的错误处理
47
+    if (error && error.response) {
48
+      switch (error.response.status) {
49
+        case 400:
50
+          error.message = "请求错误";
51
+          break;
52
+
53
+        case 401:
54
+          error.message = "未授权,请登录";
55
+          break;
56
+
57
+        case 403:
58
+          error.message = "拒绝访问";
59
+          break;
60
+
61
+        case 404:
62
+          error.message = `请求地址出错404`;
63
+          break;
64
+
65
+        case 405:
66
+          error.message = "请求不被允许,请检查接口调用方式";
67
+          break;
68
+
69
+        case 408:
70
+          error.message = "请求超时";
71
+          break;
72
+
73
+        case 500:
74
+          error.message = "服务器开个小差,请稍后再试";
75
+          break;
76
+
77
+        case 501:
78
+          error.message = "服务器开个小差,请稍后再试";
79
+          break;
80
+
81
+        case 502:
82
+          error.message = "服务器开个小差,请稍后再试";
83
+          break;
84
+
85
+        case 503:
86
+          error.message = "服务器开个小差,请稍后再试";
87
+          break;
88
+
89
+        case 504:
90
+          error.message = "服务器开个小差,请稍后再试";
91
+          break;
92
+
93
+        case 505:
94
+          error.message = "HTTP版本不受支持";
95
+          break;
96
+
97
+        default:
98
+      }
99
+    }
100
+    return Promise.reject(error)
101
+  }
102
+)
103
+
104
+export default {
105
+  /**
106
+   * @param {String} url 
107
+   * @param {Object} data 
108
+   * @returns Promise
109
+   */
110
+  post(url, data, errToast?: any) {
111
+    let ksort_data: any = ksort(data);
112
+    let str = '';
113
+    for (let i in ksort_data) {
114
+      let str_data = Array.isArray(ksort_data[i]) ? JSON.stringify(ksort_data[i]) : ksort_data[i]
115
+      str = str + i + '=' + str_data;
116
+    }
117
+    let sign = md5(md5(str) + 'ur904wtr5pfctaw9')
118
+    let params = Object.assign({ sign: sign }, ksort_data)
119
+    return new Promise((resolve, reject) => {
120
+      service({
121
+        method: 'post',
122
+        url,
123
+        data: params,
124
+      }).then(res => {
125
+        if (res.data.errno == 0) {
126
+          resolve(res.data)
127
+        } else {
128
+          resolve(res.data)
129
+          if (errToast) {
130
+            Toast(res.data.err)
131
+          }
132
+        }
133
+      }).catch(err => {
134
+        console.log(err.message, 'err');
135
+        Toast(err.message)
136
+        reject(err)
137
+      });
138
+    })
139
+  },
140
+
141
+  get(url, data, errToast?: any) {
142
+    let ksort_data: any = ksort(data);
143
+    let str = '';
144
+    for (let i in ksort_data) {
145
+      let str_data = Array.isArray(ksort_data[i]) ? JSON.stringify(ksort_data[i]) : ksort_data[i]
146
+      str = str + i + '=' + str_data;
147
+    }
148
+    let sign = md5(md5(str) + 'ur904wtr5pfctaw9')
149
+    let params = Object.assign({ sign: sign }, ksort_data)
150
+    return new Promise((resolve, reject) => {
151
+      service.get(url, {
152
+        params: params,
153
+      }).then(res => {
154
+        if (res.data.errno == 0) {
155
+          resolve(res.data)
156
+        } else {
157
+          resolve(res.data)
158
+          if (errToast) {
159
+            Toast(res.data.err)
160
+          }
161
+        }
162
+      }).catch(err => {
163
+        Toast(err.message)
164
+        reject(err)
165
+      })
166
+    })
167
+  }
168
+};
169
+
170
+function ksort(o) {//使用js代码实现类似php的ksort方法 ---- 按键排序
171
+  let sorted = {},
172
+    keys = Object.keys(o);
173
+  keys.sort();
174
+  keys.forEach((key) => {
175
+    sorted[key] = o[key];
176
+  })
177
+  return sorted;
178
+}

+ 23 - 0
qwh5/src/utils/common.ts

@@ -0,0 +1,23 @@
1
+//获取地址栏参数,name:参数名称
2
+export function getQueryString(name?: string) {
3
+  const url = window.location.href
4
+  const theRequest: any = {}
5
+  if (url.indexOf('?') != -1) {
6
+    let str: string = '';
7
+    let strs: any[] = [];
8
+    url.split('?').forEach((item, index) => {
9
+      if (index != 0) {
10
+        str = item
11
+        strs = str.split('&')
12
+        for (let i = 0; i < strs.length; i++) {
13
+          theRequest[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1])
14
+        }
15
+      }
16
+    })
17
+
18
+  }
19
+  if (!name) {
20
+    return theRequest
21
+  }
22
+  return theRequest[name] ? theRequest[name] : ''
23
+}

+ 59 - 0
qwh5/src/utils/getWxConfig.ts

@@ -0,0 +1,59 @@
1
+import axios from './axios';
2
+import { getQueryString } from './common'
3
+function getAuthInfo(cb?: any, redirect_url?: any) {//jsapi通用授权数据
4
+  axios.post('/api/h5/auth/commonAuthData', {
5
+    corpid: getQueryString('corpid'),
6
+    url: location.href.split('#')[0],
7
+  }).then((res: any) => {
8
+    if (redirect_url) {//构造网页授权链接回调
9
+      redirect_url(res.rst)
10
+    }
11
+    if (cb) {
12
+      initQYConfig(res.rst, cb);
13
+    }
14
+  }).catch((err) => {
15
+    console.log(err, 'err')
16
+  })
17
+}
18
+
19
+function initQYConfig(authInfo, cb) { // 企业
20
+  wx.config({
21
+    beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
22
+    debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
23
+    appId: authInfo.corpid, // 必填,企业微信的corpID
24
+    timestamp: authInfo.timestamp, // 必填,生成签名的时间戳
25
+    nonceStr: authInfo.nonce_str, // 必填,生成签名的随机串
26
+    signature: authInfo.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法 企业签名
27
+    jsApiList: ['getCurExternalContact'] // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
28
+  })
29
+  wx.ready(function () {
30
+    initYYConfig(authInfo, cb)
31
+  })
32
+  wx.error(function (res) {
33
+    // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
34
+    console.log(res, 'QYerror')
35
+  })
36
+}
37
+
38
+function initYYConfig(authInfo, cb) { // 应用
39
+  wx.agentConfig({
40
+    debug: false,
41
+    corpid: authInfo.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
42
+    agentid: authInfo.agent_id, // 必填,企业微信的应用id (e.g. 1000247)
43
+    timestamp: authInfo.timestamp, // 必填,生成签名的时间戳
44
+    nonceStr: authInfo.nonce_str, // 必填,生成签名的随机串
45
+    signature: authInfo.app_signature, // 必填,签名,见附录-JS-SDK使用权限签名算法  应用签名
46
+    jsApiList: ['getCurExternalContact'], // 必填,传入需要使用的接口名称
47
+    success: function (res) {
48
+      cb ? cb(authInfo) : ''
49
+    },
50
+    fail: function (res) {
51
+      if (res.errMsg.indexOf('function not exist') > -1) {
52
+        alert('版本过低请升级')
53
+      }
54
+    }
55
+  })
56
+}
57
+
58
+
59
+export default getAuthInfo

File diff suppressed because it is too large
+ 193 - 0
qwh5/src/views/agreement.vue


+ 52 - 0
qwh5/src/views/demo.vue

@@ -0,0 +1,52 @@
1
+<template>
2
+  <div id="test">
3
+    <h3>{{a}}</h3>
4
+    <button @click="handleClick">更改</button>
5
+  </div>
6
+</template>
7
+
8
+<script>
9
+import {
10
+  ref,
11
+  onMounted,
12
+  onBeforeMount,
13
+  onBeforeUpdate,
14
+  onUpdated,
15
+  onBeforeUnmount,
16
+  onUnmounted,
17
+} from "vue";
18
+export default {
19
+  // 初始化数据阶段的生命周期,介于beforeCreate和created之间
20
+  setup() {
21
+    const a = ref(0);
22
+    console.log("👌");
23
+    function handleClick() {
24
+      a.value += 1;
25
+    }
26
+    onBeforeMount(() => {
27
+      console.log("组件挂载之前");
28
+    });
29
+    onMounted(() => {
30
+      console.log("DOM挂载完成");
31
+    });
32
+    onBeforeUpdate(() => {
33
+      console.log("DOM更新之前", document.getElementById("test").innerHTML);
34
+    });
35
+    onUpdated(() => {
36
+      console.log("DOM更新完成", document.getElementById("test").innerHTML);
37
+    });
38
+    onBeforeUnmount(() => {
39
+      console.log("实例卸载之前");
40
+    });
41
+    onUnmounted(() => {
42
+      console.log("实例卸载之后");
43
+    });
44
+    return { a, handleClick };
45
+  }
46
+};
47
+</script>
48
+
49
+作者:前端开发小马哥
50
+链接:https://juejin.cn/post/7057325585705467918
51
+来源:稀土掘金
52
+著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

+ 735 - 0
qwh5/src/views/userPortrait.vue

@@ -0,0 +1,735 @@
1
+<template>
2
+  <div class="container">
3
+    <div class="user_portrait_container" v-if="pageLoading">
4
+      <div class="sidePadding">
5
+        <div class="userImgBox">
6
+          <img :src="userInfo.avatar" class="userImg" alt="">
7
+          <div class="userImgRightBox">
8
+            <div class="userName">{{userInfo.name}}<span v-if="userInfo.type==1">@微信</span></div>
9
+            <div class="addTime">添加时间:{{userInfo.add_time}}</div>
10
+          </div>
11
+        </div>
12
+        <div class="flex">
13
+          <div class="belongBox">
14
+            <label>所属客服:</label>
15
+            <van-popover v-model:show="showPopover">
16
+              <div class="kf_user_box">
17
+                <div class="popoverUserBox" v-if="userInfo.staff_info">
18
+                  <div class="popoverUserItem" v-for="(item) in userInfo.staff_info" :key="item.user_id">
19
+                    <img :src="item.avatar" alt="">
20
+                    <span>{{item.name}}</span>
21
+                  </div>
22
+                </div>
23
+              </div>
24
+              <template #reference>
25
+                <div class="belongConBox">
26
+                  <span><em>{{userInfo.staff_count}}</em>人</span>
27
+                  <van-icon name="arrow-down" />
28
+                </div>
29
+              </template>
30
+            </van-popover>
31
+          </div>
32
+        </div>
33
+      </div>
34
+      <div class="sidePadding marginTop6">
35
+        <div class="titleBox">
36
+          <div class="title">客户标签</div>
37
+          <!-- <div class="openBox" @click="tag_is_open=!tag_is_open">{{tag_is_open?'收起':'展开'}}
38
+              <van-icon :class="[tag_is_open?'reversalAnimation':'']" name="arrow-down" />
39
+          </div> -->
40
+        </div>
41
+        <div class="tag_con" :style="tag_is_open?'height:auto':'height:auto'">
42
+          <span class="tag_item" style="background: transparent;color: #01b38a;" @click="tag_visible = true">+添加</span><span class="tag_item" v-for="(t,tidx) in labelList" :key="tidx">
43
+            {{t.tag_name}}
44
+          </span>
45
+        </div>
46
+      </div>
47
+      <div class="sidePadding marginTop6">
48
+        <div class="titleBox">
49
+          <div class="title">客户信息</div>
50
+          <div class="openBox c-00b38a" @click="attr_visible = true">编辑<van-icon class="f14" name="edit" /></div>
51
+        </div>
52
+        <div class="userInfoBox">
53
+          <div class="info" v-for="(item) in tableData" :key="item.id">{{item.name}}:<span>{{item.val||item.val?item.val:'-'}}</span></div>
54
+        </div>
55
+      </div>
56
+      <div class="sidePadding marginTop6">
57
+        <div class="titleBox tabBox">
58
+          <div class="title">
59
+            <p :class="[user_tab==1?'active':'']" @click="user_tab=1">客户动态</p>
60
+            <p :class="[user_tab==2?'active':'']" @click="user_tab=2">订单</p>
61
+          </div>
62
+        </div>
63
+        <div class="kd_order_con">
64
+          <div class="kh_dt_con" v-if="user_tab==1">
65
+            <div v-for="(l,idx) in h5CustomerDynamicList" :key="idx">
66
+              <div class="dayDate">{{l.date&&l.date.split(' ')[0]}} {{l.week}}</div>
67
+              <div class="subBox" v-for="(s,sIdx) in l.sub" :key="sIdx" :class="sIdx==0 ? 'tMar17' : ''">
68
+                <div class="subBox_line">
69
+                  <img src="@/assets/img/lable_detial.png" alt="" style="display: inline-block;width: 16px">
70
+                  <div class="splitLine"></div>
71
+                </div>
72
+                <div class="lMar8">
73
+                  <div class="dayTime">{{s.time}}</div>
74
+                  <div class="behavior_box">
75
+                    <div class="behavior">
76
+                      <span v-if="s.type == 1">添加好友</span>
77
+                      <span v-else-if="s.type == 2">被员工删除</span>
78
+                      <span v-else-if="s.type == 3">删除跟进客户</span>
79
+                      <span v-else-if="s.type == 4">客户转移</span>
80
+                      <span v-else-if="s.type == 5">客户下单</span>
81
+                      <span v-else-if="s.type == 6">加入黑名单</span>
82
+                      <span v-else-if="s.type == 7">移出黑名单</span>
83
+                      <span v-else-if="s.type == 8">聊天</span>
84
+                      <span v-else>未知</span>
85
+                    </div>
86
+                    <div class="behavior_detial">{{s.content}}</div>
87
+                  </div>
88
+                </div>
89
+              </div>
90
+            </div>
91
+          </div>
92
+          <van-list v-model:loading="order_loading" class="order_con" v-if="user_tab==2" :finished="order_finished" finished-text="没有更多了" @load="get_h5CustomerOrderList" :immediate-check="false">
93
+            <noData v-if="h5CustomerOrderList.length<=0"></noData>
94
+            <table class="tableCon" v-else>
95
+              <thead>
96
+                <tr>
97
+                  <th>订单ID</th>
98
+                  <th style="width: 25%">商品</th>
99
+                  <th style="width: 20%">创建时间</th>
100
+                  <th style="width: 15%">付款状态</th>
101
+                  <th style="width: 15%">订单金额</th>
102
+                </tr>
103
+              </thead>
104
+                <template v-if="tableData&&tableData.length>0">
105
+                  <tbody>
106
+                    <tr v-for="(item) in h5CustomerOrderList" :key="item.order_id">
107
+                      <td>{{item.order_id}} </td>
108
+                      <td>{{item.playlet_name}} </td>
109
+                      <td>{{item.created_ts}}</td>
110
+                      <td>{{item.pay_status == 1 ? '已付款' : '未付款'}}</td>
111
+                      <td><span class="c-00b38a">{{item.pay_money||item.pay_money==0?'¥'+item.pay_money:'-'}}</span></td>
112
+                    </tr>
113
+                  </tbody>
114
+                </template>
115
+            </table>
116
+          </van-list>
117
+        </div>
118
+      </div>
119
+    </div>
120
+    <div v-else>
121
+      <div v-if="!getUserInfoFlag" class="reset_get_info">
122
+        <img src="@/assets/img/info_err.png" alt="">
123
+        <button @click="getCurExternalContact">重新获取</button>
124
+      </div>
125
+      <van-loading v-else type="spinner" color="#00b38a" class="pageStyleLoading"/>
126
+    </div>
127
+    <!-- 标签 -->
128
+    <van-dialog v-model:show="tag_visible" title="选择标签" show-cancel-button :before-close="onBeforeClose" @confirm="confirm_tag" confirmButtonColor="#00b38a">
129
+      <!-- 标签内容 -->
130
+      <tag :labelList="labelList" :configInfo="configInfo" @closeTag="_closeTag"></tag>
131
+    </van-dialog>
132
+    <!-- 编辑-客户信息 -->
133
+    <van-dialog v-model:show="attr_visible" title="" show-cancel-button :before-close="onBeforeClose" @confirm="confirm_edit_attr" confirmButtonColor="#00b38a">
134
+      <div class="attrEditBox">
135
+        <template v-for="(item,index) in attrEditData" :key="index+'field_edit'">
136
+          <van-field v-model="item.val" :label="item.name" :placeholder="`请输入${item.name}`"/>
137
+        </template>
138
+      </div>
139
+    </van-dialog>
140
+  </div>
141
+</template>
142
+<script lang="ts">
143
+import tag from '@/components/tag.vue'
144
+import noData from '@/components/noData.vue'
145
+import { Dialog,Toast } from 'vant';
146
+import getWxConfig from '@/utils/getWxConfig';
147
+import {ref, reactive, onBeforeMount, getCurrentInstance} from "vue";
148
+import { getQueryString } from '@/utils/common'
149
+export default {
150
+  components: {
151
+    noData,
152
+    tag,
153
+    [Dialog.Component.name]: Dialog.Component,
154
+  },
155
+  setup () {
156
+    const { proxy } = getCurrentInstance();
157
+    const tableData = ref([]);//客户信息
158
+    const attrEditData = ref([]);//客户信息
159
+    const labelList = ref([]);//客户标签
160
+    const tag_is_open = ref(true);//展开收起标签
161
+    const user_tab = ref(1);//客户动态,订单切换
162
+    const tag_visible = ref(false);//标签显示隐藏
163
+    const userInfo = ref({})
164
+    const updataTag = ref([])
165
+    const h5CustomerDynamicList = ref([])
166
+    const h5CustomerOrderList = ref([])
167
+    const pageLoading = ref(false)  
168
+    const showPopover = ref(false)
169
+    const getUserInfoFlag = ref(true)//获取企微用户授权,是否被允许
170
+    const order_loading = ref(false)
171
+    const order_finished = ref(false);
172
+    const page = ref(0)
173
+    const page_size = ref(20)
174
+    const total = ref(-1)
175
+    const pages = ref(0)
176
+    const attr_visible = ref(false)
177
+    const configInfo = reactive({
178
+      // corpid:'',
179
+      // external_userid:'',
180
+      // user_id:'',
181
+      corpid:'ww27940915d8fbfbe6',
182
+      external_userid:'wm5xsRBwAAC_qqbdzn-IVkN5ojRwM1qQ',
183
+      user_id:'8a82d12ae22e0cedd81ae297a2e7c1fa'
184
+    })
185
+    onBeforeMount(() => {//组件挂载之前
186
+      pageLoading.value = true;
187
+      get_data_init()
188
+      return;
189
+      if(getQueryString('againJump')){
190
+        configInfo.corpid = getQueryString('corpid')
191
+        getWxConfig(()=>{
192
+          getCurExternalContact()//获取企业外部联系人ID
193
+        });
194
+      }else{//获取用户信息
195
+        getWxConfig('',(authInfo)=>{
196
+          let redirect_uri = encodeURIComponent(window.location.href+'&againJump=true')
197
+          let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${authInfo.corpid}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=1&agentid=${authInfo.agent_id}#wechat_redirect`;
198
+          let link = document.createElement("a");
199
+          link.href = url;
200
+          document.body.appendChild(link);
201
+          link.click();
202
+          document.body.removeChild(link);
203
+        });
204
+      }
205
+    });
206
+    function _closeTag (arr) {//回调
207
+      updataTag.value = arr
208
+    }
209
+    function onBeforeClose(action, done) {
210
+      if (action === "confirm") {
211
+        return false;
212
+      } else {
213
+        tag_visible.value = false;
214
+        attr_visible.value = false;
215
+      }
216
+    }
217
+    function confirm_tag(){//标签更改确认
218
+      h5CustomerTagUpdate()
219
+    }
220
+    function confirm_edit_attr(){//编辑客户信息 确定按钮
221
+       Toast.loading({
222
+        duration:0,
223
+        message: '加载中...',
224
+        forbidClick: true,
225
+      });
226
+      (proxy as any).$axios.post("/api/h5/portrait/edite", {
227
+        corpid:configInfo.corpid,
228
+        external_userid:configInfo.external_userid,
229
+        user_id:configInfo.user_id,
230
+        attrs:attrEditData.value
231
+      },true).then((res) => {
232
+        attr_visible.value = false;
233
+        get_user_info();
234
+        Toast.clear();
235
+      }).catch( err => {
236
+        console.log(err,'err')
237
+        Toast.clear();
238
+      })
239
+    }
240
+    function h5CustomerTagUpdate(){//客户画像-编辑标签
241
+      Toast.loading({
242
+        duration:0,
243
+        message: '加载中...',
244
+        forbidClick: true,
245
+      });
246
+      let selected_tag_id_list:any[] = updataTag.value.map((v)=>{
247
+        return v.tag_md5
248
+      });
249
+      (proxy as any).$axios.post("/api/h5/portrait/h5CustomerTagUpdate", {
250
+        corpid:configInfo.corpid,
251
+        external_userid:configInfo.external_userid,
252
+        user_id:configInfo.user_id,
253
+        selected_tag_id_list:selected_tag_id_list
254
+      },true).then((res) => {
255
+        tag_visible.value = false;
256
+        get_user_info();
257
+        Toast.clear();
258
+      }).catch( err => {
259
+        console.log(err,'err')
260
+        Toast.clear();
261
+      })
262
+    }
263
+    function get_user_info(){//获取客户信息
264
+      return new Promise((resolve,reject)=>{
265
+        (proxy as any).$axios.get("/api/h5/portrait/customerDetail", {
266
+          corpid:configInfo.corpid,
267
+          external_userid:configInfo.external_userid,
268
+          user_id:configInfo.user_id,
269
+        },true).then((res) => {
270
+          //请求成功
271
+          let data = res.rst;
272
+          tableData.value = data.attr;
273
+          attrEditData.value = data.attr;
274
+          labelList.value = data.tagList;
275
+          userInfo.value = data;
276
+          resolve('')
277
+        }).catch( err => {
278
+          resolve('')
279
+          console.log(err,'err')
280
+        })
281
+      })
282
+    }
283
+    function get_h5CustomerDynamicList(){//客户画像-动态
284
+      return new Promise((resolve,reject)=>{
285
+        (proxy as any).$axios.get("/api/h5/portrait/h5CustomerDynamicList",{
286
+          corpid:configInfo.corpid,
287
+          external_userid:configInfo.external_userid,
288
+          user_id:configInfo.user_id,
289
+        },true).then((res) => {
290
+          //请求成功
291
+          let data = res.rst;
292
+          h5CustomerDynamicList.value = data;
293
+          resolve('')
294
+        }).catch( err => {
295
+          console.log(err,'err')
296
+          resolve('')
297
+        })
298
+      })
299
+    }
300
+    function get_h5CustomerOrderList(){//客户画像-订单
301
+      return new Promise((resolve,reject)=>{
302
+        // 数据全部加载完成
303
+        if (total.value != -1 && page.value >= pages.value) {
304
+          order_finished.value = true;
305
+          resolve('')
306
+          return
307
+        }
308
+        page.value = page.value + 1;
309
+        (proxy as any).$axios.get("/api/h5/portrait/h5CustomerOrderList", {
310
+          corpid:configInfo.corpid,
311
+          external_userid:configInfo.external_userid,
312
+          user_id:configInfo.user_id,
313
+          page: page.value,
314
+          page_size: page_size.value,
315
+        },true).then((res) => {
316
+          //请求成功
317
+          let data = res.rst;
318
+          if(page.value == 1){
319
+            h5CustomerOrderList.value = []
320
+          }
321
+          h5CustomerOrderList.value = h5CustomerOrderList.value.concat(data.data);
322
+          total.value = data.pageInfo.total;
323
+          pages.value = data.pageInfo.pages;
324
+          // 加载状态结束
325
+          order_loading.value = false;
326
+          resolve('')
327
+        }).catch( err => {
328
+          console.log(err,'err')
329
+          resolve('')
330
+        })
331
+      })
332
+    }
333
+    function wx_getuserinfo(){//获取访问用户身份//通过code获取用户信息
334
+      return new Promise((resolve,reject)=>{
335
+        (proxy as any).$axios.get("/api/oauth2/userInfo", {
336
+          corpid:configInfo.corpid,
337
+          code:getQueryString('code'),
338
+        },true).then((res) => {
339
+          let data = res.rst;
340
+          configInfo.user_id = data.user_id;
341
+          resolve('')
342
+        }).catch( err => {
343
+          console.log(err,'err')
344
+          reject()
345
+        })
346
+      }) 
347
+
348
+    }
349
+    function getCurExternalContact(){//获取当前外部联系人userid
350
+      let promise1 = wx_getuserinfo()
351
+      let promise2 = new Promise((resolve,reject) => {
352
+        wx.invoke('getCurExternalContact', {}, function(res){
353
+          if(res.err_msg == "getCurExternalContact:ok"){
354
+            configInfo.external_userid = res.userId;
355
+            getUserInfoFlag.value = true
356
+            resolve('')
357
+          }else {
358
+            getUserInfoFlag.value = false
359
+            //错误处理
360
+            reject()
361
+          }
362
+        });
363
+      })
364
+      Promise.all([promise2,promise1]).then((res)=>{
365
+        pageLoading.value = true;
366
+        get_data_init()
367
+      })
368
+    }
369
+    function get_data_init(){
370
+      async function interfaceEvent () { 
371
+        Toast.loading({
372
+          duration:0,
373
+          message: '加载中...',
374
+          forbidClick: true,
375
+        });
376
+        await get_user_info()//客户详情
377
+        await get_h5CustomerDynamicList()//动态
378
+        await get_h5CustomerOrderList()//订单
379
+        Toast.clear();
380
+      }
381
+      interfaceEvent()
382
+    }
383
+    return {
384
+      attrEditData,
385
+      tableData,
386
+      labelList,
387
+      tag_is_open,
388
+      user_tab,
389
+      tag_visible,
390
+      pageLoading,
391
+      userInfo,
392
+      configInfo,
393
+      h5CustomerDynamicList,
394
+      h5CustomerOrderList,
395
+      showPopover,
396
+      getUserInfoFlag,
397
+      order_loading,
398
+      order_finished,
399
+      attr_visible,
400
+      confirm_tag,
401
+      onBeforeClose,
402
+      _closeTag,
403
+      getCurExternalContact,
404
+      get_h5CustomerOrderList,
405
+      confirm_edit_attr
406
+    }
407
+  },
408
+}
409
+</script>
410
+<style lang="scss" scoped>
411
+.reset_get_info{
412
+  height: 300px;
413
+  position: fixed;
414
+  top:0;
415
+  bottom:0;
416
+  margin:auto;
417
+  img{
418
+    width: 60%;
419
+    display: block;
420
+    margin: auto;
421
+  }
422
+  button{
423
+    background: #00b38a;
424
+    border:none;
425
+    font-size:14px;
426
+    color:#fff;
427
+    padding:6px 30px;
428
+    border-radius: 4px;
429
+    display: block;
430
+    margin:auto;
431
+    margin-top:20px;
432
+    font-weight: bold;
433
+    box-shadow: 0px 2px 6px 0px rgba(57, 70, 106, 0.2);
434
+  }
435
+}
436
+.tableCon{
437
+  width: 560px;
438
+  margin-top:10px;
439
+  tr{
440
+    background-color: #fff;
441
+    border-bottom: 1px solid #EBEEF5;
442
+  }
443
+  td,th{
444
+    text-align: center;
445
+    padding: 6px 0;
446
+    font-size: 12px;
447
+    line-height: 20px;
448
+  }
449
+  thead{
450
+    tr{
451
+      border-bottom: 1px solid #EBEEF5;
452
+      font-size: 13px;
453
+      position: sticky;
454
+      top: 0;
455
+      background-color: rgb(249, 249, 249);
456
+      th{
457
+        padding: 6px 0;
458
+      }
459
+    }
460
+  }
461
+}
462
+.container {
463
+  .user_portrait_container {
464
+    width: 100%;
465
+    background: #f5f6f8;
466
+    .sidePadding {
467
+      background: #fff;
468
+      padding: 15px;
469
+    }
470
+    .userImgBox {
471
+      display: flex;
472
+      align-items: center;
473
+      border-bottom: 1px solid #f4f4f4;
474
+      padding-bottom: 15px;
475
+      .userImg {
476
+        width: 50px;
477
+        height: 50px;
478
+        border-radius: 4px;
479
+        margin-right: 6px;
480
+      }
481
+      .userImgRightBox {
482
+        .userName {
483
+          font-size: 15px;
484
+          line-height: 26px;
485
+          span {
486
+            color: #00b38a;
487
+            font-weight: initial;
488
+          }
489
+        }
490
+        .addTime {
491
+          font-size: 12px;
492
+          color: #777;
493
+          line-height: 20px;
494
+        }
495
+      }
496
+    }
497
+    .belongBox {
498
+      display: flex;
499
+      align-items: center;
500
+      line-height: 20px;
501
+      margin-top: 15px;
502
+      label {
503
+        font-size: 12px;
504
+        color: #aaa;
505
+      }
506
+      .belongConBox {
507
+        height: 24px;
508
+        background: #f4f4f4;
509
+        line-height: 24px;
510
+        font-size: 13px;
511
+        color: #444;
512
+        padding: 0 8px;
513
+        width: 100px;
514
+        display: flex;
515
+        align-items: center;
516
+        justify-content: space-between;
517
+        cursor: pointer;
518
+        em {
519
+          color: #00b38a;
520
+        }
521
+      }
522
+    }
523
+    .marginTop6 {
524
+      margin-top: 6px;
525
+    }
526
+    .titleBox {
527
+      display: flex;
528
+      align-items: center;
529
+      justify-content: space-between;
530
+      .title {
531
+        font-size: 15px;
532
+        color: #444;
533
+        font-weight: bold;
534
+        display: flex;
535
+        align-items: center;
536
+      }
537
+      &.tabBox {
538
+        padding-bottom: 10px;
539
+        .title {
540
+          font-weight: initial;
541
+          p {
542
+            margin-right: 30px;
543
+            cursor: pointer;
544
+            &.active {
545
+              font-weight: bold;
546
+              position: relative;
547
+              &::after {
548
+                content: "";
549
+                display: block;
550
+                width: 20px;
551
+                height: 3px;
552
+                border-radius: 2px;
553
+                background: #00b38a;
554
+                position: absolute;
555
+                bottom: -10px;
556
+                left: 0;
557
+                right: 0;
558
+                margin: auto;
559
+              }
560
+            }
561
+          }
562
+        }
563
+      }
564
+      .openBox {
565
+        font-size: 13px;
566
+        line-height: 20px;
567
+        color: #777;
568
+        cursor: pointer;
569
+        i {
570
+          transition: all 0.5s;
571
+        }
572
+      }
573
+    }
574
+    .tag_con {
575
+      margin-top: 10px;
576
+      overflow: hidden;
577
+      .tag_item {
578
+        background-color: #f5fffd;
579
+        color: #787878;
580
+        font-size: 12px;
581
+        border-radius: 2px;
582
+        border: 1px solid #00b38a;
583
+        padding: 4px 7px;
584
+        margin-right: 6px;
585
+        display: inline-block;
586
+        margin-top: 4px;
587
+      }
588
+    }
589
+    .reversalAnimation {
590
+      transform: rotate(180deg);
591
+    }
592
+
593
+    .userInfoBox {
594
+      display: flex;
595
+      flex-wrap: wrap;
596
+      margin-top: 10px;
597
+      .info {
598
+        font-size: 13px;
599
+        color: #888;
600
+        line-height: 20px;
601
+        width: 50%;
602
+        margin-top: 4px;
603
+        span {
604
+          color: #333;
605
+        }
606
+      }
607
+    }
608
+    .kh_dt_con {
609
+      .dayDate {
610
+        font-size: 13px;
611
+        font-weight: 600;
612
+        color: #333;
613
+        margin-top: 15px;
614
+        margin-bottom: 6px;
615
+        line-height: 20px;
616
+      }
617
+      .subBox {
618
+        display: flex;
619
+        align-items: flex-start;
620
+        .dayTime {
621
+          font-size: 13px;
622
+          color: #999;
623
+        }
624
+        .subBox_line {
625
+          display: flex;
626
+          flex-direction: column;
627
+          align-items: center;
628
+          .splitLine {
629
+            width: 1px;
630
+            height: 90px;
631
+            border-left: 1px dashed #979797;
632
+          }
633
+        }
634
+
635
+        .behavior_box {
636
+          margin-top: 10px;
637
+          background: #f5fffd;
638
+          border: 1px solid #00b38a;
639
+          padding: 10px 10px 10px;
640
+          border-radius: 2px;
641
+          .behavior {
642
+            font-size: 14px;
643
+            font-weight: 600;
644
+            color: #333;
645
+            margin-bottom: 10px;
646
+          }
647
+          .behavior_detial {
648
+            font-size: 13px;
649
+          }
650
+        }
651
+      }
652
+    }
653
+    .kd_order_con {
654
+      max-height: 45vh;
655
+      overflow-y: auto;
656
+    }
657
+    .order_con {
658
+      position: relative;
659
+      .thead {
660
+        background: #fbfbfb;
661
+        border: 1px solid #ebeef5;
662
+        font-size: 14px;
663
+        color: #666;
664
+        display: flex;
665
+        align-items: center;
666
+        position: sticky;
667
+        top: 60px;
668
+        .thead_item {
669
+          width: 20%;
670
+          padding: 16px;
671
+          color: #666;
672
+          background-color: #fbfbfb;
673
+          border-right: 1px solid #ebeef5;
674
+        }
675
+      }
676
+      .tbody {
677
+        .tbody_item {
678
+          display: flex;
679
+          align-items: center;
680
+          color: #333;
681
+          font-size: 13px;
682
+          border: 1px solid #ebeef5;
683
+          border-top: none;
684
+          div {
685
+            width: 20%;
686
+            border-right: 1px solid #ebeef5;
687
+            padding: 16px;
688
+          }
689
+          .c-00B38A {
690
+            color: #00b38a;
691
+          }
692
+        }
693
+      }
694
+    }
695
+  }
696
+}
697
+.popoverUserBox {
698
+  max-height: 200px;
699
+  overflow-y: auto;
700
+  .popoverUserItem {
701
+    display: flex;
702
+    align-items: center;
703
+    font-size: 14px;
704
+    line-height: 20px;
705
+    margin-bottom: 10px;
706
+    img {
707
+      width: 30px;
708
+      height: 30px;
709
+      border-radius: 4px;
710
+      margin-right: 6px;
711
+    }
712
+  }
713
+}
714
+.pageStyleLoading{
715
+    width: 100px;
716
+    height: 100px;
717
+    text-align: center;
718
+    position: absolute;
719
+    top: 0;
720
+    bottom: 0;
721
+    left: 0;
722
+    right: 0;
723
+    margin: auto;
724
+}
725
+.kf_user_box{
726
+  padding:15px 15px 0 15px;
727
+  max-height: 300px;
728
+  overflow-y: auto;
729
+}
730
+.attrEditBox{
731
+  max-height: 50vh;
732
+  padding:20px 10px;
733
+  overflow-y: auto;
734
+}
735
+</style>

+ 15 - 0
qwh5/vue.config.js

@@ -1,4 +1,9 @@
1 1
 const { defineConfig } = require('@vue/cli-service')
2
+const path = require('path')
3
+
4
+function resolve (dir) {
5
+  return path.join(__dirname, dir)
6
+}
2 7
 module.exports = defineConfig({
3 8
   transpileDependencies: true,
4 9
   devServer: {
@@ -15,4 +20,14 @@ module.exports = defineConfig({
15 20
   lintOnSave: false,
16 21
   publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
17 22
   outputDir: 'dist',
23
+  productionSourceMap: false,//打包不到.map文件
24
+  configureWebpack: {
25
+    // provide the app's title in webpack's name field, so that
26
+    // it can be accessed in index.html to inject the correct title.
27
+    resolve: {
28
+      alias: {
29
+        '@': resolve('src')
30
+      }
31
+    }
32
+  },
18 33
 })

File diff suppressed because it is too large
+ 0 - 1
static/css/app.c78f736523b86d3407189d500dc847eb.css


BIN
static/fonts/element-icons.535877f.woff


BIN
static/fonts/element-icons.732389d.ttf


BIN
static/img/404.ff9db83.png


BIN
static/img/bg-head.7056a38.png


BIN
static/img/bg-home.7ba89c9.png


BIN
static/img/exterprise-mass-send.ee20127.png


BIN
static/img/friendsCircleSend.289dbc8.png


BIN
static/img/home-ac.fa77639.gif


BIN
static/img/home-item1.3692ebe.png


BIN
static/img/home-item2.1f77d7c.png


BIN
static/img/home-item3.c412bc4.png


BIN
static/img/home-item4.33bee47.png


BIN
static/img/kaigongsi.929270e.png


BIN
static/img/login_box.039035d.png


BIN
static/img/logo-box.9d6ccc3.png


BIN
static/img/phone.1c130fa.png


File diff suppressed because it is too large
+ 0 - 8
static/js/0.21aa934fce8808bcf4c0.js


File diff suppressed because it is too large
+ 0 - 16
static/js/1.e7a49a517b66e754a35a.js


File diff suppressed because it is too large
+ 0 - 1
static/js/10.6815f56894e13b48cd83.js


File diff suppressed because it is too large
+ 0 - 1
static/js/11.7e1ce1f7bf976332c440.js


File diff suppressed because it is too large
+ 0 - 1
static/js/12.0329281da493e9d54ebe.js


File diff suppressed because it is too large
+ 0 - 1
static/js/13.4b2c4f9b6e9ca268e7be.js


File diff suppressed because it is too large
+ 0 - 1
static/js/14.7be4d5a6cfd440d21206.js


File diff suppressed because it is too large
+ 0 - 1
static/js/15.6f38c82bbfa1c5a66205.js


File diff suppressed because it is too large
+ 0 - 1
static/js/16.f918d724d540fb8bbf28.js


File diff suppressed because it is too large
+ 0 - 1
static/js/17.3fbdfa0a82cd05196849.js


File diff suppressed because it is too large
+ 0 - 1
static/js/18.38a43a077636f36bf359.js


File diff suppressed because it is too large
+ 0 - 1
static/js/19.9b1dd29945ad8d7c5bdd.js


File diff suppressed because it is too large
+ 0 - 25
static/js/2.312b7033339f3756c518.js


File diff suppressed because it is too large
+ 0 - 1
static/js/20.9960f748cf535791d274.js


File diff suppressed because it is too large
+ 0 - 42
static/js/21.4a1312b5994c40aa6f96.js


File diff suppressed because it is too large
+ 0 - 1
static/js/22.ee99e1266e3ef75a5e0d.js


File diff suppressed because it is too large
+ 0 - 1
static/js/23.61789f86bf56d27597e1.js


File diff suppressed because it is too large
+ 0 - 1
static/js/24.15e5d4837150e5075be0.js


File diff suppressed because it is too large
+ 0 - 1
static/js/25.cf40b14d7725d3b245d0.js


File diff suppressed because it is too large
+ 0 - 1
static/js/26.17b4bcec2e4d07eeecea.js


File diff suppressed because it is too large
+ 0 - 1
static/js/27.92a7ec021cf0e04ecdae.js


File diff suppressed because it is too large
+ 0 - 1
static/js/28.cbc2d3084d45c7a20fe2.js


File diff suppressed because it is too large
+ 0 - 1
static/js/29.461d5c8aba0dbd93bac9.js


File diff suppressed because it is too large
+ 0 - 1
static/js/3.56ee950bf002a95b9c65.js


File diff suppressed because it is too large
+ 0 - 1
static/js/30.29c3ca21f1571edfca8c.js


+ 0 - 0
static/js/31.fe38f3b05cf46e48b05a.js


Some files were not shown because too many files changed in this diff