修复宝箱助力切换,背景视频不更新问题,修复登录失败问题
This commit is contained in:
parent
d362520ed8
commit
4ec1f8e35b
Binary file not shown.
@ -53,7 +53,7 @@ datafluxRum.init({
|
||||
traceType: 'ddtrace', // 非必填,默认为ddtrace,目前支持 ddtrace、zipkin、skywalking_v3、jaeger、zipkin_single_header、w3c_traceparent 6种类型
|
||||
allowedTracingOrigins: ['https://api.example.com',/https:\/\/.*\.my-api-domain\.com/], // 非必填,允许注入trace采集器所需header头部的所有请求列表。可以是请求的origin,也可以是是正则
|
||||
});
|
||||
datafluxRum.startSessionReplayRecording()
|
||||
// datafluxRum.startSessionReplayRecording()
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// const version = require('./package.json').version
|
||||
|
||||
const marketVersion = '1.0.2'
|
||||
const marketVersion = '1.0.3'
|
||||
export default marketVersion
|
@ -66,13 +66,13 @@ export const loginNonce = async (address) => {
|
||||
return nonce;
|
||||
}
|
||||
|
||||
export const loginWithSignature = async (message, signature, activity) => {
|
||||
export const loginWithSignature = async (message, signature, activity, wallet) => {
|
||||
let fps = await fp.load();
|
||||
let result = await fps.get()
|
||||
const clientId = result.clientId;
|
||||
return fetch(`${API_BASE}/api/wallet/login`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ message, signature, activity,clientId }),
|
||||
body: JSON.stringify({ message, signature, activity,clientId, wallet }),
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
|
@ -54,12 +54,7 @@
|
||||
</div>
|
||||
<div class="box-btm-con">
|
||||
<div class="videoContainer" v-if="boxData">
|
||||
<video class="fullscreenVideo" id="bgVid" playsinline autoplay muted loop>
|
||||
<source v-if="filteredBoxBar <= 20" src="@/assets/video/chest_bg_1.mp4" type="video/mp4" />
|
||||
<source v-else-if="filteredBoxBar <= 40" src="@/assets/video/chest_bg_2.mp4" type="video/mp4">
|
||||
<source v-else-if="filteredBoxBar <= 60" src="@/assets/video/chest_bg_3.mp4" type="video/mp4">
|
||||
<source v-else-if="filteredBoxBar <= 80" src="@/assets/video/chest_bg_4.mp4" type="video/mp4">
|
||||
<source v-else-if="filteredBoxBar <= 100" src="@/assets/video/chest_bg_5.mp4" type="video/mp4">
|
||||
<video class="fullscreenVideo" id="bgVid" playsinline autoplay muted loop :src="require(`@/assets/video/chest_bg_${videoKey}.mp4`)">
|
||||
</video>
|
||||
</div>
|
||||
<div class="content-no" v-if="!boxData">
|
||||
@ -321,7 +316,7 @@ export default {
|
||||
boostingCurrentPage: 1,
|
||||
isLoading: false,
|
||||
originalNumber: 5,
|
||||
divisor: 1
|
||||
divisor: 1,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -359,6 +354,7 @@ export default {
|
||||
|
||||
// 助力进度条
|
||||
filteredBoxBar() {
|
||||
console.log(this.boxData.bounsCount,this.boxData.maxBounsCount,'====================')
|
||||
if (this.boxData.bounsCount) {
|
||||
return Math.floor(
|
||||
(Number(this.boxData.bounsCount) /
|
||||
@ -369,6 +365,19 @@ export default {
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
videoKey() {
|
||||
if(this.filteredBoxBar <= 20) {
|
||||
return 1
|
||||
} else if(this.filteredBoxBar <= 40) {
|
||||
return 2
|
||||
} else if(this.filteredBoxBar <= 60) {
|
||||
return 3
|
||||
} else if(this.filteredBoxBar <= 80) {
|
||||
return 4
|
||||
} else if(this.filteredBoxBar <= 100) {
|
||||
return 5
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.token = getToken();
|
||||
@ -721,8 +730,7 @@ export default {
|
||||
width: 720px;
|
||||
height: 700px;
|
||||
background: #fff;
|
||||
background: url("./../../assets/box/Bg_chest.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background: #1a1821;
|
||||
position: relative;
|
||||
top: -20px;
|
||||
.videoContainer {
|
||||
|
@ -245,8 +245,8 @@ export class Wallet {
|
||||
// console.log(chainId, "----");
|
||||
const nonce = await loginNonce(address);
|
||||
// console.log(nonce, "nonce-------------");
|
||||
const nonceStr = `${nonce}| ${walletType}`;
|
||||
const nonceEncrypt = hexToBase58(aesEncrypt(nonceStr, 'uaw_activity'));
|
||||
|
||||
// const nonceEncrypt = hexToBase58(aesEncrypt(nonceStr, 'uaw_activity'));
|
||||
const message = new SiweMessage({
|
||||
domain: document.location.host,
|
||||
address: address,
|
||||
@ -254,14 +254,14 @@ export class Wallet {
|
||||
uri: document.location.origin,
|
||||
version: '1',
|
||||
statement: process.env.VUE_APP_APP_NAME,
|
||||
nonce: nonceEncrypt,
|
||||
nonce,
|
||||
});
|
||||
let msgSign = message.toMessage();
|
||||
let signature = await this.provider.request({
|
||||
method: 'personal_sign',
|
||||
params: [web3.utils.utf8ToHex(msgSign), address],
|
||||
});
|
||||
let resLogin = await loginWithSignature(message, signature, activityList.activity);
|
||||
let resLogin = await loginWithSignature(message, signature, activityList.activity, walletType);
|
||||
// console.log(resLogin.errcode, '61');
|
||||
if (!resLogin.errcode) {
|
||||
new GlobalData().token = resLogin.data.token;
|
||||
|
Loading…
x
Reference in New Issue
Block a user