Commit 471c5817 by 前端

检查更新

1 parent fcf8b782
......@@ -8,10 +8,8 @@
-->
<script>
const PATH = ['/pages/common/caseDetail']
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js'
import { mapState } from 'vuex'
import { Ws } from '@/ws/Ws.js'
import utils from '@/utils/utils'
export default {
computed: {
...mapState('audio', ['isEnd', 'isStart'])
......@@ -30,26 +28,6 @@ export default {
new Ws().connect()
},
methods: {
async handleCheck() {
const { textList, tempFileURL, version } = uni.$storage.get('mock_data')
const res = utils.compareVersions(plus?.runtime?.version, version)
if (res > -1) {
return
}
const e = {
result: {
is_silently: false,
is_mandatory: true,
name: '',
title: '',
contents: textList.join('\n'),
version: version,
url: tempFileURL,
stable_publish: true
}
}
checkUpdate(e)
},
init() {
uni.addInterceptor('navigateTo', {
//监听跳转
......@@ -104,7 +82,6 @@ export default {
onShow: async function () {
uni.$logger.local.info('切回app')
this.handleCheck()
// const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) {
// checkUpdate();
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-11-22 17:10:27
* @LastEditTime: 2024-11-25 16:33:13
* @FilePath: \gl_tape\mixin\click.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -23,6 +23,7 @@ const audioTime = 10 * 60 * 1000
let timer_interval = null
import { mapMutations, mapState } from 'vuex'
import utils from '@/utils/utils.js'
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js'
export default {
data() {
return {
......@@ -34,6 +35,7 @@ export default {
},
async mounted() {
uni.$logger.local.info(`进入接待首页!`)
this.handleCheck() // 检查更新
this.handleSave(false)
// 获取当前页面栈数组
// const pages = getCurrentPages()
......@@ -71,6 +73,27 @@ export default {
},
methods: {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']),
handleCheck() {
const { textList, tempFileURL, version } = uni.$storage.get('mock_data')
const res = utils.compareVersions(plus?.runtime?.version, version)
if (res > -1) {
return
}
const e = {
result: {
is_silently: false,
is_mandatory: true,
name: '',
title: '',
contents: textList.join('\n'),
version: version,
url: tempFileURL,
stable_publish: true
}
}
checkUpdate(e)
},
// //关闭提示
tipCancel() {
this.stopAudio()
......
<template>
<home-frame
@preview="preview"
@start="$refs.customerTypeRef.open()"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
finishDoneText="下一步"
finishContene="当前操作是为强制退出接待,若完成客户接待请点击「下一步」。"
@previewCancel="cancel"
@previewClose="previewOff = false"
>
<home-frame @preview="preview" @start="$refs.customerTypeRef.open()" ref="home" :id="id" @openStep="openStep" @backHome="backHome" finishDoneText="下一步" finishContene="当前操作是为强制退出接待,若完成客户接待请点击「下一步」。" @previewCancel="cancel" @previewClose="previewOff = false">
<template slot="module">
<view class="module-box">
<view class="module-flex flex">
<template v-for="(i,index) in moduleList">
<view
class="item flex"
:key="index"
v-if="!i.hide"
@click="toDetail(i)"
>
<image
:src="i.thumbnail"
class="icon"
/>
{{i.title}}
<template v-for="(i, index) in moduleList">
<view class="item flex" :key="index" v-if="!i.hide" @click="toDetail(i)">
<image :src="i.thumbnail" class="icon" />
{{ i.title }}
</view>
</template>
</view>
<view class="center-bg"></view>
<view class="banner-tab-box flex">
<template v-for="(item, index) in carBannerList">
<view
:key="index"
:class="['banner-tab',`${currentIndex == index ? 'active' : ''}`]"
@click="changeIndex(index)"
>
{{item.title}}
<view :key="index" :class="['banner-tab', `${currentIndex == index ? 'active' : ''}`]" @click="changeIndex(index)">
{{ item.title }}
</view>
</template>
</view>
<swiper
class="swiper"
circular
:autoplay="bannerAutoplay && !previewOff"
interval="3000"
previous-margin="380rpx"
next-margin="448rpx"
@change="swiperChange"
:current="currentIndex"
>
<swiper class="swiper" circular :autoplay="bannerAutoplay && !previewOff" interval="3000" previous-margin="380rpx" next-margin="448rpx" @change="swiperChange" :current="currentIndex">
<template v-for="(item, index) in carBannerList">
<swiper-item
:key="index"
:class="['swiper-item flex',carClass(index)]"
@click.prevent="clickCar(item, index)"
>
<image
:src="item.url"
class="car-item"
/>
<swiper-item :key="index" :class="['swiper-item flex', carClass(index)]" @click.prevent="clickCar(item, index)">
<image :src="item.url" class="car-item" />
<template v-if="currentIndex == index">
<view class="config-box">
<template v-for="(i,ind) in item.configList">
<view
:class="['config-item',i.class]"
:key="ind"
@click.stop="toDetail({id:1,tabId:i.tabId})"
>
<template v-for="(i, ind) in item.configList">
<view :class="['config-item', i.class]" :key="ind" @click.stop="toDetail({ id: 1, tabId: i.tabId })">
<view class="config-dots"></view>
<view class="config-name flex">
<view :class="['sprite-icon',`icon-${i.icon}`]"></view>
{{i.name}}
<view :class="['sprite-icon', `icon-${i.icon}`]"></view>
{{ i.name }}
</view>
</view>
</template>
......@@ -88,25 +45,10 @@
</view>
</template>
<template slot="detail">
<detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
:toolList="toolList"
@back="back"
@done="done"
ref="detail"
:customerType.sync="customerType"
@reception="reception"
:tabId.sync="tabId"
:currentCar="currentCar"
/>
<detail :id.sync="id" :media="moduleList" :type.sync="type" :toolList="toolList" @back="back" @done="done" ref="detail" :customerType.sync="customerType" @reception="reception" :tabId.sync="tabId" :currentCar="currentCar" />
</template>
<template slot="content">
<customer-type
ref="customerTypeRef"
@choose="chooseCustomerType"
/>
<customer-type ref="customerTypeRef" @choose="chooseCustomerType" />
</template>
</home-frame>
</template>
......@@ -187,6 +129,9 @@ export default {
},
onLoad () {
this.init();
uni.$api.systemApi.getMockData(true).then(res=>{
console.log(res)
})
},
onShow () {
const userInfo = uni.$storage.get("userInfo")
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!