liuxiaona 2 years ago
parent
commit
9ebc8ec015

+ 1 - 10
.idea/workspace.xml

@@ -3,16 +3,7 @@
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="f876064f-ad38-46e7-bf7d-9df623a9178f" name="Changes" comment="">
5 5
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
-      <change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
7
-      <change beforePath="$PROJECT_DIR$/project/src/components/marketingGuest/batchAddFriend/addFriend/importCustomer.vue" beforeDir="false" afterPath="$PROJECT_DIR$/project/src/components/marketingGuest/batchAddFriend/addFriend/importCustomer.vue" afterDir="false" />
8
-      <change beforePath="$PROJECT_DIR$/qwh5/dist/css/app.ec8ddb10.css" beforeDir="false" />
9
-      <change beforePath="$PROJECT_DIR$/qwh5/dist/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/qwh5/dist/index.html" afterDir="false" />
10
-      <change beforePath="$PROJECT_DIR$/qwh5/dist/js/app.a96480e4.js" beforeDir="false" />
11
-      <change beforePath="$PROJECT_DIR$/qwh5/dist/js/app.a96480e4.js.map" beforeDir="false" />
12 6
       <change beforePath="$PROJECT_DIR$/qwh5/src/views/HomeView.vue" beforeDir="false" afterPath="$PROJECT_DIR$/qwh5/src/views/HomeView.vue" afterDir="false" />
13
-      <change beforePath="$PROJECT_DIR$/static/css/app.5186fd78a1f3ec7d3f421b0c2fb5e1f4.css" beforeDir="false" />
14
-      <change beforePath="$PROJECT_DIR$/static/js/7.7ddb71882cfa4c322f0b.js" beforeDir="false" />
15
-      <change beforePath="$PROJECT_DIR$/static/js/manifest.3a196b4230b9149f39dc.js" beforeDir="false" />
16 7
     </list>
17 8
     <option name="SHOW_DIALOG" value="false" />
18 9
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -63,7 +54,7 @@
63 54
       <workItem from="1654573024055" duration="23176000" />
64 55
       <workItem from="1654653264438" duration="30604000" />
65 56
       <workItem from="1654739102819" duration="11048000" />
66
-      <workItem from="1654756255993" duration="3821000" />
57
+      <workItem from="1654756255993" duration="5614000" />
67 58
     </task>
68 59
     <servers />
69 60
   </component>

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


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


BIN
qwh5/dist/favicon.ico


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


+ 0 - 2
qwh5/dist/js/about.0c77b459.js

@@ -1,2 +0,0 @@
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.0c77b459.js.map

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


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


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


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


+ 38 - 15
qwh5/src/views/HomeView.vue

@@ -1,9 +1,9 @@
1 1
 <template>
2 2
   <div class="home" v-loading="loading">
3
-    <div class="tipsBox">管理员给你分配了{{ tableData&&tableData.length }}个客户还未添加,快去复制电话号码添加客户吧,管理员在微伴后台可查看添加状态哦~</div>
3
+    <div class="tipsBox">管理员给你分配了{{ customer_total ? customer_total : '-' }}个客户还未添加,快去复制电话号码添加客户吧,管理员在微伴后台可查看添加状态哦~</div>
4 4
     <div class="operateArea">
5 5
       <div>
6
-        <el-select v-model="addStatus_val" placeholder="请选择添加状态" @change="statusChange">
6
+        <el-select v-model="addStatus_val" :popper-append-to-body="false" placeholder="请选择添加状态" @change="statusChange">
7 7
           <el-option
8 8
               v-for="item in addStatusArrs"
9 9
               :key="item.value"
@@ -41,7 +41,7 @@
41 41
                 <span v-else-if="!item.add_status">-</span>
42 42
                 <span v-else>-</span>
43 43
               </div>
44
-              <div><span class="copy" @click="goAddCustomer(item)">复制</span></div>
44
+              <div><span class="copy" :class="item.add_status == 2?'c-b8733d':(item.add_status == 3?'c-999':'')" @click="goAddCustomer(item)">复制</span></div>
45 45
             </div>
46 46
           </div>
47 47
           <p class="infinite-tips" v-if="load_loading">加载中...</p>
@@ -64,6 +64,7 @@ export default class HomeView extends Vue {
64 64
   load_loading = false
65 65
   noMore = false
66 66
   loading=false
67
+  customer_total=0
67 68
   disabled = this.load_loading || this.noMore
68 69
   page=1
69 70
   page_size=20
@@ -90,10 +91,10 @@ export default class HomeView extends Vue {
90 91
       value: '2',
91 92
       label: '待通过'
92 93
     },
93
-    // {
94
-    //   value: '3',
95
-    //   label: '已添加'
96
-    // },
94
+    {
95
+      value: '3',
96
+      label: '已添加'
97
+    },
97 98
     // {
98 99
     //   value: '4',
99 100
     //   label: '待分配'
@@ -159,13 +160,24 @@ export default class HomeView extends Vue {
159 160
     }).then((res) => {
160 161
       const resNew = res.data
161 162
       this.authInfo = resNew.rst
162
-      this.get_dataReporting(item)
163
+      if(item.add_status == 1){
164
+        this.get_dataReporting(item)
165
+      }
163 166
     }).catch((err) => {
164 167
       console.log(err)
165 168
     })
166 169
   }
167 170
 
168 171
   async goAddCustomer (item) { // 复制
172
+    if(item.add_status == 3){
173
+      ElMessage({
174
+        showClose:true,
175
+        message: '本客户已添加!',
176
+        type: 'info',
177
+        duration:3000
178
+      })
179
+      return
180
+    }
169 181
     this.loading = true
170 182
     await this.getAuthInfo(item)
171 183
   }
@@ -190,10 +202,11 @@ export default class HomeView extends Vue {
190 202
       this.loading = false
191 203
       const resNew = res.data
192 204
       if(resNew&&resNew.errno==0){
193
-        if (resNew.rst.data.length < 20) {
205
+        if (resNew.rst.data.list.length < 20) {
194 206
           this.noMore = true
195 207
         }
196
-        this.tableData = [...this.tableData, ...resNew.rst.data]
208
+        this.customer_total = resNew.rst.data.customer_total
209
+        this.tableData = [...this.tableData, ...resNew.rst.data.list]
197 210
         this.load_loading = false
198 211
       }else{
199 212
         ElMessage({
@@ -233,7 +246,7 @@ export default class HomeView extends Vue {
233 246
 
234 247
   initQYConfig () { // 企业
235 248
     const _this = this
236
-    _this.wx.config({
249
+    wx.config({
237 250
       beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
238 251
       debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
239 252
       appId: this.authInfo.corpid, // 必填,企业微信的corpID
@@ -242,10 +255,10 @@ export default class HomeView extends Vue {
242 255
       signature: this.authInfo.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法 企业签名
243 256
       jsApiList: ['navigateToAddCustomer'] // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
244 257
     })
245
-    _this.wx.ready(function () {
258
+    wx.ready(function () {
246 259
       _this.initYYConfig()
247 260
     })
248
-    _this.wx.error(function (res) {
261
+    wx.error(function (res) {
249 262
       // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
250 263
       console.log(res, 'QYerror')
251 264
     })
@@ -253,7 +266,7 @@ export default class HomeView extends Vue {
253 266
 
254 267
   initYYConfig () { // 应用
255 268
     const _this = this
256
-    _this.wx.agentConfig({
269
+    wx.agentConfig({
257 270
       corpid: this.authInfo.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
258 271
       agentid: this.authInfo.agent_id, // 必填,企业微信的应用id (e.g. 1000247)
259 272
       timestamp: this.authInfo.timestamp, // 必填,生成签名的时间戳
@@ -262,7 +275,7 @@ export default class HomeView extends Vue {
262 275
       jsApiList: ['navigateToAddCustomer'], // 必填,传入需要使用的接口名称
263 276
       success: function (res) {
264 277
         // 回调
265
-        _this.wx.invoke('navigateToAddCustomer', {}, function (res) {
278
+        wx.invoke('navigateToAddCustomer', {}, function (res) {
266 279
           console.log(res, 'wx.invoke,navigateToAddCustomer')
267 280
         })
268 281
         _this.loading = false
@@ -284,6 +297,7 @@ export default class HomeView extends Vue {
284 297
 .home {
285 298
   padding: 8px;
286 299
 
300
+
287 301
   .tipsBox {
288 302
     padding: 10px;
289 303
     font-size: 14px;
@@ -358,6 +372,15 @@ export default class HomeView extends Vue {
358 372
             border: 1px solid #4d8feb;
359 373
             border-radius: 4px;
360 374
             cursor: pointer;
375
+            font-size: 13px;
376
+          }
377
+          .c-b8733d{
378
+            border: 1px solid #b8733d;
379
+            color: #b8733d;
380
+          }
381
+          .c-999{
382
+            border: 1px solid #999;
383
+            color: #999;
361 384
           }
362 385
         }
363 386
       }