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 90700245
authored
Nov 07, 2024
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'feature_v1.1.0' of
http://192.168.3.233:8090/glsx/gl_tape
into feature_v1.1.0
2 parents
5d22652c
63d0b6d4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
136 additions
and
81 deletions
config.js
manifest.json
mixin/click.js
mixin/uploader.js
pages/common/components/AccountList.vue
pages/common/components/MerchantList.vue
pages/common/components/Scene.vue
pages/common/login.vue
pages/equity/detail/detail.vue
pages/equity/index.vue
config.js
View file @
9070024
...
@@ -13,10 +13,10 @@ module.exports = {
...
@@ -13,10 +13,10 @@ module.exports = {
// 与后端约定的token字段名
// 与后端约定的token字段名
TOKEN_NAME
:
'glsk-oss'
,
TOKEN_NAME
:
'glsk-oss'
,
// PROTOCAL: 'http',
// PROTOCAL: 'http',
// SERVER: 'app-admin-server.test.glsx.com.cn',
// SERVER: 'app-admin-server.test.glsx.com.cn',
// SOCKET_PORT: '9081',
// SOCKET_PORT: '9081',
// HTTP_PORT: '3000',
// HTTP_PORT: '3000',
HTTP_SERVER
:
'
app-admin-server.test.glsx.com.cn'
,
HTTP_SERVER
:
'http://
app-admin-server.test.glsx.com.cn'
,
SOCKET_SERVER
:
'
app-admin-server.test.glsx.com.cn'
,
SOCKET_SERVER
:
'http://
app-admin-server.test.glsx.com.cn'
,
FILE_UPLOAD_URL
:
'file/upload'
,
FILE_UPLOAD_URL
:
'file/upload'
}
}
manifest.json
View file @
9070024
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
"name"
:
"展业助手"
,
"name"
:
"展业助手"
,
"appid"
:
"__UNI__D3BD3DF"
,
"appid"
:
"__UNI__D3BD3DF"
,
"description"
:
""
,
"description"
:
""
,
"versionName"
:
"
1.9.1
"
,
"versionName"
:
"
2.0.0
"
,
"versionCode"
:
"100"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
/*
5
+App特有相关
*/
...
...
mixin/click.js
View file @
9070024
...
@@ -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-1
0-31 15:00:45
* @LastEditTime: 2024-1
1-05 16:49:39
* @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
*/
*/
...
@@ -20,27 +20,28 @@ const AUDIO_STATUS = {
...
@@ -20,27 +20,28 @@ const AUDIO_STATUS = {
ABNORMAL
:
'abnormal'
//40分钟未触碰平板,断开录音,不提交记录
ABNORMAL
:
'abnormal'
//40分钟未触碰平板,断开录音,不提交记录
}
}
const
audioTime
=
10
*
60
*
1000
const
audioTime
=
10
*
60
*
1000
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'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
voicePath
:
''
,
voicePath
:
''
,
timer
:
null
,
times
:
0
,
times
:
0
,
timeout
:
240
,
timeout
:
240
,
reaction
:
1
reaction
:
1
}
}
},
},
async
mounted
()
{
async
mounted
()
{
uni
.
$logger
.
local
.
info
(
`进入接待首页!`
)
this
.
handleSave
(
false
)
this
.
handleSave
(
false
)
// 获取当前页面栈数组
// 获取当前页面栈数组
const
pages
=
getCurrentPages
()
//
const pages = getCurrentPages()
const
currentPage
=
pages
[
pages
.
length
-
1
]
//
const currentPage = pages[pages.length - 1]
const
route
=
currentPage
.
route
//
const route = currentPage.route
const
url
=
[
'pages/equity/index'
,
'pages/boutique/index'
]
//
const url = ['pages/equity/index', 'pages/boutique/index']
if
(
url
.
includes
(
route
))
return
//
if (url.includes(route)) return
this
.
initTime
()
//
this.initTime()
},
},
watch
:
{
watch
:
{
/**
/**
...
@@ -89,9 +90,7 @@ export default {
...
@@ -89,9 +90,7 @@ export default {
this
.
$refs
.
tipBox
?.
close
()
this
.
$refs
.
tipBox
?.
close
()
},
},
closeAudio
()
{
closeAudio
()
{
this
.
times
=
0
this
.
endWatchClick
()
clearInterval
(
this
.
timer
)
this
.
timer
=
null
this
.
stopAudio
(
AUDIO_STATUS
.
ABNORMAL
)
this
.
stopAudio
(
AUDIO_STATUS
.
ABNORMAL
)
this
.
setReceptionStatus
(
0
)
this
.
setReceptionStatus
(
0
)
this
.
setAudioInfo
({
endReasonType
:
1
})
this
.
setAudioInfo
({
endReasonType
:
1
})
...
@@ -168,7 +167,7 @@ export default {
...
@@ -168,7 +167,7 @@ export default {
this
.
initTime
()
this
.
initTime
()
this
.
setAudioInfo
({
audioList
:
[],
audioStatus
:
AUDIO_STATUS
.
START
})
this
.
setAudioInfo
({
audioList
:
[],
audioStatus
:
AUDIO_STATUS
.
START
})
recorderManager
.
onStart
(()
=>
{
recorderManager
.
onStart
(()
=>
{
uni
.
$logger
.
local
.
info
(
'开
始录音
'
)
uni
.
$logger
.
local
.
info
(
'开
启录音!
'
)
//开始录音保持记录,1s延时是因为第一段录音结束时间的文件修改时间等于第二段开始的文件修改时间,加上1s延时,就不会这个问题
//开始录音保持记录,1s延时是因为第一段录音结束时间的文件修改时间等于第二段开始的文件修改时间,加上1s延时,就不会这个问题
setTimeout
(()
=>
{
setTimeout
(()
=>
{
const
params
=
this
.
getParams
(
this
.
$store
.
state
.
user
.
customerInfo
,
this
.
booksList
,
this
.
receptionStatus
)
const
params
=
this
.
getParams
(
this
.
$store
.
state
.
user
.
customerInfo
,
this
.
booksList
,
this
.
receptionStatus
)
...
@@ -181,14 +180,16 @@ export default {
...
@@ -181,14 +180,16 @@ export default {
numberOfChannels
:
1
numberOfChannels
:
1
})
})
recorderManager
.
onStop
(
async
res
=>
{
recorderManager
.
onStop
(
async
res
=>
{
uni
.
$logger
.
local
.
info
(
'结束录音'
)
//第一段录音结束,还在接待中,则开启第二段录音
//第一段录音结束,还在接待中,则开启第二段录音
if
(
this
.
audioInfo
.
audioStatus
==
AUDIO_STATUS
.
START
)
{
if
(
this
.
audioInfo
.
audioStatus
==
AUDIO_STATUS
.
START
)
{
uni
.
$logger
.
local
.
info
(
'接待中,再次开启录音!'
)
uni
.
getRecorderManager
().
start
({
uni
.
getRecorderManager
().
start
({
duration
:
audioTime
,
duration
:
audioTime
,
sampleRate
:
16000
,
sampleRate
:
16000
,
numberOfChannels
:
1
numberOfChannels
:
1
})
})
}
else
{
uni
.
$logger
.
local
.
info
(
'断开录音!'
)
}
}
})
})
},
300
),
},
300
),
...
@@ -263,7 +264,7 @@ export default {
...
@@ -263,7 +264,7 @@ export default {
* @returns {void}
* @returns {void}
*/
*/
stopAudio
:
utils
.
throttle
(
async
function
(
status
)
{
stopAudio
:
utils
.
throttle
(
async
function
(
status
)
{
uni
.
$logger
.
local
.
info
(
'结束接待'
)
uni
.
$logger
.
local
.
info
(
'结束接待
!
'
)
// const result = await this.$permision.requestAndroidPermission(
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// "android.permission.RECORD_AUDIO"
// );
// );
...
@@ -277,11 +278,13 @@ export default {
...
@@ -277,11 +278,13 @@ export default {
//如果是40分钟未触碰平板,只要断开录音即可
//如果是40分钟未触碰平板,只要断开录音即可
if
(
status
==
AUDIO_STATUS
.
ABNORMAL
)
{
if
(
status
==
AUDIO_STATUS
.
ABNORMAL
)
{
this
.
setAudioInfo
({
audioStatus
:
AUDIO_STATUS
.
ABNORMAL
})
this
.
setAudioInfo
({
audioStatus
:
AUDIO_STATUS
.
ABNORMAL
})
uni
.
$logger
.
local
.
info
(
'40分钟未触碰平板,断开录音!'
)
recorderManager
.
stop
()
recorderManager
.
stop
()
return
return
}
}
//如果是40分钟未触碰平板后完成接待,需要保存记录
//如果是40分钟未触碰平板后完成接待,需要保存记录
if
(
this
.
audioInfo
.
audioStatus
==
AUDIO_STATUS
.
ABNORMAL
&&
status
!=
true
)
{
if
(
this
.
audioInfo
.
audioStatus
==
AUDIO_STATUS
.
ABNORMAL
&&
status
!=
true
)
{
uni
.
$logger
.
local
.
info
(
'40分钟未触碰平板,保存记录!'
)
this
.
setAudioInfo
({
audioStatus
:
AUDIO_STATUS
.
END
})
this
.
setAudioInfo
({
audioStatus
:
AUDIO_STATUS
.
END
})
this
.
handleSave
()
this
.
handleSave
()
return
return
...
@@ -300,34 +303,38 @@ export default {
...
@@ -300,34 +303,38 @@ export default {
this
.
handleSave
()
this
.
handleSave
()
}
}
},
3000
)
},
3000
)
this
.
times
=
0
this
.
endWatchClick
()
clearInterval
(
this
.
timer
)
this
.
timer
=
null
if
(
status
)
{
if
(
status
)
{
uni
.
$logger
.
local
.
info
(
'退出接待'
)
uni
.
$logger
.
local
.
info
(
'退出接待
,不保存记录!
'
)
this
.
removeRecords
()
this
.
removeRecords
()
}
}
recorderManager
.
stop
()
recorderManager
.
stop
()
},
1500
),
},
1500
),
//监听点击事件
//监听点击事件
initTime
()
{
initTime
()
{
if
(
this
.
audioInfo
.
audioStatus
!=
AUDIO_STATUS
.
START
)
return
if
(
timer_interval
)
{
this
.
timer
=
setInterval
(()
=>
{
this
.
endWatchClick
()
// console.log(this.times);
}
timer_interval
=
setInterval
(()
=>
{
this
.
times
++
this
.
times
++
console
.
log
(
this
.
times
,
'this.times'
)
if
(
this
.
times
>=
this
.
timeout
)
{
if
(
this
.
times
>=
this
.
timeout
)
{
//关闭录音
//关闭录音
this
.
closeAudio
()
this
.
closeAudio
()
clearInterval
(
this
.
timer
)
}
}
},
1000
*
10
)
},
1000
*
10
)
},
},
endWatchClick
()
{
console
.
log
(
timer_interval
,
'endWatchClick'
)
if
(
timer_interval
)
clearInterval
(
timer_interval
)
timer_interval
=
null
this
.
times
=
0
},
handleTouchStart
()
{
handleTouchStart
()
{
this
.
times
=
0
this
.
times
=
0
}
}
},
},
beforeCreate
()
{
beforeCreate
()
{
clearInterval
(
this
.
timer
)
// this.endWatchClick && this.endWatchClick()
this
.
timer
=
null
}
}
}
}
mixin/uploader.js
View file @
9070024
...
@@ -8,7 +8,7 @@ export default {
...
@@ -8,7 +8,7 @@ export default {
return
{
return
{
wv
:
null
,
wv
:
null
,
snapshot
:
null
,
snapshot
:
null
,
interval
:
60
*
1
,
interval
:
60
*
5
,
timer
:
null
timer
:
null
}
}
},
},
...
...
pages/common/components/AccountList.vue
View file @
9070024
...
@@ -47,6 +47,7 @@ export default {
...
@@ -47,6 +47,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
getListSelectAccount
()
this
.
getListSelectAccount
()
uni
.
$logger
.
local
.
info
(
`进入选择账号页面!`
)
},
},
methods
:
{
methods
:
{
getListSelectAccount
(
autoLogin
=
false
)
{
getListSelectAccount
(
autoLogin
=
false
)
{
...
@@ -89,10 +90,14 @@ export default {
...
@@ -89,10 +90,14 @@ export default {
},
},
async
choiceAccountLogin
()
{
async
choiceAccountLogin
()
{
let
{
loginUserInfoList
}
=
this
,
let
{
loginUserInfoList
}
=
this
,
id
=
null
id
=
null
,
merchantName
=
null
console
.
log
(
loginUserInfoList
,
'loginUserInfoList'
)
loginUserInfoList
.
map
(
e
=>
{
loginUserInfoList
.
map
(
e
=>
{
if
(
e
.
active
)
id
=
e
.
uuid
if
(
e
.
active
)
{
id
=
e
.
uuid
merchantName
=
e
.
merchantName
}
})
})
if
(
!
id
)
{
if
(
!
id
)
{
...
@@ -104,10 +109,10 @@ export default {
...
@@ -104,10 +109,10 @@ export default {
}
}
// 清空4s店数据
// 清空4s店数据
// app.globalData.storeListRange = []
// app.globalData.storeListRange = []
this
.
selectAccountLogin
(
id
)
this
.
selectAccountLogin
(
id
,
merchantName
)
},
},
selectAccountLogin
(
id
)
{
selectAccountLogin
(
id
,
merchantName
)
{
uni
.
$logger
.
local
.
info
(
`选择账号
登录
`
)
uni
.
$logger
.
local
.
info
(
`选择账号
${
merchantName
}
登录!
`
)
uni
.
showLoading
({
uni
.
showLoading
({
mask
:
true
mask
:
true
})
})
...
@@ -119,7 +124,8 @@ export default {
...
@@ -119,7 +124,8 @@ export default {
title
:
'获取4S店列表失败'
,
title
:
'获取4S店列表失败'
,
icon
:
'none'
,
icon
:
'none'
,
})
})
}).
catch
(()
=>
{
}).
catch
((
err
)
=>
{
uni
.
$logger
.
local
.
error
(
`获取4S店列表失败
${
err
}
!`
)
uni
.
hideLoading
()
uni
.
hideLoading
()
})
})
},
},
...
...
pages/common/components/MerchantList.vue
View file @
9070024
...
@@ -44,6 +44,7 @@ export default {
...
@@ -44,6 +44,7 @@ export default {
},
},
methods
:
{
methods
:
{
init
(
userInfo
)
{
init
(
userInfo
)
{
uni
.
$logger
.
info
(
`进入选择4s店页面!`
)
this
.
userInfo
=
userInfo
this
.
userInfo
=
userInfo
this
.
getSceneArr
()
this
.
getSceneArr
()
},
},
...
@@ -87,7 +88,7 @@ export default {
...
@@ -87,7 +88,7 @@ export default {
})
})
},
},
chooseAccount
(
item
)
{
chooseAccount
(
item
)
{
uni
.
$logger
.
info
(
`选择4s店`
)
uni
.
$logger
.
info
(
`选择4s店
${
item
.
merchantName
}
!
`
)
uni
.
showLoading
({
uni
.
showLoading
({
mask
:
true
mask
:
true
})
})
...
...
pages/common/components/Scene.vue
View file @
9070024
...
@@ -47,6 +47,7 @@ export default {
...
@@ -47,6 +47,7 @@ export default {
init
(
userInfo
)
{
init
(
userInfo
)
{
this
.
userInfo
=
userInfo
this
.
userInfo
=
userInfo
this
.
getSceneArr
()
this
.
getSceneArr
()
uni
.
$logger
.
local
.
info
(
`进入选择场景页!`
)
},
},
getSceneArr
()
{
getSceneArr
()
{
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -68,7 +69,7 @@ export default {
...
@@ -68,7 +69,7 @@ export default {
},
},
// 选择场景
// 选择场景
async
selectScene
({
sceneType
},
index
)
{
async
selectScene
({
sceneType
},
index
)
{
uni
.
$logger
.
local
.
info
(
`选择场景`
)
uni
.
$logger
.
local
.
info
(
`选择场景
${
sceneType
}
!
`
)
let
{
sceneList
,
openSceneArr
,
userInfo
}
=
this
let
{
sceneList
,
openSceneArr
,
userInfo
}
=
this
try
{
try
{
if
(
!
openSceneArr
.
includes
(
sceneType
)
&&
!
userInfo
?.
isSuper
)
return
uni
.
showToast
({
if
(
!
openSceneArr
.
includes
(
sceneType
)
&&
!
userInfo
?.
isSuper
)
return
uni
.
showToast
({
...
@@ -105,6 +106,7 @@ export default {
...
@@ -105,6 +106,7 @@ export default {
}
}
},
},
async
jump
(
userInfo
,
data
)
{
async
jump
(
userInfo
,
data
)
{
uni
.
$logger
.
local
.
info
(
`跳转进入首页!`
)
try
{
try
{
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
data
)
userInfo
.
loginRoleOnSelectMerchant
=
data
?.
loginRoleOnSelectMerchant
if
(
data
)
userInfo
.
loginRoleOnSelectMerchant
=
data
?.
loginRoleOnSelectMerchant
...
@@ -128,7 +130,7 @@ export default {
...
@@ -128,7 +130,7 @@ export default {
url
url
})
})
}
catch
(
error
)
{
}
catch
(
error
)
{
uni
.
$logger
.
local
.
error
(
`选择场景后跳转异常:
${
error
}
`
)
uni
.
$logger
.
local
.
error
(
`选择场景后跳转异常:
${
error
}
!
`
)
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
showToast
({
uni
.
showToast
({
title
:
error
,
title
:
error
,
...
...
pages/common/login.vue
View file @
9070024
...
@@ -99,6 +99,7 @@ export default {
...
@@ -99,6 +99,7 @@ export default {
const
{
code
,
message
}
=
await
uni
.
$api
.
userApi
.
getSmsCode
({
mobile
});
const
{
code
,
message
}
=
await
uni
.
$api
.
userApi
.
getSmsCode
({
mobile
});
uni
.
hideLoading
();
uni
.
hideLoading
();
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
uni
.
$logger
.
local
.
info
(
`
${
mobile
}
发送验证码成功`
)
uni
.
showToast
({
uni
.
showToast
({
title
:
'验证码已发送'
,
title
:
'验证码已发送'
,
icon
:
'none'
,
icon
:
'none'
,
...
@@ -106,6 +107,7 @@ export default {
...
@@ -106,6 +107,7 @@ export default {
this
.
countDown
(
60
);
this
.
countDown
(
60
);
}
else
throw
message
||
'发送验证码失败'
;
}
else
throw
message
||
'发送验证码失败'
;
}
catch
(
error
)
{
}
catch
(
error
)
{
uni
.
$logger
.
local
.
info
(
`
${
mobile
}
发送验证码失败,失败原因:
${
error
}
`
)
uni
.
hideLoading
();
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
title
:
error
,
title
:
error
,
...
@@ -145,7 +147,7 @@ export default {
...
@@ -145,7 +147,7 @@ export default {
this
.
jump
(
data
,
noSignIn
);
this
.
jump
(
data
,
noSignIn
);
uni
.
$logger
.
local
.
info
(
`
${
mobile
}
登录`
)
uni
.
$logger
.
local
.
info
(
`
${
mobile
}
登录`
)
}
}
else
else
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'温馨提示'
,
title
:
'温馨提示'
,
content
:
message
,
content
:
message
,
...
@@ -153,7 +155,11 @@ export default {
...
@@ -153,7 +155,11 @@ export default {
confirmText
:
'知道了'
,
confirmText
:
'知道了'
,
confirmColor
:
'#347BFF'
,
confirmColor
:
'#347BFF'
,
});
});
uni
.
$logger
.
local
.
info
(
`
${
mobile
}
登录失败,失败原因:
${
message
}
`
)
}
}
catch
(
error
)
{
}
catch
(
error
)
{
uni
.
$logger
.
local
.
info
(
`
${
mobile
}
登录失败,失败原因:
${
error
}
`
)
uni
.
hideLoading
();
uni
.
hideLoading
();
uni
.
showToast
({
uni
.
showToast
({
title
:
error
,
title
:
error
,
...
...
pages/equity/detail/detail.vue
View file @
9070024
...
@@ -91,7 +91,7 @@ import FinishStep from '@/components/FinishStep.vue';
...
@@ -91,7 +91,7 @@ import FinishStep from '@/components/FinishStep.vue';
import
{
mapMutations
}
from
"vuex"
;
import
{
mapMutations
}
from
"vuex"
;
import
informationEntry
from
'./components/informationEntry.vue'
import
informationEntry
from
'./components/informationEntry.vue'
import
insurance
from
'@/components/Insurance/Insurance.vue'
import
insurance
from
'@/components/Insurance/Insurance.vue'
import
{
receptionTrackMixin
}
from
'@/mixin/index.js'
import
{
receptionTrackMixin
}
from
'@/mixin/index.js'
export
default
{
export
default
{
components
:
{
components
:
{
ToolBox
,
ToolBox
,
...
@@ -152,10 +152,10 @@ export default {
...
@@ -152,10 +152,10 @@ export default {
const
{
channelType
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
{
channelType
}
=
uni
.
$storage
.
get
(
"userInfo"
)
return
channelType
==
2
return
channelType
==
2
},
},
isPreview
()
{
isPreview
()
{
return
this
.
type
==
'preview'
return
this
.
type
==
'preview'
}
}
},
},
watch
:
{
watch
:
{
watchStatus
:
{
watchStatus
:
{
...
@@ -185,6 +185,7 @@ export default {
...
@@ -185,6 +185,7 @@ export default {
})
})
this
.
receptionTrackLeave
()
this
.
receptionTrackLeave
()
this
.
$emit
(
'update:id'
,
e
.
id
)
this
.
$emit
(
'update:id'
,
e
.
id
)
uni
.
$logger
.
local
.
info
(
`预览
${
e
.
title
}
`
)
},
},
back
()
{
back
()
{
this
.
$refs
?.
toolRef
?.
hide
()
this
.
$refs
?.
toolRef
?.
hide
()
...
@@ -221,10 +222,11 @@ export default {
...
@@ -221,10 +222,11 @@ export default {
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
Math
.
abs
(
this
.
startY
-
touch
.
pageY
)
>
100
)
return
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
!
scaleValueObject
[
id
])
scaleValueObject
[
id
]
=
1
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
&&
!
productModelStatus
)
{
if
(
isDistanceSignificant
&&
index
!=
-
1
&&
scaleValueObject
[
id
]
==
1
&&
!
productModelStatus
)
{
const
{
nextId
,
modeName
}
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
const
{
nextId
,
modeName
,
title
}
=
this
.
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
this
.
modeName
=
modeName
this
.
modeName
=
modeName
this
.
receptionTrackLeave
()
this
.
receptionTrackLeave
()
this
.
$emit
(
'update:id'
,
nextId
)
this
.
$emit
(
'update:id'
,
nextId
)
uni
.
$logger
.
local
.
info
(
`预览
${
title
}
`
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
modeName
=
''
this
.
modeName
=
''
},
500
)
},
500
)
...
@@ -234,25 +236,26 @@ export default {
...
@@ -234,25 +236,26 @@ export default {
}
}
},
},
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
{
getNextId
(
index
,
toolList
,
startX
,
halfScreenWidth
)
{
let
nextI
d
=
''
,
let
nextI
tem
=
{}
,
modeName
=
''
modeName
=
''
if
(
startX
>
halfScreenWidth
)
{
if
(
startX
>
halfScreenWidth
)
{
nextI
d
=
index
===
toolList
.
length
-
1
?
toolList
[
0
].
id
:
toolList
[
index
+
1
].
id
;
nextI
tem
=
index
===
toolList
.
length
-
1
?
toolList
[
0
]
:
toolList
[
index
+
1
]
;
modeName
=
'to-right'
modeName
=
'to-right'
}
else
{
}
else
{
nextI
d
=
index
===
0
?
toolList
[
toolList
.
length
-
1
].
id
:
toolList
[
index
-
1
].
id
;
nextI
tem
=
index
===
0
?
toolList
[
toolList
.
length
-
1
]
:
toolList
[
index
-
1
]
;
modeName
=
'to-left'
modeName
=
'to-left'
}
}
return
{
return
{
nextId
,
nextId
:
nextItem
.
id
,
modeName
modeName
,
title
:
nextItem
.
title
}
}
},
},
scale
(
e
)
{
scale
(
e
)
{
let
{
id
}
=
this
let
{
id
}
=
this
this
.
scaleValueObject
[
id
]
=
e
this
.
scaleValueObject
[
id
]
=
e
},
},
},
},
};
};
...
...
pages/equity/index.vue
View file @
9070024
<
template
>
<
template
>
<view>
<view>
<home-frame
@
preview=
"preview"
@
start=
"start"
ref=
"home"
:id=
"id"
@
openStep=
"openStep"
@
backHome=
"backHome"
@
changeTab=
"changeTab"
>
<home-frame
<view
class=
"module-box"
slot=
"module"
>
@
preview=
"preview"
@
start=
"start"
ref=
"home"
:id=
"id"
@
openStep=
"openStep"
@
backHome=
"backHome"
@
changeTab=
"changeTab"
>
<view
class=
"module-box"
slot=
"module"
>
<template
v-for=
"(i, index) in moduleList"
>
<template
v-for=
"(i, index) in moduleList"
>
<view
:key=
"index"
:class=
"['item', i.class]"
:style=
"i.style"
@
click=
"toDetail(i)"
v-if=
"!i.hide"
>
<view
:key=
"index"
:class=
"['item', i.class]"
:style=
"i.style"
@
click=
"toDetail(i)"
v-if=
"!i.hide"
>
<template
v-if=
"i.showAlt"
>
<template
v-if=
"i.showAlt"
>
<view
class=
"item-text flex"
>
{{
i
.
title
}}
</view>
<view
class=
"item-text flex"
>
{{
i
.
title
}}
</view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<image
class=
"item-img"
:src=
"i.thumbnail"
mode=
"scaleToFill"
@
error=
"errorImg(index)"
/>
<image
class=
"item-img"
:src=
"i.thumbnail"
mode=
"scaleToFill"
@
error=
"errorImg(index)"
/>
</
template
>
</
template
>
</view>
</view>
</template>
</template>
</view>
</view>
<
template
slot=
"detail"
>
<
template
slot=
"detail"
>
<detail
:id
.
sync=
"id"
:media=
"moduleList"
:type
.
sync=
"type"
:toolList=
"toolList"
@
back=
"back"
@
done=
"done"
ref=
"detail"
/>
<detail
:id
.
sync=
"id"
:media=
"moduleList"
:type
.
sync=
"type"
:toolList=
"toolList"
@
back=
"back"
@
done=
"done"
ref=
"detail"
/>
</
template
>
</
template
>
<
template
slot=
"content"
>
<
template
slot=
"content"
>
<!--
<novice-guide
<!--
<novice-guide
...
@@ -42,7 +72,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue'
...
@@ -42,7 +72,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue'
export
default
{
export
default
{
// mixins: [storge],
// mixins: [storge],
components
:
{
HomeFrame
,
detail
,
NoviceGuide
},
components
:
{
HomeFrame
,
detail
,
NoviceGuide
},
data
()
{
data
()
{
return
{
return
{
moduleList
:
[],
moduleList
:
[],
toolList
:
[],
toolList
:
[],
...
@@ -54,12 +84,12 @@ export default {
...
@@ -54,12 +84,12 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
channelType
()
{
channelType
()
{
const
{
channelType
}
=
uni
.
$storage
.
get
(
'userInfo'
)
const
{
channelType
}
=
uni
.
$storage
.
get
(
'userInfo'
)
return
channelType
||
1
//默认问界
return
channelType
||
1
//默认问界
}
}
},
},
onBackPress
(
options
)
{
onBackPress
(
options
)
{
if
(
options
.
from
===
'backbutton'
)
{
if
(
options
.
from
===
'backbutton'
)
{
// 物理返回按钮触发
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
// 阻止默认行为,即不执行页面返回
...
@@ -69,12 +99,12 @@ export default {
...
@@ -69,12 +99,12 @@ export default {
// 其他情况允许正常返回
// 其他情况允许正常返回
return
false
return
false
},
},
onLoad
()
{
onLoad
()
{
this
.
setViewInfo
()
this
.
setViewInfo
()
this
.
getSoure
()
this
.
getSoure
()
this
.
get_Vehicle_Sales_Data
()
this
.
get_Vehicle_Sales_Data
()
},
},
onShow
()
{
onShow
()
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
if
(
!
userInfo
.
shopMerchantId
||
!
userInfo
.
shopMerchantName
)
{
uni
.
$storage
.
rm
(
'userInfo'
)
uni
.
$storage
.
rm
(
'userInfo'
)
...
@@ -88,11 +118,11 @@ export default {
...
@@ -88,11 +118,11 @@ export default {
},
},
methods
:
{
methods
:
{
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
]),
...
mapMutations
(
'audio'
,
[
'setReceptionStatus'
]),
init
()
{
init
()
{
this
.
findPayInfo
()
this
.
findPayInfo
()
},
},
/**获取车型&销售数据 */
/**获取车型&销售数据 */
get_Vehicle_Sales_Data
()
{
get_Vehicle_Sales_Data
()
{
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
),
const
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
),
storageCarBrandList
=
uni
.
$storage
.
get
(
'carBrandList'
),
storageCarBrandList
=
uni
.
$storage
.
get
(
'carBrandList'
),
storageEmployeeList
=
uni
.
$storage
.
get
(
'employeeList'
),
storageEmployeeList
=
uni
.
$storage
.
get
(
'employeeList'
),
...
@@ -127,7 +157,7 @@ export default {
...
@@ -127,7 +157,7 @@ export default {
})
})
},
},
// 查询素材
// 查询素材
async
getSoure
()
{
async
getSoure
()
{
/**比亚迪 */
/**比亚迪 */
if
(
this
.
channelType
==
2
)
{
if
(
this
.
channelType
==
2
)
{
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getBydMockData
(
true
)
let
{
moduleList
,
toolList
}
=
await
uni
.
$api
.
systemApi
.
getBydMockData
(
true
)
...
@@ -184,11 +214,11 @@ export default {
...
@@ -184,11 +214,11 @@ export default {
}
}
}
}
},
},
errorImg
(
index
)
{
errorImg
(
index
)
{
this
.
moduleList
[
index
].
showAlt
=
true
this
.
moduleList
[
index
].
showAlt
=
true
},
},
async
start
()
{
async
start
()
{
if
(
this
.
recording
)
return
if
(
this
.
recording
)
return
uni
.
showLoading
({
uni
.
showLoading
({
mask
:
true
mask
:
true
...
@@ -211,22 +241,22 @@ export default {
...
@@ -211,22 +241,22 @@ export default {
uni
.
hideLoading
()
uni
.
hideLoading
()
},
1
e3
)
},
1
e3
)
},
},
toDetail
(
item
)
{
toDetail
(
item
)
{
uni
.
$logger
.
local
.
info
(
`预览
${
item
.
title
}
`
)
this
.
chooseItem
=
item
this
.
chooseItem
=
item
this
.
$refs
.
home
.
previewRef
.
open
()
this
.
$refs
.
home
.
previewRef
.
open
()
},
},
cancel
()
{
cancel
()
{
this
.
$refs
.
home
.
previewRef
.
close
()
this
.
$refs
.
home
.
previewRef
.
close
()
},
},
preview
()
{
preview
()
{
let
{
id
}
=
this
.
chooseItem
let
{
id
,
title
}
=
this
.
chooseItem
this
.
type
=
'preview'
this
.
type
=
'preview'
this
.
id
=
id
this
.
id
=
id
uni
.
$logger
.
local
.
info
(
`预览
${
title
}
`
)
this
.
cancel
()
this
.
cancel
()
},
},
// 完成接待
// 完成接待
done
(
e
)
{
done
(
e
)
{
this
.
$refs
.
home
.
finishRef
.
close
()
this
.
$refs
.
home
.
finishRef
.
close
()
if
(
this
.
recording
)
this
.
$refs
.
home
.
stopAudio
()
if
(
this
.
recording
)
this
.
$refs
.
home
.
stopAudio
()
this
.
recording
=
false
this
.
recording
=
false
...
@@ -238,14 +268,14 @@ export default {
...
@@ -238,14 +268,14 @@ export default {
this
.
$store
.
dispatch
(
'clearReceptionTrack'
)
this
.
$store
.
dispatch
(
'clearReceptionTrack'
)
},
1500
)
},
1500
)
},
},
back
()
{
back
()
{
const
detailRef
=
this
.
$refs
.
detail
const
detailRef
=
this
.
$refs
.
detail
if
(
detailRef
.
showPayPage
)
return
(
detailRef
.
showPayPage
=
false
)
if
(
detailRef
.
showPayPage
)
return
(
detailRef
.
showPayPage
=
false
)
if
(
!
this
.
id
)
return
uni
.
navigateBack
()
if
(
!
this
.
id
)
return
uni
.
navigateBack
()
if
(
this
.
type
!=
'preview'
)
return
this
.
$refs
.
home
.
finishRef
.
open
()
if
(
this
.
type
!=
'preview'
)
return
this
.
$refs
.
home
.
finishRef
.
open
()
this
.
backHome
()
this
.
backHome
()
},
},
backHome
()
{
backHome
()
{
if
(
this
.
recording
)
this
.
$refs
.
home
.
stopAudio
(
true
)
if
(
this
.
recording
)
this
.
$refs
.
home
.
stopAudio
(
true
)
this
.
$refs
.
home
.
finishRef
.
close
()
this
.
$refs
.
home
.
finishRef
.
close
()
this
.
id
=
''
this
.
id
=
''
...
@@ -254,23 +284,23 @@ export default {
...
@@ -254,23 +284,23 @@ export default {
this
.
init
()
this
.
init
()
this
.
recording
=
false
this
.
recording
=
false
},
},
nextStep
()
{
nextStep
()
{
let
{
id
}
=
this
.
moduleList
[
0
]
let
{
id
}
=
this
.
moduleList
[
0
]
this
.
type
=
'preview'
this
.
type
=
'preview'
this
.
id
=
id
this
.
id
=
id
},
},
clearHistory
()
{
clearHistory
()
{
this
.
$store
.
dispatch
(
'clearCustomerInfo'
)
this
.
$store
.
dispatch
(
'clearCustomerInfo'
)
this
.
$store
.
dispatch
(
'clearHistory'
)
this
.
$store
.
dispatch
(
'clearHistory'
)
this
.
$refs
.
home
.
setBooks
([])
this
.
$refs
.
home
.
setBooks
([])
this
.
$store
.
dispatch
(
'clearReceptionTrack'
)
this
.
$store
.
dispatch
(
'clearReceptionTrack'
)
},
},
openStep
()
{
openStep
()
{
this
.
$refs
.
home
.
finishRef
.
close
()
this
.
$refs
.
home
.
finishRef
.
close
()
this
.
$refs
.
detail
.
open
()
this
.
$refs
.
detail
.
open
()
},
},
// 查询门店支付配置
// 查询门店支付配置
async
findPayInfo
()
{
async
findPayInfo
()
{
const
{
shopMerchantId
}
=
uni
.
$storage
.
get
(
'userInfo'
)
const
{
shopMerchantId
}
=
uni
.
$storage
.
get
(
'userInfo'
)
const
data
=
await
uni
.
$api
.
commonApi
.
findPayInfo
({
const
data
=
await
uni
.
$api
.
commonApi
.
findPayInfo
({
merchantId
:
shopMerchantId
merchantId
:
shopMerchantId
...
@@ -294,13 +324,13 @@ export default {
...
@@ -294,13 +324,13 @@ export default {
})
})
this
.
$store
.
dispatch
(
'setPaymentType'
,
paymentType
)
this
.
$store
.
dispatch
(
'setPaymentType'
,
paymentType
)
},
},
changeTab
(
index
)
{
changeTab
(
index
)
{
this
.
tabIndex
=
index
this
.
tabIndex
=
index
if
(
index
==
0
)
this
.
init
()
if
(
index
==
0
)
this
.
init
()
},
},
/**按序加载车型 */
/**按序加载车型 */
async
getCarBrandsList
(
carBrandList
,
index
)
{
async
getCarBrandsList
(
carBrandList
,
index
)
{
const
item
=
carBrandList
[
index
]
const
item
=
carBrandList
[
index
]
if
(
!
item
)
return
if
(
!
item
)
return
const
carList
=
uni
.
getStorageSync
(
`
${
item
.
id
}
_
${
item
.
brandId
}
_carlist`
)
const
carList
=
uni
.
getStorageSync
(
`
${
item
.
id
}
_
${
item
.
brandId
}
_carlist`
)
...
@@ -317,7 +347,7 @@ export default {
...
@@ -317,7 +347,7 @@ export default {
}
}
},
},
/**素材内容 */
/**素材内容 */
setViewInfo
(
_moduleList
,
_toolList
)
{
setViewInfo
(
_moduleList
,
_toolList
)
{
if
(
_moduleList
&&
_toolList
)
{
if
(
_moduleList
&&
_toolList
)
{
this
.
moduleList
=
_moduleList
this
.
moduleList
=
_moduleList
this
.
toolList
=
_toolList
this
.
toolList
=
_toolList
...
...
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