Commit 147eb90f by yixinjj

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

2 parents fa995534 251d8a34
No preview for this file type
<template> <template>
<view class="wn-canvas"> <view class="wn-canvas">
<template v-if="false">
<template v-if="showPenBox">
<view class="pen-box">
<view
class="pen"
:style="{backgroundColor: currentColor, height: lineWidth+'px'}"
></view>
<slider
min="1"
max="20"
:value="lineWidth"
block-size="20"
activeColor="#84f876"
class="pen-slider"
@change="penWidthChange"
/>
<view class="pen-txt">{{lineWidth}}px</view>
</view>
</template>
<image
v-if="isLandScape"
src="./img/color.png"
mode=""
class="draw-logo"
@click="showTools"
></image>
<view
class="tools-box"
v-if="toolsShow"
>
<view class="tools">
<view
class="tools-item "
v-for="(item,index) in tools"
:key="index"
>
<button
open-type="share"
v-if="item.key == 'share'"
style="background-color: rgba(0,0,0,0);padding: 0;border-radius: none;line-height: 0;borderColor:rgba(0,0,0,0);"
>
<image
class="tools-icon"
:src="item.active?item.item.activeUrl:item.url"
mode="aspectFit"
>
</image>
</button>
<image
@click="chooseTools(item)"
v-else
:src="item.active?item.activeUrl:item.url"
class="tools-icon"
></image>
</view>
</view>
</view>
</template>
<!-- <movable-area
:class="['canvas-box',{fill:custom}]"
scale-area
:style="{height:height}"
@touchstart="viewTouchStart"
>
<movable-view
class="canvas-view"
scale-min="1"
:scale="!drawStatus"
:disabled="drawStatus"
:direction="scaleValue == 1?'none':'all'"
:scale-value="defaultScaleValue"
@scale="scale"
> -->
<zoom-pan <zoom-pan
:class="['canvas-box',{fill:custom}]" :class="['canvas-box',{fill:custom}]"
:disabled="drawStatus" :disabled="drawStatus"
...@@ -108,25 +35,6 @@ ...@@ -108,25 +35,6 @@
</template> </template>
</template> </template>
</zoom-pan> </zoom-pan>
<!-- <image class="under-image" :src="drawImage"
mode="scaleToFill"
/> -->
<!-- </movable-view>
</movable-area> -->
<!-- <color
:colorShow="colorShow"
@colorPickTap="colorPickTapHandler"
></color> -->
<!-- <view
class="btn-box"
v-if="showSave"
>
<button
type="primary"
@click="saveImage"
>保存</button>
</view> -->
</view> </view>
</template> </template>
...@@ -899,7 +807,6 @@ export default { ...@@ -899,7 +807,6 @@ export default {
} }
}, },
/**缩放 */ /**缩放 */
scale (e) { scale (e) {
this.scaleValue = e.scale this.scaleValue = e.scale
this.$emit('scale', e.scale) this.$emit('scale', e.scale)
......
<template> <template>
<view <view>
:class="['container zoom-pan-container',{disabled:disabled}]" <movable-area
@touchstart="handleTouchStart" class="container zoom-pan-container"
@touchmove="handleTouchMove" @touchstart="handleTouchStart"
@touchend="handleTouchEnd" @touchmove="handleTouchMove"
@touchcancel="handleTouchEnd" @touchEnd="handleTouchEnd"
>
<view
class="content"
:style="{ transform: transformStyle ,
'transform-origin': transformOriginStyle
}"
> >
<slot name="content"></slot> <movable-view
</view> class="content"
:style="{'transform-origin': transformOriginStyle}"
scale
:direction="scale == 1?'none':'all'"
:scale-min="scaleMin"
:scale-max="scaleMax"
:disabled="disabled"
out-of-bounds
@scale="onScale"
:scale-value="defalutscale"
>
<slot name="content"></slot>
</movable-view>
</movable-area>
</view> </view>
</template> </template>
<script> <script>
...@@ -35,27 +43,20 @@ export default { ...@@ -35,27 +43,20 @@ export default {
}, },
data () { data () {
return { return {
startX: 0,
startY: 0,
moveX: 0,
moveY: 0,
scale: 1, scale: 1,
lastScale: 1, defalutscale: 1,
lastTouchDistance: 0,
isScaling: false, isScaling: false,
isDragging: false, transformOriginStyle: '50% 50%'
transformOrigin: { x: 0, y: 0 },
transformStyle: '',
transformOriginStyle: '50% 50%',
scaleFactor: 0.01,
}; };
}, },
watch: { watch: {
watchScaleValue () { watchScaleValue () {
this.lastScale = 1 if(this.defalutscale != 1) this.defalutscale = 2
this.scale = 1 this.scale = 1
this.transformStyle = `scale(1) translate(0px, 0px)` this.transformOriginStyle = `50% 50%'`
setTimeout(() => {
this.defalutscale = 1
}, 100)
} }
}, },
computed: { computed: {
...@@ -66,44 +67,21 @@ export default { ...@@ -66,44 +67,21 @@ export default {
methods: { methods: {
handleTouchStart (e) { handleTouchStart (e) {
if (this.disabled) return if (this.disabled) return
if (e.touches.length === 2) { if (e.touches.length === 2) this.isScaling = true;
this.isScaling = true;
this.lastTouchDistance = this.getTouchDistance(e.touches);
// 初始化缩放中心为两指间的中心点
this.transformOrigin = this.getTouchCenter(e.touches);
} else if (e.touches.length === 1) {
this.isDragging = true;
[this.startX, this.startY] = [e.touches[0].pageX, e.touches[0].pageY];
this.moveX = 0
this.moveY = 0
}
}, },
handleTouchMove: utils.throttle(function (e) { handleTouchMove: utils.throttle(function (e) {
if (this.disabled) return if (this.disabled) return
if (this.isScaling && e.touches.length === 2) { if (this.isScaling && e.touches.length === 2) {
const currentDistance = this.getTouchDistance(e.touches); const center = this.getTouchCenter(e.touches)
const deltaDistance = currentDistance - this.lastTouchDistance; this.transformOriginStyle = `${center.x}px ${center.y}px`;
// 根据触点距离变化和缩放因子计算新的缩放比例
const newScale = this.lastScale + deltaDistance * this.scaleFactor;
this.setScale(newScale, this.getTouchCenter(e.touches)); // 更新缩放同时更新中心点
this.lastTouchDistance = currentDistance;
} else if (this.isDragging && e.touches.length === 1 && this.scale !== 1) {
this.transformOriginStyle = `${this.startX}px ${this.startY}px`;
const newX = e.touches[0].pageX;
const newY = e.touches[0].pageY;
this.moveX = (newX - this.startX) / this.scale;
this.moveY = (newY - this.startY) / this.scale;
// 确保计算基于初始未缩放的触摸点,并考虑当前缩放比例
this.updatePosition();
} }
}, 16), }, 16),
setScale (scale, center) { handleTouchEnd () {
this.scale = Math.min(Math.max(scale, this.scaleMin), this.scaleMax); // 假设最大缩放为10 this.isScaling = false
this.lastScale = this.scale; },
this.$emit('scale', { scale: this.scale }) onScale (e) {
// 更新transform-origin以使缩放围绕两指中心进行 this.scale = e.detail.scale
if (center) this.transformOriginStyle = `${center.x}px ${center.y}px`; this.$emit('scale', e.detail)
this.updatePosition();
}, },
getTouchCenter (touches) { getTouchCenter (touches) {
...@@ -111,28 +89,6 @@ export default { ...@@ -111,28 +89,6 @@ export default {
const centerY = (touches[0].pageY + touches[1].pageY) / 2; const centerY = (touches[0].pageY + touches[1].pageY) / 2;
return { x: centerX, y: centerY }; return { x: centerX, y: centerY };
}, },
handleTouchEnd () {
if (this.disabled) return
this.isScaling = false;
this.isDragging = false;
},
getTouchDistance (touches) {
const dx = touches[1].pageX - touches[0].pageX;
const dy = touches[1].pageY - touches[0].pageY;
return Math.sqrt(dx * dx + dy * dy);
},
async updatePosition () {
// 更新位置并确保内容不超出容器
// 注意:此处需根据实际容器大小和内容尺寸进行调整
this.transformStyle = `translate(${this.moveX}px, ${this.moveY}px) scale(${this.scale})`;
},
getQueryInfo (el) {
return new Promise((resolve, reject) => {
uni.createSelectorQuery().in(this).select(el).boundingClientRect(data => {
resolve(data)
}).exec()
})
}
}, },
}; };
</script> </script>
......
...@@ -9,6 +9,7 @@ export default { ...@@ -9,6 +9,7 @@ export default {
nothing: false, nothing: false,
pageSize: 18, pageSize: 18,
total: 0, total: 0,
isEnd: false
}; };
}, },
mounted () { }, mounted () { },
...@@ -26,6 +27,7 @@ export default { ...@@ -26,6 +27,7 @@ export default {
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
this.flag = true; this.flag = true;
this.isEnd = true
} }
}, },
}, },
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
async init() { async init() {
this.wv = await this.initWebview() this.wv = await this.initWebview()
await this.enQueue() await this.enQueue()
this.polling() this.pollingLater(interval)
}, },
/** /**
* 处理消息函数 * 处理消息函数
...@@ -41,11 +41,23 @@ export default { ...@@ -41,11 +41,23 @@ export default {
const filePathOnServer = data.oss.res.requestUrls[0].split('?')[0] const filePathOnServer = data.oss.res.requestUrls[0].split('?')[0]
this.uploadSuccess(recordId, filePathOnServer, filePathOnClient, fileName) this.uploadSuccess(recordId, filePathOnServer, filePathOnClient, fileName)
} else { } else {
this.reportError(recordId,filePathOnClient)
this.polling() this.polling()
this.$sendSentry(`上传失败:文件名-${fileName} 错误码-${data.oss.res.status},失败原因-${JSON.stringify(data.oss.res)}`); this.$sendSentry(`上传失败:文件名-${fileName} 错误码-${data.oss.res.status},失败原因-${JSON.stringify(data.oss.res)}`);
} }
}, },
/** /**
* 上报文件上传失败日志
*/
reportError(recordId, filePath) {
const { customerName, phoneNumber, carModel, staffName } =
uni.$recordManager.getRecordById(recordId) || {};
const { name } = uni.$storage.get("userInfo");
this.$sendSentry(
`上传失败:文件-${filePath} 手机号-${phoneNumber} 姓名-${customerName} 销售-${staffName} 车型-${carModel} 员工-${name}`
);
},
/**
* 初始化 WebView 的异步函数 * 初始化 WebView 的异步函数
* 这个函数返回一个 Promise,当初始化 WebView 完成时,它将解析为 WebView 对象。 * 这个函数返回一个 Promise,当初始化 WebView 完成时,它将解析为 WebView 对象。
* 在页面初始化调用时,这个函数会延迟 1 秒,以确保 WebView 对象已经创建。 * 在页面初始化调用时,这个函数会延迟 1 秒,以确保 WebView 对象已经创建。
......
...@@ -57,6 +57,18 @@ ...@@ -57,6 +57,18 @@
/> />
</template> </template>
</view> </view>
<template v-if="searchValue">
<view
class="clear"
@click="clear"
>
<uni-icons
type="closeempty"
:size="16"
color="#1A1A1A"
></uni-icons>
</view>
</template>
</view> </view>
</template> </template>
<scroll-view <scroll-view
...@@ -93,16 +105,16 @@ export default { ...@@ -93,16 +105,16 @@ export default {
components: { AccountList, MerchantList, Scene }, components: { AccountList, MerchantList, Scene },
data () { data () {
return { return {
stepList: ['选择帐号', '选择4S店', '选择场景'], stepList: ['选择账号', '选择4S店', '选择场景'],
stepIndex: 0, stepIndex: 0,
searchValue: '', searchValue: '',
edit: false, edit: false,
} }
}, },
onLoad (options) { onLoad (options) {
if(options.stepIndex == 1 ) { if (options.stepIndex == 1) {
this.$nextTick(()=>{ this.$nextTick(() => {
this.$refs.account.getListSelectAccount(true) this.$refs.account.getListSelectAccount(true)
}) })
} }
}, },
...@@ -127,19 +139,24 @@ export default { ...@@ -127,19 +139,24 @@ export default {
}, },
chooseAccount (userInfo) { chooseAccount (userInfo) {
this.stepIndex = 1 this.stepIndex = 1
this.searchValue = ''
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.merchant.init(userInfo) this.$refs.merchant.init(userInfo)
}) })
}, },
chooseMerchant (userInfo) { chooseMerchant (userInfo) {
this.stepIndex = 2 this.stepIndex = 2
this.searchValue = ''
this.$refs.scene.init(userInfo) this.$refs.scene.init(userInfo)
}, },
setStep (index) { setStep (index) {
let { stepIndex } = this let { stepIndex } = this
if (index == 2) return if (index == 2) return
if (stepIndex > index) this.stepIndex = index if (stepIndex > index) this.stepIndex = index
},
clear () {
this.searchValue = ''
this.search()
} }
} }
} }
...@@ -160,7 +177,7 @@ export default { ...@@ -160,7 +177,7 @@ export default {
height: 100%; height: 100%;
left: 0; left: 0;
top: 0; top: 0;
background-image: url("../../assets/images/login/account-bg.webp"); background-image: url('../../assets/images/login/account-bg.webp');
background-size: 100% 100%; background-size: 100% 100%;
} }
.nav-bar { .nav-bar {
...@@ -206,7 +223,7 @@ export default { ...@@ -206,7 +223,7 @@ export default {
bottom: 0; bottom: 0;
right: 0; right: 0;
border: 2rpx solid #b1b1b1; border: 2rpx solid #b1b1b1;
content: ""; content: '';
border-radius: 100%; border-radius: 100%;
} }
.text { .text {
...@@ -246,7 +263,7 @@ export default { ...@@ -246,7 +263,7 @@ export default {
background: #ffffff59; background: #ffffff59;
&::after { &::after {
position: absolute; position: absolute;
content: ""; content: '';
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
...@@ -269,9 +286,9 @@ export default { ...@@ -269,9 +286,9 @@ export default {
border-radius: 16rpx; border-radius: 16rpx;
box-sizing: border-box; box-sizing: border-box;
color: #333; color: #333;
box-sizing: border-box;
padding: 0 24rpx; padding: 0 24rpx;
font-size: 28rpx; font-size: 28rpx;
position: relative;
.input { .input {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -289,12 +306,22 @@ export default { ...@@ -289,12 +306,22 @@ export default {
color: #999999; color: #999999;
} }
} }
.clear {
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
padding: 0 32rpx;
height: 100%;
display: flex;
align-items: center;
}
} }
.list { .list {
position: relative; position: relative;
z-index: 2; z-index: 2;
height: calc(100% - 176rpx); height: calc(100% - 176rpx);
& ::-webkit-scrollbar{ & ::-webkit-scrollbar {
background-color: #ffffff59 !important; background-color: #ffffff59 !important;
} }
& ::-webkit-scrollbar-thumb { & ::-webkit-scrollbar-thumb {
......
...@@ -28,19 +28,19 @@ ...@@ -28,19 +28,19 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<view class="list-not"> <no-data />
暂无内容
</view>
</template> </template>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { loginMixin } from '@/mixin/index' import { loginMixin } from '@/mixin/index'
import NoData from './NoData.vue'
export default { export default {
mixins: [loginMixin], mixins: [loginMixin],
name: '', components: {
NoData
},
data () { data () {
return { return {
copyLoginUserInfoList: [], copyLoginUserInfoList: [],
...@@ -51,7 +51,6 @@ export default { ...@@ -51,7 +51,6 @@ export default {
4: '驻店负责人' 4: '驻店负责人'
}, },
selectedUuid: '', selectedUuid: '',
requestFlag: false,
loginUserInfoList: [], loginUserInfoList: [],
flag: false flag: false
} }
...@@ -118,21 +117,18 @@ export default { ...@@ -118,21 +117,18 @@ export default {
this.selectAccountLogin(id) this.selectAccountLogin(id)
}, },
selectAccountLogin (id) { selectAccountLogin (id) {
if (this.requestFlag) return
this.requestFlag = true
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
uni.$api.userApi.selectAccountLogin({ id }).then(data => { uni.$api.userApi.selectAccountLogin({ id }).then(data => {
uni.hideLoading() uni.hideLoading()
this.requestFlag = false
let [userInfo] = data.loginUserInfoList let [userInfo] = data.loginUserInfoList
if (data && userInfo) this.get4SStoreList(userInfo) if (data && userInfo) this.get4SStoreList(userInfo)
else uni.showToast({ else uni.showToast({
title: '获取4S店列表失败', title: '获取4S店列表失败',
icon: 'none', icon: 'none',
}) })
}).catch(()=>{ }).catch(() => {
uni.hideLoading() uni.hideLoading()
}) })
}, },
...@@ -242,10 +238,5 @@ export default { ...@@ -242,10 +238,5 @@ export default {
.active { .active {
border: 4rpx solid #347bff; border: 4rpx solid #347bff;
} }
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -25,15 +25,15 @@ ...@@ -25,15 +25,15 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<view class="list-not"> <no-data />
暂无内容
</view>
</template> </template>
</template> </template>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import NoData from './NoData.vue'
export default { export default {
name: 'MerchantList', name: 'MerchantList',
data () { data () {
...@@ -47,8 +47,8 @@ export default { ...@@ -47,8 +47,8 @@ export default {
selectMerchantId: '' selectMerchantId: ''
} }
}, },
onLoad () { components: {
NoData
}, },
methods: { methods: {
init (userInfo) { init (userInfo) {
...@@ -196,10 +196,5 @@ export default { ...@@ -196,10 +196,5 @@ export default {
.active { .active {
border: 4rpx solid #347bff; border: 4rpx solid #347bff;
} }
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<view class="list-not">
<image
src="@/assets/images/login/nothing.webp"
class="list-not-img"
/>
暂无内容
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'NoData',
data () {
return {
}
},
mounted () {
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.list-not {
font-size: 28rpx;
color: #999999;
margin: auto;
text-align: center;
&-img {
width: 676rpx;
height: 284rpx;
margin: 192rpx auto 24rpx;
display: block;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
}).then(result => { }).then(result => {
uni.hideLoading() uni.hideLoading()
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || [] this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
}).catch(()=>{ }).catch(() => {
uni.hideLoading() uni.hideLoading()
}) })
}, },
...@@ -81,6 +81,9 @@ export default { ...@@ -81,6 +81,9 @@ export default {
sceneList[index].actived = true sceneList[index].actived = true
this.sceneList = sceneList this.sceneList = sceneList
userInfo.sceneType = sceneType userInfo.sceneType = sceneType
uni.showLoading({
mask: true
})
if (userInfo?.isSuper) this.jump(userInfo) if (userInfo?.isSuper) this.jump(userInfo)
else { else {
try { try {
...@@ -91,6 +94,7 @@ export default { ...@@ -91,6 +94,7 @@ export default {
}) })
if (data) this.jump(userInfo, data) if (data) this.jump(userInfo, data)
} catch (error) { } catch (error) {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: error, title: error,
icon: 'none' icon: 'none'
...@@ -100,6 +104,7 @@ export default { ...@@ -100,6 +104,7 @@ export default {
}, },
jump (userInfo, data) { jump (userInfo, data) {
uni.hideLoading()
if (data) userInfo.loginRoleOnSelectMerchant = data?.loginRoleOnSelectMerchant if (data) userInfo.loginRoleOnSelectMerchant = data?.loginRoleOnSelectMerchant
uni.$storage.set('userInfo', userInfo) uni.$storage.set('userInfo', userInfo)
let url = { let url = {
......
...@@ -3,23 +3,40 @@ ...@@ -3,23 +3,40 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-06-20 11:32:52 * @Date: 2024-06-20 11:32:52
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-07-01 16:41:55 * @LastEditTime: 2024-07-04 16:07:51
--> -->
<template> <template>
<view class="layout" @click.prevent="touch"> <view
<wnCanvas :drawStatus="penSwitch" :canvasId="`c-${madiaId}`" custom @scale="$emit('scale',$event)"> class="layout"
@click.prevent="touch"
>
<wnCanvas
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}`"
custom
@scale="$emit('scale',$event)"
>
<template slot="customContent"> <template slot="customContent">
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
<view class="container"> <view class="container">
<view class="container-left"> <view class="container-left">
<view v-for="(item, index) in views" :key="item.name" class="item" @click.stop="showSection(index)" <view
:class="item.class" :style="item.style"> v-for="(item, index) in views"
:key="item.name"
class="item"
@click.stop="showSection(index)"
:class="item.class"
:style="item.style"
>
<view class="image-container"> <view class="image-container">
<image :src="item.detailUrl" class="item-image" /> <image
:src="item.detailUrl"
class="item-image"
/>
<view class="item-text">{{ item.name }}</view> <view class="item-text">{{ item.name }}</view>
</view> </view>
<view class="details-container"> <view class="details-container">
<view :class="['details-section', itemClass(index)]" > <view :class="['details-section', itemClass(index)]">
<view class="section-title">{{ item.name }}</view> <view class="section-title">{{ item.name }}</view>
<view class="section-description">{{item.description}}</view> <view class="section-description">{{item.description}}</view>
</view> </view>
...@@ -27,18 +44,29 @@ ...@@ -27,18 +44,29 @@
</view> </view>
</view> </view>
<view class="container-right"> <view class="container-right">
<image src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-15.webp" mode="widthFix" <image
class="serice-image" /> src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-15.webp"
mode="widthFix"
class="serice-image"
/>
<view class="ul"> <view class="ul">
<view class="ul-title">高价值零部件</view> <view class="ul-title">高价值零部件</view>
<view class="li-item" v-for="i in ulList" :key="i.index" @click="open(i.flagName)"> <view
class="li-item"
v-for="i in ulList"
:key="i.index"
@click="open(i.flagName)"
>
<view class="li-content"> <view class="li-content">
<view class="li-item-content"> <view class="li-item-content">
<view class="li-number">{{ i.index }}</view>{{ i.name }} <view class="li-number">{{ i.index }}</view>{{ i.name }}
</view> </view>
<image v-if="i.hasArrow" <image
v-if="i.hasArrow"
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp" src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp"
mode="scaleToFill" class="icon-arrow" /> mode="scaleToFill"
class="icon-arrow"
/>
</view> </view>
<view class="li-value">{{ i.value }}</view> <view class="li-value">{{ i.value }}</view>
</view> </view>
...@@ -47,7 +75,11 @@ ...@@ -47,7 +75,11 @@
</view> </view>
</template> </template>
</wnCanvas> </wnCanvas>
<partsPop ref="partsRef" :screenList="screenList"></partsPop> <partsPop
ref="partsRef"
@close="close"
:screenList="screenList"
></partsPop>
</view> </view>
</template> </template>
<script> <script>
...@@ -62,8 +94,8 @@ export default { ...@@ -62,8 +94,8 @@ export default {
ulList: Array, ulList: Array,
screenList: Array screenList: Array
}, },
components: {partsPop}, components: { partsPop },
data() { data () {
return { return {
showIndex: -1, showIndex: -1,
}; };
...@@ -77,14 +109,19 @@ export default { ...@@ -77,14 +109,19 @@ export default {
watchStatus () { watchStatus () {
this.showIndex = -1 this.showIndex = -1
this.$refs.partsRef.close() this.$refs.partsRef.close()
this.$emit('onProductModel', false)
} }
}, },
methods: { methods: {
open(name) { close () {
this.$emit('onProductModel', false)
},
open (name) {
console.log(name); console.log(name);
if (name) this.$refs.partsRef.show(name) if (name) this.$refs.partsRef.show(name)
this.$emit('onProductModel', true)
}, },
showSection(index) { showSection (index) {
console.log(index); console.log(index);
if (this.showIndex === index) { if (this.showIndex === index) {
// 如果当前点击的项已经是翻转状态,则关闭它 // 如果当前点击的项已经是翻转状态,则关闭它
...@@ -94,10 +131,10 @@ export default { ...@@ -94,10 +131,10 @@ export default {
this.showIndex = index; this.showIndex = index;
} }
}, },
touch() { touch () {
this.showIndex = -1; this.showIndex = -1;
}, },
itemClass(index){ itemClass (index) {
return this.showIndex == index ? 'show' : 'hide' return this.showIndex == index ? 'show' : 'hide'
} }
}, },
...@@ -109,7 +146,7 @@ export default { ...@@ -109,7 +146,7 @@ export default {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
position: relative; position: relative;
background-image: url("@/assets/images/media/media-bg.webp"); background-image: url('@/assets/images/media/media-bg.webp');
background-size: 100%; background-size: 100%;
.title { .title {
...@@ -143,7 +180,7 @@ export default { ...@@ -143,7 +180,7 @@ export default {
} }
&::after { &::after {
content: ""; content: '';
display: block; display: block;
clear: both; clear: both;
} }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<scroll-view <scroll-view
class="record-box" class="record-box"
scroll-y scroll-y
:scroll-top="scrollTop"
@scrolltolower="pageonReachBottom" @scrolltolower="pageonReachBottom"
> >
<view class="card-list"> <view class="card-list">
...@@ -27,8 +28,8 @@ ...@@ -27,8 +28,8 @@
<view class="gradient-overlay"></view> <view class="gradient-overlay"></view>
</template> </template>
<view> <view>
<!-- <view class="name">{{ nameHide(item.customerName) }}</view> --> <view class="name">{{ nameHide(item.customerName) }}</view>
<view class="name">{{ item.id }}</view> <!-- <view class="name">{{ item.id }}</view> -->
<view class="goods-name">{{ item.goodsName }}</view> <view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info"> <view class="card-info">
<view class="label">车架号</view> <view class="label">车架号</view>
...@@ -86,18 +87,25 @@ export default { ...@@ -86,18 +87,25 @@ export default {
return { return {
isEnd: false, isEnd: false,
shopMerchantId: '', shopMerchantId: '',
goodsName: null goodsName: null,
scrollTop: 0
} }
}, },
watch: { watch: {
show (n) { show(n) {
console.log('=======', n, this.list)
if (n) this.init() if (n) this.init()
else this.scrollTop = 0
}, },
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler(newval) {
this.pageNum = 1 this.pageNum = 1
this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`) this.scrollTop = 1000
this.list = []
setTimeout(() => {
this.scrollTop = 0
}, 100);
} }
}, },
watchCarModel: { watchCarModel: {
...@@ -109,8 +117,7 @@ export default { ...@@ -109,8 +117,7 @@ export default {
let index = { let index = {
'问界M5': 'M5', '问界M5': 'M5',
'问界M7': 'M7', '问界M7': 'M7',
'问界M9': 'M9', '问界M9': 'M9'
'奥迪RS 3': '测试'
}[newval] }[newval]
return this.goodsName = index || null return this.goodsName = index || null
} }
...@@ -133,6 +140,10 @@ export default { ...@@ -133,6 +140,10 @@ export default {
const { shopMerchantId } = uni.$storage.get("userInfo"); const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId this.shopMerchantId = shopMerchantId
if (this.pageNum == 1) this.getQuotationList(); if (this.pageNum == 1) this.getQuotationList();
if (this.list.length == 0) {
this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`)
this.isEnd = true
}
}, },
async getQuotationList () { async getQuotationList () {
const { goodsName, shopMerchantId, pageNum, pageSize } = this const { goodsName, shopMerchantId, pageNum, pageSize } = this
...@@ -143,9 +154,22 @@ export default { ...@@ -143,9 +154,22 @@ export default {
goodsName, goodsName,
orderStatus: 3, orderStatus: 3,
}) })
if (pageNum == 1) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list) if (pageNum == 1) {
uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
if (goodsName && this.list.length == 0) {
await this.getList('getQuotationList', {
merchantIds: shopMerchantId,
pageNum,
pageSize,
goodsName: null,
orderStatus: 3,
})
}
}
// if (pageNum == 1) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
}, },
pageonReachBottom () { pageonReachBottom() {
this.isEnd = false
let { pageNum, total, isEnd, pageSize } = this let { pageNum, total, isEnd, pageSize } = this
if (!isEnd) isEnd = false if (!isEnd) isEnd = false
if (Math.ceil(total / pageSize) > pageNum) { if (Math.ceil(total / pageSize) > pageNum) {
...@@ -206,10 +230,12 @@ export default { ...@@ -206,10 +230,12 @@ export default {
box-shadow: inset 0 0 16rpx 0 #ffffff; box-shadow: inset 0 0 16rpx 0 #ffffff;
z-index: 11; z-index: 11;
padding: 32rpx; padding: 32rpx;
width: 708rpx;
.name { .name {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #292d33; color: #292d33;
line-height: 44rpx;
} }
.goods-name { .goods-name {
margin-top: 12rpx; margin-top: 12rpx;
...@@ -217,11 +243,18 @@ export default { ...@@ -217,11 +243,18 @@ export default {
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 32rpx;
color: #2c66f7; color: #2c66f7;
width: 644rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
line-height: 44rpx;
} }
.card-info { .card-info {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 12rpx; margin-top: 12rpx;
line-height: 36rpx;
font-size: 24rpx;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
...@@ -260,7 +293,7 @@ export default { ...@@ -260,7 +293,7 @@ export default {
top: 0; top: 0;
right: 0; right: 0;
width: 252rpx; width: 252rpx;
height: 372rpx; height: 364rpx;
background: linear-gradient( background: linear-gradient(
to left, to left,
rgba(247, 249, 255, 0) 0%, rgba(247, 249, 255, 0) 0%,
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<image <image
@click="close" @click="close"
class="icon-close" class="icon-close"
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-close.webp" src="https://img01.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-close.webp"
/> />
</uni-popup> </uni-popup>
</template> </template>
...@@ -48,6 +48,7 @@ export default { ...@@ -48,6 +48,7 @@ export default {
}, },
close() { close() {
this.$refs.partsRef.close(); this.$refs.partsRef.close();
this.$emit('close')
} }
} }
} }
...@@ -97,8 +98,10 @@ export default { ...@@ -97,8 +98,10 @@ export default {
} }
.icon-close { .icon-close {
position: absolute; position: absolute;
bottom: -140rpx; top: 40rpx;
left: 50%; right: 16rpx;
// bottom: -140rpx;
// left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-06-24 16:35:00 * @Date: 2024-06-24 16:35:00
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-07-01 17:55:39 * @LastEditTime: 2024-07-04 16:02:54
--> -->
<template> <template>
<view class="layout"> <view class="layout">
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
:canvasId="`c-${madiaId}`" :canvasId="`c-${madiaId}`"
custom custom
@scale="$emit('scale',$event)" @scale="$emit('scale',$event)"
ref="threeGuarantees"
> >
<template slot="customContent"> <template slot="customContent">
<view class="title">{{title}}</view> <view class="title">{{title}}</view>
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
:class="[item.id == activeIndex ? 'active' : '']" :class="[item.id == activeIndex ? 'active' : '']"
>{{item.name}}</view> >{{item.name}}</view>
</view> </view>
<div class="content-bg"></div>
<view class="content"> <view class="content">
<template v-if="activeIndex == 2"> <template v-if="activeIndex == 2">
<image <image
...@@ -119,11 +121,13 @@ export default { ...@@ -119,11 +121,13 @@ export default {
this.direction = id > this.activeIndex ? 'bottom' : 'top' this.direction = id > this.activeIndex ? 'bottom' : 'top'
this.activeIndex = id this.activeIndex = id
this.imgKey = Date.now() this.imgKey = Date.now()
this.$refs.threeGuarantees.clearBoard()
}, },
tabSwitch (val) { tabSwitch (val) {
console.log(val) console.log(val)
if (val == this.tabIndex) return if (val == this.tabIndex) return
this.tabIndex = val this.tabIndex = val
this.$refs.threeGuarantees.clearBoard()
}, },
viewsImg () { viewsImg () {
let { activeIndex, tabIndex } = this let { activeIndex, tabIndex } = this
...@@ -162,6 +166,7 @@ export default { ...@@ -162,6 +166,7 @@ export default {
padding-bottom: 96rpx; padding-bottom: 96rpx;
height: 100%; height: 100%;
margin: 0 80rpx; margin: 0 80rpx;
position: relative;
.left-tab { .left-tab {
width: 360rpx; width: 360rpx;
margin-right: 48rpx; margin-right: 48rpx;
...@@ -191,11 +196,18 @@ export default { ...@@ -191,11 +196,18 @@ export default {
} }
} }
} }
.content { .content-bg {
position: absolute;
right: 0;
z-index: -1;
width: 1778rpx;
height: 1192rpx;
background-color: rgba(255, 255, 255, 0.4); background-color: rgba(255, 255, 255, 0.4);
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
z-index: 1; z-index: 0;
border-radius: 64rpx; border-radius: 64rpx;
}
.content {
position: relative; position: relative;
&-tab { &-tab {
display: flex; display: flex;
...@@ -221,6 +233,7 @@ export default { ...@@ -221,6 +233,7 @@ export default {
right: 0; right: 0;
width: 952rpx; width: 952rpx;
height: 248rpx; height: 248rpx;
z-index: -1;
} }
} }
.top { .top {
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
@scale="scale" @scale="scale"
:ulList="item.ulList" :ulList="item.ulList"
:screenList="item.screenList" :screenList="item.screenList"
@onProductModel="productModelStatus = $event"
/> />
</view> </view>
</template> </template>
...@@ -115,7 +116,8 @@ export default { ...@@ -115,7 +116,8 @@ export default {
startY: null, startY: null,
screenWidth: null, screenWidth: null,
scaleValueObject: {}, scaleValueObject: {},
showPayPage: false showPayPage: false,
productModelStatus: false
}; };
}, },
computed: { computed: {
...@@ -180,7 +182,7 @@ export default { ...@@ -180,7 +182,7 @@ export default {
}, },
touchEnd (e) { touchEnd (e) {
try { try {
let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject } = this let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this
if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return
let halfScreenWidth = screenWidth / 2, let halfScreenWidth = screenWidth / 2,
touch = e.changedTouches[0], touch = e.changedTouches[0],
...@@ -188,7 +190,7 @@ export default { ...@@ -188,7 +190,7 @@ export default {
index = toolList.findIndex(item => item.id == id) index = toolList.findIndex(item => item.id == id)
if (Math.abs(this.startY - touch.pageY) > 100) return 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) { if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
const nextId = this.getNextId(index, toolList, startX, halfScreenWidth) const nextId = this.getNextId(index, toolList, startX, halfScreenWidth)
this.$emit('update:id', nextId) this.$emit('update:id', nextId)
} }
......
...@@ -47,10 +47,10 @@ ...@@ -47,10 +47,10 @@
/> />
</template> </template>
<template slot="content"> <template slot="content">
<novice-guide <!-- <novice-guide
@nextStep="nextStep" @nextStep="nextStep"
@back="back" @back="back"
/> /> -->
</template> </template>
</home-frame> </home-frame>
<!-- <!--
...@@ -97,6 +97,7 @@ export default { ...@@ -97,6 +97,7 @@ export default {
const mock_data = uni.$storage.get("mock_data") || {}; const mock_data = uni.$storage.get("mock_data") || {};
this.moduleList = mock_data.moduleList || []; this.moduleList = mock_data.moduleList || [];
this.toolList = mock_data.toolList || []; this.toolList = mock_data.toolList || [];
this.getSoure();
this.get_Vehicle_Sales_Data(); this.get_Vehicle_Sales_Data();
}, },
onShow () { onShow () {
...@@ -114,7 +115,6 @@ export default { ...@@ -114,7 +115,6 @@ export default {
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
init () { init () {
this.getSoure();
this.findPayInfo(); this.findPayInfo();
}, },
/**获取车型&销售数据 */ /**获取车型&销售数据 */
...@@ -212,6 +212,7 @@ export default { ...@@ -212,6 +212,7 @@ export default {
}); });
return; return;
} }
this.getSoure();
this.clearHistory(); this.clearHistory();
this.$refs.home.startAudio(); this.$refs.home.startAudio();
this.id = this.moduleList[0].id; this.id = this.moduleList[0].id;
...@@ -309,7 +310,7 @@ export default { ...@@ -309,7 +310,7 @@ export default {
.module-box { .module-box {
padding-top: 44rpx; padding-top: 44rpx;
&::after { &::after {
content: ""; content: '';
display: block; display: block;
clear: both; clear: both;
} }
......
...@@ -150,6 +150,9 @@ class RecordManager { ...@@ -150,6 +150,9 @@ class RecordManager {
let path = await utils.getFileSaveFolderOnClient() let path = await utils.getFileSaveFolderOnClient()
try { try {
let records = this.getRecords() let records = this.getRecords()
if(typeof records === 'string') {
records = JSON.parse(records)
}
records.forEach(i => { records.forEach(i => {
if (i.recordUrlList && i.recordUrlList.length) { if (i.recordUrlList && i.recordUrlList.length) {
i.recordUrlList.forEach(async j => { i.recordUrlList.forEach(async j => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!