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"; ...@@ -16,7 +16,9 @@ import GlsxImage from "./components/GlsxImage";
import MessageBox from "./components/MessageBox/index"; import MessageBox from "./components/MessageBox/index";
import wnCanvas from "./components/Canvas/wn-canvas"; import wnCanvas from "./components/Canvas/wn-canvas";
import UpdateBox from "./components/UpdateBox"; import UpdateBox from "./components/UpdateBox";
import webView from "./components/WebView";
import utils from "./utils/utils"; import utils from "./utils/utils";
Vue.use(webView);
Vue.component("GlsxImage", GlsxImage); Vue.component("GlsxImage", GlsxImage);
Vue.component("MessageBox", MessageBox); Vue.component("MessageBox", MessageBox);
Vue.component("wnCanvas", wnCanvas); Vue.component("wnCanvas", wnCanvas);
......
...@@ -13,7 +13,6 @@ const UPLOAD_STATUS = { ...@@ -13,7 +13,6 @@ const UPLOAD_STATUS = {
success: 1, success: 1,
fail: 2, fail: 2,
}; };
import upload from "@/utils/ossUploadFile/uploadFile.js";
import { mapMutations, mapState } from "vuex"; import { mapMutations, mapState } from "vuex";
import utils from "@/utils/utils.js"; import utils from "@/utils/utils.js";
export default { export default {
...@@ -162,14 +161,19 @@ export default { ...@@ -162,14 +161,19 @@ export default {
}, },
/**保存记录*/ /**保存记录*/
saveRecord() { 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") || "[]"); let recordList = JSON.parse(uni.$storage.get("recordList") || "[]");
recordList = [ recordList = [
...recordList,
{ {
...this.getParams(), ...this.getParams(),
recordUrlList, recordUrlList,
}, },
...recordList,
]; ];
uni.$storage.set("recordList", JSON.stringify(recordList)); uni.$storage.set("recordList", JSON.stringify(recordList));
}, },
...@@ -221,7 +225,7 @@ export default { ...@@ -221,7 +225,7 @@ export default {
if (this.times >= this.timeout) { if (this.times >= this.timeout) {
this.$refs.tipBox?.open(); this.$refs.tipBox?.open();
} }
if (this.times >= this.reaction + this.timeout) { if (this.times >= this.timeout) {
//结束接待 //结束接待
this.tipCancel(); this.tipCancel();
clearInterval(this.timer); clearInterval(this.timer);
......
<template> <template>
<view class="layout"> <view class="layout">
<view class="bg"></view> <view class="bg"></view>
<view <view class="login" :key="dateKey">
class="login"
:key="dateKey"
>
<view class="title">登录</view> <view class="title">登录</view>
<view class="sub-title">手机号码登录</view> <view class="sub-title">手机号码登录</view>
<view class="input"> <view class="input">
...@@ -16,15 +13,8 @@ ...@@ -16,15 +13,8 @@
@blur="input($event, 'mobile')" @blur="input($event, 'mobile')"
/> />
<template v-if="mobile"> <template v-if="mobile">
<view <view class="icon" @click="mobile = ''">
class="icon" <icon type="clear" size="16" color="#000"> </icon>
@click="mobile = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
</view> </view>
...@@ -37,31 +27,19 @@ ...@@ -37,31 +27,19 @@
@blur="input($event, 'code')" @blur="input($event, 'code')"
/> />
<template v-if="code"> <template v-if="code">
<view <view class="icon" @click="code = ''">
class="icon" <icon type="clear" size="16" color="#000"> </icon>
@click="code = ''"
>
<icon
type="clear"
size="16"
color="#000"
> </icon>
</view> </view>
</template> </template>
<view <view
:class="['code-btn', `${count ? 'code-disabled' : ''}`]" :class="['code-btn', `${count ? 'code-disabled' : ''}`]"
@click="getSmsCode" @click="getSmsCode"
>{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view> >{{ count ? `重新发送(${count}s)` : "获取验证码" }}</view
>
</view> </view>
<button <button class="btn" @click="login">登录</button>
class="btn"
@click="login"
>登录</button>
<view class="form-footer"> <view class="form-footer">
<view <view class="autoLogin" @click="readingStatus = !readingStatus">
class="autoLogin"
@click="readingStatus = !readingStatus"
>
<uni-icons <uni-icons
:type="`${readingStatus ? 'checkbox-filled' : 'circle'}`" :type="`${readingStatus ? 'checkbox-filled' : 'circle'}`"
:size="18" :size="18"
...@@ -69,10 +47,7 @@ ...@@ -69,10 +47,7 @@
></uni-icons> ></uni-icons>
我已阅读并同意<text @click.stop="jumpUrl()">《用户隐私协议》</text> 我已阅读并同意<text @click.stop="jumpUrl()">《用户隐私协议》</text>
</view> </view>
<view <view class="autoLogin" @click="noSignIn = !noSignIn">
class="autoLogin"
@click="noSignIn = !noSignIn"
>
<uni-icons <uni-icons
:type="`${noSignIn ? 'checkbox-filled' : 'circle'}`" :type="`${noSignIn ? 'checkbox-filled' : 'circle'}`"
:size="18" :size="18"
......
...@@ -15,9 +15,10 @@ export const STORAGE_OBJECTkEY = { ...@@ -15,9 +15,10 @@ export const STORAGE_OBJECTkEY = {
customerInfo: "customerInfo", customerInfo: "customerInfo",
noSignInUuid: "noSignInUuid", noSignInUuid: "noSignInUuid",
noviceGuideStatus: "noviceGuideStatus", noviceGuideStatus: "noviceGuideStatus",
carBrandList:'carBrandList', carBrandList: "carBrandList",
employeeList:'employeeList', employeeList: "employeeList",
recordList: "recordList", recordList: "recordList",
recordSuccessList: "recordSuccessList",
}; };
// export const IMG_VERSION = async () => { // 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!