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
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
> >
<canvas <canvas
class="board-canvas" class="board-canvas"
canvas-id="drawCanvas" :canvas-id="canvasId"
disable-scroll="true" disable-scroll="true"
@touchstart="touchStart" @touchstart="touchStart"
@touchmove="touchMove" @touchmove="touchMove"
...@@ -215,10 +215,14 @@ export default { ...@@ -215,10 +215,14 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
drawStatus: Boolean drawStatus: Boolean,
canvasId: {
type: String,
default: 'drawCanvas'
}
}, },
mounted (opt) { mounted (opt) {
this.drawContext = uni.createCanvasContext('drawCanvas', this); this.drawContext = uni.createCanvasContext(this.canvasId, this);
this.initBoard(); this.initBoard();
}, },
methods: { methods: {
...@@ -248,7 +252,7 @@ export default { ...@@ -248,7 +252,7 @@ export default {
this.colorShowHandel() this.colorShowHandel()
} }
if(item.key == 'line'){ if (item.key == 'line') {
this.showPenBox = !this.showPenBox this.showPenBox = !this.showPenBox
} }
if (item.key == "download") { if (item.key == "download") {
...@@ -695,7 +699,7 @@ export default { ...@@ -695,7 +699,7 @@ export default {
} }
if (this.saveImageType == 2 || this.saveImageType == 3) { if (this.saveImageType == 2 || this.saveImageType == 3) {
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
canvasId: 'drawCanvas', canvasId: this.canvasId,
success: function (res) { success: function (res) {
console.log('回调参数:' + JSON.stringify(res)); console.log('回调参数:' + JSON.stringify(res));
// 在H5平台下,tempFilePath 为 base64 // 在H5平台下,tempFilePath 为 base64
...@@ -721,7 +725,7 @@ export default { ...@@ -721,7 +725,7 @@ export default {
that.saveImageUrl() that.saveImageUrl()
} else { } else {
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
canvasId: 'drawCanvas', canvasId: this.canvasId,
success: function (res) { success: function (res) {
console.log(res); console.log(res);
that.$emit("saveImage", res.tempFilePath) that.$emit("saveImage", res.tempFilePath)
...@@ -741,7 +745,7 @@ export default { ...@@ -741,7 +745,7 @@ export default {
this.drawContext.draw(); this.drawContext.draw();
this.drawHistory() this.drawHistory()
uni.canvasToTempFilePath({ uni.canvasToTempFilePath({
canvasId: 'drawCanvas', canvasId: this.canvasId,
success: function (res) { success: function (res) {
that.$emit("saveImage", res.tempFilePath) that.$emit("saveImage", res.tempFilePath)
} }
......
<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"; ...@@ -5,9 +5,11 @@ import store from "@/store";
import api from "./api/index"; import api from "./api/index";
import { Storage } from "./utils/cache/index"; import { Storage } from "./utils/cache/index";
import GlsxImage from "./components/GlsxImage"; import GlsxImage from "./components/GlsxImage";
import wnCanvas from './components/Canvas/wn-canvas' import MessageBox from "./components/MessageBox/index";
Vue.component("GlsxImage", GlsxImage); 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.$api = api;
uni.$storage = new Storage(); uni.$storage = new Storage();
Vue.config.productionTip = false; Vue.config.productionTip = false;
......
...@@ -20,7 +20,13 @@ ...@@ -20,7 +20,13 @@
/> />
</template> </template>
<template> <template>
<view class="select">
<uni-icons
class="arrow"
type="down"
:size="16"
></uni-icons>
</view>
</template> </template>
</view> </view>
</view> </view>
...@@ -35,6 +41,7 @@ ...@@ -35,6 +41,7 @@
saveImageType="3" saveImageType="3"
:drawImage="i.detailUrl" :drawImage="i.detailUrl"
:isUnderBkg="true" :isUnderBkg="true"
:canvasId="`c-1-${index}`"
drawStatus drawStatus
></wnCanvas> ></wnCanvas>
</view> </view>
...@@ -44,9 +51,7 @@ ...@@ -44,9 +51,7 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import Tabs from './Tabs.vue'
export default { export default {
components: { Tabs },
props: { props: {
views: Array views: Array
}, },
...@@ -84,9 +89,7 @@ export default { ...@@ -84,9 +89,7 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
changeView (index) {
},
} }
} }
</script> </script>
...@@ -100,8 +103,7 @@ export default { ...@@ -100,8 +103,7 @@ export default {
left: 0; left: 0;
top: 0; top: 0;
width: 100%; width: 100%;
height: 864rpx; height: 432rpx;
background-color: #096;
} }
.content { .content {
border-radius: 40rpx 40rpx 0 0; border-radius: 40rpx 40rpx 0 0;
...@@ -116,15 +118,43 @@ export default { ...@@ -116,15 +118,43 @@ export default {
padding: 32rpx 0; padding: 32rpx 0;
text-align: center; text-align: center;
} }
.form{ .form {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 28rpx 0; gap: 28rpx 0;
&-item{ &-item {
flex: 50%; flex: 50%;
display: flex; display: flex;
align-items: center; 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 \ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
:key="index" :key="index"
@click="tabClick(index)" @click="tabClick(index)"
> >
{{item}} {{item.tabName}}
</view> </view>
</template> </template>
</view> </view>
...@@ -27,6 +27,7 @@ export default { ...@@ -27,6 +27,7 @@ export default {
}, },
methods: { methods: {
tabClick (index) { tabClick (index) {
this.tabIndex = index
this.$emit('tabclick', index) this.$emit('tabclick', index)
} }
} }
......
...@@ -3,12 +3,19 @@ ...@@ -3,12 +3,19 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-09 14:15:11 * @LastEditTime: 2024-04-09 14:48:03
--> -->
<template> <template>
<view class="detail-box"> <view class="detail-box">
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="back"> <view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="32"
></uni-icons>
</view> </view>
</view> </view>
<tool-box <tool-box
...@@ -16,8 +23,15 @@ ...@@ -16,8 +23,15 @@
@choose="choose" @choose="choose"
@finish="open" @finish="open"
/> />
<!-- <media_1 :views="mediaList" /> --> <view :class="['view',{showView:id == 1}]">
<History></History> <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> <pay-pop ref="pay"></pay-pop>
</view> </view>
</template> </template>
...@@ -27,8 +41,9 @@ import ToolBox from './components/ToolBox.vue' ...@@ -27,8 +41,9 @@ import ToolBox from './components/ToolBox.vue'
import myClick from "@/mixin/click"; import myClick from "@/mixin/click";
import History from './components/History.vue'; import History from './components/History.vue';
import Media_1 from './components/Media_1.vue' import Media_1 from './components/Media_1.vue'
import Media_2 from './components/Media_2.vue'
export default { export default {
components: { ToolBox, payPop, Media_1, History }, components: { ToolBox, payPop, Media_1, Media_2, History },
mixins: [myClick], mixins: [myClick],
data () { data () {
return { return {
...@@ -57,21 +72,24 @@ export default { ...@@ -57,21 +72,24 @@ export default {
} }
}, },
back(){ back () {
uni.navigateBack() uni.navigateBack()
} }
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.nav-bar{ .detail-box{
position: relative;
}
.nav-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 96rpx; height: 96rpx;
left: 0; left: 0;
top: 48rpx; top: 48rpx;
z-index: 2; z-index: 9;
.back{ .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
display: flex; display: flex;
...@@ -79,4 +97,17 @@ export default { ...@@ -79,4 +97,17 @@ export default {
justify-content: center; 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> </style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-04-07 14:39:40 * @Date: 2024-04-07 14:39:40
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-09 14:28:56 * @LastEditTime: 2024-04-09 14:48:46
--> -->
<template> <template>
<view class="container"> <view class="container">
...@@ -61,28 +61,13 @@ ...@@ -61,28 +61,13 @@
</view> </view>
</view> </view>
<!-- 未点击开始接待,弹窗 --> <!-- 未点击开始接待,弹窗 -->
<uni-popup <MessageBox
ref="tips" v-if="messageBoxVisible"
type="center" @cancel="cancel"
:is-mask-click="false" @confirm="preview"
:animation="false" content="直接点击素材可进行预览,若面向车辆主展示,请点击页面下方的「开始接待」"
> confirmBtnText="预览"
<view class="tips-wrapper"> ></MessageBox>
<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>
</view> </view>
</view> </view>
</template> </template>
...@@ -92,6 +77,7 @@ export default { ...@@ -92,6 +77,7 @@ export default {
mixins: [myClick], mixins: [myClick],
data() { data() {
return { return {
messageBoxVisible: false,
moduleList: [ moduleList: [
// { // {
// id: 1, // id: 1,
...@@ -103,7 +89,7 @@ export default { ...@@ -103,7 +89,7 @@ export default {
// }, // },
], ],
userInfo: {}, userInfo: {},
id:'' id: "",
}; };
}, },
mounted() { mounted() {
...@@ -123,8 +109,8 @@ export default { ...@@ -123,8 +109,8 @@ export default {
}, },
// 退出 // 退出
logout() { logout() {
uni.$storage.rm('userInfo') uni.$storage.rm("userInfo");
uni.$storage.rm('sessionId') uni.$storage.rm("sessionId");
this.stopAudio(); this.stopAudio();
uni.reLaunch({ uni.reLaunch({
url: "/pages/common/login", url: "/pages/common/login",
...@@ -136,19 +122,19 @@ export default { ...@@ -136,19 +122,19 @@ export default {
url: `../detail/detail?id=${item.id}&type=edit`, url: `../detail/detail?id=${item.id}&type=edit`,
}); });
} else { } else {
this.id = item.id this.id = item.id;
this.$refs.tips.open("center"); this.messageBoxVisible = true;
} }
}, },
close() { cancel() {
this.$refs.tips.close(); this.messageBoxVisible = false;
}, },
preview() { preview() {
let {id} = this let { id } = this;
uni.navigateTo({ uni.navigateTo({
url: `../detail/detail?type=preview&id=${id}`, 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!