Commit 129817dc by 前端

联调

1 parent 8d18b829
import commonApi from "./common";
import systemApi from "./systemApi";
import userApi from "./userApi";
import boutiqueApi from "./boutique";
import customerApi from "./customerApi";
import commonApi from './common'
import systemApi from './systemApi'
import userApi from './userApi'
import boutiqueApi from './boutique'
import customerApi from './customerApi'
import pointApi from './point'
module.exports = {
commonApi,
systemApi,
userApi,
boutiqueApi,
customerApi
};
customerApi,
pointApi
}
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-19 11:02:01
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-19 11:02:25
* @FilePath: \gl-tape\api\module\point.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import http from '../request/http'
module.exports = {
/**驻店规则列表 */
pointRuleList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.rule.list',
projectName: 'boutique',
...data
})
} /**驻店规则详情列表 */,
pointRuleDetail(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.rule.detail.list',
projectName: 'boutique',
...data
})
} /**积分记录 */,
pointRecordList(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.record.list',
projectName: 'boutique',
...data
})
} /**驻店月份排名 */,
pointMonthRanking(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.month.ranking',
projectName: 'boutique',
...data
})
} /**每日积分-项目完成情况 */,
pointDayTask(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.every.day.task',
projectName: 'boutique',
...data
})
} /**积分首页 */,
getPoint(data) {
return http.post({
method: 'dj.api.car.boutique.resident.point.home.page',
projectName: 'boutique',
...data
})
}
}
......@@ -107,6 +107,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.4475703324808184) calc(100vmin * (1173 / 768) * -0.2847399829497016);}
.icon-point-active { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.16240409207161124) calc(100vmin * (1173 / 768) * -0.309462915601023);}
.icon-point { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.216538789428815) calc(100vmin * (1173 / 768) * -0.309462915601023);}
.icon-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.252770673486786) calc(100vmin * (1173 / 768) * -0.41091219096334186);}
.icon-qr-success { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
......@@ -116,9 +118,9 @@
.icon-ranking { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
background-position: calc(100vmin * (1173 / 768) * -0.2864450127877238) calc(100vmin * (1173 / 768) * -0.41091219096334186);}
.icon-record-active { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.216538789428815) calc(100vmin * (1173 / 768) * -0.309462915601023);}
.icon-record { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.27067348678601877) calc(100vmin * (1173 / 768) * -0.309462915601023);}
.icon-record { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.3248081841432225) calc(100vmin * (1173 / 768) * -0.309462915601023);}
.icon-rule { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.28388746803069054) calc(100vmin * (1173 / 768) * -0.391304347826087);}
.icon-scan { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
......@@ -146,6 +148,4 @@
.icon-total { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.5404944586530265) calc(100vmin * (1173 / 768) * -0.3635976129582268);}
.icon-visible { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.49445865302642794) calc(100vmin * (1173 / 768) * -0.2847399829497016);}
.icon-point { width: calc(100vmin * (1173 / 768) * 0.04774083546462063); height: calc(100vmin * (1173 / 768) * 0.04774083546462063);
background-position: calc(100vmin * (1173 / 768) * -0.3248081841432225) calc(100vmin * (1173 / 768) * -0.309462915601023);}
\ No newline at end of file
background-position: calc(100vmin * (1173 / 768) * -0.49445865302642794) calc(100vmin * (1173 / 768) * -0.2847399829497016);}
\ No newline at end of file

63.2 KB | W: | H:

