EE308_LAB10

Miracle_Han 2021-12-18 07:18:52
The Link Your Classhttps://bbs.csdn.net/forums/MUEE308FZ
The Link of Requirement of This Assignmenthttps://bbs.csdn.net/topics/603608738
The Name of TeamEast Wind
Leader's MU STU ID and Name19104375 & 831902106 Xiaolong Han
Teammate 1's MU STU ID and Name19104600 & 831902123 Yongquan Wang
Teammate 2's MU STU ID and Name19104847 & 831902119 Jiatong Zhang
Teammate 3's MU STU ID and Name19104821 & 831902118 Shuoyuan Chen
Teammate 4's MU STU ID and Name19104952 & 831901329 Xiaotong Shao
Group number6 - A

📜 Catalog

目录

  • Part 1
  • 👨‍👩‍👧‍👦Team work summary and reflection
  • Team work issues
  • Solution
  • Part 2
  • UML Diagram
  • Part 3
  • Realistic progress of the project
  • 🕷 Screenshot of Python crawling Github content
  • 🖥Front end: Some screenshots of our front end interface
  • 💾Cloud development back end
  • Part 4
  • Github library
  • Part 5
  • 🤏Process experience for each employee

Part 1

👨‍👩‍👧‍👦Team work summary and reflection

Team work issues
  • The communication between the front and back end members is insufficient, the workload is unbalanced, and the potential of each member is not fully utilized, which leads to the slow progress of the project
  • Lack of solid professional knowledge, such as not proficient in the use of front-end and back-end, not smooth in the use of Github team collaboration function, and difficult project progress
Solution
  • In view of question 1, we will strengthen the communication between the teams, summarize the work situation of the day every day, and arrange the tasks of the next day according to this situation to ensure the smooth progress of the project.
  • In view of question 2, we decided to start from basic learning, and the specific division of labor will be reflected in the personnel arrangement.

Part 2

UML Diagram

img

img

img

Part 3

Realistic progress of the project

🕷 Screenshot of Python crawling Github content

What about the Github content we crawled:

img

Our crawl results:

img

Our code:

# -https://img-community.csdnimg.cn/images/39eba8e156244d50b2243cabec9b12d0.png "#left")
*- coding:utf-8 -*-
__author__ = "MuT6 Sch01aR"

import requests
from lxml import etree

def get_page_text(url):
    headers = {
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36'
    }
    page_text = requests.get(url=url, headers=headers)
    # 将编码设置为当前网页数据编码
    page_text.encoding = page_text.apparent_encoding
    page_text = page_text.text

    return page_text
def get_link(page_text,link_list):
    tree = etree.HTML(page_text)
    article_list = tree.xpath('//div[@class="position-relative container-lg p-responsive pt-6"]/div/div[2]/article')

    for article in article_list:
        #链接
        link = article.xpath('.//h1[@class="h3 lh-condensed"]/a/@href')[0]
        link = 'https://github.com' + link
        #标题
        title = article.xpath('.//h1[@class="h3 lh-condensed"]/a/@href')[0]
        title = title[1:].strip()


        link_list.append(link)
        title_list.append(title)

def get_page_info(link_list,describe_list):
    for link in link_list:

        page_text = get_page_text(link)
        tree = etree.HTML(page_text)
        describe = tree.xpath('//article[@class="markdown-body entry-content container-lg"]//text()')
        describe_list.append(describe)
def write(title_list,link_list,describe_list):
    with open('./github项目介绍.txt','w',encoding='utf-8') as fp:
        for i in range(len(title_list)):
            fp.write(str(i+1)+'\n')
            fp.write('标题:'+title_list[i]+'\n')

            fp.write('链接:'+link_list[i]+'\n')
            fp.write('说明:'+str(describe_list[i])+ '\n')
            fp.write('\n\n')
    fp.close()
if __name__ == '__main__':
    url = 'https://github.com/trending/python'
    link_list = []
    title_list = []

    describe_list = []
    page_text = get_page_text(url)
    page_link = get_link(page_text,link_list)
    get_page_info(link_list,describe_list)
    write(title_list,link_list,describe_list)

🖥Front end: Some screenshots of our front end interface

The home page:

img

Select Labels you like page:

img

Search page:

img

Login page:

img

What we have done:

  • Solved how https://img-community.csdnimg.cn/images/42fed9fe22514de7bc3a6372eb0e5c24.png "#left")
    to keep the plane in the same proportion position in different models (found many methods and finally used margin to solve)
  • The current time is displayed on the home page
  • Realizes the navigation bar setting, and presses will have the different icon effect
  • Solved the search bar page design and search bar establishment
  • How to get user information function solved

Open question:

  • New users interested in the tag although good, but behind the guess you like weigh is not really implemented, that is to say, click on the system does not allow you to select the tag of the article.
  • How to collect articles and display them one by one in the favorites page has not been implemented; If possible, we want to make it show how many people have collected the article
  • All the contents of the search page are ready, but the operation of clicking on the search page to jump to the web page is not implemented

