xiuli.gao 2 years ago
parent
commit
217952798a

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>

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

@@ -0,0 +1,32 @@
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
+</script>
31
+<style lang="scss" scoped>
32
+</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
+ 488 - 0
project/src/components/customOperate/sideTool/userPortrait.vue


+ 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: '/dev-api',
12
+    mockURL: 'https://api.xwhx.top'
13
+  },
14
+  production: {
15
+    baseURL: 'https://api.xwhx.top',
16
+    mockURL: 'https://api.xwhx.top'
17
+  }
18
+}

qwh5/dist/css/app.59ebc8d6.css → qwh5/dist/css/app.5ebce7c5.css


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 - 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
+ 2 - 3
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
+ 11034 - 186
qwh5/package-lock.json


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


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


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


+ 1 - 0
qwh5/src/main.ts

@@ -4,5 +4,6 @@ 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 './styles/index.scss'
7 8
 
8 9
 createApp(App).use(ElementPlus).use(store).use(router).mount('#app')

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

@@ -14,6 +14,11 @@ const routes: Array<RouteRecordRaw> = [
14 14
     // this generates a separate chunk (about.[hash].js) for this route
15 15
     // which is lazy-loaded when the route is visited.
16 16
     component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
17
+  },
18
+  {
19
+    path: '/userPortrait',
20
+    name: 'userPortrait',
21
+    component: () => import(/*webpackChunkName:"userPortrait" */ '@/views/userPortrait.vue')
17 22
   }
18 23
 ]
19 24
 

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

@@ -0,0 +1,6 @@
1
+@import './reset.scss';
2
+@import './normalize.scss';
3
+
4
+html {
5
+  touch-action: manipulation;
6
+}

+ 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
+}

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

@@ -0,0 +1,124 @@
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
+}
89
+/* HTML5 display-role reset for older browsers */
90
+article,
91
+aside,
92
+details,
93
+figcaption,
94
+figure,
95
+footer,
96
+header,
97
+hgroup,
98
+menu,
99
+nav,
100
+section {
101
+  display: block;
102
+}
103
+body {
104
+  line-height: 1.15;
105
+}
106
+ol,
107
+ul {
108
+  list-style: none;
109
+}
110
+blockquote,
111
+q {
112
+  quotes: none;
113
+}
114
+blockquote:before,
115
+blockquote:after,
116
+q:before,
117
+q:after {
118
+  content: "";
119
+  content: none;
120
+}
121
+table {
122
+  border-collapse: collapse;
123
+  border-spacing: 0;
124
+}

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

@@ -0,0 +1,49 @@
1
+import axios, { AxiosInstance } from 'axios'
2
+// eslint-disable-next-line
3
+// import { getToken, getCsrfToken } from '@/utils/auth'
4
+// import store from '@/store'
5
+
6
+// eslint-disable-next-line
7
+const config = require('../../config')
8
+console.log('process.env.NODE_ENV', process.env.NODE_ENV);
9
+
10
+const { baseURL } = config[process.env.NODE_ENV]
11
+
12
+// 创建axios实例
13
+const service: AxiosInstance = axios.create({
14
+  baseURL,
15
+  timeout: 5000
16
+  // withCredentials: true
17
+})
18
+
19
+// 请求拦截器
20
+service.interceptors.request.use(
21
+  config => {
22
+    // if (store.state.user.token) {
23
+    //   config.headers.Authorization = `Bearer ${getToken()}`
24
+    // }
25
+    // config.headers['x-csrf-token'] = getCsrfToken()
26
+    return config
27
+  },
28
+  error => {
29
+    console.log(error)
30
+    return Promise.reject(error)
31
+  }
32
+)
33
+
34
+// 响应拦截器
35
+service.interceptors.response.use(
36
+  response => {
37
+    const res = response.data
38
+    if (res.code !== 200) {
39
+      return Promise.reject(res)
40
+    } else {
41
+      return response
42
+    }
43
+  },
44
+  error => {
45
+    return Promise.reject(error)
46
+  }
47
+)
48
+
49
+export default service

+ 42 - 0
qwh5/src/utils/request.ts

@@ -0,0 +1,42 @@
1
+import { AxiosRequestConfig } from 'axios'
2
+// import { Toast, Dialog } from 'vant'
3
+// import store from '@/store'
4
+import service from './axios'
5
+
6
+interface BaseResponse<T> {
7
+  code: number
8
+  status: boolean
9
+  data: T
10
+  message?: string
11
+}
12
+
13
+const request = <T>(config: AxiosRequestConfig): Promise<BaseResponse<T>> => {
14
+  return new Promise((resolve, reject) => {
15
+    service.request<BaseResponse<T>>(config).then(
16
+      res => {
17
+        resolve(res.data)
18
+      },
19
+      err => {
20
+        switch (err?.code) {
21
+          case 401:
22
+            // token失效
23
+            // Dialog.alert({
24
+            //   title: '提示',
25
+            //   message: '您还未登录或登录已过期,请重新登录'
26
+            // }).then(() => {
27
+            //   store.dispatch('user/signOut').then(() => {
28
+            //     location.reload()
29
+            //   })
30
+            // })
31
+            break
32
+          default:
33
+            // Toast(err.message)
34
+            break
35
+        }
36
+        reject(err)
37
+      }
38
+    )
39
+  })
40
+}
41
+
42
+export default request

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


+ 1 - 0
qwh5/vue.config.js

@@ -15,4 +15,5 @@ module.exports = defineConfig({
15 15
   lintOnSave: false,
16 16
   publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
17 17
   outputDir: 'dist',
18
+  productionSourceMap: false,//打包不到.map文件
18 19
 })