154 KB | W: | H:

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

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
......@@ -10,13 +10,13 @@
<view class="month-text">本月积分</view>
<uni-icons type="right"></uni-icons>
</view>
<view class="month-num">9</view>
<view class="month-num">{{ pointDetail.pointValue }}</view>
<view class="month-up" @click="jump('Ranking')">
<view class="sprite-icon icon-ranking"></view>
<view class="month-text">本月排名</view>
<uni-icons type="right"></uni-icons>
</view>
<view class="month-num">9</view>
<view class="month-num">{{ pointDetail.ranking }}</view>
</view>
</view>
<view class="point-up">
......@@ -25,10 +25,10 @@
<view class="sprite-icon icon-level"></view>
<view class="card-title">成长级别</view>
</view>
<view class="card-content level-box" :style="levelList[level].style">
<view class="level-logo"><image :src="levelList[level].logo"></image></view>
<view class="level-name">{{ levelList[level].title }}</view>
<view class="level-month">11月</view>
<view class="card-content level-box" :style="levelList[pointDetail.levelCode - 1].style">
<view class="level-logo"><image :src="levelList[pointDetail.levelCode - 1].logo"></image></view>
<view class="level-name">{{ pointDetail.levelName }}</view>
<view class="level-month">{{ month }}月</view>
</view>
</view>
<view class="card-box" @click="jump('LevelPoint')">
......@@ -59,28 +59,28 @@
<view class="card-top">
<view class="sprite-icon icon-day-points"></view>
<view class="card-title">每日积分</view>
<view class="card-tips">
<view class="card-tips" @click.stop="jump('rulePoint')">
<view class="sprite-icon icon-rule"></view>
<text>积分规则</text>
</view>
</view>
<view class="card-content day-rate">
3
<text>/7</text>
{{ pointDetail.done }}
<text>/{{ pointDetail.total }}</text>
</view>
<view class="process-box">
<view class="process-inter" :style="{ width: 10 + '%' }"></view>
<view class="process-inter" :style="{ width: pointDetail.done / pointDetail.total + '%' }"></view>
</view>
</view>
<view class="point-record">
<view class="record-title">积分记录</view>
<view class="record-body">
<view class="record-item" v-for="(i, index) in recordList">
<view class="record-item" v-for="(i, index) in recordList" :key="index">
<view class="record-item-left">
<view class="item-title">{{ i.title }}</view>
<view class="item-time">{{ i.time }}</view>
<view class="item-title">{{ i.pointType }}</view>
<view class="item-time">{{ i.createdDate }}</view>
</view>
<view class="record-item-num">{{ i.num }}</view>
<view class="record-item-num">+{{ i.pointValue }}</view>
</view>
</view>
<view class="record-more" @click="jump('Course')">查看更多</view>
......@@ -96,7 +96,10 @@ export default {
name: '',
data () {
return {
level: 3,
level:1,
month: '',
date: '',
pointDetail: {},
levelList: [
{
title: '青铜级萌新',
......@@ -131,13 +134,33 @@ export default {
{ title: '全勤之星', logo: require('@/assets/images/point/time_star.png'), logo_grey: require('@/assets/images/point/time_grey.png'), },
{ title: '零售导师', logo: require('@/assets/images/point/teacher_star.png'), logo_grey: require('@/assets/images/point/teacher_grey.png'), },
{ title: '平板接待', logo: require('@/assets/images/point/elite_star.png'), logo_grey: require('@/assets/images/point/elite_grey.png'), }],
myStar: [1,2,3],
myStar: [],
recordList:[{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10},{title:'签到',time:'2021-09-09',num:10}],
}
},
mounted () {
const year = new Date().getFullYear()
this.month = ((new Date().getMonth() + 1) + '').padStart(2, '0')
this.date = `${year}-${this.month}`
this.getPoint()
this.getRecordList()
},
methods: {
getRecordList() {
uni.$api.pointApi.pointRecordList({countDate:this.date}).then(res=>{
this.recordList = res
})
},
getPoint() {
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
uni.$api.pointApi.getPoint({countDate:this.date}).then(res => {
this.pointDetail = res||{}
const myStar = res.badgeList.map(i=>i.type)
this.myStar = myStar
this.level = res.levelCode;
})
},
jump(name) {
console.log(name,99)
this.$emit('showPage',name)
......@@ -399,7 +422,7 @@ export default {
}
.record-body {
height: calc(100% - #{toRpx(140)});
overflow-y: auto;
overflow-y: hidden;
margin: toRpx(20) 0;
.record-item {
margin-bottom: toRpx(40);
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-18 22:13:10
* @LastEditTime: 2024-12-19 15:17:31
-->
<template>
<view class="point-box">
......@@ -15,17 +15,17 @@
</view>
<view class="finish-title">
已完成
<text>3/7</text>
<text>{{ completed }}/{{ dayList.length }}</text>
</view>
<view class="day-list">
<view class="day-item" v-for="(i, index) in dayList" :key="index">
<view class="day-logo"><image :src="i.logo"></image></view>
<view class="day-desc">
<view class="day-title">{{ i.title }}</view>
<view class="day-title">{{ i.typeName }}</view>
<view class="day-content">{{ i.content }}</view>
</view>
<view class="day-go" @click="handleGo(i)">去完成</view>
<!-- <uni-icons type="checkmarkempty"></uni-icons> -->
<uni-icons type="checkmarkempty" v-if="i.completed"></uni-icons>
<view class="day-go" @click="handleGo(i)" v-else>去完成</view>
</view>
</view>
<view class="dailog-panel" v-if="show">
......@@ -55,15 +55,17 @@ export default {
second: 3,
timer: null,
selectItem: {},
dayList: [
{ 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') }
list: [
{ title: '考勤打卡', typeCode: 'T005', content: '完成日常打卡', logo: require('@/assets/images/point/day-time.png') },
{ title: '日报填写', typeCode: 'T004', content: '完成日常打5卡', logo: require('@/assets/images/point/day-report.png') },
{ title: '平板接待', typeCode: 'T006', content: '完成日常打卡', logo: require('@/assets/images/point/day-ipad.png'), jump: true },
{ title: '参与培训', typeCode: 'T003', content: '完成日常打卡', logo: require('@/assets/images/point/day-training.png') },
{ title: 'AI话术对练', typeCode: 'T002', content: '完成日常打卡', logo: require('@/assets/images/point/day-ai.png') },
{ title: '开课程授课', typeCode: 'T007', content: '完成日常打卡', logo: require('@/assets/images/point/day-course.png') },
{ title: '预学习', typeCode: 'T001', content: '完成日常打卡', logo: require('@/assets/images/point/day-study.png') }
],
dayList: [],
completed: 0,
show: false
}
},
......@@ -75,8 +77,19 @@ export default {
}
}
},
mounted() {},
methods: {
getDetail(countDate, day) {
uni.$api.pointApi.pointDayTask({ countDate: `${countDate}-${day}` }).then(res => {
res.forEach(item => {
const index = this.list.findIndex(i => i.typeCode === item.typeCode)
item.logo = this.list[index].logo
item.jump = this.list[index].jump
item.content = this.list[index].content
})
this.dayList = res
this.completed = res.filter(i => i.completed).length
})
},
handleGo(val) {
this.selectItem = val
if (val.jump) {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-18 21:05:23
* @LastEditTime: 2024-12-19 16:34:44
-->
<template>
<view class="point-box">
......@@ -13,13 +13,13 @@
</view>
<view class="month-box">
<view class="month-tabs">
<view :class="{ 'tab-prev': true, disabled: currentIndex == 0 }" @click="prevTab(currentIndex == 0)">
<view class="tab-prev" v-if="month <= currentMonth" @click="prevTab">
<view class="tab-icon">
<uni-icons type="left" size="20"></uni-icons>
</view>
</view>
<view class="tab-mid">11月</view>
<view :class="{ 'tab-next': true, disabled: currentIndex == detail.length - 1 }" @click="nextTab(currentIndex == detail.length - 1)">
<view class="tab-mid">{{ month == currentMonth ? '本' : (month + '').padStart(2, '0') }}月</view>
<view class="tab-next" v-if="month != currentMonth" @click="nextTab">
<view class="tab-icon">
<uni-icons type="right" size="20"></uni-icons>
</view>
......@@ -32,18 +32,19 @@
<view class="point-item" v-for="(item, index) in pointList" :key="index">
<view class="item-header"><image :src="item.src" /></view>
<view class="item-body" :style="item.style">
<view class="item-logo">14</view>
<view class="item-name">王钰</view>
<view :class="{ 'item-prize': index == 0, 'item-medal': index != 0 }"><image :src="index == 0 ? pointImg[0] : starImg[index - 1]" /></view>
<view class="item-num">200</view>
<view class="item-logo" v-if="item.ranking > 3">{{ item.ranking }}</view>
<view class="item-image" v-else><image :src="require(`@/assets/images/point/${index == 0 ? 'crown_' : 'prize_'}${item.ranking}.png`)" /></view>
<view class="item-name">{{ item.staffName }}</view>
<view v-if="item.badgeList.length" :class="{ 'item-prize': index == 0, 'item-medal': index != 0 }"><image :src="index == 0 ? pointImg[item.ranking - 1] : starImg[item.ranking - 1]" /></view>
<view class="item-num">{{ item.pointValue }}</view>
</view>
<view class="desc-wrap">
<view class="item-body" v-for="(l, i) in 20" :key="i">
<view class="item-logo" v-if="i > 2">{{ i++ }}</view>
<view class="item-image" v-else><image :src="require(`@/assets/images/point/${item.isCrown ? 'crown_' : 'prize_'}${i + 1}.png`)" /></view>
<view class="item-name">王钰</view>
<view :class="{ 'item-prize': index == 0, 'item-medal': index != 0 }"><image :src="index == 0 ? pointImg[0] : starImg[index - 1]" /></view>
<view class="item-num">+1</view>
<view class="item-body" v-for="(l, i) in item.list" :key="i">
<view class="item-logo" v-if="l.ranking > 3">{{ item.ranking }}</view>
<view class="item-image" v-else><image :src="require(`@/assets/images/point/${index == 0 ? 'crown_' : 'prize_'}${l.ranking}.png`)" /></view>
<view class="item-name">{{ l.staffName }}</view>
<view v-if="l.badgeList.length" :class="{ 'item-prize': index == 0, 'item-medal': index != 0 }"><image :src="index == 0 ? pointImg[l.ranking - 1] : starImg[l.ranking - 1]" /></view>
<view class="item-num">{{ l.pointValue }}</view>
</view>
</view>
</view>
......@@ -53,6 +54,7 @@
</template>
<script>
import point from '@/mixin/point'
import { get } from 'lodash'
export default {
mixins: [point],
data() {
......@@ -89,17 +91,22 @@ export default {
},
mounted() {},
methods: {
prevTab(val) {
if (val) return
this.currentIndex--
this.currentStep = 0
this.updateStage()
getDetail(countDate) {
for (let i = 0; i < 4; i++) {
this.getList(countDate, i + 1)
}
this.getList(countDate)
},
updateDetail(countDate) {
this.getDetail(countDate)
},
nextTab(val) {
if (val) return
this.currentIndex++
this.currentStep = 0
this.updateStage()
getList(countDate, rankingType) {
uni.$api.pointApi.pointMonthRanking({ countDate, rankingType }).then(res => {
const i = rankingType ? rankingType : 0
const userInfo = uni.$storage.get('userInfo')
let myInfo = res.find(i => i.staffPhone == userInfo.phone)
this.$set(this.pointList, i, { ...this.pointList[i], list: res, ...myInfo })
})
}
}
}
......
......@@ -11,11 +11,12 @@
<tr class="th">
<th v-for="(item, index) in tabelTh" :key="index" :style="{ width: item.width + 'vw' }">{{ item.title }}</th>
</tr>
<tr>
<td v-for="(item, index) in tabelTr" :rowspan="item.l" :key="index">{{ item.title }}</td>
</tr>
<tr>
<td v-for="(item, index) in tabelTr2" :key="index">{{ item.title }}</td>
<tr v-for="(item, index) in processedData" :key="index">
<td :rowspan="item.categoryRowSpan">{{ item.categoryName }}</td>
<td :rowspan="item.typeRowSpan">{{ item.typeName }}</td>
<td>{{ item.description }}</td>
<td>{{ item.pointValue }}</td>
<td>{{ item.detail }}</td>
</tr>
</table>
</view>
......@@ -23,6 +24,7 @@
</template>
<script>
import point from '@/mixin/point'
import { first } from 'lodash'
export default {
mixins: [point],
data() {
......@@ -36,13 +38,56 @@ export default {
{ title: '说明', width: 12 },
{ title: '说明', width: 12 }
],
tabelTr: [{ title: '课程学习', l: 6 }, { title: '参与培训' }, { title: '积分描述' }, { title: '积分值' }, { title: '说明' }, { title: '说明' }],
tabelTr2: [{ title: '参与培训' }, { title: '积分描述' }, { title: '积分值' }, { title: '说明' }, { title: '说明' }],
processedData: [],
show: false
}
},
mounted() {},
mounted() {
this.getRule()
this.getRuleDetail()
},
methods: {
getRule() {
uni.$api.pointApi.pointRuleList().then(res => {
console.log(res)
})
},
getRuleDetail() {
uni.$api.pointApi.pointRuleDetail().then(res => {
const result = []
let currentCategory = ''
let currentType = ''
let categoryRowSpan = 0
let typeRowSpan = 0
res.forEach(item => {
if (currentCategory !== item.categoryName) {
categoryRowSpan = 1
currentCategory = item.categoryName
} else {
categoryRowSpan++
}
if (currentType !== item.typeName) {
typeRowSpan = 1
currentType = item.typeName
} else {
typeRowSpan++
}
result.push({
...item,
categoryRowSpan,
typeRowSpan
})
})
// if (result.length > 0) {
// result[result.length - 1].categoryRowSpan = categoryRowSpan
// result[result.length - 1].typeRowSpan = typeRowSpan
// }
console.log(result)
// this.processedData = result
})
},
handleGo(val) {
this.selectItem = val
this.show = true
......
export default {
data() {
return {}
return {
year: '',
month: '',
currentMonth: ''
}
},
mounted() {
const year = new Date().getFullYear()
const month = new Date().getMonth() + 1
const day = new Date().getDate()
this.year = year
this.month = month
this.currentMonth = month
this.getDetail(`${this.year}-${this.month}`, day)
},
methods: {
back() {
console.log(88)
this.$emit('backHome')
},
prevTab(val) {
if (val) return
this.currentIndex--
this.currentStep = 0
this.updateStage()
prevTab() {
this.month = this.month - 1
if (this.month < 1) {
this.month = 12
this.year = this.year - 1
}
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
},
nextTab(val) {
if (val) return
this.currentIndex++
this.currentStep = 0
this.updateStage()
nextTab() {
this.month = this.month + 1
// if (this.month < 1) {
// this.month = 12
// this.year = this.year - 1
// }
this.updateDetail && this.updateDetail(`${this.year}-${this.month}`)
}
}
}
......@@ -2,33 +2,32 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-11-01 15:06:40
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-12-18 20:13:50
* @LastEditTime: 2024-12-19 16:43:04
* @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!