To go back to the last page visited
this.$route(-1)
<a @click="$router.go(-1)">back</a>
/** | |
* We login the user to our mini-program | |
* We get the user Info (the user info don't contain the unionId) | |
* We make a request to our back-end to request the unionId. | |
* * For security reason wechat doesn't allow us to make that request on the front-end : https://api.weixin.qq.com/sns/jscode2session?appid=${process.env.APP_ID}&secret=${process.env.APP_SECRET}&js_code=${js_code} | |
* * To make that request we need(see at the bottom) : {secret,appId, js_code(login code)} | |
/** Client-Side **/ | |
import http from '../utils/http.js' |
var Web3 = require("web3"); | |
// TO make a transaction from a wallet address to a smart contract address | |
// The smart contract has a function called : `set()`, which set a value to the data for the variable called : `data` | |
const init2 = async () => { | |
try { | |
const provider = new Web3.providers.HttpProvider(endPoint); // https://ropsten.infura.io/v3/ROPSTEN_API_KEY | |
web3 = new Web3(provider); | |
web3.eth.handleRevert = true; |
When I started my web3 journey I got a freelance contract: Add web3 features to an existing app and reward the users with our token.
The point of rewarding the community was:
Our users should get 5 tokens when completing their profile (bio, curriculum, social media links, etc.).