基于微信小程序校内论坛系统

这篇具有很好参考价值的文章主要介绍了基于微信小程序校内论坛系统。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

开发工具:IDEA、微信小程序

服务器:Tomcat9.0, jdk1.8

项目构建:maven

数据库:mysql5.7

前端技术:vue、uniapp

服务端技术:springboot+mybatis-plus

本系统分微信小程序和管理后台两部分,项目采用前后端分离

系统主要分为两个角色:管理员和普通用户。

1.普通用户(小程序):登录、注册、首页、论坛信息(查询、发布、回复、收藏)、我的(修改信息、我的发布、我的收藏、退出登录)。

2.管理员(后台):登录、首页、公告管理、新闻管理、论坛管理、用户管理、个人中心(收藏管理)、系统管理(管理员管理、角色管理、菜单管理、系统日志)、退出登录、修改密码等功能的管理

基于微信小程序校内论坛系统

文档截图:

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

 

基于微信小程序校内论坛系统

微信小程序截图: 

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

后台截图:

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统

基于微信小程序校内论坛系统文章来源地址https://www.toymoban.com/news/detail-457785.html

package io.renren.modules.renren.controller;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Map;

import io.renren.modules.renren.file.FileUploadController;
import io.renren.modules.util.FileUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import io.renren.modules.renren.entity.NewImgEntity;
import io.renren.modules.renren.service.NewImgService;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
@RequestMapping("renren/newimg")
public class NewImgController {
    @Autowired
    private NewImgService newImgService;

    @Value("${renren.uploadUrl}")
    private String uploadUrl;

    @Resource
    private FileUploadController fileUploadController;


    /**
     * 保存MultipartFile files
     */
    @PostMapping("/save")
    public R save(@RequestParam("files") MultipartFile files, String newsTitle,
                   String newsContetn
    ) throws Exception {
        String fileUrl;
        if (!files.isEmpty() && files != null) {
            fileUrl= fileUploadController.upload(files);
            NewImgEntity newImgEntity = new NewImgEntity();
            newImgEntity.setNewsTitle(newsTitle);
            newImgEntity.setNewsContetn(newsContetn);

            newImgEntity.setImgSrc(fileUrl);

            newImgService.save(newImgEntity);
            return R.ok();
        } else {
            return R.error();
        }
    }

    /**
     * 列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params) {
        PageUtils page = newImgService.queryPage(params);

        return R.ok().put("page", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Integer id) {
        NewImgEntity newImg = newImgService.getById(id);
        newImg.setImgSrc(uploadUrl+newImg.getImgSrc());
        return R.ok().put("newImg", newImg);
    }

    /**
     * 修改
     */
    @RequestMapping("/update2")
    public R update(Integer id, String newsTitle, String newsContetn) throws Exception {
        NewImgEntity newImgEntity = new NewImgEntity();
        newImgEntity.setId(id);
        newImgEntity.setNewsTitle(newsTitle);
        newImgEntity.setNewsContetn(newsContetn);
        newImgService.updateById(newImgEntity);
        return R.ok();
    }

