Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 471c5817
authored
Nov 25, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
检查更新
1 parent
fcf8b782
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
98 deletions
App.vue
mixin/click.js
pages/boutique/index.vue
App.vue
View file @
471c581
...
@@ -8,10 +8,8 @@
...
@@ -8,10 +8,8 @@
-->
-->
<
script
>
<
script
>
const
PATH
=
[
'/pages/common/caseDetail'
]
const
PATH
=
[
'/pages/common/caseDetail'
]
import
checkUpdate
from
'@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js'
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
'vuex'
import
{
Ws
}
from
'@/ws/Ws.js'
import
{
Ws
}
from
'@/ws/Ws.js'
import
utils
from
'@/utils/utils'
export
default
{
export
default
{
computed
:
{
computed
:
{
...
mapState
(
'audio'
,
[
'isEnd'
,
'isStart'
])
...
mapState
(
'audio'
,
[
'isEnd'
,
'isStart'
])
...
@@ -30,26 +28,6 @@ export default {
...
@@ -30,26 +28,6 @@ export default {
new
Ws
().
connect
()
new
Ws
().
connect
()
},
},
methods
:
{
methods
:
{
async
handleCheck
()
{
const
{
textList
,
tempFileURL
,
version
}
=
uni
.
$storage
.
get
(
'mock_data'
)
const
res
=
utils
.
compareVersions
(
plus
?.
runtime
?.
version
,
version
)
if
(
res
>
-
1
)
{
return
}
const
e
=
{
result
:
{
is_silently
:
false
,
is_mandatory
:
true
,
name
:
''
,
title
:
''
,
contents
:
textList
.
join
(
'\n'
),
version
:
version
,
url
:
tempFileURL
,
stable_publish
:
true
}
}
checkUpdate
(
e
)
},
init
()
{
init
()
{
uni
.
addInterceptor
(
'navigateTo'
,
{
uni
.
addInterceptor
(
'navigateTo'
,
{
//监听跳转
//监听跳转
...
@@ -104,7 +82,6 @@ export default {
...
@@ -104,7 +82,6 @@ export default {
onShow
:
async
function
()
{
onShow
:
async
function
()
{
uni
.
$logger
.
local
.
info
(
'切回app'
)
uni
.
$logger
.
local
.
info
(
'切回app'
)
this
.
handleCheck
()
// const systemInfo = await uni.$api.systemApi.getMockData();
// const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) {
// if (systemInfo.isCheckedUpdate) {
// checkUpdate();
// checkUpdate();
...
...
mixin/click.js
View file @
471c581
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-11-2
2 17:10:27
* @LastEditTime: 2024-11-2
5 16:33:13
* @FilePath: \gl_tape\mixin\click.js
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -23,6 +23,7 @@ const audioTime = 10 * 60 * 1000
...
@@ -23,6 +23,7 @@ const audioTime = 10 * 60 * 1000
let
timer_interval
=
null
let
timer_interval
=
null
import
{
mapMutations
,
mapState
}
from
'vuex'
import
{
mapMutations
,
mapState
}
from
'vuex'
import
utils
from
'@/utils/utils.js'
import
utils
from
'@/utils/utils.js'
import
checkUpdate
from
'@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -34,6 +35,7 @@ export default {
...
@@ -34,6 +35,7 @@ export default {
},
},
async
mounted
()
{
async
mounted
()
{
uni
.
$logger
.
local
.
info
(
`进入接待首页!`
)
uni
.
$logger
.
local
.
info
(
`进入接待首页!`
)
this
.
handleCheck
()
// 检查更新
this
.
handleSave
(
false
)
this
.
handleSave
(
false
)
// 获取当前页面栈数组
// 获取当前页面栈数组
// const pages = getCurrentPages()
// const pages = getCurrentPages()
...
@@ -71,6 +73,27 @@ export default {
...
@@ -71,6 +73,27 @@ export default {
},
},
methods
:
{
methods
:
{
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
,
'setBooks'
,
'setAudioInfo'
]),
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
,
'setBooks'
,
'setAudioInfo'
]),
handleCheck
()
{
const
{
textList
,
tempFileURL
,
version
}
=
uni
.
$storage
.
get
(
'mock_data'
)
const
res
=
utils
.
compareVersions
(
plus
?.
runtime
?.
version
,
version
)
if
(
res
>
-
1
)
{
return
}
const
e
=
{
result
:
{
is_silently
:
false
,
is_mandatory
:
true
,
name
:
''
,
title
:
''
,
contents
:
textList
.
join
(
'\n'
),
version
:
version
,
url
:
tempFileURL
,
stable_publish
:
true
}
}
checkUpdate
(
e
)
},
// //关闭提示
// //关闭提示
tipCancel
()
{
tipCancel
()
{
this
.
stopAudio
()
this
.
stopAudio
()
...
...
pages/boutique/index.vue
View file @
471c581
<
template
>
<
template
>
<home-frame
<home-frame
@
preview=
"preview"
@
start=
"$refs.customerTypeRef.open()"
ref=
"home"
:id=
"id"
@
openStep=
"openStep"
@
backHome=
"backHome"
finishDoneText=
"下一步"
finishContene=
"当前操作是为强制退出接待,若完成客户接待请点击「下一步」。"
@
previewCancel=
"cancel"
@
previewClose=
"previewOff = false"
>
@
preview=
"preview"
@
start=
"$refs.customerTypeRef.open()"
ref=
"home"
:id=
"id"
@
openStep=
"openStep"
@
backHome=
"backHome"
finishDoneText=
"下一步"
finishContene=
"当前操作是为强制退出接待,若完成客户接待请点击「下一步」。"
@
previewCancel=
"cancel"
@
previewClose=
"previewOff = false"
>
<template
slot=
"module"
>
<template
slot=
"module"
>
<view
class=
"module-box"
>
<view
class=
"module-box"
>
<view
class=
"module-flex flex"
>
<view
class=
"module-flex flex"
>
<template
v-for=
"(i,index) in moduleList"
>
<template
v-for=
"(i, index) in moduleList"
>
<view
<view
class=
"item flex"
:key=
"index"
v-if=
"!i.hide"
@
click=
"toDetail(i)"
>
class=
"item flex"
<image
:src=
"i.thumbnail"
class=
"icon"
/>
:key=
"index"
{{
i
.
title
}}
v-if=
"!i.hide"
@
click=
"toDetail(i)"
>
<image
:src=
"i.thumbnail"
class=
"icon"
/>
{{
i
.
title
}}
</view>
</view>
</
template
>
</
template
>
</view>
</view>
<view
class=
"center-bg"
></view>
<view
class=
"center-bg"
></view>
<view
class=
"banner-tab-box flex"
>
<view
class=
"banner-tab-box flex"
>
<
template
v-for=
"(item, index) in carBannerList"
>
<
template
v-for=
"(item, index) in carBannerList"
>
<view
<view
:key=
"index"
:class=
"['banner-tab', `$
{currentIndex == index ? 'active' : ''}`]" @click="changeIndex(index)">
:key=
"index"
{{
item
.
title
}}
:class=
"['banner-tab',`$
{currentIndex == index ? 'active' : ''}`]"
@click="changeIndex(index)"
>
{{
item
.
title
}}
</view>
</view>
</
template
>
</
template
>
</view>
</view>
<swiper
<swiper
class=
"swiper"
circular
:autoplay=
"bannerAutoplay && !previewOff"
interval=
"3000"
previous-margin=
"380rpx"
next-margin=
"448rpx"
@
change=
"swiperChange"
:current=
"currentIndex"
>
class=
"swiper"
circular
:autoplay=
"bannerAutoplay && !previewOff"
interval=
"3000"
previous-margin=
"380rpx"
next-margin=
"448rpx"
@
change=
"swiperChange"
:current=
"currentIndex"
>
<
template
v-for=
"(item, index) in carBannerList"
>
<
template
v-for=
"(item, index) in carBannerList"
>
<swiper-item
<swiper-item
:key=
"index"
:class=
"['swiper-item flex', carClass(index)]"
@
click
.
prevent=
"clickCar(item, index)"
>
:key=
"index"
<image
:src=
"item.url"
class=
"car-item"
/>
:class=
"['swiper-item flex',carClass(index)]"
@
click
.
prevent=
"clickCar(item, index)"
>
<image
:src=
"item.url"
class=
"car-item"
/>
<template
v-if=
"currentIndex == index"
>
<template
v-if=
"currentIndex == index"
>
<view
class=
"config-box"
>
<view
class=
"config-box"
>
<template
v-for=
"(i,ind) in item.configList"
>
<template
v-for=
"(i, ind) in item.configList"
>
<view
<view
:class=
"['config-item', i.class]"
:key=
"ind"
@
click
.
stop=
"toDetail(
{ id: 1, tabId: i.tabId })">
:class=
"['config-item',i.class]"
:key=
"ind"
@
click
.
stop=
"toDetail(
{id:1,tabId:i.tabId})"
>
<view
class=
"config-dots"
></view>
<view
class=
"config-dots"
></view>
<view
class=
"config-name flex"
>
<view
class=
"config-name flex"
>
<view
:class=
"['sprite-icon',`icon-$
{i.icon}`]">
</view>
<view
:class=
"['sprite-icon',
`icon-$
{i.icon}`]">
</view>
{{
i
.
name
}}
{{
i
.
name
}}
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -88,25 +45,10 @@
...
@@ -88,25 +45,10 @@
</view>
</view>
</template>
</template>
<
template
slot=
"detail"
>
<
template
slot=
"detail"
>
<detail
<detail
:id
.
sync=
"id"
:media=
"moduleList"
:type
.
sync=
"type"
:toolList=
"toolList"
@
back=
"back"
@
done=
"done"
ref=
"detail"
:customerType
.
sync=
"customerType"
@
reception=
"reception"
:tabId
.
sync=
"tabId"
:currentCar=
"currentCar"
/>
:id
.
sync=
"id"
:media=
"moduleList"
:type
.
sync=
"type"
:toolList=
"toolList"
@
back=
"back"
@
done=
"done"
ref=
"detail"
:customerType
.
sync=
"customerType"
@
reception=
"reception"
:tabId
.
sync=
"tabId"
:currentCar=
"currentCar"
/>
</
template
>
</
template
>
<
template
slot=
"content"
>
<
template
slot=
"content"
>
<customer-type
<customer-type
ref=
"customerTypeRef"
@
choose=
"chooseCustomerType"
/>
ref=
"customerTypeRef"
@
choose=
"chooseCustomerType"
/>
</
template
>
</
template
>
</home-frame>
</home-frame>
</template>
</template>
...
@@ -187,6 +129,9 @@ export default {
...
@@ -187,6 +129,9 @@ export default {
},
},
onLoad
()
{
onLoad
()
{
this
.
init
();
this
.
init
();
uni
.
$api
.
systemApi
.
getMockData
(
true
).
then
(
res
=>
{
console
.
log
(
res
)
})
},
},
onShow
()
{
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment