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
de5c53ba
Commit
de5c53ba
authored
Sep 28, 2021
by
beisir
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy
parents
a5adf604
c9e582dc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
20 deletions
+41
-20
sharePic.vue
src/components/sharePic.vue
+6
-6
goodsCheck.mixin.js
src/mixins/goodsCheck.mixin.js
+5
-4
init.service.js
src/service/init.service.js
+6
-10
sessionStorage.service.js
src/service/sessionStorage.service.js
+23
-0
index.vue
src/views/goodsDetail/index.vue
+1
-0
No files found.
src/components/sharePic.vue
View file @
de5c53ba
...
@@ -102,9 +102,9 @@
...
@@ -102,9 +102,9 @@
style=
"width: 653px;font-size: 34px;padding-left: 32px;margin-right: 10px;"
style=
"width: 653px;font-size: 34px;padding-left: 32px;margin-right: 10px;"
>
>
<span
class=
"groupPriceContainer"
>
拼团价 ¥
</span>
<span
class=
"groupPriceContainer"
>
拼团价 ¥
</span>
<span
class=
"groupPrice"
style=
"font-size: 64px;margin-right: 1
0
px;"
>
¥0
</span>
<span
class=
"groupPrice"
style=
"font-size: 64px;margin-right: 1
5
px;"
>
¥0
</span>
<span
class=
"salePrice"
style=
"line-height: 134px;font-size: 34px;"
<span
class=
"salePrice"
style=
"line-height: 134px;font-size: 34px;"
>
¥{{ sharePicData.activityPrice }}
</span
>
售价
¥{{ sharePicData.activityPrice }}
</span
>
>
</div>
</div>
<div
class=
"skuSuccess"
>
<div
class=
"skuSuccess"
>
...
@@ -375,10 +375,10 @@ body {
...
@@ -375,10 +375,10 @@ body {
display: inline-block;
display: inline-block;
color: @white;
color: @white;
}
}
.skuImg .skuInfo .skuPrice .salePrice {
//
.skuImg .skuInfo .skuPrice .salePrice {
text-decoration: line-through;
//
text-decoration: line-through;
font-weight: lighter;
//
font-weight: lighter;
}
//
}
.skuImg .skuInfo .skuSuccess {
.skuImg .skuInfo .skuSuccess {
flex: 1;
flex: 1;
flex-shrink: 0;
flex-shrink: 0;
...
...
src/mixins/goodsCheck.mixin.js
View file @
de5c53ba
...
@@ -2,7 +2,7 @@ import Bridge from '@qg/js-bridge';
...
@@ -2,7 +2,7 @@ import Bridge from '@qg/js-bridge';
import
MpBridge
from
'
@/service/mp
'
;
import
MpBridge
from
'
@/service/mp
'
;
import
{
isWxMp
,
isApp
}
from
'
@/service/validation.service
'
;
import
{
isWxMp
,
isApp
}
from
'
@/service/validation.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
cookies
from
'
@/service/cookie
Storage.service
'
;
import
sessionStorage
from
'
@/service/session
Storage.service
'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -18,8 +18,10 @@ export default {
...
@@ -18,8 +18,10 @@ export default {
const
appData
=
json
.
data
||
{};
const
appData
=
json
.
data
||
{};
if
(
appData
&&
appData
.
token
)
{
if
(
appData
&&
appData
.
token
)
{
localStorage
.
set
(
'
vccToken
'
,
appData
.
token
);
localStorage
.
set
(
'
vccToken
'
,
appData
.
token
);
cookies
.
set
(
'
vccToken
'
,
appData
.
token
);
sessionStorage
.
set
(
'
vccToken
'
,
appData
.
token
);
// window.sessionStorage.setItem('vccToken', appData.token);
// const query = JSON.parse(JSON.stringify(_this.$route.query));
// const name = _this.$route.name;p
// query.vccToken = appData.token;
_this
.
$nextTick
(()
=>
{
_this
.
$nextTick
(()
=>
{
window
.
location
.
reload
();
window
.
location
.
reload
();
});
});
...
@@ -30,7 +32,6 @@ export default {
...
@@ -30,7 +32,6 @@ export default {
},
},
checkLogin
()
{
checkLogin
()
{
const
vccToken
=
localStorage
.
get
(
'
vccToken
'
);
const
vccToken
=
localStorage
.
get
(
'
vccToken
'
);
this
.
$toast
(
vccToken
);
const
needLogin
=
vccToken
?
false
:
true
;
const
needLogin
=
vccToken
?
false
:
true
;
if
(
needLogin
)
{
if
(
needLogin
)
{
if
(
isApp
)
this
.
nativeBridge
=
new
Bridge
();
if
(
isApp
)
this
.
nativeBridge
=
new
Bridge
();
...
...
src/service/init.service.js
View file @
de5c53ba
...
@@ -5,18 +5,17 @@ import store from '../store';
...
@@ -5,18 +5,17 @@ import store from '../store';
import
{
isWechat
,
isApp
,
isAndroid
,
isIOS
}
from
'
./validation.service
'
;
import
{
isWechat
,
isApp
,
isAndroid
,
isIOS
}
from
'
./validation.service
'
;
import
Cookies
from
'
./cookieStorage.service
'
;
import
Cookies
from
'
./cookieStorage.service
'
;
import
localStorage
from
'
./localStorage.service
'
;
import
localStorage
from
'
./localStorage.service
'
;
import
sessionStorage
from
'
./sessionStorage.service
'
;
// import { Toast } from '@qg/cherry-ui';
// import { Toast } from '@qg/cherry-ui';
export
default
{
export
default
{
// token校验,整个流程都是登陆后的
// token校验,整个流程都是登陆后的
init
:
router
=>
{
init
:
router
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
(
!
to
.
query
.
vccToken
);
// if (!to.query.vccToken) {
// to.query.vccToken = Cookies.get('vccToken') || '';
// }
localStorage
.
remove
(
'
vccToken
'
);
Cookies
.
set
(
'
h
'
,
0
);
Cookies
.
set
(
'
h
'
,
0
);
if
(
!
to
.
query
.
vccToken
)
{
to
.
query
.
vccToken
=
sessionStorage
.
get
(
'
vccToken
'
)
||
''
;
}
// 所有自定义路由字段在此处理
// 所有自定义路由字段在此处理
const
{
meta
}
=
to
;
const
{
meta
}
=
to
;
isWechat
&&
localStorage
.
set
(
'
vccChannel
'
,
'
159913
'
);
isWechat
&&
localStorage
.
set
(
'
vccChannel
'
,
'
159913
'
);
...
@@ -29,16 +28,13 @@ export default {
...
@@ -29,16 +28,13 @@ export default {
const
value
=
to
.
query
[
item
];
const
value
=
to
.
query
[
item
];
if
(
item
===
'
vccToken
'
&&
value
===
''
)
{
if
(
item
===
'
vccToken
'
&&
value
===
''
)
{
localStorage
.
remove
(
'
vccToken
'
);
localStorage
.
remove
(
'
vccToken
'
);
Cookies
.
remove
(
'
vccToken
'
);
sessionStorage
.
remove
(
item
);
}
}
if
(
value
&&
value
!==
'
{token}
'
&&
value
!==
'
{vccToken}
'
)
{
if
(
value
&&
value
!==
'
{token}
'
&&
value
!==
'
{vccToken}
'
)
{
console
.
log
(
item
,
value
);
localStorage
.
set
(
item
,
value
);
localStorage
.
set
(
item
,
value
);
Cookies
.
set
(
item
,
value
);
sessionStorage
.
set
(
item
,
value
);
}
}
});
});
// alert(Cookies.get('vccToken'));
localStorage
.
set
(
'
vccToken
'
,
Cookies
.
get
(
'
vccToken
'
)
||
''
);
(
isWechat
||
isApp
||
Cookies
.
get
(
'
h
'
)
===
'
0
'
)
&&
store
.
commit
(
'
CHANGE_HEADER
'
,
false
);
// 改变header
(
isWechat
||
isApp
||
Cookies
.
get
(
'
h
'
)
===
'
0
'
)
&&
store
.
commit
(
'
CHANGE_HEADER
'
,
false
);
// 改变header
document
.
body
.
className
=
store
.
state
.
pay
.
header
?
'
has-header
'
:
''
;
document
.
body
.
className
=
store
.
state
.
pay
.
header
?
'
has-header
'
:
''
;
store
.
commit
(
'
CHANGE_TITLE
'
,
meta
?.
title
);
// 改变title
store
.
commit
(
'
CHANGE_TITLE
'
,
meta
?.
title
);
// 改变title
...
...
src/service/sessionStorage.service.js
0 → 100644
View file @
de5c53ba
export
default
{
get
(
key
)
{
let
result
=
window
.
sessionStorage
.
getItem
(
key
);
try
{
return
JSON
.
parse
(
result
);
}
catch
(
e
)
{
return
result
;
}
},
set
(
key
,
value
)
{
let
toString
=
Object
.
prototype
.
toString
;
if
(
toString
.
call
(
value
)
===
'
[object Array]
'
||
toString
.
call
(
value
)
===
'
[object Object]
'
)
{
value
=
JSON
.
stringify
(
value
);
}
return
window
.
sessionStorage
.
setItem
(
key
,
value
);
},
remove
(
key
)
{
return
window
.
sessionStorage
.
removeItem
(
key
);
},
clear
()
{
return
window
.
sessionStorage
.
clear
();
}
};
src/views/goodsDetail/index.vue
View file @
de5c53ba
...
@@ -269,6 +269,7 @@ export default {
...
@@ -269,6 +269,7 @@ export default {
})
})
},
},
created
()
{
created
()
{
console
.
log
(
this
.
$route
);
this
.
hasLogin
=
localStorage
.
get
(
'
vccToken
'
)
?
true
:
false
;
this
.
hasLogin
=
localStorage
.
get
(
'
vccToken
'
)
?
true
:
false
;
this
.
detailParam
=
{
...
this
.
$route
.
query
};
this
.
detailParam
=
{
...
this
.
$route
.
query
};
localStorage
.
remove
(
'
orderData
'
);
localStorage
.
remove
(
'
orderData
'
);
...
...
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