diff --git a/login.html b/login.html
index 97352fb..85d05cf 100644
--- a/login.html
+++ b/login.html
@@ -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:{
diff --git a/nft.html b/nft.html
index 1d545d3..cc07614 100644
--- a/nft.html
+++ b/nft.html
@@ -379,9 +379,9 @@
{{ item.leasetime > 0 ? moment(item.leasetime * 1000).format('YYYY-MM-DD HH:mm:ss') : '' }}
-
{{currentLanguage == 'zh' ?
- '交易':'transaction'}}
-
{{currentLanguage == 'zh' ? '租賃':'lease'}}
+
{{currentLanguage == 'zh' ? '下架':'Removed'}}
+
{{currentLanguage == 'zh' ? '交易':'transaction'}}
+
{{currentLanguage == 'zh' ? '租賃':'lease'}}
{{currentLanguage == 'zh' ? '加入倉庫':'Join Warehouse'}}
{{currentLanguage == 'zh' ? '拿出倉庫':'Take out the warehouse'}}
{{currentLanguage == 'zh' ? '續租':'Renewal'}}
@@ -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;
diff --git a/static/js/getIsUser.js b/static/js/getIsUser.js
index d790164..c52c725 100644
--- a/static/js/getIsUser.js
+++ b/static/js/getIsUser.js
@@ -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 ="
"
@@ -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) {
diff --git a/trading-detail.html b/trading-detail.html
index 3327cb4..869abd5 100644
--- a/trading-detail.html
+++ b/trading-detail.html
@@ -202,14 +202,14 @@
-