修复宝箱助力切换,背景视频不更新问题,修复登录失败问题

This commit is contained in:
yuyongdong 2024-04-24 13:41:26 +08:00
parent d362520ed8
commit 4ec1f8e35b
6 changed files with 25 additions and 17 deletions

Binary file not shown.

View File

@ -53,7 +53,7 @@ datafluxRum.init({
traceType: 'ddtrace', // 非必填默认为ddtrace目前支持 ddtrace、zipkin、skywalking_v3、jaeger、zipkin_single_header、w3c_traceparent 6种类型 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也可以是是正则 allowedTracingOrigins: ['https://api.example.com',/https:\/\/.*\.my-api-domain\.com/], // 非必填允许注入trace采集器所需header头部的所有请求列表。可以是请求的origin也可以是是正则
}); });
datafluxRum.startSessionReplayRecording() // datafluxRum.startSessionReplayRecording()
Vue.config.productionTip = false Vue.config.productionTip = false

View File

@ -1,4 +1,4 @@
// const version = require('./package.json').version // const version = require('./package.json').version
const marketVersion = '1.0.2' const marketVersion = '1.0.3'
export default marketVersion export default marketVersion

View File

@ -66,13 +66,13 @@ export const loginNonce = async (address) => {
return nonce; return nonce;
} }
export const loginWithSignature = async (message, signature, activity) => { export const loginWithSignature = async (message, signature, activity, wallet) => {
let fps = await fp.load(); let fps = await fp.load();
let result = await fps.get() let result = await fps.get()
const clientId = result.clientId; const clientId = result.clientId;
return fetch(`${API_BASE}/api/wallet/login`, { return fetch(`${API_BASE}/api/wallet/login`, {
method: "POST", method: "POST",
body: JSON.stringify({ message, signature, activity,clientId }), body: JSON.stringify({ message, signature, activity,clientId, wallet }),
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },

View File

@ -54,12 +54,7 @@
</div> </div>
<div class="box-btm-con"> <div class="box-btm-con">
<div class="videoContainer" v-if="boxData"> <div class="videoContainer" v-if="boxData">
<video class="fullscreenVideo" id="bgVid" playsinline autoplay muted loop> <video class="fullscreenVideo" id="bgVid" playsinline autoplay muted loop :src="require(`@/assets/video/chest_bg_${videoKey}.mp4`)">
<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> </video>
</div> </div>
<div class="content-no" v-if="!boxData"> <div class="content-no" v-if="!boxData">
@ -321,7 +316,7 @@ export default {
boostingCurrentPage: 1, boostingCurrentPage: 1,
isLoading: false, isLoading: false,
originalNumber: 5, originalNumber: 5,
divisor: 1 divisor: 1,
}; };
}, },
computed: { computed: {
@ -359,6 +354,7 @@ export default {
// //
filteredBoxBar() { filteredBoxBar() {
console.log(this.boxData.bounsCount,this.boxData.maxBounsCount,'====================')
if (this.boxData.bounsCount) { if (this.boxData.bounsCount) {
return Math.floor( return Math.floor(
(Number(this.boxData.bounsCount) / (Number(this.boxData.bounsCount) /
@ -369,6 +365,19 @@ export default {
return 0; 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() { mounted() {
this.token = getToken(); this.token = getToken();
@ -721,8 +730,7 @@ export default {
width: 720px; width: 720px;
height: 700px; height: 700px;
background: #fff; background: #fff;
background: url("./../../assets/box/Bg_chest.png") no-repeat; background: #1a1821;
background-size: 100% 100%;
position: relative; position: relative;
top: -20px; top: -20px;
.videoContainer { .videoContainer {

View File

@ -245,8 +245,8 @@ export class Wallet {
// console.log(chainId, "----"); // console.log(chainId, "----");
const nonce = await loginNonce(address); const nonce = await loginNonce(address);
// console.log(nonce, "nonce-------------"); // 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({ const message = new SiweMessage({
domain: document.location.host, domain: document.location.host,
address: address, address: address,
@ -254,14 +254,14 @@ export class Wallet {
uri: document.location.origin, uri: document.location.origin,
version: '1', version: '1',
statement: process.env.VUE_APP_APP_NAME, statement: process.env.VUE_APP_APP_NAME,
nonce: nonceEncrypt, nonce,
}); });
let msgSign = message.toMessage(); let msgSign = message.toMessage();
let signature = await this.provider.request({ let signature = await this.provider.request({
method: 'personal_sign', method: 'personal_sign',
params: [web3.utils.utf8ToHex(msgSign), address], 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'); // console.log(resLogin.errcode, '61');
if (!resLogin.errcode) { if (!resLogin.errcode) {
new GlobalData().token = resLogin.data.token; new GlobalData().token = resLogin.data.token;