通讯录添加同步人员信息按钮
This commit is contained in:
@@ -33,6 +33,18 @@ export function getByPhone(data){
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 保存所有用户,即同步钉钉用户信息
|
||||
export function syncDeptUsers(){
|
||||
return request({
|
||||
url: '/user/saveUser',
|
||||
method: 'get',
|
||||
headers:{
|
||||
'Authorization': localStorage.getItem('userToken')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 手机号拜访人姓名
|
||||
export function getUserNameByTel(phone){
|
||||
return request({
|
||||
|
||||
+10
-3
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</header>
|
||||
<div class="content">
|
||||
<h2>通讯录</h2>
|
||||
<h2>通讯录</h2><button @click="handleSync" class="entering-button">同步人员信息</button>
|
||||
<div class="content-box" >
|
||||
<div class="nav">
|
||||
<div @click="onClickDept(item.deptId)" v-for="item in deptArr" class="li" :class="item.deptId == deptId ? 'active' : ''" :style=" item.name.length >= 6 ? 'padding-right: 0.28rem;' : '' " :key="item.userId">
|
||||
@@ -42,7 +42,8 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { rulesPhone, compareTime, timeDiff,formatDate } from '../com/index.js'
|
||||
// import { getShop, getKind } from '../api/user.js'
|
||||
// getShop, getKind
|
||||
import { syncDeptUsers } from '../api/user.js'
|
||||
import { reactive, ref } from 'vue'
|
||||
import { Toast, ImagePreview, Skeleton } from 'vant';
|
||||
import dd from 'dingtalk-jsapi'
|
||||
@@ -187,7 +188,13 @@
|
||||
const onClickGoSpecialCrowd = () =>{
|
||||
router.push('/specialCrowd')
|
||||
}
|
||||
|
||||
|
||||
// 同步钉钉用户信息
|
||||
const handleSync = () =>{
|
||||
syncDeptUsers().then(res =>{
|
||||
Toast.success(res.msg)
|
||||
})
|
||||
}
|
||||
|
||||
if(token.value){
|
||||
// localStorage.setItem('token', 123)
|
||||
|
||||
Reference in New Issue
Block a user