Commit a45277e7 by 前端

Merge branch 'bugfix_v1.4.0' into 'saas+v5.8.1'

开发提测合并

See merge request !88
2 parents e79774ac 02971bd3
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { Ws } from '@/ws/Ws.js' import { Ws } from '@/ws/Ws.js'
import { RecordSaveService, UploadService } from '@/utils/recordManager/index.js' import { RecordSaveService, UploadService } from '@/utils/recordManager/index.js'
import appCacheApi from '@/utils/clearAppCache.js'
export default { export default {
computed: { computed: {
...mapState('audio', ['isEnd', 'isStart']) ...mapState('audio', ['isEnd', 'isStart'])
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
}, },
onLaunch: async function () { onLaunch: async function () {
this.onKeep() this.onKeep()
this.setAPPVersion() // this.setAPPVersion()
setTimeout(() => { setTimeout(() => {
plus.screen.unlockOrientation() //解除锁定屏幕方向 plus.screen.unlockOrientation() //解除锁定屏幕方向
plus.screen.lockOrientation('landscape-primary') plus.screen.lockOrientation('landscape-primary')
...@@ -48,6 +49,7 @@ ...@@ -48,6 +49,7 @@
} }
}, },
onShow: async function () { onShow: async function () {
appCacheApi.clearAppCache()
this.$store.dispatch('setBackgroundState', false) this.$store.dispatch('setBackgroundState', false)
this.$store.dispatch('setActivityWindowPopCount', 1) //冷启动重置活动弹框次数 this.$store.dispatch('setActivityWindowPopCount', 1) //冷启动重置活动弹框次数
// 触发轮询开始事件,通知上传管理重新开始轮询 // 触发轮询开始事件,通知上传管理重新开始轮询
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
border-radius: toRpx(48); border-radius: toRpx(48);
// padding: 0 toRpx(48); // padding: 0 toRpx(48);
box-sizing: border-box; box-sizing: border-box;
background-image: url(@/assets/images/point/attendance-bg.png); background-image: url(@/assets/images/point/attendance-bg.webp);
background-repeat: no-repeat; background-repeat: no-repeat;
padding-bottom: toRpx(80); padding-bottom: toRpx(80);
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<view class="dailog-box"> <view class="dailog-box">
<view class="dailog-close" @click="show = false"><uni-icons type="closeempty" size="20"></uni-icons></view> <view class="dailog-close" @click="show = false"><uni-icons type="closeempty" size="20"></uni-icons></view>
<view class="dailog-logo"> <view class="dailog-logo">
<image src="../../../../assets/images/point/tips.png"></image> <image src="../../../../assets/images/point/tips.webp"></image>
</view> </view>
<view class="dailog-title">领取提醒</view> <view class="dailog-title">领取提醒</view>
<view class="dailog-content"> <view class="dailog-content">
...@@ -626,11 +626,11 @@ export default { ...@@ -626,11 +626,11 @@ export default {
} }
.unclaimed-bg { .unclaimed-bg {
background: url('../../../../assets/images/point/unclaimed-bg.png') no-repeat; background: url('../../../../assets/images/point/unclaimed-bg.webp') no-repeat;
} }
.claimed-bg { .claimed-bg {
background: url('../../../../assets/images/point/claimed-bg.png') no-repeat; background: url('../../../../assets/images/point/claimed-bg.webp') no-repeat;
} }
.coupon-bg { .coupon-bg {
......
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
} }
&.rule-box { &.rule-box {
background-image: url('../../../../assets//images/point/rule_bg.png'); background-image: url('../../../../assets//images/point/rule_bg.webp');
background-size: 100% 100%; background-size: 100% 100%;
border: none; border: none;
height: toRpx(424); height: toRpx(424);
...@@ -565,7 +565,7 @@ export default { ...@@ -565,7 +565,7 @@ export default {
width: toRpx(618); width: toRpx(618);
.month-box { .month-box {
background: url(../../../../assets//images/point/point-bg.png); background: url(../../../../assets//images/point/point-bg.webp);
background-size: 100% 100%; background-size: 100% 100%;
border: toRpx(2) solid #ffffff; border: toRpx(2) solid #ffffff;
height: 100%; height: 100%;
......
...@@ -147,7 +147,7 @@ import Ranking from './components/Point/Ranking.vue' ...@@ -147,7 +147,7 @@ import Ranking from './components/Point/Ranking.vue'
import Calendar from './components/Income/Calendar.vue' import Calendar from './components/Income/Calendar.vue'
import Promotion from './components/Income/Promotion.vue' import Promotion from './components/Income/Promotion.vue'
import History from './components/Income/History.vue' import History from './components/Income/History.vue'
import merge from '@/mixin/record/merge.js' // import merge from '@/mixin/record/merge.js'
import MessageDetail from './components/Message/MessageDetail.vue' import MessageDetail from './components/Message/MessageDetail.vue'
import SwiperComponent from '../SwiperComponent.vue' import SwiperComponent from '../SwiperComponent.vue'
import StudyCenter from './components/StudyCenter.vue' import StudyCenter from './components/StudyCenter.vue'
...@@ -166,7 +166,7 @@ import ErrorOrderPopup from '@/components/ErrorOrderPopup.vue' ...@@ -166,7 +166,7 @@ import ErrorOrderPopup from '@/components/ErrorOrderPopup.vue'
import { FileUploadManager, UploadService } from '@/utils/recordManager/index.js' import { FileUploadManager, UploadService } from '@/utils/recordManager/index.js'
export default { export default {
// mixins: [recorder, uploader, timeout, versionCheck, merge, interceptionMixin], // mixins: [recorder, uploader, timeout, versionCheck, merge, interceptionMixin],
mixins: [recorder, versionCheck, interceptionMixin,merge], mixins: [recorder, versionCheck, interceptionMixin],
components: { components: {
ReceptionCenter, ReceptionCenter,
StudyCenter, StudyCenter,
......
<template>
<view
class="noviceGuide-box"
v-if="showNoviceGuide"
>
<!-- <template v-if="step == 1">
<img
:src="step_1[1]"
class="step-1-1"
>
<img
:src="step_1[2]"
class="step-1-2"
@click="step = 2"
>
</template>
<template v-else-if="step = 2">
<img
:src="step_1[1]"
class="step-2-1"
>
<img
:src="step_1[2]"
class="step-2-2"
@click="step = 2"
>
</template> -->
<template v-for="(i,index) in stepList">
<view
:key="index"
v-if="index == step"
>
<image
:src="i[1]"
:class="['step',`step-${index + 1}-1`]"
/>
<image
:src="i[2]"
:class="['step',`step-${index + 1}-2`]"
@click="jump"
/>
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'NoviceGuide',
computed: {
watchUpdateStatus () {
return this.$store.state.update.status
},
},
watch: {
watchUpdateStatus: {
immediate: true,
handler (newval) {
this.showNoviceGuide = !newval && !uni.$storage.get('noviceGuideStatus')
}
},
},
data () {
return {
showNoviceGuide: false,
step: 0,
stepList: [
{
'1': require('@/assets/images/noviceGuide/step1-1.webp'),
'2': require('@/assets/images/noviceGuide/step1-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step2-1.webp'),
'2': require('@/assets/images/noviceGuide/step2-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step3-1.webp'),
'2': require('@/assets/images/noviceGuide/step3-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step4-1.webp'),
'2': require('@/assets/images/noviceGuide/step4-2.webp')
},
{
'1': require('@/assets/images/noviceGuide/step5-1.webp'),
'2': require('@/assets/images/noviceGuide/step5-2.webp')
}
],
}
},
mounted () {
},
methods: {
jump () {
this.step += 1
if (this.step == 2) this.$emit('nextStep')
if(this.step == 5) {
this.showNoviceGuide = false
uni.$storage.set('noviceGuideStatus', Date.now())
this.$emit('back')
}
}
}
}
</script>
<style scoped lang='scss'>
.noviceGuide-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 10086;
background-color: #000000bf;
.step {
position: absolute;
}
.step-1-1 {
width: 2060rpx;
height: 244rpx;
top: 70rpx;
left: 256rpx;
}
.step-1-2 {
width: 662rpx;
height: 462rpx;
top: 424rpx;
left: 50%;
transform: translateX(-50%);
}
.step-2-1 {
left: 8rpx;
bottom: 152rpx;
width: 294rpx;
height: 120rpx;
}
.step-2-2 {
left: 326rpx;
bottom: 150rpx;
width: 1066rpx;
height: 350rpx;
}
.step-3-1 {
width: 2168rpx;
height: 340rpx;
top: 262rpx;
left: 50%;
transform: translateX(-50%);
}
.step-3-2 {
width: 662rpx;
height: 510rpx;
top: 602rpx;
left: 50%;
transform: translateX(-50%);
}
.step-4-1 {
width: 190rpx;
height: 1248rpx;
top: 96rpx;
right: 20rpx;
}
.step-4-2 {
width: 1074rpx;
height: 312rpx;
top: 50%;
right: 226rpx;
transform: translateY(-50%);
}
.step-5-1 {
width: 190rpx;
height: 192rpx;
bottom: 96rpx;
right: 20rpx;
}
.step-5-2 {
width: 1074rpx;
height: 312rpx;
right: 226rpx;
bottom: 144rpx;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -2,13 +2,18 @@ ...@@ -2,13 +2,18 @@
"name" : "展业助手", "name" : "展业助手",
"appid" : "__UNI__D3BD3DF", "appid" : "__UNI__D3BD3DF",
"description" : "", "description" : "",
"versionName" : "2.25.0", "versionName" : "2.25.1",
"versionCode" : 2250, "versionCode" : 2251,
"transformPx" : false, "transformPx" : false,
"sassImplementationName" : "node-sass", "sassImplementationName" : "node-sass",
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
"cache" : false, "cache" : {
"mode" : "noCache"
},
"webview" : {
"cacheMode" : "noCache"
},
"bounce" : "none", "bounce" : "none",
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
......
...@@ -26,10 +26,6 @@ ...@@ -26,10 +26,6 @@
/> />
</template> </template>
<template slot="content"> <template slot="content">
<!-- <novice-guide
@nextStep="nextStep"
@back="back"
/> -->
</template> </template>
</home-frame> </home-frame>
</view> </view>
...@@ -37,12 +33,11 @@ ...@@ -37,12 +33,11 @@
<script> <script>
import detail from './detail/detail' import detail from './detail/detail'
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
import NoviceGuide from '@/components/NoviceGuide.vue'
import HomeFrame from '@/components/HomeFrame/index.vue' import HomeFrame from '@/components/HomeFrame/index.vue'
// import storge from "@/mixin/storge"; // import storge from "@/mixin/storge";
export default { export default {
// mixins: [storge], // mixins: [storge],
components: { HomeFrame, detail, NoviceGuide }, components: { HomeFrame, detail },
data () { data () {
return { return {
moduleList: [], moduleList: [],
......
const clearAppCache = () => {
// #ifdef APP-PLUS
try {
const currentVersion = plus.runtime.version;
const lastVersion = uni.$storage.get('storageVersion')
const webview = plus.webview.currentWebview();
uni.$logger.local.info(`=== 版本检查开始 ===`)
uni.$logger.local.info(`当前版本(currentVersion): ${currentVersion}`)
uni.$logger.local.info(`存储版本(lastVersion): ${lastVersion}`)
uni.$logger.local.info(`版本是否一致: ${lastVersion === currentVersion}`)
if (lastVersion && lastVersion !== currentVersion) {
uni.$logger.local.info(`检测到版本变化: ${lastVersion} -> ${currentVersion}`)
if (webview) {
uni.$logger.local.info('清除webview缓存');
webview.clear();
}
uni.clearStorage(); // 清除本地存储
uni.showLoading({
title: '检测到新版本,正在重启...',
mask: true
})
uni.$logger.local.info('清除应用缓存');
plus.cache.clear()
// 在重启前设置新版本号
uni.$storage.set('storageVersion', currentVersion)
uni.$logger.local.info(`已更新存储版本为: ${currentVersion}`)
uni.$logger.local.info('3秒后重启应用');
setTimeout(() => {
plus.runtime.restart();
}, 3e3);
} else {
uni.$logger.local.info('版本未变化,无需更新')
// 只在首次安装或版本一致时设置
if (!lastVersion) {
uni.$storage.set('storageVersion', currentVersion)
uni.$logger.local.info(`首次安装,设置版本为: ${currentVersion}`)
}
}
} catch (error) {
uni.$logger.local.error('setAPPVersion error:', error);
}
// #endif
}
export default {
clearAppCache
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!