|
@@ -359,6 +359,13 @@
|
|
cUrl = request.result.cUrl;
|
|
cUrl = request.result.cUrl;
|
|
cardToken = request.result.cardToken;
|
|
cardToken = request.result.cardToken;
|
|
resolvingPower = request.result.resolvingPower;
|
|
resolvingPower = request.result.resolvingPower;
|
|
|
|
+
|
|
|
|
+ window.currentPhoneSize = {
|
|
|
|
+ width: request.result.width,
|
|
|
|
+ height: request.result.height,
|
|
|
|
+ dpi: request.result.dpi,
|
|
|
|
+ };
|
|
|
|
+
|
|
doConnectBusiness();
|
|
doConnectBusiness();
|
|
doConnectDirectives();
|
|
doConnectDirectives();
|
|
} else {
|
|
} else {
|
|
@@ -494,6 +501,9 @@
|
|
cUrl: cUrl,
|
|
cUrl: cUrl,
|
|
cardToken: res.data.cardToken,
|
|
cardToken: res.data.cardToken,
|
|
resolvingPower: res.data.resolvingPower,
|
|
resolvingPower: res.data.resolvingPower,
|
|
|
|
+ width: res.data.width,
|
|
|
|
+ height: res.data.high,
|
|
|
|
+ dpi: res.data.dpi,
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
updateDB(db, storeName, {
|
|
updateDB(db, storeName, {
|
|
@@ -502,8 +512,23 @@
|
|
cUrl: cUrl,
|
|
cUrl: cUrl,
|
|
cardToken: res.data.cardToken,
|
|
cardToken: res.data.cardToken,
|
|
resolvingPower: res.data.resolvingPower,
|
|
resolvingPower: res.data.resolvingPower,
|
|
|
|
+ width: res.data.width,
|
|
|
|
+ height: res.data.high,
|
|
|
|
+ dpi: res.data.dpi,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ const data = window.phoneSizeList.find(function (v) {
|
|
|
|
+ return (
|
|
|
|
+ v.width === res.data.width &&
|
|
|
|
+ v.height === res.data.height &&
|
|
|
|
+ v.dpi === res.data.dpi
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ window.currentPhoneSize = data || {
|
|
|
|
+ width: res.data.width,
|
|
|
|
+ height: res.data.height,
|
|
|
|
+ dpi: res.data.dpi,
|
|
|
|
+ };
|
|
} else {
|
|
} else {
|
|
$.toast('网络异常,请稍后重试', 'text');
|
|
$.toast('网络异常,请稍后重试', 'text');
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -907,7 +932,7 @@
|
|
if (!isControl) {
|
|
if (!isControl) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- stopManyClick(() => {
|
|
|
|
|
|
+ stopManyClick(function () {
|
|
new Promise((resolve, reject) => {
|
|
new Promise((resolve, reject) => {
|
|
if (window.navigator.clipboard) {
|
|
if (window.navigator.clipboard) {
|
|
window.navigator.clipboard
|
|
window.navigator.clipboard
|
|
@@ -937,7 +962,7 @@
|
|
}
|
|
}
|
|
}).then(function () {
|
|
}).then(function () {
|
|
$('.box-shear-plate').empty();
|
|
$('.box-shear-plate').empty();
|
|
- $.ajax({
|
|
|
|
|
|
+ return $.ajax({
|
|
url: baseUrl + '/api/public/v5/shear/content',
|
|
url: baseUrl + '/api/public/v5/shear/content',
|
|
headers: {
|
|
headers: {
|
|
Authorization: token,
|
|
Authorization: token,
|
|
@@ -1741,11 +1766,6 @@
|
|
// 分辨率列表
|
|
// 分辨率列表
|
|
window.phoneSizeList = [];
|
|
window.phoneSizeList = [];
|
|
// 当前生效的分辨率
|
|
// 当前生效的分辨率
|
|
- window.currentPhoneSize = {
|
|
|
|
- // id: 1,
|
|
|
|
- width: 720,
|
|
|
|
- height: 1280,
|
|
|
|
- };
|
|
|
|
// 选中的分辨率
|
|
// 选中的分辨率
|
|
// window.activePhoneSize = window.currentPhoneSize;
|
|
// window.activePhoneSize = window.currentPhoneSize;
|
|
|
|
|
|
@@ -1778,13 +1798,13 @@
|
|
// window.phoneSizeListBack = phoneSizeList; // 备份下数据,用户横竖切换时。
|
|
// window.phoneSizeListBack = phoneSizeList; // 备份下数据,用户横竖切换时。
|
|
const currentPhoneSize = window.phoneSizeList.find(function (v) {
|
|
const currentPhoneSize = window.phoneSizeList.find(function (v) {
|
|
return (
|
|
return (
|
|
- v.width ===
|
|
|
|
- window.currentPhoneSize[resolving ? 'width' : 'height'] &&
|
|
|
|
- v.height ===
|
|
|
|
- window.currentPhoneSize[resolving ? 'height' : 'width'] &&
|
|
|
|
|
|
+ window.currentPhoneSize &&
|
|
|
|
+ v.width === window.currentPhoneSize.width &&
|
|
|
|
+ v.height === window.currentPhoneSize.height &&
|
|
v.dpi === window.currentPhoneSize.dpi
|
|
v.dpi === window.currentPhoneSize.dpi
|
|
);
|
|
);
|
|
});
|
|
});
|
|
|
|
+
|
|
window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
|
|
window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
|
|
// return updatePhoneSizeListHtml();
|
|
// return updatePhoneSizeListHtml();
|
|
});
|
|
});
|
|
@@ -1836,24 +1856,6 @@
|
|
// }),
|
|
// }),
|
|
// );
|
|
// );
|
|
// 上报分辨率
|
|
// 上报分辨率
|
|
- $.ajax({
|
|
|
|
- url:
|
|
|
|
- baseUrl +
|
|
|
|
- '/api/resources/v5/machine/resolution/operationResolvingPower',
|
|
|
|
- headers: {
|
|
|
|
- Authorization: token,
|
|
|
|
- },
|
|
|
|
- type: 'post',
|
|
|
|
- dataType: 'json',
|
|
|
|
- contentType: 'application/json; charset=UTF-8',
|
|
|
|
- data: JSON.stringify({
|
|
|
|
- userCardId: window.userCardId,
|
|
|
|
- resolvingPowerId: config.id,
|
|
|
|
- // width: config.width,
|
|
|
|
- // height: config.height,
|
|
|
|
- // dpi: config.dpi,
|
|
|
|
- }),
|
|
|
|
- });
|
|
|
|
window.currentPhoneSize = config;
|
|
window.currentPhoneSize = config;
|
|
}
|
|
}
|
|
// wsss.addEventListener('message', function (event) {
|
|
// wsss.addEventListener('message', function (event) {
|