Commit 4cb4b30b by 李伟康

commit 修改

1 parent b6fe1123
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1085rpx 893rpx;} .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1021rpx 893rpx;}
.icon-addr { width: 32rpx; height: 32rpx; background-position: -957rpx -477rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: -479rpx -741rpx;} .icon-aito { width: 320rpx; height: 36rpx; background-position: -479rpx -741rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1052rpx -65rpx;} .icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -957rpx -524rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -957rpx 0rpx;} .icon-avatar { width: 96rpx; height: 96rpx; background-position: -830rpx -508rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1052rpx -112rpx;} .icon-back { width: 128rpx; height: 50rpx; background-position: -777rpx -797rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -957rpx -571rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;} .icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;} .icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;}
.icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -1044rpx -445rpx;} .icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -957rpx -367rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -830rpx -635rpx;} .icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -830rpx -619rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -797rpx;} .icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -797rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -111rpx -797rpx;} .icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -111rpx -797rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -222rpx -797rpx;} .icon-face-success { width: 96rpx; height: 96rpx; background-position: -222rpx -797rpx;}
.icon-feedback { width: 32rpx; height: 32rpx; background-position: -1052rpx -160rpx;} .icon-feedback { width: 64rpx; height: 64rpx; background-position: -749rpx -606rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: 0rpx -606rpx;} .icon-first-nav { width: 464rpx; height: 176rpx; background-position: 0rpx -606rpx;}
.icon-home-active { width: 80rpx; height: 80rpx; background-position: -957rpx -65rpx;} .icon-home-active { width: 112rpx; height: 112rpx; background-position: -830rpx 0rpx;}
.icon-home { width: 80rpx; height: 80rpx; background-position: -957rpx -160rpx;} .icon-home { width: 112rpx; height: 112rpx; background-position: -830rpx -127rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -1052rpx -207rpx;} .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -957rpx -618rpx;}
.icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -830rpx 0rpx;} .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -957rpx -665rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1052rpx -255rpx;} .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -957rpx -712rpx;}
.icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -957rpx -445rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1052rpx -302rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1052rpx -350rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -670rpx -415rpx;} .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -670rpx -415rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1052rpx -397rpx;} .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -957rpx -759rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1032rpx -690rpx;} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -957rpx -806rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -1032rpx -765rpx;} .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -957rpx -853rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -957rpx -840rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -830rpx -730rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -1004rpx -840rpx;} .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -877rpx -730rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -495rpx -415rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -495rpx -415rpx;}
.icon-new-addr { width: 32rpx; height: 32rpx; background-position: -1051rpx -840rpx;}
.icon-new-avatar { width: 96rpx; height: 96rpx; background-position: -333rpx -797rpx;}
.icon-new-feedback { width: 64rpx; height: 64rpx; background-position: -957rpx -532rpx;}
.icon-new-home-active { width: 112rpx; height: 112rpx; background-position: -830rpx -127rpx;}
.icon-new-home { width: 112rpx; height: 112rpx; background-position: -830rpx -254rpx;}
.icon-new-record-active { width: 112rpx; height: 112rpx; background-position: -830rpx -381rpx;}
.icon-new-record { width: 112rpx; height: 112rpx; background-position: -830rpx -508rpx;}
.icon-new-setting { width: 64rpx; height: 64rpx; background-position: -957rpx -611rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -479rpx -606rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -479rpx -606rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -614rpx -606rpx;} .icon-pen { width: 120rpx; height: 120rpx; background-position: -614rpx -606rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -444rpx -797rpx;} .icon-qr-success { width: 96rpx; height: 96rpx; background-position: -333rpx -797rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -1036rpx -532rpx;} .icon-qw { width: 48rpx; height: 48rpx; background-position: -957rpx -304rpx;}
.icon-record-active { width: 80rpx; height: 80rpx; background-position: -957rpx -255rpx;} .icon-record-active { width: 112rpx; height: 112rpx; background-position: -830rpx -254rpx;}
.icon-record { width: 80rpx; height: 80rpx; background-position: -957rpx -350rpx;} .icon-record { width: 112rpx; height: 112rpx; background-position: -830rpx -381rpx;}
.icon-scan { width: 32rpx; height: 32rpx; background-position: -830rpx -746rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -749rpx -685rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -555rpx -797rpx;} .icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -444rpx -797rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -666rpx -797rpx;} .icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -555rpx -797rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1036rpx -611rpx;} .icon-search { width: 40rpx; height: 40rpx; background-position: -957rpx -422rpx;}
.icon-second-nav { width: 480rpx; height: 176rpx; background-position: 0rpx -415rpx;} .icon-second-nav { width: 480rpx; height: 176rpx; background-position: 0rpx -415rpx;}
.icon-settings { width: 32rpx; height: 32rpx; background-position: -877rpx -746rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -777rpx -797rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -957rpx -690rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -957rpx -765rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -749rpx -606rpx;}
\ No newline at end of file \ No newline at end of file
.icon-setting { width: 64rpx; height: 64rpx; background-position: -957rpx 0rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -666rpx -797rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -957rpx -79rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -957rpx -154rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -957rpx -229rpx;}
\ No newline at end of file \ No newline at end of file

