Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
c16dc3ca
Commit
c16dc3ca
authored
Sep 12, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jump
parent
5afe63e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
39 deletions
+50
-39
lottery.vue
activity0915/lottery/lottery.vue
+50
-39
No files found.
activity0915/lottery/lottery.vue
View file @
c16dc3ca
...
...
@@ -5,7 +5,7 @@
<image
class=
"back-btn"
:src=
"$baseUrl + 'xingmaLab/1001/backBtn.png'"
mode=
"aspectFit"
@
click=
"handleBack"
/>
</view>
<view
class=
"lotterypageCon"
>
<span
class=
"lotterypagebg"
:style=
"
{ backgroundImage: `url(${$baseUrl}${getImageUrl(config.images.background)})` }">
</span>
...
...
@@ -126,6 +126,7 @@ import DrawSucModal from './components/drawSucModal/drawSucModal.vue'
import
DrawFailModal
from
'./components/drawFailModal/drawFailModal.vue'
import
{
getAct915LotteryDraw
,
getAct915LotteryInfo
,
fetchAct915LotteryJSON
}
from
'../../api/activity0915/index.js'
import
md
from
'../../md.js'
import
{
jump
}
from
'../../utils/index.js'
// 组件名称
defineOptions
({
...
...
@@ -234,7 +235,7 @@ const handleBack = () => {
// componentName: "返回按钮",
// componentContent: "返回"
// });
try
{
uni
.
navigateBack
({
delta
:
1
,
...
...
@@ -282,45 +283,55 @@ const handleAwardClick = () => {
componentName
:
"抽奖板块"
,
componentContent
:
"奖品"
});
// 根据环境获取对应的appId
const
getAppId
=
()
=>
{
// 可以根据实际环境判断
// uat2: wxabebc35e71e66795
// test2: wx18428fc8a569a3c7
// 生产: wx4205ec55b793245e
// 这里可以根据实际需求调整环境判断逻辑
// 例如:根据域名、配置等判断当前环境
const
currentEnv
=
'prod'
// 可以动态获取
const
appIdMap
=
{
'uat2'
:
'wxabebc35e71e66795'
,
'test2'
:
'wx18428fc8a569a3c7'
,
'prod'
:
'wx4205ec55b793245e'
}
return
appIdMap
[
currentEnv
]
||
appIdMap
[
'uat2'
]
// 默认uat2环境
}
const
appId
=
getAppId
()
const
path
=
'/subPackages/xmhMainProcess/mine/index'
uni
.
navigateToMiniProgram
({
appId
:
appId
,
path
:
path
,
extraData
:
{},
envVersion
:
'release'
,
// 可以根据环境调整:develop, trial, release
success
:
(
res
)
=>
{
console
.
log
(
'跳转小程序成功:'
,
res
)
},
fail
:
(
err
)
=>
{
console
.
error
(
'跳转小程序失败:'
,
err
)
// uni.showToast({
// title: '跳转失败',
// icon: 'none'
// })
// // 根据环境获取对应的appId
// const getAppId = () => {
// // 可以根据实际环境判断
// // uat2: wxabebc35e71e66795
// // test2: wx18428fc8a569a3c7
// // 生产: wx4205ec55b793245e
// // 这里可以根据实际需求调整环境判断逻辑
// // 例如:根据域名、配置等判断当前环境
// const currentEnv = 'prod' // 可以动态获取
// const appIdMap = {
// 'uat2': 'wxabebc35e71e66795',
// 'test2': 'wx18428fc8a569a3c7',
// 'prod': 'wx4205ec55b793245e'
// }
// return appIdMap[currentEnv] || appIdMap['uat2'] // 默认uat2环境
// }
jump
({
type
:
JumpType
.
MINI
,
url
:
'/subPackages/xmhMainProcess/mine/index'
,
extra
:
{
appId
:
'wx4205ec55b793245e'
,
envVersion
:
'release'
}
})
// const appId = getAppId()
// const path = '/subPackages/xmhMainProcess/mine/index'
// uni.navigateToMiniProgram({
// appId: appId,
// path: path,
// extraData: {},
// envVersion: 'release', // 可以根据环境调整:develop, trial, release
// success: (res) => {
// console.log('跳转小程序成功:', res)
// },
// fail: (err) => {
// console.error('跳转小程序失败:', err)
// // uni.showToast({
// // title: '跳转失败',
// // icon: 'none'
// // })
// }
// })
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment