吉安感知网项目-前端
罗广辉
2026-01-08 17660d293649dd9d987f21737367748466043e11
Merge remote-tracking branch 'origin/master'
6 files modified
2 files added
307 ■■■■ changed files
uniapps/work-app/src/api/user/index.js 4 ●●●● patch | view | raw | blame | history
uniapps/work-app/src/pages/login/index.vue 2 ●●● patch | view | raw | blame | history
uniapps/work-app/src/pages/user/index.vue 6 ●●●● patch | view | raw | blame | history
uniapps/work-app/src/pages/voiceCall/index.vue 198 ●●●●● patch | view | raw | blame | history
uniapps/work-app/src/static/images/user/department.svg 10 ●●●●● patch | view | raw | blame | history
uniapps/work-app/src/static/images/voiceVal/phoneVal.svg 12 ●●●●● patch | view | raw | blame | history
uniapps/work-app/src/subPackages/userDetail/infos/index.vue 62 ●●●● patch | view | raw | blame | history
uniapps/work-app/src/utils/request/interceptors.js 13 ●●●● patch | view | raw | blame | history
uniapps/work-app/src/api/user/index.js
@@ -49,13 +49,13 @@
}
export const getUserInfo = () => {
  return request({
    url: '/blade-system/user/info',
    url: '/system/user/getInfo',
    method: 'get',
  });
};
export const updateInfo = row => {
  return request({
    url: '/blade-system/user/update-info',
    url: '/system/user/profile/update',
    method: 'post',
    data: row,
  });
uniapps/work-app/src/pages/login/index.vue
@@ -127,7 +127,7 @@
      userInfo.key,
      userInfo.code
    );
    userStore.setUserInfo(res.data);
    userStore.setUserInfo(res.data.data);
    uni.reLaunch({
      url: "/pages/work/index",
    });
uniapps/work-app/src/pages/user/index.vue
@@ -7,13 +7,13 @@
          <u-avatar :src="user.avatar" size="70" />
        </view>
        <view class="flex-1">
          <view class="userName">{{ userStore?.userInfo?.nick_name }}</view>
          <view class="userName">{{user.nickName }}</view>
          <view class="departs">
            <image
              src="https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_app_assets/images/user/mobile.svg"
              src="@/static/images/user/department.svg"
              alt=""
            />
            <span>{{ user.deptName }}</span>
            <span>{{ user?.sysDept?.deptName }}</span>
          </view>
        </view>
        <view class="rightLogo">
uniapps/work-app/src/pages/voiceCall/index.vue
@@ -1,14 +1,198 @@
<template>
    <view class="eventTickets">
        语音通话
    </view>
  <div class="voiceCallContainer">
    <!-- 顶部搜索栏 -->
    <div class="searchBar">
      <up-search placeholder="请输入关键字搜索"  :animation="true"   :show-action="false"></up-search>
    </div>
    <!-- 联系人列表 -->
   <div class="contactList">
     <div
       class="contactItem"
       v-for="(contact, index) in filteredContacts"
       :key="index"
     >
  <div class="itemBox">
    <!-- 头像 -->
    <div class="contactAvatar">
      <image :src="contact.avatar" mode="aspectFill" />
    </div>
    <!-- 联系人信息 -->
    <div class="contactInfo">
      <div class="contactName">{{ contact.name }}</div>
      <div class="contactDept">{{ contact.dept }}</div>
    </div>
    <!-- 电话按钮 -->
    <div class="callButton" @click="makeCall(contact)">
      <image src="@/static/images/voiceVal/phoneVal.svg" mode="aspectFit" />
    </div>
  </div>
     </div>
   </div>
  </div>
