Coder Social home page Coder Social logo

xpxxy / blockchain-logistics-eform Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 10.46 MB

一个基于Vue+Express+Fiscobcos的区块链电子物流系统。A Fisco bcos based logistics eForm with Vue+Express

License: GNU General Public License v3.0

HTML 0.20% Vue 72.31% JavaScript 23.88% CSS 0.03% Solidity 3.59%
element-plus express fisco-bcos mysql sequelize solidity vite vue

blockchain-logistics-eform's Introduction

pkm3XHP.png

区块链电子物流商品表单系统

Fisco Bcos based Commodity e-form system

本系统是基于Vue+Express+FiscoBocs打造的区块链电子物流表单系统。

其主要实现了以下功能:

1.登记物流数据上链保存;

2.商品信息数据上链保存;

3.追踪物流中间环节数据,物流的中途的转运运输数据将被追踪溯源,并以表格形式列出;

4.基本的用户管理;

5.对商品数据和物流表单数据的基本管理,包括创建、更新、终止、和状态管理。

部署系统:

理论上可以全程Linux部署,但最终为了演示方便和使用ubuntu server部署区块链,最后选择了Windows + Linux 混合。

部署要求:

软件 版本
NodeJS 18+
NPM 9.6+

前后端运行基础需要的软件包:

包名 版本
express 4.18.2+
vite 4.2.1+

其他的软件包均通过NPM 管理


部署过程:

前端部署:

前端依次执行:

cd /client
npm install

等待安装完成后,服务器将在localhost:8000启动,请确保该端口没有被占用。

npm run dev

后端部署:

进入server目录,修改/config下的db.js 将数据库连接改为你的配置

module.exports={
    HOST: "localhost" , #你的连接地址
    user: "root",       #使用的用户
    PASSWORD: "123321", #密码
    DB: "deliveryDB",   #数据库名字
    dialect: "mysql",   #连接的数据库类型
}

sql文件已给出

进入同文件下的webase.js 修改头部的几个变量

const account = "";               #webase的用户
const accountPwd = "";            #密码的pwd,在webase执行一次登录即可在浏览器的F12中获取到
const groupId = '';               #操作的集群
const contractAddr = "";          #合约的地址
const xpxxy = "";                 #调用合约的用户

在server目录下开启终端执行:

npm install

待安装完成后执行:

node app.js

需要保证3000端口不被占用,如果占用修改app.js的端口。

区块链端部署:

参考webase的官方文档完整部署章节WeBaseDoc 部署完成后需要修改两个文件: 1.webase-node-mgr的conf下的application.yml:

....
Spring:
       ....
        url:....     #最后面加上&useSSL=false
....
enableVerficationCode: false

同理在webase-sign的conf下的同名文件的spring下的字段也是一样的

若是虚拟机,请开放虚拟机端口5000-5004

若是远程服务器,请修改webase.js的内的各项接口的连接地址

合约的部署可在webase浏览器端直接完成,不在赘述

合约部署:

部署顺序:

1.CommodityInfo.sol
2.LogisticsInfo.sol
3.LogisticsForm.sol

blockchain-logistics-eform's People

Contributors

xpxxy avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.