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 @@
</view>
<view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs">
<view
:class="['tab-item', { tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index)"
>
<view :class="['tab-item', { tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index)">
<view class="icon-box">
<view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view>
</view>
{{ i.label }}
<view
class="dot"
v-if="i.icon == 'record' && perRecordNumber"
></view>
<view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view>
</view>
</template>
</view>
<view class="left-footer">
<view
class="btn"
@click="$refs.kfRef.open()"
>
<view class="btn" @click="$refs.kfRef.open()">
<view class="sprite-icon icon-feedback"></view>
</view>
<view
class="btn"
@click="$refs.settingRef.open()"
>
<view class="btn" @click="$refs.settingRef.open()">
<view class="sprite-icon icon-setting"></view>
</view>
</view>
<!-- 客服弹框 -->
<kf-box ref="kfRef" />
<!-- 设置弹框 -->
<setting-box
ref="settingRef"
@stopAudio="$emit('stopAudio')"
/>
<setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" />
</view>
</template>
......@@ -70,7 +54,7 @@ export default {
},
{
label: "积分权益",
icon: "record",
icon: "point",
},
],
}
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-18 16:03:00
* @LastEditTime: 2024-12-18 21:16:59
-->
<template>
<view class="point-box">
......@@ -58,7 +58,9 @@
</view>
</template>
<script>
import point from '@/mixin/point'
export default {
mixins: [point],
data() {
return {
selectItem: {},
......@@ -128,20 +130,7 @@ export default {
}
},
mounted() {},
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()
}
}
methods: {}
}
</script>
<style scoped lang="scss">
......@@ -231,7 +220,7 @@ export default {
box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 32rpx;
padding: 24rpx 48rpx;
height: calc(100vh - 360rpx);
height: calc(100vh - 380rpx);
.item-header {
display: flex;
justify-content: space-between;
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-17 13:48:57
* @LastEditTime: 2024-12-18 22:13:10
-->
<template>
<view class="point-box">
......@@ -11,7 +11,7 @@
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">每日积分</view>
<view class="title"><text>每日积分</text></view>
</view>
<view class="finish-title">
已完成
......@@ -19,7 +19,7 @@
</view>
<view class="day-list">
<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-title">{{ i.title }}</view>
<view class="day-content">{{ i.content }}</view>
......@@ -31,36 +31,68 @@
<view class="dailog-panel" v-if="show">
<view class="dailog-box">
<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-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>
</template>
<script>
import point from '@/mixin/point'
export default {
name: 'DayPoint',
mixins: [point],
data() {
return {
second: 3,
timer: null,
selectItem: {},
dayList: [
{ title: '签到', content: '完成日常打卡' },
{ title: '签到', content: '完成日常打5卡' },
{ title: '签到', content: '完成日常打卡' },
{ title: '签到', content: '完成日常打卡' },
{ title: '签到', content: '完成日常打卡' }
{ title: '考勤打卡', content: '完成日常打卡', logo: require('@/assets/images/point/day-time.png') },
{ title: '日报填写', content: '完成日常打5卡', logo: require('@/assets/images/point/day-report.png') },
{ title: '平板接待', content: '完成日常打卡', logo: require('@/assets/images/point/day-ipad.png'), jump: true },
{ title: '参与培训', content: '完成日常打卡', logo: require('@/assets/images/point/day-training.png') },
{ 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
}
},
watch: {
show(val) {
if (!val) {
clearInterval(this.timer)
this.second = 3
}
}
},
mounted() {},
methods: {
handleGo(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
}
},
beforeDestroy() {
clearInterval(this.timer)
}
}
</script>
......@@ -97,6 +129,13 @@ export default {
font-size: 40rpx;
}
}
.dailog-logo {
text-align: center;
image {
width: 228rpx;
height: 228rpx;
}
}
.dailog-title {
font-size: 40rpx;
color: #1a1a1a;
......@@ -109,6 +148,11 @@ export default {
text-align: center;
line-height: 60rpx;
}
.dailog-footer {
display: flex;
justify-content: center;
margin: 80rpx 0 70rpx;
}
.dailog-btn {
width: 400rpx;
height: 96rpx;
......@@ -119,7 +163,11 @@ export default {
font-size: 36rpx;
color: #ffffff;
line-height: 96rpx;
margin: 80rpx auto 70rpx;
&.disabled {
background-color: #808291;
color: #1a1a1a;
margin-right: 48rpx;
}
}
}
}
......@@ -143,7 +191,9 @@ export default {
color: #1a1a1a;
flex: 1;
text-align: center;
margin-left: -96rpx;
text {
margin-left: -96rpx;
}
}
}
.finish-title {
......@@ -169,8 +219,11 @@ export default {
display: flex;
align-items: center;
.day-logo {
width: 76rpx;
height: 63rpx;
image {
width: 76rpx;
height: 76rpx;
margin-right: 20rpx;
}
}
.day-desc {
.day-title {
......
......@@ -71,7 +71,9 @@
</view>
</template>
<script>
import point from '@/mixin/point'
export default {
mixins: [point],
data() {
return {
selectItem: {},
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-18 15:48:25
* @LastEditTime: 2024-12-18 21:05:23
-->
<template>
<view class="point-box">
......@@ -52,7 +52,9 @@
</view>
</template>
<script>
import point from '@/mixin/point'
export default {
mixins: [point],
data() {
return {
selectItem: {},
......
......@@ -22,7 +22,9 @@
</view>
</template>
<script>
import point from '@/mixin/point'
export default {
mixins: [point],
data() {
return {
selectItem: {},
......
......@@ -5,19 +5,9 @@
<view class="right-side">
<template v-if="tabIndex == 0">
<view class="right-content">
<view
class="start"
@click="$emit('start')"
>
<image
class="start-btn"
src="../../assets/images/home/start.gif"
alt="开始接待"
/>
<image
class="start-border"
src="../../assets/images/home/start-border.png"
/>
<view class="start" @click="$emit('start')">
<image class="start-btn" src="../../assets/images/home/start.gif" alt="开始接待" />
<image class="start-border" src="../../assets/images/home/start-border.png" />
</view>
<view class="module-list">
<slot name="module" />
......@@ -25,10 +15,7 @@
</view>
</template>
<template v-else>
<component
:is="componentName"
:userInfo="userInfo"
/>
<component :is="componentName" :userInfo="userInfo" @showPage="handleShowPage" />
</template>
<view class="store-addr">
<view class="icon-addr sprite-icon icon-addr"></view>
......@@ -40,39 +27,16 @@
<slot name="detail" />
</view>
<view class="point-page" v-if="!showHome">
<component :is="pointComponentName" />
<component :is="pointComponentName" @backHome="backHome" @jump="jump" />
</view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox
ref="previewRef"
@confirm="$emit('preview')"
:popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材"
@cancel="$emit('previewCancel')"
@close="$emit('previewClose')"
></MessageBox>
<MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材" @cancel="$emit('previewCancel')" @close="$emit('previewClose')"></MessageBox>
<!-- 停留弹框 -->
<MessageBox
ref="tipBox"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
<MessageBox ref="tipBox" @cancel="tipCancel" @confirm="tipConfirm" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" cancelBtnText="否" confirmBtnText="是"></MessageBox>
<!-- 退出弹框 -->
<MessageBox
:popupW="704"
ref="finish"
:content="finishContene"
:isFooter="false"
>
<MessageBox :popupW="704" ref="finish" :content="finishContene" :isFooter="false">
<view class="footer">
<view
class="footer-btn confirm flex"
@click="$emit('openStep')"
>
<view class="footer-btn confirm flex" @click="$emit('openStep')">
<template v-if="finishDoneText">
{{ finishDoneText }}
</template>
......@@ -81,10 +45,7 @@
<text>(推荐)</text>
</template>
</view>
<view
class="footer-btn cancel flex"
@click="$emit('backHome')"
>
<view class="footer-btn cancel flex" @click="$emit('backHome')">
仍要退出
<text>(不推荐)</text>
</view>
......@@ -93,11 +54,7 @@
<!-- 升级弹框 -->
<update-box />
<slot name="content" />
<web-view
@message="handlerMessage"
ref="webview"
src="/hybrid/html/index.html"
></web-view>
<web-view @message="handlerMessage" ref="webview" src="/hybrid/html/index.html"></web-view>
</view>
</template>
<script>
......@@ -123,24 +80,24 @@ export default {
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」'
}
},
data () {
data() {
return {
showHome: true,
pointComponentName: 'Point',
pointComponentName: 'dayPoint',
userInfo: {},
tabIndex: 0
}
},
mounted () {
mounted() {
const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo
},
computed: {
previewRef () {
previewRef() {
return this.$refs.previewRef
},
finishRef () {
finishRef() {
return this.$refs.finish
},
componentName() {
......@@ -151,7 +108,20 @@ export default {
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>
<style scoped lang="scss">
......@@ -241,7 +211,7 @@ export default {
box-sizing: border-box;
margin-right: toRpx(64);
position: relative;
padding: toRpx(32);
padding: toRpx(32);
}
.module-list {
height: calc(100% - #{toRpx(336)});
......
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>
<view>
<home-frame
@preview="preview"
@start="start"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
>
<view
class="module-box"
slot="module"
>
<home-frame @preview="preview" @start="start" ref="home" :id="id" @openStep="openStep" @backHome="backHome" @changeTab="changeTab">
<view class="module-box" slot="module">
<template v-for="(i, index) in moduleList">
<view
:key="index"
:class="['item', i.class]"
:style="i.style"
@click="toDetail(i)"
v-if="!i.hide"
>
<view :key="index" :class="['item', i.class]" :style="i.style" @click="toDetail(i)" v-if="!i.hide">
<template v-if="i.showAlt">
<view class="item-text flex">{{ i.title }}</view>
</template>
<template v-else>
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
@error="errorImg(index)"
/>
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" @error="errorImg(index)" />
</template>
</view>
</template>
</view>
<template slot="detail">
<detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
:toolList="toolList"
@back="back"
@done="done"
ref="detail"
/>
<detail :id.sync="id" :media="moduleList" :type.sync="type" :toolList="toolList" @back="back" @done="done" ref="detail" />
</template>
<template slot="content">
<!-- <novice-guide
......@@ -72,7 +42,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue'
export default {
// mixins: [storge],
components: { HomeFrame, detail, NoviceGuide },
data () {
data() {
return {
moduleList: [],
toolList: [],
......@@ -84,12 +54,12 @@ export default {
}
},
computed: {
channelType () {
channelType() {
const { channelType } = uni.$storage.get('userInfo')
return channelType || 1 //默认问界
}
},
onBackPress (options) {
onBackPress(options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
......@@ -99,12 +69,12 @@ export default {
// 其他情况允许正常返回
return false
},
onLoad () {
onLoad() {
this.setViewInfo()
this.getSoure()
this.get_Vehicle_Sales_Data()
},
onShow () {
onShow() {
const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo')
......@@ -118,11 +88,11 @@ export default {
},
methods: {
...mapMutations('audio', ['setReceptionStatus']),
init () {
init() {
this.findPayInfo()
},
/**获取车型&销售数据 */
get_Vehicle_Sales_Data () {
get_Vehicle_Sales_Data() {
const userInfo = uni.$storage.get('userInfo'),
storageCarBrandList = uni.$storage.get('carBrandList'),
storageEmployeeList = uni.$storage.get('employeeList'),
......@@ -157,7 +127,7 @@ export default {
})
},
// 查询素材
async getSoure () {
async getSoure() {
/**比亚迪 */
if (this.channelType == 2) {
let { moduleList, toolList } = await uni.$api.systemApi.getBydMockData(true)
......@@ -214,26 +184,26 @@ export default {
}
}
},
errorImg (index) {
errorImg(index) {
this.moduleList[index].showAlt = true
},
async start () {
async start() {
if (this.recording) return
uni.showLoading({
mask: true
})
const result = await this.$permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
if (result !== 1) {
uni.showToast({
title: '为了记录语音通话,请打开录音权限',
icon: 'none'
})
return
}
// uni.showLoading({
// mask: true
// })
// const result = await this.$permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
// if (result !== 1) {
// uni.showToast({
// title: '为了记录语音通话,请打开录音权限',
// icon: 'none'
// })
// return
// }
this.getSoure()
this.clearHistory()
this.$refs.home.startAudio()
// this.$refs.home.startAudio()
this.id = this.moduleList[0].id
this.type = 'edit'
this.recording = true
......@@ -241,14 +211,14 @@ export default {
uni.hideLoading()
}, 1e3)
},
toDetail (item) {
toDetail(item) {
this.chooseItem = item
this.$refs.home.previewRef.open()
},
cancel () {
cancel() {
this.$refs.home.previewRef.close()
},
preview () {
preview() {
let { id, title } = this.chooseItem
this.type = 'preview'
this.id = id
......@@ -256,7 +226,7 @@ export default {
this.cancel()
},
// 完成接待
done (e) {
done(e) {
this.$refs.home.finishRef.close()
if (this.recording) this.$refs.home.stopAudio()
this.recording = false
......@@ -268,14 +238,14 @@ export default {
this.$store.dispatch('clearReceptionTrack')
}, 1500)
},
back () {
back() {
const detailRef = this.$refs.detail
if (detailRef.showPayPage) return (detailRef.showPayPage = false)
if (!this.id) return uni.navigateBack()
if (this.type != 'preview') return this.$refs.home.finishRef.open()
this.backHome()
},
backHome () {
backHome() {
if (this.recording) this.$refs.home.stopAudio(true)
this.$refs.home.finishRef.close()
this.id = ''
......@@ -284,23 +254,23 @@ export default {
this.init()
this.recording = false
},
nextStep () {
nextStep() {
let { id } = this.moduleList[0]
this.type = 'preview'
this.id = id
},
clearHistory () {
clearHistory() {
this.$store.dispatch('clearCustomerInfo')
this.$store.dispatch('clearHistory')
this.$refs.home.setBooks([])
this.$store.dispatch('clearReceptionTrack')
},
openStep () {
openStep() {
this.$refs.home.finishRef.close()
this.$refs.detail.open()
},
// 查询门店支付配置
async findPayInfo () {
async findPayInfo() {
const { shopMerchantId } = uni.$storage.get('userInfo')
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId
......@@ -324,13 +294,13 @@ export default {
})
this.$store.dispatch('setPaymentType', paymentType)
},
changeTab (index) {
changeTab(index) {
this.tabIndex = index
if (index == 0) this.init()
},
/**按序加载车型 */
async getCarBrandsList (carBrandList, index) {
async getCarBrandsList(carBrandList, index) {
const item = carBrandList[index]
if (!item) return
const carList = uni.getStorageSync(`${item.id}_${item.brandId}_carlist`)
......@@ -347,7 +317,7 @@ export default {
}
},
/**素材内容 */
setViewInfo (_moduleList, _toolList) {
setViewInfo(_moduleList, _toolList) {
if (_moduleList && _toolList) {
this.moduleList = _moduleList
this.toolList = _toolList
......
......@@ -2,32 +2,33 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-11-01 15:06:40
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { getTime } from './util'
class LogCat {
main = plus.android.runtimeMainActivity()
File = plus.android.importClass('java.io.File')
Environment = plus.android.importClass('android.os.Environment')
BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// main = plus.android.runtimeMainActivity()
// File = plus.android.importClass('java.io.File')
// Environment = plus.android.importClass('android.os.Environment')
// BufferedWriter = plus.android.importClass('java.io.BufferedWriter')
// FileOutputStream = plus.android.importClass('java.io.FileOutputStream')
// OutputStreamWriter = plus.android.importClass('java.io.OutputStreamWriter')
// BufferedReader = plus.android.importClass('java.io.BufferedReader')
// FileInputStream = plus.android.importClass('java.io.FileInputStream')
// InputStreamReader = plus.android.importClass('java.io.InputStreamReader')
LogPath = ''
constructor(folderName = '_zyzs_log') {
if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName
} else {
this.LogPath = this.main.getFilesDir().getPath() + folderName
}
console.log('日志文件存放路径->', this.LogPath)
// if (this.Environment.MEDIA_MOUNTED || !this.Environment.isExternalStorageRemovable()) {
// this.LogPath = this.main.getExternalFilesDir(null).getPath() + folderName
// } else {
// this.LogPath = this.main.getFilesDir().getPath() + folderName
// }
// console.log('日志文件存放路径->', this.LogPath)
}
writeLog(tag, msg) {
return
let date = getTime('YYYY-MM-DD')
let datetime = getTime()
//文件名
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!