diff --git a/src/main/resources/static/assets/businessCard/js/requestUrl.js b/src/main/resources/static/assets/businessCard/js/requestUrl.js
index ff6beec..8168729 100644
--- a/src/main/resources/static/assets/businessCard/js/requestUrl.js
+++ b/src/main/resources/static/assets/businessCard/js/requestUrl.js
@@ -1,6 +1,6 @@
layui.define(function (exports) {
var obj = {
- url : 'http://192.168.0.115:8090/businesscard',
+ url : 'http://192.168.0.5:8090/businesscard',
sourceUrl: '/files/images/20210202/',
token: 'T3hrM2Y1eFB5eERaNXQ2bDdxZ3Y4elZVQnl6U3FWdlNBT3dGUENFNlNObjA5MWpTMW1CMG1iaSsvZmxGcERlMzV5RWw5TnplZjVIbmVQRTQ5SkVnWFF3YjdvWnVaRHhrL2l5TUNGWmFZcnJZVzI5UEhJdFVzdG55b3RLOTdKTzhmeFZvZ1hTd29qbnlYeWVSMURiTmpNNGJDOTFVbDVsMk5Ed3FiREh2QnpDcmNJV2J2am51TW1id3dmK2kwZnorUnJoN2cyakEzM2RGK0paNk5lUHdaS1M0WFBXamZMamxsSlFBUW9XaDYwcUhpWnhXYXdXeGNybk9kQ2kwTzdPcjF2STdrc0I3SFlwY0k5Q3FmbnlrMkxqUW1OL3NTVmZDT1hGcmlhbXcyMk1nZXV2dHRUck5seHJadXdGTjZlVnlKUjVKWlNGVm5UOVA1ckx6Vnl0Ky85WDVtVERzelcxSkVVdnFOOHdueXhGUTNzVTNJUERQelhrdnBVS1JrSm5vdlV2ajhQMXFTR1k4VGNtK2M3K1ZIcW80WHNHM0pFQk5yaGRxeEVGSEpEZDZ3VE9GWVgvY3JjQ1YvclM3TXVOckRmTDBMcnU0ZTBQRzI0eFlnYXI3ek1GOGJrelpKVVVXdm10QXV3K1EzY21LWDd3cGkwY3hySS9jbzdNT0tvMzc5SUpKUE1sZnJCbHNTbEJhRUJKVHZ0WU1mYUphRmZLZHhlNU9yaDd0SFo0PQ'
}
diff --git a/src/main/resources/static/route/namecard/namecard.html b/src/main/resources/static/route/namecard/namecard.html
index 5464b39..a4b9a97 100644
--- a/src/main/resources/static/route/namecard/namecard.html
+++ b/src/main/resources/static/route/namecard/namecard.html
@@ -166,7 +166,7 @@
} else {
var imgPath = ''
if (imgUrl) {
- imgPath = requestUrl.url + '/route/file/download/true/' +imgUrl
+ imgPath = 'route/file/download/true/' +imgUrl
} else {
imgPath = imgSrc
}
@@ -190,7 +190,7 @@
//创建右键菜单
context.context().attach('.box[rel='+curNum+']', [
{header: '操作'},
- {text: '编辑区域说明', action: function(e){
+ {text: '编辑区域', action: function(e){
e.preventDefault();
var curRemark = $('.box[rel='+curNum+']').attr('data-remark')
var curData = $('.box[rel='+curNum+']').attr('data-keyData')
@@ -231,7 +231,7 @@
cardTemplateId: id,
cardTemplateAreaId: $('.box[rel='+curNum+']').attr('dataarea')
}
- top.restAjax.delete(requestUrl.url + '/app/cardtemplatearea/removecardtemplatearea/' + obj.cardTemplateAreaId, obj, {
+ top.restAjax.delete('app/cardtemplatearea/removecardtemplatearea/' + obj.cardTemplateAreaId, obj, {
headers: {
token: token
}
@@ -247,7 +247,7 @@
type: 1,
title: '字体',
skin: 'layui-layer-rim', //加上边框
- area: ['350px', '230px'], //宽高
+ area: ['30%', '80%'], //宽高
content: boxHtml,
btn: ['确定','取消'],
yes: function () {
@@ -263,7 +263,7 @@
});
form.render()
form.on('select(card-color)', function (d) {
- top.restAjax.get(requestUrl.url + '/app/datadictionary/getdictionarybyid/' + d.value, {}, {
+ top.restAjax.get('app/datadictionary/getdictionarybyid/' + d.value, {}, {
headers: {
token: token
}
@@ -294,7 +294,7 @@
}
}
},
- {text: '蓝色', action: function(e){
+ /* {text: '蓝色', action: function(e){
e.preventDefault();
$('.box[rel='+curNum+'] .transparent').css('opacity', '0.5');
$('.box[rel='+curNum+'] .bg').css('background-color', 'rgba(0,0,255,0.5)');
@@ -338,7 +338,7 @@
$('.box[rel='+curNum+']').addClass('change')
}
}
- },
+ },*/
{text: '透明', action: function(e){
e.preventDefault();
$('.box[rel='+curNum+'] .bg').css('background-color', 'rgba(255,255,255,0)');
@@ -362,7 +362,7 @@
closeBtn: false,
area: ['500px','350px'],
btn: ['确认','取消'],
- content: '
内容
别名
',
+ content: '示例内容 名字 : | 张三
表单名称
',
yes: function (index) {
var title = $('#title').val()
var data = $('#data').val()
@@ -404,7 +404,7 @@
formdata.append('image', file)
$.ajax({
type: 'post',
- url: requestUrl.url + '/app/file/uploadimage',
+ url: 'app/file/uploadimage',
headers: {
token: token
},
@@ -436,7 +436,7 @@
$('.box .coor').hide();
html2canvas(document.querySelector("#canvas"),{allowTaint: true,useCORS: true}).then(canvas => {
$.ajax({
- url: requestUrl.url + '/app/cardtemplate/updatecardtemplateimagerelease/' + id,
+ url: 'app/cardtemplate/updatecardtemplateimagerelease/' + id,
data: {
templatePreviewPhoto: canvas.toDataURL()
},
@@ -513,23 +513,27 @@
obj['templateAreaType']=box_arr[i].type,
obj['cardTemplateAreaId'] = box_arr[i].templateAreaId
if (box_arr[i].isNew) {
- top.restAjax.post(requestUrl.url + '/app/cardtemplatearea/savecardtemplatearea', obj, {
+ top.restAjax.post('app/cardtemplatearea/savecardtemplatearea', obj, {
headers: {
token: token
}
}, function (res, data) {
- layer.msg('保存成功')
+ top.layer.msg('保存成功')
$('.new').removeClass('new')
+ }, function (res, data) {
+ top.layer.msg('保存失败')
})
}
if (box_arr[i].change) {
- top.restAjax.put(requestUrl.url + '/app/cardtemplatearea/updatecardtemplatearea/' + box_arr[i].templateAreaId, obj, {
+ top.restAjax.put('app/cardtemplatearea/updatecardtemplatearea/' + box_arr[i].templateAreaId, obj, {
headers: {
token: token
}
}, function (res, data) {
- layer.msg('保存成功')
+ top.layer.msg('保存成功')
$('.change').removeClass('change')
+ }, function (res, data) {
+ top.layer.msg('保存失败')
})
}
@@ -585,7 +589,7 @@
});
function getCard(){
- top.restAjax.get(requestUrl.url + '/app/cardtemplate/getcardtemplatebyid/' + id, {}, {
+ top.restAjax.get('app/cardtemplate/getcardtemplatebyid/' + id, {}, {
headers: {
token: token
}
@@ -597,19 +601,19 @@
$('#style').append('.box .content{font-family: ' + fontList[i].name + '}')
}
}
- var bgImg = '
'
+ var bgImg = '
'
// var bgImg = '
'
$('#canvas').append(bgImg)
// getBgImg(data.templatePhoto)
})
}
function getBgImg(id){
- top.restAjax.get(requestUrl.url + '/app/file/get/' + id, {}, {
+ top.restAjax.get( 'app/file/get/' + id, {}, {
headers: {
token: token
}
}, function (res, data) {
- var path = requestUrl.url + '/' + data.data
+ var path = data.data
var bgImg = '
'
$('#canvas').append(bgImg)
})
@@ -617,7 +621,7 @@
// getCard()
function getFont() {
- top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, {
+ top.restAjax.get('app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, {
headers: {
token: token
}
@@ -629,7 +633,7 @@
getFont()
function getFontSize() {
- top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=006c84b3-74e2-40ec-aae2-c1a9cfc2760c', {}, {
+ top.restAjax.get( 'app/datadictionary/listztreedictionary?id=006c84b3-74e2-40ec-aae2-c1a9cfc2760c', {}, {
headers: {
token: token
}
@@ -647,7 +651,7 @@
getFontSize()
function getColor(){
- top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=f15819fa-bc81-4553-8b81-59741d02f2bf', {}, {
+ top.restAjax.get('app/datadictionary/listztreedictionary?id=f15819fa-bc81-4553-8b81-59741d02f2bf', {}, {
headers: {
token: token
}
@@ -686,7 +690,7 @@
}
function getArea(){
- top.restAjax.get(requestUrl.url + '/app/cardtemplatearea/listcardtemplateareabytemplateid/' + id, {}, {
+ top.restAjax.get('app/cardtemplatearea/listcardtemplateareabytemplateid/' + id, {}, {
headers: {
token: token
}
diff --git a/src/main/resources/static/route/namecardList/namecardList.html b/src/main/resources/static/route/namecardList/namecardList.html
index 20432da..f9e9c77 100644
--- a/src/main/resources/static/route/namecardList/namecardList.html
+++ b/src/main/resources/static/route/namecardList/namecardList.html
@@ -77,7 +77,7 @@
height: $win.height() - 60,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
- url: requestUrl.url + '/app/cardtemplate/listpagecardtemplate',
+ url: 'app/cardtemplate/listpagecardtemplate',
headers: {
token: token
},
@@ -119,7 +119,7 @@
},
{
field: 'templateStatus',
- title: '是否收费',
+ title: '开关',
width: '80',
sort: false,
templet: function (data) {
@@ -166,18 +166,18 @@
return value;
}
},
- {
- field: 'templateWidth',
- title: '名片宽度',
- width: '150',
- sort: false,
- },
- {
- field: 'templateHeight',
- title: '名片高度',
- width: '150',
- sort: false,
- },
+ // {
+ // field: 'templateWidth',
+ // title: '名片宽度',
+ // width: '150',
+ // sort: false,
+ // },
+ // {
+ // field: 'templateHeight',
+ // title: '名片高度',
+ // width: '150',
+ // sort: false,
+ // },
{
field: 'cardTemplateId',
fixed: 'right',
@@ -197,12 +197,12 @@
}
})
function getImg(id) {
- top.restAjax.get(requestUrl.url + '/app/file/get/' + id, {}, {
+ top.restAjax.get('app/file/get/' + id, {}, {
headers: {
token: token
}
}, function (res, data) {
- var url = requestUrl.url + '/' + data.data.fileUrl
+ var url = data.data.fileUrl
$('.img' + id).attr('src', url)
})
}
@@ -214,9 +214,12 @@
if (layEvent == 'save') {
layer.open({
type: 1,
+ closeBtn: false,
+ shadeClose: true,
skin: 'layui-layer-rim', //加上边框
area: ['550px', '650px'], //宽高
- content: html
+ content: html,
+ title: '新增名片'
});
$('#uploadBg').on('change', function () {
var file = $(this)[0].files[0]
@@ -229,7 +232,7 @@
}
$.ajax({
type: 'post',
- url: requestUrl.url + '/app/file/uploadimage',
+ url: 'app/file/uploadimage',
data: formdata,
async: false,
contentType: false,
@@ -299,7 +302,7 @@
templateMode: '1',
templateStatus: templateStatus
}
- top.restAjax.post(requestUrl.url + '/app/cardtemplate/savecardtemplate', obj, {
+ top.restAjax.post('app/cardtemplate/savecardtemplate', obj, {
headers: {
token: token
}
@@ -325,7 +328,7 @@
}
ids += checkStatus.data[i].cardTemplateId
}
- top.restAjax.delete(requestUrl.url + '/app/cardtemplate/removecardtemplate/' + ids, {}, {
+ top.restAjax.delete('app/cardtemplate/removecardtemplate/' + ids, {}, {
headers: {
token: token
}
@@ -347,7 +350,10 @@
type: 1,
skin: 'layui-layer-rim', //加上边框
area: ['550px', '650px'], //宽高
+ title: '编辑名片',
content: updateHtml,
+ closeBtn: 1,
+ shadeClose: true,
end: function () {
initTable()
innerCount = 0
@@ -356,12 +362,12 @@
getIndustry('update',checkDatas[0].cardTemplateId)
getFont('update',checkDatas[0].cardTemplateId)
- top.restAjax.get(requestUrl.url + '/app/file/get/' + checkDatas[0].templatePhoto, {}, {
+ top.restAjax.get('app/file/get/' + checkDatas[0].templatePhoto, {}, {
headers: {
token: token
}
}, function (res, data) {
- var url = requestUrl.url + '/' + data.data.fileUrl
+ var url = data.data.fileUrl
$('.bg-img').attr('src', url)
})
$('.update').click(function () {
@@ -415,7 +421,7 @@
templateMode: '1',
templateStatus: templateStatus
}
- top.restAjax.put(requestUrl.url + '/app/cardtemplate/updatecardtemplate/' + checkDatas[0].cardTemplateId, obj, {
+ top.restAjax.put('app/cardtemplate/updatecardtemplate/' + checkDatas[0].cardTemplateId, obj, {
headers: {
token: token
}
@@ -439,7 +445,7 @@
}
$.ajax({
type: 'post',
- url: requestUrl.url + '/app/file/uploadimage',
+ url: 'app/file/uploadimage',
data: formdata,
async: false,
contentType: false,
@@ -460,11 +466,11 @@
var layEvent = obj.event;
if (layEvent == 'edit') {
- layer.open({
+ top.layer.open({
type: 2,
title: false,
closeBtn: true,
- area: ['800px', '500px'],
+ area: ['80%', '80%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/namecard/namecard.html?id=' + obj.data.cardTemplateId, []),
@@ -478,7 +484,7 @@
// initTable()
function getIndustry(type,id) {
- top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=567bb081-fa00-4af3-87cf-aa53e2e24010', {}, {
+ top.restAjax.get('app/datadictionary/listztreedictionary?id=567bb081-fa00-4af3-87cf-aa53e2e24010', {}, {
headers: {
token: token
}
@@ -509,7 +515,7 @@
getIndustry()
function getFont(type,id) {
- top.restAjax.get(requestUrl.url + '/app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, {
+ top.restAjax.get('app/datadictionary/listztreedictionary?id=327e3c97-5f02-4840-9569-73f5d2499e48', {}, {
headers: {
token: token
}
@@ -605,13 +611,13 @@
}
function getNameCard (id) {
- top.restAjax.get(requestUrl.url + '/app/cardtemplate/getcardtemplatebyid/' + id, {}, {
+ top.restAjax.get('app/cardtemplate/getcardtemplatebyid/' + id, {}, {
headers: {
token: token
}
}, function (res, data) {
cardInfo = data
- $('.bg-img').attr('src',requestUrl.url + '/route/file/download/true/' + data.templatePhoto)
+ $('.bg-img').attr('src', 'route/file/download/true/' + data.templatePhoto)
$('.card-name').val(data.templateTitle)
$('.card-intro').val(data.templateDescription)
$('#card-size').val(data.templateWidth)
diff --git a/src/main/resources/static/route/templatedefault/list.html b/src/main/resources/static/route/templatedefault/list.html
index 12404aa..e74a63f 100644
--- a/src/main/resources/static/route/templatedefault/list.html
+++ b/src/main/resources/static/route/templatedefault/list.html
@@ -37,9 +37,9 @@
-
+
+
+
@@ -86,24 +86,24 @@
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '{{d.LAY_INDEX}}'},
- {field: 'templateDefaultId', width: 180, title: '主键UUID', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
- {field: 'templateId', width: 180, title: '名片模板ID', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
+ // {field: 'templateDefaultId', width: 180, title: '主键UUID', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
+ // {field: 'templateId', width: 180, title: '名片模板ID', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
{field: 'cardWidth', width: 180, title: '名片模板宽度', align:'center',
templet: function(row) {
var rowData = row[this.field];
@@ -122,61 +122,7 @@
return rowData;
}
},
- {field: 'cardName', width: 180, title: '名片名', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
- {field: 'backgroundId', width: 180, title: '名片背景图片ID', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
- {field: 'creator', width: 180, title: '', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
- {field: 'gmtCreate', width: 180, title: '', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
- {field: 'modifier', width: 180, title: '', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
- {field: 'gmtModified', width: 180, title: '', align:'center',
- templet: function(row) {
- var rowData = row[this.field];
- if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
- return '-';
- }
- return rowData;
- }
- },
- {field: 'isDelete', width: 180, title: '', align:'center',
+ {field: 'cardName', width: 180, title: '名片名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@@ -185,6 +131,60 @@
return rowData;
}
},
+ // {field: 'backgroundId', width: 180, title: '名片背景图片ID', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
+ // {field: 'creator', width: 180, title: '', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
+ // {field: 'gmtCreate', width: 180, title: '', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
+ // {field: 'modifier', width: 180, title: '', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
+ // {field: 'gmtModified', width: 180, title: '', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
+ // {field: 'isDelete', width: 180, title: '', align:'center',
+ // templet: function(row) {
+ // var rowData = row[this.field];
+ // if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
+ // return '-';
+ // }
+ // return rowData;
+ // }
+ // },
{field:'cz', width:220, title: '操作', align:'center', fixed: 'right',
templet: function(row) {
var rowData = '' +
@@ -275,11 +275,11 @@
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
- layer.open({
+ top.layer.open({
type: 2,
- title: false,
- closeBtn: 0,
- area: ['100%', '100%'],
+ title: "默认名片",
+ closeBtn: 1,
+ area: ['80%', '90%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/templatedefault/template-list.html', []),