Commit e24b1ac8 by 前端

缓存

1 parent 5b044d83
<template>
<cover-view class="webview-container">
<web-view
@message="handlerMessage"
ref="webview"
src="/hybrid/html/index.html"
></web-view>
</cover-view>
</template>
<script>
export default {
data() {
return {};
},
};
</script>
<style></style>
import WebView from "./WebView";
export default {
install(Vue, options) {
// 添加 Vue 实例方法
Vue.prototype.$webView = function (el) {
// 创建组件构造函数
const Constructor = Vue.extend(WebView);
// 创建组件实例
const instance = new Constructor();
// 手动挂载组件到元素
instance.$mount();
// 插入到页面中
el.appendChild(instance.$el);
};
},
};
......@@ -16,7 +16,9 @@ import GlsxImage from "./components/GlsxImage";
import MessageBox from "./components/MessageBox/index";
import wnCanvas from "./components/Canvas/wn-canvas";
import UpdateBox from "./components/UpdateBox";
import webView from "./components/WebView";
import utils from "./utils/utils";
Vue.use(webView);
Vue.component("GlsxImage", GlsxImage);
Vue.component("MessageBox", MessageBox);
Vue.component("wnCanvas", wnCanvas);
......
......@@ -13,7 +13,6 @@ const UPLOAD_STATUS = {
success: 1,
fail: 2,
};
import upload from "@/utils/ossUploadFile/uploadFile.js";
import { mapMutations, mapState } from "vuex";
import utils from "@/utils/utils.js";
export default {
......@@ -162,14 +161,19 @@ export default {
},
/**保存记录*/
saveRecord() {
const recordUrlList = this.audioInfo.audioList;
const recordUrlList = this.audioInfo.audioList.map((i) => {
return {
status: UPLOAD_STATUS.fail,
file: i,
};
});
let recordList = JSON.parse(uni.$storage.get("recordList") || "[]");
recordList = [
...recordList,
{
...this.getParams(),
recordUrlList,
},
...recordList,
];
uni.$storage.set("recordList", JSON.stringify(recordList));
},
......@@ -221,7 +225,7 @@ export default {
if (this.times >= this.timeout) {
this.$refs.tipBox?.open();
}
if (this.times >= this.reaction + this.timeout) {
if (this.times >= this.timeout) {
//结束接待
this.tipCancel();
clearInterval(this.timer);
......
<template>
<view class="layout">
<view class="bg"></view>
<view
class="login"
:key="dateKey"
>
<view class="login" :key="dateKey">
<view class="title">登录</view>
<view class="sub-title">手机号码登录</view>
<view class="input">
......@@ -16,15 +13,8 @@
@blur="input($event, 'mobile')"
/>
<template v-if="mobile">
<view
class="icon"
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
<view class="icon" @click="mobile = ''">
<icon type="clear" size="16" color="#000"> </icon>
</view>
</template>
</view>
......@@ -37,31 +27,19 @@
@blur="input($event, 'code')"
/>
<template v-if="code">
<view
class="icon"
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
<view class="icon" @click="code = ''">
<icon type="clear" size="16" color="#000"> </icon>
</view>
</template>
<view
:class="['code-btn', `${count ? 'code-disabled' : ''}`]"
@click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view>
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view
>
</view>
<button
class="btn"
@click="login"
>登录</button>
<button class="btn" @click="login">登录</button>
<view class="form-footer">
<view
class="autoLogin"
@click="readingStatus = !readingStatus"
>
<view class="autoLogin" @click="readingStatus = !readingStatus">
<uni-icons
:type="`${readingStatus ? 'checkbox-filled' : 'circle'}`"
:size="18"
......@@ -69,10 +47,7 @@
></uni-icons>
我已阅读并同意<text @click.stop="jumpUrl()">《用户隐私协议》</text>
</view>
<view
class="autoLogin"
@click="noSignIn = !noSignIn"
>
<view class="autoLogin" @click="noSignIn = !noSignIn">
<uni-icons
:type="`${noSignIn ? 'checkbox-filled' : 'circle'}`"
:size="18"
......
......@@ -15,9 +15,10 @@ export const STORAGE_OBJECTkEY = {
customerInfo: "customerInfo",
noSignInUuid: "noSignInUuid",
noviceGuideStatus: "noviceGuideStatus",
carBrandList:'carBrandList',
employeeList:'employeeList',
carBrandList: "carBrandList",
employeeList: "employeeList",
recordList: "recordList",
recordSuccessList: "recordSuccessList",
};
// export const IMG_VERSION = async () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!