实习日志Day 4

信管1171 02 曾燃亮

今天学习了对背景图片的自适应每个手机的宽和高、在背景图片上添加用户的头像和名称、对地图添加细节、获取用户的权限。对于今天的内容已经大概掌握了,并在作业种进行了实践。

1.FieldSystemManager wx.getFileSystemManager()

获取全局唯一的文件管理器

返回值

FieldSystemManager

文件管理器

2.wx.getFileInfo(Object object)

获取文件信息

参数

Object object

属性类型默认值必填说明
filePathstring 本地文件路径
digestAlgorithmstring'md5'计算文件摘要的算法
successfunction 接口调用成功的回调函数
failfunction 接口调用失败的回调函数
completefunction 接口调用结束的回调函数(调用成功、失败都会执行)

object.digestAlgorithm 的合法值

说明最低版本
md5md5 算法 
sha1sha1 算法 

object.success 回调函数

参数

Object res

属性类型说明
sizenumber文件大小,以字节为单位
digeststring按照传入的 digestAlgorithm 计算得出的的文件摘要

 

3.FileSystemManager.access(Object object)

判断文件/目录是否存在

参数

Object object

属性类型默认值必填说明
pathstring 要判断是否存在的文件/目录路径
successfunction 接口调用成功的回调函数
failfunction 接口调用失败的回调函数
completefunction 接口调用结束的回调函数(调用成功、失败都会执行)

object.fail 回调函数

参数

Object res

属性类型说明
errMsgstring错误信息

res.errMsg 的合法值

说明最低版本
fail no such file or directory ${path}文件/目录不存在

 

4.作业

js

Page({
  data: {
    mobileModel: '',
    windowWidth: '',
    windowHeight: '',
    screenWidth: '',
    screenHeight: '',
    system: '',
    userInfo: {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    wx.getSystemInfo({
      success: function (res) {
        that.setData({
          mobileModel: res.model,
          windowWidth: res.windowWidth,
          windowHeight: res.windowHeight,
          screenWidth: res.screenWidth,
          screenHeight: res.screenHeight,
          system: res.system
        })
      }
    })
  },

wxml

<view class='bg'>
      <view class="userinfo">  
        <open-data type="userAvatarUrl"></open-data>
      </view>
      <view class="nickname">
        <open-data type="userNickName"></open-data>
      </view>
</view>
<view class="container1">
  <view>手机型号:{{mobileModel}}</view>
  <view>窗口宽度:{{windowWidth}}</view>  
  <view>窗口高度:{{windowHeight}}</view>
  <view>可使用窗口宽度:{{screenWidth}}</view>
  <view>可使用窗口高度:{{screenHeight}}</view>
  <view>手机系统:{{system}}</view>
</view>
 

wxss

.container0-1{
  height: 20%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
}
.nickname {
  color: #aaa;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
 
.container1 {
  display: flex;  /**指定flex 布局*/
  flex-direction:column; /**主轴 方向*/
} 
.container1>view{
  width:100%; /**宽度*/
  height:75rpx; /**高度指定*/
  background-color: whitesmoke;
  text-align: center; /**文字居中*/
  line-height: 100rpx; /**文字居中*/
}
.userinfo{
  width: 150rpx;
  height:150rpx;
  border-radius:50%;
  display: flex;
  overflow: hidden;
  justify-content: center;
}
.usericon{
  height:200rpx;
  width:200rpx;
  border-radius:50%;
}
.bg{
  width:100%;
  height:350rpx;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background:url('') no-repeat 0 0;
  background-size: 100% 100%;
}

 

Day 1: Today is my first day of computer internship. I am excited to learn and gain more experience. My mentor introduced me to the company’s software and hardware tools. Day 2: I learned the basics of programming languages like C++ and Python. My mentor guided me through some coding exercises to make sure I understood the concepts. Day 3: Today, I was introduced to database management systems. I learned how to use SQL to query, update and manage data in a relational database. Day 4: I spent the day working on a project using Java programming language. I learned how to implement object-oriented programming concepts and how to use Java libraries. Day 5: I learned about web development and how to create a simple website using HTML and CSS. I also learned about responsive design and how to make a website compatible with different devices. Day 6-10: I spent these days working on a group project. We developed a simple mobile application using Android Studio. I learned how to design user interfaces and how to integrate different functionalities into the app. Day 11-15: I worked on a project that involved data analysis using Python. I learned how to use libraries like NumPy, Pandas and Matplotlib to analyze and visualize data. Day 16-18: I worked on a cybersecurity project. I learned about different types of attacks and how to prevent them. I also learned how to use penetration testing tools. Day 19: I spent the day improving my coding skills by practicing coding challenges on different online platforms. Day 20: Today is my last day of internship. I am grateful for the opportunity to learn and gain experience. I am now more confident in my coding skills and ready to take on more challenging projects.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值