第八组 Beta冲刺(2/3)

第八组 Beta冲刺(2/3)

一、本周工作总结

前端:李双颖,李心月

计划完成:通过内网穿透完成前后端的对接、完成图片上传到后端、从后端获取到处理后的图片并在页面合理展示、完成图片下载功能。
实际完成:成功完成了预期所有任务。

相关代码实现:

<div v-if="show">
      <img
          :src="require('/src/assets/example.png')"
          style="margin-top: -50px;width: 800px;height:400px;padding: 20px;"
           alt="example"/>
    </div>
    <div v-else style="display:flex;flex-direction: row">
      <img :src=url
           style="margin-top: -50px;height:400px;width:auto;padding-top: 20px;padding-left: 15px;padding-bottom: 5px;"
           />
        <img :src="require('/src/assets/彩色-箭头-向右-1.png')"
             style="margin-top: -50px;height:150px;width:auto;padding-top: 140px;padding-bottom: 5px;padding-right: 20px;padding-left: 20px"
             alt="箭头"/>
      <img :src=thefile
           style="margin-top: -50px;height:400px;width:auto;padding-top: 20px;padding-right: 20px;padding-bottom: 5px;"
           alt="after"/>
      </div>
<input @change="getpicture($event)" type="file" id="file" style="display: none" accept="image/*">
    <button class="button1" @click="changeImg">上 传 图 片</button>
    <button class="button2" @click="downLoad">下 载 图 片</button>
getpicture(e){
      console.log(e.target.files[0]);
      this.url = URL.createObjectURL(e.target.files[0]);
      var reader = new FileReader();
      var formData = new FormData();
      formData.append('img', e.target.files[0]);
      console.log(formData);
      console.log(formData.get('img'));
      axios
          .post("http://temp.imbai.tk/get/",formData)
          .then(res=>{
            console.log(res);
            if(res.status===200){
              alert("上传成功");
              this.thefile=res.data.img.toString();
              console.log(this.thefile);
              this.show=false;
            }else{
              alert("请上传图片(jpg/png)!");
            }
          })
          .catch(error =>
              console.log(error)
          )
    },
    changeImg(){
      let filedom=document.querySelector("#file");
      filedom.click();} //唤起选图片

实现效果:

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-PDoioTz9-1671957254594)(C:\Users\金知霖\Desktop\QQ图片20221225160924.png)]

后端:金知霖,华瑞馨,李金珂

计划完成:配合前端同学实现前后端对接,完善图像修复功能、内网穿透

实际完成:成功完成了预期所有任务。

内网桥接:

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-XtnV17Gm-1671957254595)(C:\Users\金知霖\Desktop\屏幕截图 2022-12-24 224931.jpeg)]

遇到的问题:

最开始前端同学的设计是只显示修复后的图片,但这样会导致用户无法对比,也就看不出修复的效果。随后前端的同学又美化了一下,达到了最终效果。

在这里插入图片描述

二、燃尽图

在这里插入图片描述

三、剩余任务

优化界面,优化图像修复功能。

四、收获

本周是非常艰难的一周,小组同学相继感染新冠,但在互相鼓励下最终完成了所有的任务。前端同学如今代码改的越发的熟练,后端的同学也能很好地配合前端同学。本周结束后我们小组取得了阶段性胜利,在未来的一周我们也会继续努力完善项目。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值