    @PostMapping("/update")
    public R update(@RequestParam("files") MultipartFile files,Integer id, String newsTitle, String newsContetn) throws Exception {
        String fileUrl;
        if (!files.isEmpty() && files != null) {
            fileUrl= fileUploadController.upload(files);
            NewImgEntity newImgEntity = new NewImgEntity();
            newImgEntity.setId(id);
            newImgEntity.setNewsTitle(newsTitle);
            newImgEntity.setNewsContetn(newsContetn);

            newImgEntity.setImgSrc(fileUrl);

            newImgService.updateById(newImgEntity);
            return R.ok();
        } else {
            return R.error();
        }
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids) {
        newImgService.removeByIds(Arrays.asList(ids));

        return R.ok();
    }

}
<template>
 <view class="">
  <view class="">
   <swiper style="height: 370upx;" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
    <swiper-item v-for="item3 in banner">
     <view class="swiper-item">
      <image :src="item3.src" style="width: 100%;"></image>
     </view>
    </swiper-item>
   </swiper>
  </view>
  <view
   style="display: flex;flex-direction: row;font-size: 27upx;margin: 27upx;border-bottom: 1upx dashed #999999;padding: 10upx;">
   <view class="">
    公告:
   </view>
   <view class="" v-if="noteMsg.newsTitle" @click="noteBtn(noteMsg.id)">
    {{noteMsg.newsTitle.substring(0,23)}}
   </view>
  </view>
  <view style="display: flex;flex-direction: column;margin: 20upx;">
   <view style="border-bottom: 1upx solid #999999;padding: 10upx;font-size: 32;font-weight: 600;">
    校园新闻
   </view>
   <view class="news" v-for="items in newsList" @click="newsBtn(items.id)">
    <text>{{items.newsTitle}}</text>
    <text>{{items.createDate.substring(0,10)}}</text>
   </view>

  </view>
  <view
   style="margin-left: 20upx;border-bottom: 1upx solid #999999;padding: 10upx;font-size: 32;font-weight: 600;">
   图片新闻
  </view>
  <view style="font-size: 27upx;display: flex;flex-direction: row;margin: 16upx;justify-content: flex-start;flex-wrap: wrap;">
   <view @click="imgBtn(items.id)" style="display: flex;flex-direction: column;" v-for="items in imgList">
    <view class="">
     <image :src="items.imgSrc" class="newsImg"></image>
    </view>
    <view class="">
     {{items.newsTitle}}
    </view>
   </view>

  </view>
 </view>
</template>

<script>
 export default {
  data() {
   return {
    noteTxt: '',
    newsList: [],
    imgList: [],
    noteMsg:{},
    banner: [{
      src: "../../static/images/xiaoyuan.png"
     },
     {
      src: "../../static/images/xiaoyua2.png"
     }
    ]
   }
  },
  onLoad() {
   this.initNews()
   this.initImg()
   this.initNote()
  },
  methods: {
   newsBtn(id){
    uni.navigateTo({
     url:'./newmsg?id='+id
    })
   },
   noteBtn(id){
    uni.navigateTo({
     url:'./notemsg?id='+id
    })
   },
   imgBtn(id){
    uni.navigateTo({
     url:'./imgmsg?id='+id
    })
   },
   initNews() {
    var _this = this
    uni.request({
     url: _this.serverUrl + 'renren/newmsg/list',
     success(res) {
      if (res.data.code == 0) {
       _this.newsList = res.data.page.list
      }
     }
    })
   },
   initImg() {
    var _this = this
    uni.request({
     url: _this.serverUrl + 'renren/newimg/list',
     success(res) {

      if (res.data.code == 0) {
       /* debugger */
       _this.imgList = res.data.page.list
      }
     }
    })
   },
   initNote(){
    var _this = this
    uni.request({
     url: _this.serverUrl + 'renren/notemsg/list2',
     success(res) {
      if (res.data.code == 0) {
       _this.noteMsg = res.data.NoteMsg
      }
     }
    })
   }

  }
 }
</script>

<style>
 .newsImg {
  width: 230upx;
  height: 150upx;
 }

 .news {
  margin-top: 10upx;
  display: flex;
  flex-direction: row;
  font-size: 29upx;
  justify-content: space-between
 }

 .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
 }

 .logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
 }

 .text-area {
  display: flex;
  justify-content: center;
 }

 .title {
  font-size: 36rpx;
  color: #8f8f94;
 }
</style>

