fix
This commit is contained in:
2
.env.dev
2
.env.dev
@@ -6,7 +6,7 @@ NODE_ENV = 'development'
|
|||||||
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||||
# VUE_APP_BASE_URL = 'https://www.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'
|
# VUE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,9 @@ export default defineComponent({
|
|||||||
let allRead = ()=>{
|
let allRead = ()=>{
|
||||||
// emit('setAllmessage')
|
// emit('setAllmessage')
|
||||||
prop.setAllmessage().then(()=>{
|
prop.setAllmessage().then(()=>{
|
||||||
|
accountMessage.dataList.forEach((item:any)=>{
|
||||||
|
item.isRead = 1
|
||||||
|
})
|
||||||
}).catch((err:any)=>{
|
}).catch((err:any)=>{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ export default defineComponent({
|
|||||||
let allRead = ()=>{
|
let allRead = ()=>{
|
||||||
// emit('setAllmessage')
|
// emit('setAllmessage')
|
||||||
prop.setAllmessage().then(()=>{
|
prop.setAllmessage().then(()=>{
|
||||||
|
accountMessage.dataList.forEach((item:any)=>{
|
||||||
|
item.isRead = 1
|
||||||
|
})
|
||||||
}).catch((err:any)=>{
|
}).catch((err:any)=>{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ export default defineComponent({
|
|||||||
let allRead = ()=>{
|
let allRead = ()=>{
|
||||||
// emit('setAllmessage')
|
// emit('setAllmessage')
|
||||||
prop.setAllmessage().then(()=>{
|
prop.setAllmessage().then(()=>{
|
||||||
|
accountMessage.dataList.forEach((item:any)=>{
|
||||||
|
item.isRead = 1
|
||||||
|
})
|
||||||
}).catch((err:any)=>{
|
}).catch((err:any)=>{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,9 @@ export default defineComponent({
|
|||||||
let allRead = ()=>{
|
let allRead = ()=>{
|
||||||
// emit('setAllmessage')
|
// emit('setAllmessage')
|
||||||
prop.setAllmessage().then(()=>{
|
prop.setAllmessage().then(()=>{
|
||||||
|
accountMessage.dataList.forEach((item:any)=>{
|
||||||
|
item.isRead = 1
|
||||||
|
})
|
||||||
}).catch((err:any)=>{
|
}).catch((err:any)=>{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -678,6 +678,10 @@ export default defineComponent({
|
|||||||
<style lang="less">
|
<style lang="less">
|
||||||
.designElements_modal {
|
.designElements_modal {
|
||||||
// max-width: 1440px;
|
// 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{
|
.mark_loading{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
@@ -891,8 +895,8 @@ export default defineComponent({
|
|||||||
li{
|
li{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// border-radius: 50%;
|
// border-radius: 50%;
|
||||||
width: calc(1rem*1.2);
|
width: calc(2rem*1.2);
|
||||||
height: calc(1rem*1.2);
|
height: calc(2rem*1.2);
|
||||||
background-color: rgb(20, 188, 255);
|
background-color: rgb(20, 188, 255);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|||||||
@@ -939,6 +939,10 @@ export default defineComponent({
|
|||||||
<style lang="less">
|
<style lang="less">
|
||||||
.designOpenrtion_modal {
|
.designOpenrtion_modal {
|
||||||
// max-width: 1440px;
|
// 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{
|
.mark_loading{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
@@ -1232,8 +1236,8 @@ export default defineComponent({
|
|||||||
li{
|
li{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// border-radius: 50%;
|
// border-radius: 50%;
|
||||||
width: calc(1rem*1.2);
|
width: calc(2rem*1.2);
|
||||||
height: calc(1rem*1.2);
|
height: calc(2rem*1.2);
|
||||||
background-color: rgb(20, 188, 255);
|
background-color: rgb(20, 188, 255);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<!-- <i class="icon iconfont icon-move" @click="setOperation('move')" :class="{active:canvasState == 'move'}"></i> -->
|
<!-- <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-bianji" @click="setOperation('pencil')" :class="{active:canvasState == 'pencil'}"></i>
|
||||||
<!-- <i class="icon iconfont icon-xiangpi_huaban1" @click="setOperation('eraser')" :class="{active:canvasState == 'eraser'}"></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_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:rgba == 'rgb(0,255,0)'}" title="back">back</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>
|
<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]">
|
<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> -->
|
<!-- <div class="icon iconfont icon-xiala" :class="{btnRotate:spreadState}" @click="()=>spreadState = !spreadState"></div> -->
|
||||||
@@ -131,12 +131,7 @@ export default defineComponent({
|
|||||||
zoom *= 0.999 ** delta
|
zoom *= 0.999 ** delta
|
||||||
if (zoom > 20) zoom = 20
|
if (zoom > 20) zoom = 20
|
||||||
if (zoom < 0.01) zoom = 0.01
|
if (zoom < 0.01) zoom = 0.01
|
||||||
|
// console.log(zoom);
|
||||||
// 以左上角为原点
|
|
||||||
// this.canvas.setZoom(zoom)
|
|
||||||
|
|
||||||
// 以鼠标所在位置为原点缩放
|
|
||||||
console.log(zoom);
|
|
||||||
canvas.zoomToPoint(
|
canvas.zoomToPoint(
|
||||||
{ // 关键点
|
{ // 关键点
|
||||||
x: opt.e.offsetX,
|
x: opt.e.offsetX,
|
||||||
|
|||||||
@@ -549,6 +549,10 @@ export default defineComponent({
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.designOpenrtion_modal {
|
.designOpenrtion_modal {
|
||||||
// max-width: 1440px;
|
// 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{
|
.ant-modal-body{
|
||||||
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
|
padding: calc(4rem*1.2) calc(5rem*1.2) calc(0rem*1.2)!important;
|
||||||
// height: calc(65vh - 6.4rem*1.2));
|
// height: calc(65vh - 6.4rem*1.2));
|
||||||
@@ -677,8 +681,8 @@ export default defineComponent({
|
|||||||
li{
|
li{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// border-radius: 50%;
|
// border-radius: 50%;
|
||||||
width: calc(1rem*1.2);
|
width: calc(2rem*1.2);
|
||||||
height: calc(1rem*1.2);
|
height: calc(2rem*1.2);
|
||||||
background-color: rgb(20, 188, 255);
|
background-color: rgb(20, 188, 255);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|||||||
@@ -341,7 +341,8 @@ export default defineComponent({
|
|||||||
this.printModelList.forEach((item:any)=>{
|
this.printModelList.forEach((item:any)=>{
|
||||||
item.img = 'https://www.aida.com.hk/img/aida_logo.5ab4163e.png'
|
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]
|
this.printModel = this.printModelList[0]
|
||||||
|
|
||||||
|
|||||||
@@ -860,6 +860,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.layout_modal {
|
.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 {
|
.ant-modal-body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
// height: calc(65vh - 6.4rem);
|
// height: calc(65vh - 6.4rem);
|
||||||
@@ -950,8 +954,8 @@ export default defineComponent({
|
|||||||
li{
|
li{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// border-radius: 50%;
|
// border-radius: 50%;
|
||||||
width: calc(1.5rem*1.2);
|
width: calc(2rem*1.2);
|
||||||
height: calc(1.5rem*1.2);
|
height: calc(2rem*1.2);
|
||||||
background-color: rgb(20, 188, 255);
|
background-color: rgb(20, 188, 255);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1049;
|
z-index: 1049;
|
||||||
@@ -1015,24 +1019,28 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
.layout_angle_tr,.layout_angle_tl,.layout_angle_br,.layout_angle_bl{
|
.layout_angle_tr,.layout_angle_tl,.layout_angle_br,.layout_angle_bl{
|
||||||
// opacity: 0;
|
// opacity: 0;
|
||||||
width: calc(.8rem*1.2);
|
width: calc(2rem*1.2);
|
||||||
height: calc(.8rem*1.2);
|
height: calc(2rem*1.2);
|
||||||
}
|
}
|
||||||
.layout_angle_tr{
|
.layout_angle_tr{
|
||||||
right: 0%;
|
right: 0%;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
transform: translate(50%,-50%);
|
||||||
}
|
}
|
||||||
.layout_angle_tl{
|
.layout_angle_tl{
|
||||||
left: 0%;
|
left: 0%;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
transform: translate(-50%,-50%);
|
||||||
}
|
}
|
||||||
.layout_angle_br{
|
.layout_angle_br{
|
||||||
right: 0%;
|
right: 0%;
|
||||||
bottom: 0%;
|
bottom: 0%;
|
||||||
|
transform: translate(50%,50%);
|
||||||
}
|
}
|
||||||
.layout_angle_bl{
|
.layout_angle_bl{
|
||||||
left: 0%;
|
left: 0%;
|
||||||
bottom: 0%;
|
bottom: 0%;
|
||||||
|
transform: translate(-50%,50%);
|
||||||
}
|
}
|
||||||
.eventNode{
|
.eventNode{
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|||||||
@@ -996,7 +996,6 @@ methods: {
|
|||||||
top: 2rem;
|
top: 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
|
||||||
>div{
|
>div{
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
@@ -1019,6 +1018,7 @@ methods: {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border-radius: .5rem;
|
border-radius: .5rem;
|
||||||
|
position: relative;
|
||||||
border: .1rem solid #ccc;
|
border: .1rem solid #ccc;
|
||||||
.fi-sr-heart{
|
.fi-sr-heart{
|
||||||
color: red;
|
color: red;
|
||||||
@@ -1028,7 +1028,7 @@ methods: {
|
|||||||
ul{
|
ul{
|
||||||
top: 100%;
|
top: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 13rem;
|
width: 10rem;
|
||||||
left: 0;
|
left: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-radius: calc(1rem*1.2);
|
border-radius: calc(1rem*1.2);
|
||||||
|
|||||||
@@ -164,6 +164,24 @@ export default defineComponent({
|
|||||||
updateCanvasState('mouseUp')
|
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);
|
document.addEventListener('mousemove', mouseMove);
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ const app = createApp(App);
|
|||||||
flexible()
|
flexible()
|
||||||
|
|
||||||
import { getCookie, setCookie } from "@/tool/cookie";
|
import { getCookie, setCookie } from "@/tool/cookie";
|
||||||
|
document.addEventListener('touchstart', function(event) {
|
||||||
|
event.preventDefault(); // 阻止长按选中
|
||||||
|
});
|
||||||
let loadingParam = {
|
let loadingParam = {
|
||||||
loading: require('./assets/images/homePage/loading.gif'),
|
loading: require('./assets/images/homePage/loading.gif'),
|
||||||
attempt: 1
|
attempt: 1
|
||||||
|
|||||||
@@ -107,13 +107,14 @@ const userHabit : Module<UserHabit,RootState> = {
|
|||||||
let userInfo = ['followeeCount','followerCount']
|
let userInfo = ['followeeCount','followerCount']
|
||||||
let obj:any = {}
|
let obj:any = {}
|
||||||
for (const iterator in data) {
|
for (const iterator in data) {
|
||||||
if(userInfo.indexOf(iterator) > 0){
|
if(userInfo.indexOf(iterator) > -1){
|
||||||
obj[iterator] = data[iterator]
|
obj[iterator] = data[iterator]
|
||||||
store.commit('setUserInfo', obj)
|
store.commit('setUserInfo', obj)
|
||||||
}else{
|
}else{
|
||||||
if(iterator != 'newPosted')num+=data[iterator]
|
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
|
state.messageSystem.messageNum = num
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { setCookie, getCookie, WriteCookie,clonAllCookie } from "@/tool/cookie";
|
||||||
import MyEvent from "@/tool/myEvents";
|
import MyEvent from "@/tool/myEvents";
|
||||||
class MyWs {
|
class MyWs {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -5,10 +6,13 @@ class MyWs {
|
|||||||
// this.ws = new WebSocket();
|
// this.ws = new WebSocket();
|
||||||
let http = process.env.VUE_APP_BASE_URL.replace(/^https?:\/\//, '')
|
let http = process.env.VUE_APP_BASE_URL.replace(/^https?:\/\//, '')
|
||||||
this.messageUrl = http+'/notification'
|
this.messageUrl = http+'/notification'
|
||||||
|
this.wsUrl = ''
|
||||||
|
this.reconnectionTime = null
|
||||||
}
|
}
|
||||||
linkWs(url) {
|
linkWs(url) {
|
||||||
if (this.ws && this.ws.readyState == 1) return
|
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)=>{
|
this.ws.onmessage = (e)=>{
|
||||||
try {
|
try {
|
||||||
MyWs.receiveText(JSON.parse(e.data))
|
MyWs.receiveText(JSON.parse(e.data))
|
||||||
@@ -16,6 +20,18 @@ class MyWs {
|
|||||||
console.error('websocket',error)
|
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){
|
static receiveText(data,call){
|
||||||
MyEvent.emit('getMessage',data)
|
MyEvent.emit('getMessage',data)
|
||||||
|
|||||||
@@ -260,8 +260,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// MyWs.linkWs("wss://"+MyWs.messageUrl,'message')
|
||||||
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 getWsMessage = (data)=>{
|
||||||
let userInfo = ['followeeCount','followerCount']
|
let userInfo = ['followeeCount','followerCount']
|
||||||
let obj = {}
|
let obj = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user