💾Cloud development back end

![img](file:///C:\Users\yangqi\Documents\Tencent Files\1477841883\Image\C2C\KZD4SM2$F7HGQWI]GP2VL01.png)

Code 1: Call the cloud function to update the number

  //调用云函数更新数量
      wx.cloud.callFunction({
        name:"update1119",
        data:{
          id:id,
          price:parseInt(price)
        }
      }).then(res => {
        console.log('调用云函数成功', res)
        this.getDetail()
      }).catch(res => {
        console.log('调用云函数失败', res)
      })
    }
  },

      

Code 2: Local applets call the database directly to update the number

update() {
    console.log('新的数量', price)
    if (price == '') {
      wx.showToast({
        icon: 'none',
        title: '空',
      })
    } else {
      本地小程序直接调用数据库更新数量
      wx.cloud.database().collection('goods')
        .doc(id)
        .update({
          data: {
            price: price
          }
        })
        .then(res => {
          console.log('更新成功', res)
          this.getDetail()
        })
        .catch(res => {
          console.log('更新失败', res)
        })

Code 3: Cloud function call

// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({
  env:cloud.DYNAMIC_CURRENT_ENV
})

// 云函数入口函数
exports.main = async (event, context) => {
  return cloud.database().collection('goods')
  .doc(event.id)
  .update({
    data: {
      price: event.price
    }
  })
}

The main interface

img

Console back end 1

img

Console back end 2

img

What we have done

Open question

  • The crawler data cannot be written to the cloud database, so it cannot be called further
  • Local configuration of mysql is a knowledge blind area, server port open cannot be linked

Part 4

Github library

Front endhttps://github.com/KKK-Kamenride/East-Wind/tree/main
Back endhttps://github.com/KKK-Kamenride/East-Wind/tree/back

Part 5

🤏Process experience for each employee

👨‍🎓Leader: Xiaolong Han__ Miracle

Just like the previous LABS, this new one is also a new challenge. The teacher encouraged us to jump out of the comfort zone, so that I could have completely different experience and harvest in each LAB. At the same time, the team LAB is a bigger challenge for me, the leader, and there are more problems to solve. Thanks to my teammates, the five people worked together to find and solve the problems, and finally we submitted a work that we didn't want to see. The end of this LAB should also signal the end of all LABS. I will remember the feelings of each experiment and urge me to learn not to give up and persevere.

👩‍🎓Teammate 1: Yongquan Wang __ Kerio

In order to realize the backend, we made all kinds of attempts, as long as we thought possible to achieve the way to learn, but the result seems not so direct to achieve the effect we want. Although the results may not be that rich, I have learned a lot about the approaches and characteristics of back-end development through this opportunity, and grasped the applicable scenarios and constraints in practice. More importantly, I have cultivated the ability to find effective solutions to problems I encounter. I should be more prepared for future back-end development

👨‍✈️Teammate 2: Jiatong Zhang __ Allen

In this Alpha Sprint project, we almost started from scratch. In the team, I was responsible for the data call part. In the process of trying to produce, I learned many aspects of knowledge successively, and finally chose wechat cloud development. At the beginning, I had no direction. I felt that I had learned a lot of new knowledge, but I didn't know which one could be used. Until I finally decided to use wechat cloud development, I had no direction. Although this project did not fully realize the function we set initially, I benefited a lot from the learning process and greatly exercised my learning ability.

👨‍⚖️Teammate 3: Shuoyuan Chen __ Dio

Small programs really have immeasurable possibilities and challenges. When I do front-end design, I can spend a lot of time trying to get a simple effect. Maybe that effect could have been done with a single line of code, but it would have taken me hours to find that line of code. We seek solutions through various methods, such as CSDN, Github, Baidu search, etc. As long as there is a possible solution, we will read the article patiently. During this week, I saw myself becoming proficient in operation, the team struggling all night for the project, and everyone suffering and crying, but challenging the limit for a common goal. That's probably what the Alpha sprint is all about

👩‍⚖️Teammate 4: Xiaotong Shao

Through the team cooperation of this project, I realized that team cooperation can often stimulate the incredible potential of the group, and the results of collective cooperation can often exceed the sum of individual achievements of the members. Is the so-called "concentric mountain into jade, together soil into gold." The victory of the Red Army's Long March was a miracle of the Chinese revolution and even the world's military. The red Army soldiers who created this miracle and the whole Red Army team are an excellent team, which not only got out of the difficult situation but also laid the foundation for the victory of the revolution under their joint cooperation. Therefore, success requires the spirit of overcoming difficulties, but also the resultant force of unity and cooperation.

...全文
324 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

183

社区成员

发帖
与我相关
我的任务
社区描述
福州大学 梅努斯国际工程学院 软件工程 教学
软件工程 高校
社区管理员
  • 单步调试
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