This commit is contained in:
hxhxhx 2025-05-09 18:28:03 +08:00
parent c232a25c5d
commit b836d42102
4 changed files with 40 additions and 13 deletions

View File

@ -524,7 +524,7 @@
let _that = this;
_that.returnGoogleEmail = googleEmail;
$.ajax({
url:"api/user/getgoogleauthurl",
url:baseUrl + "api/user/getgoogleauthurl",
type:"post",
dataType: "json",
data:{
@ -557,7 +557,7 @@
return
}
$.ajax({
url:baseUrl+"api/user/onekeylogin2",
url: baseUrl + "api/user/onekeylogin2",
type:"post",
dataType: "json",
data:{

View File

@ -379,9 +379,9 @@
<p>{{ item.leasetime > 0 ? moment(item.leasetime * 1000).format('YYYY-MM-DD HH:mm:ss') : '' }}</p>
</div>
<div class="btn">
<div class="btn1" v-if="nftStatus == '可售'" @click="transaction(item,1)">{{currentLanguage == 'zh' ?
'交易':'transaction'}}</div>
<div class="btn1" v-if="nftStatus == '可售'" @click="transaction(item,2)">{{currentLanguage == 'zh' ? '租賃':'lease'}}</div>
<div class="btn1" v-if="nftStatus == '在售' && titleactive == 3" @click="removedNft(item)">{{currentLanguage == 'zh' ? '下架':'Removed'}}</div>
<div class="btn1" v-if="nftStatus == '可售'" @click="transaction(item,1)">{{currentLanguage == 'zh' ? '交易':'transaction'}}</div>
<div class="btn1" v-if="nftStatus == '可售'" @click="transaction(item,2)">{{currentLanguage == 'zh' ? '租賃':'lease'}}</div>
<div class="btn2" v-if="nftStatus == '可售'" @click="joinwarehouse(item.id,1)">{{currentLanguage == 'zh' ? '加入倉庫':'Join Warehouse'}}</div>
<div class="btn1" v-if="nftStatus == '在仓库'&& item.status == '在仓库'" @click="joinwarehouse(item.id,2)">{{currentLanguage == 'zh' ? '拿出倉庫':'Take out the warehouse'}}</div>
<div class="btn1" v-if="titleactive == 2 && item.leaseuid == userInfos.id" @click="myNftRenewal(item)">{{currentLanguage == 'zh' ? '續租':'Renewal'}}</div>
@ -1065,6 +1065,29 @@
}
this.loadData();
},
// 下架NFT
removedNft(item) {
let _that = this;
let message = this.currentLanguage == 'zh' ? '是否下架該NFT?下架後將不會返回任何費用?' : 'Do you want to delist the NFT? Will no fees be refunded after delisting?';
let tip = this.currentLanguage == 'zh' ? '提示' : 'tips';
let confirm = this.currentLanguage == 'zh' ? '確定' : 'confirm';
let cancel = this.currentLanguage == 'zh' ? '取消' : 'cancel';
this.$confirm(message,tip,{
confirmButtonText: confirm,
cancelButtonText: cancel,
type: 'warning'
}).then(async () => {
let res = await publikRequesFunction('api/project/undernft','post',{nftid:item.id});
if(res.code === 1){
_that.$message.success("success");
setTimeout(()=>{
_that.loadData()
},1000)
}
}).catch(() => {
_that.$message("Failed");
});
},
// 交易倉庫
transaction(item,n) {
n == 1 ? this.isLease = false : this.isLease = true;

View File

@ -20,7 +20,7 @@ if (userInfo) {
let nowPath = window.location.pathname;
console.log(nowPath,'当前路径');
if(!userInfo && !nowPath.includes('login.html') && !nowPath.includes('signup.html')){
if(!userInfo && !nowPath.includes('login.html') && !nowPath.includes('signup.html') && nowPath.includes('trading.html')){
let language = window.localStorage.getItem("languageNow");
let message = language == 'zh' ? '請先登入或註冊' : 'Please log in or register first';
const html ="<div id='customizeBox' class='customize-message-box'><p>" + message + "</p></div>"
@ -38,6 +38,10 @@ if(window.location.host === 'www.samsaradao.com'){
baseUrl = "https://www.samsaradao.com/"
}
let nowToken = "";
if(window.localStorage.getItem("userInfo")){
nowToken = JSON.parse(window.localStorage.getItem("userInfo")).token
}
function publikRequesFunction(api,type,params){
return new Promise((resolve, reject) => {
@ -46,7 +50,7 @@ function publikRequesFunction(api,type,params){
type: type,
dataType: "json",
headers:{
token: JSON.parse(window.localStorage.getItem("userInfo")).token,
token: nowToken,
},
data: params,
success(res) {

View File

@ -202,14 +202,14 @@
</div>
</div>
</el-collapse-item>
<el-collapse-item :title="currentLanguage == 'zh' ? '等級' : 'grade'" name="2">
<!-- <el-collapse-item :title="currentLanguage == 'zh' ? '等級' : 'grade'" name="2">
<div class="c_m_l_type">
<div>70</div>
<div>60</div>
<div>50</div>
<div>40</div>
</div>
</el-collapse-item>
</el-collapse-item> -->
</el-collapse>
</div>
<div class="cp_main_right">
@ -273,14 +273,14 @@
</div>
</div>
</el-collapse-item>
<el-collapse-item :title="currentLanguage == 'zh' ? '等級' : 'grade'" name="2">
<!-- <el-collapse-item :title="currentLanguage == 'zh' ? '等級' : 'grade'" name="2">
<div class="c_m_l_type">
<div>70</div>
<div>60</div>
<div>50</div>
<div>40</div>
</div>
</el-collapse-item>
</el-collapse-item> -->
</el-collapse>
</div>
<div class="cp_main_right">
@ -354,14 +354,14 @@
</div>
</div>
</el-collapse-item>
<el-collapse-item :title="currentLanguage == 'zh' ? '等級' : 'grade'" name="2">
<!-- <el-collapse-item :title="currentLanguage == 'zh' ? '等級' : 'grade'" name="2">
<div class="c_m_l_type">
<div>70</div>
<div>60</div>
<div>50</div>
<div>40</div>
</div>
</el-collapse-item>
</el-collapse-item> -->
</el-collapse>
</div>
<div class="cp_main_right nft_purchase card-container">