Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
group-buy-ui
Commits
ef4cb324
Commit
ef4cb324
authored
Sep 24, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更改api地址
parent
08fc1cb1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
2 deletions
+47
-2
index.vue
src/views/goodsDetail/index.vue
+47
-2
No files found.
src/views/goodsDetail/index.vue
View file @
ef4cb324
...
@@ -195,7 +195,10 @@ import groupDescInfo from './components/groupDescInfo';
...
@@ -195,7 +195,10 @@ import groupDescInfo from './components/groupDescInfo';
import
{
mapState
}
from
'
vuex
'
;
import
{
mapState
}
from
'
vuex
'
;
import
sharePic
from
'
@/components/sharePic
'
;
import
sharePic
from
'
@/components/sharePic
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
goodsCheckMixin
from
'
@/mixins/goodsCheck.mixin
'
;
// import goodsCheckMixin from '@/mixins/goodsCheck.mixin';
import
Bridge
from
'
@qg/js-bridge
'
;
import
MpBridge
from
'
@/service/mp
'
;
import
{
isWxMp
,
isApp
}
from
'
@/service/validation.service
'
;
export
default
{
export
default
{
// eslint-disable-next-line vue/name-property-casing
// eslint-disable-next-line vue/name-property-casing
name
:
'
goodDetail
'
,
name
:
'
goodDetail
'
,
...
@@ -213,7 +216,7 @@ export default {
...
@@ -213,7 +216,7 @@ export default {
filters
:
{
filters
:
{
Img2Thumb
Img2Thumb
},
},
mixins
:
[
goodsCheckMixin
],
//
mixins: [goodsCheckMixin],
data
()
{
data
()
{
return
{
return
{
timestemp
:
''
,
// 大活动结束时间
timestemp
:
''
,
// 大活动结束时间
...
@@ -284,6 +287,48 @@ export default {
...
@@ -284,6 +287,48 @@ export default {
},
5000
);
},
5000
);
},
},
methods
:
{
methods
:
{
getToken
()
{
window
.
xyqbNativeEvent
=
function
(
res
)
{
const
json
=
typeof
res
===
'
string
'
?
JSON
.
parse
(
res
)
:
res
;
if
(
json
.
event
===
'
getTokenSuccess
'
)
{
const
appData
=
json
.
data
||
{};
if
(
appData
&&
appData
.
token
)
{
localStorage
.
set
(
'
vccToken
'
,
appData
.
token
);
window
.
location
.
reload
();
}
}
};
this
.
nativeBridge
.
getToken
();
},
checkLogin
()
{
const
vccToken
=
localStorage
.
get
(
'
vccToken
'
);
const
needLogin
=
vccToken
?
false
:
true
;
if
(
needLogin
)
{
if
(
isApp
)
this
.
nativeBridge
=
new
Bridge
();
else
if
(
isWxMp
)
this
.
nativeBridge
=
new
MpBridge
();
this
.
$dialog
({
message
:
'
参与拼团活动需要您先进行登录哦~
'
,
title
:
''
,
showCancelButton
:
false
,
confirmButtonText
:
'
登录
'
,
onConfirm
:
()
=>
{
if
(
isWxMp
)
{
this
.
nativeBridge
.
getToken
();
}
else
if
(
isApp
)
{
// native调用getToken
this
.
getToken
();
}
else
{
this
.
$dialog
({
message
:
'
请在App或小程序中参与活动~
'
,
title
:
''
,
showCancelButton
:
false
,
confirmButtonText
:
'
我知道了
'
});
}
}
});
}
},
onChange
(
index
)
{
onChange
(
index
)
{
this
.
swiperCurrent
=
index
;
this
.
swiperCurrent
=
index
;
},
},
...
...
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