.wxss代码
/* 小程序按钮样式 */
.btnImg1{
margin-top: 8rpx;
width: 70rpx;
height: 60rpx;
}
.cornerbutton_add {
display: flex; justify-content: center; /* 垂直居中 */
align-items: center; /* 水平居中 */ height: 45px;
margin-top: 45rpx;
border-radius: 20px;
background: #175acb;
color: white;
border: none;
}
.js 代码
addFile: function(){
//添加文件
wx.chooseMessageFile({
//调用选择文件接口
count:Number(1),//文件数量
type: 'file',
success (res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFiles
console.log(