</template>
<script setup></script>
<script setup>
import { ref, computed } from 'vue'
// 搜索关键字
const searchKeyword = ref('')
// 联系人数据
const contacts = ref([
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
  { name: '张晓晓', dept: '吉州区应急部门', avatar: '/static/images/tabbar/icon_me.png' },
])
// 过滤后的联系人列表
const filteredContacts = computed(() => {
  if (!searchKeyword.value) {
    return contacts.value
  }
  return contacts.value.filter(contact => {
    return contact.name.includes(searchKeyword.value) ||
      contact.dept.includes(searchKeyword.value)
  })
})
// 拨打电话方法
const makeCall = (contact) => {
  console.log('拨打电话给', contact.name)
  // 这里可以添加实际的拨打电话逻辑
  uni.showToast({
    title: `正在拨打${contact.name}的电话`,
    icon: 'none'
  })
}
</script>
<style scoped lang="scss">
.eventTickets {
    width: 100%;
    height: 100%;
.voiceCallContainer {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.searchBar {
  padding: 20rpx;
  display: flex;
  align-items: center;
  height: 108rpx;
}
.searchIcon {
  position: absolute;
  left: 40rpx;
  z-index: 1;
  width: 40rpx;
  height: 40rpx;
  display: flex;
  justify-content: center;
  align-items: center;
}
.searchIcon image {
  width: 30rpx;
  height: 30rpx;
  opacity: 0.5;
}
.contactList {
  margin: 0 24rpx;
  background: #fff;
  border-radius: 12rpx ;
  overflow-y: auto;
  height: 0;
  flex-grow: 1;
  align-content: flex-start;
}
.contactItem {
  display: flex;
  align-items: center;
  padding:0 24rpx;
}
.itemBox {
  display: flex;
 align-items: center;
  justify-content: space-between;
  width:100%;
  height: 98rpx;
  border-bottom: 1rpx solid #EBEBEB;
}
.contactAvatar {
  width: 80rpx;
  height: 80rpx;
  margin-right: 26rpx;
  display: flex;
  justify-content: center;
  align-items: center;
}
.contactAvatar image {
  width: 60rpx;
  height: 60rpx;
}
.contactInfo {
  flex: 1;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.contactName {
  font-family: Source Han Sans CN, Source Han Sans CN;
  font-weight: 500;
  font-size: 30rpx;
  color: #222324;
  margin-bottom: 8rpx;
}
.contactDept {
  font-family: Source Han Sans CN, Source Han Sans CN;
  font-weight: 400;
  font-size: 30rpx;
  color: #222324;
}
.callButton {
  width: 80rpx;
  height: 80rpx;
  display: flex;
  justify-content: center;
  align-items: center;
}
.callButton image {
  width: 60rpx;
  height: 60rpx;
}
</style>
uniapps/work-app/src/static/images/user/department.svg
New file
@@ -0,0 +1,10 @@
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Frame" clip-path="url(#clip0_121_1431)">
<path id="Vector" d="M1.24417 9.08086H2.29417V7.07383C2.29417 6.88789 2.44456 6.7375 2.63049 6.7375V6.72657H6.6637V4.86582H5.39358C5.17893 4.86582 5.00393 4.69082 5.00393 4.47617V1.70625C5.00393 1.4916 5.17893 1.3166 5.39358 1.3166H8.62561C8.84026 1.3166 9.01526 1.4916 9.01526 1.70625V4.47754C9.01526 4.69219 8.84026 4.86719 8.62561 4.86719H7.35549V6.7293H11.3887V6.74024C11.5746 6.74024 11.725 6.89063 11.725 7.07657V9.08223H12.775C12.9897 9.08223 13.1647 9.25723 13.1647 9.47188V12.2432C13.1647 12.4578 12.9897 12.6328 12.775 12.6328H10.0037C9.78909 12.6328 9.61409 12.4578 9.61409 12.2432V9.47051C9.61409 9.25586 9.78909 9.08086 10.0037 9.08086H11.0537V7.4211H7.34456V9.08086H8.39456C8.6092 9.08086 8.7842 9.25586 8.7842 9.47051V12.2418C8.7842 12.4564 8.6092 12.6314 8.39456 12.6314H5.62327C5.40862 12.6314 5.23362 12.4564 5.23362 12.2418V9.47051C5.23362 9.25586 5.40862 9.08086 5.62327 9.08086H6.67327V7.4211H2.96409V9.08086H4.01409C4.22873 9.08086 4.40374 9.25586 4.40374 9.47051V12.2418C4.40374 12.4564 4.22873 12.6314 4.01409 12.6314H1.24417C1.02952 12.6314 0.854517 12.4564 0.854517 12.2418V9.47051C0.854517 9.2545 1.02815 9.08086 1.24417 9.08086ZM8.23596 2.0959H5.78186V4.08789H8.23596V2.0959ZM10.3934 11.8508H12.3854V9.86016H10.3934V11.8508ZM6.01292 11.8508H8.00491V9.86016H6.01292V11.8508ZM1.63381 11.8508H3.62444V9.86016H1.63245V11.8508H1.63381Z" fill="#353637"/>
</g>
<defs>
<clipPath id="clip0_121_1431">
<rect width="14" height="14" fill="white" transform="matrix(-1 0 0 1 14 0)"/>
</clipPath>
</defs>
</svg>
uniapps/work-app/src/static/images/voiceVal/phoneVal.svg
New file
@@ -0,0 +1,12 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1321318721">
<g id="Group 1321318693">
<g id="Group 1321318692">
<circle id="Ellipse" cx="15" cy="15" r="15" fill="#1D6FE9"/>
</g>
</g>
<g id="Frame">
<path id="Vector" d="M20.0291 16.6168C18.9934 16.6168 18.1094 17.2659 17.7614 18.1794C17.7604 18.1789 17.7623 18.1798 17.7614 18.1794C17.758 18.1892 17.7523 18.198 17.7452 18.2065C17.7218 18.2344 17.6825 18.2444 17.6496 18.2343C17.6496 18.2346 17.6497 18.234 17.6496 18.2343C15.3886 17.4001 13.5955 15.6012 12.7693 13.3363C12.767 13.3285 12.7654 13.3205 12.7654 13.3121C12.7654 13.2756 12.7873 13.2439 12.819 13.2305C12.8189 13.2304 12.8191 13.2307 12.819 13.2305C13.7405 12.8866 14.3969 11.9987 14.3969 10.9572C14.3969 9.61739 13.3107 8.53125 11.9709 8.53125C10.6311 8.53125 9.54492 9.61739 9.54492 10.9572C9.54492 10.9657 9.54516 10.974 9.54523 10.9825C9.78252 16.6675 14.3462 21.2315 20.0312 21.4688C21.3701 21.4676 22.455 20.3819 22.455 19.0428C22.455 17.703 21.3689 16.6168 20.0291 16.6168Z" fill="white"/>
</g>
</g>
</svg>
uniapps/work-app/src/subPackages/userDetail/infos/index.vue
@@ -1,28 +1,31 @@
<template>
    <view class="container">
        <div class="avatarBox">
            <u-avatar @click="uploadAvatar" :src="userInfo.avatar" size="114" mode="aspectFill" />
            <!-- @click="uploadAvatar" -->
            <u-avatar  :src="userInfo.avatar" size="114" mode="aspectFill" />
        </div>
        <view class="detailBox">
            <div class="detailCon">
                <div class="orderRow">
                    <div class="rowTitle">姓名</div>
                    <div>{{userInfo.realName}}</div>
                </div>
            <div class="rowTitle">姓名</div>
            <u-input input-align="right" v-model="userInfo.nickName" placeholder="请输入姓名" class="input-item" />
        </div>
                <div class="orderRow">
                    <div class="rowTitle">所属单位</div>
                    <div>{{userInfo.deptName}}</div>
                </div>
                <div class="orderRow">
                    <div class="rowTitle">手机号</div>
                    <u-input input-align="right" v-model="userInfo.phone" type="number" placeholder="请输入手机号"
                        class="input-item" />
                    <div>{{userInfo.phone}}</div>
                    <!-- <u-input input-align="right" v-model="userInfo.phone" type="number" placeholder="请输入手机号"
                        class="input-item" /> -->
                </div>
                <div class="orderRow">
                    <div class="rowTitle">邮箱</div>
                    <u-input input-align="right" v-model="userInfo.email" type="email" placeholder="请输入邮箱"
                        class="input-item" />
                    <div>{{userInfo.email}}</div>
                    <!-- <u-input input-align="right" v-model="userInfo.email" type="email" placeholder="请输入邮箱"
                        class="input-item" /> -->
                </div>
            </div>
        </view>
@@ -38,19 +41,12 @@
        getEnvObj,
        getWebViewUrl
    } from "@/utils/index.js";
    import {
        getUserInfo,
        updateInfo,
        updatePassword
    } from '@/api/user/index.js';
    import {
        useUserStore
    } from "@/store/index.js";
    const userInfo = ref({
        id: '',
import { getUserInfo, updateInfo, updatePassword } from '@/api/user/index.js';
import { useUserStore } from "@/store/index.js";
const userInfo = ref({
        userId: '',
        avatar: '',
        realName: '',
        name: '',
        nickName: '',
        phone: '',
        email: '',
        deptName: '',
@@ -90,13 +86,12 @@
        getUserInfo().then(res => {
            const user = res.data.data;
            userInfo.value = {
                id: user.id,
                userId: user.userId,
                avatar: user.avatar,
                name: user.name,
                realName: user.realName,
                phone: user.phone,
                email: user.email,
                deptName: user.deptName,
                nickName: user.nickName,
                phone: user.sysDept.phone,
                email: user.sysDept.email,
                deptName: user.sysDept.deptName,
            };
        });
@@ -161,7 +156,7 @@
                    const pathWithoutProtocol = filePath.replace(/^file:\/\//, '');
                    fileName = pathWithoutProtocol.split('/').pop() || 'unknown.png';
                }
                // 显示加载中
                uni.showLoading({
                    title: '上传中...'
@@ -169,9 +164,9 @@
                // 上传文件
                uploadUtil({
                    filePath: filePath,
                    filePath: filePath,
                    formData: {
                        fileName: fileName,
                        fileName: fileName,
                        sn: 'avatar_upload'
                    },
                    url: '/blade-resource/oss/endpoint/put-file'
@@ -201,7 +196,6 @@
    }
    const submit = () => {
        if (!validatePhone() || !validateEmail()) return
        userInfo.value.name = userInfo.value.realName;
        updateInfo(userInfo.value).then(res => {
            if (res.data.code === 200) {
                uni.showToast({
@@ -221,7 +215,7 @@
            }
        });
    };
    onShow(async () => {
        getUserInfoData()
@@ -269,13 +263,13 @@
                white-space: nowrap;
            }
            ::v-deep .u-input {
            :deep(.u-input) {
                border: none !important;
                background: transparent !important;
                padding: 0 !important;
            }
            ::v-deep .u-input__input {
            :deep(.u-input__input) {
                border: none !important;
                box-shadow: none !important;
                background: transparent !important;
@@ -304,4 +298,4 @@
        width: 276rpx !important;
        height: 76rpx !important;
    }
</style>
</style>
uniapps/work-app/src/utils/request/interceptors.js
@@ -48,15 +48,16 @@
    // 假设有token值需要在头部需要携带
    let accessToken = useUserStore()?.$state?.userInfo?.access_token;
    if (accessToken) {
      config.header['Blade-Auth'] = 'bearer ' + accessToken;
      // config.header['Blade-Auth'] = 'bearer ' + accessToken;
      config.header['authorization'] = accessToken;
    }
    if (detail?.areaCode) {
      config.header['areaCode'] = detail.areaCode
    }
    // if (detail?.areaCode) {
    //   config.header['areaCode'] = detail.areaCode
    // }
    // 安全请求header
    config.header['Blade-Requested-With'] = 'BladeHttpRequest';
    // config.header['Blade-Requested-With'] = 'BladeHttpRequest';
    // 客户端认证参数
    config.header['Authorization'] = 'Basic ' + Base64.encode(website.clientId + ':' + website.clientSecret);
    // config.header['Authorization'] = 'Basic ' + Base64.encode(website.clientId + ':' + website.clientSecret);
    return config
  }, config => { // 可使用async await 做异步操作
    return Promise.reject(config)