This commit is contained in:
X1627315083
2024-09-30 17:59:24 +08:00
parent d661159c8a
commit 02fe8147c9
17 changed files with 92 additions and 26 deletions

View File

@@ -6,7 +6,7 @@ NODE_ENV = 'development'
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
# VUE_APP_BASE_URL = 'https://www.api.aida.com.hk'
# 佩佩
VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
# 海波
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'

View File

@@ -90,6 +90,9 @@ export default defineComponent({
let allRead = ()=>{
// emit('setAllmessage')
prop.setAllmessage().then(()=>{
accountMessage.dataList.forEach((item:any)=>{
item.isRead = 1
})
}).catch((err:any)=>{
})
}

View File

@@ -88,6 +88,9 @@ export default defineComponent({
let allRead = ()=>{
// emit('setAllmessage')
prop.setAllmessage().then(()=>{
accountMessage.dataList.forEach((item:any)=>{
item.isRead = 1
})
}).catch((err:any)=>{
})
}

View File

@@ -87,6 +87,9 @@ export default defineComponent({
let allRead = ()=>{
// emit('setAllmessage')
prop.setAllmessage().then(()=>{
accountMessage.dataList.forEach((item:any)=>{
item.isRead = 1
})
}).catch((err:any)=>{
})
}

View File

@@ -80,6 +80,9 @@ export default defineComponent({
let allRead = ()=>{
// emit('setAllmessage')
prop.setAllmessage().then(()=>{
accountMessage.dataList.forEach((item:any)=>{
item.isRead = 1
})
}).catch((err:any)=>{
})
}

View File

@@ -678,6 +678,10 @@ export default defineComponent({
<style lang="less">
.designElements_modal {
// max-width: 1440px;
user-select: none; /* 对现代浏览器有效 */
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
.mark_loading{
position: absolute;
}
@@ -891,8 +895,8 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: calc(1rem*1.2);
height: calc(1rem*1.2);
width: calc(2rem*1.2);
height: calc(2rem*1.2);
background-color: rgb(20, 188, 255);
position: absolute;
pointer-events: none;

View File

@@ -939,6 +939,10 @@ export default defineComponent({
<style lang="less">
.designOpenrtion_modal {
// max-width: 1440px;
user-select: none; /* 对现代浏览器有效 */
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
.mark_loading{
position: absolute;
}
@@ -1232,8 +1236,8 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: calc(1rem*1.2);
height: calc(1rem*1.2);
width: calc(2rem*1.2);
height: calc(2rem*1.2);
background-color: rgb(20, 188, 255);
position: absolute;
pointer-events: none;

View File

@@ -9,8 +9,8 @@
<!-- <i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:canvasState == 'move'}"></i> -->
<i class="icon iconfont icon-bianji" @click="setOperation('pencil')" :class="{active:canvasState == 'pencil'}"></i>
<!-- <i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:canvasState == 'eraser'}"></i> -->
<div class="editFrontBack_center_btn_colorRed" @click="setOperationColor('rgb(255,0,0)')" :class="{active:rgba == 'rgb(255,0,0)'}" title="front">front</div>
<div class="editFrontBack_center_btn_colorGreen" @click="setOperationColor('rgb(0,255,0)')" :class="{active:rgba == 'rgb(0,255,0)'}" title="back">back</div>
<div class="editFrontBack_center_btn_colorRed" @click="setOperationColor('rgb(255,0,0)')" :class="{active:(canvasState != 'eraser' && rgba == 'rgb(255,0,0)')}" title="front">front</div>
<div class="editFrontBack_center_btn_colorGreen" @click="setOperationColor('rgb(0,255,0)')" :class="{active:(canvasState != 'eraser' && rgba == 'rgb(0,255,0)')}" title="back">back</div>
<div class="editFrontBack_center_btn_colorWhite" @click="setOperation('eraser')" :class="{active:canvasState == 'eraser'}" title="background">background</div>
<input type="range" v-show="canvasState != 'move'" @input="setPencilWidth" min="1" max="50" v-model="canvasPencilWidth[canvasState]">
<!-- <div class="icon iconfont icon-xiala" :class="{btnRotate:spreadState}" @click="()=>spreadState = !spreadState"></div> -->
@@ -131,12 +131,7 @@ export default defineComponent({
zoom *= 0.999 ** delta
if (zoom > 20) zoom = 20
if (zoom < 0.01) zoom = 0.01
// 以左上角为原点
// this.canvas.setZoom(zoom)
// 以鼠标所在位置为原点缩放
console.log(zoom);
// console.log(zoom);
canvas.zoomToPoint(
{ // 关键点
x: opt.e.offsetX,

View File

@@ -549,6 +549,10 @@ export default defineComponent({
<style lang="less" scoped>
.designOpenrtion_modal {
// max-width: 1440px;
user-select: none; /* 对现代浏览器有效 */
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
.ant-modal-body{
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
// height: calc(65vh - 6.4rem*1.2));
@@ -677,8 +681,8 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: calc(1rem*1.2);
height: calc(1rem*1.2);
width: calc(2rem*1.2);
height: calc(2rem*1.2);
background-color: rgb(20, 188, 255);
position: absolute;
pointer-events: none;

View File

@@ -341,7 +341,8 @@ export default defineComponent({
this.printModelList.forEach((item:any)=>{
item.img = 'https://www.aida.com.hk/img/aida_logo.5ab4163e.png'
})
this.printModelList[3].img = -1
if(this.printModelList[3])this.printModelList[3].img = -1
}
this.printModel = this.printModelList[0]

View File

@@ -860,6 +860,10 @@ export default defineComponent({
<style lang="less">
.layout_modal {
user-select: none; /* 对现代浏览器有效 */
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
.ant-modal-body {
padding: 0;
// height: calc(65vh - 6.4rem);
@@ -950,8 +954,8 @@ export default defineComponent({
li{
cursor: pointer;
// border-radius: 50%;
width: calc(1.5rem*1.2);
height: calc(1.5rem*1.2);
width: calc(2rem*1.2);
height: calc(2rem*1.2);
background-color: rgb(20, 188, 255);
position: absolute;
z-index: 1049;
@@ -1015,24 +1019,28 @@ export default defineComponent({
}
.layout_angle_tr,.layout_angle_tl,.layout_angle_br,.layout_angle_bl{
// opacity: 0;
width: calc(.8rem*1.2);
height: calc(.8rem*1.2);
width: calc(2rem*1.2);
height: calc(2rem*1.2);
}
.layout_angle_tr{
right: 0%;
top: 0;
transform: translate(50%,-50%);
}
.layout_angle_tl{
left: 0%;
top: 0;
transform: translate(-50%,-50%);
}
.layout_angle_br{
right: 0%;
bottom: 0%;
transform: translate(50%,50%);
}
.layout_angle_bl{
left: 0%;
bottom: 0%;
transform: translate(-50%,50%);
}
.eventNode{
pointer-events: none;

View File

@@ -996,7 +996,6 @@ methods: {
top: 2rem;
display: flex;
flex-direction: column;
overflow: hidden;
>div{
margin-bottom: 1rem;
}
@@ -1019,6 +1018,7 @@ methods: {
align-items: center;
justify-content: center;
border-radius: .5rem;
position: relative;
border: .1rem solid #ccc;
.fi-sr-heart{
color: red;
@@ -1028,7 +1028,7 @@ methods: {
ul{
top: 100%;
position: absolute;
width: 13rem;
width: 10rem;
left: 0;
text-align: center;
border-radius: calc(1rem*1.2);

View File

@@ -164,6 +164,24 @@ export default defineComponent({
updateCanvasState('mouseUp')
}
});
canvas.on('mouse:wheel', opt => {
const delta = opt.e.deltaY // 滚轮,向上滚一下是 -100向下滚一下是 100
let zoom = canvas.getZoom() // 获取画布当前缩放值
zoom *= 0.999 ** delta
if (zoom > 20) zoom = 20
if (zoom < 0.01) zoom = 0.01
// console.log(zoom);
canvas.zoomToPoint(
{ // 关键点
x: opt.e.offsetX,
y: opt.e.offsetY
},
zoom
)
opt.e.preventDefault()
opt.e.stopPropagation()
})
//画布上移动
document.addEventListener('mousemove', mouseMove);

View File

@@ -24,6 +24,9 @@ const app = createApp(App);
flexible()
import { getCookie, setCookie } from "@/tool/cookie";
document.addEventListener('touchstart', function(event) {
event.preventDefault(); // 阻止长按选中
});
let loadingParam = {
loading: require('./assets/images/homePage/loading.gif'),
attempt: 1

View File

@@ -107,13 +107,14 @@ const userHabit : Module<UserHabit,RootState> = {
let userInfo = ['followeeCount','followerCount']
let obj:any = {}
for (const iterator in data) {
if(userInfo.indexOf(iterator) > 0){
if(userInfo.indexOf(iterator) > -1){
obj[iterator] = data[iterator]
store.commit('setUserInfo', obj)
}else{
if(iterator != 'newPosted')num+=data[iterator]
state.messageSystem.messageType[iterator] = data[iterator]
console.log(iterator);
state.messageSystem.messageType[iterator] = data[iterator]
}
}
state.messageSystem.messageNum = num

View File

@@ -1,3 +1,4 @@
import { setCookie, getCookie, WriteCookie,clonAllCookie } from "@/tool/cookie";
import MyEvent from "@/tool/myEvents";
class MyWs {
constructor() {
@@ -5,10 +6,13 @@ class MyWs {
// this.ws = new WebSocket();
let http = process.env.VUE_APP_BASE_URL.replace(/^https?:\/\//, '')
this.messageUrl = http+'/notification'
this.wsUrl = ''
this.reconnectionTime = null
}
linkWs(url) {
if (this.ws && this.ws.readyState == 1) return
this.ws = new WebSocket(url)
if(!this.wsUrl)this.wsUrl = url +`/${JSON.parse(getCookie("userInfo")).userId}`
this.ws = new WebSocket(this.wsUrl)
this.ws.onmessage = (e)=>{
try {
MyWs.receiveText(JSON.parse(e.data))
@@ -16,6 +20,18 @@ class MyWs {
console.error('websocket',error)
}
}
this.ws.onclose = (e)=>{
reconnection()
}
this.ws.onerror = (e)=>{
reconnection()
}
}
reconnection(){
clearTimeout(this.reconnectionTime)
this.reconnectionTime = setTimeout(()=>{
this.linkWs(this.wsUrl)
},1000)
}
static receiveText(data,call){
MyEvent.emit('getMessage',data)

View File

@@ -260,8 +260,8 @@ export default defineComponent({
}
})
}
// MyWs.linkWs("wss://"+MyWs.messageUrl,'message')
MyWs.linkWs("wss://"+MyWs.messageUrl,'message')
// MyWs.linkWs("ws://"+MyWs.messageUrl+`/${JSON.parse(getCookie("userInfo")).userId}`,'message')
let getWsMessage = (data)=>{
let userInfo = ['followeeCount','followerCount']
let obj = {}