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
Hide 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
>
<
template
>
<view
v-if=
"myPageData.home_pages"
:style=
"[myPageData.home_pages.navs[active].templateBg]"
>
<view>
<view
class=
"content"
:style=
"
{ 'padding-bottom': showtabs==ture? '100rpx':0,paddingTop:pagePaddingBottom }">
<view
v-if=
"showStart== true"
style=
"width: 100vw;height: 100vh;"
>
<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:''}]">
<image
:src=
"startData.PicUrl"
mode=
'aspectFit'
style=
"width: 100%;height: 100%;position: relative;"
>
<text
v-if=
"isNavPosition==0"
>
{{
pageTitleStr
}}
</text>
<view
class=
"Startbtn"
:style=
"
{'top':pagePaddingBottom}" @click="startb">
<view
v-if=
"isNavPosition==1"
style=
"width:78%"
>
跳过
<search
:style-str=
"searchData"
></search>
</view>
</view>
<view
class=
"back-arrow"
v-if=
"showBack"
@
click=
"goback"
>
</image>
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
</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>
<view
v-if=
"isNavPosition==1"
style=
"width:78%"
>
<search
:style-str=
"searchData"
></search>
</view>
<view
class=
"back-arrow"
v-if=
"showBack"
@
click=
"goback"
>
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
</view>
</view>
</view>
</view>
<u-tabs
v-if=
"myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name=
"name"
:list=
"myPageData.home_pages.navs"
<u-tabs
v-if=
"myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name=
"name"
:list=
"myPageData.home_pages.navs"
:is-scroll=
"true"
:active-color=
"mainColor"
:current=
"active"
:bar-width=
"80"
:font-size=
"32"
:bold=
"false"
@
change=
"changeHandler"
></u-tabs>
:is-scroll=
"true"
:active-color=
"mainColor"
:current=
"active"
:bar-width=
"80"
:font-size=
"32"
:bold=
"false"
@
change=
"changeHandler"
></u-tabs>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
<view
:key=
"i"
v-if=
"active == i"
>
<view
:key=
"i"
v-if=
"active == i"
>
<template
v-for=
"(d, di) in item.template.data"
>
<template
v-for=
"(d, di) in item.template.data"
>
<search
v-if=
"d.id == 'search'&&isNavPosition==0"
:style-str=
"d.data"
:key=
"di"
></search>
<search
v-if=
"d.id == 'search'&&isNavPosition==0"
:style-str=
"d.data"
:key=
"di"
></search>
<swiper
v-if=
"d.id == 'banner'"
:swipers=
"d.data"
:key=
"di"
></swiper>
<swiper
v-if=
"d.id == 'banner'"
:swipers=
"d.data"
:key=
"di"
></swiper>
<empty
v-if=
"d.id == 'empty'"
:block=
"d.data"
:key=
"di"
></empty>
<empty
v-if=
"d.id == 'empty'"
:block=
"d.data"
:key=
"di"
></empty>
<rubik
v-if=
"d.id == 'rubik'"
:ad=
"d.data"
:key=
"di"
></rubik>
<rubik
v-if=
"d.id == 'rubik'"
:ad=
"d.data"
:key=
"di"
></rubik>
<goods
v-if=
"d.id == 'goods'"
:goods=
"d.data"
:key=
"di"
></goods>
<goods
v-if=
"d.id == 'goods'"
:goods=
"d.data"
:key=
"di"
></goods>
<notice
v-if=
"d.id == 'notice'"
:notice=
"d.data"
:key=
"di"
></notice>
<notice
v-if=
"d.id == 'notice'"
:notice=
"d.data"
:key=
"di"
></notice>
<gridnav
v-if=
"d.id == 'nav'"
:navs=
"d.data"
:key=
"di"
></gridnav>
<gridnav
v-if=
"d.id == 'nav'"
:navs=
"d.data"
:key=
"di"
></gridnav>
<pagetitle
v-if=
"d.id == 'link'"
:ts=
"d.data"
:key=
"di"
></pagetitle>
<pagetitle
v-if=
"d.id == 'link'"
:ts=
"d.data"
:key=
"di"
></pagetitle>
<videopage
v-if=
"d.id == 'video'"
:video=
"d.data"
:key=
"di"
></videopage>
<videopage
v-if=
"d.id == 'video'"
:video=
"d.data"
:key=
"di"
></videopage>
<copyright
v-if=
"d.id == 'copyright'"
:cop=
"d.data"
:key=
"di"
></copyright>
<copyright
v-if=
"d.id == 'copyright'"
:cop=
"d.data"
:key=
"di"
></copyright>
<checkin
v-if=
"d.id == 'check-in'"
:check=
"d.data"
:key=
"di"
></checkin>
<checkin
v-if=
"d.id == 'check-in'"
:check=
"d.data"
:key=
"di"
></checkin>
<userbox
v-if=
"d.id == 'user-info'"
:ts=
"d.data"
:key=
"di"
></userbox>
<userbox
v-if=
"d.id == 'user-info'"
:ts=
"d.data"
:key=
"di"
></userbox>
<view
v-if=
"d.id == 'image-text'"
class=
"imageText"
:key=
"di"
>
<view
v-if=
"d.id == 'image-text'"
class=
"imageText"
:key=
"di"
>
<view
v-html=
"d.data.content"
></view>
<view
v-html=
"d.data.content"
></view>
</view>
</view>
<userorder
v-if=
"d.id == 'user-order'"
:uo=
"d.data"
:key=
"di"
></userorder>
<userorder
v-if=
"d.id == 'user-order'"
:uo=
"d.data"
:key=
"di"
></userorder>
<mapi
v-if=
"d.id == 'map'"
:mapi=
"d.data"
:key=
"di"
></mapi>
<mapi
v-if=
"d.id == 'map'"
:mapi=
"d.data"
:key=
"di"
></mapi>
<checkform
v-if=
"d.id == 'form'"
:forms=
"d.data"
:key=
"di"
></checkform>
<checkform
v-if=
"d.id == 'form'"
:forms=
"d.data"
:key=
"di"
></checkform>
<addialog
v-if=
"d.id == 'modal' && d.data.opened"
:ads=
"d.data"
:key=
"di"
></addialog>
<addialog
v-if=
"d.id == 'modal' && d.data.opened"
:ads=
"d.data"
:key=
"di"
></addialog>
<quicknav
v-if=
"d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs=
"d.data"
:key=
"di"
></quicknav>
<quicknav
v-if=
"d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs=
"d.data"
:key=
"di"
></quicknav>
<pingtuan
v-if=
"d.id == 'pintuan'"
:goods=
"d.data"
:key=
"di"
></pingtuan>
<pingtuan
v-if=
"d.id == 'pintuan'"
:goods=
"d.data"
:key=
"di"
></pingtuan>
<shopinfo
v-if=
"d.id == 'shop-info' "
:ad=
"d.data"
:key=
"di"
ref=
"son"
></shopinfo>
<shopinfo
v-if=
"d.id == 'shop-info' "
:ad=
"d.data"
:key=
"di"
ref=
"son"
></shopinfo>
<guide
v-if=
"d.id == 'drive-guide'"
:info=
"d.data"
ref=
'city'
></guide>
<guide
v-if=
"d.id == 'drive-guide'"
:info=
"d.data"
ref=
'city'
></guide>
<!-- 网课列表 -->
<!-- 网课列表 -->
<rgoods
v-if=
"d.id == 'educationCustom'"
:goods=
"d.data"
></rgoods>
<rgoods
v-if=
"d.id == 'educationCustom'"
:goods=
"d.data"
></rgoods>
<!-- 资讯 -->
<!-- 资讯 -->
<argoods
v-if=
"d.id == 'educationArticle'"
:goods=
"d.data"
></argoods>
<argoods
v-if=
"d.id == 'educationArticle'"
:goods=
"d.data"
></argoods>
<!-- 最近学习组件 -->
<!-- 最近学习组件 -->
<rstudy
v-if=
"d.id == 'education'"
:goods=
"d.data"
ref=
'study'
></rstudy>
<rstudy
v-if=
"d.id == 'education'"
:goods=
"d.data"
ref=
'study'
></rstudy>
<store
v-if=
"d.id == 'reservestore'"
:goods=
"d.data"
:storeinfo=
'storeInfo'
></store>
<store
v-if=
"d.id == 'reservestore'"
:goods=
"d.data"
:storeinfo=
'storeInfo'
></store>
<!-- 线下服务商品 -->
<!-- 线下服务商品 -->
<sindex
v-if=
"d.id == 'storeGoods'"
:goods=
"d.data"
:key=
"di"
></sindex>
<sindex
v-if=
"d.id == 'storeGoods'"
:goods=
"d.data"
:key=
"di"
></sindex>
</
template
>
</
template
>
</view>
</template>
<view
v-if=
"showtabs==true"
>
<tabbar></tabbar>
</view>
</view>
</template>
<view
v-if=
"showtabs==true"
>
<view
class=
"tips_t"
v-if=
"add_show==1&& JSON.stringify(setting) != '{}' && setting.add_app_text!=null "
:style=
"{
<tabbar></tabbar>
'border-radius':setting.add_app_bg_radius+'rpx',
</view>
'opacity':setting.add_app_bg_transparency/100,
'top':pagePaddingBottom,
<view
class=
"tips_t"
v-if=
"add_show==1&& JSON.stringify(setting) != '{}' && setting.add_app_text!=null "
:style=
"{
}"
>
'border-radius':setting.add_app_bg_radius+'rpx',
<u-icon
name=
"cross"
color=
"#fff"
@
click=
"close"
></u-icon>
'opacity':setting.add_app_bg_transparency/100,
<view
style=
"width: 1px;height: 20px;margin:0 10px;background: #fff;"
></view>
'top':pagePaddingBottom,
<Text
style=
"color: #fff;"
>
{{setting.add_app_text}}
</Text>
}"
>
<view
class=
"triangle-up"
:style=
"{'top':pagePaddingBottom}"
></view
>
<
u-icon
name=
"cross"
color=
"#fff"
@
click=
"close"
></u-icon
>
<
/view
>
<
view
style=
"width: 1px;height: 20px;margin:0 10px;background: #fff;"
></view
>
<
coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon
>
<
Text
style=
"color: #fff;"
>
{{setting.add_app_text}}
</Text
>
<
auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth
>
<
view
class=
"triangle-up"
:style=
"{'top':pagePaddingBottom}"
></view
>
<
official-account></official-account
>
</view>
</view>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<official-account></official-account>
</view>
</view>
</view>
</view>
</template>
</template>
<
script
>
<
script
>
...
@@ -101,7 +111,7 @@
...
@@ -101,7 +111,7 @@
import
argoods
from
"@/components/studyArticle/index.vue"
;
import
argoods
from
"@/components/studyArticle/index.vue"
;
import
store
from
"@/components/store/store.vue"
import
store
from
"@/components/store/store.vue"
import
sindex
from
"@/components/store/index.vue"
import
sindex
from
"@/components/store/index.vue"
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -134,6 +144,8 @@
...
@@ -134,6 +144,8 @@
storePosition
:
''
,
//线下服务获取经纬度
storePosition
:
''
,
//线下服务获取经纬度
storeInfo
:
{},
storeInfo
:
{},
fxstoreId
:
0
,
//分享过来的门店id
fxstoreId
:
0
,
//分享过来的门店id
showStart
:
false
,
//是否显示启动页
startData
:{},
};
};
},
},
components
:
{
components
:
{
...
@@ -369,8 +381,17 @@
...
@@ -369,8 +381,17 @@
// this.getstore()
// this.getstore()
// }
// }
// this.init();
// this.init();
let
now
=
new
Date
()
let
nowtime
=
now
.
getFullYear
()
+
'-'
+
(
now
.
getMonth
()
+
1
)
+
'-'
+
now
.
getDate
()
this
.
getIsOpenReserve
();
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
();
uni
.
showNavigationBarLoading
();
},
},
...
@@ -476,6 +497,48 @@
...
@@ -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
)
{
getphonenumber
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
uni
.
checkSession
({
//检查登录状态是否过期
uni
.
checkSession
({
//检查登录状态是否过期
...
@@ -1072,7 +1135,13 @@
...
@@ -1072,7 +1135,13 @@
left
:
5px
;
left
:
5px
;
bottom
:
12.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 {
/* .logo {
height: 200rpx;
height: 200rpx;
width: 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