Skip to content

feat: 去除点击XRFrame弹窗 #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions miniprogram/packageXRFrame/pages/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import '../../xr-custom/assets/effect-last-record-final'

import list from './data/index'

let lastOpened = false
let lastCount = 0
let first = true

Page({
Expand Down Expand Up @@ -52,7 +50,6 @@ Page({
}

if (path === '/pages/scene-last-record/index') {
this.handleLastRecord()
return
}

Expand All @@ -65,50 +62,5 @@ Page({
},
})
}
},
async handleLastRecord() {
if (lastOpened) {
return
}

lastCount += 1
// if (Math.random() >= (0.34 + lastCount * 0.1)) {
// return;
// }

const root = this.data.root
lastOpened = true

wx.request({
url: 'https://mmbizwxaminiprogram-1258344707.cos.ap-guangzhou.myqcloud.com/xr-frame/demo/xr-frame-team/last-gate.txt',
success(res) {
wx.showModal({
title: '一把钥匙',
content: res.data,
confirmText: '探寻真实',
cancelText: '放下钥匙',
success(res) {
if (res.cancel) {
wx.onAppShow((result) => {
lastOpened = false
})
return
}

wx.navigateTo({
url: root + '/pages/scene-last-record/index',
success: () => {
wx.onAppShow((result) => {
lastOpened = false
})
}
})
}
})
},
fail(err) {
lastOpened = false
}
})
}
})
2 changes: 1 addition & 1 deletion miniprogram/packageXRFrame/pages/index/index.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<scroll-view class="main" scroll-y="{{true}}">
<view class="slogen-wrap" bind:tap="handleLastRecord">
<view class="slogen-wrap">
<view class="slogen">XR<view class="special">Frame</view></view>
<view class="intro">
小程序低成本高性能XR解决方案
Expand Down
Loading