到了这里,关于基于微信小程序校内论坛系统的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 基于微信小程序小型论坛交流系统 (后台java+Springboot框架)答辩常规问题和如何回答(答辩指导)

     博主介绍 :黄菊华老师《Vue.js入门与商城开发实战》《微信小程序商城开发》图书作者,CSDN博客专家,在线教育专家,CSDN钻石讲师;专注大学生毕业设计教育和辅导。 所有项目都配有从入门到精通的基础知识视频课程,学习后应对毕业设计答辩。 项目配有对应开发文档、

    2024年03月22日
    浏览(38)
  • JAVA微信小程序论坛系统毕业设计 开题报告

    本文给出的java微信小程序系统毕业设计开题报告,仅供参考!(具体模板和要求按照自己学校给的要求修改) 目的 :本课题主要目标是设计并能够实现一个基于微信小程序论坛交流系统,前台用户使用小程序,后台管理使用Java+Mysql开发,后台使用了springboot框架;通过后台

    2024年02月06日
    浏览(31)
  • 微信小程序毕业设计作品成品(72)微信小程序在线交流论坛BBS系统设计与实现

    博主介绍: 《Vue.js入门与商城开发实战》《微信小程序商城开发》图书作者,CSDN博客专家,在线教育专家,CSDN钻石讲师;专注大学生毕业设计教育和辅导。 所有项目都配有从入门到精通的基础知识视频课程,免费 项目配有对应开发文档、开题报告、任务书、PPT、论文模版

    2024年02月08日
    浏览(29)
  • 快速上手微信小程序(纯原生)基于微信开发者工具+云开发

    最近开发一个小程序。因为体量实在不大,两张表,几个接口。便打算写原生的代码。没有使用uniapp等框架。记录一下一个小程序从搭建到审核发布的那些坑和经验做为学习笔记。 几个网站请收藏 你的小程序需要开发工具: 保姆级传送门 你的小程序需要一个身份证: 微信公

    2024年02月10日
    浏览(48)
  • 基于微信小程序的考研论坛设计的设计与开发(源码+lw+部署文档+讲解等)

    💗 博主介绍 :✌新人博主,工作经验两年+、专注于Java、小程序技术领域和毕业项目实战✌💗 🌟文末获取源码+数据库🌟 感兴趣的可以先收藏起来,还有大家在毕设选题,项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人 在当前社会背景下,基于微信小

    2024年01月16日
    浏览(33)
  • 基于微信小程序的高考论坛BBS的设计与实现(源码+论文)_v_194

    微信端:   tabBar: 首页 圈子 我的 用户: 首页:登录和未登录用户皆可查看 (1)搜索框:点击搜索跳转到搜索页面,输入大学名称或者地区能够搜索对应的学校目录,点击学校能够进入对应的详情页面,输入地区比如云南,搜索框下可以显示云南的全部大学列表 一行列表(

    2024年02月05日
    浏览(27)
  • 微信小程序用什么工具开发(微信小程序开发工具介绍)

    有很多人在开发小程序之前都会去了解微信小程序开发工具,想知道微信小程序用什么工具开发。时至今日,随着互联网技术的发展,现在开发微信小程序也能使用多种不同的工具,让我们来了解一下吧。 一、微信开发者工具 这是微信官方提供的微信小程序开发工具,可以

    2024年02月11日
    浏览(33)
  • 微信小程序开发者工具下载

    微信开发者工具下载地址与更新日志 | 微信开放文档 (qq.com) 下载安装好后,软件图标如下图所示。 运行软件如下图所示,这时候就需要使用你的管理员账号扫码登录。 登陆后的界面,如下图所示。可以项目分为两类: 小程序项目、公众号网页项目 。其中,小程序项目又细

    2024年04月23日
    浏览(43)
  • [微信小程序开发者工具] × #initialize

    [微信小程序开发者工具] × #initialize-error: [error] 工具的服务端口已关闭。要使用命令行调用工具,请在下方输入 y 以确认开启,或手动打开工具 - 设置 - 安全设置,将服务端口开启。 从HBuilder运行到微信小程序的时候报错 解决办法: 打开微信开发者工具,选择设置–通用设

    2024年02月11日
    浏览(43)
  • 微信小程序开发工具的目录结构

    1  .js文件:页面脚本文件,存放页面数据、事件处理函数等。——处理用户操作  app.js文件:整个项目的入口文件,通过调用App()函数启动项目。  页面.js文件:页面入口文件,调用Page()函数,创建并运行页面。 普通.js文件:普通功能模块文件,用来封装公共的函数或

    2024年02月05日
    浏览(33)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包