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 35318a16
authored
Apr 15, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit v1.0.2
1 parent
d1dd7eae
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
278 additions
and
126 deletions
components/Canvas/wn-canvas.vue
pages.json
pages/common/loading.vue
pages/common/login.vue
pages/common/merchantList.vue
pages/detail/components/Media_1.vue
pages/detail/components/Media_2.vue
pages/detail/components/Media_3.vue
pages/detail/components/Media_4.vue
pages/detail/components/Media_5.vue
pages/detail/components/Tabs.vue
pages/detail/detail.vue
pages/home/home.vue
store/modules/user.js
utils/cache/constantData.js
components/Canvas/wn-canvas.vue
View file @
35318a1
...
@@ -71,12 +71,21 @@
...
@@ -71,12 +71,21 @@
@
touchend=
"touchEnd"
@
touchend=
"touchEnd"
></canvas>
></canvas>
<!-- <image :src="drawImage" class="under-image" mode="" v-if="isUnderBkg"></image> -->
<!-- <image :src="drawImage" class="under-image" mode="" v-if="isUnderBkg"></image> -->
<
template
v-if=
"aspectRatio"
>
<view
<view
class=
"under-image"
class=
"under-image"
v-if=
"isUnderBkg"
:style=
"
{backgroundImage:`URL(${drawImage})`,aspectRatio:aspectRatio}"
:style=
"
{backgroundImage:`URL(${drawImage})`,aspectRatio:aspectRatio}"
>
>
</view>
</view>
</
template
>
<
template
v-else
>
<view
class=
"skeleton-box"
></view>
</
template
>
<!-- <image class="under-image" :src="drawImage"
mode="scaleToFill"
/> -->
</view>
</view>
<!-- <color
<!-- <color
:colorShow="colorShow"
:colorShow="colorShow"
...
@@ -193,7 +202,7 @@ export default {
...
@@ -193,7 +202,7 @@ export default {
],
],
toolsShow
:
true
,
toolsShow
:
true
,
isLandScape
:
false
,
//是否横屏
isLandScape
:
false
,
//是否横屏
aspectRatio
:
1
,
//图片宽高比
aspectRatio
:
null
,
//图片宽高比
showPenBox
:
false
showPenBox
:
false
};
};
...
@@ -211,16 +220,17 @@ export default {
...
@@ -211,16 +220,17 @@ export default {
type
:
String
,
type
:
String
,
default
:
"1"
default
:
"1"
},
},
isUnderBkg
:
{
//背景图片是否在画板下边,在下边则无法被擦除
type
:
Boolean
,
default
:
false
},
drawStatus
:
Boolean
,
drawStatus
:
Boolean
,
canvasId
:
{
canvasId
:
{
type
:
String
,
type
:
String
,
default
:
'drawCanvas'
default
:
'drawCanvas'
}
}
},
},
computed
:
{
watchStatus
()
{
return
this
.
$store
.
state
.
user
.
canvasStatus
},
},
mounted
(
opt
)
{
mounted
(
opt
)
{
this
.
drawContext
=
uni
.
createCanvasContext
(
this
.
canvasId
,
this
);
this
.
drawContext
=
uni
.
createCanvasContext
(
this
.
canvasId
,
this
);
this
.
initBoard
();
this
.
initBoard
();
...
@@ -228,8 +238,15 @@ export default {
...
@@ -228,8 +238,15 @@ export default {
watch
:
{
watch
:
{
'drawImage'
(
n
)
{
'drawImage'
(
n
)
{
if
(
n
)
this
.
initBoard
()
if
(
n
)
this
.
initBoard
()
},
watchStatus
:
{
immediate
:
true
,
handler
(
newval
)
{
console
.
log
(
newval
)
if
(
newval
)
this
.
clearBoard
()
}
}
},
},
},
methods
:
{
methods
:
{
colorShowHandel
()
{
colorShowHandel
()
{
this
.
colorShow
=
!
this
.
colorShow
;
this
.
colorShow
=
!
this
.
colorShow
;
...
@@ -315,6 +332,7 @@ export default {
...
@@ -315,6 +332,7 @@ export default {
},
},
// 绘制线条结束
// 绘制线条结束
lineEnd
()
{
lineEnd
()
{
console
.
log
(
this
.
startX
,
this
.
startY
)
this
.
drawContext
.
closePath
();
this
.
drawContext
.
closePath
();
this
.
begin
=
false
;
this
.
begin
=
false
;
},
},
...
@@ -810,8 +828,9 @@ export default {
...
@@ -810,8 +828,9 @@ export default {
src
:
this
.
drawImage
src
:
this
.
drawImage
}))[
1
]
||
{};
}))[
1
]
||
{};
// console.log(imageInfoObj);
this
.
aspectRatio
=
imageInfoObj
.
width
/
imageInfoObj
.
height
;
this
.
aspectRatio
=
imageInfoObj
.
width
/
imageInfoObj
.
height
;
console
.
log
(
imageInfoObj
);
if
(
this
.
isUnderBkg
)
{
if
(
this
.
isUnderBkg
)
{
this
.
bgColor
=
"rgba(0,0,0,0)"
this
.
bgColor
=
"rgba(0,0,0,0)"
}
else
{
}
else
{
...
@@ -914,6 +933,7 @@ export default {
...
@@ -914,6 +933,7 @@ export default {
background-size
:
cover
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-repeat
:
no-repeat
;
z-index
:
-1
;
z-index
:
-1
;
will-change
:
transform
;
}
}
/* 竖屏 */
/* 竖屏 */
...
...
pages.json
View file @
35318a1
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
{
{
"path"
:
"pages/home/home"
,
"path"
:
"pages/home/home"
,
"style"
:
{
"style"
:
{
"navigationStyle"
:
"custom"
"navigationStyle"
:
"custom"
,
"disableSwipeBack"
:
true
}
}
},
},
{
{
...
...
pages/common/loading.vue
View file @
35318a1
...
@@ -2,24 +2,29 @@
...
@@ -2,24 +2,29 @@
</
template
>
</
template
>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
export
default
{
export
default
{
name
:
''
,
name
:
''
,
data
()
{
data
()
{
return
{
return
{
}
}
},
},
mounted
()
{
mounted
()
{
setTimeout
(()
=>
{
uni
.
showLoading
()
uni
.
reLaunch
({
let
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
url
:
'/pages/common/login'
uni
.
$api
.
userApi
.
getListSelectAccount
().
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
code
==
0
&&
userInfo
)
uni
.
reLaunch
({
url
:
'/pages/home/home'
})
else
uni
.
reLaunch
({
url
:
'/pages/common/login'
})
})
})
},
100
)
},
},
methods
:
{
methods
:
{
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
'scss'
>
<
style
scoped
lang=
'scss'
>
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
pages/common/login.vue
View file @
35318a1
...
@@ -49,20 +49,13 @@ export default {
...
@@ -49,20 +49,13 @@ export default {
mixins
:
[
loginMixin
],
mixins
:
[
loginMixin
],
data
()
{
data
()
{
return
{
return
{
mobile
:
''
,
mobile
:
'
15816539334
'
,
code
:
''
,
code
:
'
1
'
,
count
:
''
,
count
:
''
,
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
uni
.
showLoading
()
let
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
uni
.
$api
.
userApi
.
getListSelectAccount
().
then
(
res
=>
{
uni
.
hideLoading
()
if
(
res
.
code
==
0
&&
userInfo
)
uni
.
reLaunch
({
url
:
'/pages/home/home'
})
})
},
},
methods
:
{
methods
:
{
/**获取验证码 */
/**获取验证码 */
...
...
pages/common/merchantList.vue
View file @
35318a1
...
@@ -209,7 +209,10 @@ export default {
...
@@ -209,7 +209,10 @@ export default {
let
{
openSceneArr
,
selectIndex
}
=
this
,
let
{
openSceneArr
,
selectIndex
}
=
this
,
{
merchantName
:
shopMerchantName
,
merchantId
:
shopMerchantId
}
=
item
,
{
merchantName
:
shopMerchantName
,
merchantId
:
shopMerchantId
}
=
item
,
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
if
(
!
openSceneArr
?.
length
&&
!
userInfo
?.
isSuper
)
return
wx
.
$util
.
showToast
(
'暂无开通业务,请联系总部管理员'
)
if
(
!
openSceneArr
?.
length
&&
!
userInfo
?.
isSuper
)
return
uni
.
showToast
({
title
:
'暂无开通业务,请联系总部管理员'
,
icon
:
'none'
})
uni
.
$storage
.
set
(
'userInfo'
,
{
uni
.
$storage
.
set
(
'userInfo'
,
{
...
userInfo
,
...
userInfo
,
shopMerchantName
,
shopMerchantName
,
...
@@ -234,7 +237,10 @@ export default {
...
@@ -234,7 +237,10 @@ export default {
url
:
'/pages/home/home'
url
:
'/pages/home/home'
})
})
}
else
{
// 搜客户
}
else
{
// 搜客户
if
(
!
openSceneArr
.
includes
(
0
))
return
wx
.
$util
.
showToast
(
'暂未开通精品升级场景'
)
if
(
!
openSceneArr
.
includes
(
0
))
return
uni
.
showToast
({
title
:
'暂未开通精品升级场景'
,
icon
:
'none'
})
// 进入精品升级场景 工单/预约详情
// 进入精品升级场景 工单/预约详情
}
}
...
...
pages/detail/components/Media_1.vue
View file @
35318a1
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<wnCanvas
<wnCanvas
saveImageType=
"3"
saveImageType=
"3"
:drawImage=
"i.detailUrl"
:drawImage=
"i.detailUrl"
:isUnderBkg=
"true"
:canvasId=
"`c-1-$
{index}`"
:canvasId=
"`c-1-$
{index}`"
:drawStatus="penSwitch"
:drawStatus="penSwitch"
>
</wnCanvas>
>
</wnCanvas>
...
...
pages/detail/components/Media_2.vue
View file @
35318a1
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<tabs
<tabs
:list=
"views"
:list=
"views"
@
tabclick=
"changeView"
@
tabclick=
"changeView"
ref=
"tabs"
/>
/>
</
template
>
</
template
>
<view
class=
"canvas-box"
>
<view
class=
"canvas-box"
>
...
@@ -21,7 +22,7 @@
...
@@ -21,7 +22,7 @@
<wnCanvas
<wnCanvas
saveImageType=
"3"
saveImageType=
"3"
:drawImage=
"i.detailUrl"
:drawImage=
"i.detailUrl"
:isUnderBkg=
"true"
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
:canvasId=
"`c-2-$
{index}`"
:canvasId=
"`c-2-$
{index}`"
>
</wnCanvas>
>
</wnCanvas>
...
...
pages/detail/components/Media_3.vue
View file @
35318a1
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<wnCanvas
<wnCanvas
saveImageType=
"3"
saveImageType=
"3"
:drawImage=
"i.detailUrl"
:drawImage=
"i.detailUrl"
:isUnderBkg=
"true"
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
:canvasId=
"`c-3-$
{index}`"
:canvasId=
"`c-3-$
{index}`"
>
</wnCanvas>
>
</wnCanvas>
...
...
pages/detail/components/Media_4.vue
View file @
35318a1
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
<tabs
<tabs
:list=
"views"
:list=
"views"
@
tabclick=
"changeView"
@
tabclick=
"changeView"
ref=
"tabs"
/>
/>
</
template
>
</
template
>
<view
class=
"canvas-box"
>
<view
class=
"canvas-box"
>
...
@@ -21,7 +23,7 @@
...
@@ -21,7 +23,7 @@
<wnCanvas
<wnCanvas
saveImageType=
"3"
saveImageType=
"3"
:drawImage=
"i.detailUrl"
:drawImage=
"i.detailUrl"
:isUnderBkg=
"true"
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
:canvasId=
"`c-4-$
{index}`"
:canvasId=
"`c-4-$
{index}`"
>
</wnCanvas>
>
</wnCanvas>
...
...
pages/detail/components/Media_5.vue
View file @
35318a1
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<wnCanvas
<wnCanvas
saveImageType=
"3"
saveImageType=
"3"
:drawImage=
"i.detailUrl"
:drawImage=
"i.detailUrl"
:isUnderBkg=
"true"
:drawStatus=
"penSwitch"
:drawStatus=
"penSwitch"
:canvasId=
"`c-5-$
{index}`"
:canvasId=
"`c-5-$
{index}`"
>
</wnCanvas>
>
</wnCanvas>
...
...
pages/detail/components/Tabs.vue
View file @
35318a1
...
@@ -22,19 +22,26 @@ export default {
...
@@ -22,19 +22,26 @@ export default {
name
:
'Tabs'
,
name
:
'Tabs'
,
props
:
{
props
:
{
list
:
Array
,
list
:
Array
,
show
:
{
type
:
Boolean
,
default
:
true
}
},
},
data
()
{
data
()
{
return
{
return
{
tabIndex
:
0
,
tabIndex
:
0
,
borderLeft
:
'display:
none;'
,
borderLeft
:
'display:none;'
,
}
}
},
},
mounted
()
{
mounted
()
{
this
.
init
()
},
methods
:
{
init
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setBorderLeft
()
this
.
setBorderLeft
()
},
300
)
},
300
)
},
},
methods
:
{
tabClick
(
index
)
{
tabClick
(
index
)
{
this
.
tabIndex
=
index
this
.
tabIndex
=
index
this
.
$emit
(
'tabclick'
,
index
)
this
.
$emit
(
'tabclick'
,
index
)
...
@@ -46,6 +53,7 @@ export default {
...
@@ -46,6 +53,7 @@ export default {
query
query
.
select
(
`#tab-
${
tabIndex
}
`
)
.
select
(
`#tab-
${
tabIndex
}
`
)
.
boundingClientRect
((
data
)
=>
{
.
boundingClientRect
((
data
)
=>
{
console
.
log
(
data
)
this
.
borderLeft
=
`left:
${
data
.
left
}
px;`
this
.
borderLeft
=
`left:
${
data
.
left
}
px;`
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
borderLeft
+=
`display:block;`
this
.
borderLeft
+=
`display:block;`
...
@@ -70,13 +78,14 @@ export default {
...
@@ -70,13 +78,14 @@ export default {
width
:
384
rpx
;
width
:
384
rpx
;
height
:
80
rpx
;
height
:
80
rpx
;
background
:
#ffffff
;
background
:
#ffffff
;
//
border
:
2
rpx
solid
#dce0e6
;
border
:
2
rpx
solid
#fff
;
font-size
:
32
rpx
;
font-size
:
32
rpx
;
color
:
#292d33
;
color
:
#292d33
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
transition
:
all
0.15s
;
}
}
.active
{
.active
{
//
border
:
4
rpx
solid
#292d33
;
//
border
:
4
rpx
solid
#292d33
;
...
@@ -95,4 +104,12 @@ export default {
...
@@ -95,4 +104,12 @@ export default {
z-index
:
3
;
z-index
:
3
;
}
}
}
}
.skeleton-box
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
background-color
:
#000
;
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
pages/detail/detail.vue
View file @
35318a1
...
@@ -21,8 +21,21 @@
...
@@ -21,8 +21,21 @@
></uni-icons>
></uni-icons>
</view>
</view>
</view>
</view>
<template
v-for=
"index in 6"
>
<view
:class=
"['view',
{ showView: id == 1 }]">
<view
:class=
"['view',
{ showView: id == index }]"
:key="index"
>
<component
:is=
"'media_' + index"
:views=
"media[index]"
:penSwitch=
"penSwitch"
:show=
"id == 6"
:ref=
"'media'+index"
/>
</view>
</
template
>
<!-- <view :class="['view', { showView: id == 1 }]">
<media_1
<media_1
:views="media[1]"
:views="media[1]"
:penSwitch="penSwitch"
:penSwitch="penSwitch"
...
@@ -58,7 +71,7 @@
...
@@ -58,7 +71,7 @@
ref="history"
ref="history"
:show="id == 6"
:show="id == 6"
/>
/>
</view>
</view>
-->
<pay-pop
ref=
"pay"
></pay-pop>
<pay-pop
ref=
"pay"
></pay-pop>
<
template
v-if=
"type != 'preview'"
>
<
template
v-if=
"type != 'preview'"
>
<tool-box
<tool-box
...
@@ -73,22 +86,14 @@
...
@@ -73,22 +86,14 @@
<view
:class=
"['sprite-icon', `$
{!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]">
</view>
<view
:class=
"['sprite-icon', `$
{!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]">
</view>
</view>
</view>
</
template
>
</
template
>
<MessageBox
<!-- <MessageBox
:popupW=
"704"
ref=
"finish"
@
cancel=
"$refs.finish.close()"
@
confirm=
"done"
content=
"是否返回首页并结束本次接待"
confirmBtnText=
"确认"
></MessageBox>
<MessageBox
ref="tipBox"
ref="tipBox"
@cancel="tipCancel"
@cancel="tipCancel"
@confirm="tipConfirm"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
cancelBtnText="否"
confirmBtnText="是"
confirmBtnText="是"
></MessageBox>
></MessageBox>
-->
<MessageBox
<MessageBox
ref=
"payRef"
ref=
"payRef"
@
cancel=
"done"
@
cancel=
"done"
...
@@ -97,6 +102,7 @@
...
@@ -97,6 +102,7 @@
content=
"若客户成交,请点击付款方式协助客户完成后续流程。"
content=
"若客户成交,请点击付款方式协助客户完成后续流程。"
confirmBtnText=
"选择付款方式"
confirmBtnText=
"选择付款方式"
cancelBtnText=
"完成接待"
cancelBtnText=
"完成接待"
></MessageBox>
></MessageBox>
</view>
</view>
</template>
</template>
...
@@ -123,10 +129,16 @@ export default {
...
@@ -123,10 +129,16 @@ export default {
Media_6
,
Media_6
,
},
},
mixins
:
[
myClick
],
mixins
:
[
myClick
],
props
:
{
id
:
[
String
,
Number
],
media
:
Object
,
type
:
{
type
:
String
,
default
:
'preview'
}
},
data
()
{
data
()
{
return
{
return
{
type
:
"preview"
,
id
:
""
,
media
:
{
media
:
{
1
:
[],
1
:
[],
2
:
[],
2
:
[],
...
@@ -143,24 +155,26 @@ export default {
...
@@ -143,24 +155,26 @@ export default {
return
this
.
type
!=
'preview'
&&
this
.
drawStatus
return
this
.
type
!=
'preview'
&&
this
.
drawStatus
}
}
},
},
onLoad
(
options
)
{
console
.
log
(
options
);
// onLoad (options) {
this
.
type
=
options
.
type
;
// console.log(options);
this
.
id
=
options
.
id
;
// this.type = options.type;
this
.
getFindSoureDetail
(
options
.
id
);
// this.id = options.id;
},
// if (options.type != 'preview') this.media = uni.$storage.get('mediaList')
onBackPress
(
options
)
{
// else this.getFindSoureDetail(options.id);
if
(
options
.
from
===
"backbutton"
)
{
// },
// 物理返回按钮触发
// onBackPress (options) {
// 阻止默认行为,即不执行页面返回
// if (options.from === "backbutton") {
if
(
this
.
type
!=
"preview"
)
this
.
$refs
.
finish
.
open
();
// // 物理返回按钮触发
return
true
;
// // 阻止默认行为,即不执行页面返回
}
// if (this.type != "preview") this.$refs.finish.open();
// 其他情况允许正常返回
// return true;
return
false
;
// }
},
// // 其他情况允许正常返回
// return false;
// },
async
onReachBottom
()
{
async
onReachBottom
()
{
this
.
$refs
.
history
.
getQuotationList
();
if
(
this
.
id
==
6
)
this
.
$refs
.
media6
[
0
]
.
getQuotationList
();
},
},
methods
:
{
methods
:
{
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
...
@@ -169,9 +183,13 @@ export default {
...
@@ -169,9 +183,13 @@ export default {
},
},
/**切换素材 */
/**切换素材 */
choose
(
e
)
{
choose
(
e
)
{
if
(
this
.
id
==
1
)
this
.
$refs
.
media1
.
closeAllPopup
()
if
(
this
.
id
==
1
)
this
.
$refs
.
media1
[
0
]
.
closeAllPopup
()
this
.
id
=
e
.
id
;
this
.
id
=
e
.
id
;
this
.
getFindSoureDetail
(
e
.
id
);
if
(
e
.
id
==
2
||
e
.
id
==
4
)
{
console
.
log
(
this
.
$refs
[
`media
${
e
.
id
}
`
][
0
].
$refs
)
this
.
$refs
[
`media
${
e
.
id
}
`
][
0
].
$refs
.
tabs
.
init
()
}
// this.getFindSoureDetail(e.id);
},
},
async
getFindSoureDetail
(
id
)
{
async
getFindSoureDetail
(
id
)
{
try
{
try
{
...
@@ -187,21 +205,16 @@ export default {
...
@@ -187,21 +205,16 @@ export default {
console
.
log
(
error
);
console
.
log
(
error
);
}
}
},
},
// 完成接待
done
()
{
this
.
stopAudio
();
uni
.
navigateBack
();
this
.
setReceptionStatus
(
0
);
},
// 选择付款方式
// 选择付款方式
toPay
()
{
toPay
()
{
this
.
$refs
.
pay
.
show
();
this
.
$refs
.
pay
.
show
();
},
},
back
()
{
back
()
{
if
(
this
.
type
!=
"preview"
)
return
this
.
$refs
.
finish
.
open
();
this
.
$emit
(
'back'
)
this
.
$store
.
dispatch
(
"clearCustomerInfo"
);
uni
.
navigateBack
();
},
},
done
()
{
this
.
$emit
(
'done'
)
}
},
},
};
};
</
script
>
</
script
>
...
@@ -225,18 +238,21 @@ export default {
...
@@ -225,18 +238,21 @@ export default {
}
}
}
}
.view
{
.view
{
position
:
absolute
;
position
:
fixed
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
z-index
:
-1
;
z-index
:
-1
;
left
:
0
;
top
:
0
;
top
:
0
;
display
:
none
;
left
:
0
;
visibility
:
hidden
;
//
display
:
none
;
}
}
.showView
{
.showView
{
position
:
absolute
;
z-index
:
1
;
z-index
:
1
;
display
:
block
;
visibility
:
visible
;
animation
:
show-content-left
0.15s
;
//
display
:
block
;
animation
:
show-content-left
0.15s
forwards
;
}
}
.pen-box
{
.pen-box
{
position
:
fixed
;
position
:
fixed
;
...
@@ -255,12 +271,10 @@ export default {
...
@@ -255,12 +271,10 @@ export default {
}
}
@keyframes
show-content-left
{
@keyframes
show-content-left
{
0
%
{
0
%
{
transform
:
translateX
(
1000%
);
left
:
100%
;
box-shadow
:
0
8
rpx
22
rpx
0
#00000029
;
}
}
100
%
{
100
%
{
transform
:
translateX
(
0
);
left
:
0
;
box-shadow
:
0
8
rpx
22
rpx
0
#00000029
;
}
}
}
}
</
style
>
</
style
>
pages/home/home.vue
View file @
35318a1
...
@@ -6,7 +6,11 @@
...
@@ -6,7 +6,11 @@
* @LastEditTime: 2024-04-11 14:26:25
* @LastEditTime: 2024-04-11 14:26:25
-->
-->
<
template
>
<
template
>
<view
class=
"container"
@
click=
"handleTouchStart()"
>
<view
class=
"container"
@
click=
"handleTouchStart()"
>
<view
:class=
"['home',
{show:!id}]">
<view
class=
"left-side"
>
<view
class=
"left-side"
>
<!-- 左侧内容 -->
<!-- 左侧内容 -->
<view
class=
"user-info"
>
<view
class=
"user-info"
>
...
@@ -16,7 +20,10 @@
...
@@ -16,7 +20,10 @@
<view
class=
"user-position"
>
延保专员
</view>
<view
class=
"user-position"
>
延保专员
</view>
</view>
</view>
<view
class=
"left-footer"
>
<view
class=
"left-footer"
>
<view
class=
"logout"
@
click=
"logout"
>
<view
class=
"logout"
@
click=
"logout"
>
<view
class=
"icon-logout sprite-icon icon-icon-logout"
></view>
<view
class=
"icon-logout sprite-icon icon-icon-logout"
></view>
<view>
退出
</view>
<view>
退出
</view>
...
@@ -31,7 +38,10 @@
...
@@ -31,7 +38,10 @@
<view
class=
"right-side"
>
<view
class=
"right-side"
>
<!-- 右侧内容 -->
<!-- 右侧内容 -->
<view
class=
"home-title"
>
客户接待
</view>
<view
class=
"home-title"
>
客户接待
</view>
<view
class=
"start"
@
click=
"start"
>
<view
class=
"start"
@
click=
"start"
>
<view
class=
"icon-start sprite-icon icon-icon-handshake"
></view>
<view
class=
"icon-start sprite-icon icon-icon-handshake"
></view>
<view
class=
"start-text"
>
开始接待
</view>
<view
class=
"start-text"
>
开始接待
</view>
...
@@ -44,7 +54,11 @@
...
@@ -44,7 +54,11 @@
:key=
"item.id"
:key=
"item.id"
@
click=
"toDetail(item)"
@
click=
"toDetail(item)"
>
>
<image
class=
"module-img"
:src=
"item.thumbnail"
mode=
"scaleToFill"
/>
<image
class=
"module-img"
:src=
"item.thumbnail"
mode=
"scaleToFill"
/>
<view
class=
"module-name"
>
{{
item
.
title
}}
</view>
<view
class=
"module-name"
>
{{
item
.
title
}}
</view>
</view>
</view>
</view>
</view>
...
@@ -66,47 +80,83 @@
...
@@ -66,47 +80,83 @@
confirmBtnText=
"是"
confirmBtnText=
"是"
></MessageBox>
></MessageBox>
</view>
</view>
</view>
<view
:class=
"['detail',
{show:id}]">
<detail
:id
.
sync=
"id"
:media=
"mediaList"
:type
.
sync=
"type"
@
back=
"back"
@
done=
"done"
/>
</view>
<MessageBox
:popupW=
"704"
ref=
"finish"
@
cancel=
"$refs.finish.close()"
@
confirm=
"done"
content=
"是否返回首页并结束本次接待"
confirmBtnText=
"确认"
></MessageBox>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
myClick
from
"@/mixin/click"
;
import
myClick
from
"@/mixin/click"
;
import
detail
from
'../detail/detail'
import
{
mapMutations
}
from
"vuex"
;
export
default
{
export
default
{
mixins
:
[
myClick
],
mixins
:
[
myClick
],
data
()
{
components
:
{
detail
},
data
()
{
return
{
return
{
moduleList
:
[
moduleList
:
[],
// {
// id: 1,
// sort: 1,
// thumbnail:
// "https://glsk-oss.oss-cn-shenzhen.aliyuncs.com/quality/11.png",
// title: "问界三包政策",
// type: 1,
// },
],
userInfo
:
{},
userInfo
:
{},
id
:
""
,
id
:
""
,
mediaList
:
{},
type
:
''
,
chooseItem
:
{}
};
};
},
},
mounted
()
{
mounted
()
{
this
.
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
);
this
.
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
);
},
},
onShow
()
{
onBackPress
(
options
)
{
if
(
options
.
from
===
"backbutton"
)
{
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this
.
back
()
return
true
;
}
// 其他情况允许正常返回
return
false
;
},
onShow
()
{
this
.
getSoure
();
this
.
getSoure
();
},
},
methods
:
{
methods
:
{
...
mapMutations
(
"audio"
,
[
"setReceptionStatus"
]),
// 查询素材
// 查询素材
async
getSoure
()
{
async
getSoure
()
{
this
.
moduleList
=
await
uni
.
$api
.
commonApi
.
findSoureList
();
const
moduleList
=
await
uni
.
$api
.
commonApi
.
findSoureList
();
this
.
moduleList
=
moduleList
let
mediaList
=
{}
moduleList
.
map
(
async
e
=>
{
if
(
e
.
id
!=
6
)
{
const
list
=
await
uni
.
$api
.
commonApi
.
getFindSoureDetail
({
id
:
e
.
id
})
mediaList
[
e
.
id
]
=
list
uni
.
$storage
.
set
(
'mediaList'
,
mediaList
)
this
.
mediaList
=
mediaList
}
})
},
},
start
()
{
start
()
{
this
.
startAudio
();
this
.
startAudio
();
uni
.
navigateTo
({
this
.
id
=
this
.
moduleList
[
0
].
id
url
:
`../detail/detail?id=
${
this
.
moduleList
[
0
].
id
}
&type=edit`
,
this
.
type
=
'edit'
});
},
},
// 退出
// 退出
logout
()
{
logout
()
{
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"userInfo"
);
uni
.
$storage
.
rm
(
"sessionId"
);
uni
.
$storage
.
rm
(
"sessionId"
);
this
.
stopAudio
();
this
.
stopAudio
();
...
@@ -114,33 +164,70 @@ export default {
...
@@ -114,33 +164,70 @@ export default {
url
:
"/pages/common/login"
,
url
:
"/pages/common/login"
,
});
});
},
},
toDetail
(
item
)
{
toDetail
(
item
)
{
if
(
this
.
isStart
)
{
this
.
chooseItem
=
item
uni
.
navigateTo
({
url
:
`../detail/detail?id=
${
item
.
id
}
&type=edit`
,
});
}
else
{
this
.
id
=
item
.
id
;
this
.
$refs
.
previewRef
.
open
();
this
.
$refs
.
previewRef
.
open
();
}
},
},
cancel
()
{
cancel
()
{
this
.
$refs
.
previewRef
.
close
();
this
.
$refs
.
previewRef
.
close
();
},
},
preview
()
{
preview
()
{
let
{
id
}
=
this
;
let
{
id
}
=
this
.
chooseItem
;
uni
.
navigateTo
({
this
.
type
=
'preview'
url
:
`../detail/detail?type=preview&id=
${
id
}
`
,
this
.
id
=
id
});
this
.
$refs
.
previewRef
.
close
();
this
.
$refs
.
previewRef
.
close
();
},
},
// 完成接待
done
()
{
// this.stopAudio();
// uni.navigateBack();
this
.
id
=
''
this
.
type
=
''
this
.
$store
.
dispatch
(
"clearCanvas"
,
true
);
// this.setReceptionStatus(0);
},
back
()
{
if
(
!
this
.
id
)
return
uni
.
navigateBack
()
if
(
this
.
type
!=
"preview"
)
return
this
.
$refs
.
finish
.
open
();
this
.
$store
.
dispatch
(
"clearCustomerInfo"
);
this
.
id
=
''
this
.
type
=
''
},
},
},
};
};
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.container
{
.container
{
position
:
relative
;
.home,
.detail
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
z-index
:
-1
;
top
:
0
;
left
:
0
;
visibility
:
hidden
;
}
.home
{
display
:
flex
;
display
:
flex
;
height
:
100vh
;
height
:
100vh
;
}
.show
{
position
:
absolute
;
z-index
:
1
;
visibility
:
visible
;
//
display
:
block
;
animation
:
show-content-left
0.15s
forwards
;
}
}
@keyframes
show-content-left
{
0
%
{
left
:
100%
;
}
100
%
{
left
:
0
;
}
}
}
.left-side
{
.left-side
{
display
:
flex
;
display
:
flex
;
...
...
store/modules/user.js
View file @
35318a1
...
@@ -17,6 +17,8 @@ export default {
...
@@ -17,6 +17,8 @@ export default {
salesUuid
:
""
,
salesUuid
:
""
,
staffName
:
""
,
staffName
:
""
,
},
},
canvasStatus
:
false
};
};
},
},
mutations
:
{
mutations
:
{
...
@@ -47,5 +49,8 @@ export default {
...
@@ -47,5 +49,8 @@ export default {
clearCustomerInfo
({
commit
})
{
clearCustomerInfo
({
commit
})
{
commit
(
"clearCustomerInfo"
);
commit
(
"clearCustomerInfo"
);
},
},
clearCanvas
({
state
},
value
=
false
){
state
.
canvasStatus
=
value
}
},
},
};
};
utils/cache/constantData.js
View file @
35318a1
...
@@ -11,7 +11,8 @@ export const STORAGE_OBJECTkEY = {
...
@@ -11,7 +11,8 @@ export const STORAGE_OBJECTkEY = {
DEFAULT_GET_STORAGEKEY
,
DEFAULT_GET_STORAGEKEY
,
mock_data
:
"mock_data"
,
mock_data
:
"mock_data"
,
storageFile
:
"storageFile"
,
storageFile
:
"storageFile"
,
userInfo
:
'userInfo'
userInfo
:
'userInfo'
,
mediaList
:
'mediaList'
};
};
// export const IMG_VERSION = async () => {
// export const IMG_VERSION = async () => {
...
...
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