Commit 35318a16 by 李伟康

commit v1.0.2

1 parent d1dd7eae
...@@ -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> -->
<view <template v-if="aspectRatio">
class="under-image" <view
v-if="isUnderBkg" class="under-image"
: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,7 +238,14 @@ export default { ...@@ -228,7 +238,14 @@ 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 () {
...@@ -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;
} }
/* 竖屏 */ /* 竖屏 */
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
{ {
"path": "pages/home/home", "path": "pages/home/home",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom",
"disableSwipeBack":true
} }
}, },
{ {
......
...@@ -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 () {
setTimeout(()=>{
uni.reLaunch({
url:'/pages/common/login'
})
},100)
},
methods: {
} }
},
mounted () {
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'
})
else uni.reLaunch({
url: '/pages/common/login'
})
})
},
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
...@@ -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: {
/**获取验证码 */ /**获取验证码 */
......
...@@ -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'
})
// 进入精品升级场景 工单/预约详情 // 进入精品升级场景 工单/预约详情
} }
......
...@@ -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>
......
...@@ -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>
......
...@@ -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>
......
...@@ -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>
......
...@@ -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>
......
...@@ -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 () {
setTimeout(() => { this.init()
this.setBorderLeft()
}, 300)
}, },
methods: { methods: {
init () {
setTimeout(() => {
this.setBorderLeft()
}, 300)
},
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: 384rpx; width: 384rpx;
height: 80rpx; height: 80rpx;
background: #ffffff; background: #ffffff;
// border: 2rpx solid #dce0e6; border: 2rpx solid #fff;
font-size: 32rpx; font-size: 32rpx;
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: 4rpx solid #292d33; // border: 4rpx 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
...@@ -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 8rpx 22rpx 0 #00000029;
} }
100% { 100% {
transform: translateX(0); left: 0;
box-shadow: 0 8rpx 22rpx 0 #00000029;
} }
} }
</style> </style>
...@@ -6,107 +6,157 @@ ...@@ -6,107 +6,157 @@
* @LastEditTime: 2024-04-11 14:26:25 * @LastEditTime: 2024-04-11 14:26:25
--> -->
<template> <template>
<view class="container" @click="handleTouchStart()"> <view
<view class="left-side"> class="container"
<!-- 左侧内容 --> @click="handleTouchStart()"
<view class="user-info"> >
<view class="user-avatar sprite-icon icon-icon-avatar"></view> <view :class="['home',{show:!id}]">
<view class="left-side">
<!-- 左侧内容 -->
<view class="user-info">
<view class="user-avatar sprite-icon icon-icon-avatar"></view>
<view class="user-name">{{ userInfo.name }}</view> <view class="user-name">{{ userInfo.name }}</view>
<view class="user-position">延保专员</view> <view class="user-position">延保专员</view>
</view>
<view class="left-footer">
<view class="logout" @click="logout">
<view class="icon-logout sprite-icon icon-icon-logout"></view>
<view>退出</view>
</view> </view>
<view class="store-addr"> <view class="left-footer">
<view class="icon-addr sprite-icon icon-icon-addr"></view> <view
class="logout"
@click="logout"
>
<view class="icon-logout sprite-icon icon-icon-logout"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view> <view>退出</view>
</view> </view>
</view> <view class="store-addr">
</view> <view class="icon-addr sprite-icon icon-icon-addr"></view>
<view class="right-side">
<!-- 右侧内容 -->
<view class="home-title">客户接待</view>
<view class="start" @click="start">
<view class="icon-start sprite-icon icon-icon-handshake"></view>
<view class="start-text">开始接待</view> <view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view>
</view>
</view> </view>
<!-- 各模块入口list --> <view class="right-side">
<view class="module-list"> <!-- 右侧内容 -->
<view class="home-title">客户接待</view>
<view <view
class="module-item" class="start"
v-for="item in moduleList" @click="start"
:key="item.id"
@click="toDetail(item)"
> >
<image class="module-img" :src="item.thumbnail" mode="scaleToFill" /> <view class="icon-start sprite-icon icon-icon-handshake"></view>
<view class="module-name">{{ item.title }}</view>
<view class="start-text">开始接待</view>
</view> </view>
<!-- 各模块入口list -->
<view class="module-list">
<view
class="module-item"
v-for="item in moduleList"
:key="item.id"
@click="toDetail(item)"
>
<image
class="module-img"
:src="item.thumbnail"
mode="scaleToFill"
/>
<view class="module-name">{{ item.title }}</view>
</view>
</view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox
ref="previewRef"
@cancel="cancel"
@confirm="preview"
:popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材"
></MessageBox>
<MessageBox
ref="tipBox"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
</view> </view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox </view>
ref="previewRef" <view :class="['detail',{show:id}]">
@cancel="cancel" <detail
@confirm="preview" :id.sync="id"
:popupW="704" :media="mediaList"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" :type.sync="type"
confirmBtnText="预览素材" @back="back"
></MessageBox> @done="done"
<MessageBox />
ref="tipBox"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
</view> </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({ this.$refs.previewRef.open();
url: `../detail/detail?id=${item.id}&type=edit`,
});
} else {
this.id = item.id;
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 {
display: flex; position: relative;
height: 100vh; .home,
.detail {
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
top: 0;
left: 0;
visibility: hidden;
}
.home {
display: flex;
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;
......
...@@ -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
}
}, },
}; };
...@@ -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 () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!