尚医通 (十九)用户认证

news2024/9/20 20:27:48

目录

  • 一、对象存储OSS
    • 1、开通“对象存储OSS”服务
    • 2、创建Bucket
    • 3、上传默认头像
    • 4、创建RAM用户
    • 5、使用SDK
  • 二、后端集成OSS
    • 1、新建云存储微服务
    • 2、实现文件上传接口
  • 三、用户认证功能
    • 1、用户认证需求分析
    • 2、开发用户认证接口
    • 3、用户认证前端

一、对象存储OSS

用户认证需要上传证件图片、首页轮播也需要上传图片,因此我们要做文件服务,阿里云oss是一个很好的分布式文件服务系统,所以我们只需要集成阿里云oss即可

1、开通“对象存储OSS”服务

(1)申请阿里云账号
(2)实名认证
(3)开通“对象存储OSS”服务
(4)进入管理控制台

2、创建Bucket

选择:标准存储、公共读、不开通
在这里插入图片描述

3、上传默认头像

创建文件夹avatar,上传默认的用户头像
在这里插入图片描述

4、创建RAM用户

在这里插入图片描述

5、使用SDK

在这里插入图片描述

二、后端集成OSS

1、新建云存储微服务

1、在service模块下创建子模块service_oss
2、配置pom.xml
service-oss上级模块service已经引入service的公共依赖,service-oss模块只需引入阿里云oss相关依赖

<dependencies>
    <!-- 阿里云oss依赖 -->
    <dependency>
        <groupId>com.aliyun.oss</groupId>
        <artifactId>aliyun-sdk-oss</artifactId>
    </dependency>

    <!-- 日期工具栏依赖 -->
    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
    </dependency>
</dependencies>

3、配置application.properties

#服务端口
server.port=8205
#服务名
spring.application.name=service-oss

#环境设置:dev、test、prod
spring.profiles.active=dev

#上传单个文件的最大值1G
spring.servlet.multipart.max-file-size=1024MB
#一次请求上传的所有文件的总大小1G
spring.servlet.multipart.max-request-size=1024MB

#阿里云 OSS
#不同的服务器,地址不同
aliyun.oss.file.endpoint=oss-cn-beijing.aliyuncs.com
aliyun.oss.file.keyid=your accessKeyId
aliyun.oss.file.keysecret=your accessKeySecret
#bucket可以在控制台创建,也可以使用java代码创建
aliyun.oss.file.bucketname=guli-file

4、创建启动类
创建OssApplication.java

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@ComponentScan(basePackages = {"com.donglin"})
public class OssApplication {

    public static void main(String[] args) {
        SpringApplication.run(OssApplication.class, args);
    }
}

2、实现文件上传接口

1、从配置文件读取常量
创建常量读取工具类:ConstantPropertiesUtil.java
使用@Value读取application.properties里的配置内容
用spring的 InitializingBean 的 afterPropertiesSet 来初始化配置信息,这个方法将在所有的属性被初始化后调用。

/**
 * 常量类,读取配置文件application.properties中的配置
 */
@Component
//@PropertySource("classpath:application.properties")
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${aliyun.oss.file.endpoint}")
    private String endpoint;

    @Value("${aliyun.oss.file.keyid}")
    private String keyId;

    @Value("${aliyun.oss.file.keysecret}")
    private String keySecret;

    @Value("${aliyun.oss.file.bucketname}")
    private String bucketName;

    public static String END_POINT;
    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;
    public static String BUCKET_NAME;

    @Override
    public void afterPropertiesSet() throws Exception {
        END_POINT = endpoint;
        ACCESS_KEY_ID = keyId;
        ACCESS_KEY_SECRET = keySecret;
        BUCKET_NAME = bucketName;
    }
}

2、文件上传
创建Service接口:OssService .java

public interface OssService {

    String upload(MultipartFile file);
}

实现:OssServiceImpl.java
参考SDK中的:Java->上传文件->简单上传->流式上传->上传文件流
在这里插入图片描述

@Service
public class OssServiceImpl implements OssService {
    @Override
    public String upload(MultipartFile file) {
        // Endpoint以华东1(杭州)为例,其它Region请按实际情况填写。
        String endpoint = ConstantPropertiesUtil.END_POINT;
        // 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。
        String accessKeyId = ConstantPropertiesUtil.ACCESS_KEY_ID;
        String accessKeySecret = ConstantPropertiesUtil.ACCESS_KEY_SECRET;
        // 填写Bucket名称,例如examplebucket。
        String bucketName = ConstantPropertiesUtil.BUCKET_NAME;
        // 创建OSSClient实例。
        OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
        try {
            // 上传文件流。
            InputStream inputStream = file.getInputStream();
            String fileName = file.getOriginalFilename();
            //生成随机唯一值,使用uuid,添加到文件名称里面
            String uuid = UUID.randomUUID().toString().replaceAll("-","");
            fileName = uuid+fileName;
            //按照当前日期,创建文件夹,上传到创建文件夹里面
            //  2021/02/02/01.jpg
            String timeUrl = new DateTime().toString("yyyy/MM/dd");
            fileName = timeUrl+"/"+fileName;
            //调用方法实现上传
            ossClient.putObject(bucketName, fileName, inputStream);
            //上传之后文件路径
            // https://yygh-donglin.oss-cn-chengdu.aliyuncs.com/01.jpg
            String url = "https://"+bucketName+"."+endpoint+"/"+fileName;
            //返回
            return url;
        }  catch (IOException e) {
            e.printStackTrace();
            return null;
        } finally {
            if (ossClient != null) {
                ossClient.shutdown();
            }
        }
    }
}

3、创建Controller
FileUploadController.java

@Api(tags="阿里云文件管理")
@RestController
@RequestMapping("/admin/oss/file")
public class FileUploadController {

    @Autowired
    private OssService ossService;

    /**
     * 文件上传
     */
    @ApiOperation(value = "文件上传")
    @PostMapping("upload")
    public R upload(MultipartFile file){
        String uploadUrl = ossService.upload(file);
        return R.ok().data("url",uploadUrl);
    }

}

4、配置网关
properties

