Commit ef18eef2 by 胡悦

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

2 parents d112cf4b 696bcb40
<template>
<view class="content">
<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>
<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"
......@@ -64,7 +64,7 @@
>
<canvas
class="board-canvas"
canvas-id="drawCanvas"
:canvas-id="canvasId"
disable-scroll="true"
@touchstart="touchStart"
@touchmove="touchMove"
......@@ -194,7 +194,7 @@ export default {
toolsShow: true,
isLandScape: false, //是否横屏
aspectRatio: 1,//图片宽高比
showPenBox: false
showPenBox: false
};
},
......@@ -215,10 +215,14 @@ export default {
type: Boolean,
default: false
},
drawStatus: Boolean
drawStatus: Boolean,
canvasId: {
type: String,
default: 'drawCanvas'
}
},
mounted (opt) {
this.drawContext = uni.createCanvasContext('drawCanvas', this);
this.drawContext = uni.createCanvasContext(this.canvasId, this);
this.initBoard();
},
methods: {
......@@ -248,9 +252,9 @@ export default {
this.colorShowHandel()
}
if(item.key == 'line'){
this.showPenBox = !this.showPenBox
}
if (item.key == 'line') {
this.showPenBox = !this.showPenBox
}
if (item.key == "download") {
//下载
this.downloadHandle()
......@@ -695,7 +699,7 @@ export default {
}
if (this.saveImageType == 2 || this.saveImageType == 3) {
uni.canvasToTempFilePath({
canvasId: 'drawCanvas',
canvasId: this.canvasId,
success: function (res) {
console.log('回调参数:' + JSON.stringify(res));
// 在H5平台下,tempFilePath 为 base64
......@@ -721,7 +725,7 @@ export default {
that.saveImageUrl()
} else {
uni.canvasToTempFilePath({
canvasId: 'drawCanvas',
canvasId: this.canvasId,
success: function (res) {
console.log(res);
that.$emit("saveImage", res.tempFilePath)
......@@ -741,7 +745,7 @@ export default {
this.drawContext.draw();
this.drawHistory()
uni.canvasToTempFilePath({
canvasId: 'drawCanvas',
canvasId: this.canvasId,
success: function (res) {
that.$emit("saveImage", res.tempFilePath)
}
......@@ -812,7 +816,7 @@ export default {
this.drawContext.setLineWidth(this.lineWidth); //设置画笔粗细
//设置背景
this.$nextTick(() => {
this.penWidthChange()
this.penWidthChange()
this.fillBackground();
})
}
......@@ -838,16 +842,16 @@ export default {
}
.pen-box {
position: absolute;
top: 0;
left: 0;
background-color: #fff;
position: absolute;
top: 0;
left: 0;
background-color: #fff;
display: flex;
justify-content: space-around;
align-items: center;
height: 3rem;
z-index: 2;
width: 100%;
z-index: 2;
width: 100%;
.pen {
width: 3rem;
border-radius: 0.2rem;
......
<template>
<uni-popup ref="tips" type="center" :is-mask-click="false" :animation="false">
<view class="tips-wrapper">
<view class="tips-content">
<view class="tips-title"
>{{ title }}
<view class="icon-close" @click="close">×</view>
</view>
<view class="tips-text">{{ content }}</view>
</view>
<view class="tips-footer">
<view class="tips-btn close" @click="close()">{{ cancelBtnText }}</view>
<view class="tips-btn preview" @click="confirm()">{{
confirmBtnText
}}</view>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
name: "MessageBox",
data() {
return {};
},
props: {
title: {
type: String,
default: "提示",
},
content: {
type: String,
default: "提示",
},
confirmBtnText: {
type: String,
default: "确定",
},
cancelBtnText: {
type: String,
default: "取消",
},
},
mounted() {
this.$refs.tips.open("center");
},
methods: {
close() {
this.$refs.tips.close();
this.$emit("cancel");
},
confirm() {
this.$refs.tips.close();
this.$emit("confirm");
},
},
};
</script>
<style scoped lang="scss">
.tips-wrapper {
width: 704rpx;
height: 372rpx;
background: #ffffff;
border-radius: 20rpx;
.tips-content {
padding: 48rpx;
border-bottom: 1px solid #e8e8e8;
.tips-title {
position: relative;
width: 100%;
font-weight: 500;
font-size: 32rpx;
color: #292d33;
text-align: center;
.icon-close {
position: absolute;
right: 0;
top: -24rpx;
width: 160rpx;
font-size: 50rpx;
text-align: right;
padding-right: 20rpx;
line-height: 96rpx;
}
}
}
.tips-text {
font-size: 30rpx;
color: #5a5e66;
letter-spacing: 1rpx;
text-align: center;
line-height: 40rpx;
margin-top: 48rpx;
}
.tips-footer {
display: flex;
align-items: center;
justify-content: center;
height: 100rpx;
.close {
color: #6c6c70;
}
.preview {
color: #2c66f7;
}
}
.tips-btn {
width: 50%;
text-align: center;
font-size: 32rpx;
text-align: center;
line-height: 44rpx;
}
}
</style>
......@@ -5,9 +5,11 @@ import store from "@/store";
import api from "./api/index";
import { Storage } from "./utils/cache/index";
import GlsxImage from "./components/GlsxImage";
import wnCanvas from './components/Canvas/wn-canvas'
import MessageBox from "./components/MessageBox/index";
Vue.component("GlsxImage", GlsxImage);
Vue.component('wnCanvas', wnCanvas)
Vue.component("MessageBox", MessageBox);
import wnCanvas from "./components/Canvas/wn-canvas";
Vue.component("wnCanvas", wnCanvas);
uni.$api = api;
uni.$storage = new Storage();
Vue.config.productionTip = false;
......
......@@ -20,7 +20,13 @@
/>
</template>
<template>
<view class="select">
<uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
</view>
</template>
</view>
</view>
......@@ -35,6 +41,7 @@
saveImageType="3"
:drawImage="i.detailUrl"
:isUnderBkg="true"
:canvasId="`c-1-${index}`"
drawStatus
></wnCanvas>
</view>
......@@ -44,9 +51,7 @@
</template>
<script type='text/ecmascript-6'>
import Tabs from './Tabs.vue'
export default {
components: { Tabs },
props: {
views: Array
},
......@@ -84,9 +89,7 @@ export default {
mounted () {
},
methods: {
changeView (index) {
},
}
}
</script>
......@@ -100,8 +103,7 @@ export default {
left: 0;
top: 0;
width: 100%;
height: 864rpx;
background-color: #096;
height: 432rpx;
}
.content {
border-radius: 40rpx 40rpx 0 0;
......@@ -116,15 +118,43 @@ export default {
padding: 32rpx 0;
text-align: center;
}
.form{
.form {
display: flex;
flex-wrap: wrap;
gap: 28rpx 0;
&-item{
&-item {
flex: 50%;
display: flex;
align-items: center;
.value{}
color: #292d33;
font-size: 32rpx;
box-sizing: border-box;
padding-right: 64rpx;
.label {
margin-left: auto;
flex-shrink: 0;
}
.value {
width: 828rpx;
height: 80rpx;
border: 2rpx solid #e8e8ea;
background: #ffffff;
margin-left: 32rpx;
box-sizing: border-box;
padding: 0 40rpx;
input,
.select {
width: 100%;
height: 100%;
}
.select {
display: flex;
align-items: center;
.arrow{
margin-left: auto;
}
}
}
}
}
}
......
<template>
<view class="layout">
<view class="bg">
<glsx-image src="media/bg-2.png" />
</view>
<view class="content">
<view class="title">问界·商城延保价格明细</view>
<tabs :list="views" />
<view class="canvas-box">
<template v-for="(i,index) in views">
<view
class="canvas-view"
:key="index"
>
<wnCanvas
saveImageType="3"
:drawImage="i.detailUrl"
:isUnderBkg="true"
drawStatus
:canvasId="`c-2-${index}`"
></wnCanvas>
</view>
</template>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import Tabs from './Tabs.vue'
export default {
components: { Tabs },
props: {
views: Array
},
name: 'Media_2',
data () {
return {
viewIndex: 0
}
},
mounted () {
},
methods: {
changeView (index) {
this.viewIndex = index
},
}
}
</script>
<style scoped lang='scss'>
.layout {
padding-top: 272rpx;
position: relative;
.bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 432rpx;
}
.content {
border-radius: 40rpx 40rpx 0 0;
background: linear-gradient(180deg, #f7f9fc 0%, #f7f9fc 100%);
overflow: hidden;
position: relative;
z-index: 1;
.title {
font-weight: 500;
font-size: 48rpx;
color: #1a1a1a;
padding: 32rpx 0;
text-align: center;
}
.canvas-box{
display: flex;
}
.canvas-view {
}
}
}
</style>
\ No newline at end of file
......@@ -6,7 +6,7 @@
:key="index"
@click="tabClick(index)"
>
{{item}}
{{item.tabName}}
</view>
</template>
</view>
......@@ -27,6 +27,7 @@ export default {
},
methods: {
tabClick (index) {
this.tabIndex = index
this.$emit('tabclick', index)
}
}
......
......@@ -3,12 +3,19 @@
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 14:15:11
* @LastEditTime: 2024-04-09 14:48:03
-->
<template>
<view class="detail-box">
<view class="nav-bar">
<view class="back" @click="back">
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="32"
></uni-icons>
</view>
</view>
<tool-box
......@@ -16,8 +23,15 @@
@choose="choose"
@finish="open"
/>
<!-- <media_1 :views="mediaList" /> -->
<History></History>
<view :class="['view',{showView:id == 1}]">
<media_1 :views="mediaList" />
</view>
<view :class="['view',{showView:id == 2}]">
<media_2 :views="mediaList" />
</view>
<view :class="['view',{showView:id == 6}]">
<History :views="mediaList" />
</view>
<pay-pop ref="pay"></pay-pop>
</view>
</template>
......@@ -27,8 +41,9 @@ import ToolBox from './components/ToolBox.vue'
import myClick from "@/mixin/click";
import History from './components/History.vue';
import Media_1 from './components/Media_1.vue'
import Media_2 from './components/Media_2.vue'
export default {
components: { ToolBox, payPop, Media_1, History },
components: { ToolBox, payPop, Media_1, Media_2, History },
mixins: [myClick],
data () {
return {
......@@ -57,21 +72,24 @@ export default {
}
},
back(){
back () {
uni.navigateBack()
}
},
};
</script>
<style scoped lang="scss">
.nav-bar{
.detail-box{
position: relative;
}
.nav-bar {
position: fixed;
width: 100%;
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 2;
.back{
z-index: 9;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
......@@ -79,4 +97,17 @@ export default {
justify-content: center;
}
}
.view {
position: absolute;
z-index: -1;
opacity: 0;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.showView {
z-index: 2;
opacity: 1;
}
</style>
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2024-04-07 14:39:40
* @LastEditors: huyue
* @LastEditTime: 2024-04-09 14:28:56
* @LastEditTime: 2024-04-09 14:48:46
-->
<template>
<view class="container">
......@@ -61,28 +61,13 @@
</view>
</view>
<!-- 未点击开始接待,弹窗 -->
<uni-popup
ref="tips"
type="center"
:is-mask-click="false"
:animation="false"
>
<view class="tips-wrapper">
<view class="tips-content">
<view class="tips-title"
>提示
<view class="icon-close" @click="close">×</view>
</view>
<view class="tips-text"
>直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」</view
>
</view>
<view class="tips-footer">
<view class="tips-btn close" @click="close()">取消</view>
<view class="tips-btn preview" @click="preview()">预览素材</view>
</view>
</view>
</uni-popup>
<MessageBox
v-if="messageBoxVisible"
@cancel="cancel"
@confirm="preview"
content="直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」"
confirmBtnText="预览"
></MessageBox>
</view>
</view>
</template>
......@@ -92,6 +77,7 @@ export default {
mixins: [myClick],
data() {
return {
messageBoxVisible: false,
moduleList: [
// {
// id: 1,
......@@ -103,7 +89,7 @@ export default {
// },
],
userInfo: {},
id:''
id: "",
};
},
mounted() {
......@@ -123,8 +109,8 @@ export default {
},
// 退出
logout() {
uni.$storage.rm('userInfo')
uni.$storage.rm('sessionId')
uni.$storage.rm("userInfo");
uni.$storage.rm("sessionId");
this.stopAudio();
uni.reLaunch({
url: "/pages/common/login",
......@@ -136,19 +122,19 @@ export default {
url: `../detail/detail?id=${item.id}&type=edit`,
});
} else {
this.id = item.id
this.$refs.tips.open("center");
this.id = item.id;
this.messageBoxVisible = true;
}
},
close() {
this.$refs.tips.close();
cancel() {
this.messageBoxVisible = false;
},
preview() {
let {id} = this
let { id } = this;
uni.navigateTo({
url: `../detail/detail?type=preview&id=${id}`,
});
this.close()
this.messageBoxVisible = false;
},
},
};
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!