Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
996d6872
Commit
996d6872
authored
Jul 30, 2021
by
June
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
6a6e4ebd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
App.vue
App.vue
+10
-6
components/c-nav_bar/index.vue
components/c-nav_bar/index.vue
+3
-1
pages/goods/detail.vue
pages/goods/detail.vue
+2
-2
pages/home/index.vue
pages/home/index.vue
+1
-2
No files found.
App.vue
View file @
996d6872
<
script
>
import
{
mapActions
}
from
'
vuex
'
import
{
mapActions
,
mapState
}
from
'
vuex
'
import
{
login_wx
}
from
'
@/utils/modules/login.js
'
import
dayjs
from
'
dayjs
'
import
{
removeStorage
}
from
'
@/lib/storage/index.js
'
export
default
{
onLaunch
:
function
()
{
this
.
checkUpdate
()
// 检查更新
onLaunch
:
async
function
()
{
this
.
setMobileData
()
// 获取系统信息和胶囊信息
this
.
checkUpdate
()
// 检查更新
const
extConfig
=
wx
.
getExtConfigSync
?
wx
.
getExtConfigSync
():
{}
console
.
log
(
extConfig
)
this
.
$store
.
state
.
user
.
appid
=
extConfig
.
appid
const
token
=
this
.
$getStorage
(
'
token
'
)
this
.
$store
.
state
.
user
.
token
=
token
this
.
getStoreInfo
()
// 这个接口一定要先获取,因为如果店铺过期
,有一个接口返回-11,后续所有接口不会再发起请求
this
.
getStoreInfo
()
// 这个接口一定要先获取,因为如果店铺过期
// wx.login
login_wx
()
...
...
@@ -31,6 +29,12 @@ export default {
})
},
onShow
()
{
if
(
!
this
.
$store
.
state
.
systemInfo
.
menuCalcInfo
)
{
this
.
setMobileData
()
}
},
methods
:
{
...
mapActions
(
'
systemInfo
'
,
[
'
setMobileData
'
]),
...
mapActions
(
'
user
'
,
[
'
setToken
'
,
'
setLoginStatus
'
,
'
getStoreInfo
'
]),
...
...
components/c-nav_bar/index.vue
View file @
996d6872
...
...
@@ -47,10 +47,12 @@ export default {
cTitleStyle
()
{
const
{
systemInfo
,
menuButtonInfo
,
menuCalcInfo
}
=
this
.
systemInfo
const
titleH
=
menuCalcInfo
.
navH
-
systemInfo
.
statusBarHeight
const
v
=
systemInfo
.
system
.
includes
(
'
iOS
'
)
?
'
center
'
:
'
flex-start
'
const
lrSpace
=
systemInfo
.
windowWidth
-
menuButtonInfo
.
right
// 左右间距
const
v
=
systemInfo
.
platform
===
'
android
'
?
'
flex-start
'
:
'
center
'
return
`height:
${
titleH
}
px;font-size:
${
systemInfo
.
fontSizeSetting
}
px;padding: 0
${
menuCalcInfo
.
lrSpace
}
px;justify-content:
${
v
}
;margin-top:
${
systemInfo
.
statusBarHeight
}
px;`
}
},
methods
:
{
handleBack
()
{
uni
.
navigateBack
()
...
...
pages/goods/detail.vue
View file @
996d6872
...
...
@@ -231,10 +231,10 @@ export default {
},
onPageScroll
:
throttle
(
function
(
e
)
{
const
scrollTop
=
e
.
scrollTop
if
(
scrollTop
>
4
00
)
return
if
(
scrollTop
>
5
00
)
return
const
opacity
=
(
scrollTop
/
375
).
toFixed
(
1
)
this
.
navBg
=
`rgba(255, 255, 255,
${
opacity
}
)`
},
30
0
),
},
25
0
),
methods
:
{
// 富文本预览事件
preview
(
src
,
e
)
{
...
...
pages/home/index.vue
View file @
996d6872
...
...
@@ -197,8 +197,7 @@ export default {
data
()
{
return
{
baseUrl
,
select_goods
:
null
,
cate_data
:
null
,
cate_data
:
{},
searchList
:
[],
navBg
:
"
rgba(255, 255, 255, 0)
"
,
navColor
:
'
#fff
'
,
...
...
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