Commit a9382c62 by 前端

日志

1 parent 77fb9c50
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53
* @LastEditors: limin
* @LastEditTime: 2024-09-26 18:22:57
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-31 11:01:19
* @FilePath: \gl_tape\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -103,6 +103,7 @@ export default {
},
onShow: async function () {
uni.$logger.local.info('切回app')
this.handleCheck()
// const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) {
......@@ -114,7 +115,9 @@ export default {
// this.$store.dispatch("openUpdateModal");
// });
},
onHide: function () {},
onHide: function () {
uni.$logger.local.info('切出app')
},
onError: function (e) {
try {
uni.$logger?.error({ msg: e.message || '捕获全局异常', extra: { error: typeof e == 'string' ? e : JSON.stringify(e) } })
......

1.19 MB | W: | H:

1.2 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -100,7 +100,7 @@ import dayjs from 'dayjs'
const dayImgUrl = require('@/assets/images/common/day.webp')
const weekImgUrl = require('@/assets/images/common/week.webp')
const monthImgUrl = require('@/assets/images/common/month.webp')
import { STORAGE_OBJECTkEY } from '@/utils/cache/constantData'
import { STORAGE_OBJECTKEY } from '@/utils/cache/constantData'
import interruptRecord from '@/utils/recordManager/interruptRecord'
import saveRecord from './saveRecord.vue'
export default {
......@@ -245,7 +245,7 @@ export default {
},
getPreRecordNum() {
const preRecordList = uni.$storage.get(STORAGE_OBJECTkEY.preRecordList)||[]
const preRecordList = uni.$storage.get(STORAGE_OBJECTKEY.preRecordList)||[]
console.log(preRecordList)
this.preRecordFailList = preRecordList.reverse()
},
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-29 13:33:37
* @LastEditTime: 2024-10-31 15:00:45
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -161,12 +161,14 @@ export default {
//开始录音
startAudio: utils.throttle(async function () {
if (this.audioInfo.audioStatus == AUDIO_STATUS.START) return
uni.$logger.local.info('开始接待')
this.setBooks([])
this.$store.dispatch('clearCustomerInfo')
this.setReceptionStatus('')
this.initTime()
this.setAudioInfo({ audioList: [], audioStatus: AUDIO_STATUS.START })
recorderManager.onStart(() => {
uni.$logger.local.info('开始录音')
//开始录音保持记录,1s延时是因为第一段录音结束时间的文件修改时间等于第二段开始的文件修改时间,加上1s延时,就不会这个问题
setTimeout(() => {
const params = this.getParams(this.$store.state.user.customerInfo, this.booksList, this.receptionStatus)
......@@ -179,6 +181,7 @@ export default {
numberOfChannels: 1
})
recorderManager.onStop(async res => {
uni.$logger.local.info('结束录音')
//第一段录音结束,还在接待中,则开启第二段录音
if (this.audioInfo.audioStatus == AUDIO_STATUS.START) {
uni.getRecorderManager().start({
......@@ -200,6 +203,7 @@ export default {
const records = interruptRecord.getPreRecord()
console.log(records, 'records')
if (!records) return
uni.$logger.local.info(`${isNormal ? '正常' : '异常'}保存记录`)
if (isNormal) {
Object.assign(records, this.getParams(this.$store.state.user.customerInfo, this.booksList, this.receptionStatus))
}
......@@ -222,7 +226,7 @@ export default {
this.RenameFile(oldFilePath, newFileName)
}
} catch (error) {
this.$sendSentry(`上传保存失败:${JSON.stringify(error)}`)
uni.$logger.local.error(`${phone}上传保存失败:${JSON.stringify(error)}`)
}
delete records.audioPath
let saveRecords = Object.assign(records, { recordUrlList })
......@@ -259,7 +263,7 @@ export default {
* @returns {void}
*/
stopAudio: utils.throttle(async function (status) {
console.log('结束')
uni.$logger.local.info('结束接待')
// const result = await this.$permision.requestAndroidPermission(
// "android.permission.RECORD_AUDIO"
// );
......@@ -300,6 +304,7 @@ export default {
clearInterval(this.timer)
this.timer = null
if (status) {
uni.$logger.local.info('退出接待')
this.removeRecords()
}
recorderManager.stop()
......
<template>
<view
class="box"
:key="selectedUuid"
v-if="flag"
>
<view class="box" :key="selectedUuid" v-if="flag">
<template v-if="loginUserInfoList.length">
<template v-for="(item,index) in loginUserInfoList">
<view
:key="index"
:class="['items', `${item.active ? 'active' : ''}` ]"
@click="chooseAccount(item)"
>
<template v-for="(item, index) in loginUserInfoList">
<view :key="index" :class="['items', `${item.active ? 'active' : ''}`]" @click="chooseAccount(item)">
<view class="right">
<view :class="['midle', midle(item)]">
{{item.isSuper==true?'超管':item.userType==1?'商户':(item.loginRole == 3 ? '督导' : item.loginRole == 4 ? '驻店' : '员工')}}
{{ item.isSuper == true ? '超管' : item.userType == 1 ? '商户' : item.loginRole == 3 ? '督导' : item.loginRole == 4 ? '驻店' : '员工' }}
</view>
</view>
<view class="left">
<view class="name">
{{item.merchantName}}
</view>
<view class="shop_no">
商户号:{{item.merchantId}}
{{ item.merchantName }}
</view>
<view class="shop_no">商户号:{{ item.merchantId }}</view>
</view>
</view>
</template>
......@@ -33,7 +23,7 @@
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import { loginMixin } from '@/mixin/index'
import NoData from './NoData.vue'
export default {
......@@ -117,6 +107,7 @@ export default {
this.selectAccountLogin(id)
},
selectAccountLogin (id) {
uni.$logger.local.info(`选择账号登录`)
uni.showLoading({
mask: true
})
......@@ -151,7 +142,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.box {
display: flex;
align-items: center;
......@@ -239,4 +230,4 @@ export default {
border: 4rpx solid #347bff;
}
}
</style>
\ No newline at end of file
</style>
<template>
<view
class="box"
:key="selectMerchantId"
>
<view class="box" :key="selectMerchantId">
<template v-if="flag">
<template v-if="loginUserInfoList.length">
<template v-for="(item,index) in loginUserInfoList">
<view
:key="index"
:class="['items' ,{active:item.active}]"
@click="chooseAccount(item)"
>
<template v-for="(item, index) in loginUserInfoList">
<view :key="index" :class="['items', { active: item.active }]" @click="chooseAccount(item)">
<view class="right">
<view class="sprite-icon icon-store"></view>
</view>
<view class="left">
<view class="text_box">
<view class="name">{{item.merchantName}}</view>
<view class="text_no">商户号:{{item.merchantId}}</view>
<view class="name">{{ item.merchantName }}</view>
<view class="text_no">商户号:{{ item.merchantId }}</view>
</view>
</view>
</view>
</template>
</template>
......@@ -31,7 +23,7 @@
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import NoData from './NoData.vue'
export default {
......@@ -95,6 +87,7 @@ export default {
})
},
chooseAccount (item) {
uni.$logger.info(`选择4s店`)
uni.showLoading({
mask: true
})
......@@ -158,7 +151,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.box {
display: flex;
align-items: center;
......@@ -197,4 +190,4 @@ export default {
border: 4rpx solid #347bff;
}
}
</style>
\ No newline at end of file
</style>
<template>
<view class="box">
<template v-for="(item,index) in sceneList">
<view
:key="index"
:class="['items', `${item.actived ? 'active' : ''}` ]"
@click="selectScene(item,index)"
>
<template v-for="(item, index) in sceneList">
<view :key="index" :class="['items', `${item.actived ? 'active' : ''}`]" @click="selectScene(item, index)">
<view class="left">
<view :class="['sprite-icon', `icon-scene-${item.sceneType}`]"></view>
</view>
<view class="right">
<view class="name">
{{item.sceneName}}
{{ item.sceneName }}
</view>
<view class="shop_no">
{{item.sceneDesc}}
{{ item.sceneDesc }}
</view>
</view>
</view>
......@@ -22,7 +18,7 @@
</view>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: '',
data () {
......@@ -72,6 +68,7 @@ export default {
},
// 选择场景
async selectScene ({ sceneType }, index) {
uni.$logger.local.info(`选择场景`)
let { sceneList, openSceneArr, userInfo } = this
try {
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
......@@ -94,18 +91,17 @@ export default {
})
if (data) this.jump(userInfo, data)
else {
this.$sendSentry(`选择场景异常:merchantId:${userInfo.shopMerchantId},merchantName:${userInfo.shopMerchantName},sceneType:${sceneType},接口返回:${JSON.stringify(data || '')}`)
uni.$logger.local.error(`选择场景异常:merchantId:${userInfo.shopMerchantId},merchantName:${userInfo.shopMerchantName},sceneType:${sceneType},接口返回:${JSON.stringify(data || '')}`)
}
}
} catch (error) {
uni.hideLoading()
uni.showToast({
title: typeof error == "string" ? error : error.toString(),
icon: 'none'
})
console.log(error)
this.$sendSentry(`选择场景异常:merchantId:${userInfo?.shopMerchantId},merchantName:${userInfo?.shopMerchantName},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`)
uni.$logger.local.error(`选择场景异常:merchantId:${userInfo?.shopMerchantId},merchantName:${userInfo?.shopMerchantName},sceneType:${sceneType},失败原因:${typeof error == "string" ? error : error.toString()}`)
}
},
async jump (userInfo, data) {
......@@ -132,7 +128,7 @@ export default {
url
})
} catch (error) {
this.$sendSentry(`选择场景后跳转异常:${error}`)
uni.$logger.local.error(`选择场景后跳转异常:${error}`)
uni.hideLoading()
uni.showToast({
title: error,
......@@ -144,7 +140,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.box {
display: flex;
align-items: center;
......@@ -183,4 +179,4 @@ export default {
border: 4rpx solid #347bff;
}
}
</style>
\ No newline at end of file
</style>
......@@ -141,7 +141,10 @@ export default {
const { code, data, message } = await uni.$api.userApi.smsLogin(params);
console.log(code, data, message);
uni.hideLoading();
if (code == 0) this.jump(data, noSignIn)
if (code == 0) {
this.jump(data, noSignIn);
uni.$logger.local.info(`${mobile}登录`)
}
else
uni.showModal({
title: '温馨提示',
......
......@@ -2,11 +2,11 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-16 09:55:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-10-16 13:51:15
* @LastEditTime: 2024-10-31 11:09:20
* @FilePath: \gl-tape\utils\cache\storageApi.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { STORAGE_OBJECTkEY } from './constantData'
import { STORAGE_OBJECTKEY } from './constantData'
// console.log(storage)
/** */
// 实例化对象存储
......@@ -68,13 +68,13 @@ export function setSystem_info(that) {
}
export function getRecords(record = 'recordList') {
return storage.get(STORAGE_OBJECTkEY[record])
return storage.get(STORAGE_OBJECTKEY[record])
}
export function setRecords(data, record = 'recordList') {
storage.set(STORAGE_OBJECTkEY[record], data)
storage.set(STORAGE_OBJECTKEY[record], data)
}
export function removeRecords(record = 'recordList') {
storage.rm(STORAGE_OBJECTkEY[record])
storage.rm(STORAGE_OBJECTKEY[record])
}
export default {
getSessionId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!