Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
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
viitto
mallapp
Commits
fafe906a
Commit
fafe906a
authored
Dec 25, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1f8b17c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
137 additions
and
68 deletions
+137
-68
index.vue
pages/index/index.vue
+137
-68
No files found.
pages/index/index.vue
View file @
fafe906a
<
template
>
<view
v-if=
"myPageData.home_pages"
:style=
"[myPageData.home_pages.navs[active].templateBg]"
>
<view>
<view
v-if=
"showStart== true"
style=
"width: 100vw;height: 100vh;"
>
<image
:src=
"startData.PicUrl"
mode=
'aspectFit'
style=
"width: 100%;height: 100%;position: relative;"
>
<view
class=
"Startbtn"
:style=
"
{'top':pagePaddingBottom}" @click="startb">
跳过
</view>
</image>
</view>
<view
v-if=
"myPageData.home_pages "
v-show=
"showStart== false"
:style=
"[myPageData.home_pages.navs[active].templateBg]"
>
<view
class=
"content"
:style=
"
{ 'padding-bottom': showtabs==ture? '100rpx':0,paddingTop:pagePaddingBottom }">
<view
class=
"index-title"
:style=
"[myPageData.home_pages.navs[active].templateBg,titleStyle,
{color:myPageData.home_pages.navs[active].templateBg?myPageData.home_pages.navs[active].templateBg.titleColor:''}]">
<text
v-if=
"isNavPosition==0"
>
{{
pageTitleStr
}}
</text>
...
...
@@ -70,6 +78,8 @@
<official-account></official-account>
</view>
</view>
</view>
</template>
<
script
>
...
...
@@ -101,7 +111,7 @@
import
argoods
from
"@/components/studyArticle/index.vue"
;
import
store
from
"@/components/store/store.vue"
import
sindex
from
"@/components/store/index.vue"
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
export
default
{
data
()
{
return
{
...
...
@@ -134,6 +144,8 @@
storePosition
:
''
,
//线下服务获取经纬度
storeInfo
:
{},
fxstoreId
:
0
,
//分享过来的门店id
showStart
:
false
,
//是否显示启动页
startData
:{},
};
},
components
:
{
...
...
@@ -369,8 +381,17 @@
// this.getstore()
// }
// this.init();
let
now
=
new
Date
()
let
nowtime
=
now
.
getFullYear
()
+
'-'
+
(
now
.
getMonth
()
+
1
)
+
'-'
+
now
.
getDate
()
this
.
getIsOpenReserve
();
if
(
!
uni
.
getStorageSync
(
'Startup_page'
)){
//获取启动页信息1、没有记录日期
this
.
getstartModel
(
nowtime
)
}
else
{
//记录日期和当天相差1天调取
let
dayc
=
this
.
DateDiff
(
uni
.
getStorageSync
(
'Startup_page'
).
time
,
nowtime
)
if
(
dayc
>=
1
){
this
.
getstartModel
(
nowtime
)
}
}
uni
.
showNavigationBarLoading
();
},
...
...
@@ -476,6 +497,48 @@
}
);
},
DateDiff
(
sDate1
,
sDate2
){
var
aDate
,
oDate1
,
oDate2
,
iDays
aDate
=
sDate1
.
split
(
"-"
)
oDate1
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
//转换为9-25-2017格式
aDate
=
sDate2
.
split
(
"-"
)
oDate2
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
iDays
=
parseInt
(
Math
.
abs
(
oDate1
-
oDate2
)
/
1000
/
60
/
60
/
24
)
//把相差的毫秒数转换为天数
return
iDays
},
getstartModel
(
time
){
this
.
request2
({
url
:
"/api/AppletSchool/GetEducationStartUpModel"
,
data
:
{},
},
(
res
)
=>
{
uni
.
setStorageSync
(
"Startup_page"
,{
time
:
time
});
//方便在分类判断
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
data
.
IsShow
==
1
){
this
.
showStart
=
true
;
this
.
startData
=
res
.
data
;
innerAudioContext
.
autoplay
=
true
;
innerAudioContext
.
src
=
res
.
data
.
MusicUrl
;
setTimeout
(()
=>
{
this
.
showStart
=
false
;
if
(
innerAudioContext
!=
undefined
)
{
//判断下不是无法暂停
innerAudioContext
.
stop
();
}
},
res
.
data
.
Seconds
*
1000
)
}
}
else
{
}
}
);
},
startb
(){
//跳过启动页
this
.
showStart
=
false
;
if
(
innerAudioContext
!=
undefined
)
{
//判断下不是无法暂停
innerAudioContext
.
stop
();
}
},
getphonenumber
(
e
)
{
console
.
log
(
e
)
uni
.
checkSession
({
//检查登录状态是否过期
...
...
@@ -1072,7 +1135,13 @@
left
:
5px
;
bottom
:
12.5px
;
}
.Startbtn
{
position
:
absolute
;
top
:
10px
;
right
:
15px
;
width
:
50px
;
height
:
20px
;
background
:
rgba
(
45
,
45
,
45
,
0.5
);
border-radius
:
4px
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#FFF
;
}
/* .logo {
height: 200rpx;
width: 200rpx;
...
...
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