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
9b243cbf
Commit
9b243cbf
authored
Nov 04, 2025
by
劳琪峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 活动页>内置url改用请求的url的origin
parent
4d5d6375
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
request.js
api/request.js
+6
-6
index.vue
pages/activity/index.vue
+12
-10
No files found.
api/request.js
View file @
9b243cbf
...
@@ -15,12 +15,12 @@ const {
...
@@ -15,12 +15,12 @@ const {
// request.js
// request.js
// 通常可以吧 baseUrl 单独放在一个 js 文件了
// 通常可以吧 baseUrl 单独放在一个 js 文件了
// const baseUrl = "http://172.16.230.108:7777/pmall";
//
export
const baseUrl = "http://172.16.230.108:7777/pmall";
// const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
//
export
const baseUrl = "https://momclub-uat.feihe.com/pmall";//测试环境
//
const baseUrl = "https://momclub-test.feihe.com/pmall";//测试环境2
export
const
baseUrl
=
"https://momclub-test.feihe.com/pmall"
;
//测试环境2
const
baseUrl
=
"https://momclub.feihe.com/pmall"
;
//生产环境
// export
const baseUrl = "https://momclub.feihe.com/pmall";//生产环境
// const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
//
export
const baseUrl = "https://docs.dui88.com/mock/1956/api";//mock
// const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
//
export
const baseUrl = "https://feihe.m.duibatest.com.cn/pmall"
const
request
=
(
options
=
{})
=>
{
const
request
=
(
options
=
{})
=>
{
// 在这里可以对请求头进行一些设置
// 在这里可以对请求头进行一些设置
...
...
pages/activity/index.vue
View file @
9b243cbf
...
@@ -3,11 +3,12 @@
...
@@ -3,11 +3,12 @@
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ref
,
watch
,
nextTick
}
from
"vue"
;
import
{
ref
,
watch
,
nextTick
,
computed
}
from
"vue"
;
import
{
onLoad
,
onShow
,
onShareAppMessage
,
onShareTimeline
}
from
"@dcloudio/uni-app"
;
import
{
onLoad
,
onShow
,
onShareAppMessage
,
onShareTimeline
}
from
"@dcloudio/uni-app"
;
import
{
useGlobalStore
}
from
"../../stores/global"
;
import
{
useGlobalStore
}
from
"@/stores/global"
;
import
{
useUserStore
}
from
"../../stores/user"
;
import
{
useUserStore
}
from
"@/stores/user"
;
import
{
jump
,
JumpType
}
from
"../../utils"
;
import
{
jump
,
JumpType
}
from
"@/utils"
;
import
{
baseUrl
as
requestBaseUrl
}
from
"@/api/request"
;
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
();
const
globalStore
=
useGlobalStore
()
const
globalStore
=
useGlobalStore
()
...
@@ -21,14 +22,15 @@ const src = ref("")
...
@@ -21,14 +22,15 @@ const src = ref("")
const
registered
=
ref
(
undefined
)
const
registered
=
ref
(
undefined
)
const
urlMap
=
{
const
urlMap
=
{
//'main': 'http://192.168.0.5:8001/#/page',
'main'
:
'/h5/#/page'
,
'main'
:
'https://momclub.feihe.com/h5/#/page'
,
//'main': 'https://momclub-test.feihe.com/h5/#/page',
//'main': 'https://momclub-uat.feihe.com/h5/#/page',
};
};
const
shareData
=
ref
(
null
)
const
shareData
=
ref
(
null
)
const
baseUrl
=
computed
(()
=>
{
return
requestBaseUrl
.
substring
(
0
,
requestBaseUrl
.
indexOf
(
'/'
,
'http'
.
length
+
4
))
})
const
handleBack
=
()
=>
{
const
handleBack
=
()
=>
{
try
{
try
{
uni
.
navigateBack
({
uni
.
navigateBack
({
...
@@ -51,7 +53,7 @@ const handleBack = () => {
...
@@ -51,7 +53,7 @@ const handleBack = () => {
async
function
ensureAutoLogin
()
{
async
function
ensureAutoLogin
()
{
//debugger
//debugger
//if (!globalStore.cuk) {
//if (!globalStore.cuk) {
await
userStore
.
normalAutoLogin
()
await
userStore
.
normalAutoLogin
()
//}
//}
}
}
...
@@ -108,7 +110,7 @@ function initOk() {
...
@@ -108,7 +110,7 @@ function initOk() {
if
(
options
.
type
)
{
if
(
options
.
type
)
{
const
type
=
options
.
type
;
const
type
=
options
.
type
;
url
=
urlMap
[
type
];
url
=
baseUrl
.
value
+
urlMap
[
type
];
}
else
if
(
options
.
url
)
{
}
else
if
(
options
.
url
)
{
url
=
decodeURIComponent
(
options
.
url
)
url
=
decodeURIComponent
(
options
.
url
)
}
}
...
...
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