|
@@ -119,6 +119,19 @@ export default class HomeView extends Vue {
|
119
|
119
|
}
|
120
|
120
|
}
|
121
|
121
|
|
|
122
|
+ copyDomText (id) { //复制到粘贴板
|
|
123
|
+ const node = document.getElementById(id)
|
|
124
|
+ if (node) {
|
|
125
|
+ let createRange = document.createRange()
|
|
126
|
+ createRange.selectNodeContents(document.getElementById(id))
|
|
127
|
+ const selection = document.getSelection()
|
|
128
|
+ selection.removeAllRanges()
|
|
129
|
+ selection.addRange(createRange)
|
|
130
|
+ document.execCommand('Copy')
|
|
131
|
+ selection.removeAllRanges()
|
|
132
|
+ }
|
|
133
|
+ }
|
|
134
|
+
|
122
|
135
|
loadMore () {
|
123
|
136
|
if (this.noMore) {
|
124
|
137
|
return
|
|
@@ -170,16 +183,17 @@ export default class HomeView extends Vue {
|
170
|
183
|
}
|
171
|
184
|
|
172
|
185
|
async goAddCustomer (item) { // 复制
|
173
|
|
- if(item.add_status == 3){
|
174
|
|
- ElMessage({
|
175
|
|
- showClose:true,
|
176
|
|
- message: '本客户已添加!',
|
177
|
|
- type: 'info',
|
178
|
|
- duration:3000
|
179
|
|
- })
|
180
|
|
- return
|
181
|
|
- }
|
|
186
|
+ // if(item.add_status == 3){
|
|
187
|
+ // ElMessage({
|
|
188
|
+ // showClose:true,
|
|
189
|
+ // message: '本客户已添加!',
|
|
190
|
+ // type: 'info',
|
|
191
|
+ // duration:3000
|
|
192
|
+ // })
|
|
193
|
+ // return
|
|
194
|
+ // }
|
182
|
195
|
this.loading = true
|
|
196
|
+ this.copyDomText(item.phone)
|
183
|
197
|
await this.getAuthInfo(item)
|
184
|
198
|
}
|
185
|
199
|
|
|
@@ -249,7 +263,7 @@ export default class HomeView extends Vue {
|
249
|
263
|
const _this = this
|
250
|
264
|
wx.config({
|
251
|
265
|
beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
|
252
|
|
- debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
266
|
+ debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
253
|
267
|
appId: this.authInfo.corpid, // 必填,企业微信的corpID
|
254
|
268
|
timestamp: this.authInfo.timestamp, // 必填,生成签名的时间戳
|
255
|
269
|
nonceStr: this.authInfo.nonce_str, // 必填,生成签名的随机串
|
|
@@ -277,7 +291,7 @@ export default class HomeView extends Vue {
|
277
|
291
|
success: function (res) {
|
278
|
292
|
// 回调
|
279
|
293
|
wx.invoke('navigateToAddCustomer', {}, function (res) {
|
280
|
|
- console.log(res, 'wx.invoke,navigateToAddCustomer')
|
|
294
|
+ // console.log(res, 'wx.invoke,navigateToAddCustomer')
|
281
|
295
|
})
|
282
|
296
|
_this.loading = false
|
283
|
297
|
},
|