Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dd21b3d9
authored
Jan 19, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复
1 parent
bae41163
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
7 deletions
api/env/index.js
packageActivity/pages/redEnvelope/index/index.js
packageActivity/pages/redEnvelope/index/index.wxml
project.config.json
router/router.js
api/env/index.js
View file @
dd21b3d
import
{
preReleaseAppId
}
from
'~/config'
const
target
=
[
'ip'
,
'dev'
,
'uat'
,
'prod'
,
'preRelease'
]
let
index
=
1
let
index
=
2
/**
*
...
...
packageActivity/pages/redEnvelope/index/index.js
View file @
dd21b3d
...
...
@@ -35,6 +35,7 @@ Page({
const
{
options
}
=
this
console
.
log
(
this
.
options
)
if
(
options
.
isLogin
)
this
.
getRedEnvelopeH5
()
else
this
.
jumpLoading
()
//直接打开时跳转、防止sessionId失效
},
...
...
@@ -51,7 +52,10 @@ Page({
source
,
linkId
}
=
this
.
options
if
(
!
activityId
)
activityId
=
id
if
(
!
activityId
)
{
activityId
=
id
this
.
options
.
activityId
=
id
}
if
(
!
userInfo
.
nickName
)
return
this
.
getNickNameAndHeadUrl
()
try
{
const
{
...
...
@@ -164,9 +168,10 @@ Page({
this
.
setData
({
isJump
:
true
,
show
:
false
,
// url: `${domain}/scrm-wx-red-packet/#/redEnvelope?activityId=${activityId}&merchantId=${merchantId}&sessionId=${sessionId}&userInfo=${user}` //测试、预发布、生产
url
:
`
${
domain
}
/dj-scrm-wx-work-main-lwk/#/?
${
this
.
linkQuery
}
`
//开发环境
})
let
url
=
`
${
domain
}
/scrm-wx-red-packet/#/redEnvelope?
${
this
.
linkQuery
}
`
//测试、预发布、生产
// url: `${domain}/dj-scrm-wx-work-main-lwk/#/?${this.linkQuery}` //开发环境
wx
.
p
.
router
.
redirectToH5
(
url
)
},
/**
* 生命周期函数--监听页面隐藏
...
...
packageActivity/pages/redEnvelope/index/index.wxml
View file @
dd21b3d
<web-view src="{{url}}" />
<!-- 红包会员弹窗 -->
<block wx:if="{{show}}">
<view class="member-dialog">
...
...
project.config.json
View file @
dd21b3d
...
...
@@ -27,5 +27,5 @@
"ignore"
:
[],
"include"
:
[]
},
"appid"
:
"wx
b818f6bc908c52fc
"
"appid"
:
"wx
39a574d259fe58a0
"
}
\ No newline at end of file
router/router.js
View file @
dd21b3d
...
...
@@ -17,6 +17,18 @@ class Router {
});
});
}
/**关闭当前页面跳转H5 */
redirectToH5
(
url
,
notIntercept
)
{
if
(
notIntercept
)
wx
.
redirectTo
({
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
url
)}
`
,
})
else
this
.
intercept
(
url
).
then
((
response
)
=>
{
if
(
response
)
return
;
wx
.
redirectTo
({
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
url
)}
`
,
});
});
}
/**
* 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 ||
* 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 $router.back() 可以返回到原页面。小程序中页面栈最多十层
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment