fix
This commit is contained in:
2
.env.dev
2
.env.dev
@@ -5,4 +5,4 @@ NODE_ENV = 'development'
|
|||||||
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
# VUE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||||
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
VUE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
|
||||||
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
|
# VUE_APP_BASE_URL = 'http://192.168.1.9:17088'
|
||||||
# VUE_APP_BASE_URL = '18.167.251.121:17088'
|
# VUE_APP_BASE_URL = 'http://192.168.1.7:5567'
|
||||||
|
|||||||
@@ -988,13 +988,14 @@ i {
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: rgba(0, 0, 0, 0.2);
|
background: rgba(0, 0, 0, 0.4);
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
color: #fff;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.mark_loading .mark_loading_text {
|
.mark_loading .mark_loading_text {
|
||||||
@@ -1011,7 +1012,14 @@ i {
|
|||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
.mark_loading .mark_loading_btn {
|
.mark_loading .mark_loading_title {
|
||||||
|
font-size: 3rem;
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
.mark_loading .mark_loading_btn,
|
||||||
|
.mark_loading .mark_loading_btn2 {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 2px solid;
|
border: 2px solid;
|
||||||
@@ -1023,4 +1031,10 @@ i {
|
|||||||
background: #39215b;
|
background: #39215b;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
|
margin: 0 2rem;
|
||||||
|
}
|
||||||
|
.mark_loading .mark_loading_btn2 {
|
||||||
|
border: 2px solid #000;
|
||||||
|
background: rgba(0, 0, 0, 0);
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1057,13 +1057,14 @@ i{
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: rgba(0, 0, 0, 0.2);
|
background: rgba(0, 0, 0, 0.4);
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
color: #fff;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
.mark_loading_text{
|
.mark_loading_text{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -1082,7 +1083,14 @@ i{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.mark_loading_btn{
|
.mark_loading_title{
|
||||||
|
font-size: 3rem;
|
||||||
|
text-decoration: underline;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
// color: #fff;
|
||||||
|
}
|
||||||
|
.mark_loading_btn,.mark_loading_btn2{
|
||||||
// border: #000;
|
// border: #000;
|
||||||
// color: #fff;
|
// color: #fff;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
@@ -1096,5 +1104,11 @@ i{
|
|||||||
background: #39215b;
|
background: #39215b;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
|
margin: 0 2rem;
|
||||||
|
}
|
||||||
|
.mark_loading_btn2{
|
||||||
|
border: 2px solid #000;
|
||||||
|
background: rgba(0,0,0,0);
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal class="modal_component Export"
|
<a-modal
|
||||||
|
class="modal_component Export"
|
||||||
v-model:visible="showUpgradePlan"
|
v-model:visible="showUpgradePlan"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
width="78%"
|
width="78%"
|
||||||
@@ -19,17 +20,59 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<div class="exportCanvasBox">
|
<div class="exportCanvasBox">
|
||||||
<div class="exportCanvasBox_left">
|
<div class="exportCanvasBox_left">
|
||||||
<div class="exportCanvasBox_title">
|
<div class="exportCanvasBox_title">Canvas Title</div>
|
||||||
Canvas Title
|
|
||||||
</div>
|
|
||||||
<label>
|
<label>
|
||||||
<div>Width:</div>
|
<div>Width:</div>
|
||||||
<input type="number" @input="setMaxInput('width',600)" v-model="canvasWH.width">
|
<input
|
||||||
|
type="number"
|
||||||
|
@input="setMaxInput('width', 500)"
|
||||||
|
v-model="canvasWH.width"
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<div>Height:</div>
|
<div>Height:</div>
|
||||||
<input type="number" @input="setMaxInput('height',1000)" v-model="canvasWH.height">
|
<input
|
||||||
|
type="number"
|
||||||
|
@input="setMaxInput('height', 1000)"
|
||||||
|
v-model="canvasWH.height"
|
||||||
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
<div class="exportCanvasBox_title" @click.stop="setCloseNav()">
|
||||||
|
Canvas Nav
|
||||||
|
<div
|
||||||
|
:class="[
|
||||||
|
'icon',
|
||||||
|
'iconfont',
|
||||||
|
'icon-xiala',
|
||||||
|
closeNav?'icon-rotate':''
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="exportCanvasBox_img" :class="{closeNav:'closeNav'}">
|
||||||
|
<div
|
||||||
|
class="exportCanvasBox_allItem"
|
||||||
|
v-for="(item,key) in allBoardData"
|
||||||
|
>
|
||||||
|
<div v-if="item[0]" class="exportCanvasBox_intro">{{ key }}</div>
|
||||||
|
|
||||||
|
<div class="exportCanvasBox_item_color" v-if="key == 'colorBoards'" v-for="colorItem in item">
|
||||||
|
<div class="exportCanvasBox_item_BGcolor" :style="{'background-color': 'rgb('+colorItem.rgbValue.r+','+colorItem.rgbValue.g+','+colorItem.rgbValue.b+')'}"></div>
|
||||||
|
<div>{{colorItem.tcx}}</div>
|
||||||
|
<div>{{colorItem.name}}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="exportCanvasBox_item"
|
||||||
|
:class="[key == 'disposeMoodboard'?'exportCanvasBox_item_dispose':'']"
|
||||||
|
v-for="imgItem in item"
|
||||||
|
draggable
|
||||||
|
@dragstart="onDragstart(key)"
|
||||||
|
>
|
||||||
|
<img :src="key == 'likeDesignCollectionList'?imgItem.designOutfitUrl:imgItem.imgUrl" alt="" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="exportCanvasBox_center">
|
<div class="exportCanvasBox_center">
|
||||||
<!-- <canvas ref="canvasDom" id="exportCanvas"></canvas> -->
|
<!-- <canvas ref="canvasDom" id="exportCanvas"></canvas> -->
|
||||||
@@ -37,48 +80,82 @@
|
|||||||
<!-- <ExportNewCoolection ref="ExportNewCoolection"></ExportNewCoolection> -->
|
<!-- <ExportNewCoolection ref="ExportNewCoolection"></ExportNewCoolection> -->
|
||||||
<div class="exportCanvasBox_right">
|
<div class="exportCanvasBox_right">
|
||||||
<div class="" @click="setExport">export</div>
|
<div class="" @click="setExport">export</div>
|
||||||
|
<div class="" @click="multiselect">all</div>
|
||||||
|
</div>
|
||||||
|
<div class="mark_loading" v-show="isShowMark">
|
||||||
|
<a-spin size="large" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { defineComponent, computed, h, ref, nextTick, inject,reactive, onMounted } from "vue";
|
import {
|
||||||
|
defineComponent,
|
||||||
|
computed,
|
||||||
|
h,
|
||||||
|
ref,
|
||||||
|
nextTick,
|
||||||
|
inject,
|
||||||
|
reactive,
|
||||||
|
onMounted,
|
||||||
|
} from "vue";
|
||||||
import { Https } from "@/tool/https";
|
import { Https } from "@/tool/https";
|
||||||
import scaleImage from "@/component/HomePage/scaleImage.vue";
|
import scaleImage from "@/component/HomePage/scaleImage.vue";
|
||||||
import ExportNewCoolection from "@/component/HomePage/ExportNewCoolection.vue";
|
import ExportNewCoolection from "@/component/HomePage/ExportNewCoolection.vue";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { forEach } from "jszip";
|
import JSZip, { forEach } from "jszip";
|
||||||
|
import { message, Modal } from "ant-design-vue";
|
||||||
|
const FileSaver = require("file-saver");
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
scaleImage,
|
scaleImage,
|
||||||
ExportNewCoolection,
|
ExportNewCoolection,
|
||||||
},
|
},
|
||||||
props: ["msg",'sketchCatecoryList'],
|
props: ["msg", "sketchCatecoryList"],
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
|
|
||||||
let showUpgradePlan = ref(false)
|
let showUpgradePlan = ref(false);
|
||||||
let canvas = reactive({})
|
let canvas = reactive({});
|
||||||
// let canvasDom = ref()
|
// let canvasDom = ref()
|
||||||
let canvasWH = ref({
|
let canvasWH = ref({
|
||||||
width: 400,
|
width: 400,
|
||||||
height:1400,
|
height: 1200,
|
||||||
})
|
});
|
||||||
|
canvasWH.value.width = [window.innerWidth/2.4]
|
||||||
|
canvasWH.value.width = canvasWH.value.width.map(num => Math.round(num / 100) * 100)[0];
|
||||||
|
console.log(canvasWH.value.width);
|
||||||
let sketch = computed(() => {
|
let sketch = computed(() => {
|
||||||
return store.state.HomeStoreModule.showSketchList})
|
return store.state.HomeStoreModule.showSketchList;
|
||||||
// let sketch = ref([[],[],[]])
|
});
|
||||||
let sketchList = computed(() => {
|
let sketchList = computed(() => {
|
||||||
return store.state.UploadFilesModule.showSketchboard})
|
return store.state.UploadFilesModule.showSketchboard;
|
||||||
let allBoardData = computed(()=>{return store.state.UploadFilesModule.allBoardData})
|
});
|
||||||
let likeDesignCollectionList = computed(()=>{return store.state.HomeStoreModule.likeDesignCollectionList})
|
let allBoardData = computed(() => {
|
||||||
let allImage = Object.assign(allBoardData.value,{likeDesignCollectionList:likeDesignCollectionList.value})
|
return store.state.UploadFilesModule.allBoardData;
|
||||||
|
});
|
||||||
|
let likeDesignCollectionList = computed(() => {
|
||||||
|
return store.state.HomeStoreModule.likeDesignCollectionList;
|
||||||
|
});
|
||||||
|
let isShowMark = false;
|
||||||
|
// let allImage = Object.assign(allBoardData.value,{likeDesignCollectionList:likeDesignCollectionList.value})
|
||||||
|
let position = {
|
||||||
|
//设置每个图形位置的初始值
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
height: 0,
|
||||||
|
};
|
||||||
let init = () => {
|
let init = () => {
|
||||||
showUpgradePlan.value = true
|
showUpgradePlan.value = true;
|
||||||
|
console.log(position);
|
||||||
nextTick().then(async () => {
|
nextTick().then(async () => {
|
||||||
let canvasBox = document.querySelector('.Export .exportCanvasBox_center')
|
allBoardData.value.likeDesignCollectionList =
|
||||||
canvasBox.innerHTML = ''; // 清空原有内容
|
likeDesignCollectionList;
|
||||||
var canvasDom = document.createElement('canvas')
|
let canvasBox = document.querySelector(
|
||||||
|
".Export .exportCanvasBox_center"
|
||||||
|
);
|
||||||
|
canvasBox.innerHTML = ""; // 清空原有内容
|
||||||
|
var canvasDom = document.createElement("canvas");
|
||||||
canvasBox.appendChild(canvasDom);
|
canvasBox.appendChild(canvasDom);
|
||||||
canvas = new fabric.Canvas(canvasDom, {
|
canvas = new fabric.Canvas(canvasDom, {
|
||||||
backgroundColor: "rgba(255, 255, 255)",
|
backgroundColor: "rgba(255, 255, 255)",
|
||||||
@@ -88,118 +165,168 @@ export default defineComponent({
|
|||||||
height: canvasWH.value.height,
|
height: canvasWH.value.height,
|
||||||
isDrawingMode: false, // 开启绘图模式
|
isDrawingMode: false, // 开启绘图模式
|
||||||
});
|
});
|
||||||
let disposeMoodboardShow = true
|
canvasOnDrop()
|
||||||
let arr = ['disposeMoodboard','moodboardFiles','printboardFiles','colorBoards','sketchboardFiles','likeDesignCollectionList']
|
let disposeMoodboardShow = true;
|
||||||
let position = { //设置每个图形位置的初始值
|
let arr = [
|
||||||
x:0,
|
"disposeMoodboard",
|
||||||
y:0,
|
"moodboardFiles",
|
||||||
height:0,
|
"printboardFiles",
|
||||||
}
|
"colorBoards",
|
||||||
let sketchGrouping = 3//sketch分组
|
"sketchboardFiles",
|
||||||
let likeDesign = 4//整体图分组
|
"likeDesignCollectionList",
|
||||||
let oldKey = ''
|
];
|
||||||
let margin = 20//每个图形边距
|
|
||||||
|
let sketchGrouping = 3; //sketch分组
|
||||||
|
let likeDesign = 4; //整体图分组
|
||||||
|
let oldKey = "";
|
||||||
|
let margin = 20; //每个图形边距
|
||||||
// arr.forEach((item,index)=>{
|
// arr.forEach((item,index)=>{
|
||||||
for (const item of arr) {
|
for (const item of arr) {
|
||||||
for (const key in allBoardData.value) {
|
for (const key in allBoardData.value) {
|
||||||
if(item == key){//循环渲染顺序
|
if (item == key) {
|
||||||
let setImgWidth = canvasWH.value.width//这是设置画布等宽
|
//循环渲染顺序
|
||||||
let sketchGroupingItem = []
|
let setImgWidth = canvasWH.value.width; //这是设置画布等宽
|
||||||
if(disposeMoodboardShow && item == 'disposeMoodboard' && allBoardData.value[key].length != 0 && allBoardData.value[key][0] != null){//如果是mood 需要判断用户是否点击layout
|
let sketchGroupingItem = [];
|
||||||
disposeMoodboardShow = false
|
if (
|
||||||
|
disposeMoodboardShow &&
|
||||||
|
item == "disposeMoodboard" &&
|
||||||
|
allBoardData.value[key].length != 0 &&
|
||||||
|
allBoardData.value[key][0] != null
|
||||||
|
) {
|
||||||
|
//如果是mood 需要判断用户是否点击layout
|
||||||
|
disposeMoodboardShow = false;
|
||||||
}
|
}
|
||||||
if(item == 'moodboardFiles' && !disposeMoodboardShow){
|
if (
|
||||||
continue
|
item == "moodboardFiles" &&
|
||||||
|
!disposeMoodboardShow
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
if(item == 'printboardFiles'){
|
if (item == "printboardFiles") {
|
||||||
setImgWidth = canvasWH.value.width/8
|
setImgWidth = canvasWH.value.width / 8;
|
||||||
}
|
}
|
||||||
if(item == 'sketchboardFiles'){
|
if (item == "sketchboardFiles") {
|
||||||
setImgWidth = (canvasWH.value.width-(sketchGrouping-1)*20)/sketchGrouping
|
setImgWidth =
|
||||||
|
(canvasWH.value.width -
|
||||||
|
(sketchGrouping - 1) * 20) /
|
||||||
|
sketchGrouping;
|
||||||
}
|
}
|
||||||
if(item == 'likeDesignCollectionList'){
|
if (item == "likeDesignCollectionList") {
|
||||||
setImgWidth = (canvasWH.value.width-(likeDesign-1)*20)/likeDesign
|
setImgWidth =
|
||||||
|
(canvasWH.value.width -
|
||||||
|
(likeDesign - 1) * 20) /
|
||||||
|
likeDesign;
|
||||||
}
|
}
|
||||||
for (const [allItemIndex, allItem] of allBoardData.value[key].entries()) {
|
for (const [allItemIndex, allItem,] of allBoardData.value[key].entries()) {
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
if(key == 'colorBoards'){
|
if (key == "colorBoards") {
|
||||||
|
var text = new fabric.Text(
|
||||||
var text = new fabric.Text(allItem.tcx, {
|
allItem.tcx,
|
||||||
|
{
|
||||||
left: 0,
|
left: 0,
|
||||||
top: 60,
|
top: 60,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontFamily: 'Arial',
|
fontFamily: "Arial",
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
fill: 'black',
|
fill: "black",
|
||||||
});
|
}
|
||||||
let text1 = new fabric.Text(allItem.name, {
|
);
|
||||||
|
let text1 = new fabric.Text(
|
||||||
|
allItem.name,
|
||||||
|
{
|
||||||
left: 0,
|
left: 0,
|
||||||
top: 80,
|
top: 80,
|
||||||
width: 20,
|
width: 20,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontFamily: 'Arial',
|
fontFamily: "Arial",
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
});
|
}
|
||||||
let width = 110>text1.width?110:text1.width
|
);
|
||||||
|
let width =
|
||||||
|
110 > text1.width
|
||||||
|
? 110
|
||||||
|
: text1.width;
|
||||||
var color = new fabric.Rect({
|
var color = new fabric.Rect({
|
||||||
width: width,
|
width: width,
|
||||||
height: 60,
|
height: 60,
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
fill: `rgb(${allItem.rgbValue.r},${allItem.rgbValue.g},${allItem.rgbValue.b})`,
|
fill: `rgb(${allItem.rgbValue.r},${allItem.rgbValue.g},${allItem.rgbValue.b})`,
|
||||||
});
|
});
|
||||||
if((position.x+width > canvasWH.value.width) || (oldKey != key)){
|
if (
|
||||||
position.x = 0
|
position.x + width >
|
||||||
position.y += position.height
|
canvasWH.value.width ||
|
||||||
|
oldKey != key
|
||||||
|
) {
|
||||||
|
position.x = 0;
|
||||||
|
position.y += position.height;
|
||||||
}
|
}
|
||||||
var group = new fabric.Group([color, text, text1], {
|
var group = new fabric.Group(
|
||||||
|
[color, text, text1],
|
||||||
|
{
|
||||||
left: position.x,
|
left: position.x,
|
||||||
top: position.y,
|
top: position.y,
|
||||||
width: width,
|
width: width,
|
||||||
fill:'rgb(255,255,255)',
|
fill: "rgb(255,255,255)",
|
||||||
cornerSize: 10, // 选中时,角的大小为20
|
cornerSize: 10, // 选中时,角的大小为20
|
||||||
transparentCorners: false, // 选中时,角是被填充了。true 空心;false 实心
|
transparentCorners: false, // 选中时,角是被填充了。true 空心;false 实心
|
||||||
stroke: '#212121',
|
stroke: "#212121",
|
||||||
strokeWidth: 1,
|
strokeWidth: 1,
|
||||||
});
|
}
|
||||||
|
);
|
||||||
// 将矩形对象添加到 canvas 中
|
// 将矩形对象添加到 canvas 中
|
||||||
canvas.add(group);
|
canvas.add(group);
|
||||||
oldKey = key
|
oldKey = key;
|
||||||
position.x += width + margin
|
position.x += width + margin;
|
||||||
position.height = group.height+margin
|
position.height = group.height + margin;
|
||||||
resolve()
|
resolve();
|
||||||
} else {
|
} else {
|
||||||
let itemCanvasImg = allItem.imgUrl
|
let itemCanvasImg = allItem.imgUrl;
|
||||||
if(key == 'likeDesignCollectionList'){
|
if (key == "likeDesignCollectionList") {
|
||||||
itemCanvasImg = allItem.designOutfitUrl
|
itemCanvasImg =
|
||||||
|
allItem.designOutfitUrl;
|
||||||
}
|
}
|
||||||
fabric.Image.fromURL(itemCanvasImg, (img) => {
|
fabric.Image.fromURL(
|
||||||
let proportion = img.height/img.width//计算图形宽高比例
|
itemCanvasImg,
|
||||||
let scaleWH = setImgWidth/img.width//计算放到画布上缩小倍率
|
(img) => {
|
||||||
if((position.x+img.width*scaleWH > canvasWH.value.width) || (oldKey != key)){
|
let proportion = img.height / img.width; //计算图形宽高比例
|
||||||
position.x = 0
|
let scaleWH = setImgWidth / img.width; //计算放到画布上缩小倍率
|
||||||
position.y += position.height
|
if (position.x + img.width * scaleWH > canvasWH.value.width || oldKey != key) {
|
||||||
|
position.x = 0;
|
||||||
|
position.y += position.height;
|
||||||
}
|
}
|
||||||
img.set({
|
img.set({
|
||||||
// width: setImgWidth/img.width,
|
// width: setImgWidth/img.width,
|
||||||
// height: canvasWH.value.height/img.height,
|
// height: canvasWH.value.height/img.height,
|
||||||
left: position.x,
|
left: position.x,
|
||||||
top: position.y,
|
top: position.y,
|
||||||
scaleX: setImgWidth/img.width,
|
scaleX:
|
||||||
scaleY: img.width*proportion*scaleWH/img.height,
|
setImgWidth / img.width,
|
||||||
|
scaleY:(img.width * proportion * scaleWH) / img.height,
|
||||||
cornerSize: 10, // 选中时,角的大小为20
|
cornerSize: 10, // 选中时,角的大小为20
|
||||||
// lockRotation:true,
|
// lockRotation:true,
|
||||||
// lockScalingX:true,
|
// lockScalingX:true,
|
||||||
lockRotation: true,
|
lockRotation: true,
|
||||||
crossOrigin: 'anonymous',
|
crossOrigin: "anonymous",
|
||||||
transparentCorners: false, // 选中时,角是被填充了。true 空心;false 实心
|
transparentCorners: false, // 选中时,角是被填充了。true 空心;false 实心
|
||||||
// cornerColor: "#a1de93", // 选中时,角的颜色是 青色
|
// cornerColor: "#a1de93", // 选中时,角的颜色是 青色
|
||||||
})
|
});
|
||||||
position.height = img.height*scaleWH+margin
|
position.height = img.height * scaleWH + margin;
|
||||||
if(key == 'sketchboardFiles'){
|
if (key == "sketchboardFiles") {
|
||||||
position.x += img.width*scaleWH+margin
|
position.x +=
|
||||||
if(sketchGroupingItem.length>=3){
|
img.width * scaleWH +
|
||||||
|
margin;
|
||||||
|
if (
|
||||||
|
sketchGroupingItem.length >=
|
||||||
|
3
|
||||||
|
) {
|
||||||
} else {
|
} else {
|
||||||
sketchGroupingItem.push(JSON.parse(JSON.stringify(position)))
|
sketchGroupingItem.push(
|
||||||
|
JSON.parse(
|
||||||
|
JSON.stringify(
|
||||||
|
position
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (sketchGroupingItem.length >=3) {
|
if (sketchGroupingItem.length >=3) {
|
||||||
let sketchXyIndex = {
|
let sketchXyIndex = {
|
||||||
@@ -207,70 +334,338 @@ export default defineComponent({
|
|||||||
maxNum: 9999999999,
|
maxNum: 9999999999,
|
||||||
minNum: 0,
|
minNum: 0,
|
||||||
minIndex: 0,
|
minIndex: 0,
|
||||||
}
|
};
|
||||||
sketchGroupingItem.forEach((sketchItem,sketchIndex)=>{
|
sketchGroupingItem.forEach(
|
||||||
|
(sketchItem,sketchIndex) => {
|
||||||
if (sketchItem.height <sketchXyIndex.maxNum) {
|
if (sketchItem.height <sketchXyIndex.maxNum) {
|
||||||
sketchXyIndex.maxNum = sketchItem.height
|
sketchXyIndex.maxNum = sketchItem.height;
|
||||||
sketchXyIndex.maxIndex = sketchIndex
|
sketchXyIndex.maxIndex = sketchIndex;
|
||||||
}
|
}
|
||||||
if (sketchItem.height > sketchXyIndex.minNum) {
|
if (sketchItem.height > sketchXyIndex.minNum) {
|
||||||
sketchXyIndex.minNum = sketchItem.height
|
sketchXyIndex.minNum = sketchItem.height;
|
||||||
sketchXyIndex.minIndex = sketchIndex
|
sketchXyIndex.minIndex = sketchIndex;
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
);
|
||||||
if (allBoardData.value[key].length == allItemIndex + 1) {
|
if (allBoardData.value[key].length == allItemIndex + 1) {
|
||||||
position = sketchGroupingItem[sketchXyIndex.minIndex]
|
position = sketchGroupingItem[sketchXyIndex.minIndex];
|
||||||
} else {
|
} else {
|
||||||
position = sketchGroupingItem[sketchXyIndex.maxIndex]
|
position = sketchGroupingItem[ sketchXyIndex.maxIndex];
|
||||||
position.y += position.height
|
position.y += position.height;
|
||||||
position.x -= img.width*scaleWH+margin
|
position.x -= img.width * scaleWH + margin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
position.x += img.width*scaleWH
|
position.x += img.width * scaleWH;
|
||||||
}
|
}
|
||||||
img.lock_rotation = true
|
img.lock_rotation = true;
|
||||||
canvas.add(img);
|
canvas.add(img);
|
||||||
oldKey = key
|
oldKey = key;
|
||||||
resolve()
|
resolve();
|
||||||
},{crossOrigin: 'Anonymous'})
|
},
|
||||||
|
{ crossOrigin: "Anonymous" }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
};
|
||||||
|
let setCanvasImage = (itemCanvasImg)=>{
|
||||||
|
fabric.Image.fromURL(
|
||||||
|
itemCanvasImg,
|
||||||
|
(img) => {
|
||||||
|
let proportion = img.height / img.width; //计算图形宽高比例
|
||||||
|
let scaleWH = setImgWidth / img.width; //计算放到画布上缩小倍率
|
||||||
|
if (position.x + img.width * scaleWH > canvasWH.value.width || oldKey != key) {
|
||||||
|
position.x = 0;
|
||||||
|
position.y += position.height;
|
||||||
|
}
|
||||||
|
img.set({
|
||||||
|
// width: setImgWidth/img.width,
|
||||||
|
// height: canvasWH.value.height/img.height,
|
||||||
|
left: position.x,
|
||||||
|
top: position.y,
|
||||||
|
scaleX:
|
||||||
|
setImgWidth / img.width,
|
||||||
|
scaleY:(img.width * proportion * scaleWH) / img.height,
|
||||||
|
cornerSize: 10, // 选中时,角的大小为20
|
||||||
|
// lockRotation:true,
|
||||||
|
// lockScalingX:true,
|
||||||
|
lockRotation: true,
|
||||||
|
crossOrigin: "anonymous",
|
||||||
|
transparentCorners: false, // 选中时,角是被填充了。true 空心;false 实心
|
||||||
|
// cornerColor: "#a1de93", // 选中时,角的颜色是 青色
|
||||||
|
});
|
||||||
|
position.height = img.height * scaleWH + margin;
|
||||||
|
if (key == "sketchboardFiles") {
|
||||||
|
position.x +=
|
||||||
|
img.width * scaleWH +
|
||||||
|
margin;
|
||||||
|
if (
|
||||||
|
sketchGroupingItem.length >=
|
||||||
|
3
|
||||||
|
) {
|
||||||
|
} else {
|
||||||
|
sketchGroupingItem.push(
|
||||||
|
JSON.parse(
|
||||||
|
JSON.stringify(
|
||||||
|
position
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (sketchGroupingItem.length >=3) {
|
||||||
|
let sketchXyIndex = {
|
||||||
|
maxIndex: 0,
|
||||||
|
maxNum: 9999999999,
|
||||||
|
minNum: 0,
|
||||||
|
minIndex: 0,
|
||||||
|
};
|
||||||
|
sketchGroupingItem.forEach(
|
||||||
|
(sketchItem,sketchIndex) => {
|
||||||
|
if (sketchItem.height <sketchXyIndex.maxNum) {
|
||||||
|
sketchXyIndex.maxNum = sketchItem.height;
|
||||||
|
sketchXyIndex.maxIndex = sketchIndex;
|
||||||
|
}
|
||||||
|
if (sketchItem.height > sketchXyIndex.minNum) {
|
||||||
|
sketchXyIndex.minNum = sketchItem.height;
|
||||||
|
sketchXyIndex.minIndex = sketchIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (allBoardData.value[key].length == allItemIndex + 1) {
|
||||||
|
position = sketchGroupingItem[sketchXyIndex.minIndex];
|
||||||
|
} else {
|
||||||
|
position = sketchGroupingItem[ sketchXyIndex.maxIndex];
|
||||||
|
position.y += position.height;
|
||||||
|
position.x -= img.width * scaleWH + margin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
position.x += img.width * scaleWH;
|
||||||
|
}
|
||||||
|
img.lock_rotation = true;
|
||||||
|
canvas.add(img);
|
||||||
|
oldKey = key;
|
||||||
|
resolve();
|
||||||
|
},
|
||||||
|
{ crossOrigin: "Anonymous" }
|
||||||
|
);
|
||||||
}
|
}
|
||||||
//设置导出
|
//设置导出
|
||||||
let setExport = ()=>{
|
let setExport = async () => {
|
||||||
var imageDataURL = canvas.toDataURL({
|
var imageDataURL = canvas.toDataURL({
|
||||||
format: 'png', // 导出格式为 PNG
|
format: "png", // 导出格式为 PNG
|
||||||
quality: 1 // 图片质量为 1(最高质量)
|
quality: 1, // 图片质量为 1(最高质量)
|
||||||
});
|
});
|
||||||
console.log(imageDataURL);
|
let a = document.createElement("a");
|
||||||
|
let img = [];
|
||||||
|
let index = 0;
|
||||||
|
img.push({
|
||||||
|
imgUrl: imageDataURL,
|
||||||
|
name: "collection.png",
|
||||||
|
});
|
||||||
|
let num = 0;
|
||||||
|
for (let key in allBoardData.value) {
|
||||||
|
if (key !== "colorBoards" && key !== "moodTemplateId") {
|
||||||
|
for (let item of allBoardData.value[key]) {
|
||||||
|
if (
|
||||||
|
key == "disposeMoodboard" &&
|
||||||
|
allBoardData.value[key][0] == undefined
|
||||||
|
) {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let nameTail = item?.imgUrl
|
||||||
|
?.split(".")
|
||||||
|
.pop()
|
||||||
|
.split("?")
|
||||||
|
.shift();
|
||||||
|
|
||||||
|
let data = {
|
||||||
|
imgUrl: item.imgUrl,
|
||||||
|
name: item?.resData?.name + index + "." + nameTail,
|
||||||
|
};
|
||||||
|
if (key == "likeDesignCollectionList") {
|
||||||
|
data.imgUrl = item.designOutfitUrl;
|
||||||
|
data.name = "result" + index + "." + nameTail;
|
||||||
|
}
|
||||||
|
img.push(data);
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let dataList = [];
|
||||||
|
likeDesignCollectionList.value.forEach((item) => {
|
||||||
|
// let nameTail = item?.designOutfitUrl
|
||||||
|
// ?.split(".")
|
||||||
|
// .pop()
|
||||||
|
// .split("?")
|
||||||
|
// .shift();
|
||||||
|
// let data = {
|
||||||
|
// imgUrl: item.designOutfitUrl,
|
||||||
|
// name: "result" + index + "." + nameTail,
|
||||||
|
// };
|
||||||
|
dataList.push(item.designItemId);
|
||||||
|
// img.push(data);
|
||||||
|
index++;
|
||||||
|
});
|
||||||
|
let mannequinList = [];
|
||||||
|
await Https.axiosPost(Https.httpUrls.designGetModel, dataList)
|
||||||
|
.then((rv) => {
|
||||||
|
mannequinList = rv;
|
||||||
|
})
|
||||||
|
.catch((rv) => {});
|
||||||
|
mannequinList.forEach((item) => {
|
||||||
|
let nameTail = item?.split(".").pop().split("?").shift();
|
||||||
|
let data = {
|
||||||
|
imgUrl: item,
|
||||||
|
name: "mannequin" + index + "." + nameTail,
|
||||||
|
};
|
||||||
|
img.push(data);
|
||||||
|
index++;
|
||||||
|
});
|
||||||
|
downImg(img);
|
||||||
|
};
|
||||||
|
let getImgArrayBuffer = (url) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
//通过请求获取文件blob格式
|
||||||
|
let xmlhttp = new XMLHttpRequest();
|
||||||
|
xmlhttp.open("GET", url, true);
|
||||||
|
xmlhttp.responseType = "blob";
|
||||||
|
xmlhttp.onload = function () {
|
||||||
|
if (this.status == 200) {
|
||||||
|
resolve(this.response);
|
||||||
|
} else {
|
||||||
|
reject(this.status);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xmlhttp.send();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
let downImg = (imagesParams) => {
|
||||||
|
let zip = new JSZip();
|
||||||
|
let cache = {};
|
||||||
|
let promises = [];
|
||||||
|
for (let item of imagesParams) {
|
||||||
|
const promise = getImgArrayBuffer(item.imgUrl).then((data) => {
|
||||||
|
// 下载文件, 并存成ArrayBuffer对象(blob)
|
||||||
|
zip.file(item.name, data, { binary: true }); // 逐个添加文件
|
||||||
|
cache[item.title] = data;
|
||||||
|
});
|
||||||
|
promises.push(promise);
|
||||||
|
}
|
||||||
|
Promise.all(promises)
|
||||||
|
.then(() => {
|
||||||
|
zip.generateAsync({ type: "blob" }).then((content) => {
|
||||||
|
// 生成二进制流
|
||||||
|
FileSaver.saveAs(content, "DesignFiles"); // 利用file-saver保存文件 自定义文件名
|
||||||
|
isShowMark = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
// message.warning(t('HomeView.jsContent3'));
|
||||||
|
isShowMark = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
//关闭画布
|
//关闭画布
|
||||||
let cancelDsign = () => {
|
let cancelDsign = () => {
|
||||||
showUpgradePlan.value = false
|
showUpgradePlan.value = false;
|
||||||
}
|
position = {
|
||||||
|
//设置每个图形位置的初始值
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
height: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
//设置画布宽高
|
//设置画布宽高
|
||||||
let setMaxInput = (str, maxNum) => {
|
let setMaxInput = (str, maxNum) => {
|
||||||
if(str == 'width' && canvasWH.value.width >= maxNum){
|
if (str == "width") {
|
||||||
canvasWH.value.width = maxNum
|
// maxNum = window.innerWidth < 1100 ? 400 : maxNum;
|
||||||
}else if(str == 'height' && canvasWH.value.height >= maxNum){
|
maxNum = [window.innerWidth/2.4]
|
||||||
canvasWH.value.height = maxNum
|
maxNum = maxNum.map(num => Math.round(num / 10) * 10)[0];
|
||||||
|
}
|
||||||
|
if (str == "width" && canvasWH.value.width >= maxNum) {
|
||||||
|
canvasWH.value.width = maxNum;
|
||||||
|
} else if (str == "height" && canvasWH.value.height >= maxNum) {
|
||||||
|
canvasWH.value.height = maxNum;
|
||||||
}
|
}
|
||||||
canvas.setHeight(canvasWH.value.height);
|
canvas.setHeight(canvasWH.value.height);
|
||||||
canvas.setWidth(canvasWH.value.width);
|
canvas.setWidth(canvasWH.value.width);
|
||||||
|
};
|
||||||
|
|
||||||
|
let closeNav = ref(false)
|
||||||
|
let setCloseNav = ()=>{
|
||||||
|
closeNav.value = !closeNav.value
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted (()=>{
|
function multiselect() {
|
||||||
|
canvas.discardActiveObject() // 丢弃当前活动的对象和触发事件。 如果fabric作为鼠标事件的结果调用该函数,则将该事件作为参数传递给自定义事件的fire函数。 当作为一个方法使用时,参数没有任何应用。
|
||||||
|
const sel = new fabric.ActiveSelection(canvas.getObjects(), {
|
||||||
|
canvas
|
||||||
})
|
})
|
||||||
|
// console.log(sel)
|
||||||
|
canvas.setActiveObject(sel)
|
||||||
|
canvas.requestRenderAll()
|
||||||
|
const activeObject = canvas.getActiveObject(); // 获取当前选中的整体对象
|
||||||
|
if (activeObject && activeObject.type === 'activeSelection') {
|
||||||
|
const totalWidth = activeObject.width * activeObject.scaleX;
|
||||||
|
const totalHeight = activeObject.height * activeObject.scaleY;
|
||||||
|
console.log('Total Width:', totalWidth);
|
||||||
|
console.log('Total Height:', totalHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
let currentType = ref()
|
||||||
|
let onDragstart = (type)=>{
|
||||||
|
console.log(type);
|
||||||
|
currentType.value = type
|
||||||
|
}
|
||||||
|
let canvasOnDrop = ()=>{
|
||||||
|
canvas.on('drop', function(opt) {
|
||||||
|
// 省略部分代码......
|
||||||
|
let offset = {
|
||||||
|
left: canvas.getSelectionElement().getBoundingClientRect().left,
|
||||||
|
top: canvas.getSelectionElement().getBoundingClientRect().top
|
||||||
|
}
|
||||||
|
let point = {
|
||||||
|
x: opt.e.x - offset.left,
|
||||||
|
y: opt.e.y - offset.top,
|
||||||
|
}
|
||||||
|
let pointerVpt = canvas.restorePointerVpt(point)
|
||||||
|
switch (currentType.value) {
|
||||||
|
case 'disposeMoodboard':
|
||||||
|
createRect(pointerVpt.y, pointerVpt.x)
|
||||||
|
break
|
||||||
|
case 'circle':
|
||||||
|
createCircle(pointerVpt.y, pointerVpt.x)
|
||||||
|
break
|
||||||
|
case 'img':
|
||||||
|
createImg(pointerVpt.y, pointerVpt.x)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
// 创建完元素,把当前操作的元素类型设置回 null
|
||||||
|
currentType.value = null
|
||||||
|
})
|
||||||
|
|
||||||
|
// 创建矩形
|
||||||
|
function createRect(top, left) {
|
||||||
|
canvas.add(new fabric.Rect({
|
||||||
|
top,
|
||||||
|
left,
|
||||||
|
width: 60,
|
||||||
|
height: 60,
|
||||||
|
fill: 'pink'
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
showUpgradePlan,
|
showUpgradePlan,
|
||||||
@@ -279,15 +674,19 @@ export default defineComponent({
|
|||||||
setExport,
|
setExport,
|
||||||
cancelDsign,
|
cancelDsign,
|
||||||
setMaxInput,
|
setMaxInput,
|
||||||
|
isShowMark,
|
||||||
|
allBoardData,
|
||||||
|
closeNav,
|
||||||
|
setCloseNav,
|
||||||
|
multiselect,
|
||||||
|
onDragstart,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
data(prop) {
|
data(prop) {
|
||||||
return {
|
return {};
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {},
|
||||||
},
|
|
||||||
watch: {
|
watch: {
|
||||||
// driver__:{
|
// driver__:{
|
||||||
// handler(newVal,oldVal){
|
// handler(newVal,oldVal){
|
||||||
@@ -297,18 +696,11 @@ export default defineComponent({
|
|||||||
// }else{
|
// }else{
|
||||||
// }
|
// }
|
||||||
// }else if(this.type_.type2 == 'Sketchboard'){
|
// }else if(this.type_.type2 == 'Sketchboard'){
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
methods: {},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@@ -336,7 +728,7 @@ export default defineComponent({
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
.fi-rr-cross-small::before {
|
.fi-rr-cross-small::before {
|
||||||
padding: calc(.2rem*1.2);
|
padding: calc(0.2rem * 1.2);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
border: solid 2px rgba(0, 0, 0, 0.25);
|
border: solid 2px rgba(0, 0, 0, 0.25);
|
||||||
transition: 1s all;
|
transition: 1s all;
|
||||||
@@ -352,10 +744,34 @@ export default defineComponent({
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
|
justify-content: space-between;
|
||||||
.exportCanvasBox_title {
|
.exportCanvasBox_title {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: .5rem;
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
margin-top: 2rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-right: 2rem;
|
||||||
|
cursor: pointer;
|
||||||
|
.icon{
|
||||||
|
transition: all .3s;
|
||||||
|
}
|
||||||
|
&.icon-rotate{
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.exportCanvasBox_intro{
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-size: 1.6rem;
|
||||||
|
font-weight: 600;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.exportCanvasBox_right,
|
||||||
|
.exportCanvasBox_left {
|
||||||
|
width: 25rem;
|
||||||
|
height: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
.exportCanvasBox_left {
|
.exportCanvasBox_left {
|
||||||
label {
|
label {
|
||||||
@@ -368,6 +784,42 @@ export default defineComponent({
|
|||||||
width: 10em;
|
width: 10em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.exportCanvasBox_img {
|
||||||
|
transition: .3s all;
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto;
|
||||||
|
&.closeNav{
|
||||||
|
// height: 0;
|
||||||
|
}
|
||||||
|
.exportCanvasBox_allItem {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.exportCanvasBox_item {
|
||||||
|
text-align: center;
|
||||||
|
img {
|
||||||
|
max-width: 7rem;
|
||||||
|
max-height: 7rem;
|
||||||
|
object-fit: contain;
|
||||||
|
margin-right: 2rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.exportCanvasBox_item_color{
|
||||||
|
width: 8rem;
|
||||||
|
margin-right: 2rem;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
.exportCanvasBox_item_BGcolor{
|
||||||
|
height: 5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.exportCanvasBox_item_dispose{
|
||||||
|
img{
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.exportCanvasBox_center {
|
.exportCanvasBox_center {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -379,10 +831,7 @@ export default defineComponent({
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.Export {
|
.Export {
|
||||||
|
|||||||
@@ -37,12 +37,13 @@
|
|||||||
class="trialApproval button_second credits hideChecked"
|
class="trialApproval button_second credits hideChecked"
|
||||||
>
|
>
|
||||||
Credits :
|
Credits :
|
||||||
<span :title="presentAssignment">
|
<span :title="credits">
|
||||||
<!-- <div>{{ String(presentAssignment[presentAssignment.legnth-1]) }}</div> -->
|
<!-- <div>{{ String(credits.value[credits.value.legnth-1]) }}</div> -->
|
||||||
<div class="credits_item" v-for="item in String(presentAssignment)" :style="{'transform': 'translateY('+item*-100+'%)'}">
|
<div class="credits_item" v-for="item in String(credits)" :style="{'transform': 'translateY('+item*-100+'%)'}">
|
||||||
<div v-for="numItem in 10">{{ numItem-1 }}</div>
|
<div v-for="numItem in 10">{{ numItem-1 }}</div>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
|
<i @click="getCredits" class="fi fi-br-refresh" :class="[activeCredits?'active':'']"></i>
|
||||||
<i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i>
|
<i @click="Assignment" class="fi fi-rr-gift" title="Assignment"></i>
|
||||||
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
<i @click="UpgradePlan" title="Purchase" class="fi fi-rr-shop"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,6 +104,11 @@
|
|||||||
<span class="icon iconfont icon-yuyan"></span>
|
<span class="icon iconfont icon-yuyan"></span>
|
||||||
<span class="select_item_des">{{$t('Header.language')}}</span>
|
<span class="select_item_des">{{$t('Header.language')}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="select_item" @click="orderForm()">
|
||||||
|
|
||||||
|
<i class="fi fi-rs-notebook"></i>
|
||||||
|
<span class="select_item_des">View Orders</span>
|
||||||
|
</div>
|
||||||
<div class="select_item" @click="logout()">
|
<div class="select_item" @click="logout()">
|
||||||
<span class="icon iconfont icon-tuichu"></span
|
<span class="icon iconfont icon-tuichu"></span
|
||||||
><span class="select_item_des">{{$t('Header.logOff')}}</span>
|
><span class="select_item_des">{{$t('Header.logOff')}}</span>
|
||||||
@@ -179,13 +185,15 @@
|
|||||||
<!-- 绑定邮箱第一步 end -->
|
<!-- 绑定邮箱第一步 end -->
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<payOrder ref="payOrder"></payOrder>
|
||||||
<UpgradePlan ref="UpgradePlan"></UpgradePlan>
|
<UpgradePlan ref="UpgradePlan"></UpgradePlan>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script >
|
<script >
|
||||||
import { defineComponent, createVNode, ref } from "vue";
|
import { defineComponent, createVNode, ref, computed } from "vue";
|
||||||
import { isEmail } from "@/tool/util";
|
import { isEmail } from "@/tool/util";
|
||||||
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
|
||||||
|
import payOrder from "@/component/Pay/payOrder.vue";
|
||||||
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
|
import VerificationCodeInput from "@/component/LoginPage/verificationCodeInput.vue";
|
||||||
import Habit from "@/component/Detail/habit.vue";
|
import Habit from "@/component/Detail/habit.vue";
|
||||||
import UpgradePlan from "@/component/HomePage/UpgradePlan.vue";
|
import UpgradePlan from "@/component/HomePage/UpgradePlan.vue";
|
||||||
@@ -200,6 +208,7 @@ export default defineComponent({
|
|||||||
VerificationCodeInput,
|
VerificationCodeInput,
|
||||||
Habit,
|
Habit,
|
||||||
UpgradePlan,
|
UpgradePlan,
|
||||||
|
payOrder,
|
||||||
},
|
},
|
||||||
setup(){
|
setup(){
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@@ -207,12 +216,18 @@ export default defineComponent({
|
|||||||
const {locale} = useI18n()
|
const {locale} = useI18n()
|
||||||
let isTest = ref()
|
let isTest = ref()
|
||||||
let isMurmur = ref()
|
let isMurmur = ref()
|
||||||
|
let credits = computed(()=>{
|
||||||
|
return store.state.UserHabit.credits.value
|
||||||
|
})
|
||||||
|
let activeCredits = ref(false)
|
||||||
return {
|
return {
|
||||||
store,
|
store,
|
||||||
t,
|
t,
|
||||||
locale,
|
locale,
|
||||||
isTest,
|
isTest,
|
||||||
isMurmur,
|
isMurmur,
|
||||||
|
credits,
|
||||||
|
activeCredits,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -243,11 +258,10 @@ export default defineComponent({
|
|||||||
// {name:'Tiếng Việt',value:'VIETNAMESE'},
|
// {name:'Tiếng Việt',value:'VIETNAMESE'},
|
||||||
// {name:'Italiano',value:'ITALIAN'},
|
// {name:'Italiano',value:'ITALIAN'},
|
||||||
],
|
],
|
||||||
presentAssignment:String(0),
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// presentAssignment(newVal,oldVal){
|
// credits.value(newVal,oldVal){
|
||||||
// console.log(String(newVal).length);
|
// console.log(String(newVal).length);
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
@@ -283,7 +297,16 @@ export default defineComponent({
|
|||||||
UpgradePlan.init()
|
UpgradePlan.init()
|
||||||
},
|
},
|
||||||
Assignment(){//任务
|
Assignment(){//任务
|
||||||
this.presentAssignment = Number(this.presentAssignment) + 123
|
let num = 123+this.credits
|
||||||
|
this.store.commit('setCredits',num)
|
||||||
|
},
|
||||||
|
getCredits(){//刷新当前积分
|
||||||
|
let num = 123+this.credits
|
||||||
|
this.activeCredits = true
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.activeCredits = false
|
||||||
|
},300)
|
||||||
|
this.store.commit('setCredits',num)
|
||||||
},
|
},
|
||||||
//点击下拉图标出现操作
|
//点击下拉图标出现操作
|
||||||
changeShowOperateContent() {
|
changeShowOperateContent() {
|
||||||
@@ -364,7 +387,11 @@ export default defineComponent({
|
|||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//查看订单
|
||||||
|
orderForm(){
|
||||||
|
let payOrder = this.$refs.payOrder
|
||||||
|
payOrder.init()
|
||||||
|
},
|
||||||
//登出
|
//登出
|
||||||
async logout() {
|
async logout() {
|
||||||
let data = {
|
let data = {
|
||||||
@@ -654,6 +681,7 @@ export default defineComponent({
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
margin-right: .9rem;
|
||||||
.credits_item{
|
.credits_item{
|
||||||
transition: .3s all;
|
transition: .3s all;
|
||||||
div{
|
div{
|
||||||
@@ -670,6 +698,15 @@ export default defineComponent({
|
|||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.fi-br-refresh{
|
||||||
|
margin-left: 0;
|
||||||
|
border-left: none;
|
||||||
|
padding-left: 0;
|
||||||
|
&.active{
|
||||||
|
transition: all .3s;
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.trialApproval{
|
.trialApproval{
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<!-- 如果需要套餐就78 -->
|
||||||
<a-modal class="modal_component UpgradePlan_modal"
|
<a-modal class="modal_component UpgradePlan_modal"
|
||||||
v-model:visible="showUpgradePlan"
|
v-model:visible="showUpgradePlan"
|
||||||
:footer="null"
|
:footer="null"
|
||||||
width="78%"
|
width="35%"
|
||||||
:maskClosable="false"
|
:maskClosable="false"
|
||||||
:centered="true"
|
:centered="true"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
@@ -13,15 +14,15 @@
|
|||||||
<i class="fi fi-rr-cross-small" @click.stop="cancelDsign()"></i>
|
<i class="fi fi-rr-cross-small" @click.stop="cancelDsign()"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="UpgradePlan_content">
|
<div class="UpgradePlan_content">
|
||||||
<div>Upgrade your Account Subscription Plan</div>
|
<div>Buy credlts</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="stepNum == 0" class="UpgradePlan_nav">
|
<!-- <div v-show="stepNum == 0" class="UpgradePlan_nav">
|
||||||
<div class="UpgradePlan_nav_content">
|
<div class="UpgradePlan_nav_content">
|
||||||
<div :class="[planNum == 0 ? 'active':'']" @click="setPlan(0)">Monthly</div>
|
<div :class="[planNum == 0 ? 'active':'']" @click="setPlan(0)">Monthly</div>
|
||||||
<div :class="[planNum == 1 ? 'active':'']" @click="setPlan(1)">Annual(save 20%)</div>
|
<div :class="[planNum == 1 ? 'active':'']" @click="setPlan(1)">Annual(save 20%)</div>
|
||||||
<div :class="[planNum == 2 ? 'active':'']" @click="setPlan(2)">Buy Credits</div>
|
<div :class="[planNum == 2 ? 'active':'']" @click="setPlan(2)">Buy Credits</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div v-show="stepNum == 0" class="UpgradePlan_payList">
|
<div v-show="stepNum == 0" class="UpgradePlan_payList">
|
||||||
<div v-show="planNum == 0" class="UpgradePlan_payList0">
|
<div v-show="planNum == 0" class="UpgradePlan_payList0">
|
||||||
<div class="UpgradePlan_payList-item" v-for="item in productList">
|
<div class="UpgradePlan_payList-item" v-for="item in productList">
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="UpgradePlan_payList-item-upgrade subitOkPreviewBtn" @click="upgrade(item.id)">UPGRADE NOW</div>
|
<div class="UpgradePlan_payList-item-upgrade subitOkPreviewBtn" @click="upgrade(item.id)">UPGRADE NOW</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="planNum == 2" class="UpgradePlan_payList2">
|
<div v-show="planNum == 2" class="UpgradePlan_payList2">
|
||||||
@@ -57,14 +59,14 @@
|
|||||||
<img src="https://code-create.com.hk/wp-content/uploads/2022/11/aida_premium_thumb-300x300.jpg" alt="">
|
<img src="https://code-create.com.hk/wp-content/uploads/2022/11/aida_premium_thumb-300x300.jpg" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="UpgradePlan_payList2_name">{{ price.credits * price.num }} credits</div>
|
<div class="UpgradePlan_payList2_name">{{ price.credits * price.num }} credits</div>
|
||||||
<div class="UpgradePlan_payList2_unitPrice">${{ price.price * price.num }} <span @click="setUnit">USD</span></div>
|
<div class="UpgradePlan_payList2_unitPrice">${{ price.price * price.num }} <span @click="setUnit">HKD</span></div>
|
||||||
<div class="UpgradePlan_payList2_input">
|
<div class="UpgradePlan_payList2_input">
|
||||||
<div class="UpgradePlan_payList2_input_remo" @click="removePriceNum">-</div>
|
<div class="UpgradePlan_payList2_input_remo" @click="removePriceNum">-</div>
|
||||||
<input type="number" v-model="price.num">
|
<input type="number" v-model="price.num">
|
||||||
<div class="UpgradePlan_payList2_input_add" @click="addPriceNum">+</div>
|
<div class="UpgradePlan_payList2_input_add" @click="addPriceNum">+</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="UpgradePlan_payList2_describe">All credits are shared within the {{ }} name organization</div>
|
<div class="UpgradePlan_payList2_describe">All credits are shared within the {{ }} name organization</div>
|
||||||
<div class="UpgradePlan_payList-item-upgrade subitOkPreviewBtn" @click="upgrade">UPGRADE NOW</div>
|
<div class="UpgradePlan_payList-item-upgrade subitOkPreviewBtn" @click="upgrade(1)">Continue</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,19 +74,19 @@
|
|||||||
<div class="UpgradePlan_payAffirm_title">Select payment method</div>
|
<div class="UpgradePlan_payAffirm_title">Select payment method</div>
|
||||||
<div class="UpgradePlan_payAffirm_content">
|
<div class="UpgradePlan_payAffirm_content">
|
||||||
<label>
|
<label>
|
||||||
<input name="payAffirm" type="radio" value="alipay" v-model="modeOfPayment">
|
<input name="payAffirm" type="radio" value="paypal" v-model="modeOfPayment">
|
||||||
<img src="https://ecmb.bdimg.com/tam-ogel/-1860672422_-148079605_900_900.png" alt="">
|
<img src="https://ecmb.bdimg.com/tam-ogel/-1860672422_-148079605_900_900.png" alt="">
|
||||||
PayPal
|
PayPal
|
||||||
</label>
|
</label>
|
||||||
<div class="UpgradePlan_payAffirm_content_btn" :class="[modeOfPayment == 'alipay'?'active':'']">
|
<div class="UpgradePlan_payAffirm_content_btn" :class="[modeOfPayment == 'paypal'?'active':'']">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<label>
|
<label>
|
||||||
<input name="payAffirm" type="radio" value="paypal" v-model="modeOfPayment">
|
<input name="payAffirm" type="radio" value="alipay" v-model="modeOfPayment">
|
||||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAEXRFWHRTb2Z0d2FyZQBTbmlwYXN0ZV0Xzt0AAANmSURBVEiJvZZdaFxFFMd/M/cj926yu02MWWObEm3quoHGYBJBC4aCqbRRKoE+aLH6JhUFBT9Aij4oiooSfKn4oiA+FKlIkfbBj3TZYkGDDVWs1M1aaKgkJqEJazab+zE+3Gziunu3qwmep7kz95zfzH/OmRmhlFL8D6aXGl9ecjl2dpncnIe/QbQmIdmm8dwei/6OACGUUiqTc3nqxBKbvTgp4NjBRu7u1JEAo+nlTYcA+Ao+OFcEVqWbnPXqcoxZgvdGGtEljE95jJ4pXNcnN+evg+rdkyZTcOc2DYA//vTr8inF1sN+MDXQpCjrs4z1b10KbEP80w3XVzhVBAoFvf5AhL1JI3Sm93TqfP1krKL/xIUV3hmrlDQU9MLJAi+Kcof2qODUE1EAvvjZ4ZXTS6ETqRvkK8XANp2bYnKtrzmyLtXOVsnhgYYyn29/c8jOVt+7UBBAe1zS1SrL+j76rrjWbm0U9G7V6d0aJMhDOTc0Vk3QyZ9Wag0D8OEjTQBcnvfJzYWXSVVQS0QylNRJtmlYusDxFNN5RXbWZ2LKZSYfyNPZoq2l++c/1p5UBWgoafDq/giWDtN5haVB3BaUMl0p+GXG46tLDqmEhgCuFRTHz/8LUGeL5I3hCO+fK/LJeJGCE1RbxBR0JzQGu3T2pUxSCY1UQlvzuzzvs71Z4+J0+B4JpZTqeWsBgGcHLYQQvFvjaNGlYKTH4Oheu2Ls6oLPWNblm18dfphy8XyI25LM09HyFW1v1vjsQm0JpAjkBSi6iquLiltagsy8OS451GdyqM9kcVmRybmMXwlWWQaayfsMdulkck5VyI1NgjcfjNDfoeP5QVGfyTrcu0Pnsbss+jvW5YxZguFug+FuoxL06USR449HWfHg4++L/L4YZNcNjZKRHpNH+0222IJ8UXH0VIGxbDCh9KRLejJPKqFxeKCB+2830MvLr3yPAPbsNHhtn03UCgI6HmyxBWI168aveLx8eompa+Gnd1uT4OG+Bg7eYRKzRHVQadn7Uya72iUxW1BYgdy8TzrrcHG6vrsLwDYEB3YZvHSfHYB6317Y8DshzKSAiefjwVV+a6t2vf//s+1YjS0BjuwO6mezTQjBM4NW0C696zI5l9H0MpOzG39uSRGodGS3xdBtf3tubSxsffYXznw1EQcnMd4AAAAASUVORK5CYII=" alt="">
|
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAEXRFWHRTb2Z0d2FyZQBTbmlwYXN0ZV0Xzt0AAANmSURBVEiJvZZdaFxFFMd/M/cj926yu02MWWObEm3quoHGYBJBC4aCqbRRKoE+aLH6JhUFBT9Aij4oiooSfKn4oiA+FKlIkfbBj3TZYkGDDVWs1M1aaKgkJqEJazab+zE+3Gziunu3qwmep7kz95zfzH/OmRmhlFL8D6aXGl9ecjl2dpncnIe/QbQmIdmm8dwei/6OACGUUiqTc3nqxBKbvTgp4NjBRu7u1JEAo+nlTYcA+Ao+OFcEVqWbnPXqcoxZgvdGGtEljE95jJ4pXNcnN+evg+rdkyZTcOc2DYA//vTr8inF1sN+MDXQpCjrs4z1b10KbEP80w3XVzhVBAoFvf5AhL1JI3Sm93TqfP1krKL/xIUV3hmrlDQU9MLJAi+Kcof2qODUE1EAvvjZ4ZXTS6ETqRvkK8XANp2bYnKtrzmyLtXOVsnhgYYyn29/c8jOVt+7UBBAe1zS1SrL+j76rrjWbm0U9G7V6d0aJMhDOTc0Vk3QyZ9Wag0D8OEjTQBcnvfJzYWXSVVQS0QylNRJtmlYusDxFNN5RXbWZ2LKZSYfyNPZoq2l++c/1p5UBWgoafDq/giWDtN5haVB3BaUMl0p+GXG46tLDqmEhgCuFRTHz/8LUGeL5I3hCO+fK/LJeJGCE1RbxBR0JzQGu3T2pUxSCY1UQlvzuzzvs71Z4+J0+B4JpZTqeWsBgGcHLYQQvFvjaNGlYKTH4Oheu2Ls6oLPWNblm18dfphy8XyI25LM09HyFW1v1vjsQm0JpAjkBSi6iquLiltagsy8OS451GdyqM9kcVmRybmMXwlWWQaayfsMdulkck5VyI1NgjcfjNDfoeP5QVGfyTrcu0Pnsbss+jvW5YxZguFug+FuoxL06USR449HWfHg4++L/L4YZNcNjZKRHpNH+0222IJ8UXH0VIGxbDCh9KRLejJPKqFxeKCB+2830MvLr3yPAPbsNHhtn03UCgI6HmyxBWI168aveLx8eompa+Gnd1uT4OG+Bg7eYRKzRHVQadn7Uya72iUxW1BYgdy8TzrrcHG6vrsLwDYEB3YZvHSfHYB6317Y8DshzKSAiefjwVV+a6t2vf//s+1YjS0BjuwO6mezTQjBM4NW0C696zI5l9H0MpOzG39uSRGodGS3xdBtf3tubSxsffYXznw1EQcnMd4AAAAASUVORK5CYII=" alt="">
|
||||||
支付宝
|
支付宝
|
||||||
</label>
|
</label>
|
||||||
<div class="UpgradePlan_payAffirm_content_btn" :class="[modeOfPayment == 'paypal'?'active':'']">
|
<div class="UpgradePlan_payAffirm_content_btn" :class="[modeOfPayment == 'alipay'?'active':'']">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,11 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mark_loading" v-show="isShowMark">
|
<div class="mark_loading" v-show="isShowMark">
|
||||||
<div>Has it been paid?</div>
|
<div class="mark_loading_title" @click="getTradeQuery">Paid completed</div>
|
||||||
<div>
|
|
||||||
<div @click="getTradeQuery">Yes</div>
|
|
||||||
<div @click="getTradeQuery">No</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</template>
|
</template>
|
||||||
@@ -128,20 +126,23 @@ export default defineComponent({
|
|||||||
props: ["msg",'sketchCatecoryList'],
|
props: ["msg",'sketchCatecoryList'],
|
||||||
setup() {
|
setup() {
|
||||||
// console.log(prop.msg);
|
// console.log(prop.msg);
|
||||||
|
const store = useStore();
|
||||||
let showUpgradePlan = ref(false)
|
let showUpgradePlan = ref(false)
|
||||||
let planNum = ref(0)
|
let planNum = ref(2)
|
||||||
let stepNum = ref(0)
|
let stepNum = ref(0)
|
||||||
let price = ref({
|
let price = ref({
|
||||||
num:1,
|
num:1,
|
||||||
price:15,
|
price:15,
|
||||||
credits:115,
|
credits:115,
|
||||||
})
|
})
|
||||||
let modeOfPayment = ref('alipay')
|
let modeOfPayment = ref('paypal')
|
||||||
let clause = ref(false)//同意条款
|
let clause = ref(false)//同意条款
|
||||||
let productList = ref([])
|
let productList = ref([])
|
||||||
let payIndex = ref(0)
|
let payIndex = ref(0)
|
||||||
let isShowMark = ref(false)
|
let isShowMark = ref(false)
|
||||||
|
let newWindow:any = ref()
|
||||||
return {
|
return {
|
||||||
|
store,
|
||||||
showUpgradePlan,
|
showUpgradePlan,
|
||||||
planNum,
|
planNum,
|
||||||
stepNum,
|
stepNum,
|
||||||
@@ -151,6 +152,7 @@ export default defineComponent({
|
|||||||
productList,
|
productList,
|
||||||
payIndex,
|
payIndex,
|
||||||
isShowMark,
|
isShowMark,
|
||||||
|
newWindow,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
data(prop) {
|
data(prop) {
|
||||||
@@ -162,17 +164,12 @@ export default defineComponent({
|
|||||||
this.getProductList()
|
this.getProductList()
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
// driver__:{
|
// newWindowState:{
|
||||||
// handler(newVal,oldVal){
|
// handler(newVal,oldVal){
|
||||||
// if(this.type_.type2 == 'Printboard'){
|
// console.log(newVal);
|
||||||
// if(newVal.index >= 14 && newVal.index < 15){
|
// if(newVal){
|
||||||
// this.setKeyword(newVal.index-14)
|
// this.newWindow?.close();
|
||||||
// }else{
|
|
||||||
// }
|
// }
|
||||||
// }else if(this.type_.type2 == 'Sketchboard'){
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
|
||||||
@@ -205,32 +202,54 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
payment(){//付款
|
payment(){//付款
|
||||||
console.log(this.modeOfPayment,'alipay','paypal');
|
// console.log(this.modeOfPayment,'alipay','paypal');
|
||||||
|
let url = window.location.href
|
||||||
|
// url = url.replace(/\/[^/]+$/, '') + '/home';
|
||||||
|
url = url.replace(/\/[^/]+$/, '') + '/paySucceed';
|
||||||
if(!this.clause){
|
if(!this.clause){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let url = window.location.href
|
let httpsUrl = Https.httpUrls.payAlipay
|
||||||
url = url.replace(/\/[^/]+$/, '') + '/paySucceed';
|
|
||||||
Https.axiosPost(Https.httpUrls.pagePay+`/${this.payIndex}?returnUrl=${url}`, {returnUrl:url}).then(
|
if(this.modeOfPayment == 'paypal'){
|
||||||
|
httpsUrl = Https.httpUrls.payPaypal
|
||||||
|
}
|
||||||
|
Https.axiosPost(httpsUrl+`/${this.payIndex}?returnUrl=${url}`, {returnUrl:url}).then(
|
||||||
(rv: any) => {
|
(rv: any) => {
|
||||||
// var newWindow:any = window.open();
|
console.log(rv);
|
||||||
// newWindow.document.write(rv);
|
var width = 800;
|
||||||
document.write(rv);
|
var height = 600;
|
||||||
|
var left = (screen.width - width) / 2;
|
||||||
|
var top = (screen.height - height) / 2;
|
||||||
|
this.newWindow = window.open("", "_blank", "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top);
|
||||||
|
if(this.modeOfPayment == 'paypal'){
|
||||||
|
// 在新窗口中写入内容
|
||||||
|
// newWindow.document.write(rv.approve);
|
||||||
|
this.newWindow.location.href = rv.approve;
|
||||||
|
}else{
|
||||||
|
this.newWindow.document.write(rv);
|
||||||
|
}
|
||||||
|
this.isShowMark = true
|
||||||
// this.isShowMark = true
|
// this.isShowMark = true
|
||||||
}
|
}
|
||||||
).catch(res=>{
|
).catch(res=>{
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//查询是否支付
|
//查询是否支付
|
||||||
// getTradeQuery(){
|
getTradeQuery(){
|
||||||
|
this.isShowMark = false
|
||||||
|
this.newWindow.close();
|
||||||
|
let num = this.store.state.UserHabit.credits.value+111
|
||||||
|
this.store.commit('setCredits',num)
|
||||||
|
|
||||||
// let params = 1
|
// let params = 1
|
||||||
// Https.axiosGet(Https.httpUrls.tradeQuery,{params:{enumName:params}}).then((rv) => {
|
// Https.axiosGet(Https.httpUrls.tradeQuery,{params:{enumName:params}}).then((rv) => {
|
||||||
// if (rv) {
|
// if (rv) {
|
||||||
// console.log(rv);
|
// console.log(rv);
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// },
|
},
|
||||||
cancel(){//取消
|
cancel(){//取消
|
||||||
this.stepNum = 0
|
this.stepNum = 0
|
||||||
this.modeOfPayment = 'alipay'
|
this.modeOfPayment = 'alipay'
|
||||||
@@ -256,6 +275,9 @@ export default defineComponent({
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-right: 1px solid #e5e5e5;
|
border-right: 1px solid #e5e5e5;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
.mark_loading{
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
.UpgradePlan_content{
|
.UpgradePlan_content{
|
||||||
font-size: var(--aida-fsize2);
|
font-size: var(--aida-fsize2);
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
@@ -350,7 +372,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
.UpgradePlan_payList2_name,.UpgradePlan_payList2_unitPrice{
|
.UpgradePlan_payList2_name,.UpgradePlan_payList2_unitPrice{
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
font-weight: 600;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
.UpgradePlan_payList2_name{
|
.UpgradePlan_payList2_name{
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
@@ -361,7 +383,7 @@ export default defineComponent({
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
div{
|
div{
|
||||||
font-size: 4rem;
|
font-size: 4rem;
|
||||||
font-weight: 600;
|
font-weight: 800;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
input{
|
input{
|
||||||
@@ -385,12 +407,12 @@ export default defineComponent({
|
|||||||
.UpgradePlan_payList2_describe{
|
.UpgradePlan_payList2_describe{
|
||||||
background: #f2f2f4;
|
background: #f2f2f4;
|
||||||
padding: 1rem 3rem;
|
padding: 1rem 3rem;
|
||||||
border-radius: 2rem;
|
border-radius: 1.2rem;
|
||||||
}
|
}
|
||||||
.UpgradePlan_payList-item-upgrade{
|
.UpgradePlan_payList-item-upgrade{
|
||||||
position: initial;
|
position: initial;
|
||||||
transform: translate(0,0);
|
transform: translate(0,0);
|
||||||
padding: 1rem 2rem;
|
// padding: 1rem 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,8 +519,8 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: calc(5rem*1.2) calc(5rem*1.2) !important;
|
padding: calc(5rem*1.2) calc(5rem*1.2) !important;
|
||||||
// height: calc(65vh - 6.4rem);
|
height: calc(55rem*1.2);
|
||||||
height: calc(65rem*1.2);
|
// height: calc(65rem*1.2);
|
||||||
}
|
}
|
||||||
//进度完成字体颜色
|
//进度完成字体颜色
|
||||||
.ant-progress-circle.ant-progress-status-success .ant-progress-text{
|
.ant-progress-circle.ant-progress-status-success .ant-progress-text{
|
||||||
|
|||||||
@@ -79,12 +79,13 @@
|
|||||||
v-if="column?.Operations"
|
v-if="column?.Operations"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
v-if="record.orderStatus == '支付成功'"
|
||||||
class="operate_item"
|
class="operate_item"
|
||||||
@click="refund(record)"
|
@click="refund(record)"
|
||||||
>
|
>
|
||||||
refund
|
refund
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="operate_item" @click="deleteGroup(record, index)">{{ $t('HistoryPage.Delete') }}</div> -->
|
<div class="operate_item">{{ $t('HistoryPage.Delete') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -139,19 +140,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, ref, createVNode, computed, nextTick } from "vue";
|
import { defineComponent, ref, createVNode, computed, nextTick } from "vue";
|
||||||
import HeaderComponent from "@/component/HomePage/Header.vue";
|
|
||||||
import HistoryDetail from "@/component/Detail/HistoryDetail.vue";
|
|
||||||
import { Https } from "@/tool/https";
|
import { Https } from "@/tool/https";
|
||||||
import { formatTime } from "@/tool/util";
|
import { formatTime } from "@/tool/util";
|
||||||
import { Modal, message } from "ant-design-vue";
|
import { Modal, message } from "ant-design-vue";
|
||||||
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
|
|
||||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
HeaderComponent,
|
|
||||||
HistoryDetail,
|
|
||||||
RobotAssist,
|
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
let rangePickerValue: any = ref([]);
|
let rangePickerValue: any = ref([]);
|
||||||
@@ -207,7 +202,7 @@ export default defineComponent({
|
|||||||
title: useI18n().t("HistoryPage.Operations"),
|
title: useI18n().t("HistoryPage.Operations"),
|
||||||
key: "operation",
|
key: "operation",
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "right",
|
fixed: "left",
|
||||||
width: 90,
|
width: 90,
|
||||||
// slots:{customRender:'action'}
|
// slots:{customRender:'action'}
|
||||||
Operations: true,
|
Operations: true,
|
||||||
@@ -251,14 +246,12 @@ export default defineComponent({
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
console.log(123123);
|
|
||||||
this.showPayOrder = true;
|
this.showPayOrder = true;
|
||||||
this.getHistoryList();
|
this.getHistoryList();
|
||||||
nextTick().then(() => {
|
nextTick().then(() => {
|
||||||
let history_table_content = document.getElementsByClassName(
|
let history_table_content = document.getElementsByClassName(
|
||||||
"history_table_content"
|
"history_table_content"
|
||||||
)[0];
|
)[0];
|
||||||
console.log(history_table_content);
|
|
||||||
this.historyTableHeight =
|
this.historyTableHeight =
|
||||||
history_table_content.scrollHeight - 130;
|
history_table_content.scrollHeight - 130;
|
||||||
});
|
});
|
||||||
@@ -299,13 +292,12 @@ export default defineComponent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
Https.axiosGet(Https.httpUrls.orderInfoList).then((rv: any) => {
|
Https.axiosGet(Https.httpUrls.orderInfoList).then((rv: any) => {
|
||||||
console.log(rv);
|
|
||||||
this.total = rv.length;
|
this.total = rv.length;
|
||||||
console.log(this.total);
|
|
||||||
this.collectionList = rv.slice(
|
this.collectionList = rv.slice(
|
||||||
(this.currentPage - 1) * this.pageSize,
|
(this.currentPage - 1) * this.pageSize,
|
||||||
(this.currentPage - 1) * this.pageSize + this.pageSize
|
(this.currentPage - 1) * this.pageSize + this.pageSize
|
||||||
);
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
// Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
|
// Https.axiosPost( Https.httpUrls.queryUserGroup, data).then(
|
||||||
// (rv: any) => {
|
// (rv: any) => {
|
||||||
@@ -343,9 +335,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
refund(record: any) {
|
refund(record: any) {
|
||||||
// this.$router.push({name:'home',params: {id:record.id}})
|
// this.$router.push({name:'home',params: {id:record.id}})
|
||||||
this.record = record.orderNo
|
this.record = record
|
||||||
this.showRefundReason = true
|
this.showRefundReason = true
|
||||||
|
|
||||||
},
|
},
|
||||||
getReasonCategory(){
|
getReasonCategory(){
|
||||||
if(this.reason == 'Rests'){
|
if(this.reason == 'Rests'){
|
||||||
@@ -357,15 +348,19 @@ export default defineComponent({
|
|||||||
let reason = this.reason
|
let reason = this.reason
|
||||||
this.loadingShow = true
|
this.loadingShow = true
|
||||||
if(this.reason == 'Rests'){
|
if(this.reason == 'Rests'){
|
||||||
// console.log(this.reasonTextarea);
|
|
||||||
reason = this.reasonTextarea?this.reasonTextarea:this.reason
|
reason = this.reasonTextarea?this.reasonTextarea:this.reason
|
||||||
}
|
}
|
||||||
|
|
||||||
// return
|
// return
|
||||||
|
|
||||||
|
let httpsUrl = Https.httpUrls.tradeRefundAlipay
|
||||||
|
if(this.record.paymentType == "PayPal"){
|
||||||
|
httpsUrl = Https.httpUrls.tradeRefundPaypal
|
||||||
|
}
|
||||||
Https.axiosPost(
|
Https.axiosPost(
|
||||||
Https.httpUrls.tradeRefund + `/${this.record}/${reason}`,
|
httpsUrl + `/${this.record.orderNo}/${reason}`,
|
||||||
{}
|
{}
|
||||||
).then((rv: any) => {
|
).then((rv: any) => {
|
||||||
console.log(rv);
|
|
||||||
this.getHistoryList()
|
this.getHistoryList()
|
||||||
this.loadingShow = false
|
this.loadingShow = false
|
||||||
this.showRefundReason = false
|
this.showRefundReason = false
|
||||||
@@ -554,6 +549,7 @@ export default defineComponent({
|
|||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
|
|
||||||
.operate_item {
|
.operate_item {
|
||||||
|
flex: 1;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
font-family: Roboto;
|
font-family: Roboto;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
@@ -194,8 +194,8 @@ const UploadFilesModule : Module<UploadFiles,RootState> = {
|
|||||||
},
|
},
|
||||||
setAllBoardData(state){
|
setAllBoardData(state){
|
||||||
state.allBoardData = {
|
state.allBoardData = {
|
||||||
moodboardFiles:state.moodboard,
|
|
||||||
disposeMoodboard:state.disposeMoodboard,
|
disposeMoodboard:state.disposeMoodboard,
|
||||||
|
moodboardFiles:state.moodboard,
|
||||||
printboardFiles:state.printboard,
|
printboardFiles:state.printboard,
|
||||||
colorBoards:state.colorBoards,
|
colorBoards:state.colorBoards,
|
||||||
sketchboardFiles:state.sketchboard,
|
sketchboardFiles:state.sketchboard,
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {RootState} from '../index'
|
|||||||
import { Https } from "@/tool/https";
|
import { Https } from "@/tool/https";
|
||||||
interface DesignDetail{
|
interface DesignDetail{
|
||||||
clothingType:any,
|
clothingType:any,
|
||||||
|
credits:any,
|
||||||
// devise:any,
|
// devise:any,
|
||||||
// deviseType:any,
|
// deviseType:any,
|
||||||
// system_per:any,
|
// system_per:any,
|
||||||
@@ -13,13 +14,17 @@ interface DesignDetail{
|
|||||||
const HomeStoreModule : Module<DesignDetail,RootState> = {
|
const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||||
state:{
|
state:{
|
||||||
clothingType:[],
|
clothingType:[],
|
||||||
|
credits:{
|
||||||
|
value:0
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mutations:{
|
mutations:{
|
||||||
res_clothingType(state,data){
|
res_clothingType(state,data){
|
||||||
state.clothingType = data
|
state.clothingType = data
|
||||||
},
|
},
|
||||||
|
setCredits(state,data){
|
||||||
|
state.credits.value = data
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
actions:{
|
actions:{
|
||||||
@@ -39,7 +44,7 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
|||||||
// })
|
// })
|
||||||
// .catch((rv) => {
|
// .catch((rv) => {
|
||||||
// });
|
// });
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,9 +135,13 @@ export const Https = {
|
|||||||
|
|
||||||
//充值相关
|
//充值相关
|
||||||
productList:`/api/product/list`, //获取商品列表
|
productList:`/api/product/list`, //获取商品列表
|
||||||
pagePay:`/api/ali-pay/trade/page/pay`, //支付宝确认支付
|
payAlipay:`/api/ali-pay/trade/page/pay`, //支付宝确认支付
|
||||||
|
payPaypal:`/api/paypal/trade`, //paypal确认支付
|
||||||
|
|
||||||
orderInfoList:`/api/order-info/list`, //查询订单列表
|
orderInfoList:`/api/order-info/list`, //查询订单列表
|
||||||
tradeRefund:`/api/ali-pay/trade/refund`, //查询订单列表
|
tradeRefundAlipay:`/api/ali-pay/trade/refund`, //支付宝退款
|
||||||
|
tradeRefundPaypal:`/api/paypal/trade/refund`, //paypal退款
|
||||||
|
|
||||||
tradeQuery:`/api/ali-pay/trade/query/{orderNo}`, //查询订单状态
|
tradeQuery:`/api/ali-pay/trade/query/{orderNo}`, //查询订单状态
|
||||||
|
|
||||||
getRgbByHsvBatch:`/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息
|
getRgbByHsvBatch:`/api/element/getRgbByHsvBatch`, //通过hsv值数组批量获取潘通信息
|
||||||
|
|||||||
@@ -892,6 +892,13 @@ export default defineComponent({
|
|||||||
//处理选择组的数据
|
//处理选择组的数据
|
||||||
dealHistoryChooseData(data: any, type: any) {
|
dealHistoryChooseData(data: any, type: any) {
|
||||||
let collectionData = {
|
let collectionData = {
|
||||||
|
disposeMoodboard: data.collection.moodTemplateId?[{
|
||||||
|
id:data.collection.moodTemplateId,
|
||||||
|
imgUrl:data.collection.moodTemplateUrl,
|
||||||
|
resData:{
|
||||||
|
name:data.collection.moodTemplateName,
|
||||||
|
}
|
||||||
|
}]:[],
|
||||||
moodboardFiles: this.dealViewChooseData(
|
moodboardFiles: this.dealViewChooseData(
|
||||||
data.collection.moodBoards,"Moodboard"
|
data.collection.moodBoards,"Moodboard"
|
||||||
),
|
),
|
||||||
@@ -908,13 +915,7 @@ export default defineComponent({
|
|||||||
marketingSketchFiles: this.dealViewChooseData(
|
marketingSketchFiles: this.dealViewChooseData(
|
||||||
data.collection.marketingSketchs,""
|
data.collection.marketingSketchs,""
|
||||||
),
|
),
|
||||||
disposeMoodboard: data.collection.moodTemplateId?[{
|
|
||||||
id:data.collection.moodTemplateId,
|
|
||||||
imgUrl:data.collection.moodTemplateUrl,
|
|
||||||
resData:{
|
|
||||||
name:data.collection.moodTemplateName,
|
|
||||||
}
|
|
||||||
}]:[]
|
|
||||||
};
|
};
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
this.store.commit("setAllBoardDataChoose", collectionData);
|
this.store.commit("setAllBoardDataChoose", collectionData);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="paySucceed_page">
|
<div class="paySucceed_page">
|
||||||
<HeaderComponent></HeaderComponent>
|
<!-- <HeaderComponent></HeaderComponent> -->
|
||||||
<div class="paySucceed_centent">
|
<div class="paySucceed_centent">
|
||||||
<div class="paySucceed_centent_title"><i class="fi fi-ss-check-circle"></i>支付成功</div>
|
<div class="paySucceed_centent_title"><i class="fi fi-ss-check-circle"></i>支付成功</div>
|
||||||
<div class="paySucceed_centent_btn">
|
<div class="paySucceed_centent_btn">
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<payOrder ref="payOrder"></payOrder>
|
<payOrder ref="payOrder"></payOrder>
|
||||||
<RobotAssist></RobotAssist>
|
<!-- <RobotAssist></RobotAssist> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -20,6 +20,7 @@ import { Modal,message } from 'ant-design-vue';
|
|||||||
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
|
import RobotAssist from "@/component/HomePage/RobotAssist.vue";
|
||||||
import payOrder from "@/component/Pay/payOrder.vue";
|
import payOrder from "@/component/Pay/payOrder.vue";
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
|
import { useStore } from "vuex";
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
@@ -28,10 +29,10 @@ export default defineComponent({
|
|||||||
payOrder,
|
payOrder,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
|
const store = useStore();
|
||||||
let {t} = useI18n()
|
let {t} = useI18n()
|
||||||
return {
|
return {
|
||||||
|
store,
|
||||||
t,
|
t,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -41,7 +42,12 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
// sessionStorage.setItem('newWindow', JSON.stringify(true))
|
||||||
|
// let aa:any = sessionStorage.getItem('newWindow')
|
||||||
|
// window.alert(aa)
|
||||||
|
// aa.close();
|
||||||
|
window.close()
|
||||||
|
// this.store.commit('setNewWindow',true)
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
turnToPage(name:any) {
|
turnToPage(name:any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user