Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
0c94d53d
Commit
0c94d53d
authored
Oct 31, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
19e7536e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1576 additions
and
1633 deletions
+1576
-1633
index.vue
components/auth/index.vue
+0
-1
AddAddress.vue
pages/address/AddAddress.vue
+9
-13
AirplanePassengerAddEditing.vue
pages/airTicket/AirplanePassengerAddEditing.vue
+4
-1
index.vue
pages/index/index.vue
+1356
-1601
video.vue
pages/video/video.vue
+206
-15
api.js
plugin/api.js
+1
-2
No files found.
components/auth/index.vue
View file @
0c94d53d
...
...
@@ -101,7 +101,6 @@
that
.
showDialog
=
true
;
wx
.
login
({
success
:
(
res
)
=>
{
//console.log(res)
let
obj
=
{
Source
:
1
,
OpenId
:
""
,
...
...
pages/address/AddAddress.vue
View file @
0c94d53d
...
...
@@ -11,34 +11,30 @@
<Text>
收货人
</Text>
<input
class=
"uni-input inputM"
v-model=
"msg.Name"
/>
</view>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<view
class=
"addcenter_item2"
>
<Text>
联系电话
</Text>
<input
class=
"uni-input inputM"
v-model=
"msg.Mobile"
/>
</view>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<!-- TODO 动态获取地址数据 -->
<view
class=
"addcenter_item"
>
<Text>
所在地区
</Text>
<view
style=
"display: flex;flex-direction: row;align-items: center;"
@
click=
"addressShow = true"
>
<Text
:style=
"
{'color':address!=''? '#303133':'#9D9C9B'}">
{{
address
!=
''
?
address
:
'请选择'
}}
</Text>
<u-icon
name=
"arrow"
color=
"#B2B2B2"
size=
"30"
></u-icon>
<u-icon
name=
"arrow"
color=
"#B2B2B2"
size=
"30"
></u-icon>
<pickerAddress
v-model=
"addressShow"
@
confirm=
"addresspick"
/>
</view>
</view>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<view
style=
"width: 100%;height: 1px;background: #f5f5f5;"
/>
<view
class=
"addcenter_item2"
style=
"align-items: flex-start;"
>
<Text>
详细地址
</Text>
<textarea
style=
"height: 50px;"
class=
"inputM"
v-model=
"msg.Address"
/>
<textarea
style=
"height: 50px;"
class=
"inputM"
v-model=
"msg.Address"
/>
</view>
</view>
<!-- 智能识别 -->
<view
class=
"smart"
>
<
!--
<
view
class=
"smart"
>
<view>
<span>
智能识别
</span>
<textarea
...
...
@@ -55,7 +51,7 @@
</view>
</view>
</view>
</view>
-->
<view
class=
"btn"
@
click=
"preserve"
:style=
"
{'background':mainColor}">
<Text>
保存地址
</Text>
</view>
...
...
pages/airTicket/AirplanePassengerAddEditing.vue
View file @
0c94d53d
...
...
@@ -24,7 +24,7 @@
</view>
<view
class=
"height-line1"
></view>
</view>
<view
class=
"column"
>
<view
class=
"column"
style=
"display: none;"
>
<view
class=
"AirplanePassengerAddEditingC-text row-sb-n fz30"
>
<text
class=
"flexS AirplanePassengerAddEditingC-textL"
>
联系电话
</text>
<view
class=
"flexG"
>
...
...
@@ -152,6 +152,9 @@
<text
class=
"fz26 flexS"
>
出生日期
</text>
<text
class=
"fz30 fontBold flexG"
>
{{
addMsg
.
result
.
birthday
}}
</text>
</view>
-->
</view>
<view>
</view>
<view
class=
"showAddEditing-buttom fz32 fontBold textCenter row-sb-n"
>
<view
class=
"border1 colorDEBF7B borderDEBF7B"
@
click=
"showAddEditingPreviwe=false"
>
返回修改
</view>
...
...
pages/index/index.vue
View file @
0c94d53d
<
template
>
<view
class=
"indexpage"
>
<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"
>
<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=
"
{
<view
v-if=
"myPageData.home_pages"
v-show=
"showStart == false"
:style=
"[myPageData.home_pages.navs[active].templateBg]"
>
<view
class=
"content"
:style=
"
{
'padding-bottom':(pageId==0?'78px':'0px'),
}"
>
}">
<!-- paddingTop: pagePaddingBottom, -->
<view
v-if=
"pageId!=0"
class=
"index-title"
:class=
"
{ MainTopLeft: pageTitleStr.length > 10 }"
:style="[
<view
v-if=
"pageId!=0"
class=
"index-title"
:class=
"
{ MainTopLeft: pageTitleStr.length > 10 }" :style="[
myPageData.home_pages.navs[active].templateBg,
titleStyle,
{
...
...
@@ -39,8 +20,7 @@
? 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>
...
...
@@ -50,153 +30,58 @@
</view>
</view>
<!--
<view
@
click=
'yj'
style=
"width: 200px;height: 50px;"
>
活动
</view>
-->
<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>
<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>
<template
v-for=
"(item, i) in myPageData.home_pages.navs"
>
<view
:key=
"i"
v-if=
"active == i"
>
<template
v-for=
"(d, di) in item.template.data"
>
<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>
<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>
<empty
v-if=
"d.id == 'empty'"
:block=
"d.data"
:key=
"di"
></empty>
<rubik
v-if=
"d.id == 'rubik'"
:ad=
"d.data"
:key=
"di"
></rubik>
<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>
<pagetitle
v-if=
"d.id == 'link'"
:ts=
"d.data"
:key=
"di"
></pagetitle>
<videopage
v-if=
"d.id == 'video'"
:video=
"d.data"
:key=
"di"
></videopage>
<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>
<userbox
v-if=
"d.id == 'user-info'"
:ts=
"d.data"
:key=
"di"
></userbox>
<pagetitle
v-if=
"d.id == 'link'"
:ts=
"d.data"
:key=
"di"
></pagetitle>
<videopage
v-if=
"d.id == 'video'"
:video=
"d.data"
:key=
"di"
></videopage>
<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>
<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-html=
"d.data.content"
></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>
<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>
<quicknav
v-if=
"d.id == 'quick-nav' && d.data.navSwitch == 1"
:navs=
"d.data"
:key=
"di"
></quicknav>
<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>
<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>
-->
<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>
<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>
<!-- 网课列表 -->
<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>
<store
v-if=
"d.id == 'reservestore'"
:goods=
"d.data"
:storeinfo=
"storeInfo"
></store>
<rstudy
v-if=
"d.id == 'education'"
:goods=
"d.data"
ref=
"study"
></rstudy>
<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>
<!-- 老师列表 -->
<educationteacher
v-if=
"d.id == 'educationteacher'"
:goods=
"d.data"
:key=
"di"
></educationteacher>
<educationteacher
v-if=
"d.id == 'educationteacher'"
:goods=
"d.data"
:key=
"di"
></educationteacher>
<!--导航栏-->
<navpage
v-if=
"d.id == 'nav-page'"
:navs=
"d.data"
:key=
"di"
></navpage>
<navpage
v-if=
"d.id == 'nav-page'"
:navs=
"d.data"
:key=
"di"
></navpage>
<!-- 相亲的人物模板 -->
<!--
<matchmaking
v-if=
"d.id == 'miaiuser'"
:navs=
"d.data"
:key=
"di"
></matchmaking>
-->
<!-- 相亲活动 -->
<miaiactivitytype
v-if=
"d.id == 'miaiactivitytype'"
:goods=
"d.data"
></miaiactivitytype>
<miaiactivitytype
v-if=
"d.id == 'miaiactivitytype'"
:goods=
"d.data"
></miaiactivitytype>
<!-- 相亲活动自定义 -->
<miaiactivityCustom
v-if=
"d.id == 'miaiactivityCustom'"
:goods=
"d.data"
></miaiactivityCustom>
<miaiactivityCustom
v-if=
"d.id == 'miaiactivityCustom'"
:goods=
"d.data"
></miaiactivityCustom>
</
template
>
</view>
</template>
...
...
@@ -204,9 +89,7 @@
<tabbar></tabbar>
</view>
<view
class=
"tips_t"
v-if=
"
<view
class=
"tips_t"
v-if=
"
add_show == 1 &&
JSON.stringify(setting) != '{}' &&
setting.add_app_text != null
...
...
@@ -215,76 +98,56 @@
'border-radius': setting.add_app_bg_radius + 'rpx',
opacity: setting.add_app_bg_transparency / 100,
top: pagePaddingBottom,
}"
>
}"
>
<u-icon
name=
"cross"
color=
"#fff"
@
click=
"close"
></u-icon>
<view
style=
"width: 1px; height: 20px; margin: 0 10px; background: #fff"
></view>
<view
style=
"width: 1px; height: 20px; margin: 0 10px; background: #fff"
></view>
<Text
style=
"color: #fff"
>
{{ setting.add_app_text }}
</Text>
<view
class=
"triangle-up"
:style=
"{ top: pagePaddingBottom }"
></view>
</view>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<auth
v-if=
"showAuth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
<!-- <official-account></official-account> -->
<orderPopup
v-if=
"showorder"
:orderPopupdata=
"orderPopupdata"
@
gosalesvolume=
"gosalesvolume"
@
closeBtn=
"closeBtn_order"
></orderPopup>
<orderPopup
v-if=
"showorder"
:orderPopupdata=
"orderPopupdata"
@
gosalesvolume=
"gosalesvolume"
@
closeBtn=
"closeBtn_order"
></orderPopup>
</view>
</view>
</view>
</template>
<
script
>
import
tabbar
from
"@/components/tabbar/index"
;
import
search
from
"@/components/search/index"
;
import
swiper
from
"@/components/swiper/index"
;
import
empty
from
"@/components/empty/index"
;
import
rubik
from
"@/components/rubik/index"
;
import
goods
from
"@/components/goods/index"
;
import
notice
from
"@/components/notice/index"
;
import
gridnav
from
"@/components/gridnav/index"
;
import
pagetitle
from
"@/components/pagetitle/index"
;
import
videopage
from
"@/components/videopage/index"
;
import
copyright
from
"@/components/copyright/index"
;
import
checkin
from
"@/components/checkin/index"
;
import
userbox
from
"@/components/userbox/index"
;
import
userorder
from
"@/components/userorder/index"
;
import
mapi
from
"@/components/mapi/index"
;
import
checkform
from
"@/components/checkform/index"
;
import
addialog
from
"@/components/addialog/index"
;
import
quicknav
from
"@/components/quicknav/index"
;
import
coupon
from
"@/components/coupons/coupons"
;
// import pingtuan from "@/components/pingtuan/index";
import
shopinfo
from
"@/components/shopinfo/shopinfo"
;
import
auth
from
"@/components/auth/index.vue"
;
import
guide
from
"@/components/guidecar/index.vue"
;
import
rstudy
from
"@/components/study/Rstudy.vue"
;
import
rgoods
from
"@/components/study/index.vue"
;
import
argoods
from
"@/components/studyArticle/index.vue"
;
import
store
from
"@/components/store/store.vue"
;
import
sindex
from
"@/components/store/index.vue"
;
import
educationteacher
from
"@/components/educationteacher/index"
;
import
navpage
from
"@/components/navpage/index"
;
// import matchmaking from "@/components/matchmaking/index"
import
miaiactivitytype
from
"@/components/miaiactivitytype/index"
;
import
miaiactivityCustom
from
"@/components/miaiactivityCustom/index"
;
import
orderPopup
from
"@/components/coupons/orderPopup.vue"
;
//离线订单弹窗
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
export
default
{
import
tabbar
from
"@/components/tabbar/index"
;
import
search
from
"@/components/search/index"
;
import
swiper
from
"@/components/swiper/index"
;
import
empty
from
"@/components/empty/index"
;
import
rubik
from
"@/components/rubik/index"
;
import
goods
from
"@/components/goods/index"
;
import
notice
from
"@/components/notice/index"
;
import
gridnav
from
"@/components/gridnav/index"
;
import
pagetitle
from
"@/components/pagetitle/index"
;
import
videopage
from
"@/components/videopage/index"
;
import
copyright
from
"@/components/copyright/index"
;
import
checkin
from
"@/components/checkin/index"
;
import
userbox
from
"@/components/userbox/index"
;
import
userorder
from
"@/components/userorder/index"
;
import
mapi
from
"@/components/mapi/index"
;
import
checkform
from
"@/components/checkform/index"
;
import
addialog
from
"@/components/addialog/index"
;
import
quicknav
from
"@/components/quicknav/index"
;
import
coupon
from
"@/components/coupons/coupons"
;
import
shopinfo
from
"@/components/shopinfo/shopinfo"
;
import
auth
from
"@/components/auth/index.vue"
;
import
guide
from
"@/components/guidecar/index.vue"
;
import
rstudy
from
"@/components/study/Rstudy.vue"
;
import
rgoods
from
"@/components/study/index.vue"
;
import
argoods
from
"@/components/studyArticle/index.vue"
;
import
store
from
"@/components/store/store.vue"
;
import
sindex
from
"@/components/store/index.vue"
;
import
educationteacher
from
"@/components/educationteacher/index"
;
import
navpage
from
"@/components/navpage/index"
;
import
miaiactivitytype
from
"@/components/miaiactivitytype/index"
;
import
miaiactivityCustom
from
"@/components/miaiactivityCustom/index"
;
import
orderPopup
from
"@/components/coupons/orderPopup.vue"
;
//离线订单弹窗
const
innerAudioContext
=
uni
.
createInnerAudioContext
();
export
default
{
data
()
{
return
{
title
:
"Hello"
,
...
...
@@ -351,7 +214,6 @@ export default {
addialog
,
quicknav
,
coupon
,
// pingtuan,
shopinfo
,
auth
,
guide
,
...
...
@@ -362,7 +224,6 @@ export default {
sindex
,
educationteacher
,
navpage
,
// matchmaking,
miaiactivitytype
,
miaiactivityCustom
,
orderPopup
,
...
...
@@ -380,6 +241,14 @@ export default {
});
let
c
=
this
.
$uiConfig
.
is_bang
?
78
:
50
;
this
.
contentHeight
=
this
.
$utils
.
calcContentHeight
(
c
);
if
(
options
&&
options
.
lxyType
&&
options
.
lxyType
==
1
)
{
//跳转到视频详情
uni
.
navigateTo
({
url
:
"/pages/video/video?vId="
+
options
.
vId
,
});
}
if
(
options
&&
options
.
page_id
)
{
this
.
pageId
=
options
.
page_id
;
let
queryString
=
""
;
...
...
@@ -413,7 +282,6 @@ export default {
}
if
(
options
&&
options
.
custom_params
)
{
let
custom_params
=
JSON
.
parse
(
decodeURIComponent
(
options
.
custom_params
));
console
.
log
(
custom_params
);
if
(
custom_params
.
user_id
)
{
uni
.
setStorageSync
(
"pid"
,
{
pid
:
custom_params
.
user_id
,
...
...
@@ -482,28 +350,27 @@ export default {
this
.
JumpType
=
options
.
JumpType
;
if
(
options
.
JumpType
==
3
)
{
this
.
guidecar
.
GoodsId
=
options
.
GoodsId
;
this
.
guidecar
.
address
=
options
.
address
?
JSON
.
parse
(
decodeURIComponent
(
options
.
address
))
:
""
;
this
.
guidecar
.
Pickcar
=
options
.
Pickcar
?
JSON
.
parse
(
decodeURIComponent
(
options
.
Pickcar
))
:
""
;
this
.
guidecar
.
address
=
options
.
address
?
JSON
.
parse
(
decodeURIComponent
(
options
.
address
))
:
""
;
this
.
guidecar
.
Pickcar
=
options
.
Pickcar
?
JSON
.
parse
(
decodeURIComponent
(
options
.
Pickcar
))
:
""
;
this
.
guidecar
.
StartTime
=
options
.
StartTime
?
options
.
StartTime
:
""
;
this
.
guidecar
.
EndTime
=
options
.
EndTime
?
options
.
EndTime
:
""
;
}
}
if
(
options
&&
options
.
J
)
{
//司导分享的的特殊处理
this
.
JumpType
=
options
.
J
;
if
(
options
.
J
==
3
)
{
this
.
guidecar
.
GoodsId
=
options
.
i
;
this
.
guidecar
.
address
=
options
.
address
?
JSON
.
parse
(
decodeURIComponent
(
options
.
address
))
:
""
;
this
.
guidecar
.
Pickcar
=
options
.
P
?
JSON
.
parse
(
decodeURIComponent
(
options
.
P
))
:
""
;
this
.
guidecar
.
address
=
options
.
address
?
JSON
.
parse
(
decodeURIComponent
(
options
.
address
))
:
""
;
this
.
guidecar
.
Pickcar
=
options
.
P
?
JSON
.
parse
(
decodeURIComponent
(
options
.
P
))
:
""
;
this
.
guidecar
.
StartTime
=
options
.
S
?
options
.
S
:
""
;
this
.
guidecar
.
EndTime
=
options
.
E
?
options
.
E
:
""
;
}
...
...
@@ -559,59 +426,26 @@ export default {
}
else
{
that
.
sharejump
();
//4-9新加
}
//4-11这里暂时不能使用
// wx.getUserInfo({//4-9修改 不使用getUserInfo 会造成获取回来的微信默认名称和头像
// success: function(res) {//4-9之后的好像这里不能静默登录了需要弹出登录
// console.log(res,'getUserInfo')
// if (uni.getStorageSync("mall_UserInfo")) {
// let uid = uni.getStorageSync("mall_UserInfo").UserId;
// let msg = {
// Id: uid,
// AliasName: res.userInfo.nickName,
// Photo: res.userInfo.avatarUrl,
// };
// that.updateuserinfo(msg);
// that.getPageType()
// // 如果登录的情况下直接跳转商品详情或者直播列表
// // that.sharejump();
// //如果登录状态 并且是uni.getStorageSync("CounponPassword")
// if(uni.getStorageSync("CounponPassword")){
// that.getunilogin(res)
// }
// } else {
// that.getunilogin(res)
// }
// },
// fail: function(e) {
// uni.showToast({
// title: "微信登录授权失败",
// icon: "none"
// });
// },
// });
// #endif
let
set
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:
{};
let
set
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
:
{};
if
(
!
uni
.
getStorageSync
(
"add_top_app"
))
{
uni
.
setStorageSync
(
"add_top_app"
,
{
add_top_app_show
:
1
,
});
}
this
.
add_show
=
uni
.
getStorageSync
(
"add_top_app"
)
?
uni
.
getStorageSync
(
"add_top_app"
).
add_top_app_show
:
1
;
this
.
add_show
=
uni
.
getStorageSync
(
"add_top_app"
)
?
uni
.
getStorageSync
(
"add_top_app"
).
add_top_app_show
:
1
;
this
.
setting
=
set
;
this
.
isShowBack
();
// this.init();
let
now
=
new
Date
();
let
nowtime
=
now
.
getFullYear
()
+
"-"
+
(
now
.
getMonth
()
+
1
)
+
"-"
+
now
.
getDate
();
// this.getIsOpenReserve();//4-11注释
if
(
!
uni
.
getStorageSync
(
"Startup_page"
))
{
//获取启动页信息1、没有记录日期
this
.
getstartModel
(
nowtime
);
...
...
@@ -634,30 +468,28 @@ export default {
// console.log("分享调用");
this
.
getReceive
();
},
2500
);
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
;
// if (SmallShopId != 0) {
// title = this.shopData.Name
// }
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
;
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
title
,
query
:
"user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
"&Up="
+
Up
,
...
...
@@ -669,34 +501,31 @@ export default {
// console.log("分享调用");
this
.
getReceive
();
},
2500
);
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
if
(
uid
==
0
)
{
uid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
}
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
let
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
SmallShopId
==
0
)
{
//如果微店id为0 去找所属微店id
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
;
// if (SmallShopId != 0) {
// title = this.shopData.Name
// }
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
SmallShopId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
;
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
title
,
path
:
"/pages/index/index?user_id="
+
path
:
"/pages/index/index?user_id="
+
uid
+
"&SmallShopId="
+
SmallShopId
+
...
...
@@ -715,11 +544,6 @@ export default {
},
methods
:
{
// goOrderDetails(){
// uni.navigateTo({
// url:"/pages/jiuzhai/jz_SureOrder?orderId=42389"
// })
// },
getunilogin
(
res
)
{
let
that
=
this
;
//静默登录操作
...
...
@@ -750,8 +574,7 @@ export default {
},
//获取IsOpenReserve
getIsOpenReserve
()
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/Mall/GetAppConfig"
,
data
:
{},
},
...
...
@@ -779,13 +602,14 @@ export default {
return
iDays
;
},
getstartModel
(
time
)
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/AppletSchool/GetEducationStartUpModel"
,
data
:
{},
},
(
res
)
=>
{
uni
.
setStorageSync
(
"Startup_page"
,
{
time
:
time
});
//方便在分类判断
uni
.
setStorageSync
(
"Startup_page"
,
{
time
:
time
});
//方便在分类判断
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
data
.
IsShow
==
1
)
{
this
.
showStart
=
true
;
...
...
@@ -800,8 +624,7 @@ export default {
}
},
res
.
data
.
Seconds
*
1000
);
}
}
else
{
}
}
else
{}
}
);
},
...
...
@@ -817,7 +640,6 @@ export default {
console
.
log
(
e
);
uni
.
checkSession
({
//检查登录状态是否过期
success
:
(
x
)
=>
{
if
(
x
.
errMsg
==
"checkSession:ok"
)
{
//没有过期
...
...
@@ -834,8 +656,7 @@ export default {
getCode
(
obj
)
{
var
that
=
this
;
//这里请求接口
that
.
request2
(
{
that
.
request2
({
url
:
"/api/mall/GetWeChatOpenId"
,
data
:
{
Code
:
obj
.
code
,
...
...
@@ -853,18 +674,17 @@ export default {
var
that
=
this
;
let
pid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
let
Up
=
uni
.
getStorageSync
(
"Up"
)
?
uni
.
getStorageSync
(
"Up"
).
Up
:
0
;
let
SmallShopId
=
uni
.
getStorageSync
(
"SmallShopId"
)
?
uni
.
getStorageSync
(
"SmallShopId"
).
SmallShopId
:
0
;
let
CounponPassword
=
uni
.
getStorageSync
(
"CounponPassword"
)
?
uni
.
getStorageSync
(
"CounponPassword"
).
CounponPassword
:
0
;
let
KeyWord
=
uni
.
getStorageSync
(
"KeyWord"
)
?
uni
.
getStorageSync
(
"KeyWord"
).
KeyWord
:
""
;
let
SmallShopId
=
uni
.
getStorageSync
(
"SmallShopId"
)
?
uni
.
getStorageSync
(
"SmallShopId"
).
SmallShopId
:
0
;
let
CounponPassword
=
uni
.
getStorageSync
(
"CounponPassword"
)
?
uni
.
getStorageSync
(
"CounponPassword"
).
CounponPassword
:
0
;
let
KeyWord
=
uni
.
getStorageSync
(
"KeyWord"
)
?
uni
.
getStorageSync
(
"KeyWord"
).
KeyWord
:
""
;
that
.
request2
(
{
that
.
request2
({
url
:
"/api/AppletLogin/Login"
,
data
:
{
Source
:
1
,
...
...
@@ -914,9 +734,9 @@ export default {
getorderPupop
()
{
let
now
=
new
Date
();
let
Month
=
now
.
getMonth
()
+
1
<
10
?
"0"
+
(
now
.
getMonth
()
+
1
)
:
now
.
getMonth
()
+
1
;
now
.
getMonth
()
+
1
<
10
?
"0"
+
(
now
.
getMonth
()
+
1
)
:
now
.
getMonth
()
+
1
;
let
day
=
now
.
getDate
()
<
10
?
"0"
+
now
.
getDate
()
:
now
.
getDate
();
let
nowtime
=
now
.
getFullYear
()
+
...
...
@@ -936,11 +756,12 @@ export default {
this
.
getUserOffline
(
nowtime
,
oldtime
);
}
}
uni
.
setStorageSync
(
"order_old_time"
,
{
time
:
nowtime
});
//吧当前时间存起来
uni
.
setStorageSync
(
"order_old_time"
,
{
time
:
nowtime
});
//吧当前时间存起来
},
getUserOffline
(
now
,
old
)
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/AppletUser/GetUserOfflineEarningsInfo"
,
data
:
{
StartTime
:
old
,
...
...
@@ -963,11 +784,10 @@ export default {
gosalesvolume
()
{
this
.
showorder
=
false
;
setTimeout
(()
=>
{
let
UserId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
let
UserId
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
;
uni
.
navigateTo
({
// url: "/pages/share/salesvolume?UserId="+UserId,
url
:
"/pages/share-order/share-order"
,
});
},
10
);
...
...
@@ -1013,8 +833,7 @@ export default {
}
else
if
(
that
.
JumpType
==
8
)
{
//服务人员详情
uni
.
navigateTo
({
url
:
"/pages/reserve/designerDetail?ID="
+
url
:
"/pages/reserve/designerDetail?ID="
+
that
.
GoodsId
+
"&storeId="
+
that
.
fxstoreId
,
...
...
@@ -1022,7 +841,9 @@ export default {
}
else
if
(
that
.
JumpType
==
9
)
{
//线下服务商品
try
{
uni
.
setStorageSync
(
"storeId"
,
{
storeId
:
that
.
fxstoreId
});
uni
.
setStorageSync
(
"storeId"
,
{
storeId
:
that
.
fxstoreId
});
}
catch
(
e
)
{
console
.
log
(
e
);
}
...
...
@@ -1042,8 +863,7 @@ export default {
}
else
if
(
that
.
JumpType
==
12
)
{
//储值卡的领取
uni
.
navigateTo
({
url
:
"/pages/coupon/cards/cardsreceive?Id="
+
url
:
"/pages/coupon/cards/cardsreceive?Id="
+
that
.
GoodsId
+
"&cardsmoney="
+
that
.
cardsmoney
,
...
...
@@ -1055,7 +875,9 @@ export default {
});
}
else
if
(
that
.
JumpType
==
14
)
{
//用户资料填写
uni
.
navigateTo
({
url
:
"/pages/blindDate/editData"
});
uni
.
navigateTo
({
url
:
"/pages/blindDate/editData"
});
}
else
if
(
that
.
JumpType
==
15
)
{
//门票详情
uni
.
navigateTo
({
...
...
@@ -1074,8 +896,7 @@ export default {
}
else
if
(
that
.
JumpType
==
18
)
{
//酒店详情
uni
.
navigateTo
({
url
:
"/pages/hotel/detail?id="
+
url
:
"/pages/hotel/detail?id="
+
that
.
GoodsId
+
"&dayObj="
+
that
.
dayObj
+
...
...
@@ -1085,8 +906,7 @@ export default {
}
else
if
(
that
.
JumpType
==
19
)
{
//线路详情
uni
.
navigateTo
({
url
:
"/pages/jiuzhai/jz_LineDetail?tcid="
+
url
:
"/pages/jiuzhai/jz_LineDetail?tcid="
+
that
.
tcid
+
"&configId="
+
that
.
configId
+
...
...
@@ -1097,8 +917,7 @@ export default {
},
500
);
},
updateuserinfo
(
msg
)
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/MemberUser/SetMemberPhoto"
,
data
:
msg
,
},
...
...
@@ -1117,7 +936,6 @@ export default {
let
navs
=
uni
.
getStorageSync
(
"navs"
)
?
uni
.
getStorageSync
(
"navs"
)
:
[];
if
(
navs
)
{
let
t
=
getCurrentPages
();
let
query
=
t
[
t
.
length
-
1
].
__displayReporter
.
query
;
let
queryString
=
""
;
for
(
var
k
in
query
)
{
...
...
@@ -1139,8 +957,7 @@ export default {
},
getjump
(
scene
)
{
let
a
=
"YZnsGuRojCKBkb1siP3VwkhkPFvh-D"
;
//测试数据
this
.
request
(
{
this
.
request
({
url
:
""
,
data
:
{
r
:
"api/default/qr-code-parameter"
,
...
...
@@ -1166,9 +983,9 @@ export default {
return
n
.
substr
(
1
);
},
init
()
{
let
mall_IsOpenSchool
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
IsOpenSchool
:
0
;
let
mall_IsOpenSchool
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
IsOpenSchool
:
0
;
let
open_school
=
0
;
if
(
this
.
IsOpenSchool
==
1
&&
mall_IsOpenSchool
==
1
)
{
...
...
@@ -1178,11 +995,10 @@ export default {
open_school
=
0
;
}
let
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
this
.
request2
(
{
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
this
.
request2
({
url
:
"/api/Mall/GetHome"
,
data
:
{
page_id
:
this
.
pageId
,
...
...
@@ -1225,8 +1041,7 @@ export default {
}
else
if
(
x
.
id
==
"miaiuser"
)
{
//4-29新加 相亲模式随机的时候调用接口
if
(
x
.
data
.
addUserType
==
4
)
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/AppletMiai/GetDailyRandomList"
,
data
:
{
pageIndex
:
1
,
...
...
@@ -1291,31 +1106,30 @@ export default {
let
that
=
this
;
uni
.
getLocation
({
type
:
"wgs84"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
position
=
res
.
latitude
+
","
+
res
.
longitude
;
uni
.
setStorageSync
(
"position"
,
{
position
:
position
,
});
that
.
getCurrentStore
();
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
that
.
getCurrentStore
();
},
});
},
getCurrentStore
()
{
let
storeId
=
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
uni
.
getStorageSync
(
"storeId"
)
&&
uni
.
getStorageSync
(
"storeId"
).
storeId
?
uni
.
getStorageSync
(
"storeId"
).
storeId
:
0
;
let
position
=
uni
.
getStorageSync
(
"position"
)
&&
uni
.
getStorageSync
(
"position"
).
position
?
uni
.
getStorageSync
(
"position"
).
position
:
""
;
uni
.
getStorageSync
(
"position"
).
position
?
uni
.
getStorageSync
(
"position"
).
position
:
""
;
this
.
request2
(
{
this
.
request2
({
url
:
"/api/AppletStores/GetCurrentStore"
,
data
:
{
storeId
:
storeId
,
...
...
@@ -1338,16 +1152,15 @@ export default {
);
},
getSmallShopById
()
{
let
Id
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
let
Id
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
SmallShopId
:
0
;
if
(
Id
==
0
)
{
Id
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
Id
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserSmallShopId
:
0
;
}
this
.
request2
(
{
this
.
request2
({
url
:
"/api/AppletUser/GetSmallShopById"
,
data
:
{
Id
:
Id
,
...
...
@@ -1382,10 +1195,11 @@ export default {
y
.
templateBg
.
backgroundColor
=
x
.
data
.
backgroundColor
;
y
.
templateBg
.
backgroundImage
=
`url('
${
x
.
data
.
backgroundPicUrl
}
')`
;
y
.
templateBg
.
backgroundPosition
=
x
.
data
.
positionText
;
y
.
templateBg
.
backgroundRepeat
=
x
.
data
.
repeatText
?
x
.
data
.
repeatText
:
"no-repeat"
;
y
.
templateBg
.
backgroundSize
=
`
${
y
.
templateBg
.
backgroundRepeat
=
x
.
data
.
repeatText
?
x
.
data
.
repeatText
:
"no-repeat"
;
y
.
templateBg
.
backgroundSize
=
`
${
x
.
data
.
backgroundWidth
==
0
?
"auto"
:
x
.
data
.
backgroundWidth
+
"%"
...
...
@@ -1408,7 +1222,6 @@ export default {
if
(
x
.
data
.
titleColor
)
{
y
.
templateBg
.
titleColor
=
x
.
data
.
titleColor
+
" !important"
;
}
// y.templateBg +="padding-bottom:"+(this.$uiConfig.is_bang ? '88px' : '60px')+";box-sizing: border-box;";
}
});
if
(
!
y
.
templateBg
)
{
...
...
@@ -1417,70 +1230,11 @@ export default {
};
}
});
// this.myPageData.home_pages.navs[0].template.data.push({
// id: "pintuan",
// permission_key: "pintuan",
// data: {
// buttonColor: "#ff4544",
// list: [
// {
// id: 179402,
// name:
// "日本POLA宝丽黑BA限定小礼盒(黑ba水20ml +黑ba乳液15ml +黑ba面霜5g +黑ba唇颊膏2g)",
// picUrl:
// "https://cdnimg.iotweixin.com/uploads/mall1285/20200506/904171cab7db2201f6f35c0ca5bb0a93.png",
// price: "388.00",
// peopleNum: 2,
// pintuanPrice: "348.00",
// },
// {
// id: 178355,
// name:
// "日本珂润(Curel)润浸保湿 滋养乳霜 40g 敏感肌专用 神经酰胺护理 抵抗外部刺激",
// picUrl:
// "https://cdnimg.iotweixin.com/uploads/mall1285/20200503/979653726a7bc1df0e24464f94b404bd.jpg",
// price: "180.00",
// peopleNum: 2,
// pintuanPrice: "180.00",
// },
// {
// id: 178352,
// name: "500g 干羊肚菌 干货 煲汤菌 菌中之王 包邮",
// picUrl:
// "https://cdnimg.iotweixin.com/uploads/mall1285/20200311/358dd9acf5dafd3cab2c05be3354400c.png",
// price: "780.00",
// peopleNum: 3,
// pintuanPrice: "680.00",
// },
// ],
// listStyle: 1,
// textStyle: 1,
// fill: 1,
// goodsCoverProportion: "1-1",
// goodsStyle: 1,
// showGoodsName: true,
// showBuyBtn: true,
// buyBtnStyle: 1,
// buyBtnText: "去拼团",
// showGoodsTag: false,
// customizeGoodsTag: false,
// goodsTagPicUrl: "",
// showImg: false,
// backgroundColor: "#fff",
// backgroundPicUrl: "",
// position: 5,
// mode: 1,
// backgroundHeight: 100,
// backgroundWidth: 100,
// borderBackground: "#ffffff",
// },
// });
},
getReceive
()
{
//分享进入调取领券接口
// 1-分享,2-购买并付款
this
.
request2
(
{
this
.
request2
({
url
:
"/api/AppletUser/ShareCoupon"
,
data
:
{
TriggerType
:
1
,
...
...
@@ -1507,9 +1261,9 @@ export default {
this
.
$refs
.
son
[
0
].
getSmallShopById
(
2
);
//第一次登陆成功后去调取微店的信息
}
this
.
getPageType
();
//获取用户类型(校园)
let
IsOpenMiAi
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
.
is_show_miai
:
0
;
//是否开启相亲模式 5-13新加
let
IsOpenMiAi
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
.
is_show_miai
:
0
;
//是否开启相亲模式 5-13新加
if
(
this
.
u
.
IsOpenSchool
==
1
||
IsOpenMiAi
==
1
)
{
this
.
init
();
}
...
...
@@ -1517,15 +1271,13 @@ export default {
this
.
sharejump
();
},
getPageType
()
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/AppletUser/GetAppletUserPageType"
,
data
:
{},
},
(
res
)
=>
{
let
mall_UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
)
:
{};
let
mall_UserInfo
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
)
:
{};
mall_UserInfo
.
IsOpenSchool
=
res
.
data
.
IsOpenSchool
;
mall_UserInfo
.
UserPageType
=
res
.
data
.
UserPageType
;
uni
.
setStorageSync
(
"mall_UserInfo"
,
mall_UserInfo
);
...
...
@@ -1543,8 +1295,7 @@ export default {
},
goguidecar
()
{
uni
.
navigateTo
({
url
:
"/pages/guidecar/guidecarGoodsdetails?GoodsId="
+
url
:
"/pages/guidecar/guidecarGoodsdetails?GoodsId="
+
this
.
guidecar
.
GoodsId
+
"&address="
+
this
.
guidecar
.
address
+
...
...
@@ -1579,20 +1330,20 @@ export default {
});
},
},
};
};
</
script
>
<
style
>
.content
{
.content
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
overflow-x
:
hidden
;
/* align-items: center;
justify-content: center; */
}
}
.content
.tips_t
{
.content
.tips_t
{
position
:
fixed
;
right
:
6px
;
...
...
@@ -1605,9 +1356,9 @@ export default {
font-size
:
12px
;
margin-top
:
10px
;
z-index
:
9999999
;
}
}
.triangle-up
{
.triangle-up
{
width
:
0
;
height
:
0
;
border-left
:
10px
solid
transparent
;
...
...
@@ -1615,9 +1366,9 @@ export default {
border-bottom
:
12px
solid
black
;
position
:
fixed
;
right
:
65px
;
}
}
.index-title
{
.index-title
{
line-height
:
45px
!important
;
font-size
:
16px
;
text-align
:
center
;
...
...
@@ -1628,14 +1379,15 @@ export default {
color
:
#fff
;
box-sizing
:
content-box
;
z-index
:
5
;
}
}
.back-arrow
{
.back-arrow
{
position
:
absolute
;
left
:
5px
;
bottom
:
12.5px
;
}
.Startbtn
{
}
.Startbtn
{
position
:
absolute
;
top
:
10px
;
right
:
15px
;
...
...
@@ -1647,12 +1399,14 @@ export default {
align-items
:
center
;
justify-content
:
center
;
color
:
#fff
;
}
.MainTopLeft
{
}
.MainTopLeft
{
text-align
:
left
!important
;
padding-left
:
10px
;
}
/* .logo {
}
/* .logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
...
...
@@ -1670,9 +1424,10 @@ export default {
font-size: 36rpx;
color: #8f8f94;
} */
/* #ifdef MP-ALIPAY */
.indexpage
{
/* #ifdef MP-ALIPAY */
.indexpage
{
padding-bottom
:
100
rpx
;
}
/* #endif */
}
/* #endif */
</
style
>
pages/video/video.vue
View file @
0c94d53d
<
style
>
.nvideo_Page
{
width
:
100%
;
height
:
100%
;
height
:
98%
;
}
</
style
>
<
template
>
<view
class=
"nvideo_Page"
>
<view>
<playerVideo
:videoUrl=
"videoUrl"
:videoName=
"videoName"
:videoCoverImg=
"videoCoverImg"
:vWidth=
"vWidth"
:vHeight=
"vHeight"
></playerVideo>
<view
class=
"container"
>
<!--播放按钮-->
<image
v-if=
"!isPlay"
class=
"play-img"
@
click=
"videoPlayed"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/v_pause.png"
mode=
""
></image>
<view
class=
"videoTitle"
>
{{
videoName
}}
</view>
<video
:show-center-play-btn=
"false"
class=
"video-view"
id=
"myVideo"
ref=
"myVideo"
:src=
"videoUrl"
:poster=
"videoCoverImg"
:controls=
"controls"
:show-loading=
"true"
@
timeupdate=
"handleTimeUpdate"
@
loadedmetadata=
"loadedmetadata"
@
fullscreenchange=
"fullscreenchange"
@
play=
"playChange"
@
pause=
"pauseChange"
@
ended=
"ended"
:autoplay=
"false"
>
<view
class=
"videoControlsContainer flex justify-center"
>
<image
v-if=
"!isPlay"
class=
"play-icon"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/v_pause.png"
@
click=
"videoPlayed"
mode=
"aspectFill"
></image>
<image
v-else
class=
"pause-icon"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/v_start.png"
@
click=
"videoPause"
mode=
"aspectFill"
></image>
<view
class=
"slideBox"
>
<!--slider自定义播放控件-->
<slider
@
changing=
"sliderDown"
style=
"margin: 0;"
:value=
"value"
@
change=
"sliderChange"
activeColor=
"#FFFFFF"
backgroundColor=
"rgba(245, 245, 245, 0.45)"
block-color=
"#F5F5F5"
:block-size=
"14"
/>
</view>
<!--播放时间-->
<p
class=
"custdownTime"
>
{{
computedTime
(
nowPlayTime
)
}}
</p>
</view>
</video>
</view>
</view>
</
template
>
<
script
>
import
playerVideo
from
"./components/player-video.vue"
;
//离线订单弹窗
export
default
{
data
()
{
return
{
videoName
:
""
,
//视频名称
videoUrl
:
""
,
//视频地址
videoCoverImg
:
""
,
//封面图
vid
:
""
,
//视频Id
vWidth
:
""
,
//视频宽
vHeight
:
""
,
//视频高
videoPlay
:
0
,
videoContext
:
null
,
videoDuration
:
0
,
//总播放时长
isPlay
:
false
,
//判断是否播放
nowPlayTime
:
0
,
//当前播放时间
value
:
0
,
//当前滑块的值
controls
:
false
,
//是否隐藏默认控制器
isEnd
:
false
,
//播放是否结束
sliderAble
:
true
,
isSliderIng
:
false
}
},
components
:
{
playerVideo
},
onReady
()
{
},
onLoad
(
option
)
{
console
.
log
(
"option"
,
option
);
if
(
option
&&
option
.
vid
)
{
this
.
vid
=
option
.
vid
;
if
(
option
&&
option
.
vId
)
{
this
.
vid
=
option
.
vId
;
this
.
getVideoInfo
();
}
wx
.
showShareMenu
({
withShareTicket
:
true
,
menus
:
[
"shareAppMessage"
,
"shareTimeline"
],
});
},
methods
:
{
getVideoInfo
()
{
...
...
@@ -83,8 +105,107 @@
url
:
"/pages/index/index"
});
},
/**
* 播放
*/
videoPlayed
()
{
this
.
videoContext
.
play
()
},
/**
* 暂停
*/
videoPause
()
{
this
.
videoContext
.
pause
()
},
/**
* 滑块进行拖动进度播放
*/
sliderChange
(
e
)
{
this
.
isSliderIng
=
false
const
t
=
e
.
detail
.
value
/
100
this
.
videoContext
.
seek
(
t
*
this
.
videoDuration
);
this
.
nowPlayTime
=
t
*
this
.
videoDuration
console
.
log
(
t
*
this
.
videoDuration
);
},
/**
* 播放后触发方法,获得播放总时长
*/
handleTimeUpdate
(
e
)
{
// 设置滑块位置
if
(
!
this
.
isEnd
&&
!
this
.
isSliderIng
)
{
this
.
value
=
this
.
nowPlayTime
/
this
.
videoDuration
*
100
}
// 设置当前时间
this
.
nowPlayTime
=
e
.
detail
.
currentTime
// 首次获取到duration时存储它
if
(
this
.
videoDuration
===
0
&&
e
.
detail
.
duration
>
0
)
{
this
.
videoDuration
=
e
.
detail
.
duration
;
}
},
/**
* 初始化获得视频总时长
*/
loadedmetadata
(
e
)
{
this
.
nowPlayTime
=
e
.
detail
.
duration
},
computedTime
(
minutesAndSeconds
)
{
let
totalSeconds
=
Math
.
floor
(
minutesAndSeconds
)
*
60
+
Math
.
round
((
minutesAndSeconds
%
1
)
*
60
);
let
hours
=
Math
.
floor
(
totalSeconds
/
3600
);
let
minutes
=
Math
.
floor
((
totalSeconds
%
3600
)
/
60
);
hours
=
hours
.
toString
().
padStart
(
2
,
'0'
);
minutes
=
minutes
.
toString
().
padStart
(
2
,
'0'
);
return
`
${
hours
}
:
${
minutes
}
`
;
},
/**
* 监听是否为全屏,默认控制器是否显示
*/
fullscreenchange
(
e
)
{
if
(
e
.
detail
.
fullScreen
)
{
this
.
controls
=
true
}
else
{
this
.
controls
=
false
}
},
/**
* 监听是否播放
*/
playChange
()
{
this
.
isPlay
=
true
this
.
isEnd
=
false
this
.
sliderAble
=
false
},
/**
* 监听是否暂停
*/
pauseChange
()
{
this
.
isPlay
=
false
this
.
sliderAble
=
true
},
/**
* 是否播放完毕
*/
ended
(
e
)
{
this
.
isEnd
=
true
this
.
isPlay
=
false
this
.
value
=
0
this
.
videoContext
.
seek
(
0
);
this
.
videoContext
.
pause
();
},
/**
* 滑块滑动期间
*/
sliderDown
(
e
)
{
this
.
isSliderIng
=
true
const
t
=
e
.
detail
.
value
/
100
this
.
videoContext
.
seek
(
t
*
this
.
videoDuration
);
this
.
nowPlayTime
=
t
*
this
.
videoDuration
}
},
mounted
()
{
this
.
videoContext
=
uni
.
createVideoContext
(
'myVideo'
,
this
);
this
.
videoContext
.
stop
();
},
mounted
()
{},
created
()
{
uni
.
setNavigationBarTitle
({
title
:
"视频分享"
...
...
@@ -92,3 +213,73 @@
},
}
</
script
>
<
style
>
.container
{
position
:
absolute
;
}
.videoTitle
{
width
:
100%
;
height
:
200
rpx
;
position
:
absolute
;
top
:
10
rpx
;
left
:
20
rpx
;
font-size
:
25
rpx
;
color
:
white
;
z-index
:
1
;
}
.play-img
{
width
:
114
rpx
;
height
:
114
rpx
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-62%
);
z-index
:
2
;
}
.video-view
{
width
:
100vw
;
height
:
100vh
;
}
.videoControlsContainer
{
position
:
fixed
;
left
:
50%
;
bottom
:
60
rpx
;
transform
:
translateX
(
-50%
);
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
width
:
704
rpx
;
height
:
88
rpx
;
border-radius
:
20
rpx
;
/* background: rgba(255, 255, 255, 0.5); */
/* backdrop-filter: blur(20rpx); */
padding
:
0
31
rpx
;
box-sizing
:
border-box
;
}
.play-icon
{
padding-top
:
4
rpx
;
width
:
57
rpx
;
height
:
57
rpx
;
}
.pause-icon
{
padding-top
:
4
rpx
;
width
:
57
rpx
;
height
:
57
rpx
;
}
.custdownTime
{
font-size
:
22
rpx
;
font-weight
:
normal
;
color
:
white
;
}
.slideBox
{
width
:
481
rpx
;
}
</
style
>
plugin/api.js
View file @
0c94d53d
...
...
@@ -28,7 +28,6 @@ export default {
Vue
.
prototype
.
host2
=
"https://erpmallapi.oytour.com"
Vue
.
prototype
.
host3
=
"https://reborn.oytour.com"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
//网络请求
uni
.
request
({
...
...
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