Commit 9af79ac9 by yixinjj

Merge branch 'v1.0.7' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.7

2 parents 73664db4 30d78114
......@@ -7,12 +7,14 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script>
var wv;
import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js";
import { mapState } from "vuex";
export default {
computed: {
...mapState("audio", ["isEnd", "isStart"]),
},
onLoad() {},
onLaunch: async function () {
setTimeout(() => {
plus.screen.unlockOrientation(); //解除锁定屏幕方向
......@@ -41,6 +43,9 @@ export default {
</script>
<style lang="scss">
body {
overflow: hidden;
}
page {
font-size: 28rpx;
height: 100%;
......@@ -102,4 +107,11 @@ button::after {
.button-hover {
transform: translate(1rpx, 1rpx);
}
.webview-container {
position: absolute;
width: 100rpx;
height: 100rpx;
top: 0rpx;
left: 0rpx;
}
</style>
......@@ -50,18 +50,16 @@ const imgToBase64 = (list, urlKey) => {
let arr = [],
newList = JSON.parse(JSON.stringify(list))
list.map((e, index) => {
if(!(urlKey ? e[urlKey] : e).startsWith('https')) return resolve(list)
if (!e[urlKey]) return resolve(list)
if (!e[urlKey].startsWith('https')) return resolve(list)
uni.request({
url: urlKey ? e[urlKey] : e,
method: 'GET',
responseType: 'arraybuffer',
success: (res) => {
const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`
if (urlKey) {
newList[index][urlKey] = base64
newList[index][`original_${urlKey}`] = e[urlKey]
}
else newList[index] = base64
newList[index][urlKey] = base64
newList[index][`original_${urlKey}`] = e[urlKey]
arr.push(e)
if (arr.length === list.length) resolve(newList)
},
......
<template>
<view
class="container"
@click="handleTouchStart"
>
<view class="container" @click="handleTouchStart">
<view :class="['home', { show: !id }]">
<view class="bg">
<view class="top">
<view
class="top-one"
:style="randomize"
></view>
<view class="top-one" :style="randomize"></view>
</view>
<view class="bottom">
<view
class="bottom-one"
:style="randomize"
></view>
<view
class="bottom-two"
:style="randomize"
></view>
<view
class="bottom-three"
:style="randomize"
></view>
<view class="bottom-one" :style="randomize"></view>
<view class="bottom-two" :style="randomize"></view>
<view class="bottom-three" :style="randomize"></view>
</view>
</view>
<view class="left-side">
......@@ -39,26 +24,22 @@
@click="changeIndex(index)"
>
<view class="icon-box">
<view :class="[
<view
:class="[
'sprite-icon',
`icon-${i.icon}${tabIndex == index ? '-active' : ''}`,
]"></view>
]"
></view>
</view>
{{ i.label }}
</view>
</template>
</view>
<view class="left-footer">
<view
class="btn"
@click="$refs.kfRef.open()"
>
<view class="btn" @click="$refs.kfRef.open()">
<view class="sprite-icon icon-feedback"></view>
</view>
<view
class="btn"
@click="$refs.settingRef.open()"
>
<view class="btn" @click="$refs.settingRef.open()">
<view class="sprite-icon icon-setting"></view>
</view>
</view>
......@@ -66,10 +47,7 @@
<view class="right-side">
<template v-if="tabIndex == 0">
<view class="right-content">
<view
class="start"
@click="$emit('start')"
>
<view class="start" @click="$emit('start')">
<image
class="start-btn"
src="../../assets/images/home/start.gif"
......@@ -121,21 +99,13 @@
:isFooter="false"
>
<view class="footer">
<view
class="footer-btn confirm flex"
@click="$emit('openStep')"
>
<view class="footer-btn confirm flex" @click="$emit('openStep')">
<template v-if="finishDoneText">
{{finishDoneText}}
</template>
<template v-else>
完成接待<text>(推荐)</text>
{{ finishDoneText }}
</template>
<template v-else> 完成接待<text>(推荐)</text> </template>
</view>
<view
class="footer-btn cancel flex"
@click="$emit('backHome')"
>
<view class="footer-btn cancel flex" @click="$emit('backHome')">
仍要退出<text>(不推荐)</text>
</view>
</view>
......@@ -145,10 +115,7 @@
<!-- 客服弹框 -->
<kf-box ref="kfRef" />
<!-- 设置弹框 -->
<setting-box
ref="settingRef"
@stopAudio="stopAudio"
/>
<setting-box ref="settingRef" @stopAudio="stopAudio" />
<slot name="content" />
</view>
</template>
......@@ -165,10 +132,10 @@ export default {
finishDoneText: String,
finishContene: {
type: String,
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击“完成接待”'
}
default: "当前操作视为强制退出接待,若需正常流程完成接待请点击“完成接待”",
},
},
data () {
data() {
return {
userInfo: {},
tabs: [
......@@ -182,18 +149,18 @@ export default {
},
],
tabIndex: 0,
dateKey: null
dateKey: null,
};
},
mounted () {
mounted() {
const userInfo = uni.$storage.get("userInfo") || {};
this.userInfo = userInfo
this.userInfo = userInfo;
setInterval(() => {
this.dateKey = Date.now();
}, 5e3);
},
computed: {
randomize () {
randomize() {
let { dateKey } = this;
const maxX = uni.getSystemInfoSync().windowWidth - 300,
maxY = uni.getSystemInfoSync().windowHeight - 100,
......@@ -201,18 +168,18 @@ export default {
y = Math.floor(Math.random() * maxY);
return `transform:translate(${x}px,${y}px);${dateKey};`;
},
previewRef () {
return this.$refs.previewRef
previewRef() {
return this.$refs.previewRef;
},
finishRef() {
return this.$refs.finish;
},
finishRef () {
return this.$refs.finish
}
},
methods: {
changeIndex (index) {
if (this.tabIndex == index) return
changeIndex(index) {
if (this.tabIndex == index) return;
this.tabIndex = index;
this.$emit("changeTab", index)
this.$emit("changeTab", index);
},
},
};
......
......@@ -19,11 +19,12 @@
* @param {string} accessKeySecret - OSS 访问密钥 secret
* @param {string} stsToken - 安全令牌服务(STS)令牌,用于临时访问 OSS 存储桶
* @param {string} fileName - 要上传的文件名
* @param {string} filePath - 要上传的文件所在路径
* @param {Object} options - (可选)包含上传器配置的对象,如 region
* @throws {Error} 如果缺少必要的参数,将抛出错误
*/
window.msgFromUniapp = function (accessKeyId, accessKeySecret, stsToken, fileName, options = {}) {
if (!accessKeyId || !accessKeySecret || !stsToken || !fileName) {
window.msgFromUniapp = function (accessKeyId, accessKeySecret, stsToken, fileName, filePath, options = {}) {
if (!accessKeyId || !accessKeySecret || !stsToken || !fileName || !filePath) {
throw new Error('accessKeyId,accessKeySecret,stsToken,fileName is required')
}
try {
......@@ -55,6 +56,7 @@
}
});
}
}
// }, false);
</script>
</body>
......
......@@ -14,8 +14,7 @@ class OSSUpLoader {
/**
* 本地保存文件路径(待上传文件路径)
*/
filePath =
"file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/doc/";
filePath;
/**
* 从STS服务获取的临时访问密钥(AccessKey ID和AccessKey Secret)。
*/
......@@ -83,7 +82,7 @@ class OSSUpLoader {
partSize = this.partSize,
parallel = this.parallel,
timeout = this.timeout,
filePath = this.filePath,
filePath,
retryCountMax = this.retryCountMax,
retryInterval = this.retryInterval,
ossFolder = this.ossFolder,
......
......@@ -44,7 +44,7 @@ import { index } from "./env";
// }
Vue.prototype.$permision = permision;
import sentryInit from "@/utils/sentryConfig/sentryInit";
if (index == 3) {
if (index == 5) {
const sentry = sentryInit();
Vue.prototype.$sendSentry = function (e) {
sentry.captureException(e);
......
......@@ -33,7 +33,6 @@ export default {
const url = ["pages/equity/index", "pages/boutique/index"];
if (url.includes(route)) return;
this.initTime();
// this.checkVoice();
},
computed: {
...mapState("audio", ["receptionStatus", "booksList", "audioInfo"]),
......@@ -58,7 +57,7 @@ export default {
"setBooks",
"setAudioInfo",
]),
//关闭提示
// //关闭提示
tipCancel() {
this.stopAudio();
this.setReceptionStatus(0);
......@@ -76,6 +75,14 @@ export default {
this.times = 0;
this.$refs.tipBox?.close();
},
closeAudio() {
this.times = 0;
clearInterval(this.timer);
this.timer = null;
this.stopAudio("abnormal");
this.setReceptionStatus(0);
this.setAudioInfo({ endReasonType: 1 });
},
getParams() {
const { shopMerchantId, phone, sceneType } = uni.$storage.get("userInfo"),
{ customerName, phoneNumber, salesUuid, carModel, staffName } =
......@@ -144,20 +151,22 @@ export default {
console.log(res);
},
});
this.handleSave(saveResult);
this.handleSave(saveResult[1].savedFilePath);
});
},
handleSave(file) {
if (this.audioInfo.audioStatus == "end") {
this.saveRecord();
this.setBooks([]);
this.$store.dispatch("clearCustomerInfo");
this.setReceptionStatus(1);
this.setAudioInfo({ endReasonType: 0, audioStatus: "finish" });
} else {
const audioList = [...this.audioInfo.audioList, file];
const audioList = [...this.audioInfo.audioList, file];
if (file) {
this.setAudioInfo({ audioList });
}
if (this.audioInfo.audioStatus != "end") {
return;
}
this.saveRecord();
this.setBooks([]);
this.$store.dispatch("clearCustomerInfo");
this.setReceptionStatus(1);
this.setAudioInfo({ endReasonType: 0, audioStatus: "finish" });
},
/**保存记录*/
saveRecord() {
......@@ -175,6 +184,7 @@ export default {
},
...recordList,
];
console.log(recordList, "recordList");
uni.$storage.set("recordList", JSON.stringify(recordList));
},
//结束接待
......@@ -189,6 +199,15 @@ export default {
// });
// return;
// }
if (status == "abnormal") {
this.setAudioInfo({ audioStatus: "abnormal" });
recorderManager.stop();
return;
}
if (this.audioInfo.audioStatus == "abnormal") {
this.handleSave();
return;
}
if (this.audioInfo.audioStatus != "start") {
return;
}
......@@ -226,8 +245,8 @@ export default {
this.$refs.tipBox?.open();
}
if (this.times >= this.timeout) {
//结束接待
this.tipCancel();
//关闭录音
this.closeAudio();
clearInterval(this.timer);
}
}, 1000 * 10);
......
......@@ -3,18 +3,44 @@ const UPLOAD_STATUS = {
success: 1,
fail: 2,
};
import upload from "@/utils/ossUploadFile/uploadFile.js";
import utils from "@/utils/utils.js";
let wv, getResult;
import { uploadFile, getOssToken } from "@/utils/ossUploadFile/uploadFile.js";
import config from "@/config.js";
export default {
onLoad() {
// #ifdef APP-PLUS
// wv = plus.webview.create("", "custom-webview", {
// plusrequire: "none", //禁止远程网页使用plus的API,有些使用mui制作的网页可能会监听plus.key,造成关闭页面混乱,可以通过这种方式禁止
// "uni-app": "none", //不加载uni-app渲染层框架,避免样式冲突
// top: uni.getSystemInfoSync().statusBarHeight + 44, //放置在titleNView下方。如果还想在webview上方加个地址栏的什么的,可以继续降低TOP值
// });
// wv.loadURL("/hybrid/html/index.html");
// var currentWebview = this.$scope.$getAppWebview(); //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效
// currentWebview.append(wv); //一定要append到当前的页面里!!!才能跟随当前页面一起做动画,一起关闭
// setTimeout(function () {
// wv.setStyle({ top: "100%", height: 300 });
// }, 1000); //如果是首页的onload调用时需要延时一下,二级页面无需延时,可直接获取
// // #endif
},
mounted() {
// this.checkRecord();
// setInterval(() => {
var currentWebview = this.$scope.$getAppWebview(); //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效
setTimeout(function () {
wv = currentWebview.children()[0];
wv.setStyle({ top: "100%", height: 300 });
}, 1000); //如果是页面初始化调用时,需要延时一下
// console.log(88);
// // this.checkRecord();
// setTimeout(() => {
// this.checkRecord();
// }, 1000 * 60 * 10);
// }, 1000 * 6);
},
methods: {
handlerMessage(result) {
console.log(result);
getResult = result;
},
checkRecord() {
utils.isNetWork().then(async (res) => {
uni.$isNetWork().then(async (res) => {
let recordList = JSON.parse(uni.$storage.get("recordList") || "[]");
console.log(recordList, "recordList");
for (let i = 0; i < recordList.length; i++) {
......@@ -22,6 +48,20 @@ export default {
}
});
},
getFilePath() {
return new Promise((resolve) => {
plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function (fs) {
resolve(fs.root.fullPath);
});
});
},
setTimeoutResult() {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(getResult);
}, 1000);
});
},
/**上传记录*/
async handleRerord(val) {
let recordList = JSON.parse(uni.$storage.get("recordList") || "[]");
......@@ -31,14 +71,38 @@ export default {
let recordUrlList = val.recordUrlList;
// 上传失败的记录
for (let i of recordUrlList) {
console.log(i.status == UPLOAD_STATUS.fail);
if (i.status == UPLOAD_STATUS.fail) {
const filePath = i.file;
console.log(filePath, "filePath");
const result = await this.checkFileUpload(filePath);
if (!(result instanceof Error)) {
i.status = UPLOAD_STATUS.success;
i.file = result;
const filePath = i.file.split("/").pop();
const { lsaccessKeySecret, securityToken, lsaccessKeyId } =
await getOssToken();
console.log(lsaccessKeySecret, securityToken, lsaccessKeyId);
const rootPath = await this.getFilePath();
wv.evalJS(
`msgFromUniapp('${lsaccessKeyId}','${lsaccessKeySecret}','${securityToken}','${filePath}','file://${rootPath}uniapp_save/')`
);
for (let k = 0; k < 100; k++) {
const result = await this.setTimeoutResult();
if (result) {
if (result.detail.data[0].code == 0) {
uni.removeSavedFile({
filePath: i.file,
complete: function (res) {
console.log(res);
},
});
i.status = UPLOAD_STATUS.success;
i.file = config.OSS_DOMAIN + "/" + config.FOLDER + filePath;
}
getResult = "";
break;
}
}
// const result = await this.checkFileUpload(filePath);
// if (!(result instanceof Error)) {
// i.status = UPLOAD_STATUS.success;
// i.file = result;
// }
}
}
// 判断是否全部上传成功
......@@ -60,7 +124,7 @@ export default {
let errorMsg = "";
while (attempt < 2) {
try {
const result = await upload(tempFilePath);
const result = await uploadFile(tempFilePath);
// 上传成功
return result;
} catch (error) {
......
......@@ -22,13 +22,7 @@
"disableSwipeBack": true
}
},
{
"path": "pages/equity/informationEntry",
"style": {
"navigationBarTitleText": "信息录入",
"enablePullDownRefresh": false
}
},
{
"path": "pages/equity/detail/detail",
"style": {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-06-20 11:32:52
* @LastEditors: huyue
* @LastEditTime: 2024-06-24 11:10:47
* @LastEditTime: 2024-06-26 16:28:12
-->
<template>
<view class="layout" @click.prevent="touch">
......@@ -301,11 +301,16 @@ export default {
.item-text {
position: absolute;
left: 24rpx;
bottom: 24rpx;
left: 0;
bottom: 0;
font-size: 30rpx;
color: #ffffff;
line-height: 44rpx;
width: 100%;
height: 122rpx;
padding: 44rpx 22rpx 22rpx;
background-image: linear-gradient(180deg, #00000000 0%, #000000 100%);
border-radius: 0 0 24rpx 24rpx;
line-height: 66rpx;
}
.details-container {
......
......@@ -31,6 +31,7 @@
</view>
</view>
</view>
<view class="end-text" v-if="historyList.length > 0 && isEnd">我是一个有底线的人</view>
</scroll-view>
</template>
<template v-else>
......@@ -39,7 +40,7 @@
<view class="no-data-text">暂无数据</view>
</view>
</template>
<view class="end-text" v-if="historyList.length > 0 && isEnd">我是一个有底线的人</view>
</view>
</template>
......@@ -55,7 +56,10 @@ export default {
data() {
return {
historyList: [],
isEnd: false
isEnd: false,
currentPage: 1,
shopMerchantId: '',
goodsName: 'M5'
}
},
watch: {
......@@ -108,6 +112,7 @@ export default {
},
pageonReachBottom() {
console.log('xiala ')
this.getQuotationList(false, true)
},
// 脱敏
nameHide(name) {
......@@ -213,9 +218,10 @@ export default {
}
}
.end-text {
width: 100%;
color: #999;
text-align: center;
margin: 50rpx 0;
padding: 50rpx 0;
}
.no-data {
position: absolute;
......
<template>
<view class="layout">
<view class="bg">
<!-- <image src="../../../assets/images/media/bg-6.webp" /> -->
</view>
<view class="content">
<view class="title">{{ title || "历史成交记录" }}</view>
<template v-if="list.length && shopMerchantId">
<Tabs :list="list" @tabclick="tabclick" ref="tabs" />
</template>
<view class="card-list">
<template v-if="historyList.length > 0">
<view class="card-item" v-for="item in historyList" :key="item.id">
<view class="name"
>{{ nameHide(item.customerName) }}
<view
v-if="item.ownerGender"
:class="[
'sex-avatar sprite-icon',
`icon-${sexType[item.ownerGender]}`,
]"
></view>
</view>
<view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info">
<view>车架号</view>
<view>{{ item.carVin || "-" }}</view>
</view>
<view class="card-info">
<view>工单号</view>
<view>{{ item.payId }}</view>
</view>
<view class="card-info">
<view>订单时间</view>
<view>{{ format(item.createdTime) }}</view>
</view>
<view class="card-info">
<view>交易流水号</view>
<view>{{ item.transactionNo }}</view>
</view>
<view class="card-info">
<view>支付方式</view>
<view
:class="[
'pay-type sprite-icon',
`icon-${payType[item.payType]}`,
]"
></view>
</view>
<view class="card-info">
<view>实收金额</view>
<view class="price">¥{{ accDiv(item.equityPrice) }}</view>
</view>
</view>
</template>
<template v-else>
<view class="no-data">
<glsx-image
class="no-data-img"
src="media/no-data.png"
mode="scaleToFill"
/>
<view class="no-data-text">暂无数据</view>
</view>
</template>
<!-- <uni-grid :column="3" :show-border="false" :square="false">
<uni-grid-item v-for="item in historyList" :key="item.id"> -->
<!-- </uni-grid-item>
</uni-grid> -->
</view>
<view class="end-text" v-if="historyList.length > 0 && isEnd"
>我是一个有底线的人</view
>
</view>
</view>
</template>
<script type="text/ecmascript-6">
import utils from '@/utils/utils';
import Tabs from './Tabs.vue';
export default {
name: 'Media_6',
props: {
show: Boolean,
title: String
},
components: { Tabs },
data () {
return {
list: [
{
tabName: '问界 M5',
value: 'M5'
},
{
tabName: '问界 M7',
value: 'M7'
},
{
tabName: '问界 M9',
value: 'M9'
}
],
historyList: [],
payType: {
1: 'icon-weixin',
2: 'icon-shop'
},
sexType: {
'男': 'icon-male',
'女': 'icon-female'
},
goodsName: 'M5',
shopMerchantId: '',
currentPage: 1,
isEnd: false
}
},
watch: {
show (n) {
if (n) this.init()
},
watchStatus: {
immediate: true,
handler (newval) {
this.$refs?.tabs?.tabClick(0)
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
mounted () {
if (this.show) this.init()
// const { shopMerchantId } = uni.$storage.get("userInfo");
// this.shopMerchantId = shopMerchantId
// this.getQuotationList();
},
methods: {
format (dateTimeStr) {
return utils.convertDateTimeFormat(dateTimeStr, '/')
},
accDiv (val) {
return utils.accDiv(val, 100)
},
init () {
const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId
this.getQuotationList();
},
async getQuotationList (isSwitch = false, next = false) {
const { goodsName, shopMerchantId, currentPage } = this
if (next) this.currentPage++
const data = await uni.$api.commonApi.getQuotationList({
currentPage,
pageSize: 18,
merchantId: shopMerchantId,
orderStatus: 3,
goodsName
})
if (isSwitch) {
this.historyList = data.list
this.isEnd = false
} else {
if (data.list.length > 0) {
this.historyList = this.historyList.concat(data.list)
this.isEnd = false
} else {
if (this.historyList.length > 9) this.isEnd = true
}
}
},
tabclick (index) {
this.goodsName = this.list[index].value
this.currentPage = 1
this.getQuotationList(true)
},
// 脱敏
nameHide (name) {
return name.substring(0, 1) + '**';
// if (name.length == 2) {
// name = name.substring(0, 1) + '*'; // 截取name 字符串截取第一个字符,
// return name; // 张三显示为张*
// } else if (name.length == 3) {
// name = name.substring(0, 1) + '*' + name.substring(2, 3); // 截取第一个和第三个字符
// return name; // 李思思显示为李*思
// } else if (name.length > 3) {
// name = name.substring(0, 1) + '*' + '*' + name.substring(3, name.length); // 截取第一个和大于第4个字符
// return name; // 王五哈哈显示为王**哈
// }
}
}
}
</script>
<style scoped lang="scss">
.layout {
padding-top: 192rpx;
position: relative;
.bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 240rpx;
image {
width: 100%;
height: 100%;
}
}
.content {
border-radius: 40rpx 40rpx 0 0;
background: linear-gradient(180deg, #f7f9fc 0%, #f7f9fc 100%);
overflow: hidden;
position: relative;
z-index: 1;
.title {
font-size: 40rpx;
line-height: 48rpx;
color: #1a1a1a;
padding: 32rpx 0;
text-align: center;
}
.card-list {
position: relative;
margin: 0 72rpx;
display: grid;
grid-template-columns: repeat(3, 664rpx);
grid-template-rows: 0fr;
justify-content: center;
grid-gap: 32rpx;
min-height: calc(100vh - 416rpx);
.card-item {
margin: 16rpx auto;
padding: 24rpx 40rpx;
width: 664rpx;
// height: 440rpx;
background: #ffffff;
border: 2rpx solid #dce0e6;
border-radius: 16rpx;
height: 448rpx;
.name {
display: flex;
align-items: center;
font-weight: 500;
font-size: 32rpx;
color: #1a1a1a;
margin-bottom: 16rpx;
.sex-avatar {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
}
.goods-name {
margin-bottom: 16rpx;
font-weight: 500;
font-size: 32rpx;
color: #2c66f7;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-info {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #999999;
line-height: 32rpx;
margin-bottom: 16rpx;
.pay-type {
width: 32rpx;
height: 32rpx;
}
.price {
font-weight: 600;
font-size: 36rpx;
color: #14cc68;
}
}
}
}
}
}
.end-text {
color: #999;
text-align: center;
margin: 50rpx 0;
}
.no-data {
position: absolute;
left: 50%;
top: 30%;
transform: translate(-50%, -50%);
&-img {
width: 640rpx;
height: 272rpx;
}
&-text {
font-size: 32rpx;
color: #999999;
text-align: center;
margin-top: 24rpx;
}
}
</style>
......@@ -153,7 +153,7 @@ export default {
'问界M7': 1,
'问界M9': 2
}[this.customerInfo.carModel]
return this.carTypeList[name || 0]
return this.carTypeList[name || 0].url
}
},
methods: {
......
......@@ -6,7 +6,20 @@
* @LastEditTime: 2024-04-18 11:24:22
-->
<template>
<view class="information-entry">
<view class="information-entry" v-if="showPayPage">
<view class="nav-bar">
<view
class="back"
@click="$emit('update:showPayPage', false)"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
<view class="title">信息录入</view>
</view>
<view class="information-tips">建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。</view>
<view class="information-box">
<view
......@@ -50,24 +63,11 @@
</view>
<view
class="information-done"
@click="done()"
@click="$emit('finish')"
>完成接待</view>
<!-- <uni-popup ref="preview" type="center" border-radius="10px 10px 0 0">
<image class="preview-img" :src="previewImg" mode="aspectFit" />
</uni-popup> -->
<MessageBox
ref="tipBox"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
<finish-step
ref="stepRef"
@submit="submit"
/>
<update-box />
</view>
</template>
<script>
......@@ -88,12 +88,11 @@ const INFO_LIST = [
title: "客户延保合同",
},
];
import myClick from "@/mixin/click";
import { mapMutations } from "vuex";
import FinishStep from "@/components/FinishStep.vue";
export default {
components: { FinishStep },
mixins: [myClick],
props: {
showPayPage: Boolean
},
data () {
return {
infoList: JSON.parse(JSON.stringify(INFO_LIST)),
......@@ -101,19 +100,13 @@ export default {
isPreview: false,
};
},
onLoad (options) {
const text = options.text;
uni.setNavigationBarTitle({
title: text,
});
},
watch: {
watchBooksList: {
immediate: true,
handler (newValue) {
console.log(newValue,'===')
if(newValue.length) this.infoList = newValue
else this.infoList = JSON.parse(JSON.stringify(INFO_LIST))
console.log(newValue, '===')
if (newValue.length) this.infoList = newValue
else this.infoList = JSON.parse(JSON.stringify(INFO_LIST))
},
}
},
......@@ -122,14 +115,6 @@ export default {
return this.$store.state.audio.booksList
}
},
onBackPress () {
// this.infoList = this.infoList.map((item) => {
// if (item.imgUrl) {
// delete item.imgUrl;
// }
// return item;
// });
},
methods: {
...mapMutations("audio", ["setBooks"]),
// 上传图
......@@ -168,20 +153,6 @@ export default {
this.infoList[index].imgUrl = ''
this.setBooks(utils.deepClone(this.infoList))
},
// 完成接待按钮
done () {
this.$refs.stepRef.open();
},
submit () {
this.$refs.stepRef.close();
this.stopAudio();
// this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
setTimeout(() => {
uni.reLaunch({
url: "/pages/equity/index",
});
}, 1500);
},
// 预览图片
preview (index) {
this.isPreview = true;
......@@ -214,6 +185,33 @@ export default {
position: relative;
background-color: #fff;
height: 100vh;
z-index: 998;
box-sizing: border-box;
padding-top: 72px;
.nav-bar {
position: fixed;
width: 100%;
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 9;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 500;
font-size: 32rpx;
color: #1a1a1a;
}
}
.information-tips {
background: rgba(44, 102, 247, 0.1);
color: #2c66f7;
......
......@@ -163,9 +163,10 @@ export default {
// delta: 1,
// });
// this.stopAudio();
uni.navigateTo({
url: `/pages/equity/informationEntry`,
});
// uni.navigateTo({
// url: `/pages/equity/informationEntry`,
// });
this.$emit('jumpPay')
this.close();
},
},
......
......@@ -60,35 +60,42 @@
<view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view>
</view>
</template>
<pay-pop ref="pay"></pay-pop>
<pay-pop
ref="pay"
@jumpPay="showPayPage = true"
></pay-pop>
<finish-step
ref="stepRef"
@submit="done"
/>
<informationEntry
:showPayPage.sync="showPayPage"
@finish="open"
/>
</view>
</template>
<script>
import ToolBox from "@/components/ToolBox.vue";
import Reception from "./components/Reception.vue";
import MediaComponent from "./components/MediaComponent.vue";
import Media_6 from "./components/Media_6.vue";
import History from "./components/History.vue";
import ThreeGuarantees from "./components/ThreeGuarantees.vue";
import Guarantee from './components/Guarantee.vue';
import payPop from "./components/payPop.vue";
import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex";
import informationEntry from './components/informationEntry.vue'
export default {
components: {
ToolBox,
Reception,
MediaComponent,
Media_6,
payPop,
FinishStep,
Guarantee,
History,
ThreeGuarantees
ThreeGuarantees,
informationEntry
},
props: {
id: [String, Number],
......@@ -105,7 +112,8 @@ export default {
startX: null,
startY: null,
screenWidth: null,
scaleValueObject: {}
scaleValueObject: {},
showPayPage: false
};
},
computed: {
......@@ -155,6 +163,7 @@ export default {
this.$emit('back')
},
done (e) {
this.showPayPage = false
this.$refs.toolRef.hide()
this.$refs.stepRef.close()
this.$emit('done', e)
......@@ -183,7 +192,7 @@ export default {
isDistanceSignificant = Math.abs(touch.pageX - startX) > screenWidth / 3,
index = toolList.findIndex(item => item.id == id)
if (Math.abs(this.startY - touch.pageY) > 100) return
if(!scaleValueObject[id]) scaleValueObject[id] = 1
if (!scaleValueObject[id]) scaleValueObject[id] = 1
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1) {
const nextId = this.getNextId(index, toolList, startX, halfScreenWidth)
this.$emit('update:id', nextId)
......@@ -199,8 +208,8 @@ export default {
return index === 0 ? toolList[toolList.length - 1].id : toolList[index - 1].id;
}
},
scale(e){
let {id} = this
scale (e) {
let { id } = this
this.scaleValueObject[id] = e
}
},
......
......@@ -100,7 +100,16 @@ const getPolicyBase64 = function () {
const policyBase64 = base64.encode(JSON.stringify(policyText));
return policyBase64;
};
const getOssToken = async function () {
console.log("getOssToken");
const { lsaccessKeySecret, securityToken, lsaccessKeyId } =
await uni.$api.commonApi.getToken({});
return {
lsaccessKeySecret,
securityToken,
lsaccessKeyId,
};
};
// 生成签名
const getSignature = function (policyBase64) {
return new Promise(async (reslove) => {
......@@ -144,4 +153,4 @@ const getSignature = function (policyBase64) {
});
};
module.exports = uploadFile;
module.exports = { uploadFile, getOssToken };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!