#设置路由id
spring.cloud.gateway.routes[5].id=service-oss
#设置路由的uri
spring.cloud.gateway.routes[5].uri=lb://service-oss
#设置路由断言,代理servicerId为auth-service的/auth/路径
spring.cloud.gateway.routes[5].predicates= Path=/*/oss/**

yml
在这里插入图片描述

三、用户认证功能

1、用户认证需求分析

1、需求分析
用户登录成功后都要进行身份认证,认证通过后才可以预约挂号
认证过程:用户填写信息(姓名、证件类型、证件号码和证件照片)==> 平台审批
用户认证设计接口:
1、提交认证
2、上传证件图片
3、获取提交认证信息
在这里插入图片描述

2、开发用户认证接口

操作service_user模块
1、添加service接口及实现
(1)在UserInfoService类添加接口

    //用户认证
    UserInfo getUserInfo(Long userId);

(2)在UserInfoServiceImpl添加实现

    @Override
    public UserInfo getUserInfo(Long userId) {
        UserInfo userInfo = baseMapper.selectById(userId);
        userInfo.getParam().put("authStatusString", AuthStatusEnum.getStatusNameByStatus(userInfo.getStatus()));
        return userInfo;
    }

2、添加controller方法
在UserInfoController类添加方法

//    //获取用户id信息接口
//    @GetMapping("auth/getUserInfo")
//    public R getUserInfo(HttpServletRequest request) {
//        Long userId = AuthContextHolder.getUserId(request);
//        UserInfo userInfo = userInfoService.getById(userId);
//        return R.ok().data("userInfo",userInfo);
//    }

    //查询用户信息
    @GetMapping("/info")
    public R getUserInfo(@RequestHeader String token){
        Long userId = JwtHelper.getUserId(token);
        UserInfo byId = userInfoService.getUserInfo(userId);
        return R.ok().data("user",byId);
    }

    //提交之后修改用户信息
    @PutMapping("/update")
    public R update(@RequestHeader String token, @RequestBody UserAuthVo userAuthVo){
        Long userId = JwtHelper.getUserId(token);
        UserInfo userInfo = new UserInfo();
        userInfo.setId(userId);
        userInfo.setName(userAuthVo.getName());
        userInfo.setCertificatesType(userAuthVo.getCertificatesType());
        userInfo.setCertificatesNo(userAuthVo.getCertificatesNo());
        userInfo.setCertificatesUrl(userAuthVo.getCertificatesUrl());
        userInfo.setAuthStatus(AuthStatusEnum.AUTH_RUN.getStatus());
        userInfoService.updateById(userInfo);

        return R.ok();
    }

3、用户认证前端

1、封装api请求
在api/userInfo.js添加方法

import request from '@/utils/request'

const api_name = `/user/userinfo`

export default {

    getUserInfo() {
        return request({
            url: `${api_name}/info`,
            method: `get`
        })
    },

    saveUserAuah(userAuah) {
        return request({
             url: `${api_name}/update`,
             method: 'put',
             data: userAuah
        })
    }
}

2、页面展示

(1)myheader.vue页面添加方法

loginMenu(command) {
    if('/logout' == command) {
        cookie.set('name', '', {domain: 'localhost'})
        cookie.set('token', '', {domain: 'localhost'})

        //跳转页面
        window.location.href = '/'
    } else {
        window.location.href = command
    }
}

(2)修改utils/request.js文件

//引入js-cookie
import cookie from 'js-cookie'

// http request 拦截器   //浏览器访问服务器
service.interceptors.request.use(
    config => {
    // token 先不处理,后续使用时在完善
    if (cookie.get('token')) {
        //cookie本身不能跨域
        config.headers['token'] = cookie.get('token')
    }
    return config
},
  err => {
    return Promise.reject(err)
})

(3)创建pages/user/index.vue
我们需要在pages下user文件下创建
在这里插入图片描述

<template>
    <!-- header -->
    <div class="nav-container page-component">
      <!--左侧导航 #start -->
      <div class="nav left-nav">
        <div class="nav-item selected">
          <span class="v-link selected dark" onclick="javascript:window.location='/user'">实名认证 </span>
        </div>
        <div class="nav-item">
          <span class="v-link selected dark" onclick="javascript:window.location='/order'"> 挂号订单 </span>
        </div>
        <div class="nav-item ">
          <span class="v-link clickable dark" onclick="javascript:window.location='/patient'"> 就诊人管理 </span>
        </div>
        <div class="nav-item ">
          <span class="v-link clickable dark"> 修改账号信息 </span>
        </div>
        <div class="nav-item ">
          <span class="v-link clickable dark"> 意见反馈 </span>
        </div>
      </div>
      <!-- 左侧导航 #end -->
      <!-- 右侧内容 #start -->
      <div class="page-container">
        <div>
          <div class="title"> 实名认证</div>
          <div class="status-bar">
            <div class="status-wrapper"><span class="iconfont"></span>{{ userInfo.param.authStatusString }}</div>
          </div>
          <div class="tips"><span class="iconfont"></span>
            完成实名认证后才能添加就诊人,正常进行挂号,为了不影响后续步骤,建议提前实名认证。
          </div>
          <div class="form-wrapper" v-if="userInfo.authStatus  == 0">
            <div>
              <el-form :model="userAuah" label-width="110px" label-position="left">
                <el-form-item prop="name" label="姓名:" class="form-normal">
                  <div class="name-input">
                    <el-input v-model="userAuah.name" placeholder="请输入联系人姓名全称" class="input v-input"/>
                  </div>
                </el-form-item>
                <el-form-item prop="certificatesType" label="证件类型:">
                  <el-select v-model="userAuah.certificatesType" placeholder="请选择证件类型" class="v-select patient-select">
                    <el-option
                      v-for="item in certificatesTypeList"
                      :key="item.value"
                      :label="item.name"
                      :value="item.name">
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item prop="certificatesNo" label="证件号码:">
                  <el-input v-model="userAuah.certificatesNo" placeholder="请输入联系人证件号码" class="input v-input"/>
                </el-form-item>
                <el-form-item prop="name" label="上传证件:">
                  <div class="upload-wrapper">
                    <div class="avatar-uploader">
                      <el-upload
                        class="avatar-uploader"
                        :action="fileUrl"
                        :show-file-list="false"
                        :on-success="onUploadSuccess">
                        <div class="upload-inner-wrapper">
                          <img v-if="userAuah.certificatesUrl" :src="userAuah.certificatesUrl" class="avatar">
                          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                          <div v-if="!userAuah.certificatesUrl" class="text"> 上传证件合照</div>
                        </div>
                      </el-upload>
                    </div>
                    <img src="//img.114yygh.com/static/web/auth_example.png" class="example">
                  </div>
                </el-form-item>
              </el-form>
              <div class="bottom-wrapper">
                <div class="button-wrapper">
                  <div class="v-button" @click="saveUserAuah()">{{ submitBnt }}</div>
                </div>
              </div>
            </div>
          </div>
          <div class="context-container" v-if="userInfo.authStatus != 0">
            <div>
              <el-form :model="formData" label-width="110px" label-position="right">
                <el-form-item prop="name" label="姓名:" class="form-normal">
                  <div class="name-input">
                    {{ userInfo.name }}
                  </div>
                </el-form-item>
                <el-form-item prop="name" label="证件类型:">
                  {{ userInfo.certificatesType }}
                </el-form-item>
                <el-form-item prop="name" label="证件号码:">
                  {{ userInfo.certificatesNo }}
                </el-form-item>
              </el-form>
            </div>
          </div>
        </div>
      </div><!-- 右侧内容 #end -->
      <!-- 登录弹出框 -->
    </div>
    <!-- footer -->
  </template>

  <script>
  import '~/assets/css/hospital_personal.css'
  import '~/assets/css/hospital.css'
  import '~/assets/css/personal.css'
  import dictApi from '@/api/dict'
  import userInfoApi from '@/api/userInfo'
  const defaultForm = {
    name: '',
    certificatesType: '',
    certificatesNo: '',
    certificatesUrl: ''
  }
  export default {
    data() {
      return {
        formData:{},
        userAuah: defaultForm,
        certificatesTypeList: [],
        fileUrl:'http://localhost:8222/admin/oss/file/upload',
        userInfo: {
          param: {}
        },
        submitBnt: '提交'
      }
    },
    //create 钩子函数:发送预请求----》请求到后端接口,自己写的请求
    //mouted 钩子函数:发送预请求----》不会请求到后端接口,自己写的请求
    mounted() {
      this.init()
    },
    methods: {
      init() {
        this.getUserInfo()
        this.getDict()
      },
      getUserInfo() {
        userInfoApi.getUserInfo().then(response => {
          this.userInfo = response.data.user
        })
      },
      saveUserAuah() {
        if(this.submitBnt == '正在提交...') {
          this.$message.info('重复提交')
          return
        }
        this.submitBnt = '正在提交...'
        userInfoApi.saveUserAuah(this.userAuah).then(response => {
          this.$message.success("提交成功")
          window.location.reload()
        }).catch(e => {
          this.submitBnt = '提交'
        })
      },
      getDict() {
        dictApi.getChildList(20000).then(response => {
          this.certificatesTypeList = response.data.items
        })
      },
      //axios:Response.data---->R对象
      //el-upload:response----->对象
      onUploadSuccess(response, file) {
        if(response.code !== 20000) {
          this.$message.error("上传失败")
          return
        }
        // 填充上传文件列表
        this.userAuah.certificatesUrl = response.data.url
      }
    }
  }
  </script>
  <style>
    .header-wrapper .title {
      font-size: 16px;
      margin-top: 0;
    }
    .content-wrapper {
      margin-left: 0;
    }
    .patient-card .el-card__header .detail {
      font-size: 14px;
    }
    .page-container .title {
      letter-spacing: 1px;
      font-weight: 700;
      color: #333;
      font-size: 16px;
      margin-top: 0;
      margin-bottom: 20px;
    }
    .page-container .tips {
      width: 100%;
      padding-left: 0;
    }
    .page-container .form-wrapper {
      padding-left: 92px;
      width: 580px;
    }
    .form-normal {
      height: 40px;
    }
    .bottom-wrapper{
      width: 100%;
      padding: 0;
      margin-top: 0;
    }
  </style>

在这里插入图片描述3、预约挂号页面跳转
点击门诊信息,你注册过了,判断实名认证过了没有,没有就不能跳到门诊信息里面,返回到实名认证页面
在这里插入图片描述

import cookie from 'js-cookie' //引入cookie
import userInfoApi from '@/api/userInfo'

    schedule(depcode) {
      // 登录判断
      let token = cookie.get('token')
      if (!token) {
        loginEvent.$emit('loginDialogEvent')
        return
       }
      //判断认证
       userInfoApi.getUserInfo().then(response => {
        let authStatus = response.data.user.authStatus
        // 状态为2认证通过
        if (!authStatus || authStatus != 2) {
           window.location.href = '/user'
           return
        }else{
            window.location.href = '/hospital/schedule?hoscode=' + this.hospital.hoscode + "&depcode="+ depcode
    }
 })
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/358731.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

django项目实战二(django+bootstrap实现增删改查)进阶查询

目录 一、用例管理模块实现 1、创建表和数据 2、创建用例列表 1&#xff09;注册url&#xff08;用例列表&#xff09; 2)修改views.py新增case_list方法 3&#xff09;layout.html导航条新增一个用例管理 4&#xff09;新增case_list.html页面 3、新增用例页面开发 1&…

2023年TS4 入门笔记【慕课网imooc】【Vue3+React18 + TS4考勤系统】

目录 安装ts 基础 类型声明和变量声明 类型注解和类型判断 类型分类与联合类型与交叉类型​编辑 never类型与any类型与unknown类型 类型断言与非空断言 数组类型和元祖类型 对象类型与索引签名 函数类型与void类型 函数重载与可调用注解 枚举类型与const枚举 进阶…

机械革命黑苹果改造计划第四番-外接显示器、win时间不正确问题解决

问题 1.无法外接显示器 最大的问题就是目前无法外接显示器&#xff0c;因为机械革命大多数型号笔记本电脑的HDMI、DP接口都是直接物理接在独显上的&#xff0c;内屏用核显外接显示器接独显&#xff0c;英伟达独显也是黑苹果无法驱动的&#xff0c;而且发现机械革命tpyec接口还…

k8s的基础概念

目录 一、k8s概念 1、k8s是什么 2、为什么要用k8s 3、k8s的特性 二、kubernetes集群架构与组件 1、Master组件 1.1、Kube-apiserver 1.2、Kube-controller-manager 1.3、Kube-scheduler 2、配置储存中心 3、Node组件 3.1、Kubelet 3.2、Kube-Proxy 3.3、docker 或…

SAP S/4 HANA 现金流量表

S4 HANA中的现金流量表 引言&#xff1a;在传统SAP ECC中我们实现现金流量表的方式通常是定义一系列和现金流变动相关的原因代码&#xff08;Reason Code&#xff09;&#xff0c;然后在过账凭证里指定对应的Code&#xff0c;最后通过ABAP代码抓取这些数据产生现金流量表。此方…

力扣(LeetCode)417. 太平洋大西洋水流问题(2023.02.19)

有一个 m n 的矩形岛屿&#xff0c;与 太平洋 和 大西洋 相邻。 “太平洋” 处于大陆的左边界和上边界&#xff0c;而 “大西洋” 处于大陆的右边界和下边界。 这个岛被分割成一个由若干方形单元格组成的网格。给定一个 m x n 的整数矩阵 heights &#xff0c; heights[r][c]…

【pm2】pm2的安装与基本命令:

文章目录一、安装&#xff1a;二、基本命令&#xff1a;【1】启动命令&#xff1a;pm2 start app.js【2】命令行参数&#xff1a;pm2 start app.js --watch -i max【3】 查看有哪些进程&#xff1a;pm2 list【4】停止命令&#xff1a; pm2 stop app_name | app_id &#xff08;…

el-table 复杂表头行内增删改代码示例

效果如图 <template><div class"app-container"><el-card class"box-card item"><div slot"header" class"clearfix" click"showCondition !showCondition"><span><i class"el-ic…

外籍在读博士|赴新西兰奥克兰大学双院士导师麾下联合培养

N同学来自阿拉伯国家&#xff0c;但本硕博都是在我国某省属高校就读&#xff0c;现为材料学专业一年级博士生。联合培养首选澳洲国家&#xff0c;包括澳大利亚和新西兰&#xff0c;其次是美国&#xff0c;希望在2023年初出国&#xff0c;以完成整个学年的学习计划。在我们的帮助…

Android稳定性系列-01-使用 Address Sanitizer检测原生代码中的内存错误

前言想必大家曾经被各种Native Crash折磨过&#xff0c;本地测试没啥问题&#xff0c;一到线上或者自动化测试就出现各种SIGSEGV、SIGABRT、SIGILL、SIGBUS、SIGFPE异常&#xff0c;而且堆栈还是崩溃到libc.so这种&#xff0c;看起来跟我们的代码没啥关系&#xff0c;关键还不好…

Spark3每个job之间任务间隔过长

公司的跑批引擎从impala改成Spark3已经有一个多月了。 不得不说&#xff0c;跑批稳定了好多。资源控制有相对稳定了很多。Spark3比CDH的hive on spark2.4.0要快不少。AQE和CBO真的挺强的。但是使用中发现了一个很奇怪的事情。这个问题在网上搜过&#xff0c;并没有实际解决。 当…

【机器学习】决策树-ID3算法

1.ID3算法 ID3算法利用信息增益进行特征的选择进行树的构建。信息熵的取值范围为0~1&#xff0c;值越大&#xff0c;越不纯&#xff0c;相反值越小&#xff0c;代表集合纯度越高。信息增益反映的是给定条件后不确定性减少的程度。每一次对决策树进行分叉选取属性的时候&#x…

CANopen概念总结、心得体会

NMT网络管理报文&#xff1a; NMT 主机和 NMT 从机之间通讯的报文就称为 NMT 网络管理报文。常见报文说明&#xff1a; 0101---------------网络报文发送Nmt_Start_Node&#xff0c;让电机进入OP模式(此时还不会发送同步信号) setState(d, Operational)------------------开启…

拳打DALL-E 2脚踢Imagen,谷歌最新Muse模型刷新文本图像合成排行榜

原文链接&#xff1a;https://www.techbeat.net/article-info?id4501 作者&#xff1a;seven_ 论文链接&#xff1a; https://arxiv.org/abs/2301.00704 项目主页&#xff1a; https://muse-model.github.io/ 近期火爆AI社区的文本图像合成模型家族又添新成员了&#xff0c;之…

网络计划--时间参数的计算和优化

根据网络图的基本概念和原则绘制出网络图之后&#xff0c;我们可以计算网络图中有关的时间参数&#xff0c;主要目的是找出关键路线&#xff0c;为网络计划的优化、调整和执行提供明确的时间概念。如下图中从始点①到终点⑧共有4条路线&#xff0c;可以分别计算出每条路线所需的…

基于Hive的河北新冠确诊人数分析系统的设计与实现

项目描述 临近学期结束&#xff0c;还是毕业设计&#xff0c;你还在做java程序网络编程&#xff0c;期末作业&#xff0c;老师的作业要求觉得大了吗?不知道毕业设计该怎么办?网页功能的数量是否太多?没有合适的类型或系统?等等。这里根据疫情当下&#xff0c;你想解决的问…

通过官网怎么查找联盟申请链接

欢迎关注勤于奋每天12点准时更新国外LEAD相关技术今天还是来聊聊这个问题吧&#xff0c;很多人问我这个问题&#xff0c;我觉得这个都不是啥多难的技术&#xff0c;用点心就能找到。最简单的办法就是通过浏览器去搜索&#xff0c;比如通过google 搜索,就能找到一些信息&#xf…

第三届无线通信AI大赛分享交流会暨颁奖典礼顺利举办,大赛圆满收官

2月16日&#xff0c;第三届无线通信AI大赛分享交流会暨颁奖典礼在北京顺利举行&#xff0c;宣告大赛圆满收官。 分享交流会暨颁奖典礼以线上线下结合的形式展开&#xff0c;邀请无线通信领域的多位专家、学者与「基于AI的信道估计与信道状态信息反馈联合设计」、「基于AI的高精…

将二进制文件作为目标文件中的一个段

将二进制文件作为目标文件中的一个段 python 生成2进制文件 import sysdef testFile(fileName):# --with open(fileName, modewb) as hexFile:bBuf bytes.fromhex("0123456789abcdef")print("bBuf:",bBuf.hex())len hexFile.write(bBuf)print ("l…

Vue3搭建记录

一、初始化项目&#xff1a;项目名称vue3-element-admin npm init vitelatest vue3-element-admin --template vue-ts 二、整合Element-Plus 1.本地安装Element Plus和图标组件 npm install element-plus npm install element-plus/icons-vue 2.全局注册组件 // main.ts imp…