SamsaraDao/mechanism.html

401 lines
21 KiB
HTML
Raw Normal View History

2025-04-19 15:31:22 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="PYXEL || Ultimate Gaming HTML Template">
<title>Samsara DAO</title>
<!-- All CSS files -->
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<link rel="stylesheet" href="static/css/font-awesome.css">
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/app.css">
<link rel="stylesheet" href="static/js/element-ui-min.css">
<style>
.mechanism_page {
background-color: #F2F2F2;
padding: 6vh;
}
.mechanism_title{
font-weight: 700;
height: 8vh;
font-size: clamp(34px, 2.031vw, 48px);
background: url(./static/ui/title_line.png) no-repeat bottom;
background-size: 100% 30%;
margin-bottom: 5vh;
}
.mechanism_txt{
background-color: #fff;
padding: 4vh;
}
.txt_box{
margin-bottom: 4vh;
color: #3A3A3A;
}
.txt_box .title{
padding: 2vh 0;
font-weight: 700;
display: flex;
align-items: center;
}
.txt_box .title span{
width: 1.5vh;
height: 1.5vh;
background-color: #446FFA;
margin-right: 1vh;
border-radius: 50%;
}
</style>
</head>
<body class="tt-smooth-scroll">
<!-- Main Wrapper Start -->
<div id="app" v-cloak>
<!-- HEADER MENU START -->
<div id="publickHeader"></div>
<!-- HEADER MENU END -->
<!-- BG-SIGN*UP PAGE # 1 START -->
<div class="mechanism_page">
<div class="mechanism_title">{{currentLanguage == 'zh' ? '輪迴道推廣機制':"Promotion mechanism of Samsara Dao"}}</div>
<div class="mechanism_txt">
<div class="txt_box">
<div class="title"><span></span>{{currentLanguage == 'zh' ? '新人三大獎勵' : 'Three major rewards for newcomers'}}</div>
<div>
<div>1、{{currentLanguage == 'zh' ? '註冊就送15積分' : 'Register and receive 15 bonus points.'}}</div>
<div>2、{{currentLanguage == 'zh' ? '購買NFT再送20積分' : 'Purchase NFT and receive 20 bonus points'}}</div>
<div>3、{{currentLanguage == 'zh' ? '註冊有權獲得遊戲推廣獎勵' : 'Registration entitles you to game promotion rewards.'}}</div>
</div>
</div>
<div class="txt_box">
<div class="title"><span></span>{{currentLanguage == 'zh' ? 'KOL獎勵' : 'KOL Rewards'}}</div>
<div>
<div>1) {{currentLanguage == 'zh' ? '推薦註冊送15積分/個' : 'Recommend registration and receive 15 points per item'}}</div>
<div>2) {{currentLanguage == 'zh' ? '推薦購買NFT再送20積分/個' : 'Recommend purchasing NFTs and getting 20 bonus points per unit'}}</div>
<div>3) {{currentLanguage == 'zh' ? '推薦購買NFT立反10%BNB' : 'Recommend purchasing NFT and get an immediate 10% BNB rebateon commission.'}}</div>
<div>4) {{currentLanguage == 'zh' ? '參與推廣達人和排行榜獎勵' : 'Participate in promoting influencers and ranking rewards'}}</div>
</div>
</div>
<div class="txt_box">
<div class="title"><span></span>{{currentLanguage == 'zh' ? '推廣達人獎' : 'Promotion Expert Award'}}</div>
<div>
<div>{{currentLanguage == 'zh' ? '推薦購買3-10人送500積分+空投1個寶箱' : 'Recommended purchase (3-10) people will receive 500 points and 1 treasure chest airdrop'}}</div>
<div>{{currentLanguage == 'zh' ? '推薦購買11-20人送2000積分+空投3個寶箱+空投1個NFT' : 'Recommended purchase: (11-20) people will receive 2000 points+3 treasure chests airdropped+1 NFT airdropped'}}</div>
<div>{{currentLanguage == 'zh' ? '推薦購買21-50人送5000積分+空投5個寶箱+空投2個NFT' : 'Recommended purchase (21-50): Get 5000 points+5 treasure chests airdropped+2 NFTs airdropped'}}</div>
<div>{{currentLanguage == 'zh' ? '推薦購買51-100人送20000積分+空投10個寶箱+空投5個NFT' : 'Recommended purchase (51-100) people will receive 20000 points+airdrop of 10 treasure chests+airdrop of 5 NFTs'}}</div>
<div>{{currentLanguage == 'zh' ? '推薦購買101-200人送50000積分+空投20個寶箱+空投8個NFT' : 'Recommended purchase (101-200): Get 50000 points+airdrop of 20 treasure chests+airdrop of 8 NFTs for free'}}</div>
<div>{{currentLanguage == 'zh' ? '推薦購買201-500人送100000積分+空投30個寶箱+空投15個NFT' : 'Recommended purchase (201-500) people will receive 100000 points+airdrop of 30 treasure chests+airdrop of 15 NFTs'}}</div>
<div>{{currentLanguage == 'zh' ? '推薦購買501以上人送300000積分+空投50個寶箱+空投30個NFT' : 'Recommended purchases (501 or above) will receive 300000 points, 50 treasure chests airdropped, and 30 NFTs airdropped'}}</div>
<div>{{currentLanguage == 'zh' ? '備註以上階梯不重複獎勵比如500以上就是按照最後一檔結算不包含前面階梯獎勵獎勵' : 'Note: The above tiers do not have duplicate rewards. For example, if the reward is over 500, it will be settled according to the last tier and does not include rewards from the previous tiers'}}</div>
</div>
</div>
<div class="txt_box">
<div class="title"><span></span>{{currentLanguage == 'zh' ? '推廣排行榜獎勵' : 'Promotion ranking rewards'}}</div>
<div>
<div>{{currentLanguage == 'zh' ? '第1名 20個BNB+10個NFT+200000積分' : 'First place: 20 BNB+10 NFT+200000 points'}}</div>
<div>{{currentLanguage == 'zh' ? '第2名 15個BNB+7個NFT+150000積分' : '2nd place: 15 BNBs+7 NFTs+150000 points'}}</div>
<div>{{currentLanguage == 'zh' ? '第3名 10個BNB+5個NFT+100000積分' : '3rd place: 10 BNBs+5 NFTs+100000 points'}}</div>
<div>{{currentLanguage == 'zh' ? '第4-10名 5個BNB+2個NFT+50000積分' : '5th place (4-10), 5 BNBs+2 NFTs+50000 points'}}</div>
<div>{{currentLanguage == 'zh' ? '第11-20名 2個BNB+1個NFT+20000積分' : '2nd place (11-20) 2 BNB+1 NFT+20000 points'}}</div>
<div>{{currentLanguage == 'zh' ? '第21-50名 1個BNB+NFT寶箱*3個+10000積分' : 'Place (21-50): 1 BNB+NFT chest * 3+10000 points'}}</div>
<div>{{currentLanguage == 'zh' ? '第51-100名 0.5個BNB+NFT寶箱*2個+5000積分' : 'Place (51-100): 0.5 BNB+NFT chests * 2+5000 points'}}</div>
</div>
</div>
<div style="color: #8D8D8D;">{{currentLanguage == 'zh' ? '註釋積分可以兌換AI Agent 生態平臺幣《輪迴道》是AI Agent 生態引流產品之一NFT寶箱是《輪迴道》遊戲重要道具NFT是《輪迴道》遊戲打金的重要裝備。' : 'Note: Points can be exchanged for AI Agent ecological platform coins, and Samsara Dao is one of the AI Agent ecological drainage products; NFT treasure chest is an important item in the game Samsara Dao; NFT is an important equipment for gold mining in the game Samsara Dao.'}}</div>
</div>
</div>
<!-- BG-SIGN*UP PAGE # 1 END -->
<!-- FOOTER START -->
<div id="publciFooter"></div>
<!-- FOOTER END -->
<!-- 钱包选择弹窗 -->
<el-dialog :visible.sync="moneyDialogVisible" width="40%" custom-class="wallet-dialog">
<div class="wallet-container">
<i class="el-icon-close" @click="moneyDialogVisible = false"></i>
<div class="wallet-left">
<h6 style="font-weight: 700;margin-bottom: 4vh;">{{currentLanguage == 'zh' ? '連接錢包' : 'Connect wallet'}}</h6>
<p class="wallet-tip">
{{ currentLanguage == 'zh' ? '首先,連接以下其中一個錢包。 請務必安全地儲存您的私密金鑰或助記詞,永遠不要與任何人分享它們。' : 'Firstly, connect one of the following wallets. Please make sure to securely store your private keys or mnemonics and never share them with anyone.' }}
</p>
<div class="wallet-grid">
<div v-for="(wallet,index) in wallets" :key="index" class="wallet-item"
@click="selectWallet(wallet)">
<img :src="wallet.icon" :alt="wallet.name">
<span>{{ wallet.name }}</span>
</div>
</div>
</div>
<div class="wallet-right" v-if="selectMoney.icon">
<div class="connecting-status">
<img :src="selectMoney.icon" class="tp-logo">
<p class="status-text">{{ currentLanguage == 'zh' ? '正在打開' : 'Opening' }} {{selectMoney.name}}</p>
<p class="confirm-text">
{{ currentLanguage == 'zh' ? '請在' : 'Please in' }}
{{selectMoney.name}}
{{ currentLanguage == 'zh' ? '中確認' : 'Confirm in the middle' }}</p>
</div>
</div>
<div v-else style="display: flex;justify-content: center;align-items: center;width: 50%;">{{ moneyTip(moneyTipMessage) }}</div>
</div>
</el-dialog>
<!-- 钱包地址弹窗 -->
<el-dialog :visible.sync="showMoneyAdress" width="30%" :close-on-click-modal="false">
<div style="color: #000;">
{{ currentLanguage == 'zh' ? '錢包地址:' : 'Wallet address' }}
{{ userMoneyAdressAll }}
<img src="static/image/fuzhi.png" @click="copyText(userMoneyAdressAll)" style="margin-left: 5px;vertical-align: middle;cursor: pointer;">
</div>
</el-dialog>
</div>
<!-- Back To Top Start -->
<button class="scrollToTopBtn"><i class="fa fa-arrow-up"></i></button>
<!-- Mobile Menu Start -->
<div class="mobile-nav__wrapper">
<div class="mobile-nav__overlay mobile-nav__toggler"></div>
<div class="mobile-nav__content">
<span class="mobile-nav__close mobile-nav__toggler"><i class="fa fa-times"></i></span>
<div class="logo-box">
<a href="index.html" aria-label="logo image"><img src="static/picture/logo.png" alt=""></a>
</div>
<div class="mobile-nav__container"></div>
</div>
</div>
<!-- Mobile Menu End -->
<!-- Jquery Js -->
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/jquery-3.6.3.min.js"></script>
<script src="static/js/jquery-validator.js"></script>
<script src="static/js/publickDOM.js"></script>
<!-- 引入翻譯文件 -->
<script src="static/js/translation.js"></script>
<script src="static/js/i18n.js"></script>
<!-- 獲取用戶信息 -->
<script src="static/js/getIsUser.js"></script>
<!-- 引入 Vue.js -->
<script src="static/js/vue.js" ></script>
<!-- 引入 axios -->
<script src="static/js/axios.min.js"></script>
<!-- 引入 Element UI JS -->
<script src="static/js/element-ui.js"></script>
<script>
// 創建一個增強版的 localStorage
const enhancedStorage = {
setItem: function (key, value) {
localStorage.setItem(key, value);
// 觸發自定義事件
window.dispatchEvent(new CustomEvent('localStorageChange', {
detail: { key, value }
}));
},
getItem: function (key) {
return localStorage.getItem(key);
}
};
// 替換原始的 setItem 方法
const originalSetItem = localStorage.setItem;
localStorage.setItem = function (key, value) {
originalSetItem.call(localStorage, key, value);
window.dispatchEvent(new CustomEvent('localStorageChange', {
detail: { key, value }
}));
};
new Vue({
el: "#app",
data() {
return {
// 钱包登录开始
userMoneyAdressAll:"",
showMoneyAdress:false,
hasAdress:false,
moneyTipMessage:"",
selectMoney:{},
wallets: [
{
name: 'MetaMask',
icon: 'static/metamask.png'
},
{
name: 'TokenPocket',
icon: 'static/tokenpocket.png'
},
{
name: 'OKX Wallet',
icon: 'static/okx-wallet.png'
}
],
moneyDialogVisible: false,
userIsLogin: false,
userMoneyAdress: "",
// 钱包登录结尾
currentLanguage: localStorage.getItem('languageNow') || 'en',
rewardRules: {},
baseUrl,
}
},
async created(){
const user = window.localStorage.getItem("userInfo")
if (user) {
this.userIsLogin = true;
}
// 钱包登录开始
const provider = window.web3?.currentProvider;
let accounts1 = [];
let accounts2 = [];
let accounts3 = [];
if(provider){
accounts1 = await provider.request({method: 'eth_accounts'});
}
if(window.tokenpocket?.ethereum){
accounts2 = await window.tokenpocket.ethereum.request({method: 'eth_accounts'});
}
if(window.okxwallet || (window.ethereum && window.ethereum?.isOKExWallet)){
accounts3 = await window.okxwallet.request({method: 'eth_accounts'});
}
console.log(accounts1,accounts2,accounts3,'see');
let _adressM = accounts1[0] || accounts2[0] || accounts3[0];
if(_adressM){
this.userMoneyAdressAll = _adressM;
this.userMoneyAdress = _adressM.slice(0,4) + "...." + _adressM.slice(-4);
}
// 钱包登录结尾
},
mounted() {
window.addEventListener('localStorageChange', (event) => {
if (event.detail.key === 'languageNow') {
this.currentLanguage = event.detail.value;
}
});
this.getonrules();
},
methods: {
// <-- -------------------------钱包登录开始 --------------------------->
copyText(txt){
let message = this.currentLanguage == 'zh' ? '複製成功!' : 'Copy successful!';
navigator.clipboard.writeText(txt)
.then(()=>{
this.$message.success(message)
})
.catch(err=>{
console.log(err,'error');
})
},
allMoney(){
this.showMoneyAdress = true;
},
userMoneyAdressOptions(adress){
if(adress){
return adress
}else{
return this.currentLanguage == 'zh' ? '連接錢包' : 'Connect wallet'
}
},
moneyTip(txt){
if(txt){
return txt
}else{
return this.currentLanguage == 'zh' ? '請選擇連接錢包' : 'Please choose to connect the wallet'
}
},
selectWallet(wallet) {
this.selectMoney = {};
if(wallet.name == 'MetaMask') {
if(window.web3?.currentProvider){
this.selectMoney = wallet;
this.connectWallet(wallet.name);
}else{
this.moneyTipMessage = this.currentLanguage == 'zh' ? 'MetaMask未安裝' : 'MetaMask not installed';
}
}
if (wallet.name == 'TokenPocket') {
if(window.tokenpocket?.ethereum){
this.selectMoney = wallet;
this.connectWallet(wallet.name);
}else{
this.moneyTipMessage = this.currentLanguage == 'zh' ? 'TokenPocket未安裝' : 'TokenPocket not installed';
}
}
if(wallet.name == "OKX Wallet"){
if(window.okxwallet || (window.ethereum && window.ethereum.isOKExWallet)){
this.selectMoney = wallet;
this.connectWallet(wallet.name);
}else{
this.moneyTipMessage = this.currentLanguage == 'zh' ? '欧易钱包未安装' : 'OKX Wallet not installed';
}
}
},
async connectWallet(walletType){
let account = "";
try {
if (walletType == 'MetaMask') {
const provider = window.web3.currentProvider;
const accounts = await provider.request({
method: 'eth_requestAccounts'
});
account = accounts[0];
}
if (walletType == 'TokenPocket') {
const tpAccounts = await window.tokenpocket.ethereum.request({
method: 'eth_requestAccounts'
});
account = tpAccounts[0];
}
if (walletType == 'OKX Wallet') {
const okxAccounts = await window.okxwallet.request({
method: 'eth_requestAccounts'
});
account = okxAccounts[0];
}
console.log(account,'xxaa');
let _adressM = account;
this.userMoneyAdressAll = account;
this.userMoneyAdress = _adressM.slice(0,4) + "...." + _adressM.slice(-4);
this.moneyDialogVisible = false;
} catch (error) {
console.log(error);
}
},
toConnectWallet() {
if(this.userMoneyAdress){
if(this.isShowSale){
return
}
this.hasAdress = !this.hasAdress;
return
};
this.moneyDialogVisible = true;
},
//<-- -------------------------钱包登录结尾 --------------------------->
mobileLang(){
this.currentLanguage = mobileLang()
},
handleCurrentChange(val) {
this.page = val;
},
async getonrules() {
2025-05-07 13:42:14 +08:00
let res = await publikRequesFunction('api/user/getrewardrule','get',{});
if (res.code == 1) {
this.rewardRules = res.data;
2025-04-19 15:31:22 +08:00
}
},
}
})
</script>
<script src="static/js/app.js"></script>
</body>
<style>
</style>
</html>