Commit a9382c62 by 前端

日志

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