Commit 8d18b829 by 前端

样式

1 parent c1a52085

1.27 MB | W: | H:

1.27 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -6,43 +6,27 @@ ...@@ -6,43 +6,27 @@
</view> </view>
<view :class="['left-tabs', { three: tabs.length == 3 }]"> <view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs"> <template v-for="(i, index) in tabs">
<view <view :class="['tab-item', { tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index)">
:class="['tab-item', { tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index)"
>
<view class="icon-box"> <view class="icon-box">
<view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view> <view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view>
</view> </view>
{{ i.label }} {{ i.label }}
<view <view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view>
class="dot"
v-if="i.icon == 'record' && perRecordNumber"
></view>
</view> </view>
</template> </template>
</view> </view>
<view class="left-footer"> <view class="left-footer">
<view <view class="btn" @click="$refs.kfRef.open()">
class="btn"
@click="$refs.kfRef.open()"
>
<view class="sprite-icon icon-feedback"></view> <view class="sprite-icon icon-feedback"></view>
</view> </view>
<view <view class="btn" @click="$refs.settingRef.open()">
class="btn"
@click="$refs.settingRef.open()"
>
<view class="sprite-icon icon-setting"></view> <view class="sprite-icon icon-setting"></view>
</view> </view>
</view> </view>
<!-- 客服弹框 --> <!-- 客服弹框 -->
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<!-- 设置弹框 --> <!-- 设置弹框 -->
<setting-box <setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" />
ref="settingRef"
@stopAudio="$emit('stopAudio')"
/>
</view> </view>
</template> </template>
...@@ -70,7 +54,7 @@ export default { ...@@ -70,7 +54,7 @@ export default {
}, },
{ {
label: "积分权益", label: "积分权益",
icon: "record", icon: "point",
}, },
], ],
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-18 16:03:00 * @LastEditTime: 2024-12-18 21:16:59
--> -->
<template> <template>
<view class="point-box"> <view class="point-box">
...@@ -58,7 +58,9 @@ ...@@ -58,7 +58,9 @@
</view> </view>
</template> </template>
<script> <script>
import point from '@/mixin/point'
export default { export default {
mixins: [point],
data() { data() {
return { return {
selectItem: {}, selectItem: {},
...@@ -128,20 +130,7 @@ export default { ...@@ -128,20 +130,7 @@ export default {
} }
}, },
mounted() {}, mounted() {},
methods: { methods: {}
prevTab(val) {
if (val) return
this.currentIndex--
this.currentStep = 0
this.updateStage()
},
nextTab(val) {
if (val) return
this.currentIndex++
this.currentStep = 0
this.updateStage()
}
}
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -231,7 +220,7 @@ export default { ...@@ -231,7 +220,7 @@ export default {
box-shadow: inset 0 0 16rpx 0 #ffffff; box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 32rpx; border-radius: 32rpx;
padding: 24rpx 48rpx; padding: 24rpx 48rpx;
height: calc(100vh - 360rpx); height: calc(100vh - 380rpx);
.item-header { .item-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-17 13:48:57 * @LastEditTime: 2024-12-18 22:13:10
--> -->
<template> <template>
<view class="point-box"> <view class="point-box">
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view class="back" @click="back"> <view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons> <uni-icons type="left" :size="20" color="#000"></uni-icons>
</view> </view>
<view class="title">每日积分</view> <view class="title"><text>每日积分</text></view>
</view> </view>
<view class="finish-title"> <view class="finish-title">
已完成 已完成
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</view> </view>
<view class="day-list"> <view class="day-list">
<view class="day-item" v-for="(i, index) in dayList" :key="index"> <view class="day-item" v-for="(i, index) in dayList" :key="index">
<view class="day-logo"></view> <view class="day-logo"><image :src="i.logo"></image></view>
<view class="day-desc"> <view class="day-desc">
<view class="day-title">{{ i.title }}</view> <view class="day-title">{{ i.title }}</view>
<view class="day-content">{{ i.content }}</view> <view class="day-content">{{ i.content }}</view>
...@@ -31,36 +31,68 @@ ...@@ -31,36 +31,68 @@
<view class="dailog-panel" v-if="show"> <view class="dailog-panel" v-if="show">
<view class="dailog-box"> <view class="dailog-box">
<view class="dailog-close" @click="show = false"><uni-icons type="closeempty" size="30"></uni-icons></view> <view class="dailog-close" @click="show = false"><uni-icons type="closeempty" size="30"></uni-icons></view>
<view class="dailog-logo"></view> <view class="dailog-logo"><image :src="selectItem.logo"></image></view>
<view class="dailog-title">{{ selectItem.title }}</view> <view class="dailog-title">{{ selectItem.title }}</view>
<view class="dailog-content">{{ selectItem.content }}</view> <view class="dailog-content">{{ selectItem.content }}</view>
<view class="dailog-btn" @click="show = false">好的</view>
<view class="dailog-footer">
<template v-if="selectItem.jump">
<view class="dailog-btn disabled" @click="show = false">关闭</view>
<view class="dailog-btn" @click="$emit('jump')">跳转({{ second }}s)</view>
</template>
<view class="dailog-btn" v-else @click="show = false">好的</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import point from '@/mixin/point'
export default { export default {
name: 'DayPoint', mixins: [point],
data() { data() {
return { return {
second: 3,
timer: null,
selectItem: {}, selectItem: {},
dayList: [ dayList: [
{ title: '签到', content: '完成日常打卡' }, { title: '考勤打卡', content: '完成日常打卡', logo: require('@/assets/images/point/day-time.png') },
{ title: '签到', content: '完成日常打5卡' }, { title: '日报填写', content: '完成日常打5卡', logo: require('@/assets/images/point/day-report.png') },
{ title: '签到', content: '完成日常打卡' }, { title: '平板接待', content: '完成日常打卡', logo: require('@/assets/images/point/day-ipad.png'), jump: true },
{ title: '签到', content: '完成日常打卡' }, { title: '参与培训', content: '完成日常打卡', logo: require('@/assets/images/point/day-training.png') },
{ title: '签到', content: '完成日常打卡' } { title: 'AI话术对练', content: '完成日常打卡', logo: require('@/assets/images/point/day-ai.png') },
{ title: '开课程授课', content: '完成日常打卡', logo: require('@/assets/images/point/day-course.png') },
{ title: '预学习', content: '完成日常打卡', logo: require('@/assets/images/point/day-study.png') }
], ],
show: false show: false
} }
}, },
watch: {
show(val) {
if (!val) {
clearInterval(this.timer)
this.second = 3
}
}
},
mounted() {}, mounted() {},
methods: { methods: {
handleGo(val) { handleGo(val) {
this.selectItem = val this.selectItem = val
if (val.jump) {
this.timer = setInterval(() => {
this.second--
if (this.second == 1) {
clearInterval(this.timer)
this.$emit('jump')
}
}, 1000)
}
this.show = true this.show = true
} }
},
beforeDestroy() {
clearInterval(this.timer)
} }
} }
</script> </script>
...@@ -97,6 +129,13 @@ export default { ...@@ -97,6 +129,13 @@ export default {
font-size: 40rpx; font-size: 40rpx;
} }
} }
.dailog-logo {
text-align: center;
image {
width: 228rpx;
height: 228rpx;
}
}
.dailog-title { .dailog-title {
font-size: 40rpx; font-size: 40rpx;
color: #1a1a1a; color: #1a1a1a;
...@@ -109,6 +148,11 @@ export default { ...@@ -109,6 +148,11 @@ export default {
text-align: center; text-align: center;
line-height: 60rpx; line-height: 60rpx;
} }
.dailog-footer {
display: flex;
justify-content: center;
margin: 80rpx 0 70rpx;
}
.dailog-btn { .dailog-btn {
width: 400rpx; width: 400rpx;
height: 96rpx; height: 96rpx;
...@@ -119,7 +163,11 @@ export default { ...@@ -119,7 +163,11 @@ export default {
font-size: 36rpx; font-size: 36rpx;
color: #ffffff; color: #ffffff;
line-height: 96rpx; line-height: 96rpx;
margin: 80rpx auto 70rpx; &.disabled {
background-color: #808291;
color: #1a1a1a;
margin-right: 48rpx;
}
} }
} }
} }
...@@ -143,8 +191,10 @@ export default { ...@@ -143,8 +191,10 @@ export default {
color: #1a1a1a; color: #1a1a1a;
flex: 1; flex: 1;
text-align: center; text-align: center;
text {
margin-left: -96rpx; margin-left: -96rpx;
} }
}
} }
.finish-title { .finish-title {
font-size: 36rpx; font-size: 36rpx;
...@@ -169,8 +219,11 @@ export default { ...@@ -169,8 +219,11 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
.day-logo { .day-logo {
image {
width: 76rpx; width: 76rpx;
height: 63rpx; height: 76rpx;
margin-right: 20rpx;
}
} }
.day-desc { .day-desc {
.day-title { .day-title {
......
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
</view> </view>
</template> </template>
<script> <script>
import point from '@/mixin/point'
export default { export default {
mixins: [point],
data() { data() {
return { return {
selectItem: {}, selectItem: {},
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-18 15:48:25 * @LastEditTime: 2024-12-18 21:05:23
--> -->
<template> <template>
<view class="point-box"> <view class="point-box">
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
</view> </view>
</template> </template>
<script> <script>
import point from '@/mixin/point'
export default { export default {
mixins: [point],
data() { data() {
return { return {
selectItem: {}, selectItem: {},
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
</view> </view>
</template> </template>
<script> <script>
import point from '@/mixin/point'
export default { export default {
mixins: [point],
data() { data() {
return { return {
selectItem: {}, selectItem: {},
......
...@@ -5,19 +5,9 @@ ...@@ -5,19 +5,9 @@
<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">
<view <view class="start" @click="$emit('start')">
class="start" <image class="start-btn" src="../../assets/images/home/start.gif" alt="开始接待" />
@click="$emit('start')" <image class="start-border" src="../../assets/images/home/start-border.png" />
>
<image
class="start-btn"
src="../../assets/images/home/start.gif"
alt="开始接待"
/>
<image
class="start-border"
src="../../assets/images/home/start-border.png"
/>
</view> </view>
<view class="module-list"> <view class="module-list">
<slot name="module" /> <slot name="module" />
...@@ -25,10 +15,7 @@ ...@@ -25,10 +15,7 @@
</view> </view>
</template> </template>
<template v-else> <template v-else>
<component <component :is="componentName" :userInfo="userInfo" @showPage="handleShowPage" />
:is="componentName"
:userInfo="userInfo"
/>
</template> </template>
<view class="store-addr"> <view class="store-addr">
<view class="icon-addr sprite-icon icon-addr"></view> <view class="icon-addr sprite-icon icon-addr"></view>
...@@ -40,39 +27,16 @@ ...@@ -40,39 +27,16 @@
<slot name="detail" /> <slot name="detail" />
</view> </view>
<view class="point-page" v-if="!showHome"> <view class="point-page" v-if="!showHome">
<component :is="pointComponentName" /> <component :is="pointComponentName" @backHome="backHome" @jump="jump" />
</view> </view>
<!-- 未点击开始接待,弹窗 --> <!-- 未点击开始接待,弹窗 -->
<MessageBox <MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材" @cancel="$emit('previewCancel')" @close="$emit('previewClose')"></MessageBox>
ref="previewRef"
@confirm="$emit('preview')"
:popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材"
@cancel="$emit('previewCancel')"
@close="$emit('previewClose')"
></MessageBox>
<!-- 停留弹框 --> <!-- 停留弹框 -->
<MessageBox <MessageBox ref="tipBox" @cancel="tipCancel" @confirm="tipConfirm" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" cancelBtnText="否" confirmBtnText="是"></MessageBox>
ref="tipBox"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
<!-- 退出弹框 --> <!-- 退出弹框 -->
<MessageBox <MessageBox :popupW="704" ref="finish" :content="finishContene" :isFooter="false">
:popupW="704"
ref="finish"
:content="finishContene"
:isFooter="false"
>
<view class="footer"> <view class="footer">
<view <view class="footer-btn confirm flex" @click="$emit('openStep')">
class="footer-btn confirm flex"
@click="$emit('openStep')"
>
<template v-if="finishDoneText"> <template v-if="finishDoneText">
{{ finishDoneText }} {{ finishDoneText }}
</template> </template>
...@@ -81,10 +45,7 @@ ...@@ -81,10 +45,7 @@
<text>(推荐)</text> <text>(推荐)</text>
</template> </template>
</view> </view>
<view <view class="footer-btn cancel flex" @click="$emit('backHome')">
class="footer-btn cancel flex"
@click="$emit('backHome')"
>
仍要退出 仍要退出
<text>(不推荐)</text> <text>(不推荐)</text>
</view> </view>
...@@ -93,11 +54,7 @@ ...@@ -93,11 +54,7 @@
<!-- 升级弹框 --> <!-- 升级弹框 -->
<update-box /> <update-box />
<slot name="content" /> <slot name="content" />
<web-view <web-view @message="handlerMessage" ref="webview" src="/hybrid/html/index.html"></web-view>
@message="handlerMessage"
ref="webview"
src="/hybrid/html/index.html"
></web-view>
</view> </view>
</template> </template>
<script> <script>
...@@ -123,24 +80,24 @@ export default { ...@@ -123,24 +80,24 @@ export default {
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」' default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」'
} }
}, },
data () { data() {
return { return {
showHome: true, showHome: true,
pointComponentName: 'Point', pointComponentName: 'dayPoint',
userInfo: {}, userInfo: {},
tabIndex: 0 tabIndex: 0
} }
}, },
mounted () { mounted() {
const userInfo = uni.$storage.get('userInfo') || {} const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo this.userInfo = userInfo
}, },
computed: { computed: {
previewRef () { previewRef() {
return this.$refs.previewRef return this.$refs.previewRef
}, },
finishRef () { finishRef() {
return this.$refs.finish return this.$refs.finish
}, },
componentName() { componentName() {
...@@ -151,7 +108,20 @@ export default { ...@@ -151,7 +108,20 @@ export default {
else return 'CustomerFile' else return 'CustomerFile'
} }
}, },
methods: {} methods: {
backHome() {
this.showHome = true
},
jump() {
console.log(888)
this.showHome = true
this.$emit('start')
},
handleShowPage(name) {
this.showHome = false
this.pointComponentName = name
}
}
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
export default {
data() {
return {}
},
methods: {
back() {
console.log(88)
this.$emit('backHome')
},
prevTab(val) {
if (val) return
this.currentIndex--
this.currentStep = 0
this.updateStage()
},
nextTab(val) {
if (val) return
this.currentIndex++
this.currentStep = 0
this.updateStage()
}
}
}
<template> <template>
<view> <view>
<home-frame <home-frame @preview="preview" @start="start" ref="home" :id="id" @openStep="openStep" @backHome="backHome" @changeTab="changeTab">
@preview="preview" <view class="module-box" slot="module">
@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 <view :key="index" :class="['item', i.class]" :style="i.style" @click="toDetail(i)" v-if="!i.hide">
: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 <image class="item-img" :src="i.thumbnail" mode="scaleToFill" @error="errorImg(index)" />
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 <detail :id.sync="id" :media="moduleList" :type.sync="type" :toolList="toolList" @back="back" @done="done" ref="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
...@@ -72,7 +42,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue' ...@@ -72,7 +42,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: [],
...@@ -84,12 +54,12 @@ export default { ...@@ -84,12 +54,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') {
// 物理返回按钮触发 // 物理返回按钮触发
// 阻止默认行为,即不执行页面返回 // 阻止默认行为,即不执行页面返回
...@@ -99,12 +69,12 @@ export default { ...@@ -99,12 +69,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')
...@@ -118,11 +88,11 @@ export default { ...@@ -118,11 +88,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'),
...@@ -157,7 +127,7 @@ export default { ...@@ -157,7 +127,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)
...@@ -214,26 +184,26 @@ export default { ...@@ -214,26 +184,26 @@ 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
}) // })
const result = await this.$permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // const result = await this.$permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
if (result !== 1) { // if (result !== 1) {
uni.showToast({ // uni.showToast({
title: '为了记录语音通话,请打开录音权限', // title: '为了记录语音通话,请打开录音权限',
icon: 'none' // icon: 'none'
}) // })
return // return
} // }
this.getSoure() this.getSoure()
this.clearHistory() this.clearHistory()
this.$refs.home.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
...@@ -241,14 +211,14 @@ export default { ...@@ -241,14 +211,14 @@ export default {
uni.hideLoading() uni.hideLoading()
}, 1e3) }, 1e3)
}, },
toDetail (item) { toDetail(item) {
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, title } = this.chooseItem let { id, title } = this.chooseItem
this.type = 'preview' this.type = 'preview'
this.id = id this.id = id
...@@ -256,7 +226,7 @@ export default { ...@@ -256,7 +226,7 @@ export default {
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
...@@ -268,14 +238,14 @@ export default { ...@@ -268,14 +238,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 = ''
...@@ -284,23 +254,23 @@ export default { ...@@ -284,23 +254,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
...@@ -324,13 +294,13 @@ export default { ...@@ -324,13 +294,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`)
...@@ -347,7 +317,7 @@ export default { ...@@ -347,7 +317,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
......
...@@ -2,32 +2,33 @@ ...@@ -2,32 +2,33 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-11-01 15:06:40 * @Date: 2024-11-01 15:06:40
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-11-19 09:25:11 * @LastEditTime: 2024-12-18 20:13:50
* @FilePath: \gl-tape\utils\logger\LogCat.js * @FilePath: \gl-tape\utils\logger\LogCat.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
*/ */
import { getTime } from './util' import { getTime } from './util'
class LogCat { class LogCat {
main = plus.android.runtimeMainActivity() // main = plus.android.runtimeMainActivity()
File = plus.android.importClass('java.io.File') // File = plus.android.importClass('java.io.File')
Environment = plus.android.importClass('android.os.Environment') // Environment = plus.android.importClass('android.os.Environment')
BufferedWriter = plus.android.importClass('java.io.BufferedWriter') // BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
FileOutputStream = plus.android.importClass('java.io.FileOutputStream') // FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter') // OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// BufferedReader = plus.android.importClass('java.io.BufferedReader') // BufferedReader = plus.android.importClass('java.io.BufferedReader')
// FileInputStream = plus.android.importClass('java.io.FileInputStream') // FileInputStream = plus.android.importClass('java.io.FileInputStream')
// InputStreamReader = plus.android.importClass('java.io.InputStreamReader') // InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
LogPath = '' LogPath = ''
constructor(folderName = '_zyzs_log') { constructor(folderName = '_zyzs_log') {
if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) { // if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName // this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName
} else { // } else {
this.LogPath = this.main.getFilesDir().getPath() + folderName // this.LogPath = this.main.getFilesDir().getPath() + folderName
} // }
console.log('日志文件存放路径->', this.LogPath) // console.log('日志文件存放路径->', this.LogPath)
} }
writeLog(tag, msg) { writeLog(tag, msg) {
return
let date = getTime('YYYY-MM-DD') let date = getTime('YYYY-MM-DD')
let datetime = getTime() let datetime = getTime()
//文件名 //文件名
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!