947 KB | W: | H:

891 KB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin

1.87 KB | W: | H:

2.77 KB | W: | H:

assets/spritesmith/feedback.png
assets/spritesmith/feedback.png
assets/spritesmith/feedback.png
assets/spritesmith/feedback.png
  • 2-up
  • Swipe
  • Onion skin

5.34 KB | W: | H:

28.1 KB | W: | H:

assets/spritesmith/home-active.png
assets/spritesmith/home-active.png
assets/spritesmith/home-active.png
assets/spritesmith/home-active.png
  • 2-up
  • Swipe
  • Onion skin

6.83 KB | W: | H:

5.82 KB | W: | H:

assets/spritesmith/home.png
assets/spritesmith/home.png
assets/spritesmith/home.png
assets/spritesmith/home.png
  • 2-up
  • Swipe
  • Onion skin

5.56 KB | W: | H:

32 KB | W: | H:

assets/spritesmith/record-active.png
assets/spritesmith/record-active.png
assets/spritesmith/record-active.png
assets/spritesmith/record-active.png
  • 2-up
  • Swipe
  • Onion skin

7.08 KB | W: | H:

6.95 KB | W: | H:

assets/spritesmith/record.png
assets/spritesmith/record.png
assets/spritesmith/record.png
assets/spritesmith/record.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -414,6 +414,7 @@ export default { ...@@ -414,6 +414,7 @@ export default {
font-family: "numberBold"; font-family: "numberBold";
font-size: 48rpx; font-size: 48rpx;
font-weight: 700; font-weight: 700;
margin: 0 4rpx;
} }
.unit { .unit {
font-weight: 500; font-weight: 500;
......
...@@ -51,9 +51,7 @@ ...@@ -51,9 +51,7 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import myClick from "@/mixin/click";
export default { export default {
mixins: [myClick],
name: 'SettingBox', name: 'SettingBox',
data () { data () {
return { return {
...@@ -85,7 +83,7 @@ export default { ...@@ -85,7 +83,7 @@ export default {
confirmColor: '#347BFF', confirmColor: '#347BFF',
async success (res) { async success (res) {
if (res.confirm) { if (res.confirm) {
_this.stopAudio(); _this.$emit('stopAudio')
try { try {
uni.showLoading() uni.showLoading()
const { code, message } = await uni.$api.userApi.logout(), const { code, message } = await uni.$api.userApi.logout(),
......
...@@ -27,9 +27,8 @@ ...@@ -27,9 +27,8 @@
</view> </view>
</view> </view>
<view class="left-side"> <view class="left-side">
<!-- 左侧内容 -->
<view class="user-info flex"> <view class="user-info flex">
<view class="user-avatar sprite-icon icon-new-avatar"></view> <view class="user-avatar sprite-icon icon-avatar"></view>
<view class="user-name">{{ userInfo.name }}</view> <view class="user-name">{{ userInfo.name }}</view>
</view> </view>
<view class="left-tabs"> <view class="left-tabs">
...@@ -42,7 +41,7 @@ ...@@ -42,7 +41,7 @@
<view class="icon-box"> <view class="icon-box">
<view :class="[ <view :class="[
'sprite-icon', 'sprite-icon',
`icon-new-${i.icon}${tabIndex == index ? '-active' : ''}`, `icon-${i.icon}${tabIndex == index ? '-active' : ''}`,
]"></view> ]"></view>
</view> </view>
{{ i.label }} {{ i.label }}
...@@ -54,20 +53,19 @@ ...@@ -54,20 +53,19 @@
class="btn" class="btn"
@click="$refs.kfRef.open()" @click="$refs.kfRef.open()"
> >
<view class="sprite-icon icon-new-feedback"></view> <view class="sprite-icon icon-feedback"></view>
</view> </view>
<view <view
class="btn" class="btn"
@click="$refs.settingRef.open()" @click="$refs.settingRef.open()"
> >
<view class="sprite-icon icon-new-setting"></view> <view class="sprite-icon icon-setting"></view>
</view> </view>
</view> </view>
</view> </view>
<view class="right-side"> <view class="right-side">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<view class="right-content"> <view class="right-content">
<!-- 右侧内容 -->
<template v-if="skeletonStatus"> <template v-if="skeletonStatus">
<view class="skeleton-box"> <view class="skeleton-box">
<view class="start"> <view class="start">
...@@ -98,34 +96,19 @@ ...@@ -98,34 +96,19 @@
src="../../assets/images/home/start-border.png" src="../../assets/images/home/start-border.png"
/> />
</view> </view>
<!-- <view class="start">
<view class="start-btn"></view>
</view> -->
<!-- <button
class="start"
@click="start"
hover-class="hover-class"
>
<view class="icon-start sprite-icon icon-icon-handshake"></view>
<view class="start-text">开始接待</view>
</button> -->
<!-- 各模块入口list -->
<view class="module-list"> <view class="module-list">
<slot name="module" /> <slot name="module" />
</view> </view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
<slot name="record" /> <record-list />
</template> </template>
<view class="store-addr"> <view class="store-addr">
<view class="icon-addr sprite-icon icon-new-addr"></view> <view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view> <view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view> </view>
</view> </view>
<!-- </template> -->
</view> </view>
<view :class="['detail', { show: id }]"> <view :class="['detail', { show: id }]">
<slot name="detail" /> <slot name="detail" />
...@@ -179,17 +162,21 @@ ...@@ -179,17 +162,21 @@
<!-- 客服弹框 --> <!-- 客服弹框 -->
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<!-- 设置弹框 --> <!-- 设置弹框 -->
<setting-box ref="settingRef" /> <setting-box
ref="settingRef"
@stopAudio="stopAudio"
/>
<slot name="content" /> <slot name="content" />
</view> </view>
</template> </template>
<script> <script>
import KfBox from "./components/KfBox"; import KfBox from "./components/KfBox";
import SettingBox from "./components/SettingBox"; import SettingBox from "./components/SettingBox";
import RecordList from "./components/RecordList.vue";
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
export default { export default {
mixins: [myClick], mixins: [myClick],
components: { KfBox, SettingBox }, components: { KfBox, SettingBox, RecordList },
props: { props: {
id: [String, Number], id: [String, Number],
finishDoneText: String, finishDoneText: String,
...@@ -213,8 +200,7 @@ export default { ...@@ -213,8 +200,7 @@ export default {
}, },
], ],
tabIndex: 0, tabIndex: 0,
dateKey: null, dateKey: null
}; };
}, },
mounted () { mounted () {
......
...@@ -22,9 +22,6 @@ ...@@ -22,9 +22,6 @@
</view> </view>
</template> </template>
</view> </view>
<template slot="record">
<record-list ref="recordRef" />
</template>
<template slot="detail"> <template slot="detail">
<detail <detail
:id.sync="id" :id.sync="id"
...@@ -45,15 +42,12 @@ ...@@ -45,15 +42,12 @@
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import myClick from "@/mixin/click"; import HomeFrame from '@/components/HomeFrame/index.vue'
import HomeFrame from '../../components/HomeFrame/index.vue'
import RecordList from '../home/components/RecordList.vue';
import detail from './detail.vue' import detail from './detail.vue'
import CustomerType from './components/CustomerType.vue'; import CustomerType from './components/CustomerType.vue';
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
export default { export default {
mixins: [myClick], components: { HomeFrame, detail, CustomerType },
components: { HomeFrame, RecordList, detail, CustomerType },
name: 'boutique', name: 'boutique',
data () { data () {
return { return {
...@@ -160,7 +154,7 @@ export default { ...@@ -160,7 +154,7 @@ export default {
this.backHome(); this.backHome();
}, },
backHome () { backHome () {
if (this.recording) this.stopAudio(true); if (this.recording) this.$refs.home.stopAudio(true);
this.$refs.home.finishRef.close(); this.$refs.home.finishRef.close();
this.id = ""; this.id = "";
this.type = ""; this.type = "";
...@@ -182,7 +176,7 @@ export default { ...@@ -182,7 +176,7 @@ export default {
return false return false
} }
if (before) this.clearHistory(); if (before) this.clearHistory();
this.startAudio(); this.$refs.home.startAudio();
this.recording = true this.recording = true
return true return true
}, },
...@@ -211,11 +205,11 @@ export default { ...@@ -211,11 +205,11 @@ export default {
}, },
done (e) { done (e) {
this.$refs.home.finishRef.close(); this.$refs.home.finishRef.close();
if (this.recording) this.stopAudio(); if (this.recording) this.$refs.home.stopAudio();
this.recording = false
setTimeout(() => { setTimeout(() => {
this.id = ""; this.id = "";
this.type = ""; this.type = "";
this.recording = false
this.setReceptionStatus(e); this.setReceptionStatus(e);
}, 1500); }, 1500);
}, },
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
<template> <template>
<view <view
class="detail-box" class="detail-box"
@click="handleTouchStart()"
@dblclick="dbClick" @dblclick="dbClick"
> >
<view class="nav-bar"> <view class="nav-bar">
...@@ -72,7 +71,6 @@ ...@@ -72,7 +71,6 @@
</template> </template>
<script> <script>
import ToolBox from "@/components/ToolBox.vue"; import ToolBox from "@/components/ToolBox.vue";
import myClick from "@/mixin/click";
import Media_1 from "./components/Media_1.vue"; import Media_1 from "./components/Media_1.vue";
import MediaComponent from "./components/MediaComponent.vue"; import MediaComponent from "./components/MediaComponent.vue";
import Media_6 from "./components/Media_6.vue"; import Media_6 from "./components/Media_6.vue";
...@@ -88,7 +86,6 @@ export default { ...@@ -88,7 +86,6 @@ export default {
payPop, payPop,
FinishStep FinishStep
}, },
mixins: [myClick],
props: { props: {
id: [String, Number], id: [String, Number],
media: Array, media: Array,
......
<!--
* @Description: 首页
* @Author: huyue
* @Date: 2024-04-07 14:39:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-18 17:08:12
-->
<template> <template>
<view class="container" @click="handleTouchStart()"> <!-- <view class="container" @click="handleTouchStart()">
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<view class="bg"> <view class="bg">
<view class="top"> <view class="top">
...@@ -18,14 +11,10 @@ ...@@ -18,14 +11,10 @@
<view class="bottom-three" :style="randomize"></view> <view class="bottom-three" :style="randomize"></view>
</view> </view>
</view> </view>
<!-- <template v-if="false"> -->
<view class="left-side"> <view class="left-side">
<!-- 左侧内容 -->
<view class="user-info flex"> <view class="user-info flex">
<view class="user-avatar sprite-icon icon-icon-avatar"></view> <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> </view>
<view class="left-tabs"> <view class="left-tabs">
<template v-for="(i, index) in tabs"> <template v-for="(i, index) in tabs">
...@@ -60,7 +49,6 @@ ...@@ -60,7 +49,6 @@
<view :class="['right-side', { 'pl-20': tabIndex == 1 }]"> <view :class="['right-side', { 'pl-20': tabIndex == 1 }]">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<view class="right-content"> <view class="right-content">
<!-- 右侧内容 -->
<template v-if="skeletonStatus"> <template v-if="skeletonStatus">
<view class="skeleton-box"> <view class="skeleton-box">
<view class="home-title"></view> <view class="home-title"></view>
...@@ -85,7 +73,6 @@ ...@@ -85,7 +73,6 @@
<view class="start-text">开始接待</view> <view class="start-text">开始接待</view>
</button> </button>
<!-- 各模块入口list -->
<view class="module-list"> <view class="module-list">
<view <view
class="module-item" class="module-item"
...@@ -104,7 +91,6 @@ ...@@ -104,7 +91,6 @@
</view> </view>
</view> </view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox <MessageBox
ref="previewRef" ref="previewRef"
@cancel="cancel" @cancel="cancel"
...@@ -125,7 +111,6 @@ ...@@ -125,7 +111,6 @@
<view class="addr-text">{{ userInfo.shopMerchantName }}</view> <view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view> </view>
</view> </view>
<!-- </template> -->
</view> </view>
<view :class="['detail', { show: id }]"> <view :class="['detail', { show: id }]">
<detail <detail
...@@ -164,20 +149,36 @@ ...@@ -164,20 +149,36 @@
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<novice-guide @nextStep="nextStep" @back="back" /> <novice-guide @nextStep="nextStep" @back="back" />
<setting-box ref="settingRef" /> <setting-box ref="settingRef" />
</view> </view> -->
<home-frame
@preview="preview"
@start="start"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
>
<template slot="detail">
<detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
@back="back"
@done="done"
ref="detail"
/>
</template>
</home-frame>
</template> </template>
<script> <script>
import myClick from "@/mixin/click";
import detail from "../detail/detail"; import detail from "../detail/detail";
import KfBox from "@/components/HomeFrame/components/KfBox";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import NoviceGuide from "@/components/NoviceGuide.vue"; import NoviceGuide from "@/components/NoviceGuide.vue";
import RecordList from "./components/RecordList.vue"; import HomeFrame from '@/components/HomeFrame/index.vue'
import SettingBox from "@/components/HomeFrame/components/SettingBox";
export default { export default {
mixins: [myClick], components: { HomeFrame, detail, NoviceGuide },
components: { detail, KfBox, NoviceGuide, RecordList, SettingBox }, data () {
data() {
return { return {
moduleList: [], moduleList: [],
userInfo: {}, userInfo: {},
...@@ -201,13 +202,13 @@ export default { ...@@ -201,13 +202,13 @@ export default {
recording: false, recording: false,
}; };
}, },
mounted() { mounted () {
setInterval(() => { setInterval(() => {
this.dateKey = Date.now(); this.dateKey = Date.now();
}, 5e3); }, 5e3);
}, },
computed: { computed: {
randomize() { randomize () {
let { dateKey } = this; let { dateKey } = this;
const maxX = uni.getSystemInfoSync().windowWidth - 300, const maxX = uni.getSystemInfoSync().windowWidth - 300,
maxY = uni.getSystemInfoSync().windowHeight - 100, maxY = uni.getSystemInfoSync().windowHeight - 100,
...@@ -216,7 +217,7 @@ export default { ...@@ -216,7 +217,7 @@ export default {
return `transform:translate(${x}px,${y}px);${dateKey};`; return `transform:translate(${x}px,${y}px);${dateKey};`;
}, },
}, },
onBackPress(options) { onBackPress (options) {
if (options.from === "backbutton") { if (options.from === "backbutton") {
// 物理返回按钮触发 // 物理返回按钮触发
// 阻止默认行为,即不执行页面返回 // 阻止默认行为,即不执行页面返回
...@@ -226,16 +227,16 @@ export default { ...@@ -226,16 +227,16 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false; return false;
}, },
onShow() { onShow () {
this.init(); this.init();
}, },
async onReachBottom() { async onReachBottom () {
const { tabIndex } = this; const { tabIndex } = this;
if (tabIndex == 0) this.$refs.detail?.pageonReachBottom(); if (tabIndex == 0) this.$refs.detail?.pageonReachBottom();
// else this.$refs.recordRef?.pageonReachBottom()
}, },
methods: { methods: {
init() { ...mapMutations("audio", ["setReceptionStatus"]),
init () {
this.getSoure(); this.getSoure();
this.findPayInfo(); this.findPayInfo();
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
...@@ -264,9 +265,8 @@ export default { ...@@ -264,9 +265,8 @@ export default {
this.$store.dispatch("setEmployeeList", res); this.$store.dispatch("setEmployeeList", res);
}); });
}, },
...mapMutations("audio", ["setReceptionStatus"]),
// 查询素材 // 查询素材
async getSoure() { async getSoure () {
const moduleList = await uni.$api.commonApi.findSoureList(); const moduleList = await uni.$api.commonApi.findSoureList();
moduleList.map((e) => { moduleList.map((e) => {
e.top_bg = require(`@/assets/images/media/bg-${e.id}.webp`); e.top_bg = require(`@/assets/images/media/bg-${e.id}.webp`);
...@@ -275,7 +275,7 @@ export default { ...@@ -275,7 +275,7 @@ export default {
this.moduleList = moduleList; this.moduleList = moduleList;
// this.skeletonStatus = false // this.skeletonStatus = false
}, },
async start() { async start () {
const result = await this.$permision.requestAndroidPermission( const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO" "android.permission.RECORD_AUDIO"
); );
...@@ -287,29 +287,29 @@ export default { ...@@ -287,29 +287,29 @@ export default {
return; return;
} }
this.clearHistory(); this.clearHistory();
this.startAudio(); this.$refs.home.startAudio();
this.id = this.moduleList[0].id; this.id = this.moduleList[0].id;
this.type = "edit"; this.type = "edit";
this.recording = true; this.recording = true;
}, },
toDetail(item) { toDetail (item) {
this.chooseItem = item; this.chooseItem = item;
this.$refs.previewRef.open(); this.$refs.home.previewRef.open();
}, },
cancel() { cancel () {
this.$refs.previewRef.close(); this.$refs.home.previewRef.close();
}, },
preview() { preview () {
let { id } = this.chooseItem; let { id } = this.chooseItem;
this.type = "preview"; this.type = "preview";
this.id = id; this.id = id;
this.$refs.previewRef.close(); this.cancel()
}, },
// 完成接待 // 完成接待
done(e) { done (e) {
this.$refs.finish.close(); this.$refs.home.finishRef.close();
if (this.recording) this.stopAudio(); if (this.recording) this.$refs.home.stopAudio();
this.recording = false; this.recording = false;
setTimeout(() => { setTimeout(() => {
this.id = ""; this.id = "";
...@@ -317,40 +317,40 @@ export default { ...@@ -317,40 +317,40 @@ export default {
this.setReceptionStatus(e); this.setReceptionStatus(e);
}, 1500); }, 1500);
}, },
back() { back () {
if (!this.id) return uni.navigateBack(); if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.finish.open(); if (this.type != "preview") return this.$refs.home.finishRef.open();
this.backHome(); this.backHome();
}, },
backHome() { backHome () {
if (this.recording) this.stopAudio(true); if (this.recording) this.$refs.home.stopAudio(true);
this.recording = false; this.$refs.home.finishRef.close();
this.$refs.finish.close();
this.id = ""; this.id = "";
this.type = ""; this.type = "";
this.clearHistory(); this.clearHistory();
this.init(); this.init();
this.recording = false;
}, },
thumbnailLoad(id) { thumbnailLoad (id) {
this.thumbnailFulfillList.push(id); this.thumbnailFulfillList.push(id);
if (this.thumbnailFulfillList.length == this.moduleList.length) if (this.thumbnailFulfillList.length == this.moduleList.length)
this.skeletonStatus = false; this.skeletonStatus = 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");
}, },
openStep() { openStep () {
this.$refs.finish.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,
...@@ -374,7 +374,7 @@ export default { ...@@ -374,7 +374,7 @@ export default {
}); });
this.$store.dispatch("setPaymentType", paymentType); this.$store.dispatch("setPaymentType", paymentType);
}, },
changeIndex(index) { changeTab (index) {
this.tabIndex = index; this.tabIndex = index;
if (index == 0) this.init(); if (index == 0) this.init();
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!